/* The website's stylesheet.

   The tokens below mirror app/globals.css, so the site a visitor reads and the
   app they download are recognisably the same product. The app applies its
   theme from a saved setting; a visitor has no setting here, so the site
   follows the system one and nothing else. Both palettes are defined in full:
   no colour is left to a single media query. */

:root {
  --background: #f5f5f7;
  --foreground: #17181c;
  --surface: #ffffff;
  --surface-muted: #f0f0f3;
  --surface-sunken: #e8e8ed;
  --line: #e2e2e8;
  --line-strong: #cfcfd8;
  --muted: #686a74;
  --body: #34363d;
  --accent: #cc3d32;
  --accent-hover: #b63229;
  --accent-soft: #fee8e5;
  --accent-fg: #ffffff;
  --sage: #138f86;
  --sage-soft: #dff5f2;
  --success: #3b7757;
  --success-soft: #e2efe7;
  --danger: #a8483f;
  --danger-soft: #f7e8e6;
  --shadow: 0 1px 2px rgb(23 34 38 / 0.06), 0 1px 1px rgb(23 34 38 / 0.03);
  --shadow-lift: 0 12px 28px -12px rgb(23 34 38 / 0.22), 0 2px 6px rgb(23 34 38 / 0.06);
  --sheen: rgb(255 255 255 / 0);
  --grain-opacity: 0.035;
  --ambient-cool: rgb(125 143 150 / 0.07);
  --ambient-warm: rgb(170 157 145 / 0.05);
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0f1015;
    --foreground: #f4f4f6;
    --surface: #18191f;
    --surface-muted: #202129;
    --surface-sunken: #121319;
    --line: #2a2c36;
    --line-strong: #3b3e4a;
    --muted: #9698a4;
    --body: #d4d5db;
    --accent: #ff7063;
    --accent-hover: #ff8a7f;
    --accent-soft: #3b211f;
    --accent-fg: #151015;
    --sage: #39c7b9;
    --sage-soft: #15332f;
    --success: #8cc0a3;
    --success-soft: #172a22;
    --danger: #e08f86;
    --danger-soft: #2c1b19;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.35);
    --shadow-lift: 0 14px 30px -12px rgb(0 0 0 / 0.65), 0 2px 6px rgb(0 0 0 / 0.3);
    --sheen: rgb(255 255 255 / 0.025);
    --grain-opacity: 0.05;
    --ambient-cool: rgb(125 143 150 / 0.045);
    --ambient-warm: rgb(170 157 145 / 0.03);
    color-scheme: dark;
  }
}

*, ::before, ::after { box-sizing: border-box; border: 0 solid var(--line); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.025em; margin: 0; }
p { margin: 0; }
a { color: inherit; }
::selection { background: color-mix(in oklab, var(--accent) 28%, transparent); }

/* The same broad, motionless washes the app uses. */
.ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 78% 12%, var(--ambient-cool), transparent 65%),
    radial-gradient(ellipse at 18% 88%, var(--ambient-warm), transparent 62%);
}
.ambient::after {
  content: ""; position: absolute; inset: 0; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 50;
  background: var(--surface); padding: 0.75rem 1rem; border-radius: 0 0 0.75rem 0;
}
.skip:focus { left: 0; }

/* ---------- shell ---------- */

.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  background: color-mix(in oklab, var(--background) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 68rem; margin: 0 auto; padding: 0.75rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 700; letter-spacing: -0.02em; text-decoration: none; font-size: 1.0625rem;
}
.wordmark svg { width: 1.25rem; height: 1.25rem; color: var(--accent); }
.topnav { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.topnav > a {
  text-decoration: none; color: var(--muted); font-size: 0.875rem; font-weight: 500;
  padding: 0.4rem 0.6rem; border-radius: 0.5rem;
}
.topnav > a:hover { color: var(--foreground); background: var(--surface-muted); }
.topnav > a.btn { color: var(--foreground); }
body[data-page="index"] .topnav a[data-nav="index"],
body[data-page="pricing"] .topnav a[data-nav="pricing"],
body[data-page="download"] .topnav a[data-nav="download"] { color: var(--foreground); }

main { position: relative; z-index: 10; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
.wrap-narrow { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }
section.band { padding-block: 4.5rem; }
section.band + section.band { padding-top: 0; }

.footer { position: relative; z-index: 10; border-top: 1px solid var(--line); margin-top: 5rem; }
.footer-inner {
  max-width: 68rem; margin: 0 auto; padding: 2.5rem 1.25rem 1.25rem;
  display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between;
}
.footer-name { font-weight: 700; letter-spacing: -0.02em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.875rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--foreground); text-decoration: underline; text-underline-offset: 3px; }
.footer-fine {
  max-width: 68rem; margin: 0 auto; padding: 0 1.25rem 2.5rem; font-size: 0.8125rem;
}

/* ---------- type ---------- */

.eyebrow {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
}
.muted { color: var(--muted); }
.lede { font-size: 1.125rem; line-height: 1.65; color: var(--body); }
.h1 { font-size: clamp(2.5rem, 7vw, 4.25rem); font-weight: 700; letter-spacing: -0.04em; }
.h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; }
.h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.015em; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 1rem; }
.prose ul { padding-left: 1.25rem; margin: 0; }
.prose li + li { margin-top: 0.4rem; }
.prose a { color: var(--accent); text-underline-offset: 3px; }

