/* Oarly site. Same materials as the app: cut-paper banks, a flat cool river at low
   sun, and one warm lantern. Every colour below is a value from design/tokens.json —
   that file is the source, this is a copy of it for the web. */

/* Bundled with the site, not fetched. The app does the same (tokens.json §type). */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/NunitoSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/NunitoSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #F6E7CE;
  --surface: #FFF6E6;
  --surface-high: #FFFFFF;
  --text: #1A2436;
  --text-muted: #56607A;
  --bank: #E6CDA2;
  --bank-far: #D4B98C;
  --on-bank: #1A2436;
  --water: #2F4F7A;
  --water-deep: #1C3356;
  --on-water: #F6E7CE;
  --reed: #5B6A2E;
  --accent: #DE7A26;
  --on-accent: #1A2436;
  --accent-soft: #F2C286;
  --on-accent-soft: #1A2436;
  --focus: #8F4A17;
  --focus-contrast: #FFFFFF;
  --danger: #B14430;
  --success: #43693F;
  --link: #2F4F7A;
  --rule: rgba(26, 36, 54, 0.14);
  --shadow-sheet: 0 2px 8px rgba(90, 60, 25, 0.10);
  --shadow-dialog: 0 8px 28px rgba(90, 60, 25, 0.18);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --text-face: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171E2B;
    --surface: #212A3A;
    --surface-high: #2C3648;
    --text: #EFE3CE;
    --text-muted: #A2A8B8;
    --bank: #B99E74;
    --bank-far: #9C8560;
    --on-bank: #15202F;
    --water: #1B2E4D;
    --water-deep: #111C31;
    --on-water: #DCCFB6;
    --reed: #2F3A1A;
    --accent: #F0A04B;
    --on-accent: #1F1708;
    --accent-soft: #5A4228;
    --on-accent-soft: #EFE3CE;
    --focus: #F0A04B;
    --focus-contrast: #15202F;
    --danger: #E3836D;
    --success: #8DB47F;
    --link: #8FB6E2;
    --rule: rgba(239, 227, 206, 0.14);
    --shadow-sheet: 0 2px 8px rgba(0, 0, 0, 0.40);
    --shadow-dialog: 0 8px 28px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--text-face);
  overflow-x: hidden;
}
/* height:auto keeps the width/height attributes from distorting the image */
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }

/* The ring is two concentric strokes: no single colour clears 3:1 on both a near-black
   sheet and a tan passenger token. See design/tokens.json → focusRing. */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-contrast);
  border-radius: 8px;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--surface); color: var(--text);
  padding: 12px 18px; border-radius: 0 0 12px 0; z-index: 20;
}
.skip:focus { left: 0; }

/* ---------- Top bar ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.brand b { font: 700 25px/1 var(--display); letter-spacing: -0.01em; }
.bar nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 18px; font-size: 15px; }
@media (max-width: 560px) {
  .bar { padding: 14px 0; }
  .bar nav { gap: 2px 13px; font-size: 14px; }
  .brand b { font-size: 22px; }
  .brand img { width: 30px; height: 30px; }
}
/* padding, not line-height, so the hit area clears 24px without moving the text */
.bar nav a { text-decoration: none; color: var(--text-muted); display: inline-block; padding: 6px 0; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--text); }

/* ---------- The lantern button ---------- */
.lantern-button {
  display: inline-flex; align-items: center; gap: 11px;
  background: var(--accent); color: var(--on-accent);
  border: 0; border-radius: 14px; padding: 16px 24px;
  font: 700 19px/1 var(--text-face); text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow-sheet);
  transition: transform 120ms ease;
}
.lantern-button:hover { transform: translateY(-1px); }
.lantern-button:active { transform: translateY(1px); }
.lantern-button svg { width: 20px; height: 20px; flex: none; }

.quiet-button {
  background: var(--surface); color: var(--text);
  border: 1.5px solid var(--rule); border-radius: 12px;
  padding: 10px 16px; font: 700 15px/1 var(--text-face); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px;
}
.quiet-button[disabled] { opacity: 0.45; cursor: default; }
.quiet-button svg { width: 18px; height: 18px; flex: none; }

