/* =============================================================================
   Quizora AI — landing page
   -----------------------------------------------------------------------------
   Stacking (back to front):
     #scene (WebGL arena, z0) → veils (z1) → .track copy (z1) → .whiteout (z3)
     → .light-zone (z4) → .finale (z4) → .bottom-nav (z5) → cursor smoke (z59)

   Sections are tall scroll "runways" with a sticky full-screen pin inside.
   The light zone and the finale lay out on a 1440×900 artboard (.art) that
   is scaled to fit the viewport (--as, set in js/layout.js); below 900px the
   artboard turns into a normal stacked layout.

   Sections of this file:
     1. Tokens & base          6. Light zone (whiteout, stage)
     2. Layout primitives       7. Why Quizora (card stack)
     3. Shared components       8. How to Play
     4. Text reveal & typing    9. Finale (leaderboard CTA)
     5. Dark sections          10. Bottom nav & menu
                               11. Cursor wind
                               12. Responsive (≤900, 600–900, <600)
                               13. Reduced motion
   ========================================================================== */


/* 1. Tokens & base ------------------------------------------------------------ */
:root{
  --night:#070818;          /* page background, navy text on light */
  --ink-deep:#050824;       /* veils, nav fade */
  --fg:#F4F5FF;             /* light text */
  --peri:#8A8CF4;           /* brand periwinkle */
  --teal:#46ADC5;           /* brand teal */
  --f-grot:"Space Grotesk","Familjen Grotesk",system-ui,sans-serif;   /* display */
  --f-copy:"Acid Grotesk","Familjen Grotesk",system-ui,sans-serif;    /* body copy */
  --f-body:"Familjen Grotesk",system-ui,-apple-system,"Segoe UI",sans-serif;
  --f-mono:"JetBrains Mono",ui-monospace,Menlo,monospace;
  --gutter:max(16px,5.2vw);
  color-scheme:dark;
}
html{background:var(--night);scroll-behavior:auto}
body{margin:0;background:var(--night);color:var(--fg);font-family:var(--f-body);font-size:17px;line-height:1.55;-webkit-font-smoothing:antialiased;overflow-x:hidden}
h1,h2,h3{margin:0;text-wrap:balance}
p{margin:0;max-width:60ch}

