/* ==========================================================================
   Sargontes — design tokens ("Daylight")
   Source of truth: DESIGN.md. Change values here, never inline.
   ========================================================================== */

:root {
  /* ---- Colour: ground & surfaces (northern daylight on limestone) ---- */
  --c-ground: #EFF0EE;        /* page ground: pale limestone in cool daylight */
  --c-ground-2: #E2E4E1;      /* stone band: alternate section ground */
  --c-paper: #FAFAF9;         /* raised panels, form, popovers */
  --c-white: #FFFFFF;         /* inputs only */

  /* ---- Colour: ink (graphite) ---- */
  --c-ink: #1C1F22;           /* headings, body */
  --c-ink-2: #464B51;         /* secondary text   (7.8:1 on ground) */
  --c-ink-3: #5C6269;         /* captions, meta   (5.4:1 ground, 4.9:1 stone) */
  --c-line: #D0D3CF;          /* hairlines, dividers */
  --c-line-strong: #A6AAA6;   /* input borders, active rules */

  /* ---- Colour: sun (the only accent; it is light, not paint) ---- */
  --c-sun: #F0C23B;           /* primary action fill, light patch core */
  --c-sun-hover: #E6B21F;
  --c-sun-soft: #F8E3A2;      /* light patches, highlights */
  --c-sun-wash: #FBF2D6;      /* selected chip, hover wash */
  --c-sun-ink: #7A5A00;       /* sun-tinted text on sun-wash (6.0:1) */

  /* ---- Colour: night (footer, one dark moment) ---- */
  --c-night: #1A1C1F;
  --c-night-2: #26292D;
  --c-night-ink: #ECECE6;
  --c-night-ink-2: #A3A7AC;

  /* ---- Colour: states ---- */
  --c-error: #B3261E;
  --c-error-wash: #F9E4E1;
  --c-success: #2E6B3F;
  --c-success-wash: #E2EFE4;
  --c-focus: #1C1F22;         /* focus ring = ink, offset on sun halo */

  /* ---- Typography ---- */
  --font-display: "Geologica", "Onest", system-ui, sans-serif;
  --font-text: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* fluid type scale (min @ 360px → max @ 1440px) */
  --fs-display: clamp(2.625rem, 1.4rem + 4.2vw, 5.25rem); /* hero H1 */
  --fs-h2: clamp(2.125rem, 1.5rem + 2.8vw, 3.75rem);
  --fs-h3: clamp(1.5rem, 1.25rem + 1.1vw, 2.125rem);
  --fs-h4: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  --fs-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --fs-body: 1.0625rem;      /* 17px */
  --fs-small: 0.9375rem;     /* 15px */
  --fs-caption: 0.8125rem;   /* 13px */
  --fs-numeral: clamp(6rem, 2rem + 16vw, 15rem); /* the single "2000" */

  --lh-tight: 1.02;
  --lh-heading: 1.1;
  --lh-snug: 1.3;
  --lh-body: 1.6;

  --tr-display: -0.035em;
  --tr-heading: -0.025em;
  --tr-caps: 0.08em;

  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;

  --measure: 66ch;

  /* ---- Space (4px base) ---- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --section-y: clamp(72px, 4rem + 4.5vw, 128px);  /* vertical rhythm between sections */
  --section-y-tight: clamp(48px, 2.5rem + 3vw, 88px);

  /* ---- Layout ---- */
  --container: 1360px;
  --gutter: clamp(16px, 0.6rem + 1.6vw, 28px);
  --margin: clamp(16px, 0.25rem + 4.2vw, 64px);
  --header-h: 72px;

  /* ---- Shape ---- */
  --r-xs: 2px;
  --r-s: 4px;
  --r-m: 8px;
  --mullion: clamp(4px, 0.15rem + 0.3vw, 8px); /* window-frame bar width */

  /* ---- Depth (light from upper-left window → shadow falls down-right) ---- */
  --shadow-1: 0 1px 2px rgb(28 31 34 / 0.06), 2px 6px 16px -6px rgb(28 31 34 / 0.12);
  --shadow-2: 0 1px 2px rgb(28 31 34 / 0.05), 6px 18px 40px -16px rgb(28 31 34 / 0.22);
  --shadow-3: 0 2px 4px rgb(28 31 34 / 0.05), 14px 32px 72px -24px rgb(28 31 34 / 0.28);

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);       /* expo-out: everything that arrives */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);   /* sweeps, wipes */
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);        /* exits only */
  --t-micro: 160ms;   /* hover, press */
  --t-ui: 280ms;      /* chips, accordion, fields */
  --t-reveal: 700ms;  /* text & pane reveals */
  --t-scene: 1100ms;  /* image wipes, hero */
  --stagger: 70ms;

  /* ---- Z ---- */
  --z-sun: 40;
  --z-header: 50;
  --z-overlay: 60;
}
