/* ============================================================
   Baldwin Digital — Design Tokens (System B: Editorial Hybrid)
   Loaded after shared.css. Overrides legacy variables.
   ============================================================ */

:root {
  /* Canvas + ink */
  --bg: #F5F1EA;
  --surface: #FFFFFF;
  --surface-alt: #EDE7DC;
  --text: #1A1A1A;
  --text-soft: #4A4A4A;
  --text-muted: #6B6B6B;

  /* Brand grounding (deep forest, replaces navy site-wide) */
  --blue: #1B2A20;
  --blue-deep: #0F1B17;
  --blue-soft: #E0E8E4;

  /* Editorial accent (forest green) */
  --accent: #2A4A3F;
  --accent-soft: #E0E8E4;
  --accent-rgb: 42, 74, 63;

  /* Functional */
  --success: #2F6A4E;
  --warning: #B5733B;
  --line: rgba(26, 26, 26, 0.10);
  --line-strong: rgba(26, 26, 26, 0.18);

  /* Typography */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", Helvetica, Arial, sans-serif;

  --type-hero: clamp(3.5rem, 7vw, 8rem);
  --type-display: clamp(2.5rem, 4.5vw, 4.5rem);
  --type-h2: clamp(2rem, 3.5vw, 3rem);
  --type-h3: clamp(1.5rem, 2.5vw, 2rem);
  --type-body: clamp(1.05rem, 1.15vw, 1.18rem);
  --type-small: 0.875rem;
  --type-eyebrow: 0.78rem;

  --leading-tight: 1.05;
  --leading-snug: 1.2;
  --leading-normal: 1.65;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: clamp(4rem, 7vw, 8rem);

  /* Layout */
  --container-narrow: 720px;
  --container: 1280px;
  --gutter: clamp(1rem, 3vw, 2rem);

  /* Motion */
  --transition: 220ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-slow: 440ms cubic-bezier(0.22, 1, 0.36, 1);

  /* Shadows (sparing) */
  --shadow-sm: 0 4px 12px rgba(15, 27, 22, 0.04);
  --shadow-md: 0 12px 32px rgba(15, 27, 22, 0.06);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
}

/* ============================================================
   Baseline element layer
   Applies tokens to plain HTML elements so legacy pages get the
   editorial lift without per-page restyling. Pages that need a
   fully bespoke look override these via page-specific .css.
   ============================================================ */

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--type-body);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--leading-tight);
  color: var(--text);
  letter-spacing: -0.005em;
}

h1 { font-size: var(--type-display); }
h2 { font-size: var(--type-h2); }
h3 { font-size: var(--type-h3); }

p {
  font-family: var(--font-body);
  line-height: var(--leading-normal);
  color: var(--text);
}

a {
  color: var(--text);
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
  transition: color var(--transition);
}

a:hover { color: var(--accent); }

/* Footer + nav use surface colors; legacy section padding is preserved
   by NOT overriding `section { padding-block }` here (would have broken
   pages with their own padding). */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header .brand-name { font-family: var(--font-display); color: var(--text); }
.site-header .brand-mark { background: var(--blue); color: var(--bg); font-family: var(--font-display); }
.site-header .header-phone { color: var(--blue); }
.site-header .header-phone:hover { color: var(--accent); }
.site-header .nav-link { color: var(--text); font-family: var(--font-body); }
.site-header .nav-link:hover,
.site-header .nav-link.active { color: var(--accent); }
.site-header .primary-btn,
.site-header .btn.primary-btn {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.site-header .primary-btn:hover,
.site-header .btn.primary-btn:hover {
  background: color-mix(in srgb, var(--accent) 88%, black);
  color: var(--bg);
}

.site-footer {
  background: var(--text);
  color: var(--bg);
}
.site-footer * { color: var(--bg); }
.site-footer h3 { color: var(--bg); font-family: var(--font-display); }
.site-footer a {
  color: var(--bg);
  text-decoration-color: rgba(245, 241, 234, 0.55);
}
.site-footer a:hover {
  color: var(--accent-soft);
  text-decoration-color: var(--accent-soft);
}
.site-footer .brand-mark { background: var(--accent); color: var(--bg); }
.site-footer .footer-bottom p,
.site-footer .footer-bottom a { color: var(--bg); }

/* Legacy button shells get nudged toward the new palette */
.btn.btn-primary,
.btn.primary-btn {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
}
.btn.btn-primary:hover,
.btn.primary-btn:hover {
  background: color-mix(in srgb, var(--accent) 88%, black);
  color: var(--bg);
}
.btn.btn-secondary,
.btn.secondary-btn {
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--blue);
}
.btn.btn-secondary:hover,
.btn.secondary-btn:hover {
  background: var(--blue);
  color: var(--bg);
}

/* Legacy eyebrows + section headings inherit serif treatment */
.eyebrow,
.bento-eyebrow,
.card-kicker,
.insight-label {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: var(--type-eyebrow);
  font-weight: 700;
  color: var(--accent);
}

.section-alt,
.bento-approach {
  background: var(--surface-alt);
}

/* Legacy card shells — softer borders, cream surface */
.metric-card,
.service-card,
.related-card,
.bento-step,
.insight-stack > article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

/* Breadcrumbs — quiet bar sitting above the hero */
.breadcrumbs {
  background: transparent;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: var(--type-small);
}
.breadcrumbs a { color: var(--text-soft); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current="page"] { color: var(--text); }