/* ---------- controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border: 1px solid transparent; border-radius: 0.625rem;
  padding: 0.5rem 0.875rem; font: inherit; font-size: 0.875rem; font-weight: 500;
  line-height: 1.25rem; white-space: nowrap; cursor: pointer; text-decoration: none;
  user-select: none;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .08s ease-out;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 88%, white), var(--accent));
  color: var(--accent-fg); box-shadow: var(--shadow), inset 0 1px 0 rgb(255 255 255 / 0.18);
}
.btn-primary:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--foreground); border-color: var(--line-strong); box-shadow: var(--shadow); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-muted); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-muted); color: var(--foreground); }
.btn-lg { padding: 0.75rem 1.25rem; font-size: 1rem; border-radius: 0.75rem; }
.btn-sm { padding: 0.3125rem 0.625rem; font-size: 0.8125rem; border-radius: 0.5rem; }

.card {
  background: var(--surface) linear-gradient(180deg, var(--sheen), transparent 45%);
  border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--shadow);
}
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  border-radius: 999px; padding: 0.25rem 0.625rem;
  font-size: 0.75rem; font-weight: 600;
  background: var(--surface-muted); color: var(--muted);
}
.chip-accent { background: var(--accent-soft); color: var(--accent); }
.chip-sage { background: var(--sage-soft); color: var(--sage); }

.field {
  width: 100%; font: inherit; font-size: 1rem;
  background: var(--surface); color: var(--foreground);
  border: 1px solid var(--line-strong); border-radius: 0.625rem;
  padding: 0.625rem 0.75rem; box-shadow: var(--shadow);
}
.field:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
label.lbl { display: block; font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.35rem; }

.note { border-radius: 0.75rem; padding: 0.75rem 0.875rem; font-size: 0.875rem; line-height: 1.5; }
.note-quiet { background: var(--surface-muted); color: var(--body); }
.note-accent { background: var(--accent-soft); color: var(--accent); }
.note-sage { background: var(--sage-soft); color: var(--sage); }
.note-good { background: var(--success-soft); color: var(--success); }
.note-bad { background: var(--danger-soft); color: var(--danger); }

/* ---------- layout helpers ---------- */

.grid { display: grid; gap: 1rem; }
@media (min-width: 40rem) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 56rem) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stack > * + * { margin-top: var(--gap, 1rem); }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.tile { padding: 1.5rem; }
.tile .h3 { margin-bottom: 0.5rem; }

.icon-tile {
  width: 2.25rem; height: 2.25rem; border-radius: 0.625rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, var(--accent-soft), color-mix(in oklab, var(--sage-soft) 75%, var(--accent-soft)));
  color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 14%, transparent);
}
.icon-tile svg { width: 1.125rem; height: 1.125rem; }

/* ---------- landing ---------- */

.hero { padding-block: clamp(3rem, 8vw, 6rem) 0; }
.hero .h1 { margin-top: 0; }
.hero-lede { max-width: 38rem; margin-top: 1.5rem; }
.hero-cta { margin-top: 2rem; }
.hero-fine { font-size: 0.8125rem; margin-top: 1rem; }

/* The one worked example on the page: a moment in a lecture, and what comes of it. */
.marquee { margin-top: 3.5rem; overflow: hidden; }
.marquee-track { display: flex; gap: 1.25rem; padding: 1.75rem; }
.marquee-time {
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.875rem;
  color: var(--muted); padding-top: 0.2rem;
}
.marquee-body { min-width: 0; }
.marquee-said { font-size: 1.0625rem; line-height: 1.55; color: var(--body); }
.marquee-pin { margin-top: 0.875rem; font-size: 0.8125rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.marquee-out { border-top: 1px solid var(--line); background: var(--surface-muted); padding: 1.5rem 1.75rem; }
.marquee-list { list-style: none; padding: 0; margin: 0.875rem 0 0; display: grid; gap: 0.75rem; }
.marquee-list li { font-size: 0.9375rem; color: var(--body); padding-left: 1rem; border-left: 2px solid var(--accent); }

.band-lede { max-width: 42rem; margin-top: 1rem; }
.band-grid { margin-top: 2rem; }
.band-after { margin-top: 1.5rem; font-size: 0.9375rem; }
.band-after a { color: var(--accent); text-underline-offset: 3px; }
.band .h2 { margin-top: 0.75rem; }
.tile .icon-tile { margin-bottom: 1rem; }

.privacy-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.5rem; font-size: 0.9375rem; }
.privacy-list li { padding-left: 1.125rem; position: relative; }
.privacy-list li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 0.375rem; height: 0.375rem; border-radius: 999px; background: currentColor; opacity: 0.45; }
.privacy-fine { margin-top: 1rem; font-size: 0.8125rem; padding-top: 1rem; border-top: 1px solid var(--line); }

