/* ============================================================
   MHD Detailing — Typography tokens
   Display: Magistral (substitute: Orbitron). Body: Inter.
   Type scale is FLUID: every size is a clamp() in rem that
   interpolates between a 360px (22.5rem) and 1200px (75rem)
   viewport — the same method as the Display type specimen.
   No px, no breakpoint jumps. Headings are tuned so none
   exceeds the Display sample.
   ============================================================ */
:root {
  --font-display: "Orbitron", "Saira", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --font-weight-display: 400;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* --- Fluid heading scale (rem) ---
     clamp(min, min + Δ·((100vw − 22.5rem) / 52.5), max)
     52.5 = (75rem − 22.5rem) as a unitless divisor. */
  --text-h1: clamp(2rem,     calc(2rem     + 1     * ((100vw - 22.5rem) / 52.5)), 3rem);     /* 32 → 48 */
  --text-h2: clamp(1.75rem,  calc(1.75rem  + 0.75  * ((100vw - 22.5rem) / 52.5)), 2.5rem);   /* 28 → 40 */
  --text-h3: clamp(1.5rem,   calc(1.5rem   + 0.5   * ((100vw - 22.5rem) / 52.5)), 2rem);     /* 24 → 32 */
  --text-h4: clamp(1.25rem,  calc(1.25rem  + 0.375 * ((100vw - 22.5rem) / 52.5)), 1.625rem); /* 20 → 26 */
  --text-h5: clamp(1.125rem, calc(1.125rem + 0.25  * ((100vw - 22.5rem) / 52.5)), 1.375rem); /* 18 → 22 */
  --text-h6: clamp(1rem,     calc(1rem     + 0.125 * ((100vw - 22.5rem) / 52.5)), 1.125rem); /* 16 → 18 */

  /* --- Fluid body scale (rem) --- */
  --text-large:   clamp(1.125rem, calc(1.125rem + 0.5  * ((100vw - 22.5rem) / 52.5)), 1.625rem); /* 18 → 26 */
  --text-medium:  clamp(1rem,     calc(1rem     + 0.25 * ((100vw - 22.5rem) / 52.5)), 1.25rem);  /* 16 → 20 */
  --text-regular: clamp(0.875rem, calc(0.875rem + 0.25 * ((100vw - 22.5rem) / 52.5)), 1.125rem); /* 14 → 18 */
  --text-small:   clamp(0.75rem,  calc(0.75rem  + 0.25 * ((100vw - 22.5rem) / 52.5)), 1rem);     /* 12 → 16 */
  --text-tiny:    clamp(0.625rem, calc(0.625rem + 0.125 * ((100vw - 22.5rem) / 52.5)), 0.75rem); /* 10 → 12 */

  --leading-heading: 1.2;
  --leading-h1: 1.1;
  --leading-body: 1.6;
  --tracking-heading: 0.01em;
}

/* --- Base element defaults --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  margin: 0;
}
h1 { font-size: var(--text-h1); line-height: var(--leading-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }
h5 { font-size: var(--text-h5); }
h6 { font-size: var(--text-h6); }

body {
  font-family: var(--font-body);
  font-size: var(--text-medium);
  line-height: var(--leading-body);
  font-weight: var(--font-weight-regular);
}
