/* ==========================================================================
   TOKENS: the one file you edit to rebrand a site.
   Load order: tokens.css, then base.css. base.css only uses the names below,
   never a raw colour or size, so nothing else needs to change.
   ========================================================================== */


/* 1. Fonts =================================================================
   Nunito, the old site's font, self-hosted: the same four files the old
   site used (regular, semibold, bold, black). Latin only: the site is in
   English. Pages preload the regular file; the others load when used.

   CHANGING THE FONT
   1. Put the new font's .woff2 files in /fonts/ (subset with fonttools:
      see the template's CLAUDE.md, "Fonts").
   2. Point the src lines below at them and rename the family.
   3. Update the preload <link> in each page's <head>.
   4. Re-measure the fallback (block 2) for the new font. */

@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito-black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}


/* 2. Fallback with Nunito's proportions ====================================
   While Nunito loads, text renders in Arial resized to Nunito's metrics, so
   nothing reflows when the real font arrives. Arial ships on Windows, macOS
   and iOS. Browsers without these descriptors use plain Arial, which is
   fine. Measured in the browser against these font files (2026-10-28). */

@font-face {
  font-family: "Nunito Fallback";
  src: local("Arial"), local("ArialMT");
  size-adjust: 99.3%;
  ascent-override: 80.6%;
  descent-override: 20.1%;
  line-gap-override: 0%;
}


:root {

  /* 3. Colour ==============================================================
     Hex on purpose: works everywhere, easy to paste from a brand guide.
     The blues are the old site's: its menu pill ran from --color-brand-2
     to --color-brand. --color-accent is the same blue a shade darker, so
     links pass 4.5:1 on white. Contrast on white, measured: ink 17:1,
     ink-soft 6.2:1, accent 4.9:1. */

  --color-bg: #ffffff;           /* page background */
  --color-surface-alt: #f2f7fd;  /* alternate sections, hover fills */
  --color-ink: #14171c;          /* text and headings */
  --color-ink-soft: #62615d;     /* secondary text (the old site's grey, darker) */
  --color-line: #e4e7ec;         /* hairlines, card borders */
  --color-line-strong: #c9ced6;  /* input borders, secondary buttons */

  --color-accent: #1f6fd6;       /* links, current page */
  --color-accent-hover: #1858b0; /* same hue, darker */
  --color-accent-soft: #e8f1fd;  /* tinted fills, text selection */
  --color-accent-ring: rgba(31, 111, 214, 0.25); /* focus glow on inputs */
  --color-on-accent: #ffffff;    /* text on accent buttons */

  --color-brand: #2276e3;        /* the old site's blue */
  --color-brand-2: #2ac9e1;      /* the old site's light blue */
  --color-frame: #b7dafc;        /* frame around the gallery photos */

  --color-dark: #000000;         /* home intro and footer background */
  --color-on-dark: #ffffff;      /* text on --color-dark and on photos */
  --color-on-dark-soft: rgba(255, 255, 255, 0.72);
  --color-on-dark-line: rgba(255, 255, 255, 0.55); /* menu button on photos */
  --color-on-dark-fill: rgba(255, 255, 255, 0.16); /* menu hover on photos */
  --color-scrim: rgba(0, 0, 0, 0.88);      /* behind the enlarged gallery photo */
  --color-scrim-soft: rgba(0, 0, 0, 0.45); /* round buttons on that photo */

  --color-success: #166534;
  --color-success-bg: #f0fdf4;
  --color-success-line: #bbf7d0;
  --color-error: #b91c1c;
  --color-error-bg: #fef2f2;
  --color-error-line: #fecaca;
  --color-error-ring: rgba(185, 28, 28, 0.2);

  /* Keep in step with <meta name="theme-color"> in every page. */


  /* 4. Type ================================================================ */

  --font-sans: "Nunito", "Nunito Fallback", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Fixed sizes: what browsers without clamp() get (iOS 12, early 13).
     Fluid versions are in the @supports block at the end of this file. */
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: 2.5rem;
  --step-5: 2.875rem;
  --step-6: 3.25rem;            /* the big words on the photo heads */


  /* 5. Space & layout ====================================================== */

  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-s: 0.75rem;
  --space-m: 1rem;
  --space-l: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;
  --space-section: 3.5rem;      /* top/bottom padding of a .section */

  --container: 72rem;           /* widest content column */
  --measure: 68ch;              /* longest comfortable line of text */
  --gutter: 1.25rem;            /* side padding on phones */
  --header-h: 4rem;             /* header bar height */

  --radius-s: 8px;
  --radius: 12px;
  --radius-l: 20px;

  --shadow-s: 0 1px 2px rgba(20, 23, 28, 0.06), 0 2px 8px rgba(20, 23, 28, 0.05);
  --shadow-m: 0 4px 12px rgba(20, 23, 28, 0.08), 0 12px 32px rgba(20, 23, 28, 0.08);
  --shadow-text: 0 1px 3px rgba(0, 0, 0, 0.45); /* white text on photos */
}

@media (min-width: 48em) {
  :root {
    --gutter: 2rem;
    --space-section: 5rem;
  }
}

@media (min-width: 64em) {
  :root {
    --header-h: 5.5rem;
  }
}


/* 6. Fluid type ===========================================================
   Only inside @supports. Writing a fixed fallback line first does NOT
   work through var(): a browser without clamp() would accept the variable
   and then drop the whole declaration, resetting headings to body size. */

@supports (font-size: clamp(1rem, 1vw, 2rem)) {
  :root {
    --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
    --step-1: clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem);
    --step-2: clamp(1.3125rem, 1.17rem + 0.7vw, 1.75rem);
    --step-3: clamp(1.625rem, 1.3rem + 1.6vw, 2.5rem);
    --step-4: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
    --step-5: clamp(2.25rem, 1.55rem + 3.5vw, 4rem);
    --step-6: clamp(2.5rem, 6vw, 6rem);
    --space-section: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  }
}
