/* OS84 website
   Design system: ui-ux-pro-max "Dark Mode (OLED)" style with the
   "Interactive 3D Configurator" landing pattern. One typeface (the system UI
   font), a fixed type scale (--fs-*) and a 4px spacing grid. Colors are taken
   from the OS84 screen itself so the site and the calculator match. */

:root {
  color-scheme: dark;

  /* surfaces (OS84 background is #031119) */
  --bg: #031119;
  --surface: #0a1b26;
  --surface-2: #112634;
  --border: #22384a;
  --border-strong: #35506a;

  /* text */
  --text: #f1f5f9;
  --text-muted: #a3b4c6;   /* 9.0:1 on --bg, 8.3:1 on --surface */
  --text-faint: #7f93a8;   /* 6.0:1 on --bg, 5.5:1 on --surface; small print only */

  /* brand (OS84 accent blue) and the buy action (OS84 green) */
  --brand: #48c3ff;
  --brand-strong: #7fd5ff;
  --on-brand: #031119;
  --cta: #40ca7a;
  --cta-hover: #5bd98f;
  --on-cta: #031119;
  --warn: #ffc339;

  /* app tile colors from the OS84 home screen */
  --app-blue: #408bff;
  --app-yellow: #ffc339;
  --app-green: #40ca7a;
  --app-orange: #ff8b39;
  --app-purple: #9769f6;
  --app-pink: #f6597a;
  --app-slate: #697a97;
  --app-teal: #29bbce;

  /* one typeface: the device's own UI font (SF on Apple, Segoe on Windows, Roboto on Android).
     Mono is only for calculator keys and code. */
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font-body);
  --font-display: var(--font-body);
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --grad: linear-gradient(100deg, #48c3ff 0%, #9769f6 55%, #f6597a 100%);

  /* type scale (rem): 12 14 16 18 20 24 32 40 48 64 88px */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  --radius: 10px;
  --radius-lg: 16px;
  --max: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5.5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 600; }
p { margin: 0 0 var(--space-4); text-wrap: pretty; }

code, kbd, .mono { font-family: var(--font-mono); font-size: .875em; font-variant-ligatures: none; }
pre {
  margin: 0 0 var(--space-4); padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); overflow-x: auto; color: var(--text);
}
pre code { font-size: .875rem; }
kbd {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font-size: .875em;
  white-space: nowrap;
}

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

.skip {
  position: absolute; left: var(--space-4); top: -60px; z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--brand); color: var(--on-brand);
  font-weight: 600; border-radius: 6px; text-decoration: none;
}
.skip:focus { top: var(--space-3); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--space-5); }
@media (max-width: 480px) { .wrap { padding: 0 var(--space-4); } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(3, 17, 25, .72);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.site-header .wrap {
  display: flex; align-items: center; gap: var(--space-5);
  min-height: 56px;
}
.logo { display: inline-flex; align-items: center; padding: var(--space-2) 0; }
.logo img { width: 80px; }
.nav a { font-size: .875rem; }
.header-buy { border-radius: 999px; min-height: 36px; padding: 0 20px; box-shadow: none; font-size: .875rem; }
.header-buy:active { box-shadow: none; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-1); }
.nav a {
  display: block; padding: 12px 12px; border-radius: 8px;
  color: var(--text-muted); text-decoration: none; font-weight: 500;
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--brand); }
.menu-btn { display: none; }

