/* =====================================================================
   Sahu Plywood & Hardware — design tokens  (BUILD_PLAN Phase 2.1)

   PROJECT FILE, not boilerplate. Kept out of global.css on purpose so
   `git merge upstream/main` never conflicts on it (see PROJECT.md: the
   theme is deliberately NOT renamed, so clean merges are the whole point).

   Palette: "Walnut & Brass" (D7), continuous with the live coming-soon page.
   ===================================================================== */

/* ---------------------------------------------------------------
   1. Self-hosted faces (D10 / 2.1)

   Latin: Fraunces (display) + Jost (body/UI).
   Devanagari: Noto Serif / Noto Sans Devanagari — chosen NOW because
   Fraunces and Jost have ZERO Devanagari coverage, and Phase 7 is not
   the place to discover that.

   Every face carries Google's own unicode-range, so Devanagari (248KB
   of the 418KB total) is downloaded ONLY when a U+0900–097F glyph is
   actually painted. English visitors never pay for it, and the Hindi
   side needs no :lang() switching — glyph routing is automatic.
   --------------------------------------------------------------- */
@font-face {
   font-family: 'Fraunces';
   font-style: normal;
   font-weight: 300 700;
   font-display: swap;
   src: url('../fonts/fraunces-latin-ext.woff2') format('woff2');
   unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
   font-family: 'Fraunces';
   font-style: normal;
   font-weight: 300 700;
   font-display: swap;
   src: url('../fonts/fraunces-latin.woff2') format('woff2');
   unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
   font-family: 'Jost';
   font-style: normal;
   font-weight: 300 700;
   font-display: swap;
   src: url('../fonts/jost-latin-ext.woff2') format('woff2');
   unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
   font-family: 'Jost';
   font-style: normal;
   font-weight: 300 700;
   font-display: swap;
   src: url('../fonts/jost-latin.woff2') format('woff2');
   unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
   font-family: 'Noto Serif Devanagari';
   font-style: normal;
   font-weight: 300 700;
   font-stretch: 100%;
   font-display: swap;
   src: url('../fonts/noto-serif-devanagari-devanagari.woff2') format('woff2');
   unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}

@font-face {
   font-family: 'Noto Sans Devanagari';
   font-style: normal;
   font-weight: 300 700;
   font-stretch: 100%;
   font-display: swap;
   src: url('../fonts/noto-sans-devanagari-devanagari.woff2') format('woff2');
   unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}

/* ---------------------------------------------------------------
   2. Palette (D7) — every ratio below was COMPUTED, not eyeballed.
   --------------------------------------------------------------- */
:root {
   --ink:       #1C1614;  /* body text on light; CTA label on brass       */
   --walnut:    #3D2B22;  /* headings; dark section grounds               */
   --cream:     #F5EFE6;  /* page ground; body text on dark               */
   --brass:     #B8863B;  /* CTA FILL, rules, decoration — never text/light */
   --brass-ink: #8F6124;  /* brass-coloured TEXT, on light grounds only   */
   --sage:      #6B7A63;  /* secondary accent, large text / UI only       */

   --ground:      var(--cream);
   --ground-dark: var(--walnut);
   --body:        var(--ink);
   --heading:     var(--walnut);
   --rule:        rgb(61 43 34 / 0.14);
}

/* CONTRAST LEDGER — verified against WCAG 2.1 relative luminance.
   ON CREAM (light ground)
     ink        15.65:1  body text                            AA + AAA
     walnut     11.72:1  headings                             AA + AAA
     brass-ink   4.71:1  brass-looking text                   AA body
     sage        4.00:1  LARGE TEXT / UI ONLY (>=18.66px bold or 24px)
     brass       2.82:1  FORBIDDEN as text — fails AA *and* the 3:1 UI floor
   ON BRASS (CTA fill)
     ink         5.55:1  the primary button                   AA body
     cream       2.82:1  FORBIDDEN — this is the same failure inverted
     walnut      4.16:1  large text / UI only
   ON WALNUT (dark sections)
     cream      11.72:1  the ONLY safe body text on dark      AA + AAA
     brass       4.16:1  large text / UI only
     brass-ink   2.49:1  FORBIDDEN
     sage        2.93:1  FORBIDDEN — fails even the 3:1 UI floor

   ^ The last three rows are NOT in BUILD_PLAN 2.1, which only ever
   states brass/sage ratios against cream. On walnut the accents invert:
   brass becomes usable (4.16) while brass-ink and sage both become
   unusable. D6 calls for dark sections, so this matters — on walnut,
   text is cream, and brass is the only accent. */

/* ---------------------------------------------------------------
   3. Type scale — declared once, fluid, never re-derived per section.
   --------------------------------------------------------------- */
:root {
   --font-display: 'Fraunces', 'Noto Serif Devanagari', Georgia, serif;
   --font-body:    'Jost', 'Noto Sans Devanagari', system-ui, sans-serif;

   --step--1: clamp(0.833rem, 0.81rem + 0.11vw, 0.889rem);
   --step-0:  clamp(1rem,     0.96rem + 0.20vw, 1.125rem);   /* body */
   --step-1:  clamp(1.2rem,   1.14rem + 0.32vw, 1.406rem);
   --step-2:  clamp(1.44rem,  1.34rem + 0.50vw, 1.758rem);
   --step-3:  clamp(1.728rem, 1.57rem + 0.76vw, 2.197rem);
   --step-4:  clamp(2.074rem, 1.85rem + 1.13vw, 2.747rem);
   --step-5:  clamp(2.488rem, 2.16rem + 1.65vw, 3.433rem);   /* hero */

   --leading-tight: 1.15;
   --leading-body:  1.6;
   --tracking-eyebrow: 0.12em;

   --weight-body:    400;
   --weight-medium:  500;
   --weight-heading: 600;
}

/* ---------------------------------------------------------------
   4. Rhythm (D6) — 80px desktop / 48px mobile.

   Bootstrap's spacing scale stops at 48px (py-5) and there is NO Sass
   build here, so 80px cannot be expressed as a Bootstrap utility. That
   is why `.py-section` exists as one project utility rather than an
   approximation with py-5.
   --------------------------------------------------------------- */
:root {
   --space-section: 48px;
   --space-gutter:  1.5rem;
   --radius:        4px;
   --radius-lg:     8px;
   --shadow-card:   0 1px 2px rgb(28 22 20 / 0.06), 0 8px 24px rgb(28 22 20 / 0.07);
   --measure:       68ch;
   --tap-min:       44px;   /* iOS minimum touch target */
}
@media (min-width: 992px) {
   :root { --space-section: 80px; }
}
