
/* Layout: compact product page. Hero = copy + download control beside the real windows;
   one 8px spacing scale (8/16/24/32/48/64), one card radius, one control height. */
:root {
  --primary: #e6e6e6; --on-primary: #1a1a1a;
  --background: #121212; --panel: #181818; --tile: #1f1f1f; --tile-high: #2a2a2a;
  --ink: #e6e6e6; --ink-muted: #b8b8b8; --line: #2e2e2e; --line-strong: #3f3f3f;
  --shadow: 0 24px 60px rgba(0,0,0,.5);
  --font-sans: "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --r-card: 20px; --r-ctl: 12px; --h-ctl: 44px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
  --primary: #1f1f1f; --on-primary: #ffffff;
  --background: #fafafa; --panel: #f3f3f3; --tile: #eeeeee; --tile-high: #e2e2e2;
  --ink: #1b1b1b; --ink-muted: #555555; --line: #e0e0e0; --line-strong: #cacaca;
  --shadow: 0 24px 60px rgba(0,0,0,.14); color-scheme: light;
} }
:root[data-theme="light"] {
  --primary: #1f1f1f; --on-primary: #ffffff;
  --background: #fafafa; --panel: #f3f3f3; --tile: #eeeeee; --tile-high: #e2e2e2;
  --ink: #1b1b1b; --ink-muted: #555555; --line: #e0e0e0; --line-strong: #cacaca;
  --shadow: 0 24px 60px rgba(0,0,0,.14); color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--background); color: var(--ink); font: 15px/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 1px solid var(--primary); outline-offset: 3px; }
.mono { font-family: var(--font-mono); }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 80px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; }
.brand svg { width: 30px; height: 30px; }
.top .brand { gap: 12px; font-size: 21px; }
.top .brand svg { width: 38px; height: 38px; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink-muted); font-size: 16px; font-weight: 500; height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; }
.nav a:hover { color: var(--ink); background: var(--tile); }

/* Controls: one height, one radius */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h-ctl); padding: 0 20px; border-radius: 999px; font: 500 15px/1 var(--font-sans); border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: filter 220ms ease, background-color 220ms ease, transform 300ms cubic-bezier(.25,.1,.25,1); }
.btn:active { transform: scale(.97); }
.btn svg.i { width: 16px; height: 16px; }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { filter: brightness(.92); }
.btn--ghost { background: var(--tile); color: var(--ink); border-color: var(--line-strong); font-weight: 400; }
.btn--ghost:hover { background: var(--tile-high); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: 32px 64px; }
.hero h1 { margin: 0; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.06; font-weight: 700; letter-spacing: -.03em; text-wrap: balance; }
.hero .lead { margin: 16px 0 0; font-size: 16px; color: var(--ink-muted); }
.cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.cta-note { margin-top: 8px; font-size: 13px; color: var(--ink-muted); min-height: 20px; }

.stage { position: relative; min-width: 0; padding: 0 88px 56px 0; }
.stage .desk { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line-strong); }
.stage .phone { position: absolute; right: 0; bottom: 0; width: 21%; border-radius: 22px; overflow: hidden; border: 2px solid #2a2a2a; box-shadow: var(--shadow); background: #0a0a0a; }

/* Platform picker */
.platforms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.plat { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: var(--r-card); background: var(--tile); min-width: 0; }
.plat-head { display: flex; align-items: center; gap: 12px; }
.plat-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--tile-high); display: grid; place-items: center; flex: none; }
.plat-icon svg.i { width: 20px; height: 20px; }
.plat h3 { margin: 0; font-size: 17px; font-weight: 600; }
.plat .req { margin: 0; font-size: 13px; color: var(--ink-muted); flex: 1; }
.plat .btn { width: 100%; }
.plat.here { outline: 1px solid var(--line-strong); }
.badge { margin-left: auto; flex-shrink: 0; white-space: nowrap; font: 500 11px/1.2 var(--font-sans); padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--tile-high); color: var(--ink-muted); }

