/* ===================================================================
   MH AI Consulting v3 — base.css
   Design tokens (same brand as v2: terracotta + cream, General Sans / Switzer),
   reset, layout primitives.
   =================================================================== */

:root {
  color-scheme: light;

  /* ---- Fonts ---- */
  --font-display: 'General Sans', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Switzer', 'Segoe UI', system-ui, sans-serif;

  /* ---- Color — Light ---- */
  --color-bg: #fbf5ee;
  --color-surface: #ffffff;
  --color-surface-2: #f6ecdf;
  --color-surface-offset: #f1e4d2;
  --color-border: #e7d8c4;
  --color-divider: #ede0cd;

  --color-text: #2a2016;
  --color-text-muted: #6f5f4c;
  --color-text-faint: #a8977f;
  --color-text-inverse: #fbf5ee;

  --color-primary: #dd5b2b;
  --color-primary-hover: #bd4620;
  --color-primary-active: #9c3a19;
  --color-primary-highlight: #f8ddc9;
  --color-on-primary: #ffffff;

  --color-gold: #c98a2e;
  --color-gold-highlight: #f3e2bd;

  --color-ink: #2a2016;          /* dark band background (CTA, footer) */
  --color-on-ink: #fbf5ee;
  --color-on-ink-muted: #cbb9a2;

  --color-success: #4b7a3d;
  --color-error: #ad3d3d;

  --header-bg: rgba(251, 245, 238, 0.86);

  --shadow-color: 30 25 12;
  --shadow-sm: 0 1px 2px rgb(var(--shadow-color) / 0.07), 0 1px 1px rgb(var(--shadow-color) / 0.04);
  --shadow-md: 0 4px 16px rgb(var(--shadow-color) / 0.08), 0 1px 3px rgb(var(--shadow-color) / 0.06);
  --shadow-lg: 0 18px 44px rgb(var(--shadow-color) / 0.14), 0 4px 12px rgb(var(--shadow-color) / 0.08);

  /* ---- Spacing (4px system) ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ---- Radius ---- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* ---- Content widths ---- */
  --content-narrow: 680px;
  --content-default: 1040px;
  --content-wide: 1200px;

  /* ---- Type scale (fluid) ---- */
  --text-xs: clamp(0.75rem, 0.72rem + 0.1vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.84rem + 0.14vw, 0.9375rem);
  --text-base: clamp(1rem, 0.96rem + 0.16vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.06rem + 0.24vw, 1.25rem);
  --text-xl: clamp(1.3125rem, 1.22rem + 0.4vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.38rem + 0.6vw, 1.875rem);
  --text-3xl: clamp(1.875rem, 1.6rem + 1.2vw, 2.75rem);
  --text-hero: clamp(2.375rem, 1.8rem + 2.6vw, 4.25rem);

  --leading-tight: 1.1;
  --leading-snug: 1.35;
  --leading-body: 1.6;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 600ms;
}

/* Dark tokens: applied when the visitor chose dark, or when their system is dark
   and they haven't chosen light. The inline script in <head> sets data-theme
   before first paint so there is no flash. */
:root[data-theme='dark'] {
  color-scheme: dark;

  --color-bg: #1a130d;
  --color-surface: #221913;
  --color-surface-2: #291e17;
  --color-surface-offset: #31241b;
  --color-border: #3d2c20;
  --color-divider: #362820;

  --color-text: #f3e8da;
  --color-text-muted: #bba68d;
  --color-text-faint: #7a6852;
  --color-text-inverse: #1a130d;

  --color-primary: #f1874f;
  --color-primary-hover: #f5a06f;
  --color-primary-active: #f7b489;
  --color-primary-highlight: #442a1c;
  --color-on-primary: #1a130d;

  --color-gold: #e0a844;
  --color-gold-highlight: #40311a;

  --color-ink: #0f0b07;
  --color-on-ink: #f3e8da;
  --color-on-ink-muted: #a8937b;

  --color-success: #7fb56a;
  --color-error: #d97575;

  --header-bg: rgba(26, 19, 13, 0.86);

  --shadow-color: 0 0 0;
  --shadow-sm: 0 1px 2px rgb(var(--shadow-color) / 0.3);
  --shadow-md: 0 4px 16px rgb(var(--shadow-color) / 0.35);
  --shadow-lg: 0 18px 44px rgb(var(--shadow-color) / 0.45);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, p, figure, blockquote { margin: 0; }
input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-wrap: balance;
}
p { text-wrap: pretty; }

.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--wide { max-width: var(--content-wide); }
.container--narrow { max-width: var(--content-narrow); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: var(--space-4); }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
