/* ==========================================================================
   langcap "Optic Pro" -- the Optic chromatic system, pushed to Apple/Raycast
   polish: ambient aurora glow, pointer-reactive HUD tilt + spotlight,
   scroll-reveal choreography, gradient-border glow cards, a condensing
   header, a format marquee, and a refined cinematic entrance.
   Base tokens + components are Optic; the POLISH block at the bottom layers
   the motion + depth. All motion collapses under prefers-reduced-motion.
   ========================================================================== */

:root {
  color-scheme: light dark;

  --bg:        light-dark(#f4f6fa, #07090e);
  --bg-2:      light-dark(#eaeef4, #0d1015);
  --surface:   light-dark(#ffffff, #12151d);
  --surface-2: light-dark(#fafbfd, #171b24);
  --ink:       light-dark(#0a0e16, #eef1f7);
  --ink-2:     light-dark(#4b5468, #9aa3b8);
  --ink-3:     light-dark(#8089a0, #646d83);
  --line:      light-dark(rgb(10 14 22 / 11%), rgb(255 255 255 / 11%));
  --line-2:    light-dark(rgb(10 14 22 / 6%), rgb(255 255 255 / 7%));

  /* duotone sweep -- cyan -> indigo -> violet */
  --c1:  #00b4d8;
  --c2:  #4361ee;
  --c3:  #7b2ff7;
  --grad:      linear-gradient(100deg, var(--c1), var(--c2) 52%, var(--c3));
  /* seamless flowing variant -- ends return to c1 so the loop has no seam */
  --grad-flow: linear-gradient(100deg, var(--c1), var(--c2) 33%, var(--c3) 66%, var(--c1));
  --grad-fill: linear-gradient(118deg, #4361ee, #7b2ff7);
  --grad-soft: linear-gradient(100deg, rgb(0 180 216 / 14%), rgb(123 47 247 / 14%));

  --accent:      light-dark(#3a52e8, #6f86ff);
  --accent-press:light-dark(#2c3fd0, #5a72f3);
  --accent-soft: light-dark(rgb(58 82 232 / 9%), rgb(111 134 255 / 16%));
  --known:       light-dark(#0f8a6a, #2fd0a6);

  --shadow-card: light-dark(
    0 1px 2px rgb(10 14 22 / 5%), 0 12px 30px rgb(10 14 22 / 7%));
  --shadow-hud: light-dark(
    0 2px 6px rgb(10 14 22 / 6%), 0 40px 90px rgb(2 4 10 / 30%));

  --stage:        #06080d;
  --stage-2:      #0c0f17;
  --stage-ink:    #e9eeff;
  --stage-ink-2:  #97a1c4;
  --stage-line:   rgb(255 255 255 / 12%);
  --stage-c1:     #19d3ec;
  --stage-c2:     #8b6dff;
  --stage-active: #1ee0ce;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --radius: 12px;
  --radius-sm: 9px;
  --max: 1160px;

  --ui: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --read: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  font-family: var(--ui);
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(105% 70% at 88% -12%, rgb(0 180 216 / 9%), transparent 58%),
    radial-gradient(85% 62% at 2% 104%, rgb(123 47 247 / 8%), transparent 60%);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(var(--line-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 62%);
  opacity: 0.55;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }

:focus-visible { outline: 2px solid var(--c2); outline-offset: 3px; border-radius: 5px; }

.mk { fill: var(--c2); }

.grad-word {
  position: relative;
  background: var(--grad-flow);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradflow 8s linear infinite;
}
.grad-word::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -0.06em;
  height: 0.07em; border-radius: 999px;
  background: var(--grad-flow);
  background-size: 200% 100%;
  animation: gradflow 8s linear infinite;
}
@keyframes gradflow { to { background-position: 200% 0; } }

/* ---------------- header ---------------- */

.hdr {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 22px;
  height: 64px;
  padding: 0 max(24px, calc((100% - var(--max)) / 2 + 24px));
  border-bottom: 1px solid transparent;
  background: light-dark(rgb(244 246 250 / 0%), rgb(7 9 14 / 0%));
  transition: height 240ms var(--ease), background 240ms var(--ease),
    border-color 240ms var(--ease), backdrop-filter 240ms var(--ease);
}
.hdr.scrolled {
  height: 56px;
  border-bottom-color: var(--line-2);
  background: light-dark(rgb(244 246 250 / 82%), rgb(7 9 14 / 78%));
  backdrop-filter: blur(16px) saturate(1.4);
}

.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.brand-mark { display: inline-grid; place-items: center; color: var(--ink); }

.nav { display: flex; gap: 2px; margin-right: auto; margin-left: 10px; }
.nav a { padding: 8px 12px; border-radius: 7px; color: var(--ink-2); font-size: 14px; font-weight: 500; transition: color 140ms ease, background 140ms ease; }
.nav a:hover { background: light-dark(rgb(10 14 22 / 5%), rgb(255 255 255 / 7%)); color: var(--ink); }

.hdr-right { display: flex; align-items: center; gap: 14px; }

.theme { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.theme button {
  padding: 5px 11px; border: 0; border-radius: 999px; background: none;
  color: var(--ink-3); font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.01em; cursor: pointer; transition: color 120ms ease, background 120ms ease;
}
.theme button.is-on { background: var(--grad-fill); color: #fff; }

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 9px;
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform 160ms var(--ease), box-shadow 200ms var(--ease), border-color 160ms ease, filter 160ms ease;
}
.btn-lg { height: 50px; padding: 0 24px; font-size: 15.5px; }

.btn-primary {
  position: relative; overflow: hidden;
  background: var(--grad-fill); color: #fff;
  box-shadow: 0 6px 18px light-dark(rgb(67 97 238 / 32%), rgb(67 97 238 / 36%)),
    0 0 0 1px light-dark(rgb(67 97 238 / 0%), rgb(255 255 255 / 6%)) inset;
}
/* moving sheen */
.btn-primary::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 35%) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 600ms var(--ease);
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: saturate(1.1) brightness(1.05);
  box-shadow: 0 12px 30px light-dark(rgb(67 97 238 / 40%), rgb(99 102 241 / 45%));
}
.btn-primary:hover::after { transform: translateX(120%); }

.btn-quiet { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-quiet:hover { border-color: var(--c2); transform: translateY(-1px); }

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 52px;
  align-items: center;
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  padding: 92px 0 96px;
}
.hero > .hero-copy, .hero > .hud-3d { position: relative; z-index: 1; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: 28px;
  background: radial-gradient(440px circle at var(--hx, 50%) var(--hy, 30%), light-dark(rgb(67 97 238 / 8%), rgb(99 130 255 / 12%)), transparent 62%);
  opacity: 0; transition: opacity 0.35s ease;
}
.hero.glow::after { opacity: 1; }

/* ambient aurora glow behind the hero (Raycast-style) */
.aura { position: absolute; inset: -10% -8% -20% -8%; z-index: -1; pointer-events: none; filter: blur(64px); opacity: light-dark(0.55, 0.85); }
.aura i { position: absolute; display: block; border-radius: 50%; mix-blend-mode: screen; will-change: transform; }
.aura .a1 { top: 2%;  right: 6%;  width: 42%; height: 60%; background: radial-gradient(circle, rgb(0 180 216 / 70%), transparent 66%); animation: drift1 24s ease-in-out infinite; }
.aura .a2 { top: 26%; right: 28%; width: 40%; height: 56%; background: radial-gradient(circle, rgb(123 47 247 / 64%), transparent 66%); animation: drift2 30s ease-in-out infinite; }
.aura .a3 { top: 40%; right: 0%;  width: 34%; height: 48%; background: radial-gradient(circle, rgb(67 97 238 / 60%), transparent 66%); animation: drift3 27s ease-in-out infinite; }

@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-6%, 5%) scale(1.12); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1.05); } 50% { transform: translate(7%, -6%) scale(0.95); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(4%, 8%) scale(1.1); } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 22px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 7px;
  background: light-dark(rgb(255 255 255 / 72%), rgb(18 21 29 / 60%));
  backdrop-filter: blur(8px);
  color: var(--ink-2); font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.01em;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 3px light-dark(rgb(67 97 238 / 14%), rgb(111 134 255 / 18%)); }

.hero-copy h1 { font-size: clamp(42px, 5.7vw, 70px); line-height: 1.0; letter-spacing: -0.04em; }
/* per-word staggered reveal -- each word rises + unblurs on its own --d delay */
.hero-copy h1 .w { display: inline-block; }
.hero-copy h1 .wi { display: inline-block; opacity: 0; transform: translateY(0.42em); filter: blur(7px); animation: wordin 0.74s var(--ease) forwards; animation-delay: var(--d, 0s); }
.hero-copy h1 .wi.grad-word { animation: wordin 0.74s var(--ease) forwards, gradflow 8s linear infinite; animation-delay: var(--d, 0s), 0s; }
@keyframes wordin { to { opacity: 1; transform: none; filter: none; } }
.lede { max-width: 30em; margin: 24px 0 0; color: var(--ink-2); font-size: 18px; line-height: 1.5; }
.hero-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 30px; }
.hero-note { margin: 18px 0 0; color: var(--ink-3); font-family: var(--mono); font-size: 12.5px; }
.hero-note a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }

/* ---------------- waitlist form (Kit) ---------------- */
.waitlist { width: 100%; max-width: 460px; }
.wl-row { display: flex; gap: 10px; flex-wrap: wrap; }
.wl-input {
  flex: 1 1 220px; min-width: 0; height: 50px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 15.5px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.wl-input::placeholder { color: var(--ink-3); }
.wl-input:focus { outline: none; border-color: var(--c2); box-shadow: 0 0 0 3px var(--accent-soft); }
.wl-btn { flex: 0 0 auto; }
.btn:disabled { opacity: 0.62; pointer-events: none; }
.wl-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.wl-msg { margin: 12px 0 0; font-size: 13.5px; font-weight: 500; }
.wl-msg:empty { display: none; }
.wl-msg.ok { color: var(--known); }
.wl-msg.err { color: light-dark(#cc403c, #ff8480); }
.waitlist.done .wl-row { display: none; }

/* dark variant inside the private stage */
.private-inner .waitlist { max-width: 480px; }
.private-inner .wl-input { background: rgb(255 255 255 / 8%); border-color: rgb(255 255 255 / 20%); color: #fff; }
.private-inner .wl-input::placeholder { color: rgb(233 238 255 / 55%); }
.private-inner .wl-input:focus { border-color: #8aa0ff; box-shadow: 0 0 0 3px rgb(120 150 255 / 22%); }
.private-inner .wl-msg.ok { color: #4fe0bf; }

/* ---------------- the HUD ---------------- */

.hud-3d { perspective: 1400px; }
.hud {
  position: relative;
  display: grid;
  grid-template-rows: 42px auto auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-hud);
  transition: box-shadow 280ms var(--ease);
}
.hud::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 10; background: var(--grad); }

/* pointer spotlight inside the HUD */
.hud-spot {
  position: absolute; inset: 0; z-index: 9; pointer-events: none;
  border-radius: inherit; opacity: 0;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0%), rgb(99 130 255 / 18%), transparent 60%);
  transition: opacity 220ms ease;
}
.hud-3d:hover .hud-spot { opacity: 1; }

.hud-bar { display: flex; align-items: center; gap: 10px; padding: 0 15px; border-bottom: 1px solid var(--line-2); background: light-dark(rgb(244 246 250 / 72%), rgb(18 22 30 / 62%)); }
.hud-dots { display: flex; gap: 6px; }
.hud-dots i { width: 8px; height: 8px; border-radius: 2px; background: light-dark(rgb(10 14 22 / 14%), rgb(255 255 255 / 16%)); }
.hud-title { color: var(--ink-2); font-family: var(--mono); font-size: 12px; font-weight: 500; }
.hud-live { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--ink-3); font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.hud-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c1); box-shadow: 0 0 8px var(--c1); animation: livepulse 2.4s ease-in-out infinite; }
@keyframes livepulse { 0%,100% { box-shadow: 0 0 6px var(--c1); opacity: 0.7; } 50% { box-shadow: 0 0 14px var(--c1); opacity: 1; } }

/* ===== the media stage: a dark screen ===== */

.stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--stage); color: var(--stage-ink); transition: opacity 0.34s var(--ease); }

.st-top { position: absolute; inset: 12px 12px auto 12px; z-index: 5; display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em; }
.st-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--stage-line); border-radius: 6px; background: rgb(6 8 13 / 58%); color: var(--stage-ink-2); backdrop-filter: blur(6px); }
.st-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--stage-c1); box-shadow: 0 0 8px var(--stage-c1); }
.st-tc { margin-left: auto; color: var(--stage-ink); }