/* The mini window with versions */
.menu { position: absolute; left: 12px; width: max(calc(100% - 24px), 290px); top: calc(100% - 8px); z-index: 20; padding: 6px; border-radius: 16px; background: var(--tile-high); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; }
.menu a:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.menu .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.menu .t b { font-weight: 500; font-size: 14px; }
.menu .t span { font-size: 12px; color: var(--ink-muted); }
.menu .t b { display: flex; align-items: center; gap: 8px; }
.menu .t b .rec { font-size: 11px; font-weight: 500; color: var(--ink); border: 1px solid #22c55e; background: rgba(34, 197, 94, .1); padding: 2px 7px; border-radius: 999px; }
.chev { transition: transform 280ms cubic-bezier(.25,.1,.25,1); }
[aria-expanded="true"] .chev { transform: rotate(180deg); }

.cmd { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.command-menu { left: auto; right: 12px; width: min(360px, calc(100vw - 32px)); padding: 12px; }
.cmd code { display: block; min-width: 0; padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.6 var(--font-mono); border-radius: 12px; background: var(--background); border: 1px solid var(--line-strong); }

section { padding-block: 64px 0; }
.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 32px; margin-bottom: 24px; }
.head > div:not(.seg) { display: flex; flex-direction: column; gap: 8px; }
.head h2 { margin: 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.15; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
.head p { margin: 0; color: var(--ink-muted); max-width: 32em; }

/* Features: equal tiles */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feat { padding: 24px; border-radius: var(--r-card); background: var(--tile); display: flex; flex-direction: column; gap: 8px; }
.feat svg.i { width: 22px; height: 22px; color: var(--ink-muted); margin-bottom: 8px; }
.feat h3 { margin: 0; font-size: 16px; font-weight: 600; }
.feat p { margin: 0; font-size: 14px; color: var(--ink-muted); }

/* Screens */
.seg { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; background: var(--tile); }
.seg .thumb { position: absolute; top: 4px; left: 0; height: 36px; width: 0; border-radius: 999px; background: var(--primary); transition: transform 420ms cubic-bezier(.25,.1,.25,1), width 420ms cubic-bezier(.25,.1,.25,1); pointer-events: none; }
.seg button { position: relative; z-index: 1; height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-muted); font: 14px var(--font-sans); cursor: pointer; transition: color 300ms; }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.seg.ready button[aria-pressed="true"] { background: transparent; }

/* Screenshots: the old theme fades out under the new one, which settles from a touch larger. */
.swap { display: grid; background: #121212; }
.swap > img { grid-area: 1 / 1; transition: opacity 520ms ease, transform 700ms cubic-bezier(.25,.1,.25,1); }
.swap[data-t="dark"] > .l, .swap[data-t="light"] > .d { opacity: 0; transform: scale(1.025); }
.screens { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px); gap: 16px; align-items: start; }
.screens .desk { border-radius: 12px; overflow: hidden; border: 1px solid var(--line-strong); }
.screens .phone { border-radius: 24px; overflow: hidden; border: 2px solid var(--line-strong); background: #0a0a0a; }

.note { display: block; margin-top: 16px; padding: 16px 24px; border-radius: var(--r-card); background: var(--tile); font-size: 14px; color: var(--ink-muted); }
.note b { color: var(--ink); font-weight: 600; }

footer { margin-top: 64px; padding-block: 24px 32px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--ink-muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
footer nav a:hover { color: var(--ink); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 90px); opacity: 0; background: var(--ink); color: var(--background); padding: 11px 20px; border-radius: 10px; font-size: 13px; transition: transform 360ms cubic-bezier(.25,.1,.25,1), opacity 180ms; pointer-events: none; z-index: 30; }
.toast.on { transform: translate(-50%, 0); opacity: 1; }

/* Short, quiet motion; content stays visible without JavaScript. */
.nav a, .brand { transition: color 180ms ease, background-color 180ms ease; }
.plat { transition: background-color 220ms ease, box-shadow 220ms ease; }
.plat:has(.menu:not([hidden])) { z-index: 21; }
.feat { transition: transform 300ms cubic-bezier(.25,.1,.25,1), background-color 220ms ease; }
.menu { transform-origin: top center; }
.menu:not([hidden]) { animation: menu-appear 280ms cubic-bezier(.25,.1,.25,1); }
.menu a { transition: background-color 160ms ease; }
@keyframes menu-appear {
  from { opacity: 0; transform: translateY(6px) scale(.99); }
  to { opacity: 1; transform: none; }
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: scale(.97); }
  .plat:hover { box-shadow: inset 0 0 0 1px var(--line-strong), 0 8px 24px rgba(0,0,0,.1); }
  .feat:hover { transform: translateY(-3px); background: var(--tile-high); }
}

@media (max-width: 1000px) {
  .platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .top { height: 72px; }
  .top .brand { font-size: 20px; }
  .top .brand svg { width: 34px; height: 34px; }
  /* On a phone the versions open inside the card and push the rest down, never over it. */
  .menu { position: static; width: auto; margin-top: -4px; box-shadow: none; }
  .plat:has(.menu:not([hidden])) { gap: 8px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 16px 48px; }
  .nav { display: none; }
  .screens { grid-template-columns: minmax(0, 1fr); }
  .screens .phone { width: 60%; max-width: 260px; justify-self: center; }
}
@media (max-width: 560px) {
  .platforms, .features { grid-template-columns: minmax(0, 1fr); }
  .stage { padding-right: 40px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } .btn:hover, .btn:active, .feat:hover { transform: none; } }

.legal { max-width: 860px; margin: 0 auto; padding: 32px max(20px, env(safe-area-inset-left, 0px)) 0; }
.legal article { font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.legal h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.15; letter-spacing: -.025em; margin: 24px 0; }
.legal h2 { margin: 44px 0 14px; font-size: 24px; line-height: 1.3; scroll-margin-top: 24px; }
.legal p { margin: 0 0 18px; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: var(--ink-muted); }
.legal li { margin: 8px 0; }
.legal ul { padding-left: 24px; }
.legal code { font: .88em/1.6 var(--font-mono); background: var(--tile); border-radius: 4px; padding: 2px 5px; }
.legal pre { margin: 0 0 18px; padding: 14px 16px; background: var(--tile); border: 1px solid var(--line-strong); border-radius: 12px; overflow-x: auto; line-height: 1.55; }
.legal pre code { background: none; padding: 0; white-space: pre; font-size: 13px; }
.legal-back { font-size: 14px; color: var(--ink-muted); }
.legal-toc { border: 1px solid var(--line-strong); border-radius: 16px; background: var(--panel); padding: 16px 20px; margin: 24px 0 32px; }
.legal-toc summary { cursor: pointer; font-weight: 600; }
.legal-toc ul { margin-bottom: 0; padding-left: 20px; font-size: 14px; }
.legal-table { overflow-x: auto; margin: 24px 0; }
.legal table { border-collapse: collapse; width: 100%; font-size: 14px; }
.legal th, .legal td { padding: 12px; border: 1px solid var(--line-strong); text-align: left; vertical-align: top; }
.legal th { background: var(--tile); }
@media (max-width: 560px) { .legal { padding-top: 16px; } .legal h2 { font-size: 21px; } }

/* Pending content is prepared before the first paint, not hidden after loading. */
.motion-primed [data-reveal] { opacity: 0; }
@media (prefers-reduced-motion: reduce), print {
  .motion-primed [data-reveal] { opacity: 1; }
}

/* 404 */
.nf { max-width: 560px; margin: 0 auto; padding: 56px max(20px, env(safe-area-inset-left, 0px)) 24px; text-align: center; }
.nf-code { display: flex; align-items: center; justify-content: center; gap: .1em; font-size: clamp(88px, 22vw, 150px); font-weight: 700; line-height: 1; letter-spacing: -.04em; color: var(--ink); }
.nf-code span { opacity: .92; }
.nf-logo { width: .72em; height: .72em; margin: 0 .04em; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); animation: nf-bob 4.5s ease-in-out infinite; }
.nf h1 { font-size: clamp(24px, 5vw, 32px); line-height: 1.2; letter-spacing: -.02em; margin: 28px 0 12px; }
.nf p { margin: 0 auto; color: var(--ink-muted); max-width: 440px; font-size: 16px; line-height: 1.6; }
.nf-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 28px 0 24px; }
.nf-more { font-size: 14px !important; }
.nf-more a { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
@keyframes nf-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .nf-logo { animation: none; } }

/* The 404 page: the footer sits at the bottom, the message in the middle of what is left. */
body:has(> main.nf) { min-height: calc(100vh - 16px); min-height: calc(100dvh - 16px); display: flex; flex-direction: column; }
body:has(> main.nf) > header, body:has(> main.nf) > footer { width: 100%; }
body:has(> main.nf) > main.nf { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 24px; padding-bottom: 48px; }
body:has(> main.nf) > footer { margin-top: auto; }
