/* ==========================================================================
   Ternframe — site stylesheet
   Swiss editorial grid · warm paper · carbon ink · single signal color
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/jakarta-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-var-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #F5F4EF;
  --ink: #141413;
  --ink-2: #4A4945;
  --ink-3: #7A7871;
  --rule: rgba(20, 20, 19, 0.14);
  --rule-ink: #141413;
  --signal: #D84A27;

  --sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --max: 1360px;
  --pad: clamp(18px, 2.2vw, 32px);
  --masthead-h: 60px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--masthead-h) + 12px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--signal); }
p { margin: 0; }
address { font-style: normal; }

::selection { background: var(--signal); color: var(--paper); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0;
}
.skip:focus {
  left: 12px; top: 12px; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 10px 14px; font: 500 13px/1 var(--mono); text-decoration: none;
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.mono { font-family: var(--mono); }

.label {
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Frame & 12-column grid ---------- */
.frame {
  position: relative;
  isolation: isolate;
  max-width: var(--max);
  min-height: 100vh;
  margin: 0 auto;
  border-inline: 1px solid var(--rule);
}

/* exposed column guides */
.frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(to right, rgba(20, 20, 19, 0.045) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  transform-origin: top;
  animation: guides-in 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes guides-in { from { transform: scaleY(0); } }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.c-3 { grid-column: span 3; }
.c-4 { grid-column: span 4; }
.c-5 { grid-column: span 5; }
.c-6 { grid-column: span 6; }
.c-7 { grid-column: span 7; }
.c-8 { grid-column: span 8; }
.c-9 { grid-column: span 9; }
.c-12 { grid-column: 1 / -1; }

.cell { padding: var(--pad); }
.bl { border-left: 1px solid var(--rule); }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 244, 239, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule-ink);
}
.masthead .grid { min-height: var(--masthead-h); align-items: stretch; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 var(--pad);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.mark { width: 24px; height: 24px; flex: none; }
.mark-signal { fill: var(--signal); }

.masthead-meta {
  display: flex;
  align-items: center;
  padding: 0 var(--pad);
  border-left: 1px solid var(--rule);
  font: 400 12px/1.4 var(--mono);
  color: var(--ink-3);
}

.masthead-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.6vw, 24px);
  padding: 0 var(--pad);
  font: 500 12.5px/1 var(--mono);
  white-space: nowrap;
}
.masthead-nav a {
  padding: 6px 0;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.masthead-nav a:hover,
.masthead-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--signal); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--signal); border-color: var(--signal); color: var(--paper); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); }

/* ---------- Hero ---------- */
.hero { border-bottom: 1px solid var(--rule-ink); }

.hero-main { padding: clamp(48px, 8vw, 120px) var(--pad) clamp(40px, 6vw, 88px); }

