/* The scroll page. One fixed 3D stage (#gl) sits behind the copy; each .scene is a tall
   section whose copy holds (sticky) while the device changes screens beside it. */
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { overflow-x: hidden; }
[hidden] { display: none !important; }

.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--stage); }
.backdrop i { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; }
.backdrop i:first-child { width: 62vmax; height: 62vmax; left: var(--gx, 55%); top: 18%; margin: -31vmax 0 0 -31vmax; background: radial-gradient(closest-side, rgba(132, 204, 22, 0.22), transparent); transition: left 1.2s cubic-bezier(.2,.7,.2,1); }
.backdrop i:last-child { width: 44vmax; height: 30vmax; left: var(--gx, 55%); bottom: -14vmax; margin-left: -22vmax; background: radial-gradient(closest-side, rgba(163, 230, 53, 0.20), transparent); transition: left 1.4s cubic-bezier(.2,.7,.2,1); }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

.bar { position: fixed; z-index: 20; inset: 0 0 auto 0; display: flex; align-items: center; gap: 20px; padding: 12px clamp(16px, 4vw, 44px); background: linear-gradient(rgba(5, 7, 5, 0.86), rgba(5, 7, 5, 0)); }
.bar .btn { min-height: 42px; padding: 0 18px; font-size: 14px; }
.bar-links { margin-left: auto; display: flex; gap: 4px; }
.bar-links a { color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500; padding: 10px 12px; border-radius: 8px; }
.bar-links a:hover { color: var(--text); }

.rail { position: fixed; z-index: 15; right: clamp(10px, 1.6vw, 26px); top: 50%; transform: translateY(-50%); display: grid; gap: 4px; }
.rail a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; height: 26px; color: var(--text-3); text-decoration: none; font-size: 12px; font-weight: 600; }
.rail a span { opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .2s; white-space: nowrap; }
.rail a::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); transition: background .3s, transform .3s; }
.rail a:hover span, .rail a:focus-visible span { opacity: 1; transform: none; }
.rail a span { background: rgba(5, 7, 5, 0.9); padding: 4px 8px; border-radius: 6px; }
.rail a[aria-current] { color: var(--text); }
.rail a[aria-current]::after { background: var(--brand); transform: scale(1.5); }

main { position: relative; z-index: 2; }
.scene { position: relative; min-height: 210vh; padding: 0 clamp(20px, 6vw, 96px); max-width: 1680px; margin: 0 auto; }
.scene.hero { min-height: 135vh; }
.scene.center { min-height: 230vh; }
.copy { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; align-items: center; pointer-events: none; }
.copy-in { width: min(100%, 520px); display: grid; gap: 18px; pointer-events: auto; }
.scene.right .copy { justify-content: flex-start; }
.scene.left .copy { justify-content: flex-end; }
.scene.hero .copy-in { width: min(100%, 620px); gap: 22px; }
.scene.center .copy { align-items: flex-start; justify-content: center; text-align: center; padding-top: 11vh; }
.scene.center .copy-in { width: min(100%, 720px); justify-items: center; gap: 12px; }

h1 { font-size: clamp(40px, 5.6vw, 88px); font-weight: 800; }
h2 { font-size: clamp(30px, 3.6vw, 58px); font-weight: 700; }
.lead { font-size: clamp(16px, 1.25vw, 20px); color: var(--text-2); max-width: 56ch; }
.fine { font-size: 12.5px; color: var(--text-3); max-width: 60ch; }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: clamp(14px, 1.05vw, 16px); }
.points li { display: flex; gap: 12px; align-items: baseline; }
.points li::before { content: ''; flex: none; width: 16px; height: 2px; background: var(--brand); transform: translateY(-4px); }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.row.center { justify-content: center; }
.btn.big { min-height: 54px; padding: 0 30px; font-size: 16px; }

