/* Glidedown website. One stylesheet, identity B "Steps" (docs/DESIGN.md): amber on warm stone, squared corners,
   a thin amber stair line. Tokens follow the app (ui/theme/TaperColors.kt). No web font files yet (the app bundles
   them, docs/ASSETS.md): Public Sans and Zilla Slab are named first and fall back to system fonts.
   scripts/build-site.py checks the colour pairs against WCAG AA in both themes. */

:root {
  color-scheme: light dark;
  --paper: #E8DED5;
  --card: #FFFFFF;
  --sunk: #E3D8CE;
  --ink: #221F1D;
  --muted: #5F5954;
  --line: #D6CBC1;
  --outline: #837C77;
  --accent: #8A5200;
  --within: #B66D00;
  --within-tint: #FBEBCC;
  --button: #A65300;
  --button-hover: #8C4500;
  --on-button: #FFFFFF;
  --free: #3B8652;

  --font-ui: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Zilla Slab", Georgia, "Noto Serif", "Times New Roman", serif;
  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 12px;
  --gutter: 20px;
  --tread: 2px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1F1C19;
    --card: #292623;
    --sunk: #35312E;
    --ink: #F1EDEA;
    --muted: #AEA7A2;
    --line: #3D3936;
    --outline: #7F7873;
    --accent: #F2B54C;
    --within: #E8A12E;
    --within-tint: #3A2C14;
    --button: #AE5B08;
    --button-hover: #8C4500;
    --on-button: #FFFFFF;
    --free: #5FB97A;
  }
}

@media (max-width: 379px) {
  :root { --gutter: 16px; }
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 26px;
  overflow-wrap: break-word;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { color: var(--ink); }
h2 { font-size: 22px; line-height: 28px; font-weight: 700; }
h3 { font-size: 17px; line-height: 24px; font-weight: 600; }
strong { font-weight: 600; }
.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  line-height: 36px;
  letter-spacing: -0.2px;
}
.small { font-size: 13px; line-height: 18px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }
a[href^="mailto:"], a[href^="tel:"] { overflow-wrap: anywhere; }
:focus-visible {
  outline: 3px solid var(--within);
  outline-offset: 2px;
  border-radius: var(--radius-s);
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 12px 16px;
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius-m);
}
.skip:focus { top: 12px; }

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

/* signature: an underline under one word that steps down one notch */
.tread {
  background-image:
    linear-gradient(var(--within), var(--within)),
    linear-gradient(var(--within), var(--within)),
    linear-gradient(var(--within), var(--within));
  background-repeat: no-repeat;
  background-size: 58% var(--tread), var(--tread) 7px, 42% var(--tread);
  background-position: 0 calc(100% - 5px), 58% 100%, 100% 100%;
}

/* the motif: three treads down to a point on the floor */
.motif { width: 64px; height: 28px; }
.motif path { fill: none; stroke: var(--within); stroke-width: 2; }
.motif circle { fill: var(--within); }

/* header */
.site-header { border-bottom: 1px solid var(--line); }
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  line-height: 24px;
}
.brand img { width: 32px; height: 32px; border-radius: var(--radius-m); }
.bar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 4px;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  line-height: 22px;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-m);
  background: var(--button);
  color: var(--on-button);
  font-weight: 600;
  font-size: 17px;
  line-height: 24px;
  text-decoration: none;
  transition: background-color 140ms var(--ease-out);
}
.btn:hover { background: var(--button-hover); }

/* landing */
.hero { padding: 40px 0 48px; }
.hero-grid { display: grid; gap: 32px; }
.hero h1 { max-width: 14em; }
.lead { margin-top: 16px; max-width: 32em; color: var(--muted); }
.cta { margin-top: 24px; }
.facts {
  list-style: none;
  padding: 0;
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 15px;
  line-height: 22px;
  color: var(--muted);
}
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: var(--within);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}
.plan-card { padding: 20px; }
.plan-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 18px;
  color: var(--muted);
}
.chart { width: 100%; margin-top: 8px; }
.chart-fill { fill: var(--within-tint); }
.chart-line { fill: none; stroke: var(--within); stroke-width: 2.5; }
.chart-floor { stroke: var(--outline); stroke-width: 1; }
.chart-start { fill: var(--ink); }
.chart-zero { fill: var(--free); }
.chart-ring { fill: none; stroke: var(--free); stroke-width: 1.5; }
.chart-num { fill: var(--muted); font-family: var(--font-ui); font-size: 12px; }
.chart-axis { fill: var(--ink); font-family: var(--font-ui); font-size: 12px; font-weight: 600; }
.rows { margin-top: 12px; }
.rows div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 22px;
}
.rows dt { color: var(--muted); }
.rows dd { font-weight: 600; }
.plan-card figcaption {
  margin-top: 12px;
  font-size: 13px;
  line-height: 18px;
  color: var(--muted);
}

