/*
 * buyShea design tokens — the brand guide (src/_data/brand.json holds the same values for
 * templates, the OG image and the Worker's Checkout branding). See DECISIONS.md → Brand guide.
 *
 * Contrast rules (WCAG 2, measured):
 *   white on --green #6B700D ........... 5.32:1   primary buttons
 *   white on --brown #3E2219 .......... 14.51:1   footer, badges
 *   --brown on --paper / --cream ...... 14.27 / 11.52:1   all body text
 *   --green on --paper ................. 5.23:1   green text only on off-white/white
 *   --green on --cream ................. 4.22:1   FAILS → use --green-text-on-cream on cream
 *   --green-text-on-cream #575B0A ...... 5.74:1 on cream, 7.11 on paper; also the hover fill
 *                                         (white on it 7.23:1). Used for prices on cream cards
 *                                         and the secondary button on cream bands.
 *   --brown-soft #6B4B3A ............... 6.19:1 on cream, 7.67 on paper   muted text
 *   --green-accent #878D07 / --orange #C17B33: DECORATION ONLY (underlines, icons, badges,
 *     dividers, the swoosh, display text ≥ 24px bold). White on them is 3.59 / 3.42:1;
 *     orange on cream is 2.71:1, on paper 3.36:1, on brown 4.25:1.
 *   Focus ring: 3px --orange outside the element (3.36:1 on paper, 4.25:1 on brown). On cream
 *     bands orange is only 2.71:1, under the 3:1 non-text minimum, so --focus switches to
 *     --brown there (.on-cream / cream components set it).
 */
/* Brand fonts, self-hosted (npm run fonts copies them; licence: /assets/fonts/LICENSE.txt). */
@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/montserrat-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/montserrat-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/montserrat-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light; /* the palette is light-only; keep form controls light when the OS is dark */

  /* ---- brand colours ---- */
  --green: #6b700d; /* primary green */
  --green-accent: #878d07; /* accent green — decoration only */
  --cream: #f2e5b8; /* sections, bands, cards */
  --orange: #c17b33; /* accent orange — decoration only */
  --brown: #3e2219; /* primary brown — text */

  /* ---- derived ---- */
  --paper: #fffdf8; /* page background: most text sits on this */
  --white: #ffffff;
  --cream-soft: #faf3dc; /* quieter cream for panels inside cream sections */
  --green-text-on-cream: #575b0a; /* the only green allowed as text on cream (5.74:1) */
  --green-deep: #575b0a; /* hover/active fill for primary buttons */
  --brown-soft: #6b4b3a; /* muted text, ≥ 6.19:1 on every background we use */
  --line: #ddcb94; /* hairlines on paper and cream (decorative, not a boundary that needs 3:1) */
  --danger: #9a2e12; /* error text, 6.01:1 on cream */
  --focus: var(--orange);

  /* ---- roles ---- */
  --text: var(--brown);
  --text-muted: var(--brown-soft);
  --link: var(--brown);
  --link-underline: var(--green);
  --price: var(--green); /* on paper; cream surfaces override with --green-text-on-cream */

  /* ---- buttons ---- */
  --button-fill: var(--green);
  --button-fill-hover: var(--green-deep);
  --button-text: var(--white);
  --button-outline: var(--green);
  --button-outline-text: var(--green);
  --button-border: 2px;
  --button-radius: 8px;
  --button-pad: 0.7rem 1.4rem;

  /* ---- type: Montserrat for headings/nav/key messages, Inter for everything else ---- */
  --font-display: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  /* Fluid scale from the guide, 360 → 1280 px viewport. */
  --text-small: clamp(0.75rem, 0.72rem + 0.15vw, 0.875rem); /* 12–14px */
  --text-body: clamp(1rem, 0.95rem + 0.22vw, 1.125rem); /* 16–18px */
  --text-h3: clamp(1.25rem, 1.15rem + 0.43vw, 1.5rem); /* 20–24px */
  --text-h2: clamp(1.75rem, 1.65rem + 0.43vw, 2rem); /* 28–32px */
  --text-h1: clamp(2.25rem, 2.05rem + 0.87vw, 2.75rem); /* 36–44px */
  --leading: 1.6;
  --leading-tight: 1.15;
  --measure: 66ch;
  /* step names kept for the existing stylesheet */
  --step--1: var(--text-small);
  --step-0: var(--text-body);
  --step-1: var(--text-h3);
  --step-2: var(--text-h3);
  --step-3: var(--text-h2);
  --step-4: var(--text-h1);

  /* ---- space ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --gutter: 1rem;
  --page-max: 72rem;

  /* ---- shape ---- */
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
  --radius-pill: 999px;
  --tap: 44px;

}

@media (min-width: 40em) {
  :root {
    --gutter: 1.5rem;
  }
}
