/* ==========================================================================
   Fescue — document pages (privacy, support)
   Shared by every page that is prose rather than pitch. The landing page
   keeps its own inline styles: it is one file with a hero, a live card and
   an animation, and pulling its 700 lines out here to share a dozen tokens
   would make the page slower to render for no reader's benefit.
   Tokens are copied, not reinvented — the source of truth is src/brand.js
   and docs/brand/2026-08-17-fescue-cosmetic-spec.md.
   ========================================================================== */

:root {
  --primary:      #0F6A43;
  --deep:         #093F28;
  --sage:         #93B79A;
  --sand:         #E7E2D2;
  --ink:          #14181A;
  --ochre:        #C08A3E;  /* money or live state ONLY */

  --sand-lift:    #F1EDE0;
  --panel:        #FCFAF4;
  --ink-muted:    #4A5150;
  --line:         #D3CCB8;
  --line-deep:    rgba(231,226,210,0.18);

  --shadow-lift:  0 1px 2px rgba(9,63,40,.06), 0 12px 32px -12px rgba(9,63,40,.22);

  --display: 'Familjen Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  --fs-h1:   clamp(2.25rem, 5vw, 3.75rem);
  --fs-h2:   clamp(1.375rem, 2.2vw, 1.75rem);
  --fs-body: 1.0625rem;
  --fs-sm:   0.9375rem;
  --fs-xs:   0.8125rem;

  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 48px; --s6: 64px; --s7: 96px;

  --radius-pill: 999px;
  --radius-card: 20px;
  --gutter: clamp(20px, 5vw, 56px);
  --max: 1320px;
  --measure: 68ch;   /* prose stops here; the page does not */
}

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

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
  margin: 0;
}

p, ul, ol { margin: 0; }
a { color: inherit; }

/* Two tones on purpose. Ochre on the sand ground is 2.33:1, under the 3:1 a
   focus indicator needs (WCAG 2.2 SC 1.4.11), and no one colour clears 3:1
   against both sand (L .74) and deep (L .04) — the window is a rounding error
   wide. So the ring is ochre over deep: on light ground the deep tone carries
   it at 9.2:1, on the dark sections the ochre does at 3.96:1. The box-shadow
   fills the 3px offset gap and sits under the outline.
   No border-radius override here: outline and box-shadow both follow the
   element's own radius, so a pill button stays a pill while focused. */
:focus-visible {
  outline: 3px solid var(--ochre);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--deep);
}

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: var(--s2);
  z-index: 60;
  background: var(--panel);
  color: var(--ink);
  padding: var(--s1) var(--s3);
  border-radius: var(--radius-pill);
}

/* --------------------------------------------------------------------------
   Masthead
   The landing page opens on a photograph. These pages open on the wordmark
   and nothing else: a policy that arrives over a sunset is selling, and this
   is the one place on the site that is not.
   -------------------------------------------------------------------------- */

.masthead {
  background: var(--deep);
  color: var(--sand);
  padding-block: var(--s3);
}

.masthead__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.brand__word {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 21px;
  color: var(--sand);
}

.masthead__links {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-size: var(--fs-sm);
}
.masthead__links a {
  color: var(--sage);
  text-decoration: none;
}
.masthead__links a:hover { color: var(--sand); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn--light { background: var(--sand); color: var(--deep); }
.btn--light:hover { background: #fff; }
.btn--ghost { border-color: rgba(231,226,210,.4); color: var(--sand); }
.btn--ghost:hover { border-color: var(--sand); }
.btn--solid { background: var(--primary); color: #fff; }
.btn--solid:hover { background: var(--deep); }

/* --------------------------------------------------------------------------
   Document
   -------------------------------------------------------------------------- */

.doc { padding-block: var(--s6) var(--s7); }

.doc__head {
  max-width: var(--measure);
  margin-bottom: var(--s6);
}

.eyebrow {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--s2);
}

.doc__head h1 {
  font-size: var(--fs-h1);
  margin-bottom: var(--s3);
}

.doc__lede {
  font-size: 1.1875rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.doc__stamp {
  margin-top: var(--s3);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Two columns on desktop: the section list rides along, the prose stays at a
   readable measure. One column below 900px, list first. */
.doc__body {
  display: grid;
  gap: var(--s6);
  grid-template-columns: 200px minmax(0, var(--measure));
  align-items: start;
}
@media (max-width: 900px) {
  .doc__body { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
}

.toc {
  position: sticky;
  top: var(--s4);
  font-size: var(--fs-sm);
}
.toc h2 {
  font-family: var(--body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--s2);
}
.toc ol {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 6px;
  counter-reset: toc;
}
.toc a {
  text-decoration: none;
  color: var(--ink-muted);
  border-left: 2px solid var(--line);
  padding-left: var(--s2);
  display: block;
}
.toc a:hover { color: var(--ink); border-left-color: var(--primary); }
@media (max-width: 900px) {
  .toc { position: static; }
}

.doc__prose > * + * { margin-top: var(--s3); }

.doc__prose section { scroll-margin-top: var(--s4); }
.doc__prose section + section { margin-top: var(--s6); }

.doc__prose h2 {
  font-size: var(--fs-h2);
  margin-bottom: var(--s3);
}
.doc__prose h3 {
  font-family: var(--body);
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: 0;
  margin-bottom: 6px;
}
.doc__prose p + p,
.doc__prose p + ul,
.doc__prose ul + p { margin-top: var(--s3); }

.doc__prose ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--s3);
}
.doc__prose li { padding-left: var(--s3); border-left: 2px solid var(--line); }
.doc__prose li p { color: var(--ink-muted); }

.doc__prose a:not(.btn) { color: var(--primary); text-underline-offset: 3px; }
/* :not(.btn) matters — a bare `.doc__prose a` rule outranks `.btn--solid`
   and paints the button label the same green as the button. */

/* A single card for the thing on the page that is not prose: the contact
   block on support, the "what we never do" block on privacy. */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lift);
  padding: var(--s4);
}
.card h2 { margin-bottom: var(--s2); }
.card p + .btn { margin-top: var(--s3); }

.note {
  border-left: 3px solid var(--ochre);
  padding-left: var(--s3);
  color: var(--ink-muted);
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------------
   Footer — same links and order as the landing page
   -------------------------------------------------------------------------- */

.footer {
  background: var(--deep);
  color: var(--sand);
  padding-block: var(--s5);
}
.footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  flex-wrap: wrap;
  font-size: var(--fs-sm);
  color: var(--sage);
}
.footer__row nav {
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
}
.footer__row a { text-decoration: none; }
.footer__row a:hover { color: var(--sand); }
.footer__row [aria-current="page"] { color: var(--sand); }