.hero h1 {
  margin: 24px 0 0;
  max-width: 14ch;
  font-size: clamp(42px, 6.1vw, 90px);
  font-weight: 600;
  line-height: 0.99;
  letter-spacing: -0.042em;
}
.hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.lede {
  margin-top: 32px;
  max-width: 46ch;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.hero-figure {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding: var(--pad);
  border-left: 1px solid var(--rule);
}
.hero-figure .schematic { width: 100%; max-width: 360px; margin: auto; }

.strip { margin: 0; border-top: 1px solid var(--rule); }
.strip > div { padding: 18px var(--pad); }
.strip > div + div { border-left: 1px solid var(--rule); }
.strip dd { margin: 6px 0 0; font-size: 15px; font-weight: 500; letter-spacing: -0.005em; }

/* ---------- Schematic SVG primitives ---------- */
.s-ink { fill: none; stroke: currentColor; stroke-width: 1; }
.s-faint { fill: none; stroke: currentColor; stroke-opacity: 0.22; stroke-width: 1; }
.f-ink { fill: currentColor; }
.f-mute { fill: currentColor; fill-opacity: 0.2; }
.f-signal { fill: var(--signal); }
.f-paper { fill: var(--paper); }
.s-signal { fill: none; stroke: var(--signal); stroke-width: 1; }
svg text { font-family: var(--mono); font-size: 8px; letter-spacing: 0.06em; fill: currentColor; }

/* ---------- Sections ---------- */
.section { border-bottom: 1px solid var(--rule-ink); }

.section-head { border-bottom: 1px solid var(--rule); }
.head-label {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(40px, 5vw, 72px) var(--pad) var(--pad);
}
.idx { font: 500 12px/1 var(--mono); letter-spacing: 0.06em; color: var(--signal); }
.section-head h2,
.section-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.head-intro {
  padding: clamp(40px, 5vw, 72px) var(--pad) clamp(32px, 4vw, 56px);
  border-left: 1px solid var(--rule);
}
.head-intro p {
  max-width: 30ch;
  font-family: var(--serif);
  font-size: clamp(24px, 2.5vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.012em;
}
.head-intro p em { font-style: italic; }
.head-intro .label { max-width: none; margin-top: 20px; font-family: var(--mono); font-size: 11px; line-height: 1.4; letter-spacing: 0.08em; }

/* ---------- Rows (principles, commercial model) ---------- */
.row + .row { border-top: 1px solid var(--rule); }
.row-title { padding: 28px var(--pad); }
.row-title .n { display: block; margin-bottom: 10px; font: 500 11px/1 var(--mono); letter-spacing: 0.06em; color: var(--ink-3); }
.row-title h3 { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }
.row-body { padding: 28px var(--pad); border-left: 1px solid var(--rule); }
.row-body p { max-width: 60ch; color: var(--ink-2); }
.row-body p + p { margin-top: 10px; }
.row-tag {
  padding: 28px var(--pad);
  border-left: 1px solid var(--rule);
  font: 500 12px/1.6 var(--mono);
  letter-spacing: 0.02em;
  text-align: right;
}
.row-tag small { display: block; color: var(--ink-3); font-size: 11px; }
.row.is-muted h3,
.row.is-muted .row-tag { color: var(--ink-3); }
.row.is-muted .row-tag { text-decoration: line-through; text-decoration-color: var(--signal); }

.footnote {
  padding: 20px var(--pad);
  border-top: 1px solid var(--rule);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
}
.footnote p { max-width: 90ch; }

/* ---------- In-development slot ---------- */
.slot-lead { display: flex; flex-direction: column; gap: 18px; padding: 32px var(--pad); }
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.status::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--signal);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.25; } }

.slot-name { margin: 0; font-size: clamp(30px, 3vw, 40px); font-weight: 600; line-height: 1.05; letter-spacing: -0.035em; }
.slot-name em { display: block; margin-top: 6px; font-family: var(--serif); font-size: 0.62em; font-weight: 400; letter-spacing: -0.01em; color: var(--ink-2); }
.slot-lead p { max-width: 34ch; font-size: 15px; color: var(--ink-2); }

.slot-spec { padding: 32px var(--pad); border-left: 1px solid var(--rule); }
.spec { margin: 0; }
.spec > div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.spec > div:first-child { border-top: 1px solid var(--rule); }
.spec dt { padding-top: 3px; }
.spec dd { margin: 0; font-size: 15px; font-weight: 500; }

.slot-figure { margin: 0; padding: 32px var(--pad); border-left: 1px solid var(--rule); display: flex; flex-direction: column; gap: 14px; }
.slot-figure svg { width: 100%; max-width: 260px; }

/* ---------- Studio record ---------- */
.record { margin: 0; }
.record > div + div { border-top: 1px solid var(--rule); }
.record dt { padding: 18px var(--pad); align-self: center; }
.record dd { margin: 0; padding: 18px var(--pad); border-left: 1px solid var(--rule); font-size: 16px; }
.record dd .aside { margin-left: 10px; font: 400 12px/1 var(--mono); color: var(--ink-3); }

