:root {
  --bg: #060608;
  --bg-2: #0c0c10;
  --ink: #f3f4f8;
  --ink-2: #a9aebd;
  --ink-3: #7a8091;
  --line: rgba(255, 255, 255, 0.09);
  --blue: #2d8ceb;         /* After Effects value blue */
  --accent: #0a84ff;
  --panel: #1d1d21;
  --panel-2: #26262b;
  --radius-xl: 34px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  /* SF Pro on Apple devices (system font) or where installed; Inter everywhere else */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "SF Pro", "Inter", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --pad: clamp(20px, 5vw, 72px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: rgba(10, 132, 255, 0.45); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
html { scrollbar-color: #2c2d33 var(--bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2c2d33; border-radius: 10px; border: 2px solid var(--bg); }
img, svg, canvas { display: block; }
a { color: inherit; text-underline-offset: 0.2em; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: #fff; color: #000; padding: 10px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Glass UI: the plug-in's iOS 27 finish, in CSS ---------- */
.glass-ui {
  background: linear-gradient(to top, rgba(255,255,255,0.04), rgba(255,255,255,0.10) 85%, rgba(255,255,255,0.14));
  -webkit-backdrop-filter: blur(22px) saturate(1.7) brightness(1.05);
  backdrop-filter: blur(22px) saturate(1.7) brightness(1.05);
  box-shadow:
    /* iOS 27 finish: black outline (28% sides, 35% top and bottom), highlight just inside it */
    inset 1.5px 0 0 rgba(0,0,0,0.28),
    inset -1.5px 0 0 rgba(0,0,0,0.28),
    inset 0 1.5px 0 rgba(0,0,0,0.35),
    inset 0 -1.5px 0 rgba(0,0,0,0.35),
    inset 0 3px 0 -1.5px rgba(255,255,255,0.42),
    inset 0 -3px 0 -1.5px rgba(255,255,255,0.16),
    inset 0 12px 16px -12px rgba(255,255,255,0.22),
    inset 0 -10px 14px -12px rgba(255,255,255,0.22),
    0 14px 44px -8px rgba(0,0,0,0.05);
}

.glass-ui.is-refracting {
  background: linear-gradient(to top, rgba(12,12,18,0.42), rgba(18,18,26,0.3) 85%, rgba(40,40,52,0.3));
  -webkit-backdrop-filter: var(--refract) brightness(1.05);
  backdrop-filter: var(--refract) brightness(1.05);
}

/* Rim highlight, straight from the top */
.glass-ui { position: relative; }
.glass-ui::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  padding: 1.5px;
  background:
    radial-gradient(60% 90% at 50% -30%, rgba(255,255,255,0.85), transparent 70%),
    radial-gradient(120px 60px at 50% 100%, rgba(255,255,255,0.28), transparent 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.glass-ui::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(70% 100% at 50% -40%, rgba(255,255,255,0.1), transparent 70%);
}
.glass-ui > * { position: relative; z-index: 1; }
.dl-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 22px; margin-top: 10px; pointer-events: auto; }
.dl-opt { display: grid; justify-items: center; gap: 10px; }
.dl-opt .btn { margin-top: 0 !important; }
.dl-meta { font-size: 13px !important; color: rgba(255,255,255,0.78) !important; }

/* ---------- Web demo notice ---------- */
.demo-note {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60;
  transform: translateX(-50%);
  width: min(640px, calc(100% - 24px));
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 12px 12px 18px; border-radius: 18px;
  background: rgba(16, 16, 22, 0.86);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 12px 32px -12px rgba(0,0,0,0.7);
  font-size: 14px; line-height: 1.45; color: var(--ink-2);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.demo-note strong { color: var(--ink); font-weight: 600; }
.demo-note.is-hidden { opacity: 0; transform: translate(-50%, 12px); pointer-events: none; }
.demo-close { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,0.08); color: var(--ink-2); cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.demo-close:hover { background: rgba(255,255,255,0.16); color: var(--ink); }
.demo-close svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.demo-tag {
  position: absolute; left: 14px; top: 12px; z-index: 1; pointer-events: none;
  font: 500 11px/1 var(--mono); letter-spacing: 0.02em; color: rgba(255,255,255,0.72);
  padding: 6px 8px; border-radius: 6px; background: rgba(0,0,0,0.42);
}

/* ---------- Buttons ---------- */
.btn {
  --h: 50px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 24px; border-radius: 999px;
  font: 600 16px/1 var(--font); letter-spacing: -0.01em; text-decoration: none;
  border: 0; cursor: pointer;
  transition: transform 0.5s var(--ease-out), background-color 0.3s, box-shadow 0.3s;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: #f5f6fa; color: #050507; }
.btn-primary:hover { background: #fff; transform: scale(1.03); }
.btn-glass { color: var(--ink); }
.btn-glass:hover { transform: scale(1.03); }
.btn-small { --h: 34px; padding: 0 16px; font-size: 14px; }
.btn-large { --h: 60px; padding: 0 34px; font-size: 18px; }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 14px 0 auto; z-index: 50; display: flex; justify-content: center; pointer-events: none; padding: 0 12px; }
.nav-pill {
  pointer-events: auto;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 6px 6px 14px; border-radius: 999px;
  max-width: 100%;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 600; letter-spacing: -0.02em; padding-right: 10px; }
.mark { width: 22px; height: 22px; }
.nav ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; }
.nav ul a { display: block; padding: 7px 12px; border-radius: 999px; font-size: 14px; color: var(--ink-2); text-decoration: none; transition: color 0.2s, background-color 0.2s; }
.nav ul a:hover { color: var(--ink); background: rgba(255,255,255,0.08); }
@media (max-width: 720px) { .nav ul { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; min-height: 620px; overflow: hidden; isolation: isolate; }
.gl { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.hero .gl { touch-action: pan-y; }
.labels { position: absolute; inset: 0; pointer-events: none; }
.glabel {
  position: absolute; left: 0; top: 0; will-change: transform;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: #fff; font-weight: 500; letter-spacing: -0.01em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.25);
}
.glabel svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; filter: drop-shadow(0 1px 6px rgba(0,0,0,0.25)); }
.glabel svg .fill { fill: currentColor; stroke: none; }
.glabel-search { font-size: 19px; justify-content: flex-start; padding: 0 22px; }
.glabel-search span { flex: 1; color: rgba(255,255,255,0.82); }
.glabel-search .mic { opacity: 0.85; }
.glabel-play svg { width: 26px; height: 26px; margin-left: 3px; }

.hero-copy {
  position: absolute; left: var(--pad); right: var(--pad); bottom: clamp(48px, 9vh, 96px);
  display: grid; gap: 18px; max-width: 34rem; pointer-events: none;
}
.hero-copy .cta-row { pointer-events: auto; }
.hero-lede { font-size: clamp(26px, 3.1vw, 40px); line-height: 1.08; font-weight: 650; letter-spacing: -0.035em; }
.hero-sub { color: rgba(255,255,255,0.8); text-shadow: 0 1px 12px rgba(0,0,0,0.35); font-size: clamp(16px, 1.25vw, 18px); max-width: 30rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero-hint {
  position: absolute; right: var(--pad); bottom: clamp(48px, 9vh, 96px);
  display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2);
  transition: opacity 0.8s var(--ease-out);
}
.hero-hint.is-gone { opacity: 0; }
@media (max-width: 720px) {
  .hero-hint { left: var(--pad); right: auto; top: 84px; bottom: auto; }
}
.no-gl .hero { background: radial-gradient(60% 50% at 30% 75%, #0b4dff55, transparent), radial-gradient(50% 40% at 80% 85%, #a020ff44, transparent), var(--bg); }

/* ---------- Sections ---------- */
section { position: relative; }
.section-head { display: grid; gap: 16px; max-width: 46rem; margin: 0 0 clamp(40px, 6vw, 72px); }
.section-head h2, .faq h2 { font-size: clamp(36px, 5.4vw, 76px); line-height: 1; font-weight: 700; letter-spacing: -0.04em; }
.section-head p { color: var(--ink-2); font-size: clamp(17px, 1.4vw, 20px); max-width: 38rem; }

/* ---------- Story ---------- */
.story { padding: clamp(110px, 16vw, 200px) var(--pad) 0; }
.story-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 80px); }
.story-steps { padding-bottom: 30vh; }
.step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; gap: 14px; max-width: 30rem; opacity: 0.34; transition: opacity 0.6s var(--ease-out); }
.step.is-active, .step:focus-within { opacity: 1; }
.step h3 { font-size: clamp(26px, 2.6vw, 38px); line-height: 1.08; font-weight: 650; letter-spacing: -0.03em; }
.step p { color: var(--ink-2); font-size: 18px; }
.stage-sticky { position: sticky; top: 0; height: 100vh; display: grid; align-content: center; gap: 16px; padding: 80px 0 24px; }
.stage-3d { perspective: 1400px; }
.stage-frame {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-xl); overflow: hidden;
  background: #0a0a0e; box-shadow: 0 0 0 1px var(--line), 0 40px 80px -40px rgba(0,0,0,0.8);
  transform-origin: 50% 50%; will-change: transform;
}
.stage-frame .gl { touch-action: pan-y; }

/* After Effects-style Effect Controls panel */
.fx-panel {
  background: var(--panel); border-radius: 16px; box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
  font-size: 13px; color: #d5d7de; overflow: hidden;
}
.fx-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel-2); font-weight: 600; color: #e9eaee; border-bottom: 1px solid rgba(0,0,0,0.4); }
.fx-badge { font: 600 11px/1 var(--mono); color: #b7bac4; padding: 3px 5px; border-radius: 4px; background: rgba(255,255,255,0.07); }
.fx-ver, .fx-reset { margin-left: auto; font: 500 12px/1 var(--mono); color: var(--ink-3); }
.fx-reset { background: none; border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; padding: 6px 10px; color: var(--ink-2); cursor: pointer; font-family: var(--font); }
.fx-reset:hover { color: var(--ink); border-color: rgba(255,255,255,0.28); }

.readout dl { margin: 0; padding: 6px 0; display: grid; grid-template-columns: 1fr 1fr; }
.readout .r { display: flex; justify-content: space-between; gap: 12px; padding: 5px 14px; transition: background-color 0.4s; }
.readout .r dt { color: #b7bac4; }
.readout .r dd { margin: 0; color: var(--blue); font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12.5px; }
.readout .r.is-live { background: rgba(45,140,235,0.14); }
.readout .r.is-live dt { color: #fff; }

@media (max-width: 900px) {
  .story-grid { grid-template-columns: 1fr; }
  .story-stage { grid-row: 1; position: sticky; top: 0; z-index: 2; }
  .stage-sticky { position: relative; height: auto; padding: 64px 0 12px; background: linear-gradient(var(--bg) 85%, transparent); }
  .readout { display: none; }
  .step { min-height: 60vh; justify-content: flex-start; padding-top: 4vh; }
}

/* ---------- Playground ---------- */
.playground { padding: clamp(110px, 14vw, 180px) var(--pad) 0; }
.pg-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.pg-view { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius-xl); overflow: hidden; background: #0a0a0e; box-shadow: 0 0 0 1px var(--line); }
.pg-scenes { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(10,10,14,0.55); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1); }
.pg-scenes button { font: 500 13px/1 var(--font); color: var(--ink-2); background: none; border: 0; padding: 8px 14px; border-radius: 999px; cursor: pointer; transition: background-color 0.25s, color 0.25s; }
.pg-scenes button:hover { color: var(--ink); }
.pg-scenes button[aria-checked="true"] { background: #f5f6fa; color: #050507; }

.controls { max-height: min(78vh, 720px); overflow: auto; scrollbar-width: thin; }
.controls details { border-bottom: 1px solid rgba(0,0,0,0.45); }
.controls summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; font-weight: 600; color: #e3e4e9; user-select: none; }
.controls summary::-webkit-details-marker { display: none; }
.controls summary::before { content: ""; width: 0; height: 0; border: 4.5px solid transparent; border-left: 6px solid #9a9da8; border-right: 0; transition: transform 0.2s; }
.controls details[open] summary::before { transform: rotate(90deg); }
.ctl { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; padding: 6px 14px 8px 28px; }
.ctl label { color: #b7bac4; }
.ctl output { color: var(--blue); font: 500 12.5px/1 var(--mono); font-variant-numeric: tabular-nums; }
.ctl input[type="range"] { grid-column: 1 / -1; }
.ctl-check { grid-template-columns: auto 1fr; }
.ctl-check input { accent-color: var(--blue); width: 15px; height: 15px; margin: 0; }
.ctl-color input { width: 40px; height: 24px; border: 0; padding: 0; background: none; cursor: pointer; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; background: transparent; cursor: pointer; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(to right, var(--blue) var(--p, 50%), #3a3b42 var(--p, 50%)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 3px; background: #3a3b42; }
input[type="range"]::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--blue); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5.5px; border-radius: 50%; background: #f1f2f6; box-shadow: 0 1px 4px rgba(0,0,0,0.5); transition: transform 0.2s var(--ease-out); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #f1f2f6; }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.25); }

@media (max-width: 980px) {
  .pg-grid { grid-template-columns: 1fr; }
  .pg-view { aspect-ratio: 4 / 3; }
  .controls { max-height: none; }
}

/* ---------- Workflow ---------- */
.works { padding: clamp(110px, 14vw, 180px) var(--pad) 0; }
.rows { margin: 0; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.row dt { font-size: clamp(20px, 1.9vw, 26px); font-weight: 600; letter-spacing: -0.025em; }
.row dd { margin: 0; color: var(--ink-2); font-size: 18px; max-width: 36rem; }
.row em { font-style: normal; color: var(--ink); }
@media (max-width: 720px) { .row { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- Specs ---------- */
.specs { padding: clamp(110px, 14vw, 180px) var(--pad) 0; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 18px; }
.spec-table th, .spec-table td { text-align: left; vertical-align: top; padding: 20px 0; border-bottom: 1px solid var(--line); }
.spec-table tr:first-child > * { border-top: 1px solid var(--line); }
.spec-table th { width: 40%; font-weight: 500; color: var(--ink-3); padding-right: 24px; }
.spec-table td { max-width: 36rem; }

/* ---------- Buy ---------- */
.buy { margin-top: clamp(110px, 14vw, 180px); height: min(100svh, 820px); min-height: 560px; overflow: hidden; isolation: isolate; display: grid; place-items: center; }
.buy-copy { position: relative; display: grid; justify-items: center; gap: 18px; text-align: center; padding: 0 24px; pointer-events: none; }
.buy-copy .btn { pointer-events: auto; margin-top: 10px; }
.buy h2 { font-size: clamp(48px, 8.4vw, 96px); line-height: 0.95; font-weight: 750; letter-spacing: -0.045em; }
.buy p { color: rgba(255,255,255,0.86); font-size: clamp(17px, 1.4vw, 20px); text-shadow: 0 1px 14px rgba(0,0,0,0.4); }

/* ---------- FAQ ---------- */
.faq { padding: clamp(100px, 12vw, 160px) var(--pad) 0; max-width: calc(52rem + 2 * var(--pad)); }
.faq h2 { margin-bottom: 40px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: translateY(-3px) rotate(45deg); transition: transform 0.35s var(--ease-out); }
.faq details[open] summary::after { transform: translateY(2px) rotate(225deg); }
.faq details p { color: var(--ink-2); font-size: 18px; padding: 0 0 24px; max-width: 40rem; }

/* ---------- Footer ---------- */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 80px var(--pad) 48px; color: var(--ink-3); font-size: 14px; }
.foot-brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 600; }

/* Keep the hero actions clear of the web-demo note while it's showing */
@media (max-width: 720px) {
  body:has(.demo-note:not(.is-hidden)) .hero-copy { bottom: 150px; }
}