/* Reveal and parallax use separate properties so they compose: `transform` reveals, `translate` drifts. */
[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
[data-reveal].in { opacity: 1; transform: none; }
[data-depth] { translate: 0 var(--py, 0px); will-change: translate; }

.ghost { position: absolute; top: 30vh; font-family: var(--font-brand); font-weight: 800; font-size: clamp(180px, 30vw, 520px); line-height: 0.8; color: transparent; -webkit-text-stroke: 1.5px rgba(163, 230, 53, 0.11); pointer-events: none; user-select: none; }
.scene.left .ghost { left: 2vw; } .scene.right .ghost { right: 2vw; }

.chip { position: absolute; z-index: 3; display: grid; gap: 2px; padding: 14px 18px; min-width: 190px; border-radius: 16px; border: 1px solid var(--line-strong); background: rgba(14, 19, 12, 0.78); backdrop-filter: blur(14px); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
.chip small { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand-bright); font-weight: 600; }
.chip b { font-family: var(--font-brand); font-size: 20px; }
.chip span { font-size: 13px; color: var(--text-2); }
.chip.warn small { color: #fca5a5; }
.scene.left .chip.c1 { left: 1.5%; top: 92vh; } .scene.left .chip.c2 { left: 37%; top: 150vh; }
.scene.right .chip.c1 { right: 3.5%; top: 92vh; } .scene.right .chip.c2 { right: 37%; top: 150vh; }

.cue { position: absolute; left: 50%; top: calc(100vh - 64px); transform: translateX(-50%); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-3); }
.cue::after { content: ''; display: block; width: 1px; height: 30px; margin: 8px auto 0; background: linear-gradient(var(--brand), transparent); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: .4; } 50% { transform: scaleY(1); transform-origin: top; opacity: 1; } }

/* Static device images: the whole experience when 3D is off (reduced motion, no WebGL). */
.still { display: none; margin: 0; }
html.flat #gl { display: none; }
html.flat .scene { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 6vw; padding-top: 14vh; padding-bottom: 14vh; }
html.flat .scene.left .copy { order: 2; }
html.flat .copy { position: static; height: auto; }
html.flat .still { display: block; justify-self: center; }
html.flat .still .devwrap { width: min(34vh, 320px); }
html.flat .scene.wide .still .devwrap { width: min(60vh, 520px); }
html.flat .scene.center { grid-template-columns: 1fr; justify-items: center; }
html.flat .scene.center .copy { padding-top: 0; }
html.flat .ghost, html.flat .chip, html.flat .cue { display: none; }

/* Film: the section is taller than the screen and its inside sticks, so the film holds while it plays. */
.pin { position: relative; z-index: 4; height: 260vh; }
.pin-in { position: sticky; top: 0; height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto 1fr; justify-items: center; align-items: center; padding: 84px clamp(12px, 3vw, 40px) 20px; gap: 14px; overflow: hidden; }
.film-head { text-align: center; display: grid; gap: 6px; }
.film-frame { position: relative; height: 100%; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 22px; overflow: hidden; border: 1px solid var(--line-strong); box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7), 0 0 120px rgba(132, 204, 22, 0.16); transform: scale(var(--film-scale, 0.82)); transform-origin: center; background: #000; will-change: transform; }
.film-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.film-ui { position: absolute; inset: auto 0 0 0; display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.72)); opacity: 0; transition: opacity .25s; }
.film-frame:hover .film-ui, .film-frame:focus-within .film-ui, .film-frame.paused .film-ui { opacity: 1; }
.film-bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.film-bar i { display: block; height: 100%; width: 0; background: var(--brand); }
.film-frame .i-play { display: none; } .film-frame.paused .i-play { display: block; } .film-frame.paused .i-pause { display: none; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(5, 7, 5, 0.6); display: grid; place-items: center; cursor: pointer; }
.text-btn { border: 0; background: transparent; color: var(--text); font-size: 13px; font-weight: 600; padding: 12px 8px; cursor: pointer; }
@media (orientation: portrait) and (max-width: 760px) { .film-frame { aspect-ratio: 9 / 16; } }

