/* Platform landing page (served by apps/api/src/routes/landing/view.ts) and
   the legal/signup pages that share its chrome. "Clarity" (redesign plan 06):
   a bright, quiet product page — Inter throughout, pill buttons, tile
   surfaces, the product shown in DOM mock-ups. Light/dark come from the
   tokens below, landing-scoped (client galleries and admin never load this
   file, so their fixed-light rule, UI-8.5, is untouched). The dark set wins
   over tokens.css's :root[data-theme="dark"] by loading after it. */

@font-face { font-family: "Inter"; src: url("/fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* Clarity tokens (plan 06 §3). */
:root {
  --bg: #fbfbfd;
  --tile: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --accent: #a0522d;
  --accent-hover: #86441f;
  --on-accent: #ffffff;
  --nav-ink: #424245;
  --nav-bg: rgb(251 251 253 / 78%);
  --nav-edge: rgb(0 0 0 / 6%);
  --statement: #86868b;
  --sans: "Inter", -apple-system, system-ui, "Segoe UI", sans-serif;
  --maxw: 1040px;
}
:root[data-theme="dark"] {
  --bg: #000000;
  --tile: #161617;
  --surface: #1c1c1e;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --line: #38383a;
  --accent: #f0b37e;
  --accent-hover: #f6c99f;
  --on-accent: #000000;
  --nav-ink: #a1a1a6;
  --nav-bg: rgb(0 0 0 / 72%);
  --nav-edge: rgb(255 255 255 / 8%);
  /* ~4:1 on black: fine at the statement's ≥ 28px bold, never smaller. */
  --statement: #6e6e73;

  color-scheme: dark;
}
/* The product mock-ups are pictures of the product: they stay light in both
   modes, as a white app screenshot stays white on a black page. */
.shot, .tile .art, .mail {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
}

/* Clarity is flat: no app-wide film grain on these pages. */
html::after { display: none; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
/* Theme transition: only background/color, only 150ms. The before-paint script
   sets data-theme before this applies, so the first load never animates. */
html, body { transition: background-color 0.15s ease, color 0.15s ease; }
body {
  margin: 0;
  font: 17px/1.47 var(--sans);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

h1, h2, h3 { font-weight: 600; line-height: 1.08; letter-spacing: -0.035em; }
p { margin: 0 0 1em; max-width: 68ch; }
.muted { color: var(--muted); }
a { color: inherit; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 60;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  padding: 12px 18px; text-decoration: none; transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

/* --- Sticky translucent nav ---
   Full width, two clusters on the window's edges (plan 07 §1): wordmark and
   section links on the left, toggle · Log in · pill on the right. The page
   sections below keep their own reading width. */
#top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 0 clamp(20px, 3vw, 40px);
  background: var(--bg);
  border-bottom: 1px solid var(--nav-edge);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #top { background: var(--nav-bg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
}
#top .brand { font-weight: 600; font-size: 17px; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; margin-right: auto; padding: 12px 0; }
.nav-utils { display: flex; align-items: center; gap: 4px; }
.menu nav a, .nav-login { text-decoration: none; font-size: 14px; color: var(--nav-ink); }
.menu nav a:hover, .menu nav a:focus-visible, .nav-login:hover, .nav-login:focus-visible { color: var(--ink); }
/* Log in: a plain text link with a 44px hit area. */
.nav-login { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 10px; white-space: nowrap; }
.nav-utils .nav-pill { margin-left: 6px; }

/* The menu (plan 06 §6, the portfolio's plan 03 §3.1 pattern): no JS. */
.menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-i, .menu-i::before, .menu-i::after { display: block; width: 18px; height: 1.5px; border-radius: 1px; background: currentColor; transition: transform 0.2s ease, background 0.2s ease; }
.menu-i { position: relative; }
.menu-i::before, .menu-i::after { content: ""; position: absolute; left: 0; }
.menu-i::before { top: -6px; }
.menu-i::after { top: 6px; }
.menu[open] .menu-i { background: transparent; }
.menu[open] .menu-i::before { transform: translateY(6px) rotate(45deg); }
.menu[open] .menu-i::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 959.98px) {
  /* Phones: wordmark · toggle · menu. The sheet lists the sections, then
     Log in and the trial button at its foot. */
  .menu { order: 3; }
  #top .nav-pill, .nav-login { display: none; }
  .menu > .sheet {
    position: absolute; top: 100%; left: 0; right: 0;
    display: flex; flex-direction: column; align-items: stretch;
    max-height: calc(100svh - 52px); overflow-y: auto;
    padding: 8px max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .menu nav { display: flex; flex-direction: column; }
  .menu nav a, .sheet-login { display: flex; align-items: center; min-height: 48px; font-size: 17px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--nav-edge); }
  .sheet-actions { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
  .sheet-login { border-bottom: 0; }
  .sheet-pill { min-height: 48px; font-size: 17px; }
}
/* Desktop: the links follow the wordmark with one even gap. Each link has the
   same side padding (44px wide even for "FAQ"), so the visible space between
   labels is the same whatever their length. */
@media (min-width: 960px) {
  #top .brand { margin-right: 28px; }
  .menu { flex: 1; min-width: 0; }
  .menu > summary, .sheet-actions { display: none; }
  .menu::details-content { content-visibility: visible; display: contents; }
  .menu > .sheet { display: contents; }
  .menu nav { display: flex; align-items: center; gap: 4px; }
  .menu nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; white-space: nowrap; }
}

/* Bare sun/moon icon with a 44px hit area. */
.theme-toggle {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%;
  background: transparent; color: inherit; cursor: pointer; opacity: 0.8;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}
.theme-toggle:hover, .theme-toggle:focus-visible { opacity: 1; background: rgb(127 127 127 / 12%); }
/* The icon shows the mode you'll switch to, as in the admin and gallery: a
   crescent in light, the sun (disc and rays) in dark. Inline SVG in view.ts. */
.theme-toggle svg { display: block; }
.theme-toggle .tt-sun, :root[data-theme="dark"] .theme-toggle .tt-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .tt-sun { display: block; }

/* A bare select with a drawn caret (as the portfolio's): 44px tall, 16px text
   so iOS doesn't zoom, no native chrome. */
#lang-sel { font: 16px/1 var(--sans); min-height: 44px; min-width: 64px; padding: 0 22px 0 8px; border: 0; border-radius: 8px; color: inherit; cursor: pointer;
  appearance: none; background: transparent; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 12px center, right 7px center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
#lang-sel option { color: #1d1d1f; background: #fff; }

/* --- Pills (buttons) --- */
.btn, .pill {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 980px; font-weight: 500; white-space: nowrap; text-decoration: none; cursor: pointer;
  font-family: var(--sans); letter-spacing: -0.01em;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn { min-height: 48px; padding: 0 24px; font-size: 17px; border: 1px solid transparent; }
/* The small pill draws 30px tall but its hit area is 44px: a transparent
   border the background doesn't paint under. */
.pill-s { min-height: 44px; padding: 0 14px; font-size: 13px; border: 7px solid transparent; background-clip: padding-box; }
/* Primary: ink fill with a page-coloured label (white on light, black on dark). */
.btn-primary, .pill-ink { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover, .pill-ink:hover { background: var(--muted); border-color: var(--muted); }
/* After the fills: the background shorthand resets background-clip. */
.pill-ink.pill-s, .pill-ink.pill-s:hover { border-color: transparent; background-clip: padding-box; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--bg); }

/* --- Layout --- */
main { display: block; }
section { max-width: var(--maxw); margin: 0 auto; padding: clamp(72px, 11vw, 140px) 22px 0; }
section > h2 { font-size: clamp(36px, 5vw, 56px); margin: 0 0 clamp(24px, 4vw, 40px); text-align: center; }

/* --- Hero --- */
.hero { max-width: none; padding: clamp(56px, 9vw, 88px) 0 0; text-align: center; overflow: hidden; }
.hero > :not(.shot) { margin-left: auto; margin-right: auto; padding: 0 22px; }
.eyebrow { font-size: 17px; font-weight: 600; color: var(--accent); margin: 0 auto 6px; }
.hero-title { font-size: clamp(44px, 7.4vw, 96px); letter-spacing: -0.045em; line-height: 1.02; margin: 0 auto; max-width: 14ch; }
.hero-lead, .hero-accent { display: block; text-wrap: balance; }
.hero-sub { margin: 14px auto 0; max-width: 34ch; font-size: clamp(19px, 1.9vw, 24px); line-height: 1.35; color: var(--muted); }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.hero-note { margin: 16px auto 0; max-width: 60ch; font-size: 13px; }
/* Inline, with enough vertical padding for a 24px target (WCAG 2.5.8). */
.hero-note a { padding: 4px 0; text-decoration: underline; text-underline-offset: 2px; }

/* The product shot: a gallery in a browser frame, the phone overlapping its
   lower-right. Decorative DOM; sizes are in px on desktop and scale down. */
.shot { position: relative; max-width: 1180px; margin: clamp(40px, 6vw, 64px) auto 0; padding: 0 22px; height: 560px; color: var(--ink); text-align: left; }
.browser {
  position: absolute; inset: 0 120px -40px 22px; overflow: hidden;
  background: #fff; border-radius: 18px 18px 0 0;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 6%), 0 40px 90px -40px rgb(0 0 0 / 35%);
}
.bbar { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 1px solid #eee; background: #fafafa; }
.bbar i { width: 10px; height: 10px; border-radius: 50%; background: #e2e2e2; flex: none; }
.bbar span { margin: 0 auto; font-size: 11px; color: #5e5e63; background: #f0f0f2; border-radius: 6px; padding: 4px 40px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.g-cover { position: relative; height: 300px; }
.g-cover-img { position: absolute; inset: 0; }
.g-t { position: absolute; inset: auto 0 0; padding: 40px 30px 22px; color: #fff; background: linear-gradient(transparent, rgb(0 0 0 / 60%)); }
.g-t small { display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.g-t strong { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; }
.g-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 30px; font-size: 12px; color: var(--muted); border-bottom: 1px solid #f0f0f0; white-space: nowrap; }
.g-bar > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.g-bar .acts { display: flex; gap: 16px; color: var(--ink); font-weight: 500; }
.g-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 12px 30px; }
.g-tile { aspect-ratio: 1; }
.phone {
  position: absolute; right: 22px; bottom: -10px; width: 230px; height: 470px;
  border-radius: 40px; background: #111; padding: 10px;
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / 50%);
}
.scr { width: 100%; height: 100%; border-radius: 31px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.scr-img { height: 58%; flex: none; }
.pt { padding: 14px 16px; }
.pt small { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pt strong { display: block; font-size: 17px; letter-spacing: -0.02em; margin-top: 2px; }
.pt .row { display: flex; gap: 5px; margin-top: 10px; }
.pt .row i { flex: 1; height: 34px; border-radius: 5px; background: #eee; }
.pt-btn { display: block; margin-top: 12px; text-align: center; background: #1d1d1f; color: #fff; border-radius: 10px; padding: 10px; font-size: 12px; font-weight: 500; }
:root[data-theme="dark"] .browser { box-shadow: 0 0 0 1px rgb(255 255 255 / 12%), 0 50px 110px -40px rgb(0 0 0 / 95%); }
:root[data-theme="dark"] .phone { box-shadow: 0 0 0 1px rgb(255 255 255 / 14%), 0 40px 80px -30px rgb(0 0 0 / 95%); }

/* --- Statement --- */
.statement { padding-bottom: clamp(40px, 7vw, 30px); }
.statement p { font-size: clamp(30px, 4.2vw, 56px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; margin: 0 auto; max-width: 900px; text-align: center; color: var(--statement); }
.statement b { color: var(--ink); font-weight: 600; }

/* --- Feature tiles (2-up, 12px gutters; the wide tile spans both) --- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: none; padding: clamp(72px, 10vw, 130px) 12px 0; }
.tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center;
  min-height: 620px; padding: 56px 22px 0; text-align: center; background: var(--tile);
}
.tile.dark { background: #000; color: #f5f5f7; }
:root[data-theme="dark"] .tile.dark { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%); }
.tile.wide { grid-column: 1 / -1; min-height: 640px; }
.tile h2 { font-size: clamp(34px, 3.6vw, 48px); letter-spacing: -0.04em; line-height: 1.05; margin: 0; }
.tile > p { font-size: 21px; letter-spacing: -0.015em; margin: 8px 0 0; }
.tile .art { position: relative; margin-top: auto; width: calc(100% + 44px); padding-top: 48px; color: var(--ink); }

.stack { position: relative; height: 330px; width: min(560px, 100%); margin: 0 auto; }
/* The photo is the crop frame itself; its white mat is a box-shadow ring (a
   border on a size-contained aspect-ratio frame is measured differently by
   WebKit, which shifts the focal crop). */
.stack .pcard { position: absolute; bottom: 10px; width: calc(54% - 20px); aspect-ratio: 1; background: #fff; border-radius: 6px; box-shadow: 0 0 0 10px #fff, 0 30px 60px -25px rgb(0 0 0 / 35%); }
.stack .c1 { left: 10px; transform: rotate(-6deg) translateY(10px); }
.stack .c3 { right: 10px; transform: rotate(6deg) translateY(10px); }
.stack .c2 { left: calc(23% + 10px); z-index: 2; bottom: 16px; }
.lock {
  position: absolute; z-index: 3; left: 50%; top: -14px; transform: translateX(-50%); white-space: nowrap;
  background: rgb(255 255 255 / 92%); border-radius: 999px; padding: 9px 16px 9px 30px; font-size: 13px; font-weight: 500;
  box-shadow: 0 10px 30px -10px rgb(0 0 0 / 30%);
}
.lock::before { content: ""; position: absolute; left: 14px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: currentColor; }

.pf { height: 370px; }
.serp {
  position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); top: 20px; width: min(420px, calc(100% - 32px));
  text-align: left; background: #fff; color: #1d1d1f; border-radius: 14px; padding: 14px 18px;
  box-shadow: 0 30px 60px -25px rgb(0 0 0 / 60%); font-size: 12px;
}
.serp .u { color: #2f6b2f; font-size: 11px; }
.serp .st { color: #1a0dab; font-size: 16px; margin: 2px 0; }
.serp .d { color: #555; }
.pf-bar {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 28px; display: flex; gap: 22px; align-items: center;
  padding: 10px 18px; border-radius: 999px; background: rgb(0 0 0 / 55%); font-size: 12px; color: #fff; white-space: nowrap;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .pf-bar { -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
}

.print { width: 280px; margin: 0 auto 60px; background: #fff; padding: 16px 16px 50px; box-shadow: 0 40px 70px -30px rgb(0 0 0 / 45%); }
.print-img { aspect-ratio: 4 / 3; }
.price {
  position: absolute; left: calc(50% + 80px); bottom: 110px; width: 210px; text-align: left;
  background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: 0 20px 50px -20px rgb(0 0 0 / 35%); font-size: 12px;
}
.price .r { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #f0f0f0; }
.price .r:last-of-type { border: 0; }
.price .r i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #c7c7cc; }
.price .r i.on { border: 4px solid #1d1d1f; }
.buy { margin-top: 10px; background: #1d1d1f; color: #fff; border-radius: 8px; text-align: center; padding: 8px; font-weight: 500; }

.ai { width: min(500px, 100%); margin: 0 auto 70px; padding: 0 16px; text-align: left; }
.ai .q { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 16px; padding: 16px 20px; font-size: 19px; letter-spacing: -0.02em; box-shadow: 0 20px 50px -25px rgb(0 0 0 / 35%); }
.ai .q i { position: relative; flex: none; width: 18px; height: 18px; border: 2px solid var(--muted); border-radius: 50%; }
.ai .q i::after { content: ""; position: absolute; width: 7px; height: 2px; background: var(--muted); right: -6px; bottom: -3px; transform: rotate(45deg); }
.ai .q em { font-style: normal; color: var(--muted); margin-left: auto; font-size: 12px; white-space: nowrap; }
.ai .res { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.ai figure { position: relative; margin: 0; }
.res-img { aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; }
.ai figcaption { position: absolute; left: 8px; bottom: 8px; background: rgb(255 255 255 / 92%); border-radius: 999px; font-size: 10px; padding: 3px 8px; font-weight: 500; }

.tile.wide > .mk { position: absolute; inset: 0; z-index: 0; }
.tile.wide > .mk::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgb(0 0 0 / 62%), rgb(0 0 0 / 15%) 50%, rgb(0 0 0 / 35%)); }
.tile.wide > :not(.mk) { position: relative; z-index: 1; }
.tile.wide > p { max-width: 40ch; }
.mail {
  position: absolute !important; right: 7%; bottom: 60px; width: 330px; text-align: left;
  background: rgb(255 255 255 / 95%); color: var(--ink); border-radius: 16px; padding: 16px 18px;
  box-shadow: 0 30px 70px -25px rgb(0 0 0 / 55%); font-size: 12px;
}
.mail .from { display: flex; justify-content: space-between; color: var(--muted); }
.mail strong { display: block; font-size: 15px; margin: 6px 0 4px; letter-spacing: -0.01em; }
.mail .opt { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #eee; }
.mail .opt span { position: relative; flex: none; width: 30px; height: 18px; border-radius: 999px; background: #248a3d; }
.mail .opt span::after { content: ""; position: absolute; right: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }

/* Frame images fill their .crop box (tokens.css positions them). */
.crop { overflow: hidden; }
.crop > picture { display: contents; }
.crop img { display: block; width: 100%; height: 100%; }

/* --- "Three looks" (plan 06 §4): screenshot cards; a snap scroller on phones --- */
.themes { max-width: none; text-align: center; }
.themes > h2 { margin-bottom: 14px; }
.themes > h2 span { display: block; }
.themes-sub { margin: 0 auto; max-width: 40ch; font-size: clamp(19px, 1.9vw, 24px); line-height: 1.35; color: var(--muted); }
.th-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 1240px; margin: clamp(40px, 6vw, 64px) auto 0; text-align: left; }
.th-frame {
  border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 7%), 0 30px 60px -34px rgb(0 0 0 / 45%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
}
.th-card:hover .th-frame, .th-card:focus-within .th-frame { transform: translateY(-6px); box-shadow: 0 0 0 1px rgb(0 0 0 / 7%), 0 44px 80px -34px rgb(0 0 0 / 50%); }
.th-bar { height: 26px; display: flex; align-items: center; gap: 5px; padding: 0 11px; background: #f2f2f4; border-bottom: 1px solid #e6e6e9; }
.th-bar i { width: 7px; height: 7px; border-radius: 50%; background: #d9d9de; }
.th-frame img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.th-meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 20px; }
.th-meta h3 { font-size: 28px; letter-spacing: -0.03em; margin: 0; }
.th-meta span { font-size: 13px; color: var(--muted); }
.th-card p { margin: 6px 0 0; color: var(--muted); }
.th-card .lnk { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 500; text-decoration: none; }
.th-card .lnk::after { content: " ›"; white-space: pre; }
.th-card .lnk:hover { text-decoration: underline; }
.th-promise { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 34px; margin: clamp(40px, 5vw, 56px) auto 0; padding: 0; list-style: none; font-size: 15px; color: var(--muted); }
.th-promise li::before { content: "✓"; color: var(--accent); font-weight: 600; margin-right: 8px; }
:root[data-theme="dark"] .th-frame { box-shadow: 0 0 0 1px rgb(255 255 255 / 12%), 0 30px 60px -34px rgb(0 0 0 / 95%); }
:root[data-theme="dark"] .th-bar { background: #1c1c1e; border-bottom-color: #2c2c2e; }
:root[data-theme="dark"] .th-bar i { background: #3a3a3c; }
@media (max-width: 860px) {
  .th-row {
    display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-left: -22px; margin-right: -22px; padding: 0 22px 24px; scroll-padding: 0 22px;
  }
  .th-card { flex: 0 0 min(80%, 340px); scroll-snap-align: start; }
}

/* --- Facts --- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.facts div { padding: 0 20px; border-left: 1px solid var(--line); }
.facts div:first-child { border: 0; }
.facts strong { display: block; font-size: clamp(40px, 5vw, 56px); font-weight: 600; letter-spacing: -0.05em; line-height: 1; }
.facts span { display: block; margin-top: 10px; color: var(--muted); }

/* --- Cards: tile surfaces (pricing, signup summary) --- */
.card { background: var(--tile); border-radius: 22px; padding: clamp(22px, 3vw, 32px); }

/* FAQ */
.faq-list details { border-top: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; display: flex; gap: 12px; align-items: baseline;
  padding: 18px 0; font-size: 19px; font-weight: 500; min-height: 44px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before { content: "+"; color: var(--accent); width: 1ch; flex: none; }
.faq-list details[open] summary::before { content: "\2212"; }
.faq-list { border-bottom: 1px solid var(--line); max-width: 800px; margin: 0 auto; }
.faq-list details p { color: var(--muted); padding: 0 0 12px calc(1ch + 12px); }

/* --- Pricing --- */
.pricing { text-align: center; }
.pricing-lede { max-width: 52ch; margin: -8px auto clamp(24px, 3vw, 36px); color: var(--muted); font-size: 19px; }
/* Billing switch: a pure-CSS segmented toggle. The checkbox is visually
   hidden but focusable; :has() flips which price set shows. */
/* The (invisible) checkbox covers the whole track, so it is the tap target. */
.bill-switch { position: relative; display: table; margin: 0 auto clamp(28px, 4vw, 40px); }
.bill-cb { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.bill-track {
  display: inline-flex; align-items: stretch; gap: 0; padding: 3px; cursor: pointer; user-select: none;
  border-radius: 980px; background: var(--tile);
}
.bill-opt {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; min-height: 38px;
  font-size: 15px; font-weight: 500; border-radius: 980px; color: var(--muted);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.bill-opt-mo { background: var(--ink); color: var(--bg); }
.bill-save { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.bill-cb:focus-visible + .bill-track { outline: 2px solid var(--accent); outline-offset: 3px; }
.pricing:has(.bill-cb:checked) .bill-opt-mo { background: transparent; color: var(--muted); }
.pricing:has(.bill-cb:checked) .bill-opt-yr { background: var(--ink); color: var(--bg); }
/* Tier cards — three paid tiers (the sandbox is a separate strip, below). */
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: start; text-align: left; }
.tier { position: relative; display: flex; flex-direction: column; }
.tier.featured { box-shadow: inset 0 0 0 2px var(--ink); }
.tier-badge {
  position: absolute; top: -11px; left: clamp(22px, 3vw, 32px);
  background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; padding: 3px 12px; border-radius: 980px;
}
.tier h3 { font-size: 24px; margin: 0 0 6px; }
.tier-price { margin: 0 0 16px; min-height: 2.6rem; }
.tier-price .price-yr { display: none; }
.pricing:has(.bill-cb:checked) .price-mo { display: none; }
.pricing:has(.bill-cb:checked) .price-yr { display: inline; }
.price-amt { font-size: 40px; font-weight: 600; letter-spacing: -0.04em; }
.price-per { color: var(--muted); font-size: 15px; margin-left: 4px; }
.price-note { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.tier-cta { width: 100%; margin: 0 0 18px; }
.tier-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tier-features li { position: relative; padding-left: 22px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.tier-features li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 600; }
/* Sandbox strip: the evaluation environment, presented under the tier cards
   as its own row — deliberately not a $0 pricing card. */
.sandbox-strip {
  display: flex; align-items: center; justify-content: space-between; gap: clamp(16px, 3vw, 28px); flex-wrap: wrap;
  margin: 12px 0 0; padding: clamp(18px, 2.5vw, 26px) clamp(20px, 3vw, 30px);
  border-radius: 22px; background: var(--tile); text-align: left;
}
.sandbox-strip p { margin: 0; color: var(--muted); flex: 1 1 320px; }
.sandbox-strip .btn { flex: 0 0 auto; }
.pricing-fine { margin: clamp(28px, 4vw, 40px) auto 0; max-width: 760px; }
.pricing-fine p { font-size: 13px; margin: 0 auto 8px; }
.pricing-fine .price-trust { color: var(--ink); font-weight: 500; margin-top: 12px; }

/* --- Final CTA --- */
.final-cta { text-align: center; padding-bottom: clamp(72px, 10vw, 120px); }
.final-cta h2 { font-size: clamp(40px, 5.2vw, 64px); margin: 0 0 14px; }
.final-cta p { margin: 0 auto; font-size: clamp(19px, 1.9vw, 24px); }

/* --- Waitlist form (the closed /signup page, before signups open) --- */
.wl-form label { display: block; text-align: left; font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 8px; }
.wl-row { display: flex; gap: 10px; flex-wrap: wrap; }
.wl-row input { flex: 1 1 220px; font: inherit; padding: 12px 18px; min-height: 48px; border: 1px solid var(--line); border-radius: 980px; background: var(--bg); color: inherit; }
.wl-row input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.wl-row button { flex: 0 0 auto; }
.wl-privacy { font-size: 13px; text-align: left; margin: 12px 0 0; }
.wl-error { color: var(--accent); text-align: left; margin: 0 0 12px; font-weight: 500; }
.wl-done h2 { font-size: 24px; margin: 0 0 8px; }
.wl-done p { margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Footer --- */
footer { background: var(--tile); font-size: 13px; color: var(--muted); padding: 24px 22px 56px; margin-top: clamp(40px, 6vw, 72px); }
.foot-in { max-width: var(--maxw); margin: 0 auto; border-top: 1px solid var(--line); padding-top: 12px; }
.foot-links { display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; }
.foot-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.foot-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot-copy { margin: 0; }

/* --- Legal / 404 / signup --- */
.legal { max-width: 720px; padding-top: clamp(72px, 12vh, 140px); min-height: 60vh; }
.legal h1 { font-size: clamp(32px, 4vw, 48px); margin: 0 0 16px; }
.nf { text-align: center; padding-top: clamp(96px, 18vh, 220px); min-height: 60vh; }
.nf h1 { font-size: clamp(36px, 5vw, 56px); margin: 0 0 12px; }
.signup-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(20px, 4vw, 48px); align-items: start; max-width: var(--maxw); }
.signup-main { min-width: 0; }
.signup-summary { position: sticky; top: 88px; padding: 22px; }
.signup-summary .price-amt { font-size: 28px; }
.signup-price { margin: 4px 0 10px; }
.signup-change { font-size: 15px; }
.signup-form { max-width: 480px; }
.signup-form label { display: block; margin: 16px 0 6px; font-weight: 600; font-size: 15px; }
.signup-form input { width: 100%; padding: 11px 14px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.signup-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field-hint { font-size: 13px; margin: 6px 0 0; }
.signup-form .btn { margin-top: 22px; }
.signup-legal, .signup-login { font-size: 13px; margin-top: 14px; }
.signup-error { background: rgb(200 40 40 / 8%); border: 1px solid rgb(200 40 40 / 35%); color: #b02020; border-radius: 12px; padding: 10px 13px; margin: 0 0 6px; font-size: 15px; }
:root[data-theme="dark"] .signup-error { color: #ff8a80; }

/* --- Prism loader — a beam splitting into the spectrum (the /signup/complete
   page; reused by other pages). --- */
.prism-loader { display: flex; flex-direction: column; align-items: center; gap: 9px; margin: 20px auto; }
.prism-loader-beam {
  width: 2px; height: 26px; border-radius: 1px;
  background: linear-gradient(var(--ink), color-mix(in srgb, var(--ink) 20%, transparent));
  animation: loader-beam 1.1s ease-in-out infinite;
}
.prism-loader-rays { display: flex; gap: 6px; }
.prism-loader-rays i { width: 9px; height: 9px; border-radius: 50%; animation: loader-pulse 1.1s ease-in-out infinite; }
.prism-loader-rays i:nth-child(1) { background: var(--spec-1); animation-delay: 0s; }
.prism-loader-rays i:nth-child(2) { background: var(--spec-2); animation-delay: 0.09s; }
.prism-loader-rays i:nth-child(3) { background: var(--spec-3); animation-delay: 0.18s; }
.prism-loader-rays i:nth-child(4) { background: var(--spec-4); animation-delay: 0.27s; }
.prism-loader-rays i:nth-child(5) { background: var(--spec-5); animation-delay: 0.36s; }
@keyframes loader-pulse { 0%, 100% { transform: translateY(0); opacity: 0.35; } 50% { transform: translateY(5px); opacity: 1; } }
@keyframes loader-beam { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* --- Hero entrance: a CSS load animation (view.ts: .rise + .d1–.d5) — the
   copy, then the product shot. The hidden state lives only inside @keyframes,
   so wherever the animation doesn't run (reduced motion, no support) the hero
   is simply visible. --- */
.rise { animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: var(--rise-delay, 0s); }
.d1 { --rise-delay: 0.05s; }
.d2 { --rise-delay: 0.14s; }
.d3 { --rise-delay: 0.23s; }
.d4 { --rise-delay: 0.3s; }
.d5 { --rise-delay: 0.36s; }
.shot.rise { animation-name: rise-object; animation-duration: 1.1s; }
@keyframes rise { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: none; } }
@keyframes rise-object { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: none; } }

/* --- Scroll reveals: sections rise into place as they enter (.in, added by
   IntersectionObserver). No-JS and reduced-motion get the content at once. --- */
.reveal { opacity: 0; translate: 0 24px; transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), translate 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; translate: none; }
@media (scripting: none) { .reveal { opacity: 1; translate: none; } }

/* --- Responsive --- */
@media (max-width: 1100px) {
  .price { left: auto; right: 6%; }
  .mail { right: 4%; }
}
/* Tiles stack, height by content; the tier cards drop from 3-up to stacked
   (a 2-col step would orphan the third card). */
@media (max-width: 860px) {
  .tiles, .tier-grid { grid-template-columns: 1fr; }
  .tile, .tile.wide { min-height: 0; padding-top: 44px; }
  .tile.wide { padding-bottom: 32px; }
  .mail { position: relative !important; right: auto; bottom: auto; width: min(330px, 100%); margin-top: 32px; }
  .price { position: relative; left: auto; right: auto; bottom: auto; margin: -110px auto 40px; z-index: 1; }
  .print { margin-bottom: 0; }
}
/* Phones: the marketing headline and sentence sit over the busiest part of
   the photo, so the scrim behind them is deeper (plan 07 §3.3). */
@media (max-width: 640px) {
  .tile.wide > .mk::after { background: linear-gradient(rgb(0 0 0 / 78%), rgb(0 0 0 / 55%) 45%, rgb(0 0 0 / 20%) 75%, rgb(0 0 0 / 40%)); }
}
/* The shot: the browser frame scales to the width, the phone overlaps its
   lower-right corner at a smaller size; the grid keeps four tiles. */
@media (max-width: 760px) {
  .shot { height: auto; padding-bottom: 24px; }
  .browser { position: relative; inset: auto; margin-right: 0; }
  .g-cover { height: auto; aspect-ratio: 2 / 1; }
  .g-t { padding: 24px 16px 12px; }
  .g-t strong { font-size: 20px; }
  .g-bar { padding: 10px 16px; }
  .g-bar .acts span:not(:first-child) { display: none; }
  .g-grid { grid-template-columns: repeat(4, 1fr); padding: 10px 16px; }
  .g-grid .g-tile:nth-child(n + 5) { display: none; }
  .phone { right: 10px; bottom: 0; width: 150px; height: 306px; border-radius: 28px; padding: 7px; }
  .scr { border-radius: 22px; }
  .pt { padding: 8px 10px; }
  .pt .row { display: none; }
  .pt strong { font-size: 13px; }
  .pt-btn { margin-top: 8px; padding: 7px; font-size: 10px; }
  .facts { grid-template-columns: 1fr; gap: 28px; }
  .facts div { border-left: 0; border-top: 1px solid var(--line); padding-top: 28px; }
  .facts div:first-child { border: 0; padding-top: 0; }
}
/* Below 430px the phone frame alone — the more relevant device. */
@media (max-width: 429.98px) {
  .browser { display: none; }
  .phone { position: relative; right: auto; bottom: auto; margin: 0 auto; width: 230px; height: 470px; border-radius: 40px; padding: 10px; }
  .scr { border-radius: 31px; }
  .pt { padding: 14px 16px; }
  .pt .row { display: flex; }
  .pt strong { font-size: 17px; }
  .pt-btn { margin-top: 12px; padding: 10px; font-size: 12px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .stack { height: 240px; }
  .lock { font-size: 12px; }
  .ai .q { font-size: 16px; padding: 14px 16px; }
  .pf { height: 300px; }
  .pf-bar { gap: 14px; padding: 8px 14px; }
}
@media (max-width: 760px) {
  .signup-grid { grid-template-columns: 1fr; }
  .signup-summary { position: static; order: -1; }
}

/* --- Reduced motion: no entrance, no reveals, no transitions. --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1 !important; translate: none !important; }
  .rise { opacity: 1 !important; translate: none !important; }
}
