/* ==========================================================================
   Evermont International Academy — tokens.css
   Single source of truth for colour, type, spacing, rules and elevation.
   Every value used elsewhere in the stylesheet system should resolve here.
   ========================================================================== */

:root {
  /* --- Brand palette (fixed by the brand specification) ------------------ */
  --c-navy: #102A43;          /* Deep navy      */
  --c-green: #2F6B5B;         /* Mountain green */
  --c-brass: #B38A3E;         /* Brass gold     */
  --c-ivory: #F7F4EC;         /* Warm ivory     */
  --c-mist: #E7EEF3;          /* Mist blue      */
  --c-charcoal: #1B2430;      /* Charcoal       */
  --c-white: #FFFFFF;

  /* --- Accessible derivatives -------------------------------------------
     Brass gold at full strength is a rule-and-ornament colour only
     (2.89:1 on ivory). These derivatives carry text safely:
     --c-brass-ink  on ivory  = 5.59:1
     --c-brass-lite on navy   = 5.73:1
     ---------------------------------------------------------------------- */
  --c-brass-ink: #7A5D24;
  --c-brass-lite: #C79B4A;
  --c-ink-muted: #4A5A6B;     /* 6.44:1 on ivory */
  --c-on-navy-muted: #C7D6E0; /* 9.85:1 on navy  */
  --c-line: rgba(16, 42, 67, 0.14);
  --c-line-strong: rgba(16, 42, 67, 0.28);
  --c-line-on-navy: rgba(231, 238, 243, 0.22);
  --c-focus: #B38A3E;
  --c-error-ink: #8A2723;     /* 6.1:1 on ivory  */

  /* --- Semantic surfaces ------------------------------------------------- */
  --surface-page: var(--c-ivory);
  --surface-raised: var(--c-white);
  --surface-quiet: var(--c-mist);
  --surface-deep: var(--c-navy);
  --ink: var(--c-charcoal);
  --ink-strong: var(--c-navy);
  --ink-muted: var(--c-ink-muted);
  --ink-on-deep: var(--c-ivory);

  /* --- Typography --------------------------------------------------------
     Privacy-conscious strategy: no webfont requests, no third-party origin.
     Display  — a transitional serif from the platform stack.
     Body     — the platform UI sans.
     Utility  — small-caps tracking treatment for labels and eyebrows.
     ---------------------------------------------------------------------- */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    "Hoefler Text", "Times New Roman", Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-utility: var(--font-body);

  /* Fluid type scale — clamp(min, preferred, max) */
  --t-display: clamp(2.5rem, 1.6rem + 4.2vw, 4.5rem);
  --t-h1: clamp(2.125rem, 1.5rem + 2.8vw, 3.375rem);
  --t-h2: clamp(1.625rem, 1.3rem + 1.5vw, 2.375rem);
  --t-h3: clamp(1.25rem, 1.12rem + 0.6vw, 1.5rem);
  --t-h4: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --t-lead: clamp(1.0625rem, 1rem + 0.5vw, 1.3125rem);
  --t-body: 1.0625rem;
  --t-small: 0.9375rem;
  --t-micro: 0.8125rem;
  --t-label: 0.75rem;

  --lh-tight: 1.1;
  --lh-display: 1.06;
  --lh-heading: 1.18;
  --lh-body: 1.65;

  --track-label: 0.16em;
  --track-eyebrow: 0.22em;

  /* --- Spacing scale ------------------------------------------------------ */
  --s-3xs: 0.25rem;
  --s-2xs: 0.5rem;
  --s-xs: 0.75rem;
  --s-sm: 1rem;
  --s-md: 1.5rem;
  --s-lg: 2rem;
  --s-xl: 3rem;
  --s-2xl: 4rem;
  --s-3xl: 5.5rem;
  --s-4xl: 7.5rem;

  --section-y: clamp(3.5rem, 2rem + 6vw, 7rem);

  /* --- Layout ------------------------------------------------------------- */
  --measure: 68ch;
  --measure-tight: 56ch;
  --container: 76rem;      /* 1216px */
  --container-narrow: 52rem;
  --gutter: clamp(1.25rem, 0.75rem + 2vw, 3rem);

  /* --- Lines, radii, shadow ---------------------------------------------- */
  --rule-hair: 1px;
  --rule-brass: 2px;
  --radius-sm: 2px;
  --radius-md: 3px;
  --shadow-quiet: 0 1px 2px rgba(16, 42, 67, 0.06), 0 8px 24px rgba(16, 42, 67, 0.05);

  /* --- Motion ------------------------------------------------------------- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 140ms;
  --dur: 240ms;
  --dur-slow: 520ms;

  /* --- Controls ----------------------------------------------------------- */
  --touch-min: 44px;
  --focus-ring: 3px;
  --focus-offset: 3px;

  --header-h: 4.5rem;
}

/* Colour scheme declaration keeps native controls consistent. */
:root {
  color-scheme: light;
}
