/* PROJECTDARV immersive v2 — motion layer styles. Everything here either applies only with the JS motion
   classes (html.fx, set by v2.js) or is harmless without them. Content is never hidden by CSS alone. */

/* GSAP owns reveals in v2: neutralise the cinematic CSS reveal so nothing waits on IntersectionObserver */
html.motion .rv{opacity:1;transform:none;filter:none;transition:none}
html.motion .hero__title{animation:none}
html.lenis,html.lenis body{height:auto;scroll-behavior:auto}
.lenis.lenis-smooth [data-lenis-prevent]{overscroll-behavior:contain}

/* word split (headings): words stay inline text for screen readers */
.w{display:inline-block;will-change:transform,filter,opacity}

/* ring: pointer parallax on desktop */
.scene__ring{translate:var(--rx,0px) var(--ry,0px)}

/* ---------- Story: one stage, lines light up in sequence ---------- */
html.fx .story{min-height:100vh;min-height:100svh;display:flex;flex-direction:column;justify-content:center;padding:96px 22px 48px}
html.fx .story__title{margin-bottom:5vh}
html.fx .story__lines li{font-size:clamp(28px,4.2vw,56px);max-width:22ch;margin:0 auto 3.2vh}
html.fx .story__turn{margin-top:2vh}
html.fx .story__turn b{font-size:clamp(30px,4.6vw,60px);margin-bottom:12px}
html.fx .help{padding-top:8vh;padding-bottom:12vh}
@media (min-width:900px){
  html.fx .help{padding-top:8px;padding-bottom:8vh}
  html.fx .help__head{margin-bottom:3.2vh}
  html.fx .help__grid{row-gap:5vh;column-gap:120px}
  html.fx .help__grid .feat:nth-child(2),
  html.fx .help__grid .feat:nth-child(4){margin-top:3.2vh}
}
/* Body copy over the film: lift contrast, drop the heavy black bloom that muddied the letters */
html.fx .feat p,html.fx .help__head .sub{color:#f0ecf8;text-shadow:0 1px 2px rgba(0,0,0,.7)}

/* ---------- Top 3: plinths rise from the floor ---------- */
.top3__plinth{transform-origin:50% 100%}
.top3__avatar{transform-style:preserve-3d}
html.fx .top3__card--first .top3__avatar{animation:crown 3.2s ease-in-out infinite}
@keyframes crown{50%{box-shadow:0 22px 70px -8px rgba(254,44,85,.85)}}

/* ---------- Tilt + spotlight surfaces ---------- */
[data-tilt]{position:relative;transform-style:preserve-3d}
html.fx [data-tilt]::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:0;transition:opacity .35s;
  background:radial-gradient(420px circle at var(--mx,50%) var(--my,50%),rgba(255,255,255,.10),transparent 45%)}
html.fx [data-tilt]:hover::before{opacity:1}

/* ---------- Programs: horizontal sequence on wide screens (html.hz), stacked cards on phones (html.stack) ---------- */
html.hz .programs{overflow:hidden}
html.hz .programs .wrap{max-width:none;padding:0}
html.hz .programs .head{max-width:1180px;margin:0 auto 36px;padding:0 56px 28px}
html.hz .programs__list{display:flex;gap:28px;width:max-content;padding:0 max(56px,calc((100vw - 1180px)/2 + 56px))}
html.hz .prog{width:min(460px,38vw);min-height:420px;grid-template-columns:none;grid-template-rows:auto 1fr auto;gap:16px;padding:36px 34px 28px;border:1px solid var(--rule-2);border-radius:16px;
  background:linear-gradient(160deg,rgba(255,255,255,.06),rgba(255,255,255,.01) 60%),var(--void-2)}
html.hz .prog:first-child{padding-top:36px}
html.hz .prog h3{font-size:30px}
html.hz .prog__link{justify-self:start;text-align:left}
html.hz .programs__disclaimer{max-width:1180px;margin:30px auto 0;padding:0 56px}
html.hz .programs__progress{display:block}
.programs__progress{display:none;max-width:1180px;margin:28px auto 0;padding:0 56px}
.programs__progress span{display:block;height:2px;background:linear-gradient(90deg,var(--pink),var(--cyan));transform-origin:0 50%;transform:scaleX(0)}

html.stack .prog{position:sticky;background:var(--void-2);border:1px solid var(--rule-2);border-radius:16px;padding:24px 20px 14px;margin-bottom:18px;
  box-shadow:0 -18px 40px -18px rgba(0,0,0,.9)}