@media (max-width: 860px) {
  .site-header .wrap { gap: var(--space-3); }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
    margin-left: auto; min-width: 44px; min-height: 44px; padding: 0 var(--space-3);
    background: var(--surface-2); color: var(--text);
    border: 1px solid var(--border-strong); border-radius: 8px;
    font: 500 1rem var(--font-body); cursor: pointer;
  }
  .nav { position: absolute; left: 0; right: 0; top: 100%; margin: 0;
         background: var(--bg); border-bottom: 1px solid var(--border); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: var(--space-3) var(--space-4) var(--space-4); }
  .nav a { padding: 12px; }
  .menu-btn svg { width: 20px; height: 20px; }
}
@media (max-width: 360px) { .menu-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 0 var(--space-5);
  border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-buy { background: var(--cta); color: var(--on-cta); box-shadow: 0 4px 0 #23854d; }
.btn-buy:hover { background: var(--cta-hover); color: var(--on-cta); }
.btn-buy:active { box-shadow: 0 2px 0 #23854d; transform: translateY(2px); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--brand); color: var(--text); background: var(--surface-2); }
.btn-sm { min-height: 44px; padding: 0 var(--space-4); font-size: 1rem; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- sections ---------- */
section { padding: var(--space-9) 0; }
section + section { border-top: 1px solid var(--border); }
@media (max-width: 720px) { section { padding: var(--space-8) 0; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  margin-bottom: var(--space-4);
  font: 600 .75rem var(--font-head); letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before { content: ""; width: 10px; height: 10px; background: currentColor; border-radius: 2px; }
.lede { font-size: 1.125rem; color: var(--text-muted); max-width: 62ch; }
.section-head { max-width: 680px; margin-bottom: var(--space-7); }
.section-head p { color: var(--text-muted); }
.muted { color: var(--text-muted); }
.small { font-size: .875rem; }

/* ---------- hero ---------- */
.hero { padding: var(--space-8) 0 var(--space-9); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.02fr 1fr; gap: var(--space-8); align-items: center; }
.hero h1 { margin-bottom: var(--space-5); }
.hero h1 .accent { color: var(--brand); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-6) 0 var(--space-5); }
.hero-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); color: var(--text-muted); font-size: 1rem; }
.hero-notes li { display: flex; gap: var(--space-2); align-items: flex-start; }
.hero-notes svg { width: 18px; height: 18px; margin-top: 4px; flex: none; color: var(--cta); }
@media (max-width: 920px) {
  .hero .wrap { grid-template-columns: 1fr; gap: var(--space-7); }
}

/* calculator screen frame: a generic bezel, no manufacturer branding */
.device {
  position: relative;
  padding: 20px 20px 24px;
  background: linear-gradient(180deg, #1c2733, #121a23);
  border-radius: 22px;
  box-shadow: 0 0 0 1px #2c3b4b, 0 30px 80px -20px rgba(72, 195, 255, .28), 0 18px 40px rgba(0, 0, 0, .55);
}
.device::after {
  content: ""; display: block; height: 6px; width: 34%; margin: 16px auto 0;
  border-radius: 6px; background: #273544;
}
.device .screen {
  border-radius: 6px; overflow: hidden; background: var(--bg);
  box-shadow: inset 0 0 0 2px #05090d;
  aspect-ratio: 4 / 3;
}
.device .screen img { width: 100%; height: 100%; object-fit: cover; }
.device-caption { margin-top: var(--space-3); text-align: center; color: var(--text-faint); font-size: .875rem; }

/* ---------- cards & grids ---------- */
.grid { display: grid; gap: var(--space-4); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.card h3 { margin-bottom: var(--space-2); }
.card p { color: var(--text-muted); margin: 0; }

.app-card { display: flex; flex-direction: column; gap: var(--space-3); }
.app-card img { width: 48px; height: 48px; flex: none; }
@media (max-width: 600px) { .app-card { flex-direction: row; align-items: flex-start; gap: var(--space-4); } }

.tag {
  display: inline-block; padding: 2px 8px; margin-bottom: var(--space-3);
  border-radius: 999px; border: 1px solid var(--border-strong);
  font: 500 .75rem var(--font-head); color: var(--text-muted);
}
.tag-game { border-color: #7a3a4c; color: #ff9db3; }
.tag-study { border-color: #29586e; color: var(--brand-strong); }
.tag-opt { border-color: #6b5a24; color: var(--warn); }

/* add-on cards with a little colored "chip" like the OS84 tiles */
.addon { position: relative; padding-top: var(--space-6); }
.addon::before {
  content: ""; position: absolute; top: var(--space-5); left: var(--space-5);
  width: 28px; height: 6px; border-radius: 3px; background: var(--chip, var(--brand));
}
.addon h3 { font-family: var(--font-head); margin-top: var(--space-3); }

/* ---------- screenshot tabs ---------- */
.shots { display: grid; grid-template-columns: 260px 1fr; gap: var(--space-6); align-items: start; }
.shot-tabs { display: grid; gap: var(--space-2); }
.shot-tab {
  display: flex; align-items: center; gap: var(--space-3);
  width: 100%; min-height: 52px; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text-muted);
  font: 500 1rem var(--font-body); text-align: left; cursor: pointer;
  transition: border-color .15s var(--ease), background-color .15s var(--ease), color .15s var(--ease);
}
.shot-tab:hover { color: var(--text); border-color: var(--border-strong); }
.shot-tab[aria-selected="true"] { color: var(--text); background: var(--surface-2); border-color: var(--brand); }
.shot-tab img { width: 28px; height: 28px; }
.shot-tab span { display: block; }
.shot-tab small { display: block; color: var(--text-faint); font-size: .875rem; }
.shot-panel figure { margin: 0; }
.shot-panel figcaption { margin-top: var(--space-4); color: var(--text-muted); }
@media (max-width: 860px) {
  .shots { grid-template-columns: 1fr; }
  .shot-tabs { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .shot-tab small { display: none; }
}

/* ---------- steps ---------- */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.steps > li {
  counter-increment: step; position: relative;
  padding: var(--space-5) var(--space-5) var(--space-5) 76px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.steps > li::before {
  content: counter(step);
  position: absolute; left: var(--space-5); top: var(--space-5);
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 8px; background: var(--brand); color: var(--on-brand);
  font: 700 1rem var(--font-head);
}
.steps h3 { margin-bottom: var(--space-2); }
.steps p:last-child, .steps ul:last-child { margin-bottom: 0; }
.steps p, .steps li li { color: var(--text-muted); }
@media (max-width: 480px) { .steps > li { padding-left: var(--space-5); padding-top: 72px; } }

/* ---------- pricing ---------- */
.price-card {
  display: grid; grid-template-columns: 1fr auto; gap: var(--space-7); align-items: center;
  padding: var(--space-7);
  background: linear-gradient(135deg, #0d2433, #0a1b26 55%);
  border: 1px solid var(--border-strong); border-radius: 20px;
}
.price { font: 700 4rem/1 var(--font-head); color: var(--text); }
.price small { font-size: 1rem; font-weight: 500; color: var(--text-muted); margin-left: var(--space-2); }
.checks { list-style: none; margin: var(--space-5) 0 0; padding: 0; display: grid; gap: var(--space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.checks li { display: flex; gap: var(--space-2); color: var(--text-muted); }
.checks svg { width: 20px; height: 20px; margin-top: 4px; flex: none; color: var(--cta); }
.price-buy { text-align: center; }
.price-buy .btn { min-width: 220px; min-height: 56px; font-size: 1.125rem; }
.price-buy p { margin: var(--space-3) 0 0; color: var(--text-faint); font-size: .875rem; }
@media (max-width: 860px) {
  .price-card { grid-template-columns: 1fr; padding: var(--space-6); gap: var(--space-6); }
  .checks { grid-template-columns: 1fr; }
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: var(--space-3); max-width: 820px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  min-height: 56px; padding: var(--space-3) var(--space-5);
  font-weight: 600; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font: 600 1.25rem var(--font-head); color: var(--brand);
  transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 var(--space-5) var(--space-4); color: var(--text-muted); }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- callouts / tables ---------- */
.note {
  display: flex; gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border-strong); border-left: 4px solid var(--brand);
  border-radius: var(--radius); background: var(--surface);
}
.note.warn { border-left-color: var(--warn); }
.note svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--brand); }
.note.warn svg { color: var(--warn); }
.note p:last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { font: 600 .875rem var(--font-head); color: var(--text-muted); background: var(--surface-2); letter-spacing: .02em; }
tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; }

.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: currentColor; }
.status.ok { color: var(--cta); }
.status.likely { color: var(--brand); }
.status.no { color: #ff8a8a; }

/* ---------- page header (inner pages) ---------- */
.page-head {
  position: relative; overflow: hidden;
  padding: var(--space-9) 0 var(--space-8); border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.page-head h1 { font-size: clamp(2.5rem, 6vw, 4rem); letter-spacing: -0.04em; line-height: 1.03; }
.card { border-radius: 22px; }
.page-head p { max-width: 64ch; }
.prose { max-width: 760px; }
.prose h2 { margin-top: var(--space-8); }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; color: var(--text-muted); }
.prose li { margin-bottom: var(--space-2); }
.prose li::marker { color: var(--brand); }

.two-col { display: grid; grid-template-columns: 240px 1fr; gap: var(--space-8); align-items: start; }
.toc { position: sticky; top: 96px; }
.toc p { font: 600 .75rem var(--font-head); color: var(--text-faint); letter-spacing: .08em; text-transform: uppercase; margin-bottom: var(--space-3); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text-muted); text-decoration: none; border-left: 2px solid var(--border); }
.toc a:hover { color: var(--text); background: var(--surface); border-left-color: var(--brand); }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; gap: var(--space-6); } .toc { position: static; } }

.keys { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-5); margin: 0; }
.keys dt { white-space: nowrap; }
.keys dd { margin: 0; color: var(--text-muted); }
@media (max-width: 520px) { .keys { grid-template-columns: 1fr; } .keys dd { margin-bottom: var(--space-3); } }

.app-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--space-7); align-items: center; padding: var(--space-7) 0; border-top: 1px solid var(--border); }
.app-row:first-of-type { border-top: 0; padding-top: 0; }
.app-row .shot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-strong); background: var(--bg); }
.app-row .shot img { width: 100%; }
.app-row ul { color: var(--text-muted); padding-left: 1.2em; margin: 0; }
.app-row li::marker { color: var(--brand); }
@media (max-width: 860px) { .app-row { grid-template-columns: 1fr; gap: var(--space-5); } }