#scene{position:fixed;inset:0;width:100%;height:100%;display:block;z-index:0;outline:none}
.no-webgl body{background:radial-gradient(80% 60% at 70% 30%,#1b1d55,var(--night))}
.webgl-defs{position:absolute}   /* hidden <svg> holding the logo paths the 3D scenes extrude */


/* 2. Layout primitives ---------------------------------------------------------- */
/* dark scroll track (hero → dive); it never takes pointer events so the 3D mark stays clickable */
.track{position:relative;z-index:1;pointer-events:none}
.pin{position:sticky;top:0;height:100vh;height:100svh;width:100%;overflow:hidden}

/* scroll length of each section */
#hero{height:130vh}
#about{height:300vh}
#type{height:270vh}
#dive{height:200vh}
#whyStack{height:540vh}
#howPlay{height:230vh}
#finale{height:290vh}
.topics-intro{height:70vh}
.topic-stop{height:78vh}         /* one per pillar; the camera passes each at its centre */
.spin-runway{height:40vh}

/* 1440×900 artboard, scaled to fit (light zone + finale) */
.art{position:absolute;left:50%;top:50%;width:1440px;height:900px;transform:translate(-50%,-50%) scale(var(--as,1))}


/* 3. Shared components ---------------------------------------------------------- */
.grad{background:linear-gradient(90deg,#8A8CF4,#46ADC5);-webkit-background-clip:text;background-clip:text;color:transparent}

/* primary CTA: "Launch Quizora AI" (hero + finale) */
.btn-launch{display:inline-flex;align-items:center;gap:12px;margin-top:22px;padding:18px 30px;border-radius:40px;background:linear-gradient(90deg,#8A8CF4,#46ADC5);box-shadow:0 10px 36px rgba(70,173,197,.5);
  font:600 16px/1 "Familjen Grotesk",var(--f-copy);letter-spacing:.1em;text-transform:uppercase;color:#F4F5FF;text-decoration:none;transition:transform .35s cubic-bezier(.19,1,.22,1),box-shadow .35s}
.btn-launch:hover{transform:translateY(-2px);box-shadow:0 16px 46px rgba(70,173,197,.7)}

.chip{display:inline-block;padding:6px 12px;border-radius:20px;background:rgba(138,140,244,.14);font:500 13px/1 "JetBrains Mono",monospace;letter-spacing:.08em;color:#8A8CF4}


/* 4. Text reveal & typing ----------------------------------------------------- */
/* [data-reveal] blocks are split into masked lines; each line slides up out of its mask, staggered via --d.
   The parent [data-reveal-group] carries data-state = future | in | past (js/reveal.js). */
[data-reveal] .ln{display:block;overflow:hidden;padding-bottom:.24em;margin-bottom:-.24em}
[data-reveal] .ln-in{display:block;transform:translate3d(0,112%,0) rotate(3deg);transform-origin:0 100%;
  transition:transform 1.05s cubic-bezier(.19,1,.22,1) var(--d,0s)}
[data-state="in"] [data-reveal] .ln-in{transform:none}
[data-state="past"] [data-reveal] .ln-in{transform:translate3d(0,-112%,0) rotate(-2deg);transition-duration:.7s;transition-timing-function:cubic-bezier(.7,0,.84,0)}
[data-reveal]:not(.is-split){visibility:hidden}

/* scroll-typed text: every character is laid out up front (invisible), then switched on */
.type-lines .ch,.topics-line .ch{opacity:0}
.type-lines .ch.on,.topics-line .ch.on{opacity:1}
.type-lines .cursor,.topics-line .cursor{display:inline-block;width:0;overflow:visible;font-weight:300;animation:blink 1s steps(1) infinite}
@keyframes blink{50%{opacity:0}}


/* 5. Dark sections (hero, about, topics, statement) ---------------------------- */
/* full-screen gradient veils keep copy readable over the 3D scene; one per section, toggled with .on */
.veil-fx{position:fixed;inset:0;z-index:1;pointer-events:none;opacity:0;transition:opacity 1s cubic-bezier(.19,1,.22,1)}
.veil-fx.on{opacity:1}
.veil-hero{background:linear-gradient(90deg,var(--ink-deep) 30%,rgba(7,8,24,0) 51%)}
.veil-about{background:linear-gradient(90deg,var(--ink-deep) 5%,rgba(6,8,33,0) 35%,rgba(6,8,33,0) 65%,var(--ink-deep) 100%)}
.veil-why{background:linear-gradient(90deg,rgba(6,8,33,0) 35%,rgba(6,8,33,.3) 44%,var(--ink-deep) 90%)}
.veil-type{background:linear-gradient(90deg,var(--ink-deep) 5%,rgba(6,8,33,.4) 35%,rgba(6,8,33,.4) 62%,var(--ink-deep) 100%)}

/* hero (Figma 4:37) */
.hero-copy{position:absolute;left:var(--gutter);top:11.1vh;width:min(600px,calc(100% - 2*var(--gutter)));display:flex;flex-direction:column;gap:63px;text-shadow:0 2px 30px rgba(7,8,24,.8)}
.h-xl{margin:0;font:700 clamp(44px,5.56vw,80px)/1 var(--f-grot);letter-spacing:-.02em;color:#F4F5FF;text-wrap:balance}
.copy{margin:0;font:400 19px/1.55 var(--f-copy);color:#F4F5FF;max-width:600px}
.chant{display:block;margin-top:26px;font:700 13px/1 var(--f-grot);letter-spacing:.14em;text-transform:uppercase;color:var(--fg)}
.chant .c1{color:#F4F5FF}.chant .c2{color:#8A8CF4}.chant .c3{color:#46ADC5}
.chant .w{margin-right:14px}
/* hero CTA fades in after the chant line */
.hero-btn{margin-top:44px;pointer-events:auto;opacity:0;transform:translate3d(0,18px,0);transition:opacity .9s cubic-bezier(.19,1,.22,1) .45s,transform 1.1s cubic-bezier(.19,1,.22,1) .45s,box-shadow .35s}
[data-state="in"] .hero-btn{opacity:1;transform:none}
[data-state="in"] .hero-btn:hover{transform:translateY(-2px)}
[data-state="past"] .hero-btn{opacity:0;transform:translate3d(0,-12px,0);transition-delay:0s}

/* about (Figma 7:314) */
.eyebrow-g{margin:0 0 41px;font:700 13px/1 var(--f-grot);letter-spacing:.14em;text-transform:uppercase;color:#F4F5FF}
.about-head{position:absolute;left:var(--gutter);top:29.1vh;width:330px}
.h-l{margin:0;font:700 clamp(36px,3.47vw,50px)/1.05 var(--f-grot);letter-spacing:-.02em;color:#F4F5FF}
.about-copy{position:absolute;right:var(--gutter);top:39.2vh;width:242px;text-align:right}

/* topics: one pinned headline typed phrase by phrase as the camera passes each pillar (Figma 7:419 → 10:675) */
.why-pin{margin-bottom:-100vh;margin-bottom:-100svh}
.topics-line{position:absolute;left:51.2vw;top:32vh;width:min(606px,42vw);transition:opacity .6s,transform .6s cubic-bezier(.7,0,.84,0)}
[data-state="past"] .topics-line{opacity:0;transform:translateY(-24px)}

/* statement, typed by scroll (Figma 10:719) */
.type-pin{margin-bottom:-100vh;margin-bottom:-100svh}
.type-lines{position:absolute;left:50%;top:33.7vh;width:min(1023px,calc(100% - 2*var(--gutter)));transform:translateX(-50%);margin:0;text-align:center;
  font:700 clamp(28px,3.47vw,50px)/1.05 var(--f-grot);letter-spacing:-.02em;color:#F4F5FF;transition:opacity .6s,transform .6s cubic-bezier(.7,0,.84,0)}
.type-lines .tl{display:block;margin-bottom:.4em}
[data-state="past"] .type-lines{opacity:0;transform:translate(-50%,-24px)}


/* 6. Light zone ------------------------------------------------------------------ */
/* the dive burns to pure white first; only then do the light-leak background and the crystals pop in (.popped) */
.whiteout{position:fixed;inset:0;z-index:3;background:#fff;opacity:0;pointer-events:none}
.whiteout .pop{position:absolute;inset:0;opacity:0;transform:scale(1.06);transition:opacity .5s ease,transform .5s ease}
.whiteout.popped .pop-bg{opacity:1;transform:none;transition:opacity 1.1s ease,transform 1.6s cubic-bezier(.19,1,.22,1)}
.whiteout .pop-cr{transform:scale(1.18)}
.whiteout.popped .pop-cr{opacity:1;transform:none;transition:opacity .9s ease .35s,transform 1.4s cubic-bezier(.34,1.56,.64,1) .35s}
#lightLeak{position:absolute;inset:0;width:100%;height:100%;display:block}
/* crystal shards: depth of field by layer (far = blurred, near = sharp) */
.whiteout .crystals{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}
.crystals[data-layer="far"]{filter:blur(3px);opacity:.75}
.crystals[data-layer="mid"]{filter:blur(1px);opacity:.9}

.light-zone{position:relative;z-index:4;background:transparent;color:#070818;margin-top:-100vh;margin-top:-100svh}
.light-zone>section{position:relative;z-index:1}

/* shared stage behind both light sections: orbit rings, glow and the 3D petals (js/petals.js) */
.lz-stage{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:0;opacity:0;transition:opacity 1s ease .15s}
.lz-on .lz-stage{opacity:1}
.lz-stage canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
#petals{touch-action:pan-y}
.lz-rings{position:absolute;left:0;top:0;overflow:visible;transform-origin:0 0;will-change:transform}
.lz-rings circle{fill:none;stroke:rgba(138,140,244,.38);stroke-width:1;vector-effect:non-scaling-stroke}
.lz-rings .r1{stroke-dasharray:2 7;stroke:rgba(138,140,244,.55)}
.lz-rings .r3{opacity:0}
.lz-glow{position:absolute;left:0;top:0;width:300px;height:300px;margin:-150px 0 0 -150px;border-radius:50%;background:radial-gradient(closest-side,rgba(138,140,244,.42),rgba(138,140,244,.12) 55%,rgba(138,140,244,0));will-change:transform}
html.petal-hover body{cursor:pointer}


/* 7. Why Quizora — card stack (Figma 02 · Light BG 1) ------------------------------ */
.ws-pin{position:sticky;top:0;height:100vh;height:100svh;overflow:hidden;opacity:0;transition:opacity 1s ease .15s}
.lz-on .ws-pin{opacity:1}
.ws-head{position:absolute;left:75px;top:116px;width:973px}
.eyebrow-l{margin:0 0 24px;font:700 13px/1 var(--f-grot);letter-spacing:.14em;text-transform:uppercase;color:#8A8CF4}
.ws-title{margin:0;font:700 80px/1 var(--f-grot);letter-spacing:-.02em;color:#070818;text-wrap:wrap}
/* progress rail 01–06 */
.ws-rail{position:absolute;left:84px;top:483px;margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:14px;font:500 11px/15px "JetBrains Mono",monospace;letter-spacing:.08em;color:rgba(7,8,24,.35)}
.ws-rail li{display:flex;align-items:center;gap:10px;transition:color .45s}
.ws-rail i{display:block;width:16px;height:2px;background:rgba(7,8,24,.25);transition:width .45s cubic-bezier(.19,1,.22,1),background .45s}
.ws-rail li.on{color:#070818}
.ws-rail li.on i{width:36px;background:#46ADC5}
/* cards: positions/rotation/opacity are driven by js/card-stack.js; --k fades a back card's content */
.ws-stack{position:absolute;left:725px;top:260px;width:640px;height:640px}
.ws-card{position:absolute;left:20px;top:110px;width:540px;box-sizing:border-box;padding:44px;border-radius:32px;
  background:linear-gradient(180deg,#fff,#f5f6ff);border:1.5px solid #fff;box-shadow:0 30px 70px rgba(92,94,190,.22);
  will-change:transform,opacity;transform-origin:50% 50%}
.ws-card>*{opacity:var(--k,1)}
.ws-icon svg{display:block;width:88px;height:88px;margin:22px 0 20px}
.ws-card h3{margin:0 0 16px;font:700 40px/1.05 var(--f-grot);letter-spacing:-.02em;color:#070818}
.ws-card p{margin:0;font:400 19px/1.55 var(--f-copy);color:rgba(7,8,24,.65)}


/* 8. How to Play (Figma 02 · Light BG 2) ------------------------------------------- */
.hp-pin{position:sticky;top:0;height:100vh;height:100svh;overflow:hidden}
.hp-head{position:absolute;left:75px;top:105px;width:430px}
.hp-title{margin:0;font:700 80px/1 var(--f-grot);letter-spacing:-.02em;color:#070818;text-wrap:wrap}
/* callouts appear once the logo has assembled (.hp-on, js/reveal.js) */
.hp-card{position:absolute;width:341px;box-sizing:border-box;padding:28px;border-radius:20px;background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(245,246,255,.9));border:1px solid #fff;
  box-shadow:0 19px 44px rgba(92,94,191,.22);
  opacity:0;transform:translate3d(0,24px,0) scale(.97);transition:opacity .7s cubic-bezier(.19,1,.22,1),transform .9s cubic-bezier(.19,1,.22,1)}
.hp-card h3{margin:0 0 12px;font:700 25px/1.05 var(--f-grot);letter-spacing:-.02em;color:#070818}
.hp-card p{margin:0;font:400 14px/1.55 var(--f-copy);color:rgba(7,8,24,.65)}
.hp-card .chip{margin-bottom:13px;text-transform:uppercase}
.hp-daily{left:1016px;top:105px}
.hp-solo{left:53px;top:434px}
.hp-multi{left:1016px;top:540px}
/* connector lines from each callout to its petal */
.hp-lines{position:absolute;inset:0;width:1440px;height:900px;overflow:visible}
.hp-lines path{fill:none;stroke:#8A8CF4;stroke-width:1.2;stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset .9s cubic-bezier(.65,0,.35,1)}
.hp-lines circle{fill:#8A8CF4;opacity:0;transition:opacity .4s}
.how-play.hp-on .hp-card{opacity:1;transform:none}
.how-play.hp-on .hp-daily{transition-delay:.05s}
.how-play.hp-on .hp-solo{transition-delay:.18s}
.how-play.hp-on .hp-multi{transition-delay:.3s}
.how-play.hp-on .hp-lines path{stroke-dashoffset:0;transition-delay:.35s}
.how-play.hp-on .hp-lines circle{opacity:1;transition-delay:1.05s}


/* 9. Finale — leaderboard CTA (Figma 41:821) ---------------------------------------- */
.finale{position:relative;z-index:4;pointer-events:none}
.fn-pin{position:sticky;top:0;height:100vh;height:100svh;overflow:hidden}
.fn-veil{position:absolute;inset:0;background:radial-gradient(70% 80% at 30% 50%,rgba(5,8,36,.55),rgba(5,8,36,.15) 70%),linear-gradient(180deg,rgba(5,8,36,.25),rgba(5,8,36,.45));opacity:0;transition:opacity 1s}
.fn-grid{position:absolute;inset:0;background-image:linear-gradient(rgba(244,245,255,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(244,245,255,.04) 1px,transparent 1px);background-size:100px 100px;opacity:0;transition:opacity 1.2s}
.fn-left{position:absolute;left:75px;top:120px;width:600px;display:flex;flex-direction:column;pointer-events:auto}
.fn-eyebrow{margin:0 0 24px;font:500 13px/1 "JetBrains Mono",monospace;letter-spacing:.12em;text-transform:uppercase;color:#8A8CF4}
.fn-title{margin:0 0 24px;font:700 76px/.98 var(--f-grot);letter-spacing:-.03em;color:#F4F5FF;text-wrap:wrap}
.fn-body{margin:0 0 66px;width:414px;font:400 18px/1.55 var(--f-copy);color:rgba(244,245,255,.62)}
.fn-chant{margin:0;font:700 20px/1 var(--f-grot);letter-spacing:.14em;color:#F4F5FF}
.fn-board{position:absolute;left:765px;top:120px;width:600px;height:600px;box-sizing:border-box;border-radius:28px;border:1px solid #8A8CF4;
  background:linear-gradient(180deg,rgba(20,24,66,.72),rgba(11,14,46,.72));box-shadow:0 30px 80px rgba(138,140,244,.25);pointer-events:auto;font-family:"JetBrains Mono",monospace;color:#F4F5FF}
.fb-head{display:flex;justify-content:space-between;margin:33px 37px 0 35px;padding-bottom:24px;border-bottom:1px solid rgba(244,245,255,.12);font-size:13px;font-weight:700;letter-spacing:.1em;text-transform:uppercase}
.fb-live{font-size:12px;font-weight:500;color:#46ADC5}
.fb-rows{list-style:none;margin:0;padding:0 37px 0 35px}
.fb-row{display:flex;align-items:center;height:54px;font-size:15px}
.fb-row:first-child{margin-top:6px}
.fb-rank{width:48px;color:rgba(244,245,255,.55)}
.fb-row.is-gold .fb-rank{color:#E8C46A}
.fb-av{width:26px;height:26px;border-radius:50%;margin-right:14px;background:linear-gradient(90deg,rgba(138,140,244,.6),rgba(244,245,255,.15))}
.fb-av.alt{background:linear-gradient(90deg,rgba(70,173,197,.6),rgba(244,245,255,.15))}
.fb-name{flex:1;color:rgba(244,245,255,.85)}
.fb-pts{color:rgba(244,245,255,.55);font-variant-numeric:tabular-nums;transition:color .4s}
.fb-pts.bump{color:#46ADC5}
.fb-more{margin:4px 35px 0;font-size:15px;color:rgba(244,245,255,.3)}
.fb-you{position:absolute;left:19px;top:409px;width:560px;height:150px;box-sizing:border-box;border-radius:20px;border:1.5px solid #8A8CF4;
  background:linear-gradient(90deg,rgba(138,140,244,.28),rgba(70,173,197,.22));box-shadow:0 0 40px rgba(70,173,197,.35);padding:22px 16px 0 14px;animation:fbPulse 2.8s ease-in-out infinite}
@keyframes fbPulse{50%{box-shadow:0 0 58px rgba(70,173,197,.55)}}
.fb-you-top{display:flex;align-items:baseline;font-size:15px}
.fb-rank.q{width:88px;color:#46ADC5;font-weight:700}
.fb-me{font-weight:700;margin-right:12px}
.fb-wait{flex:1;font-size:13px;color:rgba(244,245,255,.6)}
.fb-you .fb-pts{color:rgba(244,245,255,.5)}
/* entrance once the camera has backed out of the mark (.fn-on, js/arena.js) */
.fn-left>*,.fn-board{opacity:0;transform:translate3d(0,28px,0);transition:opacity .9s cubic-bezier(.19,1,.22,1),transform 1.1s cubic-bezier(.19,1,.22,1)}
.fn-board{transform:translate3d(0,40px,0) scale(.97)}
.finale.fn-on .fn-veil,.finale.fn-on .fn-grid{opacity:1}
.finale.fn-on .fn-left>*,.finale.fn-on .fn-board{opacity:1;transform:none}
.finale.fn-on .fn-left>:nth-child(2){transition-delay:.08s}
.finale.fn-on .fn-left>:nth-child(3){transition-delay:.16s}
.finale.fn-on .fn-left>:nth-child(4){transition-delay:.24s}
.finale.fn-on .fn-board{transition-delay:.2s}


/* 10. Bottom nav & menu ---------------------------------------------------------- */
.bottom-nav{position:fixed;z-index:5;left:0;right:0;bottom:0;height:calc(100px + env(safe-area-inset-bottom,0px));box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;
  padding-left:max(var(--gutter),env(safe-area-inset-left,0px));padding-right:max(var(--gutter),env(safe-area-inset-right,0px));padding-bottom:env(safe-area-inset-bottom,0px);
  background:linear-gradient(180deg,rgba(5,8,36,0),var(--ink-deep))}
.nav-left{position:relative}
.nav-pill{display:flex;align-items:center;gap:34px;height:60px;padding:0 20px;border-radius:32px;background:rgba(12,14,40,.45);
  border:1px solid rgba(244,245,255,.38);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}
.nav-pill .nav-logo{display:block;width:138px;height:34px}
.menu-btn{display:grid;place-items:center;width:26px;height:26px;padding:0;border:0;background:none;color:#F4F5FF;cursor:pointer}
.cta-btn{display:inline-flex;align-items:center;gap:10px;height:46px;padding:0 22px;border-radius:40px;background:#8A8CF4;color:#F4F5FF;
  font:700 14px/1 var(--f-copy);letter-spacing:.1em;text-transform:uppercase;text-decoration:none;white-space:nowrap;transition:transform .2s,background .2s}
.cta-btn:hover{background:#9799ff;transform:translateY(-2px)}
.cta-btn svg{flex:none}
.menu-btn:focus-visible,.cta-btn:focus-visible{outline:2px solid #46ADC5;outline-offset:3px}

/* light variant while the light zone is on screen (.is-light, js/reveal.js) */
.bottom-nav.is-light{background:linear-gradient(180deg,rgba(244,245,255,0),#F4F5FF)!important}
.bottom-nav.is-light .nav-pill{background:rgba(255,255,255,.8);border-color:rgba(7,8,24,.12)}
.bottom-nav.is-light .nav-logo path[fill="white"]{fill:#070818}
.bottom-nav.is-light .menu-btn{color:#070818}

/* menu: glass panel above the pill (Figma "nav menu" 41:944) */
.nav-menu{position:absolute;left:0;bottom:calc(100% + 6px);width:100%;min-width:240px;box-sizing:border-box;display:flex;flex-direction:column;gap:32px;padding:32px 20px;border-radius:32px;
  background:rgba(12,14,40,.45);border:1px solid rgba(244,245,255,.5);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  transform-origin:24px 100%;opacity:0;transform:translate3d(0,14px,0) scale(.94);transition:opacity .35s cubic-bezier(.19,1,.22,1),transform .5s cubic-bezier(.19,1,.22,1);pointer-events:none}
.nav-menu[hidden]{display:flex;visibility:hidden}
.bottom-nav.menu-open .nav-menu{visibility:visible;opacity:1;transform:none;pointer-events:auto}
.nm-links{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
.nm-links a{font:400 18px/1.55 var(--f-copy);color:rgba(244,245,255,.62);text-decoration:none;transition:color .25s}
.nm-links a:hover,.nm-links a.is-active{color:#fff}
.nm-links a.is-active{font-weight:700}
.nm-launch{display:flex;align-items:center;justify-content:center;gap:10px;padding:12px 22px;border-radius:40px;background:#46ADC5;color:#F4F5FF;text-decoration:none;
  font:700 14px/1.55 var(--f-copy);letter-spacing:.1em;text-transform:uppercase;transition:transform .3s cubic-bezier(.19,1,.22,1),box-shadow .3s}
.nm-launch:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(70,173,197,.45)}
.nm-social{display:flex;justify-content:center;gap:12px}
.nm-social a{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#F4F5FF;color:#070818;transition:transform .25s,background .25s}
.nm-social a:hover{transform:translateY(-2px);background:#fff}
/* menu items drift in one after another */
.nav-menu .nm-links li,.nav-menu .nm-launch,.nav-menu .nm-social{opacity:0;transform:translate3d(0,8px,0);transition:opacity .3s,transform .45s cubic-bezier(.19,1,.22,1)}
.bottom-nav.menu-open .nav-menu .nm-links li,.bottom-nav.menu-open .nav-menu .nm-launch,.bottom-nav.menu-open .nav-menu .nm-social{opacity:1;transform:none}
.bottom-nav.menu-open .nm-links li:nth-child(1){transition-delay:.06s}
.bottom-nav.menu-open .nm-links li:nth-child(2){transition-delay:.1s}
.bottom-nav.menu-open .nm-links li:nth-child(3){transition-delay:.14s}
.bottom-nav.menu-open .nm-links li:nth-child(4){transition-delay:.18s}
.bottom-nav.menu-open .nm-launch{transition-delay:.22s}
.bottom-nav.menu-open .nm-social{transition-delay:.26s}
/* burger → close */
.menu-btn path{transition:transform .4s cubic-bezier(.19,1,.22,1),opacity .2s;transform-box:fill-box;transform-origin:center}
.bottom-nav.menu-open .menu-btn .mb1{transform:translateY(6px) rotate(45deg)}
.bottom-nav.menu-open .menu-btn .mb2{opacity:0}
.bottom-nav.menu-open .menu-btn .mb3{transform:translateY(-6px) rotate(-45deg)}
.bottom-nav.is-light .nav-menu{background:rgba(255,255,255,.82);border-color:rgba(7,8,24,.12);box-shadow:0 20px 50px rgba(92,94,191,.18)}
.bottom-nav.is-light .nm-links a{color:rgba(7,8,24,.6)}
.bottom-nav.is-light .nm-links a:hover,.bottom-nav.is-light .nm-links a.is-active{color:#070818}
.bottom-nav.is-light .nm-social a{background:#070818;color:#F4F5FF}


/* 11. Cursor wind (js/cursor-wind.js) --------------------------------------------- */
/* heading letters are split into .fc spans and nudged with translate/rotate; words never break */
.fc{display:inline-block;will-change:translate,rotate}
.fwd,.wd,[data-fluid] .w{white-space:nowrap}
.wind-dye{position:fixed;inset:0;width:100%;height:100%;z-index:59;pointer-events:none;mix-blend-mode:screen;transition:opacity .4s}
html.lz-on .wind-dye{opacity:0}   /* in the light zone the cursor light lives in the light-leak shader instead */


/* 12. Responsive ------------------------------------------------------------------- */
/* ≤900px: artboards become stacked layouts, veils run top→bottom */
@media (max-width:900px){
  .btn-launch{font-size:13px;padding:14px 20px}   /* .hero-btn below overrides the padding */
  .veil-hero{background:linear-gradient(180deg,var(--ink-deep) 20%,rgba(7,8,24,.2) 70%)}
  .veil-about{background:linear-gradient(180deg,var(--ink-deep) 10%,rgba(6,8,33,.1) 45%,rgba(6,8,33,.2) 62%,rgba(5,8,36,.88) 90%)}
  .veil-why{background:linear-gradient(180deg,rgba(6,8,33,0) 35%,var(--ink-deep) 85%)}

  .hero-copy{top:9vh;gap:28px}
  .copy{font-size:16px}
  .hero-btn{margin-top:28px;font-size:13px;padding:14px 22px}
  .about-head{top:10vh;width:auto;right:var(--gutter)}
  .eyebrow-g{margin-bottom:20px}
  .about-copy{top:auto;bottom:130px;left:var(--gutter);right:var(--gutter);width:auto;text-align:left;text-shadow:0 2px 18px rgba(5,8,36,.95),0 0 3px rgba(5,8,36,.7)}
  .topics-line{left:var(--gutter);right:var(--gutter);width:auto;top:auto;bottom:140px}

  .art{left:0;top:0;width:100%;height:100%;transform:none}
  .ws-head{left:var(--gutter);right:var(--gutter);top:86px;width:auto}
  .ws-title{font-size:40px}
  .ws-rail{display:none}
  .ws-stack{left:var(--gutter);right:var(--gutter);top:auto;bottom:110px;width:auto;height:430px}
  .ws-card{left:0;top:40px;width:100%;padding:28px}
  .ws-icon svg{width:64px;height:64px;margin:14px 0}
  .ws-card h3{font-size:28px}
  .ws-card p{font-size:16px}

  .hp-head{left:var(--gutter);top:86px;width:auto}
  .hp-title{font-size:44px}
  .hp-lines{display:none}
  .hp-pin .art{display:flex;flex-direction:column;justify-content:flex-end;padding-bottom:100px;box-sizing:border-box}
  .hp-card{position:relative;left:auto;top:auto;width:auto;padding:18px;margin:0 var(--gutter) 10px}
  .hp-card h3{font-size:20px;margin-bottom:6px}
  .hp-card p{font-size:13px}

  .fn-left{left:var(--gutter);right:var(--gutter);top:80px;width:auto}
  .fn-title{font-size:40px}
  .fn-body{width:auto;margin-bottom:0;font-size:15px}
  .fn-chant{display:none}
  .fn-board{left:var(--gutter);right:var(--gutter);top:auto;bottom:110px;width:auto;height:auto;padding-bottom:16px}
  .fb-row{height:40px;font-size:13px}
  .fb-row:nth-child(n+4){display:none}
  .fb-you{position:relative;left:auto;top:auto;width:auto;height:auto;margin:6px 12px 0;padding:16px 12px}
  .fb-wait{display:none}

  .nav-pill{gap:18px;height:52px;padding:0 16px}
  .cta-btn{height:48px;padding:0 16px;font-size:15px}
}

/* tablet (600–900px): same stacked layout, sized for the bigger screen */
@media (min-width:600px) and (max-width:900px){
  .h-xl{font-size:64px}
  .copy{font-size:18px}
  .h-l{font-size:52px}
  .ws-head{top:96px}
  .ws-title{font-size:58px}
  .ws-stack{left:calc(var(--gutter) + 10px);right:auto;width:540px;height:470px;bottom:120px}
  .ws-card{padding:36px}
  .ws-card h3{font-size:34px}
  .ws-card p{font-size:18px}
  .ws-icon svg{width:72px;height:72px;margin:18px 0}
  .hp-head{top:96px}
  .hp-title{font-size:64px}
  .hp-card{padding:22px 26px;margin-bottom:12px}
  .hp-card h3{font-size:24px}
  .hp-card p{font-size:15px}
  .fn-left{top:96px}
  .fn-title{font-size:60px}
  .fn-body{font-size:17px;max-width:520px}
  .fn-board{left:var(--gutter);right:auto;width:560px}
  .fb-row,.fb-row:nth-child(n+4){display:flex;height:46px;font-size:14px}
  .fb-wait{display:inline}
}

/* phones */
@media (max-width:599px){
  /* statement: one even rhythm when sentences wrap */
  .type-lines{line-height:1.25}
  .type-lines .tl{margin-bottom:0}

  /* Light zone on phones flows top→bottom inside the real visible height (100svh: Safari bars included),
     so nothing can overlap. --fit (0.62–1) is measured by js/layout.js and shrinks the cards
     when the screen is too short for them. */
  :root{
    --safe-t:env(safe-area-inset-top,0px);                   /* status bar / Dynamic Island when the page runs under it */
    --nav-clear:calc(96px + env(safe-area-inset-bottom,0px)); /* bottom nav + home indicator */
    --pad-t:calc(var(--safe-t) + min(64px,8svh));
  }
  .ws-title,.hp-title{font-size:min(40px,5.2svh)}
  .hero-copy{top:calc(var(--safe-t) + 9svh)}
  .about-head{top:calc(var(--safe-t) + 8svh)}

  .ws-pin .art{display:flex;flex-direction:column;padding:var(--pad-t) 0 var(--nav-clear);box-sizing:border-box}
  .ws-head{position:relative;left:auto;right:auto;top:auto;margin:0 var(--gutter)}
  .ws-head .eyebrow-l{margin-bottom:min(24px,2.4svh)}
  .ws-stack{position:relative;left:auto;right:auto;top:auto;bottom:auto;width:auto;height:auto;flex:1 1 0;min-height:0;margin:20px var(--gutter) 0}
  .ws-card{top:auto;bottom:0;padding:calc(28px * var(--fit,1))}
  .ws-icon svg{width:calc(64px * var(--fit,1));height:calc(64px * var(--fit,1));margin:calc(14px * var(--fit,1)) 0}
  .ws-card h3{font-size:calc(28px * var(--fit,1));margin-bottom:calc(12px * var(--fit,1))}
  .ws-card p{font-size:max(12px,calc(16px * var(--fit,1)))}

  /* How to Play: title right above the cards, the assembled logo takes the space on top (js/petals.js) */
  .hp-pin .art{padding-top:calc(var(--safe-t) + 16px);padding-bottom:var(--nav-clear)}
  .hp-head{position:relative;left:auto;top:auto;margin:0 var(--gutter) calc(28px * var(--fit,1))}
  .hp-card{padding:calc(18px * var(--fit,1));margin-bottom:calc(10px * var(--fit,1))}
  .hp-card .chip{font-size:max(11px,calc(13px * var(--fit,1)));margin-bottom:calc(12px * var(--fit,1))}
  .hp-card h3{font-size:max(15px,calc(20px * var(--fit,1)));margin-bottom:calc(6px * var(--fit,1))}
  .hp-card p{font-size:max(11px,calc(13px * var(--fit,1)))}

  /* Finale: copy on top, leaderboard sinks to the bottom; both shrink by --fit when short */
  .fn-pin .art{display:flex;flex-direction:column;padding:var(--pad-t) 0 var(--nav-clear);box-sizing:border-box}
  .fn-left{position:relative;left:auto;right:auto;top:auto;margin:0 var(--gutter)}
  .fn-eyebrow{margin-bottom:calc(18px * var(--fit,1));font-size:max(10px,calc(12px * var(--fit,1)))}
  .fn-title{font-size:calc(min(40px,5.2svh) * var(--fit,1));margin-bottom:calc(16px * var(--fit,1))}
  .fn-body{font-size:max(12px,calc(15px * var(--fit,1)))}
  .fn-board{position:relative;left:auto;right:auto;top:auto;bottom:auto;margin:auto var(--gutter) 0;flex:none}
  .fb-head{margin:calc(24px * var(--fit,1)) 24px 0;padding-bottom:calc(16px * var(--fit,1))}
  .fb-row{height:calc(40px * var(--fit,1))}
  .fb-you{padding:calc(16px * var(--fit,1)) 12px}
  .fb-you .btn-launch{margin-top:calc(16px * var(--fit,1))}
}
@media (max-width:600px){
  .cta-x{display:none}            /* nav CTA reads "Explore" */
}
@media (max-width:420px){
  .nav-pill .nav-logo{width:112px;height:28px}
  .cta-btn{padding:0 12px}
}


/* 13. Reduced motion -------------------------------------------------------------- */
@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important}
  [data-reveal] .ln-in{transform:none!important;transition:none}
  .whiteout .pop{transition:none!important;transform:none!important}
  .type-lines .cursor{animation:none}
  .fb-you{animation:none}
  .nav-menu,.nav-menu *{transition:none!important}
}