.speed { display: flex; flex-wrap: wrap; gap: 2rem; padding: 2rem; align-items: center; }
.speed-number { font-size: clamp(3rem, 9vw, 4.5rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1; color: var(--accent); }
.speed-body { flex: 1 1 22rem; font-size: 0.9375rem; }

.closing { text-align: center; }
.closing .lede { margin-top: 1rem; }
.closing-cta { margin-top: 2rem; justify-content: center; }

/* ---------- inner pages ---------- */

.page-head { padding-bottom: 0; }
.page-h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); margin: 0.75rem 0 1.25rem; }

.download-card { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; justify-content: space-between; }
.download-meta { font-size: 0.875rem; margin-top: 0.35rem; }

.specs { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1.25rem; margin: 1rem 0 0; font-size: 0.9375rem; }
.specs dt { font-weight: 600; }
.specs dd { margin: 0; color: var(--muted); }
@media (max-width: 30rem) { .specs { grid-template-columns: 1fr; gap: 0.15rem; } .specs dd { margin-bottom: 0.6rem; } }

.steps { margin: 1rem 0 0; padding-left: 1.25rem; font-size: 0.9375rem; display: grid; gap: 0.6rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.875em; background: var(--surface-muted); padding: 0.1em 0.35em; border-radius: 0.3em; }

/* ---------- plans ---------- */

.plan { display: flex; flex-direction: column; }
.plan-pro { border-color: var(--accent); box-shadow: var(--shadow-lift), inset 0 0 0 1px var(--accent); background: color-mix(in oklab, var(--accent-soft) 30%, var(--surface)); }
.plan-name { margin-top: 0.35rem; }
.plan-price { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.035em; margin-top: 1.25rem; }
.plan-price-note { font-size: 0.875rem; margin-top: 0.35rem; }
.ticks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.65rem; font-size: 0.9375rem; color: var(--body); }
.ticks li { padding-left: 1.5rem; position: relative; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.42em; width: 0.7rem; height: 0.4rem;
  border-left: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
}
.ticks-accent li::before { border-color: var(--accent); }
.plan-limits { margin-top: auto; padding-top: 1.5rem; }
.plan-limits-head { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.plan-limits ul { margin: 0.75rem 0 0; padding-left: 1.1rem; font-size: 0.875rem; display: grid; gap: 0.4rem; }
.plan-cta { margin-top: 1.5rem; width: 100%; }

/* ---------- account ---------- */

.form-fine { font-size: 0.8125rem; margin-top: 0.75rem; }
.form-submit { margin-top: 1.25rem; }
.field-code { font-size: 1.5rem; letter-spacing: 0.35em; font-variant-numeric: tabular-nums; text-align: center; }
[hidden] { display: none !important; }
.plan-price-per { font-size: 1rem; font-weight: 400; color: var(--muted); }

/* ---------- forms ---------- */

.pair { display: grid; gap: 1rem; }
@media (min-width: 34rem) { .pair { grid-template-columns: 1fr 1fr; } }
.field-row + .field-row, .pair + .field-row { margin-top: 1rem; }

.consent { margin-top: 1.5rem; display: grid; gap: 0.875rem; }
.check { display: flex; gap: 0.625rem; align-items: flex-start; font-size: 0.875rem; line-height: 1.5; color: var(--body); cursor: pointer; }
.check input { margin: 0.2rem 0 0; width: 1rem; height: 1rem; accent-color: var(--accent); flex: none; cursor: pointer; }
.check a { color: var(--accent); text-underline-offset: 3px; }

.inline-terms { font-size: 0.875rem; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--surface-muted); }
.inline-terms summary { cursor: pointer; padding: 0.625rem 0.875rem; font-weight: 600; color: var(--muted); }
.inline-terms summary:hover { color: var(--foreground); }
.inline-terms ul { margin: 0 0 0.75rem; padding: 0 0.875rem 0 2rem; display: grid; gap: 0.5rem; color: var(--body); }
.inline-terms > p { padding: 0 0.875rem 0.875rem; color: var(--muted); }
.inline-terms a { color: var(--accent); }

/* a button that has to read as a link: these change the view, they do not navigate */
.linkish {
  background: none; border: 0; padding: 0; font: inherit; color: var(--accent);
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.linkish:hover { color: var(--accent-hover); }
.linkish:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 0.25rem; }

.switch { display: inline-flex; gap: 0.25rem; padding: 0.25rem; border-radius: 0.75rem; background: var(--surface-muted); border: 1px solid var(--line); }
.switch button {
  font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer;
  border: 0; background: none; color: var(--muted);
  padding: 0.4rem 0.9rem; border-radius: 0.5rem;
}
.switch button:hover { color: var(--foreground); }
.switch button[aria-selected="true"] { background: var(--surface); color: var(--foreground); box-shadow: var(--shadow); }
.switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