/* ---------- Hero ---------- */
.hero { display: grid; gap: 34px; padding: 10px 0 64px; align-items: center; }
@media (min-width: 940px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; padding: 40px 0 88px; }
}
.hero h1 {
  font: 700 clamp(40px, 7.6vw, 68px)/1.02 var(--display);
  letter-spacing: -0.02em; margin: 0 0 18px; max-width: 13ch;
}
.hero .lede { font-size: 19px; color: var(--text-muted); margin: 0 0 26px; max-width: 42ch; }
.hero .proof { margin: 16px 0 0; font-size: 14px; color: var(--text-muted); }

/* ---------- The playable crossing ---------- */
.crossing {
  background: var(--surface); border-radius: 22px; padding: 14px;
  box-shadow: var(--shadow-dialog); overflow: hidden;
}
.crossing-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 2px 4px 12px;
}
.crossing-head h2 { font: 700 19px/1.2 var(--display); margin: 0; }
.crossing-head p { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); }
.crossing-count { font-size: 14px; color: var(--text-muted); white-space: nowrap; }
.crossing-count b { font-size: 21px; color: var(--text); }

.river { border-radius: 14px; overflow: hidden; }
.bank {
  background: var(--bank); color: var(--on-bank);
  padding: 12px 10px; min-height: 104px;
  display: flex; flex-direction: column; gap: 8px;
}
.bank.far { background: var(--bank-far); }
/* No opacity here: on-bank/bank is a gated 4.5:1 pair in tokens.json, and fading
   it to 0.72 drops the far-bank label under AA in both modes. */
