/* ---------------------------------------------------------------------------
   tandem. — marketing site
   -------------------------------------------------------------------------
   SOURCE OF TRUTH for the design tokens below is mobile/src/theme.css.
   They are COPIED here, not imported: site/ has no build step and is
   deliberately decoupled from the PWA build so a copy tweak can never red the
   app's CI. If a brand token changes in theme.css, mirror it here by hand.

   Dark only, by design — brand/guidelines-v4.md §7 specifies #0A0B0D for all
   marketing surfaces. There is no theme toggle on this page.
   ------------------------------------------------------------------------- */

@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dmsans-var.woff2') format('woff2-variations');
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  /* --- copied from mobile/src/theme.css :root --- */
  --bg-primary: #0A0B0D;
  --bg-surface: #121418;
  --bg-elevated: #1A1C24;
  --text-primary: #ECEAE6;
  --text-secondary: #8E8E93;
  --text-dim: #5A5868;
  /* Child accents are deliberately NOT named after any child: the demo twins on
     this page are placeholders and may change. These mirror the two per-child
     accent tokens in mobile/src/theme.css by VALUE only — the names intentionally
     differ, so re-check the hexes by hand if the brand tokens ever move. */
  --accent-primary: #6B52C8;   /* first child */
  --accent-secondary: #4A82CC; /* second child */
  --gold-ui: #F0AD00;
  --gold-icon: #FFB627;        /* marketing-context gold — guidelines-v4 §4 */
  --border: #252830;
  --success: #7BAE7F;
  --event-sleep: #46588F;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  /* --- page-local --- */
  --measure: 640px;
  --wide: 1080px;
  --gutter: 20px;
  --section-y: 88px;
}

@media (max-width: 640px) {
  :root { --section-y: 64px; }
}

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

html { -webkit-text-size-adjust: 100%; 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-primary);
  color: var(--text-primary);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

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

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

.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--wide { max-width: var(--wide); }

section { padding: var(--section-y) 0; }

/* Lowercase section headers with a 48px gold whisper underline —
   brand/guidelines-v4.md §5 "section header underlines". */
.eyebrow {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 0 0 12px;
}

h2 {
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
  text-transform: none;
}

h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 1.5px;
  margin: 10px 0 0;
  background: var(--gold-ui);
  opacity: 0.88;
}

h3 { font-size: 19px; font-weight: 600; line-height: 1.3; margin: 0 0 6px; }

p { margin: 0 0 18px; color: var(--text-secondary); }
p.lead { color: var(--text-primary); font-size: 19px; }
section > .wrap > p:first-of-type { margin-top: 20px; }

strong { font-weight: 600; color: var(--text-primary); }

.section--surface { background: var(--bg-surface); }

/* --- nav ---------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 11, 13, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 0 10px;
}

.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand__mark { width: 22px; height: 28px; flex: none; }
.brand__word { font-size: 21px; font-weight: 600; letter-spacing: -0.5px; line-height: 1; }
.brand__dot { color: var(--gold-ui); }

.nav__links { display: flex; align-items: center; gap: 6px; }

/* --- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: filter 120ms ease;
}

.btn:hover { filter: brightness(1.12); }
.btn:active { filter: brightness(0.94); }

.btn--primary { background: var(--accent-primary); color: #fff; }
.btn--ghost { background: transparent; color: var(--text-primary); border-color: var(--border); }
.btn--quiet { background: transparent; color: var(--text-secondary); min-height: 44px; padding: 0 12px; }

.btn--lg { min-height: 54px; font-size: 17px; padding: 0 30px; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 26px 0 0; }
.cta-note { font-size: 15px; color: var(--text-dim); margin: 0; }

/* --- hero --------------------------------------------------------------- */

.hero { padding: clamp(48px, 9vw, 92px) 0 var(--section-y); }

.hero h1 {
  font-size: clamp(38px, 8.5vw, 62px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -1.5px;
  margin: 0 0 20px;
}

.hero__sub { font-size: clamp(18px, 2.6vw, 21px); color: var(--text-secondary); max-width: 34ch; margin: 0; }

/* --- vignettes (HTML/CSS recreations of real app surfaces) -------------- */

.vignette {
  margin: 40px 0 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.vignette__label {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  margin: 12px 0 0;
}

/* InfoBar child card — mirrors the app: 3px child-colour left border,
   child-colour tint capped well under the 12% ceiling in guidelines-v4 §4. */
.card {
  position: relative;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--child);
  padding: 14px 16px;
  overflow: hidden;
}

.card + .card { margin-top: 10px; }

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--child) 9%, transparent) 0%, transparent 60%);
  pointer-events: none;
}

