/* ============================================================
   Subtext — marketing site
   Design: calm, predictable, explicit. Low-stimulation IS the brand.
   ============================================================ */

/* Colour, type and shape tokens come from tokens.css — an identical copy of the
   practice space's file (SubtextWeb/scripts/sync-tokens.sh keeps them in step).
   Design F (Oct 2026): Atkinson Hyperlegible for reading, Charter for headings,
   sentence-case labels, 12px buttons and 16px cards — the same as the app. */
:root {
  --shell: #23221f;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --shell: #0a0a09; } }
:root[data-theme="dark"] { --shell: #0a0a09; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
}

.sans, button, .btn, nav, .chip, .eyebrow {
  font-family: var(--font-sans);
}
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; }
h1 { font-size: clamp(34px, 5.4vw, 56px); line-height: 1.06; letter-spacing: -0.015em; margin: 0.25em 0; text-wrap: balance; }
h2 { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.12; letter-spacing: -0.012em; margin: 0 0 0.4em; text-wrap: balance; }
h3 { font-size: 19px; margin: 0 0 6px; }
p { margin: 0.55em 0 1em; max-width: 66ch; }
a { color: var(--accent); }
ul { padding-left: 20px; }
li { margin: 6px 0; }

.eyebrow {
  font-size: 14px; font-weight: 700; color: var(--accent);
}
.dim { color: var(--ink2); }
.small { font-size: 14px; color: var(--ink2); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
section { padding: 84px 0; }
section.alt { background: var(--surface2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- nav ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topnav .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.logomark { width: 26px; height: 26px; flex: none; }
.navlinks { display: flex; align-items: center; gap: 22px; font-size: 14px; }
/* 3px of vertical padding takes these from 23.1px to 29.1px, clearing the
   24px minimum target size without changing the visual rhythm. */
.navlinks a { color: var(--ink2); text-decoration: none; padding: 3px 0; }
.navlinks a:hover { color: var(--accent); }
@media (max-width: 720px) { .navlinks a.hideable { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  border: none; cursor: pointer; text-decoration: none;
  font-size: 16px; font-weight: 700; letter-spacing: 0;
  padding: 12px 22px; border-radius: var(--radius-btn);
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-deep); }
/* Secondary: the same filled button the practice space uses. */
.btn.ghost { background: var(--chip); color: var(--ink); border: 1px solid var(--line-strong); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.small { padding: 9px 16px; font-size: 15px; min-height: 40px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 60px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; align-items: center; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero .lede { font-size: 20px; color: var(--ink2); max-width: 54ch; }
.hero .ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; align-items: center; }
.hero .proof { margin-top: 18px; font-size: 13.5px; color: var(--ink3); font-family: var(--font-sans); }

/* ---------- pill badge ---------- */
.pill {
  display: inline-block; background: var(--wash); color: var(--accent);
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 700;
  padding: 7px 14px; border-radius: 8px; margin-bottom: 6px;
}

/* ---------- privacy line (hero lock card) ---------- */
.privacy-line {
  display: flex; align-items: center; gap: 10px; background: var(--surface2);
  border-radius: 12px; padding: 14px 18px; margin: 22px 0 0; font-size: 14.5px;
  color: var(--ink2); max-width: 56ch;
}
.privacy-line .ico { flex: none; }

/* ---------- flat preview card (hero + feature rows) ---------- */
.previewcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.08); overflow: hidden;
}
.previewcard .pc-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.previewcard .pc-head b { font-size: 17px; font-family: var(--font-serif); }
.previewcard .pc-head span { font-size: 14px; color: var(--ink3); font-family: var(--font-sans); }
.previewcard .pc-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.previewcard .pc-body .bubble { font-size: 15px; }
.previewcard .pc-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px 16px; }
.previewcard .pc-tags span { font-size: 13px; padding: 3px 9px; border-radius: var(--radius-chip); background: var(--chip); color: var(--ink2); }
.previewcard img.real { width: 100%; display: block; }

/* ---------- stat band ---------- */
.statband { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.statband .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; padding: 22px 28px; }
.statband .item {
  font-family: var(--font-sans);
  font-size: 14.5px; font-weight: 700; color: var(--ink2);
}

/* ---------- alternating feature rows ---------- */
.featurerows { display: flex; flex-direction: column; gap: 64px; margin-top: 44px; }
.featurerow { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.featurerow.rev { grid-template-columns: 1fr 1fr; }
.featurerow.rev .ftext { order: 2; }
.featurerow.rev .fshot { order: 1; }
@media (max-width: 820px) {
  .featurerow, .featurerow.rev { grid-template-columns: 1fr; }
  .featurerow.rev .ftext, .featurerow.rev .fshot { order: initial; }
}
.featurerow .ficon {
  width: 44px; height: 44px; border-radius: 11px; background: var(--wash); color: var(--accent);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.featurerow .ficon svg { width: 22px; height: 22px; }
.featurerow p { color: var(--ink2); font-size: 16px; }
.featurerow .shotcard { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,0.08); max-width: 320px; }
.featurerow .shotcard img { width: 100%; display: block; }

/* ---------- trust band ---------- */
.trustband { background: var(--shell); color: #fff; text-align: center; padding: 80px 0; }
.trustband .lock { font-size: 34px; margin-bottom: 18px; }
.trustband h2 { color: #fff; }
.trustband p { color: rgba(255,255,255,0.72); max-width: 64ch; margin: 0 auto; font-size: 16.5px; }

/* ---------- scenario packs ---------- */
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 36px; }
.packcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 24px; }
.packcard.fun { background: var(--wash); border-color: var(--accent); }
.packcard h3 { margin-bottom: 8px; }
.packcard.fun h3 { color: var(--accent); }
.packcard p { font-size: 14.5px; color: var(--ink2); margin: 0; }

/* ---------- CTA band ---------- */
.ctaband { background: var(--accent); color: var(--accent-ink); text-align: center; padding: 76px 0; }
.ctaband h2 { color: var(--accent-ink); margin-bottom: 28px; }
.ctaband .btn.primary { background: var(--accent-ink); color: var(--accent); }
.ctaband .btn.primary:hover { text-decoration: underline; }

/* ---------- chat bubbles + reply chips (hero preview) ---------- */
.bubble { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45; }
.bubble.them { background: var(--bubble-them); color: var(--ink); border-bottom-left-radius: 5px; align-self: flex-start; }
/* --accent-ink, not #fff — white fails on the dark-mode teal (3.28:1). */
.bubble.me { background: var(--bubble-me); color: var(--accent-ink); border-bottom-right-radius: 5px; align-self: flex-end; }
.replychips { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.replychips .chip {
  border: 1px solid var(--line-strong); background: var(--chip); color: var(--ink);
  border-radius: var(--radius-btn); padding: 10px 14px; min-height: 44px; font-size: 15px; font-weight: 400; text-align: left;
}
.replychips .chip.suggested { border-color: var(--accent); }
.showcase-note { font-size: 16px; color: var(--ink2); max-width: 62ch; margin-top: 4px; }

/* mockup row in showcase */
.showcase { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 34px; justify-items: center; margin-top: 40px; }
figure { margin: 0; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 36px 0 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px 22px; }
.stat .k { font-family: var(--font-sans); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.stat .l { font-size: 14px; color: var(--ink2); margin-top: 6px; line-height: 1.45; }
.stat .src { font-size: 11.5px; color: var(--ink3); margin-top: 8px; font-family: var(--font-sans); }

/* ---------- how it works ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 36px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 24px; }
.step .n {
  display: inline-flex; width: 34px; height: 34px; border-radius: 50%;
  background: var(--wash); color: var(--accent); font-weight: 700; font-size: 15px;
  align-items: center; justify-content: center; margin-bottom: 14px;
  font-family: var(--font-sans);
}
.step p { font-size: 15px; color: var(--ink2); margin-bottom: 0; }

/* ---------- never / instead ---------- */
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
@media (max-width: 760px) { .twocol { grid-template-columns: 1fr; } }
.pledge { border-radius: var(--radius-card); padding: 26px 28px; border: 1px solid var(--line); background: var(--surface); }
.pledge h3 { display: flex; align-items: center; gap: 10px; }
.pledge ul { list-style: none; padding: 0; margin: 14px 0 0; }
.pledge li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; margin: 12px 0; }
.pledge .mark { flex: none; width: 20px; height: 20px; margin-top: 3px; }
.pledge.never .mark { color: var(--ink3); }
.pledge.instead .mark { color: var(--accent); }

/* ---------- story ---------- */
.story .wrap { max-width: 820px; }
.commit {
  background: var(--wash); border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0; padding: 20px 26px; margin: 28px 0;
}
.commit p { margin: 0.4em 0; }

/* ---------- pricing ---------- */
.pricegrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin-top: 36px; max-width: 720px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; position: relative; }
.plan.star { border-color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent); }
.plan .badge {
  position: absolute; top: -12px; left: 24px; right: 24px; background: var(--accent); color: var(--accent-ink);
  font-size: 13px; font-weight: 700;
  padding: 4px 12px; border-radius: 8px; font-family: var(--font-sans);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: max-content; max-width: calc(100% - 48px);
}
.plan .price { font-family: var(--font-sans); font-size: 34px; font-weight: 700; letter-spacing: -0.02em; margin: 8px 0 0; }
.plan .per { font-size: 13px; color: var(--ink2); margin-bottom: 16px; font-family: var(--font-sans); }
.plan ul { list-style: none; padding: 0; margin: 0; }
.plan li { font-size: 15px; padding-left: 26px; position: relative; margin: 9px 0; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.anchorline { font-size: 21px; font-style: italic; max-width: 56ch; margin-top: 34px; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; }
details { border-bottom: 1px solid var(--line); padding: 4px 0; }
summary {
  cursor: pointer; font-family: var(--font-sans);
  font-weight: 600; font-size: 16.5px; padding: 16px 0; list-style: none; position: relative; padding-right: 34px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 22px; color: var(--accent); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { margin-top: 0; }

/* ---------- waitlist ---------- */
.waitlist { text-align: left; }
.wlform { margin-top: 30px; max-width: 560px; }
.wlrow { display: flex; gap: 10px; flex-wrap: wrap; }
.wlrow input[type="email"] {
  flex: 1; min-width: 240px; font-size: 16px; padding: 13px 16px;
  border-radius: var(--radius-btn); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-family: var(--font-sans);
}
.wlrow input[type="email"]:focus { border-color: var(--accent); outline: none; }
.wlq { margin-top: 18px; }
.wlq label { display: block; font-family: var(--font-sans); font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
.wlq .opts { display: flex; flex-wrap: wrap; gap: 8px; }
.wlq .opt {
  font-family: var(--font-sans);
  font-size: 15px; padding: 9px 14px; min-height: 40px; border-radius: var(--radius-chip); cursor: pointer;
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink2);
}
.wlq .opt[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--wash); font-weight: 600; }
.wlnote { font-size: 13px; color: var(--ink3); margin-top: 14px; font-family: var(--font-sans); }
.wlsuccess {
  display: none; background: var(--wash); border: 1px solid var(--accent); border-radius: 12px;
  padding: 18px 22px; margin-top: 20px; max-width: 560px;
}
.wlsuccess.show { display: block; }
.wlsuccess h3 { color: var(--accent); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0 60px; font-size: 14px; color: var(--ink2); }
footer .cols { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
footer .crisis { background: var(--surface2); border-radius: 10px; padding: 14px 18px; margin-top: 26px; font-size: 13.5px; max-width: 72ch; }

/* ---- accessibility helpers ---- */
.sronly {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}
.skiplink {
  position:absolute; left:8px; top:-56px; z-index:200;
  /* --accent-ink, not #fff: in dark mode --accent is a bright teal and white
     text on it measures 2.34:1. --accent-ink flips to dark ink there. */
  background:var(--accent); color:var(--accent-ink);
  padding:10px 16px; border-radius:0 0 10px 10px;
  text-decoration:none; font-weight:600; font-size:14.5px;
  transition:top .12s ease;
}
.skiplink:focus { top:0; }

/* ---------- release notes ----------
   A dated list, so <ol> with the markers suppressed — the order carries
   meaning (newest first) even though we don't want numerals. */
.releases { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 52px; }
.release { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 32px; }
.rmeta { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; position: sticky; top: 88px; align-self: start; }
.rdate {
  font-family: var(--font-sans);
  font-size: 13.5px; font-weight: 700; color: var(--ink2);
  letter-spacing: 0.02em;
}
.rtag {
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 700;
  padding: 3px 10px; border-radius: 8px; background: var(--wash); color: var(--accent);
}
.rbody { border-left: 1px solid var(--line); padding-left: 32px; }
.rbody h2 { font-size: clamp(23px, 3vw, 30px); margin: 0 0 10px; }
.rbody h3 {
  font-family: var(--font-sans);
  font-size: 16px; margin: 26px 0 4px; display: flex; align-items: center; gap: 10px;
}
.rbody p { margin: 0; }
.rlede { font-size: 18px; color: var(--ink2); margin-bottom: 4px !important; max-width: 60ch; }
.chip {
  font-size: 13px; font-weight: 700;
  padding: 3px 9px; border-radius: 8px; flex: none;
}
/* Change type is real state, so it gets its own colour rather than the accent. */
.chip.new      { background: var(--wash); color: var(--accent); }
.chip.improved { background: var(--chip); color: var(--ink2); }
.chip.fixed    { background: var(--amber-wash); color: var(--amber-ink); }

@media (max-width: 780px) {
  .release { grid-template-columns: 1fr; gap: 12px; }
  .rmeta { position: static; flex-direction: row; align-items: center; gap: 12px; }
  .rbody { border-left: 0; padding-left: 0; }
}

/* ---------- how it works: three ordered steps ----------
   Numbered because the order is real — read the rule, run it, take it with
   you — not because numerals decorate well. Reads left→right as progression,
   the same rule the scenario map follows. */
.steps {
  list-style: none; margin: 36px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px;
}
.step {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 24px;
}
.stepnum {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 999px;
  background: var(--wash); color: var(--accent);
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 700; margin-bottom: 14px;
}
.step h3 { margin: 0 0 8px; }
.step p { font-size: 14.5px; color: var(--ink2); margin: 0 0 10px; max-width: none; }
.step p:last-child { margin-bottom: 0; }
/* Which tools cover this step — a quiet caption, not a feature badge row. */
.stepwho {
  font-family: var(--font-sans);
  font-size: 12.5px; color: var(--ink3) !important; letter-spacing: 0.01em;
}

/* ---------- closing CTA ---------- */
.ctasub {
  color: var(--accent-ink); opacity: 0.82;
  max-width: 56ch; margin: 0 auto 26px; font-size: 16px;
}
/* The global link colour is --accent, which on this band is teal on teal.
   Inherit the band's ink instead. */
.ctaband a:not(.btn) { color: var(--accent-ink); text-decoration: underline; }
.ctaband :focus-visible { outline-color: var(--accent-ink); }
