/* tokens.css — brief.md v4 (approved) §3.3, §2, §5, §8, compiled. THE ONLY
   PLACE RAW VALUES LIVE (spec §3); a token not in §3.3 states its derivation
   on its line. Fuller records: README.md and the brief. */

:root {

  --scheme: light;                    /* one deliberate mode (brief §6) */

  /* --- ground + ink --- */
  --color-bg:              #f6efe4;   /* cream paper ground */
  --color-surface:         #fffaf2;   /* letterpress card face */
  --color-ink:             #231a14;   /* warm near-black */
  --color-ink-muted:       #5f5046;

  /* --- accent — FILL ONLY, never a text colour (brief §4.4 rule 1) --- */
  --color-accent:          #f26554;   /* THEIR coral (V, own-site-css) */
  --color-accent-ink:      #231a14;   /* ink sits ON coral */

  /* --- the accent's text-weight sibling --- */
  --color-rust:            #a8361f;   /* every coloured WORD on a light ground */

  /* --- the one dark band --- */
  --color-band:            #3b2a20;   /* timber, ref-008. Flat fill, no gradient */
  --color-band-ink:        #f6efe4;
  --color-band-ink-muted:  #d6c6b6;
  --color-accent-soft:     #ffb3a3;   /* ON-BAND ONLY (brief §4.4 rule 3) */

  /* --- hero atmosphere (design-rules §0 — never a flat ground) --- */
  --color-halo-warm:       #fff3dd;
  --color-halo-amber:      #f6dcb4;
  --color-halo-coral:      #ffd2c7;
  --color-caustic-a:       #ffffff;
  --color-caustic-b:       #ffd2c7;

  /* --- lines, focus, selection --- */
  --color-border:          #e0d3c1;   /* 1.29:1 — DECORATIVE HAIRLINE ONLY */
  --color-focus:           #a8361f;
  --color-focus-on-band:   #ffb3a3;   /* rust fails 3:1 on timber (brief §4.2 N3) */
  --color-selection-bg:    #f26554;
  --color-selection-ink:   #231a14;

  /* --- type (brief §2.6 — one display token per shipped instance) --- */
  --font-display:      'Fraunces Display', 'Fraunces Display Fallback', 'Iowan Old Style', Georgia, serif;
  --font-display-mid:  'Fraunces Mid',     'Fraunces Mid Fallback',     'Iowan Old Style', Georgia, serif;
  --font-display-text: 'Fraunces Text',    'Fraunces Text Fallback',    'Iowan Old Style', Georgia, serif;
  --font-body:         'Karla',            'Karla Fallback',            'Trebuchet MS', 'Segoe UI', sans-serif;
  --font-weight-body:        400;
  --font-weight-body-strong: 600;
  --font-weight-display:     800;

  /* --- fluid scale --- */
  --text-hero:    clamp(2.85rem, 9.5vw, 4.9rem);
  --text-display: clamp(3rem, 13vw, 4.6rem);    /* the 5.0 numeral, §IV */
  --text-h2:      clamp(1.9rem, 5.4vw, 3.1rem);
  --text-service: clamp(1.4rem, 4.4vw, 2rem);   /* the ONE marked row, §II */
  --text-h3:      clamp(1.2rem, 3vw, 1.6rem);
  --text-lead:    clamp(1.06rem, 4vw, 1.35rem);
  --text-body:    clamp(1rem, 1.4vw, 1.0625rem);
  --text-small:   0.9375rem;
  --text-eyebrow: 0.75rem;                      /* 12px — needs 4.5:1 (§4.3 G1) */

  --leading-tight: 0.98;
  --leading-snug:  1.22;
  --leading-body:  1.62;
  --tracking-tight: -0.025em;
  --tracking-normal: 0em;
  --tracking-wide:  0.14em;

  /* --- space --- */
  --space-3xs: 0.25rem;  --space-2xs: 0.5rem;  --space-xs: 0.75rem;
  --space-sm:  1rem;     --space-md:  1.5rem;  --space-lg: 2.5rem;
  --space-xl:  4rem;     --space-2xl: 6rem;    --space-3xl: 9rem;

  /* design-rules §7.1's ONE inter-section token, two call sites. Brief §5.4
     fixes the hero's bottom padding at --space-2xl. */
  --section-gap: var(--space-2xl);

  /* --- layout --- */
  --layout-container: 72rem;
  --layout-measure:   60ch;
  --layout-rail:      9rem;                     /* review attribution rail */
  --layout-gutter:    clamp(1.25rem, 6vw, 3rem);
  --layout-tap-min:   44px;

  /* brief §II states `3rem 1fr` at ≥48rem; 3rem is not on the space scale */
  --layout-numeral-col: 3rem;

  /* brief §6 states 56px, expressed from the tokens it is made of */
  --layout-header-height: calc(var(--layout-tap-min) + var(--space-xs));

  /* --- radius + border. NO PILL TOKEN EXISTS (brief §3.3). --- */
  --radius-none: 0;
  --radius-sm:   2px;
  --border-hairline: 1px;
  --border-thick:    2px;
  --border-style:    solid;

  /* --- the letterpress offset — the ONLY shadow on this site --- */
  --shadow-letterpress:         4px 4px 0 var(--color-accent);
  --shadow-letterpress-pressed: 2px 2px 0 var(--color-accent);
  --press-shift: 2px;                 /* the settle's travel, brief §8 */

  /* --- motion --- */
  --duration-fast: 140ms;  --duration-base: 320ms;  --duration-slow: 640ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --reveal-shift: 1.25rem;  --reveal-stagger: 90ms;

  --loop-bob: 6.5s;      --loop-caustic: 37s;
  --loop-bubble-1: 9s;   --loop-bubble-2: 13s;  --loop-bubble-3: 17s;
  --loop-crystal: 31s;   --loop-drop: 11s;

  /* Brief §8's reduced-motion frame, value for value. Each loop oscillates
     ABOUT it, so a stopped loop leaves a composed frame. */
  --rest-caustic: translate3d(1.5%, 0.8%, 0) scale(1.07);
  --rest-bob:     translateY(-6px) rotate(0.15deg);
  --rest-sat-b1:  translate3d(4px, -14px, 0);
  --rest-sat-b2:  translate3d(-6px, -9px, 0);
  --rest-sat-b3:  translate3d(5px, -18px, 0);
  --rest-sat-x:   rotate(18deg);
  --rest-sat-d:   translate3d(-5px, -8px, 0);

  /* --- z layers --- */
  --z-base: 0;  --z-header: 100;
  --z-skip-link: 300;                 /* consumed by base.css */
}

