/*
 * RBCD design tokens
 * Derived from the rendered homepage audit, then normalized for reuse.
 * This file does not style the current homepage unless it is explicitly enqueued.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/inter-latin-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("../fonts/playfair-display-latin-variable.woff2") format("woff2");
}

:root {
  /* Core palette */
  --rbcd-ink: #15120d;
  --rbcd-ink-soft: #3d3327;
  --rbcd-dark: #0f1410;
  --rbcd-cream: #fff7ea;
  --rbcd-paper: #fffdf8;
  --rbcd-sand: #ead8ba;
  --rbcd-gold: #d6a13a;
  --rbcd-maroon: #8e2926;
  --rbcd-green: #2f5a41;
  --rbcd-white: #ffffff;

  /* Alpha colors */
  --rbcd-cream-88: rgba(255, 247, 234, 0.88);
  --rbcd-cream-72: rgba(255, 247, 234, 0.72);
  --rbcd-cream-28: rgba(255, 247, 234, 0.28);
  --rbcd-cream-16: rgba(255, 247, 234, 0.16);
  --rbcd-cream-12: rgba(255, 247, 234, 0.12);
  --rbcd-cream-06: rgba(255, 247, 234, 0.06);
  --rbcd-ink-90: rgba(21, 18, 13, 0.9);
  --rbcd-ink-64: rgba(21, 18, 13, 0.64);
  --rbcd-ink-16: rgba(21, 18, 13, 0.16);
  --rbcd-ink-12: rgba(21, 18, 13, 0.12);
  --rbcd-gold-40: rgba(214, 161, 58, 0.4);
  --rbcd-gold-28: rgba(214, 161, 58, 0.28);
  --rbcd-gold-26: rgba(214, 161, 58, 0.26);
  --rbcd-gold-16: rgba(214, 161, 58, 0.16);

  /* Semantic colors */
  --rbcd-color-canvas: var(--rbcd-cream);
  --rbcd-color-surface: var(--rbcd-paper);
  --rbcd-color-surface-dark: var(--rbcd-dark);
  --rbcd-color-text: var(--rbcd-ink);
  --rbcd-color-text-soft: var(--rbcd-ink-soft);
  --rbcd-color-text-on-dark: var(--rbcd-cream);
  --rbcd-color-text-on-dark-muted: var(--rbcd-cream-72);
  --rbcd-color-accent: var(--rbcd-gold);
  --rbcd-color-route: var(--rbcd-green);
  --rbcd-color-danger: var(--rbcd-maroon);
  --rbcd-color-border: var(--rbcd-gold-28);
  --rbcd-color-focus: var(--rbcd-gold);

  /* Type families and weights */
  --rbcd-font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --rbcd-font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --rbcd-weight-regular: 400;
  --rbcd-weight-semibold: 600;
  --rbcd-weight-bold: 700;
  --rbcd-weight-extrabold: 800;
  --rbcd-weight-black: 900;

  /* Desktop type roles, verified at 1280px */
  --rbcd-type-body-size: 16px;
  --rbcd-type-body-line: 1.65;
  --rbcd-type-display-size: 112px;
  --rbcd-type-display-line: 0.98;
  --rbcd-type-h2-size: 76px;
  --rbcd-type-h2-line: 0.98;
  --rbcd-type-section-size: 67.2px;
  --rbcd-type-section-line: 1;
  --rbcd-type-feature-size: 64px;
  --rbcd-type-feature-line: 1;
  --rbcd-type-card-size: 21px;
  --rbcd-type-card-line: 1.25;
  --rbcd-type-lede-size: 20px;
  --rbcd-type-lede-line: 1.7;
  --rbcd-type-nav-size: 12px;
  --rbcd-type-button-size: 13px;
  --rbcd-type-chip-size: 11px;
  --rbcd-type-trust-size: 18px;
  --rbcd-type-eyebrow-size: 12px;
  --rbcd-type-footer-heading-size: 13px;

  /* Spacing scale */
  --rbcd-space-1: 4px;
  --rbcd-space-2: 8px;
  --rbcd-space-3: 12px;
  --rbcd-space-4: 16px;
  --rbcd-space-5: 20px;
  --rbcd-space-6: 24px;
  --rbcd-space-7: 28px;
  --rbcd-space-8: 32px;
  --rbcd-space-10: 40px;
  --rbcd-space-12: 48px;
  --rbcd-space-14: 56px;
  --rbcd-space-16: 64px;
  --rbcd-space-19: 76px;
  --rbcd-space-22: 88px;
  --rbcd-space-24: 96px;
  --rbcd-space-28: 112px;
  --rbcd-space-32: 128px;
  --rbcd-section-y: 115.2px;

  /* Layout */
  --rbcd-max: 1180px;
  --rbcd-reading-max: 720px;
  --rbcd-gutter: 20px;
  --rbcd-grid-gap: 28px;
  --rbcd-nav-height: 82px;

  /* Shape and depth */
  --rbcd-radius-xs: 3px;
  --rbcd-radius: 8px;
  --rbcd-radius-pill: 999px;
  --rbcd-border-thin: 1px;
  --rbcd-border-frame: 4px;
  --rbcd-shadow-soft: 0 22px 60px rgba(21, 18, 13, 0.1);
  --rbcd-shadow-panel: 0 24px 70px rgba(15, 20, 16, 0.24);
  --rbcd-shadow-frame: 0 24px 90px rgba(0, 0, 0, 0.38);
  --rbcd-shadow-frame-hover: 0 34px 100px rgba(0, 0, 0, 0.48);
  --rbcd-shadow-button: 0 12px 30px rgba(0, 0, 0, 0.2);
  --rbcd-shadow-hard: 4px 4px 0 var(--rbcd-ink);
  --rbcd-shadow-focus: 0 0 0 3px var(--rbcd-gold-16);

  /* Motion */
  --rbcd-duration-fast: 180ms;
  --rbcd-duration-base: 240ms;
  --rbcd-duration-slow: 500ms;
  --rbcd-duration-reveal: 850ms;
  --rbcd-ease-ui: ease;
  --rbcd-ease-reveal: cubic-bezier(0.22, 1, 0.36, 1);
  --rbcd-reveal-distance: 28px;

  /* Layering */
  --rbcd-z-base: 0;
  --rbcd-z-raised: 10;
  --rbcd-z-sticky: 40;
  --rbcd-z-overlay: 80;
}

/*
 * The audited homepage used fluid clamp() typography. New pages use a
 * discrete tablet step so type remains predictable between verified layout
 * boundaries and does not scale continuously with viewport width.
 */
@media (max-width: 980px) {
  :root {
    --rbcd-type-display-size: 72px;
    --rbcd-type-h2-size: 54px;
    --rbcd-type-section-size: 52px;
    --rbcd-type-feature-size: 44px;
    --rbcd-section-y: 88px;
  }
}

/* Mobile roles, verified at 390px */
@media (max-width: 680px) {
  :root {
    --rbcd-type-body-size: 14.592px;
    --rbcd-type-body-line: 1.65;
    --rbcd-type-display-size: 46.848px;
    --rbcd-type-display-line: 1.04;
    --rbcd-type-h2-size: 38px;
    --rbcd-type-h2-line: 0.98;
    --rbcd-type-section-size: 42px;
    --rbcd-type-section-line: 1;
    --rbcd-type-feature-size: 34px;
    --rbcd-type-feature-line: 1;
    --rbcd-type-lede-size: 16px;
    --rbcd-type-lede-line: 1.7;
    --rbcd-type-trust-size: 15px;
    --rbcd-section-y: 74px;
    --rbcd-gutter: 20px;
  }
}