.card--primary { --child: var(--accent-primary); }
.card--secondary { --child: var(--accent-secondary); }

.card__name { font-size: 17px; font-weight: 600; line-height: 1.2; margin: 0 0 4px; }
.card__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card__meta { font-size: 14px; color: var(--text-secondary); margin: 0; }

/* Gold is reserved for live/ticking values — guidelines-v4 §4 "live data accent". */
.card__timer { font-size: 20px; font-weight: 600; color: var(--gold-ui); font-variant-numeric: tabular-nums; margin: 0; }

.sync {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
}

.sync__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-ui); flex: none; }
.sync__text { font-size: 15px; margin: 0; color: var(--text-primary); }
.sync__time { font-weight: 600; color: var(--gold-ui); font-variant-numeric: tabular-nums; }

/* chat vignette */
.chat__q, .chat__a {
  border-radius: var(--radius-md);
  padding: 12px 15px;
  font-size: 15px;
  line-height: 1.55;
  max-width: 60ch;
}

/* Matches mobile/src/components/ChatMessage.module.css: a 15% purple tint,
   not a solid fill — child colours are accents, never large fills. */
.chat__q { background: rgba(107, 82, 200, 0.15); color: var(--text-primary); margin: 0 0 12px auto; width: fit-content; }
.chat__a { background: var(--bg-elevated); color: var(--text-primary); }
.chat__a p { color: inherit; }
.chat__a p:last-of-type { margin-bottom: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-primary);
  font-size: 13px;
  color: var(--text-secondary);
}

.pill__count { font-weight: 600; color: var(--text-primary); }

.sources { margin: 10px 0 0; padding: 0 0 0 2px; list-style: none; }
.sources li { font-size: 13px; color: var(--text-secondary); line-height: 1.5; padding: 3px 0; }

/* --- grids -------------------------------------------------------------- */

.grid { display: grid; gap: 18px; margin: 34px 0 0; }
.grid--3 { grid-template-columns: 1fr; }
.grid--2 { grid-template-columns: 1fr; }

@media (min-width: 760px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
}

.tile {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
}

.section--surface .tile { background: var(--bg-elevated); }

.tile__num {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-ui);
  font-variant-numeric: tabular-nums;
  margin: 0 0 10px;
}

.tile p:last-child { margin-bottom: 0; }

/* "what books say vs. what nights look like" — guidelines-v4 §6 */
.beat { padding: 22px 0; border-top: 1px solid var(--border); }
.beat:first-of-type { border-top: 0; }
.beat__said { font-size: 15px; color: var(--text-dim); margin: 0 0 8px; }
.beat__real { font-size: 18px; color: var(--text-primary); margin: 0; }

.checks { list-style: none; margin: 26px 0 0; padding: 0; }
.checks li { position: relative; padding: 0 0 0 26px; margin: 0 0 14px; color: var(--text-secondary); }
.checks li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
}
.checks li:nth-child(even)::before { background: var(--accent-secondary); }

/* --- faq ---------------------------------------------------------------- */

.faq { margin: 34px 0 0; }

.faq details {
  border-top: 1px solid var(--border);
  padding: 4px 0;
}

.faq details:last-of-type { border-bottom: 1px solid var(--border); }

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 34px 18px 0;
  font-weight: 600;
  font-size: 17px;
  position: relative;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: '+';
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--text-dim);
  line-height: 1;
}

.faq details[open] summary::after { content: '\2013'; }
.faq details p { margin: 0 0 18px; }

/* --- founder / honesty -------------------------------------------------- */

.note {
  border-left: 3px solid var(--gold-ui);
  padding: 4px 0 4px 18px;
  margin: 30px 0 0;
}

.note p:last-child { margin-bottom: 0; }

/* --- footer ------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom, 0px));
  font-size: 15px;
  color: var(--text-dim);
}

.footer__links { display: flex; flex-wrap: wrap; gap: 20px; margin: 0 0 16px; padding: 0; list-style: none; }
.footer__links a { color: var(--text-secondary); text-decoration: none; }
.footer__links a:hover { color: var(--text-primary); }
.footer p { color: var(--text-dim); font-size: 14px; margin: 0; }

/* --- screenshots (added in the follow-up capture pass) ------------------ */

.shot {
  margin: 34px auto 0;
  max-width: 380px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface);
}