.plain { position: relative; z-index: 4; padding: clamp(80px, 14vh, 180px) clamp(20px, 6vw, 96px); background: linear-gradient(transparent, rgba(5, 7, 5, 0.9) 18%); }
.plain .wrap { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 6vw, 96px); align-items: center; }
.try-copy { display: grid; gap: 18px; justify-items: start; }
.fan { position: relative; height: clamp(380px, 56vh, 620px); display: block; }
.fan .devwrap { position: absolute; display: block; width: clamp(150px, 17vw, 250px); top: 50%; left: 50%; }
.fan .dev { display: block; }
.fan .f1 { transform: translate(-128%, -46%) rotate(-9deg); } .fan .f2 { transform: translate(-50%, -54%); z-index: 2; } .fan .f3 { transform: translate(28%, -44%) rotate(9deg); }
.fan:hover .f1 { transform: translate(-136%, -48%) rotate(-12deg); } .fan:hover .f3 { transform: translate(36%, -46%) rotate(12deg); }
.fan .devwrap { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.plain.close .wrap { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 20px; }
.plain.close h2 { font-size: clamp(40px, 6vw, 96px); font-weight: 800; }
.foot { position: relative; z-index: 4; padding: 28px clamp(20px, 6vw, 96px) 44px; font-size: 12.5px; color: var(--text-3); border-top: 1px solid var(--line); background: var(--stage); }
.foot p { max-width: 90ch; }

/* Phones and narrow tablets: the device takes the top of the screen, the copy rides up over the bottom. */
@media (max-width: 860px) {
  .bar-links, .rail { display: none; }
  .bar .btn { margin-left: auto; }
  .scene { min-height: 240vh; padding: 0 18px; }
  .scene.hero { min-height: 150vh; }
  .copy { align-items: flex-end; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .copy { z-index: 4; } .chip.c2 { display: none; }
  .scene .copy, .scene.left .copy, .scene.right .copy { justify-content: center; }
  .copy-in { width: 100%; gap: 10px; padding: 18px 18px 20px; border-radius: 22px; border: 1px solid var(--line); background: rgba(8, 11, 7, 0.82); backdrop-filter: blur(18px); }
  .scene.hero .copy-in { gap: 12px; }
  .scene.center .copy { align-items: flex-end; padding-top: 0; }
  h1 { font-size: clamp(32px, 9vw, 44px); } h2 { font-size: clamp(24px, 6.6vw, 34px); }
  .lead { font-size: 15px; } .points { font-size: 14px; gap: 5px; } .fine { font-size: 11.5px; }
  .scene:not(.hero) .fine { display: none; }
  .btn { min-height: 48px; }
  .ghost { top: 14vh; font-size: 52vw; }
  .chip { min-width: 0; padding: 10px 14px; } .chip b { font-size: 16px; } .chip span { font-size: 12px; }
  .scene.left .chip.c1, .scene.right .chip.c1 { left: auto; right: 4%; top: 64vh; }
  .scene.left .chip.c2, .scene.right .chip.c2 { right: auto; left: 4%; top: 132vh; }
  .cue { display: none; }
  .pin { height: 220vh; } .pin-in { padding: 76px 12px 14px; }
  .plain .wrap { grid-template-columns: 1fr; }
  .fan { height: 360px; } .fan .devwrap { width: 34vw; }
  html.flat .scene { grid-template-columns: 1fr; gap: 28px; padding-top: 96px; padding-bottom: 40px; }
  html.flat .scene.left .copy { order: 0; }
  html.flat .still { order: -1; } html.flat .still .devwrap { width: 52vw; } html.flat .scene.wide .still .devwrap { width: 82vw; }
}
@media (min-width: 1700px) { .copy-in { width: 600px; } .scene.hero .copy-in { width: 740px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  [data-depth] { translate: none; }
  .cue::after { animation: none; }
  .film-frame { transform: none; }
}
