/* ═══════════════════════════════════════════════════════════════════════════
   TNS Panel Hero — drie verticale kleurvlakken + uitgesneden studentfoto
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Custom properties ── */
.tns-ph {
    --ph-navy: #102F49;
    --ph-sage: #828673;
    --ph-gold: #BFA46A;
    --ph-font-title: 'Hind', -apple-system, BlinkMacSystemFont, sans-serif;
    --ph-font-body:  'Helvetica Now Display', 'Helvetica Neue', Arial, sans-serif;
}

/* ── Sectie wrapper ── */
.tns-ph {
    position: relative;
    width: 100%;
    min-height: var(--tns-ph-min-h, 75vh);
    overflow: hidden;
    background: var(--ph-navy, #102F49); /* Zorgt dat alles navy is vóór animatie */
}

/* ── Drie-kolommen inner ── */
.tns-ph__inner {
    display: flex;
    min-height: var(--tns-ph-min-h, 75vh);
}

/* ── Kolommen ── */
.tns-ph__col {
    position: relative;
}

.tns-ph__col--navy {
    flex: 0 0 42%;
    background: var(--ph-col-navy-bg, var(--ph-navy));
    padding: clamp(56px, 9vh, 120px) clamp(28px, 4vw, 72px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    position: relative;
    z-index: 2;
}

.tns-ph__col--sage {
    flex: 0 0 30%;
    background: var(--ph-col-sage-bg, var(--ph-sage));
    display: flex;
    align-items: center;
    padding: clamp(32px, 4vh, 56px) clamp(24px, 3vw, 44px);
    /* geen z-index — zodat quote (z-index:2) boven de foto (z-index:1) uitkomt */
}

.tns-ph__col--gold {
    flex: 1;
    background: var(--ph-col-gold-bg, var(--ph-gold));
}

/* ── Eyebrow ── */
.tns-ph__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--ph-font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ph-gold);
}
.tns-ph__eyebrow::before {
    content: '';
    display: inline-block;
    width: 22px;
    height: 2px;
    background: var(--ph-gold);
    flex-shrink: 0;
}

/* ── Titel ── */
.tns-ph__title {
    font-family: var(--ph-font-title);
    font-size: clamp(2.4rem, 4.2vw, 4.5rem);
    font-weight: 700;
    line-height: 1.0;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.tns-ph__em-gold {
    font-style: normal;
    color: var(--ph-gold);
}

/* ── Feature iconen ── */
.tns-ph__features {
    display: grid;
    grid-template-columns: repeat(3, 110px);
    column-gap: 12px;
}

.tns-ph__feature {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.tns-ph__feature-icon {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 0;
    margin-bottom: 8px;
}

.tns-ph__feature-icon svg {
    width: 52px;
    height: 52px;
    display: block;
    fill: none;
    stroke: #BFA46A;
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
    overflow: visible;
}

/* Streepje onder icoon — altijd goud */
.tns-ph__feature-icon::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: #BFA46A;
    margin-top: 12px;
    transition: width .35s cubic-bezier(.4, 0, .2, 1);
}

.tns-ph__feature:hover .tns-ph__feature-icon::after { width: 38px; }

/* Wit variant per icoon */
.tns-ph__feature--white .tns-ph__feature-icon svg { stroke: rgba(255,255,255,0.85); }

.tns-ph__feature-label {
    font-family: var(--ph-font-body);
    font-size: 15px;
    font-weight: 400;
    color: rgba(255,255,255,0.80);
    white-space: normal;
    line-height: 1.3;
}

/* ── CTA knop ── */
.tns-ph__cta-wrap { display: flex; flex-direction: column; gap: 10px; }

.tns-ph__cta {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 14px 32px;
    background: var(--ph-gold);
    color: var(--ph-navy);
    font-family: var(--ph-font-body);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 999px;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 16px rgba(191,164,106,0.35);
}

a.tns-ph__cta:hover {
    background: #d4b47a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(191,164,106,0.5);
}

/* ── Tagline ── */
.tns-ph__tagline {
    font-family: var(--ph-font-body);
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    margin: 0;
    line-height: 1.5;
}

/* ── Quote — boven de foto via z-index ── */
.tns-ph__quote {
    position: relative;
    z-index: 2;
    max-width: 280px;
}

.tns-ph__quote-mark {
    display: block;
    font-family: Georgia, serif;
    font-size: 72px;
    line-height: 0.7;
    color: var(--ph-gold);
    margin-bottom: 14px;
}

.tns-ph__quote-attr strong {
    font-family: var(--ph-font-title);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ph-gold);
}