/* @font-face — self-hosted woff2, latin subset, swap. Both families SIL OFL
   1.1 (brief §2); notices in assets/fonts/OFL.txt. FOUR FILES, TWO FAMILIES
   (brief §2, v4): three STATIC Fraunces instances, one per optical size, plus
   Karla variable on `wght`. NO AXIS DECLARATION EXISTS IN ANY STYLESHEET
   HERE, so spec §8's axis-overrides-font-weight trap is unreachable; each
   face is registered at the weight it carries, so nothing is synthesised.
   unicode-range is §8's declared range, identical on all four. Byte table,
   roles and coverage gap: README.md §Fonts. */

/* h1, its accent word, the 5.0 numeral. PRELOADED. */
@font-face {
  font-family: 'Fraunces Display';
  src: url('../assets/fonts/fraunces-display-800-opsz144-latin.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00AE, U+2122, U+00B0, U+00B7, U+00BF, U+00C0-00FF, U+2010-2015, U+2018-201A, U+201C-201E, U+2026, U+2032-2033;
}

/* Every h2 and its accent word. Not preloaded. */
@font-face {
  font-family: 'Fraunces Mid';
  src: url('../assets/fonts/fraunces-mid-800-opsz72-latin.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00AE, U+2122, U+00B0, U+00B7, U+00BF, U+00C0-00FF, U+2010-2015, U+2018-201A, U+201C-201E, U+2026, U+2032-2033;
}

/* h3 group, wordmark, §II index numerals. Not preloaded: paints in its own
   fallback, swaps with no shift (brief §2.3). */
@font-face {
  font-family: 'Fraunces Text';
  src: url('../assets/fonts/fraunces-text-600-opsz24-latin.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00AE, U+2122, U+00B0, U+00B7, U+00BF, U+00C0-00FF, U+2010-2015, U+2018-201A, U+201C-201E, U+2026, U+2032-2033;
}

/* Body, eyebrows, band-head numerals, labels, names. PRELOADED. */
@font-face {
  font-family: 'Karla';
  src: url('../assets/fonts/karla-latin-var.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00AE, U+2122, U+00B0, U+00B7, U+00BF, U+00C0-00FF, U+2010-2015, U+2018-201A, U+201C-201E, U+2026, U+2032-2033;
}

/* Metrics-matched fallbacks — required (spec §7, §8), ONE PER INSTANCE (brief
   §2.4), all local() and all free. The numbers are a MEASUREMENT against the
   SHIPPED woff2; method in README.md. CLS 0.000 is the test. */

@font-face {
  font-family: 'Fraunces Display Fallback';
  src: local('Georgia');
  font-style: normal;
  size-adjust: 76.1%;
  ascent-override: 128.5%;
  descent-override: 33.5%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Fraunces Mid Fallback';
  src: local('Georgia');
  font-style: normal;
  size-adjust: 85.0%;
  ascent-override: 115.0%;
  descent-override: 30.0%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Fraunces Text Fallback';
  src: local('Georgia');
  font-style: normal;
  size-adjust: 87.6%;
  ascent-override: 111.7%;
  descent-override: 29.1%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Karla Fallback';
  src: local('Arial');
  font-style: normal;
  size-adjust: 103.5%;
  ascent-override: 88.6%;
  descent-override: 24.4%;
  line-gap-override: 0%;
}