.section { padding: 48px 0; border-top: 1px solid var(--line); }
.section-intro { margin-top: 12px; max-width: 40em; color: var(--muted); }
.steps, .features {
  list-style: none;
  padding: 0;
  margin-top: 24px;
  display: grid;
  gap: 16px;
}
.steps li, .features li { padding: 20px; }
.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: var(--radius-m);
  background: var(--within-tint);
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  line-height: 22px;
}
.steps p, .features p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 22px;
}
.price { max-width: 40em; }
.price > p { margin-top: 12px; }

.note {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--sunk);
  border-radius: var(--radius-l);
  font-size: 15px;
  line-height: 22px;
}
.note p + p { margin-top: 8px; }

/* legal and help pages */
.doc { padding-top: 32px; padding-bottom: 56px; }
.doc-head { max-width: 680px; }
.eyebrow { font-size: 15px; line-height: 22px; font-weight: 600; color: var(--muted); }
.doc-head h1 { margin-top: 4px; }
.doc-head .meta { margin-top: 8px; font-size: 15px; line-height: 22px; color: var(--muted); }
.doc-head .motif { margin-top: 16px; }
.doc-grid { display: grid; gap: 32px; margin-top: 32px; }
.doc-grid.single { max-width: 680px; }
.toc {
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}
.toc h2 { font-size: 15px; line-height: 22px; font-weight: 600; color: var(--muted); }
.toc ol { list-style: none; padding: 0; margin-top: 4px; columns: 2; column-gap: 20px; }
.toc li { break-inside: avoid; }
.toc a {
  display: block;
  padding: 5px 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  line-height: 22px;
}
.toc a:hover { color: var(--accent); text-decoration: underline; }

.prose { min-width: 0; max-width: 680px; }
.prose h2 { margin-top: 40px; scroll-margin-top: 16px; }
.prose > section:first-child > h2 { margin-top: 0; }
.prose > .lead-in { margin-top: 0; }
.prose > .lead-in + section > h2 { margin-top: 32px; }
.prose h3 { margin-top: 24px; scroll-margin-top: 16px; }
.prose p, .prose ul, .prose ol, .prose dl { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--muted); }
.prose .summary { padding: 20px; margin-top: 0; }
.prose .summary h2 { margin-top: 0; }
.prose .summary ul { margin-top: 12px; }

.pairs { border-top: 1px solid var(--line); }
.pairs > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.pairs dt { font-weight: 600; }
.pairs dd { margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 22px; }
.pairs dd + dd { margin-top: 2px; }
.pairs .contact { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.lines dt { font-size: 15px; line-height: 22px; }
#help-lines ~ h3 { margin-top: 32px; }

.steps-list { counter-reset: step; list-style: none; padding-left: 0 !important; }
.steps-list li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  min-height: 32px;
}
.steps-list li + li { margin-top: 12px; }
.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -3px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-m);
  background: var(--within-tint);
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
}

.callout {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--within);
  border-radius: var(--radius-m);
}

@media (min-width: 640px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 880px) {
  :root { --tread: 3px; }
  .hero { padding: 64px 0 72px; }
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
  }
  .hero h1 { font-size: 48px; line-height: 52px; letter-spacing: -0.5px; }
  .section { padding: 64px 0; }
}
@media (min-width: 960px) {
  .features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .doc { padding-top: 48px; }
  .doc-grid { grid-template-columns: 220px minmax(0, 680px); gap: 56px; align-items: start; }
  .doc-grid.single { grid-template-columns: minmax(0, 680px); }
  .toc { position: sticky; top: 24px; padding: 0; background: none; border: 0; }
  .toc ol { columns: 1; }
}

/* 404 */
.lost { padding: 64px 0 80px; max-width: 680px; }
.lost p { margin-top: 12px; }
.lost ul { margin-top: 16px; padding-left: 24px; }

/* footer */
.site-footer {
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 22px;
  color: var(--muted);
}
.site-footer .motif { margin-bottom: 12px; }
.site-footer ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}
.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
}
.site-footer p { margin-top: 12px; max-width: 46em; }

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