.tns-ph__quote-attr span {
    font-family: var(--ph-font-body);
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* (quote-mark en quote-attr stijlen staan bij de quote-sectie hierboven) */

.tns-ph__quote-text {
    font-family: var(--ph-font-body);
    font-size: clamp(14px, 1.3vw, 17px);
    font-weight: 400;
    color: #ffffff;
    line-height: 1.65;
    margin: 0 0 16px;
}

.tns-ph__quote-attr {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ── Studentfoto — background-attachment:fixed loopt op de GPU compositor (geen JS nodig) ── */
.tns-ph__photo {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 58%;
    z-index: 1;
    pointer-events: none;

    background-attachment: fixed;
    background-repeat: no-repeat;
    /* min() zorgt dat foto kleiner wordt als scherm smaller wordt (vw) én niet groter dan ingestelde hoogte (vh) */
    /* background-size wordt nauwkeurig ingesteld via view.js */
    background-size: auto var(--tns-ph-photo-maxh, 85vh);
}

/* iOS Safari ondersteunt background-attachment:fixed niet — fallback naar scroll */
@media (hover: none) and (pointer: coarse) {
    .tns-ph__photo {
        background-attachment: scroll;
        background-size: cover;
    }
}

/* ── Verticaal label (rechts) ── */
.tns-ph__label-vert {
    position: absolute;
    right: 14px;
    top: 50%;
    z-index: 5;
    writing-mode: vertical-rl;
    transform: translateY(-50%) rotate(180deg);
    font-family: var(--ph-font-body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(16,47,73,0.40);
    user-select: none;
    white-space: nowrap;
}

/* ── Responsive: tablet (768–1024px) ── */
@media (max-width: 1024px) {
    .tns-ph__col--navy  { flex-basis: 46%; }
    .tns-ph__col--sage  { flex-basis: 27%; padding: 40px 20px; }
    .tns-ph__title      { font-size: clamp(2rem, 5vw, 3.5rem); }
    .tns-ph__quote      { max-width: 200px; }
    /* Foto schaalt vanzelf mee: container wordt smaller → foto clips aan de linkerkant */
}

/* ── Responsive: mobiel (< 768px) ── */
@media (max-width: 767px) {

    /* Sectie als kolom, foto boven de content */
    .tns-ph {
        display: flex;
        flex-direction: column;
        min-height: unset;
    }

    /* Foto: bovenaan, full-width, responsive hoogte */
    .tns-ph__photo {
        order: 0;
        position: relative !important;
        width: 100% !important;
        height: 65vw;
        right: auto;
        top: auto;
        bottom: auto;
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center 15% !important;
    }

    /* Inner columns onder de foto */
    .tns-ph__inner {
        order: 1;
        flex-direction: column;
        min-height: unset;
        overflow: visible !important; /* animatie niet nodig op mobiel */
    }

    /* Navy kolom: volledige breedte */
    .tns-ph__col--navy {
        flex-basis: auto;
        padding: 40px 20px 32px;
        gap: 20px;
        z-index: auto;
    }

    /* Sage kolom: compact, quote zichtbaar */
    .tns-ph__col--sage {
        flex-basis: auto;
        padding: 28px 20px;
        align-items: flex-start;
    }

    .tns-ph__quote { max-width: 100%; }
    .tns-ph__quote-mark { font-size: 48px; margin-bottom: 8px; }

    /* Goud kolom: verbergen */
    .tns-ph__col--gold { display: none; }

    /* Label: verbergen */
    .tns-ph__label-vert { display: none; }

    /* Titel kleiner */
    .tns-ph__title { font-size: clamp(2rem, 8vw, 3rem); }

    /* Features: compacter */
    .tns-ph__features {
        grid-template-columns: repeat(3, 80px);
        column-gap: 8px;
    }
    .tns-ph__feature-icon svg { width: 36px; height: 36px; }

    /* CTA */
    .tns-ph__cta { align-self: flex-start; }

    /* Balk-animatie uitschakelen op mobiel */
    .tns-ph.tns-ph--animation-ready .tns-ph__col--sage,
    .tns-ph.tns-ph--animation-ready .tns-ph__col--gold {
        transform: none !important;
        transition: none !important;
    }
}

/* ── Balk-reveal animatie ── */
/* Inner heeft overflow:hidden zodat sage + goud van onderen kunnen inschuiven */
.tns-ph.tns-ph--animation-ready .tns-ph__inner { overflow: hidden; }

/* Beginstaat: sage en goud verborgen onder de onderrand */
.tns-ph.tns-ph--animation-ready .tns-ph__col--sage,
.tns-ph.tns-ph--animation-ready .tns-ph__col--gold {
    transform: translateY(100%);
    /* Geen transitie vóór trigger — anders ziet de browser het eerste frame als geanimeerd */
    transition: none;
}

/* Foto ook verbergen totdat balken in beeld zijn */
.tns-ph.tns-ph--animation-ready .tns-ph__photo {
    opacity: 0;
    transition: none;
}

/* Geactiveerd — balken schuiven omhoog */
.tns-ph.tns-ph--revealed .tns-ph__col--sage {
    transform: translateY(0);
    transition: transform 0.90s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: 0s;
}
.tns-ph.tns-ph--revealed .tns-ph__col--gold {
    transform: translateY(0);
    transition: transform 0.90s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: 0.25s;
}

/* Na de animatie: transform verwijderen. Een transform (ook translateY(0))
   maakt een stacking context, waardoor de quote (z-index:2) onder de foto
   (z-index:1) gevangen raakt. Settled herstelt de normale stacking. */
.tns-ph.tns-ph--settled .tns-ph__col--sage,
.tns-ph.tns-ph--settled .tns-ph__col--gold {
    transform: none;
    transition: none;
}

/* Foto verschijnt als goud-balk al goed in beeld is */
.tns-ph.tns-ph--revealed .tns-ph__photo {
    opacity: 1;
    transition: opacity 0.80s ease;
    transition-delay: 0.85s;
}

/* ── Navy content + quote — staggered fade-in na de balken ── */
.tns-ph.tns-ph--animation-ready .tns-ph__eyebrow,
.tns-ph.tns-ph--animation-ready .tns-ph__title,
.tns-ph.tns-ph--animation-ready .tns-ph__features,
.tns-ph.tns-ph--animation-ready .tns-ph__cta-wrap,
.tns-ph.tns-ph--animation-ready .tns-ph__tagline,
.tns-ph.tns-ph--animation-ready .tns-ph__quote {
    opacity: 0;
    transform: translateY(14px);
    transition: none;
}

.tns-ph.tns-ph--revealed .tns-ph__eyebrow  { opacity:1; transform:translateY(0); transition: opacity .55s ease, transform .55s ease; transition-delay: .20s; }
.tns-ph.tns-ph--revealed .tns-ph__title    { opacity:1; transform:translateY(0); transition: opacity .60s ease, transform .60s ease; transition-delay: .35s; }
.tns-ph.tns-ph--revealed .tns-ph__features { opacity:1; transform:translateY(0); transition: opacity .55s ease, transform .55s ease; transition-delay: .52s; }
.tns-ph.tns-ph--revealed .tns-ph__cta-wrap { opacity:1; transform:translateY(0); transition: opacity .55s ease, transform .55s ease; transition-delay: .65s; }
.tns-ph.tns-ph--revealed .tns-ph__tagline  { opacity:1; transform:translateY(0); transition: opacity .50s ease, transform .50s ease; transition-delay: .75s; }
.tns-ph.tns-ph--revealed .tns-ph__quote    { opacity:1; transform:translateY(0); transition: opacity .60s ease, transform .60s ease; transition-delay: .65s; }

/* ── Lead tekst onder titel ── */
.tns-ph__lead {
    font-family: var(--ph-font-body, 'Helvetica Now Display', sans-serif);
    font-size: clamp(15px, 1.3vw, 18px);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.75;
    margin: 0 0 28px;
    max-width: 420px;
}

/* ── Video-laag (videoUrl vervangt de foto) ──────────────────────
   Zelfde laagpositie als de foto: over de sage/goud-banen,
   gerespecteerde marge rechts, hoogte gekoppeld aan photoMaxHeight. */
.tns-ph__video-wrap {
    position: absolute;
    right: var(--tns-ph-photo-mr, 0px);
    top: 50%;
    transform: translateY(-50%);
    width: min(52%, 960px);
    max-height: var(--tns-ph-photo-maxh, 85vh);
    aspect-ratio: 16 / 9;
    z-index: 1;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    background: #0b2236;
}
.tns-ph__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    object-fit: cover;
}

@media (max-width: 820px) {
    .tns-ph__video-wrap {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        width: 100%;
        max-height: none;
        box-shadow: none;
    }
}

/* Video is puur visueel: geen hover-UI, niet pauzeerbaar */
.tns-ph__video-wrap,
.tns-ph__video { pointer-events: none; }

/* Video start verborgen (inline opacity:0 vanuit de server) en fade in
   zodra view.js de inline waarde op 1 zet — deze transition regelt dat. */
.tns-ph__video-wrap {
    transition: opacity 0.9s ease;
}

@media (prefers-reduced-motion: reduce) {
    .tns-ph .tns-ph__video-wrap {
        transition: none !important;
    }
}

@media (max-width: 820px) {
    .tns-ph .tns-ph__video-wrap { transform: none !important; }
}

/* Failsafe: mocht JS nooit draaien, dan verschijnt de video alsnog na 4s.
   CSS-animaties overrulen inline styles, dus dit doorbreekt het FOUC-slot. */
@keyframes tns-ph-video-failsafe {
    to { opacity: 1; }
}
.tns-ph[data-tns-animate="1"] .tns-ph__video-wrap {
    animation: tns-ph-video-failsafe 0.9s ease 4s forwards;
}
