/* ==========================================================================
   MORGAN TOUCH — Design tokens
   Creative direction: LOST WAX
   Everything downstream reads from this file. Change a value here, it changes
   everywhere. Do not hard-code colours, sizes or timings in other stylesheets.
   ========================================================================== */

/* ---------- Typefaces (self-hosted, latin subset, variable) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-roman.woff2") format("woff2-variations");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-italic.woff2") format("woff2-variations");
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-roman.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---------- Colour ----------
     Warm-biased throughout. Even the blacks carry brown — that is the
     direction. Ember appears once per page, never more. */
  --wax-black:      #14110E;   /* ground */
  --wax-deep:       #0C0A08;   /* deeper ground, vignettes, footer */
  --wax-raised:     #1C1815;   /* cards, raised surfaces */
  --raw-gold:       #C8A25A;   /* primary — rules, marks, accents */
  --gold-bright:    #E3C489;   /* hover, specular highlight */
  --gold-deep:      #7E6331;   /* pressed, borders, gold on the kaolin ground (4.5:1) */
  --bronze:         #6E5A3C;   /* secondary, muted metal */
  --kaolin:         #EDE6D8;   /* light ground, primary text on dark */
  --kaolin-soft:    #A79E90;   /* secondary text on dark */
  --kaolin-faint:   #877E70;   /* tertiary text — lifted to clear 4.5:1 on both grounds */
  --ember:          #BE6435;   /* the one accent. use sparingly. */

  --rule:           #2B2520;   /* hairlines on dark */
  --rule-light:     #CFC5B2;   /* hairlines on kaolin */

  /* Inverted surface (kaolin sections) */
  --inv-ground:     #EDE6D8;
  --inv-ink:        #14110E;
  --inv-soft:       #5E564A;

  /* Semantic */
  --focus:          #E3C489;
  --error:          #C8644A;
  --success:        #7A8B5A;

  /* ---------- Type scale ----------
     Fluid, 1.26 ratio at the small end opening to ~1.34 at display sizes. */
  --t-xs:    0.6875rem;                              /* 11px  — labels */
  --t-sm:    0.8125rem;                              /* 13px  — captions */
  --t-base:  clamp(0.9375rem, 0.9rem + 0.18vw, 1.0625rem);
  --t-md:    clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --t-lg:    clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem);
  --t-xl:    clamp(1.875rem, 1.5rem + 1.7vw, 3rem);
  --t-2xl:   clamp(2.5rem, 1.7rem + 3.6vw, 5rem);
  --t-3xl:   clamp(3.25rem, 1.6rem + 7vw, 8.5rem);
  --t-4xl:   clamp(4rem, 1.2rem + 11.5vw, 14rem);    /* the pour, chapter marks */

  --lh-tight:  0.94;
  --lh-snug:   1.12;
  --lh-body:   1.65;
  --measure:   62ch;

  /* Fraunces variable axes — low WONK keeps it refined rather than quirky */
  --frau-display: "opsz" 144, "SOFT" 0, "WONK" 0;
  --frau-text:    "opsz" 24,  "SOFT" 12, "WONK" 1;

  --ff-display: "Fraunces", "Hoefler Text", Georgia, "Times New Roman", serif;
  --ff-body:    "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ff-mono:    ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --track-label: 0.22em;   /* letterspaced caps — labels, nav, eyebrows */
  --track-caps:  0.1em;

  /* ---------- Space ---------- */
  --s-1:  0.25rem;  --s-2:  0.5rem;   --s-3:  0.75rem;  --s-4:  1rem;
  --s-5:  1.5rem;   --s-6:  2rem;     --s-7:  3rem;     --s-8:  4rem;
  --s-9:  6rem;     --s-10: 8rem;
  --gutter:  clamp(1.25rem, 4.2vw, 4rem);
  --section: clamp(4.5rem, 11vw, 11rem);
  --shell:   1560px;   /* full editorial width */
  --column:  1180px;   /* reading width */

  /* ---------- Motion ----------
     Lost Wax is unhurried. Nothing snappy. */
  --e-out:   cubic-bezier(0.16, 0.84, 0.28, 1);
  --e-inout: cubic-bezier(0.62, 0.02, 0.2, 1);
  --d-fast:  280ms;
  --d-base:  620ms;
  --d-slow:  900ms;
  --d-haze:  1400ms;   /* the emergence-from-the-mould reveal */

  --z-base: 1; --z-sticky: 60; --z-nav: 80; --z-veil: 90; --z-intro: 120;
}

/* Motion tokens collapse to zero rather than being switched off case by case,
   so a single media query disarms every animation in the build. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --d-fast: 1ms; --d-base: 1ms; --d-slow: 1ms; --d-haze: 1ms;
  }
}
