/* theme.css: brings every older page (guides, book, check, founding, legal) onto the Nov 12
   design (DESIGN.md). Load it LAST. It re-points the old token names to the new palette,
   swaps the type, makes primary buttons ink, and styles the shared header and footer
   (rk-* classes, so nothing collides with the older stylesheets). */

/* type: the older sheets ask for Inter or Geist; both now resolve to Schibsted Grotesk */
@font-face { font-family: 'Schibsted Grotesk'; src: url('/fonts/schibsted-grotesk-latin.woff2') format('woff2');
  font-style: normal; font-weight: 400 900; font-display: swap; }
@font-face { font-family: Inter; src: url('/fonts/schibsted-grotesk-latin.woff2') format('woff2');
  font-style: normal; font-weight: 100 900; font-display: swap; }
@font-face { font-family: Geist; src: url('/fonts/schibsted-grotesk-latin.woff2') format('woff2');
  font-style: normal; font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --ground: #faf9f6; --raised: #ffffff; --ink: #1c1b18; --muted: #5f5c56; --line: #e6e3dc;
  --accent: #c2410c; --on-accent: #ffffff; --soft: #fbefe7; --alt: #f3f1ec;
  --btn: #1c1b18; --on-btn: #ffffff; --ok: #1d7a45; --good: #1d7a45; --bad: #c2362b;
  /* check.css names */
  --bg: #faf9f6; --panel: #ffffff; --accent-ink: #ffffff;
  /* styles.css names */
  --font: 'Schibsted Grotesk', system-ui, -apple-system, sans-serif;
  --amber: #c2410c; --on-amber: #ffffff; --amber-ink: #c2410c; --band: #f3f1ec;
  --bubble: #f3f1ec; --me-bg: #1c1b18; --me-ink: #ffffff;
  --rk-font: 'Schibsted Grotesk', system-ui, -apple-system, sans-serif;
  --rk-gutter: clamp(20px, 4.4vw, 64px);
}
/* Nov 21: light by default like the home page; dark only when picked */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #191918; --raised: #222220; --ink: #ecebe7; --muted: #a6a39c; --line: #34332f;
  --accent: #f0894b; --on-accent: #191918; --soft: #2a2420; --alt: #1e1e1d;
  --btn: #ecebe7; --on-btn: #191918; --ok: #4cc985; --good: #4cc985; --bad: #ff7b70;
  --bg: #191918; --panel: #222220; --accent-ink: #191918;
  --amber: #f0894b; --on-amber: #191918; --amber-ink: #f0894b; --band: #1e1e1d;
  --bubble: #2a2a28; --me-bg: #ecebe7; --me-ink: #191918;
}
:root { --edge: var(--line); }

html body { font-family: var(--rk-font); background: var(--ground); color: var(--ink); }
html body h1, html body h2 { letter-spacing: -.035em; font-weight: 600; text-wrap: balance; }
html body h1 { line-height: 1.04; }
html body h3 { letter-spacing: -.015em; font-weight: 600; }
html body { -webkit-font-smoothing: antialiased; }

/* primary actions are ink everywhere (deploy.css .btn-primary, check.css buttons) */
html body .btn-primary { background: var(--btn); color: var(--on-btn); box-shadow: none; }
html body .btn-quiet { background: transparent; border-color: var(--edge); }
html body button[type="submit"], html body .check-btn { background: var(--btn); color: var(--on-btn); }

/* shared header */
.rk-top { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(10px);
  background: color-mix(in oklab, var(--ground) 82%, transparent); border-bottom: 1px solid var(--edge); }
/* same content width as deploy.css .wrap (1224px), so header, page and footer edges line up */
.rk-in { width: 100%; max-width: calc(1224px + 2 * var(--rk-gutter)); margin: 0 auto; padding: 0 var(--rk-gutter); }
.rk-top .rk-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.rk-brand { display: flex; align-items: center; gap: 8px; font: 700 19px/1 var(--rk-font);
  text-decoration: none; letter-spacing: -.01em; color: var(--ink); }