/* ---------- final CTA ---------- */
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: var(--space-3); }
.cta-band p { color: var(--text-muted); margin-bottom: var(--space-6); }
.cta-band .hero-ctas { justify-content: center; margin: 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: var(--space-7) 0 var(--space-6); color: var(--text-faint); font-size: .875rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(2, 1fr); gap: var(--space-6); }
.footer-grid h2 { font-size: .875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--space-3); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.footer-grid a { color: var(--text-muted); text-decoration: none; display: inline-block; padding: 4px 0; }
.footer-grid a:hover { color: var(--text); text-decoration: underline; }
.footer-legal { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--border); }
.footer-legal p { margin-bottom: var(--space-2); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* =====================================================================
   Home page showcase: rendered calculator, scroll story, highlights,
   closer look, wall of screens
   ===================================================================== */


.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.display-1 { font-size: clamp(2.5rem, 7vw, 5.5rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.02; }
.display-2 { font-size: clamp(2rem, 5vw, 4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; }
.kicker { font: 600 1rem var(--font-display); color: var(--text-muted); margin-bottom: var(--space-3); letter-spacing: 0; }

/* soft colored glow behind the model areas */
.glow { position: relative; isolation: isolate; }
.glow::before { content: none; }

/* the calculator: frames rendered in Blender (tools/render), drawn on a
   canvas while you scroll, with the real screenshots laid on its screen */
.calc-stage {
  position: relative; aspect-ratio: 1100 / 1375; width: 100%;
  transform: scale(var(--zoom, 1)); transform-origin: 50% var(--scy, 30%);
  transition: transform .9s var(--ease);
  -webkit-mask-image: linear-gradient(#000 80%, transparent 99%); mask-image: linear-gradient(#000 80%, transparent 99%);
}
.calc-still, .calc-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.has-seq .calc-stage:not(.is-static) .calc-still { visibility: hidden; }
.calc-screen {
  position: absolute; left: var(--sx); top: var(--sy); width: var(--sw); height: var(--sh);
  overflow: hidden; opacity: 0; transition: opacity .3s var(--ease);
  background: #000;
}
.calc-stage.screen-live .calc-screen, .calc-stage.is-static .calc-screen { opacity: 1; }
.calc-screen img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  image-rendering: pixelated; opacity: 0; transition: opacity .3s var(--ease);
}
.calc-screen img.on { opacity: 1; }
.calc-screen::after { /* faint glass reflection, like the render */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(165deg, rgba(255, 255, 255, .06), transparent 45%);
}
html:not(.want-seq) .story-model { display: none; }

/* ---------- scroll story ---------- */
.story { position: relative; border: 0; padding: 0; }
.story-stage { padding: var(--space-8) 0; }
.story-stage .wrap { display: grid; gap: var(--space-7); }
.story-model { min-height: 320px; display: grid; place-items: center; }
.chapter { padding: var(--space-6) 0; }
.chapter .display-1, .chapter .display-2 { margin-bottom: var(--space-4); }
.chapter p { font-size: clamp(1rem, 1.6vw, 1.25rem); color: var(--text-muted); max-width: 34ch; }
.chapter-shot { margin-top: var(--space-5); max-width: 460px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-strong); }
.chapter .hero-ctas { margin: var(--space-6) 0 var(--space-4); }
.price-pill {
  display: inline-flex; align-items: center; gap: var(--space-3);
  padding: 8px 8px 8px 20px; border-radius: 999px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  font-weight: 600;
}
.price-pill .btn { min-height: 40px; padding: 0 20px; box-shadow: none; }
.scroll-hint { display: none; }

/* with 3D: a pinned stage, chapters swap in place while you scroll */
.want-seq .story { height: 560vh; }
.want-seq .story-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; padding: 56px 0 0;
  display: flex; align-items: center;
}
.want-seq .story-stage .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; height: 100%; }
.want-seq .story-copy { display: grid; }
.want-seq .story-copy > .chapter { grid-area: 1 / 1; opacity: 0; transform: translateY(24px); transition: opacity .5s var(--ease), transform .6s var(--ease); pointer-events: none; }
.want-seq .story-copy > .chapter.is-active { opacity: 1; transform: none; pointer-events: auto; }
.want-seq .chapter-shot { display: none; }
.want-seq .story-model { display: grid; place-items: center; }
.want-seq .story-model .calc-stage { width: min(100%, calc(min(82vh, 780px) * .8)); }
.closer-model .calc-stage { width: min(100%, 448px); }
.want-seq .scroll-hint {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  font: 500 .75rem var(--font-head); color: var(--text-faint); letter-spacing: .08em; text-transform: uppercase;
}
.want-seq .scroll-hint::after { content: ""; width: 2px; height: 26px; border-radius: 2px; background: linear-gradient(var(--text-faint), transparent); animation: hint 1.8s var(--ease) infinite; }
.want-seq .scroll-hint { transition: opacity .3s var(--ease); }
.want-seq .story.past-start .scroll-hint { opacity: 0; }
@keyframes hint { 0% { transform: translateY(-6px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }
.story-progress { display: none; }
.want-seq .story-progress {
  display: flex; flex-direction: column; gap: 12px;
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
}
.story-progress span { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .25); transition: height .3s var(--ease), background-color .3s; }
.story-progress span.on { height: 22px; background: var(--brand); }

@media (max-width: 860px) {
  .want-seq .story-stage { align-items: stretch; }
  .want-seq .story-stage .wrap { grid-template-columns: 1fr; grid-template-rows: 50% auto; gap: 0; align-content: start; }
  .want-seq .story-model { height: 100%; min-height: 0; order: -1; }
  .want-seq .story-model .calc-stage { width: min(100%, calc(50svh * .8)); }
  .want-seq .story-copy { align-self: start; }
  .want-seq .chapter { padding: var(--space-3) 0 0; }
  .want-seq .chapter p { font-size: 1rem; }
  .want-seq .chapter .hero-ctas { margin: var(--space-4) 0 var(--space-3); }
  .want-seq .scroll-hint, .want-seq .story-progress { display: none; }
  .display-1 { font-size: clamp(2rem, 10vw, 3rem); }
}

/* ---------- highlights: horizontal cards ---------- */
.highlights .head-row { display: flex; align-items: end; justify-content: space-between; gap: var(--space-5); margin-bottom: var(--space-6); }
.highlights h2 { margin: 0; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 640px);
  gap: var(--space-5); overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px max(var(--space-5), calc((100vw - var(--max)) / 2 + var(--space-5))) var(--space-5);
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.hl-card {
  scroll-snap-align: center; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 520px; padding: var(--space-6);
  border-radius: 28px; background: var(--surface); border: 1px solid rgba(255, 255, 255, .07);
}
.hl-card h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -0.02em; max-width: 20ch; }
.hl-card p { color: var(--text-muted); max-width: 40ch; margin: 0; }
.hl-card .shot { margin-top: var(--space-5); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08); transform: perspective(900px) rotateX(6deg); transform-origin: bottom; }
.hl-card .shot img { width: 100%; }
.hl-card[data-tint="blue"]   { background: linear-gradient(160deg, #0f2a3c, #0a1b26 60%); }
.hl-card[data-tint="sky"]    { background: linear-gradient(160deg, #18335a, #0a1b26 60%); }
.hl-card[data-tint="snow"]   { background: linear-gradient(160deg, #24344a, #0a1b26 60%); }
.hl-card[data-tint="green"]  { background: linear-gradient(160deg, #11331f, #0a1b26 60%); }
.hl-card[data-tint="purple"] { background: linear-gradient(160deg, #241a44, #0a1b26 60%); }
.hl-card[data-tint="pink"]   { background: linear-gradient(160deg, #3a1726, #0a1b26 60%); }
.rail-controls { display: flex; gap: var(--space-2); }
.round-btn {
  width: 44px; height: 44px; display: grid; place-items: center; flex: none;
  border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .1); color: var(--text);
  transition: background-color .15s var(--ease), opacity .15s;
}
.round-btn:hover { background: rgba(255, 255, 255, .18); }
.round-btn[disabled] { opacity: .35; cursor: default; }
.round-btn svg { width: 20px; height: 20px; }
@media (max-width: 600px) { .hl-card { min-height: 440px; padding: var(--space-5); border-radius: 22px; } }

/* ---------- closer look ---------- */
.closer-panel {
  position: relative; display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: var(--space-6);
  align-items: center; min-height: 640px; padding: var(--space-7);
  border-radius: 32px; background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .07);
}
.look-list { display: grid; gap: var(--space-3); justify-items: start; }
.look-btn {
  display: inline-flex; align-items: center; gap: var(--space-3);
  min-height: 48px; padding: 0 20px 0 12px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .08); color: var(--text); font: 600 1rem var(--font-display); text-align: left;
  transition: background-color .18s var(--ease);
}
.look-btn:hover { background: rgba(255, 255, 255, .14); }
.look-btn .plus { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid currentColor; flex: none; transition: transform .25s var(--ease); }
.look-btn .plus svg { width: 14px; height: 14px; }
.look-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.look-btn[aria-pressed="true"] .plus { transform: rotate(45deg); }
.look-caption { min-height: 6.5em; margin-top: var(--space-4); padding: var(--space-4) var(--space-5); border-radius: 18px; background: rgba(255, 255, 255, .05); color: var(--text-muted); }
.look-caption strong { color: var(--text); display: block; margin-bottom: 4px; }
.closer-model { display: grid; place-items: center; }
@media (max-width: 860px) {
  .closer-panel { grid-template-columns: 1fr; padding: var(--space-5); min-height: 0; border-radius: 24px; }
  .closer-panel { grid-template-columns: minmax(0, 1fr); }
  .closer-model { order: -2; }
  .closer-model .calc-stage { width: min(100%, 320px); }
  .look-list { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-items: stretch; }
  .look-btn { font-size: .875rem; }
}

/* ---------- wall of screens (like a wall of calculators) ---------- */
.wall-section { position: relative; overflow: hidden; padding: 160px 0; text-align: center; border-top: 0; }
.wall { position: absolute; inset: -20% -10%; z-index: 0; perspective: 1400px; pointer-events: none; }
.wall-grid {
  display: grid; grid-template-columns: repeat(7, 220px); gap: 20px;
  transform: rotateX(32deg) rotateZ(-14deg) translate3d(-140px, -60px, 0);
  transform-origin: 50% 50%; opacity: .5;
  animation: wall-drift 60s linear infinite;
}
.wall-grid img { width: 220px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
@keyframes wall-drift { from { translate: 0 0; } to { translate: 0 -549px; } }
.wall-section::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(62% 58% at 50% 50%, rgba(3, 17, 25, .97), rgba(3, 17, 25, .75) 55%, rgba(3, 17, 25, .35) 80%, var(--bg) 100%),
              linear-gradient(var(--bg), transparent 18%, transparent 82%, var(--bg));
}
.wall-section .wrap { position: relative; z-index: 2; }
.wall-section p { color: var(--text-muted); font-size: 1.25rem; max-width: 48ch; margin: var(--space-5) auto 0; }

/* ---------- numbers band ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); }
.stat { padding: var(--space-5) 0; border-top: 1px solid var(--border); }
.stat b { display: block; font: 800 clamp(2.5rem, 5vw, 4rem)/1 var(--font-display); letter-spacing: -0.04em; margin-bottom: var(--space-2); }
.stat span { color: var(--text-muted); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* scroll reveals (only when motion is OK and JS ran) */
.js-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .8s var(--ease); }
.js-reveal .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .wall-grid { animation: none; }
  .js-reveal .reveal { opacity: 1; transform: none; }
}

/* ---------- buy page ---------- */
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.125rem; }
.buy-hero {
  padding: var(--space-8) 0 var(--space-9); border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.buy-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8); align-items: center; }
.buy-model { display: grid; place-items: center; }
.buy-model .calc-stage { width: min(100%, 440px); }
.buy-panel .display-2 { margin-bottom: var(--space-3); }
.buy-price { font: 800 clamp(2.5rem, 5vw, 4rem)/1 var(--font-display); letter-spacing: -0.03em; color: var(--text); margin-bottom: var(--space-5); }
.buy-price span { font-size: 1rem; font-weight: 500; letter-spacing: 0; color: var(--text-muted); margin-left: 8px; }
.buy-go { margin-top: var(--space-6); width: 100%; max-width: 380px; }
.buy-fine { margin-top: var(--space-4); font-size: .875rem; color: var(--text-muted); max-width: 46ch; }
.buy-next { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--space-7); align-items: start; }
@media (max-width: 860px) {
  .buy-hero { padding: var(--space-6) 0 var(--space-8); }
  .buy-grid, .buy-next { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .buy-model .calc-stage { width: min(78%, 300px); }
}
.buy-panel .checks { grid-template-columns: 1fr; margin-top: 0; }

/* ---------- compatibility page ---------- */
.compat { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-8); align-items: center; }
.compat-model { display: grid; place-items: center; }
.compat-model .calc-stage { width: min(100%, 380px); }
.compat-body h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; line-height: 1.08; margin-bottom: var(--space-2); }
.compat-list { list-style: none; margin: var(--space-5) 0 0; padding: 0; display: grid; gap: 12px; }
.compat-list li {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 16px 20px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border);
  font-weight: 600; font-size: 1rem; color: var(--text);
}
.compat-list svg {
  width: 26px; height: 26px; flex: none; padding: 4px; border-radius: 50%;
  color: #04140b; background: var(--cta); stroke-width: 3;
}
.compat-list span { flex: 1; min-width: 0; }
.compat-list em {
  font-weight: 600; font-size: .75rem; font-style: normal; color: var(--cta);
  padding: 4px 12px; border-radius: 999px; background: rgba(64, 202, 122, .13); white-space: nowrap;
}
.compat-no { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--border); }
.compat-no h3 { font-size: 1rem; color: var(--text-muted); margin-bottom: var(--space-3); }
.compat-no ul { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.compat-no li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px 8px 12px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-muted); font-size: .875rem;
}
.compat-no li svg { width: 14px; height: 14px; color: #ff8a8a; stroke-width: 2.6; }
.compat-no p { color: var(--text-faint); font-size: .875rem; margin: 0; }
@media (max-width: 860px) {
  .compat { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .compat-model .calc-stage { width: min(70%, 260px); }
}

/* ---------- 404 ---------- */
.notfound { padding: var(--space-9) 0; }
.notfound-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-8); align-items: center; }
.notfound-screen {
  aspect-ratio: 4 / 3; max-width: 360px; width: 100%; justify-self: center;
  display: flex; flex-direction: column; gap: 8px; padding: 28px 28px;
  background: #e8ecef; color: #10161c; border-radius: 14px;
  border: 12px solid #151c24; box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px var(--border);
  font: 700 clamp(1.125rem, 2.6vw, 1.5rem)/1.3 var(--font-head);
}
.notfound-screen .nf-opt { margin-top: auto; background: #10161c; color: #e8ecef; align-self: flex-start; padding: 0 8px; }
.notfound h1 { font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -0.035em; line-height: 1.05; }
.notfound-links { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.footer-legal a { color: inherit; }
@media (max-width: 760px) {
  .notfound-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .notfound-screen { max-width: 260px; }
}

/* home page intro: the headline's words rise in one by one, then the rest fades up */
@media (prefers-reduced-motion: no-preference) {
  .intro-words .w { display: inline-block; animation: word-in .8s var(--ease) both; animation-delay: calc(var(--i) * 110ms + 200ms); }
  .intro-in { animation: intro-up .7s var(--ease) both; animation-delay: calc(var(--d, 0) * 110ms + 200ms); }
  .kicker.intro-in { animation-delay: 60ms; }
}
@keyframes word-in { from { opacity: 0; transform: translateY(.3em); } }
@keyframes intro-up { from { opacity: 0; transform: translateY(14px); } }
/* the gradient flows across "with a home screen." instead of restarting on every word */
.intro-words .grad-text { background-size: 400% 100%; background-position: calc((var(--i) - 2) * 33.333%) 0; }
/* the calculator (and its glow) fades in and drifts up alongside the headline */
@media (prefers-reduced-motion: no-preference) {
  .story-model { animation: calc-in 1.2s var(--ease) .3s both; }
}
@keyframes calc-in { from { opacity: 0; transform: translateY(24px); } }

/* ---------- motion polish: progress bar, header, page transitions, FAQ, hovers ---------- */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
.scroll-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; z-index: 2; }
.scroll-progress span {
  display: block; height: 100%; background: var(--grad);
  transform: scaleX(0); transform-origin: 0 50%;
}
.site-header { transition: background-color .3s var(--ease), box-shadow .3s var(--ease); }
.site-header .wrap { transition: min-height .3s var(--ease); }
.site-header.scrolled { background: rgba(3, 17, 25, .88); box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
@media (min-width: 861px) {
  .site-header.scrolled .wrap { min-height: 50px; }
  /* nav links: an underline grows in from the middle on hover */
  .nav a { position: relative; }
  .nav a::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 5px; height: 2px; border-radius: 2px;
    background: var(--brand); transform: scaleX(0); transition: transform .25s var(--ease);
  }
  .nav a:hover::after { transform: scaleX(1); }
  .nav a[aria-current="page"]::after { display: none; }
}

/* Buy buttons: a soft glow on hover; .magnetic is added by site.js */
.btn-buy:hover { box-shadow: 0 4px 0 #23854d, 0 10px 30px rgba(64, 202, 122, .35); }
.btn-buy.magnetic { transition: background-color .18s var(--ease), box-shadow .25s var(--ease), translate .25s var(--ease), transform .12s var(--ease); }

/* cards lift a little under the mouse */
@media (hover: hover) {
  .card, .hl-card { transition: translate .25s var(--ease), opacity .7s var(--ease), transform .8s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease); }
  .card:hover { translate: 0 -4px; border-color: var(--border-strong); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
  .hl-card:hover { translate: 0 -4px; }
  .faq details { transition: border-color .2s var(--ease); }
  .faq details:hover { border-color: var(--border-strong); }
}

@media (prefers-reduced-motion: no-preference) {
  /* page transitions: pages cross-fade and slide a touch (browsers without support just load normally) */
  ::view-transition-old(root) { animation: vt-out .22s var(--ease) both; }
  ::view-transition-new(root) { animation: vt-in .35s var(--ease) both; }
  .site-header { view-transition-name: site-header; }

  /* FAQ answers slide open instead of popping (newer browsers; others just open) */
  :root { interpolate-size: allow-keywords; }
  .faq details::details-content {
    block-size: 0; overflow: hidden;
    transition: block-size .35s var(--ease), content-visibility .35s allow-discrete;
  }
  .faq details[open]::details-content { block-size: auto; }

  /* phone menu drops down instead of appearing */
  @media (max-width: 860px) { .nav.open { animation: menu-in .25s var(--ease) both; } }
}
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) {
  .card:hover, .hl-card:hover { translate: none; }
}
