/* ============================================================
   Optivise - attention-verified advertising
   Design system: dark, precision-tech, single signal-lime accent
   Radius rule: buttons = pill, cards = 14px, inputs = 10px
   ============================================================ */

:root {
  --bg:        #0a0b0d;
  --bg-soft:   #101216;
  --surface:   #14161b;
  --surface-2: #1a1d23;
  --line:      rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.05);

  --text:      #f1f3ee;
  --muted:     #aab0a6;
  --faint:     #6b7069;

  --accent:    #c4f74e;
  --accent-dim:#9bc63a;
  --ink:       #0a0b0d;   /* text on accent */

  --danger:    #ff6b57;
  --warn:      #ffcf5c;

  --maxw: 1240px;
  --r-card: 14px;
  --r-input: 10px;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
.mono { font-family: var(--font-mono); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-weight: 550; font-size: 0.95rem;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .18s cubic-bezier(.16,1,.3,1), background .18s, border-color .18s, color .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-primary:hover { background: #d2ff66; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: rgba(255,255,255,.28); transform: translateY(-1px); }
.btn i { font-size: 1.15em; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10,11,13,.72);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: -0.01em; }
.brand .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(196,247,78,.16);
}
.brand .logo-mark { width: 27px; height: 27px; flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--muted); font-size: 0.92rem; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ---------- hero ---------- */
.hero { padding: 86px 0 96px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 22px;
}
.eyebrow .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.hero-grid > .reveal:first-child { position: relative; }
.hero-grid > .reveal:first-child::before {
  content: ""; position: absolute; inset: -8% -12% -8% -16%; z-index: -1; pointer-events: none;
  background: radial-gradient(62% 72% at 36% 50%, rgba(6, 8, 11, 0.74), rgba(6, 8, 11, 0.30) 58%, transparent 78%);
}

/* same readability scrim behind copy in the other sections */
.section-head, .problem .big, .stat-row, .steps, .faq-grid, .final .wrap { position: relative; }
.section-head::before, .problem .big::before, .stat-row::before,
.steps::before, .faq-grid::before, .final .wrap::before {
  content: ""; position: absolute; inset: -14% -9%; z-index: -1; pointer-events: none;
  background: radial-gradient(80% 86% at 50% 50%, rgba(6, 8, 11, 0.62), rgba(6, 8, 11, 0.26) 62%, transparent 82%);
}
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.05rem); font-weight: 600; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lede { color: #d6dad1; font-size: 1.12rem; max-width: 36ch; margin: 26px 0 34px; text-shadow: 0 1px 16px rgba(6, 8, 11, 0.85); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* hero media: a real video preview with product HUD chrome */
.hero-media { position: relative; }
.player-frame {
  position: relative; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.8);
  aspect-ratio: 16 / 11;
}
.player-frame video { width: 100%; height: 100%; object-fit: cover; }
.hud-scrim { position: absolute; inset: 0; background: radial-gradient(120% 120% at 50% 40%, transparent 55%, rgba(0,0,0,.35)); pointer-events: none; }
.reticle { position: absolute; width: 88px; height: 88px; pointer-events: none; }
.reticle::before, .reticle::after { content:""; position: absolute; width: 22px; height: 22px; }
.reticle::before { top: 0; left: 0; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.reticle::after  { bottom: 0; right: 0; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.reticle { top: calc(50% - 44px); left: calc(50% - 44px); animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 0%,100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.08); opacity: 1; } }

.hud-chip {
  position: absolute; left: 16px; top: 16px;
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .06em;
  padding: 8px 13px; border-radius: 10px;
  background: rgba(10,11,13,.7); backdrop-filter: blur(8px);
  border: 1px solid var(--line); color: var(--accent);
}
.hud-chip .ico { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.hud-meter { position: absolute; right: 16px; bottom: 16px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text); background: rgba(10,11,13,.7); backdrop-filter: blur(8px); border: 1px solid var(--line); padding: 8px 13px; border-radius: 10px; }
.hud-meter b { color: var(--accent); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 38px; }
  .hero { padding: 54px 0 64px; }
  .hero p.lede { max-width: none; }
}