.bank-label { font-size: 12px; color: var(--on-bank); text-align: center; }
.tokens { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.token {
  width: clamp(58px, 17vw, 74px);
  background: var(--surface); color: var(--text);
  border: 1.5px solid var(--rule); border-radius: 12px;
  padding: 6px 4px 5px; cursor: pointer;
  display: grid; place-items: center; gap: 2px;
  font: 400 11px/1.2 var(--text-face);
  box-shadow: var(--shadow-sheet);
  transition: transform 120ms ease;
}
.token svg { width: clamp(30px, 9vw, 40px); height: clamp(30px, 9vw, 40px); display: block; }
/* Who can work the pole is said in the rules list and enforced by the disabled
   Push off button — never by colour alone. */
.token:hover { transform: translateY(-2px); }
.token[disabled] { cursor: default; opacity: 0.5; }

.water {
  background: linear-gradient(var(--water), var(--water-deep) 60%, var(--water));
  padding: 14px 10px; min-height: 96px;
  display: flex; align-items: center;
}
.raft {
  background: var(--accent-soft); color: var(--on-accent-soft);
  border-radius: 12px; padding: 8px; min-height: 76px;
  width: min(62%, 240px);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: margin-left 420ms cubic-bezier(.4, 0, .2, 1);
  margin-left: 0;
}
.raft[data-side="far"] { margin-left: calc(100% - min(62%, 240px)); }
.raft .empty { font-size: 13px; opacity: 0.8; }
.raft .token { box-shadow: none; }

.controls { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 2px 0; }
.push {
  width: 100%; justify-content: center; margin-top: 10px;
  border: 0; border-radius: 14px; min-height: 52px;
  background: var(--accent); color: var(--on-accent);
  font: 700 17px/1 var(--text-face); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.push[disabled] { opacity: 0.45; cursor: default; }

.say {
  margin: 12px 2px 0; padding: 11px 13px; border-radius: 10px;
  background: var(--surface-high); border-left: 4px solid var(--rule);
  font-size: 15px; color: var(--text); min-height: 3.2em;
}
.say[data-tone="broken"] { border-left-color: var(--danger); }
.say[data-tone="hint"] { border-left-color: var(--accent); }
.say[data-tone="solved"] { border-left-color: var(--success); }
.say b { color: var(--text); }

.rules { margin: 12px 2px 0; padding: 0 0 0 1.1rem; font-size: 14px; color: var(--text-muted); }
.rules li { margin: 3px 0; }

/* ---------- Feature rows ---------- */
.rows { display: grid; gap: 72px; padding: 16px 0 80px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; }
@media (min-width: 840px) {
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
  .row.flip .shot { order: 2; }
}
.row h2 { font: 700 clamp(27px, 4vw, 38px)/1.1 var(--display); margin: 0 0 12px; letter-spacing: -0.01em; }
.row p { margin: 0 0 12px; color: var(--text-muted); max-width: 44ch; }
.row .pull {
  font: 700 19px/1.4 var(--text-face); color: var(--text);
  border-left: 4px solid var(--accent); padding: 2px 0 2px 15px; margin-top: 18px;
}
.shot {
  margin: 0; /* figures carry a 40px default side margin */
  justify-self: center; width: min(300px, 78vw);
  border-radius: 28px; padding: 9px; background: var(--water-deep);
  box-shadow: var(--shadow-dialog);
}
.shot img { border-radius: 21px; }

/* ---------- Teaser slot ---------- */
.teaser { padding: 0 0 80px; }
.teaser h2 { font: 700 clamp(26px, 3.6vw, 34px)/1.1 var(--display); margin: 0 0 10px; }
.teaser p { color: var(--text-muted); max-width: 54ch; margin: 0 0 20px; }
.video-slot {
  position: relative; border-radius: 20px; overflow: hidden;
  background: var(--water-deep); aspect-ratio: 16 / 9;
  display: grid; place-items: center; max-width: 820px;
}
.video-slot iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-slot .pending {
  color: var(--on-water); text-align: center; padding: 24px; max-width: 42ch;
  font-size: 15px;
}
.video-slot .play-facade {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: none; border: 0; cursor: pointer; display: grid; place-items: center;
}
.video-slot .play-facade span {
  background: var(--accent); color: var(--on-accent);
  border-radius: 999px; padding: 16px 26px; font: 700 17px/1 var(--text-face);
}

/* ---------- Pricing band ---------- */
.price { padding: 0 0 80px; }
.price-card {
  background: var(--surface); border-radius: 22px; padding: clamp(24px, 5vw, 44px);
  box-shadow: var(--shadow-sheet);
}
.price-card h2 { font: 700 clamp(26px, 3.6vw, 36px)/1.1 var(--display); margin: 0 0 12px; }
.price-card p { color: var(--text-muted); max-width: 60ch; margin: 0 0 12px; }
.price-card p strong { color: var(--text); }
.price-list { display: grid; gap: 8px; padding: 0; margin: 20px 0 0; list-style: none; }
@media (min-width: 720px) { .price-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.price-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.price-list svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--success); }

/* ---------- FAQ ---------- */
.faq { padding: 0 0 80px; }
.faq h2 { font: 700 clamp(26px, 3.6vw, 36px)/1.1 var(--display); margin: 0 0 20px; }
.faq details {
  border-bottom: 1px solid var(--rule); padding: 4px 0;
}
.faq summary {
  cursor: pointer; padding: 14px 2px; font-weight: 700; font-size: 17px;
  list-style: none; display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  /* text-muted, not accent: the marker reports open/closed state, so it has to
     clear 3:1 on the page background, which accent does not do in light mode. */
  content: "+"; color: var(--text-muted); font: 700 24px/1 var(--text-face); flex: none;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0 2px 16px; color: var(--text-muted); max-width: 62ch; }

/* ---------- Closing band ---------- */
.closing {
  background: var(--water-deep); color: var(--on-water); border-radius: 26px;
  padding: clamp(28px, 6vw, 56px); display: grid; gap: 24px; align-items: center;
  margin-bottom: 72px;
}
@media (min-width: 840px) { .closing { grid-template-columns: minmax(0, 1.4fr) auto; } }
.closing h2 { font: 700 clamp(26px, 3.8vw, 40px)/1.08 var(--display); margin: 0 0 10px; }
.closing p { margin: 0; color: #C6CEDC; max-width: 46ch; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--rule); padding: 26px 0 40px; font-size: 14px; color: var(--text-muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
footer nav a { display: inline-block; padding: 6px 0; }

/* ---------- Long-form pages (privacy, 404) ---------- */
.doc { max-width: 44rem; padding: 18px 0 72px; }
.doc h1 { font: 700 clamp(34px, 6vw, 52px)/1.04 var(--display); margin: 10px 0 10px; letter-spacing: -0.015em; }
.doc .meta { color: var(--text-muted); margin: 0 0 28px; }
.doc h2 { font: 700 23px/1.2 var(--display); margin: 36px 0 8px; }
.doc p, .doc li { max-width: 66ch; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin: 4px 0; }
.doc .contact {
  background: var(--surface); border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 14px 18px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