/* ---------- Waitlist ---------- */
.waitlist { position: relative; display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.field { display: flex; border: 1px solid var(--ink); background: var(--paper); }
.field:focus-within { outline: 2px solid var(--signal); outline-offset: 2px; }
.field input {
  flex: 1;
  min-width: 0;
  height: 54px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 17px/1 var(--sans);
}
.field input::placeholder { color: var(--ink-3); }
.field input:focus { outline: none; }
.field .btn { height: auto; border: 0; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status { min-height: 1.6em; font: 500 13px/1.6 var(--mono); }
.waitlist[data-state="ok"] .form-status { color: var(--ink); }
.waitlist[data-state="ok"] .form-status::before { content: "■ "; color: var(--signal); }
.waitlist[data-state="error"] .form-status { color: var(--signal); }
.form-note { max-width: 56ch; font-size: 14px; color: var(--ink-2); }

/* ---------- Footer ---------- */
.footer { overflow: hidden; }
.footer-top .cell { display: flex; flex-direction: column; gap: 10px; padding-top: 40px; padding-bottom: 40px; }
.footer-top .brand { padding: 0; }
.footer-top p, .footer-top address, .footer-top li { font-size: 14px; color: var(--ink-2); }
.footer-top ul { margin: 0; padding: 0; list-style: none; }
.footer-top li + li { margin-top: 4px; }
.footer-top .label + * { margin-top: -2px; }
.footer-top .label:not(:first-child) { margin-top: 14px; }

.footer-wordmark {
  margin: 0;
  padding: 0 var(--pad);
  font-size: clamp(48px, 19.6vw, 290px);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.065em;
  white-space: nowrap;
  user-select: none;
}

.footer-base { border-top: 1px solid var(--rule-ink); margin-top: clamp(16px, 2vw, 28px); }
.footer-base p { padding: 16px var(--pad); font: 400 12px/1.5 var(--mono); color: var(--ink-3); }
.footer-base p + p { text-align: right; }

/* ---------- Legal pages ---------- */
.toc { padding: 32px var(--pad); }
.toc ol {
  position: sticky;
  top: calc(var(--masthead-h) + 28px);
  margin: 0;
  padding: 0;
  list-style: none;
  font: 500 12px/1.45 var(--mono);
}
.toc li a { display: block; padding: 6px 0; color: var(--ink-2); text-decoration: none; }
.toc li a:hover { color: var(--ink); }

.prose { padding: 32px var(--pad) 72px; border-left: 1px solid var(--rule); }
.prose > :first-child { margin-top: 0; }
.prose h2 {
  margin: 52px 0 14px;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.prose h2 .n { margin-right: 10px; font: 500 12px/1 var(--mono); color: var(--signal); vertical-align: 2px; }
.prose h3 { margin: 28px 0 8px; font-size: 16px; font-weight: 650; }
.prose p, .prose li { font-size: 16.5px; line-height: 1.65; color: var(--ink-2); }
.prose p + p { margin-top: 14px; }
.prose ul { margin: 14px 0 0; padding-left: 1.2em; }
.prose ul + p { margin-top: 14px; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--ink-3); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose .caps { font-size: 14.5px; letter-spacing: 0.01em; text-transform: uppercase; }
.prose address { margin-top: 14px; font-size: 16.5px; line-height: 1.65; color: var(--ink-2); }

.legal-aside { padding: 32px var(--pad); display: flex; flex-direction: column; gap: 8px; }
.legal-aside > div { position: sticky; top: calc(var(--masthead-h) + 28px); display: flex; flex-direction: column; gap: 8px; }
.legal-aside p, .legal-aside address { font-size: 14px; color: var(--ink-2); }
.legal-aside .label:not(:first-child) { margin-top: 14px; }

/* ---------- 404 ---------- */
.notfound { padding: clamp(64px, 12vw, 180px) var(--pad); }
.notfound-code { font: 500 clamp(80px, 16vw, 220px)/0.85 var(--mono); letter-spacing: -0.06em; }
.notfound-code span { color: var(--signal); }
.notfound h1 { margin: 32px 0 0; font-size: clamp(28px, 3vw, 40px); font-weight: 600; letter-spacing: -0.03em; }
.notfound p { margin-top: 12px; max-width: 44ch; color: var(--ink-2); }
.notfound .btn { margin-top: 32px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .frame::before { background-size: calc(100% / 4) 100%; }

  .grid > [class*="c-"] { grid-column: 1 / -1; }

  .masthead .grid { grid-template-columns: auto 1fr; }
  .masthead .grid > .brand { grid-column: 1; }
  .masthead .grid > .masthead-nav { grid-column: 2; }
  .masthead-meta { display: none; }

  .bl,
  .hero-figure,
  .legal-aside { border-left: 0; border-top: 1px solid var(--rule); }

  .hero-figure .schematic { max-width: 320px; }

  .strip { grid-template-columns: 1fr 1fr; }
  .strip > div { grid-column: auto !important; }
  .strip > div + div { border-left: 0; }
  .strip > div:nth-child(even) { border-left: 1px solid var(--rule); }
  .strip > div:nth-child(n + 3) { border-top: 1px solid var(--rule); }

  .head-label { padding-bottom: 0; }
  .head-intro { border-left: 0; padding-top: 16px; }

  .row-title { padding-bottom: 10px; }
  .row-body { border-left: 0; padding-top: 0; padding-bottom: 12px; }
  .row-tag { border-left: 0; padding-top: 0; text-align: left; }

  .slot-spec, .slot-figure { border-left: 0; padding-top: 0; }

  .record dt { padding-bottom: 0; }
  .record dd { border-left: 0; padding-top: 4px; }

  .toc { display: none; }
  .prose { border-left: 0; }

  .footer-base p + p { text-align: left; padding-top: 0; }
}

@media (max-width: 640px) {
  :root { --masthead-h: 0px; }
  html { scroll-padding-top: 12px; }

  .masthead { position: static; }
  .masthead .grid { grid-template-columns: 1fr; }
  .masthead .grid > .brand,
  .masthead .grid > .masthead-nav { grid-column: 1 / -1; }
  .brand { min-height: 54px; }
  .masthead-nav {
    justify-content: flex-start;
    min-height: 42px;
    overflow-x: auto;
    border-top: 1px solid var(--rule);
    scrollbar-width: none;
  }
  .masthead-nav::-webkit-scrollbar { display: none; }

  .strip { grid-template-columns: 1fr 1fr; }

  .spec > div { grid-template-columns: 1fr; gap: 4px; }

  .field { flex-direction: column; }
  .field input { flex: none; width: 100%; height: 52px; }
  .field .btn { height: 50px; }

  .hero-actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .masthead, .toc, .hero-actions, .waitlist, .footer-wordmark { display: none; }
  .frame { border: 0; }
  .frame::before { display: none; }
}


/* ==========================================================================
   v2 — product presence & motion
   ========================================================================== */

/* ---------- Tinted section (deeper warm paper; darkness lives only inside device screens) ---------- */
.is-tint {
  --paper: #ECE9E1;
  background-color: var(--paper);
  background-image: linear-gradient(to right, rgba(20, 20, 19, 0.05) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
}

/* ---------- Scroll reveal (enabled by JS: html.js-reveal) ---------- */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Device mockups ---------- */
.device {
  position: relative;
  margin: 0 auto;
  border: 1px solid var(--ink);
  border-radius: 36px;
  background: #0E0E0D;
  box-shadow: 0 40px 80px -48px rgba(20, 20, 19, 0.55);
}
.device--phone { width: min(100%, 290px); aspect-ratio: 9 / 19.5; }
.device--wide { width: 100%; aspect-ratio: 19.5 / 9; border-radius: 32px; }

.device-screen {
  position: absolute;
  inset: 8px;
  overflow: hidden;
  border-radius: 28px;
  background: #161615;
  color: #F5F4EF;
  container-type: inline-size;
}
.device--wide .device-screen { border-radius: 24px; }

/* browser chrome */
.ui-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2cqw;
  padding: 11cqw 5cqw 3cqw;
  font-family: var(--mono);
  font-size: 3.2cqw;
  color: #8A8880;
  transition: opacity 0.4s ease;
}
.device--wide .ui-bar { padding: 2.2cqw 3cqw 1.2cqw; font-size: 1.25cqw; }
.ui-url {
  flex: 1;
  min-width: 0;
  padding: 1.6cqw 3cqw;
  border-radius: 99px;
  background: rgba(245, 244, 239, 0.07);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.device--wide .ui-url { flex: 0 1 34cqw; padding: 0.6cqw 1.4cqw; }
.ui-live { display: inline-flex; align-items: center; gap: 1.4cqw; color: #F5F4EF; white-space: nowrap; transition: opacity 0.3s ease; }
.ui-live::before { content: ""; width: 1.8cqw; height: 1.8cqw; background: var(--signal); animation: pulse 2.4s ease-in-out infinite; }
.device--wide .ui-live::before { width: 0.8cqw; height: 0.8cqw; }

/* on-air line */
.onair {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--signal);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  z-index: 3;
}

/* abstract film still (no third-party imagery) */
.film {
  position: absolute;
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 68% 92%, rgba(232, 120, 64, 0.9) 0%, rgba(216, 74, 39, 0.35) 38%, rgba(216, 74, 39, 0) 70%),
    linear-gradient(180deg, #17252B 0%, #2E3D40 42%, #9C6A4B 74%, #2A1A14 100%);
  transition: top 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), left 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
              width 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), height 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
              border-radius 0.7s ease;
}
.film i { position: absolute; display: block; }
.film .sun { left: 60%; top: 52%; width: 16%; aspect-ratio: 1; border-radius: 50%; background: #F2B27A; opacity: 0.9; }
.film .ridge-a { left: -5%; right: -5%; bottom: 0; height: 46%; background: #22201E; clip-path: polygon(0 62%, 14% 38%, 27% 55%, 41% 22%, 55% 48%, 68% 30%, 82% 52%, 100% 34%, 100% 100%, 0 100%); }
.film .ridge-b { left: -5%; right: -5%; bottom: 0; height: 28%; background: #121110; clip-path: polygon(0 40%, 18% 70%, 35% 35%, 52% 64%, 70% 42%, 86% 66%, 100% 50%, 100% 100%, 0 100%); }
.film::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.film .scrub { left: 0; right: 0; bottom: 0; height: 3px; background: rgba(245, 244, 239, 0.25); }
.film .scrub::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 36%; background: #F5F4EF; }

/* page skeleton */
.ui-page { position: absolute; display: flex; flex-direction: column; gap: 2.4cqw; transition: opacity 0.4s ease; }
.ui-page b { display: block; height: 2.2cqw; border-radius: 1px; background: rgba(245, 244, 239, 0.12); }
.ui-page b:nth-child(1) { width: 78%; height: 3cqw; background: rgba(245, 244, 239, 0.3); }
.ui-page b:nth-child(2) { width: 46%; }
.ui-page b:nth-child(3) { width: 92%; margin-top: 2cqw; }
.ui-page b:nth-child(4) { width: 84%; }
.ui-page b:nth-child(5) { width: 64%; }
.device--wide .ui-page { gap: 1.1cqw; }
.device--wide .ui-page b { height: 0.9cqw; }
.device--wide .ui-page b:nth-child(1) { height: 1.4cqw; }

/* phone geometry */
.device--phone .film { left: 0; right: 0; top: 22cqw; width: 100%; aspect-ratio: 16 / 9; }
.device--phone .ui-page { left: 5cqw; right: 5cqw; top: 84cqw; }
.device--phone .cap-stack { left: 5cqw; right: 5cqw; top: 114cqw; justify-content: flex-start; }
.device--phone .ui-home { position: absolute; left: 35%; right: 35%; bottom: 3cqw; height: 1.2cqw; border-radius: 9px; background: rgba(245, 244, 239, 0.5); }

/* wide geometry (scene states driven by data-scene) */
.device--wide .film { left: 3cqw; top: 6.5cqw; width: 52cqw; height: 29.25cqw; border-radius: 0.6cqw; }
.device--wide .ui-page { left: 59cqw; right: 3cqw; top: 7cqw; }
.device--wide .cap-stack { left: 3cqw; width: 52cqw; top: 37.5cqw; }
.ui-start {
  position: absolute;
  right: 4cqw;
  bottom: 4cqw;
  display: inline-flex;
  align-items: center;
  gap: 0.8cqw;
  padding: 1cqw 1.8cqw;
  border-radius: 99px;
  background: var(--signal);
  color: #F5F4EF;
  font: 600 1.3cqw/1 var(--sans);
  transition: opacity 0.35s ease, transform 0.35s ease;
  animation: nudge 2.2s ease-in-out infinite;
}
@keyframes nudge { 50% { transform: scale(1.06); } }

.device--wide[data-scene="1"] .onair { transform: scaleX(0); }
.device--wide[data-scene="1"] .ui-live,
.device--wide[data-scene="1"] .cap-stack { opacity: 0; }
.device--wide:not([data-scene="1"]) .ui-start { opacity: 0; transform: scale(0.8); animation: none; }

.device--wide[data-scene="3"] .film { left: 0; top: 0; width: 100cqw; height: 46.15cqw; border-radius: 0; }
.device--wide[data-scene="3"] .ui-bar,
.device--wide[data-scene="3"] .ui-page { opacity: 0; }
.device--wide[data-scene="3"] .cap-stack { left: 14cqw; width: 72cqw; top: auto; bottom: 4.5cqw; text-align: center; }
.device--wide[data-scene="3"] .cap-tgt { font-size: 3cqw; }
.device--wide[data-scene="3"] .cap-src { font-size: 1.8cqw; }

/* ---------- Live captions ---------- */
.cap-stack {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2.4cqw;
  transition: opacity 0.4s ease, left 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), top 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
              bottom 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), width 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.device--wide .cap-stack { gap: 1cqw; }
.cap-pair { animation: pair-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; transition: opacity 0.4s ease; }
.cap-pair.is-past { opacity: 0.38; }
@keyframes pair-in { from { opacity: 0; transform: translateY(8px); } }
.cap-src, .cap-tgt { margin: 0; color: #F5F4EF; }
.cap-src { font: 500 3.5cqw/1.35 var(--sans); color: #C9C7BF; }
.cap-tgt { margin-top: 0.6cqw; font: 650 5.4cqw/1.25 var(--sans); letter-spacing: -0.01em; }
.device--wide .cap-src { font-size: 1.5cqw; }
.device--wide .cap-tgt { font-size: 2.3cqw; margin-top: 0.3cqw; }
.cap-src .tok { opacity: 0.4; transition: opacity 0.35s ease; }
.cap-src .tok.is-final { opacity: 1; }
.cap-tgt .tok { animation: tok-in 0.3s ease both; }
@keyframes tok-in { from { opacity: 0; } }

/* caption styles */
.cap-stack[data-style="cinema"] .cap-src,
.cap-stack[data-style="cinema"] .cap-tgt {
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 1px 0 #000, 0 -1px 0 #000, 0 2px 6px rgba(0, 0, 0, 0.6);
}
.cap-stack[data-style="broadcast"] .cap-pair {
  padding: 1.6cqw 2.4cqw;
  border-radius: 1.4cqw;
  background: rgba(14, 14, 13, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.device--wide .cap-stack[data-style="broadcast"] .cap-pair { padding: 0.8cqw 1.4cqw; border-radius: 0.8cqw; }
.cap-stack[data-style="minimal"] .cap-src { display: none; }

/* ---------- Hero (v2) ---------- */
.hero-figure .device { margin-block: auto; }

/* ---------- Product band ---------- */
.band-stage { padding: 0; }
.band-sticky { position: sticky; top: calc(var(--masthead-h) + 48px); padding: clamp(32px, 4vw, 56px) var(--pad); }
.band-sticky .label { margin-top: 18px; }
.band-scenes { position: relative; border-left: 1px solid var(--rule); }
.band-scenes::before {
  content: "";
  position: absolute;
  left: -1px; top: 0; bottom: 0;
  width: 2px;
  background: var(--signal);
  transform-origin: top;
  transform: scaleY(0);
}
@supports (animation-timeline: view()) {
  .band-scenes::before { animation: rail linear both; animation-timeline: view(); animation-range: contain; }
}
@keyframes rail { to { transform: scaleY(1); } }

.scene {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-height: 72vh;
  padding: var(--pad) var(--pad) var(--pad) clamp(24px, 3vw, 48px);
  opacity: 0.32;
  transition: opacity 0.5s ease;
}
.scene + .scene { border-top: 1px solid var(--rule); }
.scene.is-active { opacity: 1; }
.scene .n { font: 500 12px/1 var(--mono); letter-spacing: 0.06em; color: var(--signal); }
.scene h3 { margin: 0; font-size: clamp(26px, 2.6vw, 38px); font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; }
.scene h3 em { font-family: var(--serif); font-weight: 400; font-style: italic; }
.scene p { max-width: 40ch; color: var(--ink-2); }

.band-foot { border-top: 1px solid var(--rule); }
.band-foot .cell { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.band-foot p { color: var(--ink-2); font-size: 15px; max-width: 60ch; }

/* ---------- Language marquee ---------- */
.marquee { overflow: hidden; border-bottom: 1px solid var(--rule-ink); padding: clamp(18px, 2.4vw, 30px) 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  padding: 0 0.5em;
  font: italic 400 clamp(30px, 4.2vw, 60px)/1.1 var(--serif);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.marquee-track span::after { content: "·"; margin-left: 0.5em; color: var(--signal); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Product page ---------- */
.p-hero { padding: clamp(48px, 7vw, 104px) var(--pad) clamp(32px, 4vw, 56px); }
.p-hero h1 { margin: 20px 0 0; font-size: clamp(64px, 11vw, 168px); font-weight: 700; line-height: 0.9; letter-spacing: -0.06em; }
.p-hero .tagline { margin-top: 18px; max-width: 22ch; font: italic 400 clamp(26px, 2.8vw, 40px)/1.15 var(--serif); letter-spacing: -0.01em; }
.p-hero .lede { color: var(--ink-2); }
.p-hero-meta { padding: clamp(48px, 7vw, 104px) var(--pad) var(--pad); display: flex; flex-direction: column; justify-content: flex-end; gap: 0; border-left: 1px solid var(--rule); }
.p-stage { padding: 0 var(--pad) clamp(40px, 5vw, 72px); }
.p-stage .label { margin-top: 16px; text-align: center; }

/* pipeline diagram */
.pipeline { padding: clamp(32px, 4vw, 56px) var(--pad); border-bottom: 1px solid var(--rule); }
.pipeline svg { width: 100%; height: auto; color: var(--ink); }
.pipeline svg text { font-size: 13px; letter-spacing: 0.04em; }
.pipeline svg .t-strong { font-family: var(--sans); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.pipeline svg .t-mute { fill: var(--ink-3); }
.flow { fill: none; stroke: var(--signal); stroke-width: 1.5; stroke-dasharray: 5 7; animation: flow 1.1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }
.node { fill: var(--paper); stroke: currentColor; stroke-width: 1; }
.node-ghost { fill: none; stroke: currentColor; stroke-opacity: 0.35; stroke-dasharray: 4 5; }

/* platform columns */
.platform { padding: 32px var(--pad) 40px; display: flex; flex-direction: column; gap: 16px; }
.platform h3 { margin: 0; font-size: clamp(24px, 2.2vw, 30px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.platform h3 em { display: block; font: italic 400 0.8em/1.3 var(--serif); color: var(--ink-2); letter-spacing: -0.01em; }
.platform > p { max-width: 52ch; color: var(--ink-2); }
.ticks { margin: 4px 0 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding: 11px 0 11px 22px; border-top: 1px solid var(--rule); font-size: 15px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 19px; width: 8px; height: 8px; background: var(--signal); }

/* caption style picker */
.picker { margin: 0; padding: 32px var(--pad); border: 0; display: flex; flex-direction: column; gap: 0; }
.picker legend { padding: 0; margin-bottom: 16px; }
.picker label {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 4px 14px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  cursor: pointer;
}
.picker label:last-of-type { border-bottom: 1px solid var(--rule); }
.picker input { position: absolute; opacity: 0; pointer-events: none; }
.picker .box { grid-row: span 2; width: 12px; height: 12px; margin-top: 6px; border: 1px solid var(--ink); }
.picker input:checked + .box { background: var(--signal); border-color: var(--signal); }
.picker input:focus-visible + .box { outline: 2px solid var(--signal); outline-offset: 3px; }
.picker strong { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.picker small { grid-column: 2; color: var(--ink-2); font-size: 14px; }
.picker-stage { padding: 32px var(--pad); border-left: 1px solid var(--rule); display: flex; align-items: center; }

/* FAQ */
.faq details { border-top: 1px solid var(--rule); }
.faq details:first-child { border-top: 0; }
.faq summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 22px var(--pad);
  list-style: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 22px/1 var(--mono); color: var(--signal); transition: transform 0.3s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 var(--pad) 24px; max-width: 70ch; color: var(--ink-2); }

/* cross-document page transitions (progressive) */
@view-transition { navigation: auto; }
.masthead .brand { view-transition-name: brand; }

/* ---------- v2 responsive ---------- */
@media (max-width: 960px) {
  .is-tint { background-size: calc(100% / 4) 100%; }

  .band-stage {
    position: sticky;
    top: 0;
    z-index: 4;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }
  .band-sticky { position: static; padding: 16px var(--pad); }
  .band-sticky .label { display: none; }
  .band-scenes { border-left: 0; }
  .band-scenes::before { display: none; }
  .scene { min-height: 56vh; padding-left: var(--pad); }

  .p-hero-meta, .picker-stage { border-left: 0; border-top: 1px solid var(--rule); }
  .p-hero-meta { padding-top: var(--pad); }
  .wl-label { display: none; }
  .wl-label + .bl { border-top: 0; }
}

@media (max-width: 640px) {
  .pipeline svg { display: none; }
  .pipeline { padding: 0; border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal [data-reveal] { opacity: 1; transform: none; }
  .scene { opacity: 1; }
}

.p-stage .device { max-width: 1040px; }

@media (max-width: 640px) {
  .device--wide .cap-pair.is-past { display: none; }
  .device--wide .cap-src,
  .device--wide[data-scene="3"] .cap-src { font-size: 2.6cqw; }
  .device--wide .cap-tgt,
  .device--wide[data-scene="3"] .cap-tgt { font-size: 4.2cqw; }
  .device--wide[data-scene="3"] .cap-stack { left: 6cqw; width: 88cqw; }
  .device--phone { width: min(100%, 236px); }
}