.rk-brand svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 2.2; }
.rk-brand .rk-dot { color: var(--accent); }
.rk-nav { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.rk-nav a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; color: var(--muted);
  font: 400 15px/1 var(--rk-font); padding: 0 12px; border-radius: 8px;
  transition: color .15s cubic-bezier(.2, .8, .2, 1), background-color .15s cubic-bezier(.2, .8, .2, 1); }
.rk-nav a:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 5%, transparent); }
.rk-nav a.rk-btn { min-height: 36px; padding: 0 14px; margin-left: 8px; border-radius: 9px; background: var(--btn);
  color: var(--on-btn); font: 600 14px/1 var(--rk-font);
  transition: background-color .15s cubic-bezier(.2, .8, .2, 1), transform .15s cubic-bezier(.2, .8, .2, 1); }
.rk-nav a.rk-btn:hover { background: color-mix(in oklab, var(--btn) 88%, var(--ground)); }
.rk-nav a.rk-btn:active { transform: scale(.98); }
@media (max-width: 680px) { .rk-wide { display: none; } }

/* shared footer */
.rk-foot { border-top: 1px solid var(--edge); padding: 28px 0 40px; margin-top: 64px;
  color: var(--muted); font: 400 14px/1.55 var(--rk-font); }
.rk-foot .rk-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rk-foot ul { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; margin: 0; padding: 0; }
.rk-foot a { color: inherit; text-decoration: none; } .rk-foot a:hover { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .rk-nav a.rk-btn { transition: none; } }

/* older-page details brought in line with the don't-list: no all-caps mono labels,
   ink buttons on /check and /founding */
html body .eyebrow, html body .crumbs ol, html body .guide-card .mono, html body .script-card .mono,
html body .data-table thead th, html body .day small {
  text-transform: none; letter-spacing: 0; font-family: var(--rk-font); font-size: .8125rem; }
html body .guide-card .mono, html body .script-card .mono { color: var(--muted); font-weight: 600; }
html body .eyebrow .status-dot { display: none; }
html body #sample, html body #picker::file-selector-button {
  background: var(--btn); color: var(--on-btn); }

/* /book: Google Calendar booking page embedded (books straight onto the calendar) */
html body .book-embed { display: grid; gap: 10px; }
html body .book-embed .cal { width: 100%; height: 680px; border: 1px solid var(--edge); border-radius: 14px;
  background: #fff; }
html body .book-embed .fine a { color: var(--accent); }
html body .cal-wrap { position: relative; }
html body .cal-wrap .cal { display: block; }
html body .cal-load { position: absolute; inset: 0; margin: auto; width: max-content; height: 44px; padding: 0 18px;
  border: 0; border-radius: 10px; background: var(--btn); color: var(--on-btn); font: 600 15px/1 var(--rk-font); cursor: pointer; }
html body .cal-load:disabled { background: transparent; color: var(--muted); cursor: default; }
@media (max-width: 640px) { html body .book-embed .cal { height: 760px; } }

/* Lenis smooth scroll on every page (same feel as the homepage). */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* One accent (#c2410c), used sparingly: links, one headline word, small step numbers. */
.hl { color: var(--accent); }

/* Eleven look on the older pages too (Nov 21): neutral greys, pill buttons */
:root:not([data-theme="dark"]) { --ground: #fdfdfc; --bg: #fdfdfc; --alt: #f5f5f4; --band: #f5f5f4; --line: #ebebe9; --ink: #0d0d0e; --muted: #5d5f64; --btn: #0d0d0e; }
.btn, button.btn, .rk-btn, a.btn { border-radius: 999px !important; }

/* Neutral dark (founder rule: no warm/brown dark). */
:root[data-theme="dark"] { --ground: #111112; --bg: #111112; --raised: #1a1a1c; --alt: #161618; --band: #161618;
  --ink: #ededee; --muted: #a1a1a6; --btn: #ededee; --on-btn: #111112; --panel: #1a1a1c; --accent-ink: #111112; }