html.stack .prog:first-child{padding-top:24px}
html.stack .prog:nth-child(1){top:84px}html.stack .prog:nth-child(2){top:96px}
html.stack .prog:nth-child(3){top:108px}html.stack .prog:nth-child(4){top:120px}

/* ---------- Bonus table rows wipe in ---------- */
.bonus__table tbody tr{position:relative}
html.fx .bonus__table tbody tr:first-child td{text-shadow:0 0 24px rgba(254,44,85,.45)}

/* ---------- About: clip reveal + inner parallax ---------- */
html.fx .about__photo img{scale:1.12}

/* ---------- Apply: glow + magnetic CTA, slow ring ---------- */
.mag{will-change:transform}
html.fx .apply .cta .btn{animation:glow 2.6s ease-in-out infinite}
@keyframes glow{0%,100%{box-shadow:0 12px 32px -12px rgba(254,44,85,.75),0 0 0 0 rgba(254,44,85,.0)}50%{box-shadow:0 18px 44px -10px rgba(254,44,85,.95),0 0 0 8px rgba(254,44,85,.12)}}
html.fx .apply__ring{--ap:1;scale:calc(.6 + .4*var(--ap));opacity:calc(.55*var(--ap))}
html.fx .apply__ring{animation:spin 60s linear infinite}
@keyframes spin{to{rotate:360deg}}

/* scroll progress hairline */
.progress{position:fixed;left:0;top:0;height:2px;width:100%;z-index:70;transform-origin:0 50%;transform:scaleX(0);background:linear-gradient(90deg,var(--pink),var(--cyan));pointer-events:none}
html:not(.fx) .progress{display:none}

@media (prefers-reduced-motion:reduce){
  html.fx .top3__card--first .top3__avatar,html.fx .apply .cta .btn,html.fx .apply__ring{animation:none}
}
html.stack .prog__link{min-height:48px}


/* ---------- Header + phone Apply-bar clearance ---------- */
:root{
  --bar-h:64px;
  --clear-top:calc(var(--bar-h) + env(safe-area-inset-top, 0px) + 28px);
  --dock-space:0px;
}
/* .sec already pads enough to clear the header; only tight blocks (help, howto) get a scroll-margin */
html{scroll-padding-top:0;scroll-padding-bottom:var(--dock-space)}
/* Tight sections whose own padding is smaller than the header (help, howto, apply) */
#help,#how-to-join,.howto,.help,.story,#apply{scroll-margin-top:var(--clear-top)}
/* When a .sec sits at the top of the viewport, its heading still starts below the header */
.sec{padding-top:max(clamp(84px,11vw,150px),var(--clear-top))}

@media (max-width:899px){
  :root{--dock-space:calc(78px + env(safe-area-inset-bottom, 0px))}
  .sec{padding-bottom:max(clamp(84px,11vw,150px),calc(var(--dock-space) + 24px))}
  /* Podium: all three spots and their links fit between the header and the Apply bar */
  .top3 .head{padding-bottom:8px;margin-bottom:10px;gap:8px}
  .top3__list{gap:10px 12px}
  .top3__avatar{width:76px}
  .top3__card--first .top3__avatar{width:96px}
  .top3__plinth{height:36px}
  .top3__card--first .top3__plinth{height:48px}
  .top3__card--third .top3__plinth{height:28px}
  .top3__name{font-size:18px}
  .top3__card--first .top3__name{font-size:24px}
  .top3__body{padding:6px 0 4px;gap:1px}
  .top3__badge{white-space:nowrap;margin-top:4px;padding:3px 9px;font-size:11.5px}
  .top3__rank{font-size:26px;padding-top:4px}
  .top3__card--first .top3__rank{font-size:36px}
  .top3__note{margin:10px 0 0}
  html.stack .programs__list{padding-bottom:var(--dock-space)}
  /* About: fit the photo, copy, and "See my TikTok" link above the Apply bar on first landing.
     The photo file and crop are unchanged; only the on-screen size and gaps tighten. */
  .about__grid{gap:16px}
  .about__photo{width:68%}
  .about__copy h2{margin-bottom:12px}
  .about__copy p{margin:0 0 10px}
  .about__solo{margin-bottom:12px}
  .faq-sec .head{padding-bottom:16px;margin-bottom:20px}
}