/* ---------- generic section ---------- */
section.band { padding: 96px 0; border-top: 1px solid var(--line-soft); }
.section-head { max-width: 56ch; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.section-head p { color: var(--muted); margin-top: 16px; font-size: 1.05rem; }

/* ---------- problem / stat band ---------- */
.problem { background: var(--bg-soft); }
.problem .big {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em;
  font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.02; max-width: 18ch;
}
.problem .big span { color: var(--accent); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 56px; }
.stat { border-top: 1px solid var(--line); padding-top: 20px; }
.stat .n { font-family: var(--font-mono); font-size: 2.3rem; color: var(--text); letter-spacing: -0.02em; }
.stat .l { color: var(--muted); font-size: 0.95rem; margin-top: 6px; }
.note { color: var(--faint); font-size: 0.8rem; margin-top: 30px; font-family: var(--font-mono); }
@media (max-width: 720px) { .stat-row { grid-template-columns: 1fr; gap: 22px; } }

/* ---------- how it works (numbered timeline) ---------- */
.steps { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 60px; align-items: start; }
.steps .lead { position: sticky; top: 100px; }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: 24px;
  padding: 30px 0; border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step .idx { font-family: var(--font-mono); color: var(--accent); font-size: 0.95rem; padding-top: 4px; }
.step h3 { font-size: 1.35rem; display: flex; align-items: center; gap: 12px; }
.step h3 i { color: var(--accent); font-size: 1.4rem; }
.step p { color: var(--muted); margin-top: 10px; max-width: 52ch; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; gap: 30px; } .steps .lead { position: static; } }

/* ---------- demo invite band ---------- */
.invite { position: relative; background:
   linear-gradient(180deg, var(--bg-soft), var(--bg)); }