.st-caption { position: absolute; inset: auto 18px 40px 18px; z-index: 6; margin: 0; font-family: var(--read); font-size: clamp(16px, 2.1vw, 21px); line-height: 1.4; color: rgb(233 238 255 / 60%); text-shadow: 0 1px 14px rgb(0 0 0 / 55%); }
.st-caption .w { transition: color 160ms ease, opacity 160ms ease; }
.st-caption .w.past { color: rgb(233 238 255 / 92%); }
.st-caption .w.active { background: linear-gradient(100deg, var(--stage-c1), var(--stage-c2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.st-track { position: absolute; inset: auto 18px 18px 18px; z-index: 6; height: 2px; border-radius: 2px; background: rgb(255 255 255 / 14%); }
.st-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--stage-c1), var(--stage-c2)); box-shadow: 0 0 10px rgb(25 211 236 / 60%); }

.st-scene { position: absolute; inset: 0; }
.st-layer { position: absolute; inset: -8%; will-change: transform; }
.st-layer.l1 { background: radial-gradient(78% 88% at 28% 22%, #0a3a6e, transparent 60%), radial-gradient(72% 82% at 80% 76%, #3a1d7a, transparent 62%); }
.st-layer.l2 { background: radial-gradient(42% 56% at 62% 40%, rgb(25 211 236 / 50%), transparent 60%); mix-blend-mode: screen; opacity: 0.72; }
.st-layer.l3 { background: linear-gradient(112deg, transparent 40%, rgb(139 109 255 / 26%) 50%, transparent 60%); opacity: 0.55; }
.st-vignette { position: absolute; inset: 0; background: radial-gradient(120% 100% at 50% 38%, transparent 50%, rgb(3 4 7 / 74%) 100%); }
.st-grain { position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.st-audio { position: absolute; inset: 0; background: radial-gradient(90% 120% at 50% 120%, rgb(67 97 238 / 18%), transparent 60%); }
.st-wave { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.stage[data-kind="text"] { background: light-dark(#fbfcfe, #10131b); color: var(--ink); }
.st-read { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 26px 30px 44px; background: light-dark(linear-gradient(180deg, #ffffff, #f5f7fb), linear-gradient(180deg, #14171e, #10131b)); }
.st-read-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em; color: var(--ink-3); }
.st-read-body { margin: 0; font-family: var(--read); font-size: clamp(16px, 2vw, 20px); line-height: 1.62; color: var(--ink-2); }
.st-read-body .ln { transition: color 160ms ease, opacity 160ms ease; opacity: 0.5; }
.st-read-body .ln.cur { opacity: 1; color: var(--ink); }
.st-read-body .w.active { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 560; }
.st-read-body .w.past { color: var(--ink); }
.st-read-prog { position: absolute; inset: auto 30px 22px 30px; height: 2px; border-radius: 2px; background: light-dark(rgb(10 14 22 / 10%), rgb(255 255 255 / 12%)); }
.st-read-prog i { display: block; height: 100%; border-radius: 2px; background: var(--grad); }

/* ===== drop demo: the HUD is a drop target ===== */
.stage[data-kind="drop"], .stage[data-kind="ingest"] { background: radial-gradient(120% 120% at 50% 30%, #0c1430, var(--stage) 64%); }
.dropzone { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 18px; color: var(--stage-ink); background: radial-gradient(110% 90% at 50% 32%, rgb(67 97 238 / 14%), transparent 62%); }
.dz-ring { position: relative; display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; border: 1px solid var(--stage-line); background: rgb(255 255 255 / 4%); color: var(--stage-c1); transition: border-color 200ms ease, box-shadow 200ms ease; }
.dz-ring::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1px solid rgb(99 130 255 / 45%); animation: dzpulse 2.4s ease-out infinite; }
.dz-icon { display: inline-grid; place-items: center; }
@keyframes dzpulse { 0% { transform: scale(0.82); opacity: 0.85; } 100% { transform: scale(1.3); opacity: 0; } }
.dz-title { margin: 14px 0 0; font-size: 17px; font-weight: 600; color: #fff; letter-spacing: -0.01em; }
.dz-sub { margin: 5px 0 0; font-family: var(--mono); font-size: 11.5px; color: var(--stage-ink-2); }
.dz-go { margin-top: 15px; height: 33px; padding: 0 16px; border: 1px solid var(--stage-line); border-radius: 999px; background: rgb(255 255 255 / 6%); color: #fff; font-family: var(--mono); font-size: 12px; cursor: pointer; transition: background 140ms ease, border-color 140ms ease; }
.dz-go:hover { background: rgb(255 255 255 / 12%); border-color: rgb(99 130 255 / 55%); }
.hud.drag-over .dropzone { background: radial-gradient(110% 90% at 50% 32%, rgb(67 97 238 / 30%), transparent 60%); }
.hud.drag-over .dz-ring { border-color: var(--stage-c1); box-shadow: 0 0 26px rgb(25 211 236 / 45%); }
.hud.drag-over .dz-title::after { content: " it"; }

/* ===== ingest: short "mining questions" animation ===== */
.ingest { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 18px; color: var(--stage-ink); background: radial-gradient(110% 90% at 50% 40%, rgb(67 97 238 / 16%), transparent 62%); }
.ing-scan { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 42%, rgb(25 211 236 / 16%) 50%, transparent 58%); transform: translateX(-100%); animation: ingscan 1.25s var(--ease) forwards; }
.ing-file { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 13px; color: #fff; }
.ing-file .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--stage-c1); box-shadow: 0 0 10px var(--stage-c1); }
.ing-bar { width: min(62%, 340px); height: 3px; border-radius: 3px; background: rgb(255 255 255 / 14%); overflow: hidden; }
.ing-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--stage-c1), var(--stage-c2)); box-shadow: 0 0 10px rgb(25 211 236 / 60%); animation: ingbar 1.25s var(--ease) forwards; }
.ing-label { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--stage-ink-2); }
@keyframes ingscan { to { transform: translateX(100%); } }
@keyframes ingbar { to { width: 100%; } }

/* ===== question card ===== */

.qcard { padding: 22px; }
.qfrom { margin: 0 0 14px; color: var(--ink-3); font-family: var(--mono); font-size: 11px; letter-spacing: 0.01em; }
.qfrom strong { color: var(--ink-2); font-weight: 600; }
.question { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.question em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.options { display: grid; gap: 8px; margin-top: 16px; }
.options button {
  display: flex; align-items: center; gap: 11px; width: 100%; min-height: 46px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--ink);
  font-size: 14.5px; font-weight: 500; text-align: left; cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms var(--ease);
}
.options button::before { content: ""; width: 16px; height: 16px; flex: none; border: 1.6px solid light-dark(rgb(10 14 22 / 24%), rgb(255 255 255 / 28%)); border-radius: 50%; transition: border-color 120ms ease, background 120ms ease; }
.options button:hover { border-color: var(--c2); transform: translateX(3px); }
.options button.correct { border-color: light-dark(rgb(15 138 106 / 55%), rgb(47 208 166 / 55%)); background: light-dark(rgb(15 138 106 / 9%), rgb(47 208 166 / 13%)); color: var(--known); font-weight: 600; animation: rightpulse 0.6s var(--ease); }
.options button.correct::before { border-color: var(--known); background: var(--known) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4 4 10-10'/%3E%3C/svg%3E") center / 11px no-repeat; animation: checkpop 0.44s var(--ease) both; }
.options button.dim { opacity: 0.5; }
.options button.is-wrong { border-color: light-dark(rgb(204 64 60 / 55%), rgb(255 120 116 / 55%)); background: light-dark(rgb(204 64 60 / 8%), rgb(255 120 116 / 10%)); opacity: 1; animation: wrongshake 0.42s ease; }
.options button.is-wrong::before { border-color: light-dark(rgb(204 64 60 / 70%), rgb(255 120 116 / 70%)); }
@keyframes checkpop { 0% { transform: scale(0.2); opacity: 0; } 58% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); } }
@keyframes rightpulse { 0% { box-shadow: 0 0 0 0 light-dark(rgb(15 138 106 / 0%), rgb(47 208 166 / 0%)); } 32% { box-shadow: 0 0 0 5px light-dark(rgb(15 138 106 / 16%), rgb(47 208 166 / 20%)); } 100% { box-shadow: 0 0 0 0 light-dark(rgb(15 138 106 / 0%), rgb(47 208 166 / 0%)); } }
@keyframes wrongshake { 0%, 100% { transform: translateX(0); } 18% { transform: translateX(-5px); } 38% { transform: translateX(5px); } 58% { transform: translateX(-3px); } 78% { transform: translateX(2px); } }

/* waiting / skeleton state while the HUD is idle or ingesting */
.qcard.is-waiting .question { color: var(--ink-3); font-weight: 500; }
.qcard.is-waiting .qfoot { visibility: hidden; }
.skel { display: block; height: 46px; border-radius: 9px; border: 1px solid var(--line-2); background: linear-gradient(100deg, var(--surface-2) 28%, light-dark(rgb(10 14 22 / 4%), rgb(255 255 255 / 7%)) 50%, var(--surface-2) 72%); background-size: 200% 100%; animation: skelsweep 1.5s linear infinite; }
@keyframes skelsweep { to { background-position: -200% 0; } }

.qfoot { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.next { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--c2); font-family: var(--mono); font-size: 12px; font-weight: 500; cursor: pointer; transition: border-color 120ms ease, background 120ms ease; }
.next:hover { border-color: var(--c2); }
.steer-chips { display: flex; gap: 8px; margin-left: auto; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-family: var(--mono); font-size: 10.5px; font-weight: 500; }

/* ---------------- sections ---------------- */

.sec-head { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; max-width: 760px; }
.kicker { margin: 0 0 12px; font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker.on-stage { background: linear-gradient(100deg, #5ad6ff, #b79bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sec-head h2, .reads-h, .steer-copy h2 { font-size: clamp(27px, 3.3vw, 38px); line-height: 1.08; letter-spacing: -0.025em; }
.sec-sub { margin: 16px 0 0; color: var(--ink-2); font-size: 17px; }

.how { padding: 48px 0 8px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: min(calc(100% - 48px), var(--max)); margin: 40px auto 0; }

/* gradient-border glow cards */
.card {
  position: relative;
  padding: 24px;
  border-radius: var(--radius);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--line) border-box;
  border: 1px solid transparent;
  box-shadow: var(--shadow-card);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 220ms ease; pointer-events: none;
}
.card:hover { transform: translateY(-4px); box-shadow: light-dark(0 18px 44px rgb(10 14 22 / 12%), 0 24px 60px rgb(2 4 10 / 50%)); }
.card:hover::before { opacity: 1; }
.card-ic { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-bottom: 16px; border-radius: 9px; background: var(--grad-soft); color: var(--c2); border: 1px solid light-dark(rgb(67 97 238 / 16%), rgb(111 134 255 / 22%)); }
.card h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.card p { margin: 9px 0 0; color: var(--ink-2); font-size: 14.5px; }

/* ---------------- always-on tray + popup ---------------- */
.tray { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; width: min(calc(100% - 48px), var(--max)); margin: 0 auto; padding: 44px 0 24px; }
.tray-copy h2 { font-size: clamp(27px, 3.3vw, 38px); line-height: 1.1; letter-spacing: -0.025em; }
.tray-note { margin: 16px 0 0; color: var(--ink-3); font-family: var(--mono); font-size: 12.5px; line-height: 1.6; }
.tray-note em { font-style: normal; color: var(--ink-2); }

/* a faux desktop corner: the study popup floating over a real wallpaper */
.tray-stage {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px;
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 22px 22px 56px;
  background:
    radial-gradient(58% 52% at 80% 16%, rgb(40 214 255 / 60%), transparent 60%),
    radial-gradient(66% 60% at 16% 92%, rgb(138 86 255 / 58%), transparent 62%),
    radial-gradient(60% 56% at 52% 44%, rgb(67 97 238 / 50%), transparent 66%),
    linear-gradient(158deg, #1b2552 0%, #121a3a 42%, #090d1d 100%);
  box-shadow: var(--shadow-card);
}
/* wallpaper lighting -- top sheen + corner bloom + bottom vignette for depth */
.tray-stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -8%, rgb(255 255 255 / 16%), transparent 52%),
    radial-gradient(140% 120% at 50% 116%, rgb(2 4 12 / 48%), transparent 60%);
}

.tray-pop {
  position: relative; z-index: 1; width: min(86%, 322px);
  overflow: hidden; padding: 13px; border: 1px solid var(--line); border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 24px 50px rgb(2 4 12 / 42%), 0 2px 6px rgb(2 4 12 / 24%);
  animation: popin 0.6s var(--ease) both;
}
.tray-pop::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad); z-index: 4; }
@keyframes popin { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
.pop-head { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.pop-mark { display: inline-grid; place-items: center; color: var(--ink); }
.pop-name { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.pop-now { margin-left: auto; color: var(--ink-3); font-family: var(--mono); font-size: 10px; }

/* mini study stage -- the video screen, popup-sized */
.pop-stage { position: relative; aspect-ratio: 16 / 9; margin-bottom: 11px; overflow: hidden; border-radius: 8px; background: var(--stage); }
.pop-stage .st-scene { position: absolute; inset: 0; }
.pop-stage .st-layer { position: absolute; inset: -8%; }
.pop-chip { position: absolute; top: 7px; left: 7px; z-index: 3; display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px; border: 1px solid var(--stage-line); border-radius: 5px; background: rgb(6 8 13 / 55%); color: var(--stage-ink-2); font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.02em; backdrop-filter: blur(4px); }
.pop-chip .st-live-dot { width: 5px; height: 5px; }
.pop-cap { position: absolute; left: 9px; right: 9px; bottom: 13px; z-index: 3; margin: 0; font-family: var(--read); font-size: 11px; line-height: 1.32; color: rgb(233 238 255 / 56%); text-shadow: 0 1px 8px rgb(0 0 0 / 55%); }
.pop-cap .past { color: rgb(233 238 255 / 92%); }
.pop-cap .hot { background: linear-gradient(100deg, var(--stage-c1), var(--stage-c2)); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 500; }
.pop-track { position: absolute; left: 9px; right: 9px; bottom: 7px; z-index: 3; height: 2px; border-radius: 2px; background: rgb(255 255 255 / 16%); }
.pop-track i { display: block; width: 46%; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--stage-c1), var(--stage-c2)); box-shadow: 0 0 8px rgb(25 211 236 / 60%); }

.pop-q { margin: 0 0 10px; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.pop-q em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pop-opts { display: grid; gap: 6px; }
.pop-opt { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 500; }
.pop-opt::before { content: ""; width: 13px; height: 13px; flex: none; border: 1.5px solid light-dark(rgb(10 14 22 / 24%), rgb(255 255 255 / 28%)); border-radius: 50%; }
.pop-opt.is-right { border-color: light-dark(rgb(15 138 106 / 50%), rgb(47 208 166 / 50%)); background: light-dark(rgb(15 138 106 / 8%), rgb(47 208 166 / 12%)); color: var(--known); font-weight: 600; }
.pop-opt.is-right::before { border-color: var(--known); background: var(--known) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4 4 10-10'/%3E%3C/svg%3E") center / 9px no-repeat; }

/* the system tray, bottom-right -- chevron, wifi, volume, langcap (lit), clock */
.tray-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 38px; display: flex; align-items: center; justify-content: flex-end; gap: 13px; padding: 0 14px; border-top: 1px solid rgb(255 255 255 / 10%); background: rgb(10 14 26 / 52%); backdrop-filter: blur(14px) saturate(1.3); }
.tray-glyph { display: inline-grid; place-items: center; width: 16px; height: 16px; color: rgb(233 238 255 / 72%); }
.tray-glyph svg { width: 15px; height: 14px; }
.tray-ico { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 5px; }
.tray-ico.on { background: var(--grad-fill); box-shadow: 0 0 6px 0 rgb(67 97 238 / 30%); animation: trayglow 2.6s ease-in-out infinite; }
@keyframes trayglow { 0%, 100% { box-shadow: 0 0 6px 0 rgb(67 97 238 / 30%); } 50% { box-shadow: 0 0 15px 2px rgb(99 130 255 / 60%); } }
.tray-clock { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.05; color: rgb(233 238 255 / 88%); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.02em; }
.tray-clock small { font-size: 8.5px; color: rgb(233 238 255 / 60%); }

.steer { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 50px; align-items: center; width: min(calc(100% - 48px), var(--max)); margin: 0 auto; padding: 92px 0; }
.steer-copy h2 { max-width: 11em; }
.steer-llm { margin: 16px 0 0; padding-left: 16px; border-left: 2px solid; border-image: var(--grad) 1; color: var(--ink-3); font-size: 14.5px; }
.steer-panel { display: grid; gap: 12px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-card); }
.steer-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.steer-k { width: 92px; flex: none; color: var(--ink-3); font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.tog { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); color: var(--ink-2); font-size: 13.5px; font-weight: 500; transition: transform 140ms var(--ease); }
.tog.is-on { border-color: transparent; background: var(--grad-fill); color: #fff; box-shadow: 0 4px 14px light-dark(rgb(67 97 238 / 26%), rgb(0 0 0 / 30%)); }
.steer-row-llm { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.steer-prompt { color: var(--ink); font-family: var(--read); font-size: 15.5px; font-style: italic; }

/* reads + marquee */
.reads { width: 100%; margin: 0 auto; padding: 8px 0 84px; overflow: hidden; }
.reads-h { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; font-size: 14px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; font-family: var(--mono); color: var(--ink-3); text-align: center; }
.reads-note { width: min(calc(100% - 48px), var(--max)); margin: 16px auto 0; text-align: center; color: var(--ink-3); font-family: var(--mono); font-size: 12px; }
.marquee { position: relative; margin-top: 26px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: inline-flex; gap: 10px; padding-left: 10px; white-space: nowrap; animation: marquee 32s linear infinite; }
.rd { display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 13.5px; }
.rd b { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--grad-fill); color: #fff; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.03em; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.reads-list { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.private { width: min(calc(100% - 48px), var(--max)); margin: 0 auto 88px; }
.private-inner {
  position: relative; overflow: hidden; padding: 64px 52px; border-radius: 22px;
  background:
    radial-gradient(120% 130% at 86% -20%, rgb(67 97 238 / 42%), transparent 56%),
    radial-gradient(92% 120% at 0% 120%, rgb(123 47 247 / 32%), transparent 56%),
    radial-gradient(70% 90% at 30% 0%, rgb(0 180 216 / 26%), transparent 50%),
    linear-gradient(150deg, #0d1224, #06080f);
  color: #eef2f8; box-shadow: var(--shadow-hud);
}
.private-inner::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad); }
.private-inner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 4%) 1px, transparent 1px); background-size: 34px 34px; mask-image: radial-gradient(100% 100% at 80% 0%, #000, transparent 70%); pointer-events: none; }
.priv-spot { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(420px circle at var(--mx, 80%) var(--my, 0%), rgb(120 150 255 / 22%), transparent 60%); opacity: 0; transition: opacity 240ms ease; }
.private-inner:hover .priv-spot { opacity: 1; }
.private-inner > * { position: relative; z-index: 1; }
.private h2 { max-width: 12em; font-size: clamp(28px, 4vw, 44px); line-height: 1.05; color: #fff; letter-spacing: -0.025em; }
.private-lede { max-width: 36em; margin: 18px 0 30px; color: #b6c2d6; font-size: 16.5px; }

/* ---------------- footer ---------------- */

.ftr { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; width: min(calc(100% - 48px), var(--max)); margin: 0 auto; padding: 32px 0 56px; border-top: 1px solid var(--line); color: var(--ink-2); }
.footer-brand { font-size: 16px; }
.footer-links { display: flex; gap: 18px; font-family: var(--mono); font-size: 13px; }
.footer-links a:hover { color: var(--ink); }
.footer-note { width: 100%; margin: 6px 0 0; color: var(--ink-3); font-family: var(--mono); font-size: 12px; }

/* page grain removed -- it read as noise over the gradient fills.
   Film grain stays inside the video stage (.st-grain), where it belongs. */

/* ---------------- scroll-reveal choreography ---------------- */
.reveal { opacity: 0; transform: translateY(26px); filter: blur(8px); transition: opacity 720ms var(--ease), transform 720ms var(--ease), filter 720ms var(--ease); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------------- theme crossfade (View Transitions) ---------------- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.36s; animation-timing-function: var(--ease); }

/* ---------------- responsive ---------------- */

@media (max-width: 940px) {
  .hero, .steer, .tray { grid-template-columns: 1fr; gap: 40px; }
  .how-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .aura { opacity: light-dark(0.4, 0.7); }
}
@media (max-width: 620px) {
  .hdr { gap: 12px; }
  .theme button { padding: 5px 9px; }
  .hero { padding-top: 60px; }
  .hero-copy h1 { font-size: clamp(36px, 11vw, 50px); }
  .btn-lg { width: 100%; }
  .private-inner { padding: 44px 24px; }
}

/* ---------------- reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .aura i, .marquee-track, .hud-live-dot, .dz-ring::before { animation: none !important; }
  .hero-copy h1 .wi { opacity: 1; transform: none; filter: none; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
