/*
  Design tokens. Change a value here and it updates everywhere on the site.

  "Retro calm" palette
    Teal      structure: header, headings, dark bands, footer
    Tomato    every main button: one colour for "do this"
    Mustard   small highlights and the diagonal stripes only, never text on light
    Sand      light bands and form panels
*/

:root {
  --color-heading: #24524f;           /* deep teal, 8.8:1 with white */
  --color-surface-dark: #1e4542;      /* darker teal: dark bands, footer */
  --header-gradient: #24524f;         /* solid teal header */

  --color-accent: #2f6b67;            /* links, numbers */
  --color-accent-hover: #24524f;
  --color-accent-tint: #e5efed;
  --color-cyan: #e6a848;              /* mustard: header hover underline */

  --color-action: #b8452f;            /* tomato, 5.3:1 with white */
  --color-action-hover: #9e3a27;
  --color-action-text: #ffffff;
  --color-highlight: var(--color-action);

  --color-sun: #e6a848;               /* mustard: stripes, small marks */
  --color-orange: #e39361;            /* stripes only */

  --color-text: #25211f;
  --color-text-secondary: #62574f;
  --color-text-on-dark: #ffffff;
  --color-text-on-dark-secondary: #d7e4e1;
  --color-surface: #ffffff;
  --color-surface-alt: #f8eee2;       /* sand bands */
  --color-placeholder: #f1e2d0;
  --color-border: #eadbc8;
  --color-border-dark: #3a6865;
  --color-field-border: #948678;      /* 3.5:1 for form fields */

  /* Diagonal stripes, used in one or two places */
  --stripes: linear-gradient(115deg,
      transparent 0 30%, var(--color-sun) 30% 46%,
      transparent 46% 54%, var(--color-orange) 54% 70%, transparent 70%);

  /* ---- Fonts: Fraunces headings, Inter text (self-hosted) ---- */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  /* ---- Type scale (desktop). Every font size on the site is one of these. ---- */
  --text-hero: 56px;      /* home page headline only */
  --text-h1: 48px;        /* page titles */
  --text-h2: 32px;        /* section headings */
  --text-h3: 24px;        /* card titles, form card headings */
  --text-h4: 20px;        /* layer titles, small headings in cards */
  --text-lg: 18px;        /* introductions, list titles */
  --text-body-lg: var(--text-lg);  /* old name, kept for the templates */
  --text-body: 16px;
  --text-small: 14px;
  --text-label: 12px;     /* uppercase labels; nothing on the site is smaller */

  /* ---- Line heights and letter spacing ---- */
  --leading-tight: 1.1;   /* display headings */
  --leading-snug: 1.3;    /* small headings, labels, buttons */
  --leading-body: 1.6;    /* running text */
  --tracking-display: -0.015em;
  --tracking-label: 0.12em;

  /* ---- Spacing: multiples of 8 ---- */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-7: 56px;
  --space-8: 64px;
  --space-9: 72px;
  --space-10: 80px;
  --space-12: 96px;

  /* ---- Rhythm inside a heading block: eyebrow, title, intro, content ---- */
  --gap-eyebrow: 16px;    /* eyebrow to title */
  --gap-title: 24px;      /* title to intro */
  --gap-intro: 32px;      /* intro to what follows */

  /* ---- Layout ---- */
  --page-pad: 72px;
  --content-max: 1296px;
  --section-pad: 80px;       /* standard sections, top and bottom */
  --section-pad-first: 56px; /* the first section under the header */
  --section-pad-sm: 48px;    /* compact bands (facts, notes) */
  --header-gap: 40px;        /* section heading block to its content */
  --card-pad: 32px;
  --grid-gap: 24px;
  --radius: 6px;
  --radius-lg: 12px;
  --nav-height: 96px;
}

@media (max-width: 900px) {
  :root {
    --text-hero: 38px;
    --text-h1: 34px;
    --text-h2: 26px;
    --text-h3: 21px;
    --text-h4: 18px;
    --text-lg: 17px;
    --gap-title: 16px;
    --gap-intro: 24px;
    --page-pad: 20px;
    --section-pad: 56px;
    --section-pad-first: 40px;
    --section-pad-sm: 32px;
    --header-gap: 28px;
    --card-pad: 20px;
    --grid-gap: 16px;
    --nav-height: 64px;
  }
}