.invite-card {
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: stretch;
  background: var(--surface);
}
.invite-copy { padding: 52px; }
.invite-copy h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.invite-copy p { color: var(--muted); margin: 18px 0 30px; max-width: 44ch; }
.invite-media { position: relative; min-height: 320px; background: #000; }
.invite-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.invite-media .reticle { width: 96px; height: 96px; top: calc(50% - 48px); left: calc(50% - 48px); }
@media (max-width: 860px) { .invite-card { grid-template-columns: 1fr; } .invite-copy { padding: 36px; } }

/* ---------- bento metrics ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 48px; }
.cell {
  border: 1px solid var(--line); border-radius: var(--r-card); padding: 26px;
  background: var(--surface); min-height: 168px; display: flex; flex-direction: column; justify-content: space-between;
}
.cell.span2 { grid-column: span 2; }
.cell.row2 { grid-row: span 2; }
.cell .k { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.cell .v { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; }
.cell .d { color: var(--muted); font-size: 0.92rem; }
.cell.accent { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.cell.accent .k { color: rgba(10,11,13,.62); }
.cell.accent .d { color: rgba(10,11,13,.72); }
.cell.media { padding: 0; overflow: hidden; position: relative; }
.cell.media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.4) contrast(1.05); opacity: .55; }
.cell.media .tag { position: absolute; left: 18px; bottom: 16px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--text); }
.bar { display: flex; gap: 5px; align-items: flex-end; height: 56px; }
.bar span { flex: 1; background: var(--accent-dim); border-radius: 3px 3px 0 0; opacity: .5; }
.bar span.hi { background: var(--accent); opacity: 1; }
@media (max-width: 900px) { .bento { grid-template-columns: repeat(2, 1fr); } .cell.row2 { grid-row: span 1; } }
@media (max-width: 560px) { .bento { grid-template-columns: 1fr; } .cell.span2 { grid-column: span 1; } }

/* ---------- platforms ---------- */
.platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.plat { border: 1px solid var(--line); border-radius: var(--r-card); padding: 30px; background: var(--surface); }
.plat i { font-size: 1.9rem; color: var(--accent); }
.plat h3 { font-size: 1.2rem; margin: 16px 0 8px; }
.plat p { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 760px) { .platforms { grid-template-columns: 1fr; } }

/* ---------- faq / privacy ---------- */
.faq-grid { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: 60px; align-items: start; }
.acc-item { border-top: 1px solid var(--line); }
.acc-item:last-child { border-bottom: 1px solid var(--line); }
.acc-q { width: 100%; text-align: left; background: none; border: none; color: var(--text); cursor: pointer;
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; padding: 24px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.acc-q i { color: var(--accent); transition: transform .25s; flex-shrink: 0; }
.acc-item.open .acc-q i { transform: rotate(45deg); }
.acc-a { max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; color: var(--muted); }
.acc-item.open .acc-a { max-height: 260px; padding-bottom: 24px; }
@media (max-width: 820px) { .faq-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- final cta + footer ---------- */
.final { text-align: center; padding: 110px 0; background: var(--bg-soft); }
.final h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 18ch; margin-inline: auto; }
.final p { color: var(--muted); margin: 20px auto 36px; max-width: 44ch; }
footer { border-top: 1px solid var(--line-soft); padding: 40px 0; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; color: var(--faint); font-size: 0.88rem; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   DEMO PAGE
   ============================================================ */
.demo-body { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
.demo-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.demo-top .status { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }
.demo-top .status .led { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); transition: background .2s, box-shadow .2s; }
.demo-top .status.live .led { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.demo-top .status.warn .led { background: var(--danger); box-shadow: 0 0 10px var(--danger); }

.demo-main { flex: 1; display: grid; grid-template-columns: 1fr 360px; min-height: 0; }
.stage { position: relative; background: #000; display: flex; align-items: center; justify-content: center; min-height: 0; }
.stage video#ad { width: 100%; height: 100%; object-fit: contain; }

/* overlay shown when user looks away */
.lookaway {
  position: absolute; inset: 0; display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px; text-align: center;
  background: rgba(8,9,11,.74); backdrop-filter: blur(6px); padding: 30px;
}
.lookaway.show { display: flex; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lookaway .ring {
  width: 96px; height: 96px; border-radius: 50%;
  border: 2px solid var(--accent); position: relative;
  display: grid; place-items: center;
}
.lookaway .ring i { font-size: 2.6rem; color: var(--accent); }
.lookaway .ring::after { content:""; position: absolute; inset: -10px; border-radius: 50%; border: 1px dashed rgba(196,247,78,.4); animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lookaway h2 { font-size: 1.7rem; }
.lookaway p { color: var(--muted); }

/* start gate */
.gate { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; background: var(--bg); padding: 30px; z-index: 5; }
.gate h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); max-width: 20ch; }
.gate p { color: var(--muted); max-width: 46ch; }
.gate .err { color: var(--danger); font-family: var(--font-mono); font-size: 0.85rem; display: none; }
.gate.hide { display: none; }
.spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }

/* side panel */
.panel { border-left: 1px solid var(--line); background: var(--bg-soft); display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.panel-sec { padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.panel-sec h4 { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin-bottom: 14px; }
.cam-wrap { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; background: #000; }
.cam-wrap video, .cam-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.gaze-state { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-family: var(--font-mono); font-size: 0.9rem; }
.gaze-state .led { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.gaze-state.ok .led { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.gaze-state.bad .led { background: var(--danger); box-shadow: 0 0 10px var(--danger); }

.metric { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; }
.metric .lab { color: var(--muted); font-size: 0.9rem; }
.metric .val { font-family: var(--font-mono); font-size: 1.15rem; color: var(--text); }
.metric .val.accent { color: var(--accent); }
.attn-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.attn-bar > span { display: block; height: 100%; background: var(--accent); width: 0%; transition: width .25s; }

.panel-foot { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.panel-foot .btn { flex: 1; justify-content: center; padding: 11px; font-size: 0.88rem; }

@media (max-width: 820px) {
  .demo-main { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .panel { border-left: none; border-top: 1px solid var(--line); flex-direction: row; overflow-x: auto; }
  .panel-sec { min-width: 240px; }
  .panel-foot { display: none; }
}

/* ============================================================
   CINEMATIC / SPACE LAYER
   Deep-space backdrop, parallax, grain, scroll cinematics.
   Inspired by weightless futuristic product sites.
   ============================================================ */

html {
  background:
    radial-gradient(1500px 950px at 50% -6%, rgba(72, 162, 180, 0.34), transparent 64%),
    radial-gradient(1250px 850px at 12% 22%, rgba(158, 210, 96, 0.15), transparent 64%),
    radial-gradient(1350px 920px at 90% 30%, rgba(64, 140, 162, 0.24), transparent 64%),
    radial-gradient(1300px 900px at 22% 76%, rgba(70, 150, 172, 0.22), transparent 64%),
    radial-gradient(1450px 980px at 82% 92%, rgba(120, 192, 120, 0.16), transparent 64%),
    radial-gradient(1200px 820px at 50% 52%, rgba(54, 124, 146, 0.16), transparent 72%),
    linear-gradient(180deg, #0c1217, #0a0e13 55%, #0b1116);
  background-attachment: fixed;
}
body { background: transparent; }

/* fixed star canvas + nebula sit behind all content */
#space {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  display: block;
}
.nebula { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.nebula span { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; }
.nebula .n1 { width: 52vw; height: 52vw; left: -12vw; top: -14vw;
  background: radial-gradient(circle, rgba(58, 116, 128, 0.40), transparent 70%); animation: drift1 30s ease-in-out infinite; }
.nebula .n2 { width: 44vw; height: 44vw; right: -10vw; bottom: -12vw;
  background: radial-gradient(circle, rgba(196, 247, 78, 0.12), transparent 70%); animation: drift2 38s ease-in-out infinite; }
.nebula .n3 { width: 40vw; height: 40vw; left: 36vw; top: 42vh;
  background: radial-gradient(circle, rgba(52, 80, 120, 0.30), transparent 70%); animation: drift3 34s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(6vw, 4vh) scale(1.12); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-5vw, -3vh) scale(1.1); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-4vw, 5vh) scale(1.15); } }

/* film grain */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0.05;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* scroll progress beam */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%; z-index: 100;
  background: linear-gradient(90deg, transparent, var(--accent) 40%, #e4ff8f);
  box-shadow: 0 0 14px rgba(196, 247, 78, 0.7);
}

/* make section fills transparent so space shows through */
.problem { background: transparent; }
.invite { background: transparent; }
.final {
  background: transparent; position: relative; overflow: hidden;
}

/* glass surfaces float over the starfield */
.cell, .plat, .invite-card {
  background: rgba(17, 19, 24, 0.55);
  backdrop-filter: blur(13px) saturate(1.1);
  -webkit-backdrop-filter: blur(13px) saturate(1.1);
}
.cell.accent { background: var(--accent); backdrop-filter: none; -webkit-backdrop-filter: none; }
.cell.media { background: rgba(17, 19, 24, 0.55); }

/* hero aura + scan sweep */
.hero-media { position: relative; isolation: isolate; }
.hero-media::before {
  content: ""; position: absolute; inset: -22% -18%; z-index: -1;
  background: radial-gradient(circle at 50% 48%, rgba(196, 247, 78, 0.20), transparent 62%);
  filter: blur(34px); animation: aura 7s ease-in-out infinite;
}
@keyframes aura { 0%,100% { opacity: 0.6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
.player-frame { isolation: isolate; }
.player-frame::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 38%;
  background: linear-gradient(180deg, rgba(196,247,78,0.16), transparent);
  mix-blend-mode: screen; pointer-events: none;
  animation: scan 4.4s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes scan { 0% { transform: translateY(-110%); opacity: 0; } 12% { opacity: 1; } 60% { opacity: 1; } 100% { transform: translateY(330%); opacity: 0; } }

.final .wrap { position: relative; z-index: 1; }

/* nav glow on scroll */
.nav.scrolled { box-shadow: 0 1px 0 var(--line), 0 14px 40px -28px rgba(0,0,0,0.9); }

/* ---------- cinematic reveal (overrides base) ---------- */
.reveal {
  opacity: 0; transform: translateY(34px) scale(0.985); filter: blur(8px);
  transition: opacity 0.95s cubic-bezier(.16,1,.3,1),
              transform 0.95s cubic-bezier(.16,1,.3,1),
              filter 0.95s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; filter: none; }

/* parallax drift target (set via JS transform) */
[data-parallax] { will-change: transform; }

@media (prefers-reduced-transparency: reduce) {
  .cell, .plat, .invite-card { background: rgba(17,19,24,0.96); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  #space, .nebula { display: none; }
  .grain, .scroll-progress { display: none; }
  .hero-media::before, .player-frame::after, .final::before { animation: none; }
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
}

/* ---------- demo page: integrate the space backdrop ---------- */
.demo-body .stage { background: transparent; }
.demo-top { background: rgba(8, 9, 11, 0.62); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.demo-body .panel { background: rgba(13, 15, 19, 0.74); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.gate {
  background:
    radial-gradient(circle at 50% 34%, rgba(196, 247, 78, 0.07), transparent 55%),
    rgba(6, 7, 10, 0.55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
