/* ============================================================
   House of Maya — design tokens
   No raw hex / px size / letterspacing literal may appear in
   main.css. Everything flows through these custom properties.
   ============================================================ */

/* ---- Fonts (self-hosted subset woff2) ---- */
@font-face {
  font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400;
  src: url("../fonts/cormorant-400.woff2") format("woff2"); font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond"; font-style: italic; font-weight: 400;
  src: url("../fonts/cormorant-400i.woff2") format("woff2"); font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600;
  src: url("../fonts/cormorant-600.woff2") format("woff2"); font-display: swap;
}
@font-face {
  font-family: "Jost"; font-style: normal; font-weight: 400;
  src: url("../fonts/jost-400.woff2") format("woff2"); font-display: swap;
}
/* Metric-matched fallbacks (kill CLS during swap) */
@font-face {
  font-family: "Cormorant Fallback"; src: local("Georgia");
  size-adjust: 88%; ascent-override: 92%; descent-override: 24%; line-gap-override: 0%;
}
@font-face {
  font-family: "Jost Fallback"; src: local("Helvetica Neue"), local("Arial");
  size-adjust: 97%; ascent-override: 95%; descent-override: 25%; line-gap-override: 0%;
}

:root {
  /* ---- Palette (exact, immutable) ---- */
  --c-red:    #7A1F2B;   /* Maya Red — brand face, band ground */
  --c-cream:  #FBF4EC;   /* everyday ground */
  --c-blush:  #F3D8DE;   /* secondary bands, garnet cards */
  --c-gold:   #C79A5B;   /* ACCENT ONLY: rules, glyphs, display text. Never body text. */
  --c-taupe:  #8E7F63;   /* large/decorative only on cream; never on red */

  /* ---- Derived accessible ink variants (contrast matrix, spec §8) ---- */
  --c-gold-ink:  #8C6A2F; /* "gold" for SMALL text on cream/blush (>=4.5:1) */
  --c-gold-lift: #E5C58F; /* "gold" for SMALL text on red (>=6:1) */

  /* red-band internal shades (vignette) */
  --c-red-lift: #86242F;
  --c-red-deep: #6E1B26;

  /* ---- Type families ---- */
  --f-serif: "Cormorant Garamond", "Cormorant Fallback", Georgia, "Times New Roman", serif;
  --f-sans:  "Jost", "Jost Fallback", "Avenir Next", "Helvetica Neue", Arial, sans-serif;

  /* ---- Type scale (fluid) ---- */
  --fs-hero:    clamp(2.6rem, 1.1rem + 6.2vw, 5.5rem);
  --fs-display: clamp(2rem, 1.2rem + 3.2vw, 3.5rem);
  --fs-title:   clamp(1.5rem, 1.15rem + 1.6vw, 2.25rem);
  --fs-edition: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
  --fs-body:    1.0625rem;   /* 17px */
  --fs-caption: 0.8125rem;   /* 13px */
  --fs-label:   0.75rem;     /* 12px */
  --fs-whisper: 0.6875rem;   /* 11px */

  --lh-tight: 1.08;
  --lh-body:  1.65;

  --ls-label:   0.18em;
  --ls-whisper: 0.16em;
  --ls-cta:     0.14em;

  /* ---- Spacing scale ---- */
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: 1rem; --sp-4: 1.5rem;
  --sp-5: 2rem; --sp-6: 3rem; --sp-7: 4rem; --sp-8: 6rem;
  --sp-9: 8rem; --sp-10: 10rem;

  --band-pad:       clamp(4rem, 10vw, 8rem);
  --band-pad-quiet: clamp(6rem, 14vw, 10rem);
  --band-pad-thin:  clamp(4rem, 8vw, 7.5rem);

  /* ---- Measures ---- */
  --measure:      34rem;
  --measure-wide: 60rem;
  --measure-grid: 72rem;

  /* ---- Misc ---- */
  --hairline: 1px solid var(--c-gold);
  --overlap: -6rem;
  --radius-card: 2px;
  --ease-out: cubic-bezier(.22, .8, .35, 1);
}
