/* Wortken web: the app's tokens (mobile/src/theme/tokens.ts) carried to the page. */

@font-face { font-family: "Geist"; src: url("/fonts/Geist_400Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/Geist_500Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/Geist_600SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/GeistMono_400Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/InstrumentSerif_400Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/InstrumentSerif_400Regular_Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #F2EFE8;
  --surface: #FFFFFF;
  --sunken: #EEEAE2;
  --ink: #1A1916;
  --muted: #6B675E;
  --faint: #9C978D;
  --line: #E4DFD4;
  --accent: #C8552F;
  --accent-ink: #B04A27;          /* accent as text on paper, AA at body size */
  --accent-soft: rgba(200, 85, 47, 0.10);
  --on-accent: #FFFFFF;
  --ok: #2F8150;
  --ok-soft: rgba(47, 129, 80, 0.10);
  --shadow: 0 3px 7px rgba(26, 25, 22, 0.07), 0 1px 2px rgba(26, 25, 22, 0.04);
  --shadow-lift: 0 14px 34px -12px rgba(26, 25, 22, 0.20), 0 3px 7px rgba(26, 25, 22, 0.06);

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 18px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --surface: #1D1C1A;
    --sunken: #2A2926;
    --ink: #F1EDE5;
    --muted: #A8A397;
    --faint: #77736A;
    --line: #2C2A27;
    --accent: #EA7F57;
    --accent-ink: #EA7F57;
    --accent-soft: rgba(234, 127, 87, 0.15);
    --on-accent: #121211;
    --ok: #6FBF8B;
    --ok-soft: rgba(111, 191, 139, 0.14);
    --shadow: none;
    --shadow-lift: 0 18px 40px -16px rgba(0, 0, 0, 0.6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: var(--accent); color: var(--on-accent); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- nav ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.lockup { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 600 21px/1 var(--sans); letter-spacing: -0.04em; }
.bubble {
  width: 25px; height: 23px; display: inline-grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  border-radius: 12.5px 12.5px 12.5px 3.5px;
  font: italic 400 22px/1 var(--serif); letter-spacing: 0; padding-bottom: 4px;
}
.nav ul { display: flex; gap: clamp(14px, 3vw, 28px); list-style: none; margin: 0; padding: 0; font-size: 15px; color: var(--muted); }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--ink); }
@media (max-width: 560px) { .nav .hide-s { display: none; } }

/* ---------- store buttons ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 8px 20px 8px 16px;
  border-radius: 29px; background: var(--ink); color: var(--bg);
  text-decoration: none; line-height: 1.1;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}
.store svg { width: 22px; height: 22px; flex: none; }
.store small { display: block; font-size: 11px; opacity: 0.72; letter-spacing: 0.01em; }
.store b { display: block; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
a.store:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.store[aria-disabled="true"] { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent); cursor: default; }
.stores-note { font-size: 14px; color: var(--muted); margin: 12px 0 0; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 96px; padding-block: 28px 40px; font-size: 14px; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.foot ul { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 0; padding: 0; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---------- document pages (privacy, delete, support) ---------- */
.doc { max-width: 68ch; padding-block: clamp(32px, 6vw, 72px) 0; }
.doc h1 { font: 400 clamp(44px, 7vw, 72px)/1 var(--serif); letter-spacing: -0.02em; margin: 0 0 14px; text-wrap: balance; }
.doc .updated { font: 400 13px/1.4 var(--mono); color: var(--muted); margin: 0 0 36px; }
.doc .lede { font-size: 20px; line-height: 1.5; margin: 0 0 8px; }
.doc h2 { font: 600 19px/1.3 var(--sans); letter-spacing: -0.01em; margin: 52px 0 12px; }
.doc h3 { font: 600 16px/1.3 var(--sans); margin: 28px 0 6px; }
.doc p, .doc li { color: color-mix(in srgb, var(--ink) 88%, var(--bg)); }
.doc ul, .doc ol { padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--accent); }
.doc strong { font-weight: 600; color: var(--ink); }
.doc .panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin: 24px 0; }
.doc .panel > :first-child { margin-top: 0; }
.doc .panel > :last-child { margin-bottom: 0; }
.doc dl { margin: 0; }
.doc dt { font-weight: 600; margin-top: 22px; }
.doc dt:first-child { margin-top: 0; }
.doc dd { margin: 4px 0 0; color: var(--muted); }
.doc .path { font: 500 15px/1.4 var(--sans); white-space: nowrap; background: var(--sunken); padding: 2px 8px; border-radius: 8px; }
.data-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 6px 28px; padding: 16px 0; border-top: 1px solid var(--line); }
.data-row:last-child { border-bottom: 1px solid var(--line); }
.data-row h3 { margin: 0; }
.data-row p { margin: 0; color: var(--muted); }
@media (max-width: 640px) { .data-row { grid-template-columns: 1fr; } }
