/* Hallmark · macrostructure: editorial · theme: editorial · contrast: pass (40–41) · mobile: pass (34, 49, 50–57) */
/* Vowpool Design System — Spec §11 */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400..700;1,9..144,400..700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #FAF7F2;
  --surface: #FCFAF7;
  --surface-alt: #F4EFEB;
  --border: #E7E1D6;
  --border-focus: #1F3D36;

  --text: #1F1B16;
  --text-muted: #6B6358;
  --text-dim: #999083;

  --primary: #1F3D36;
  --primary-hover: #162E29;
  --primary-contrast: #FFFFFF;

  --accent: #B8893B; /* gold: fills, icons and badges only, never text */
  --accent-light: #F7EEDB;

  --ok: #2F7D5B;
  --ok-bg: #EAF5EF;
  --warn: #C26A1B;
  --warn-bg: #FDF3E7;
  --info: #2F5DA8;
  --info-bg: #EDF3FC;
  --plum: #7A4B8C;
  --plum-bg: #F5EDF8;
  --danger: #B3261E;
  --danger-bg: #FDF0EF;

  --radius-card: 12px;
  --radius-ctl: 8px;
  --radius-pill: 999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --shadow-sm: 0 1px 3px rgba(31, 27, 22, 0.05);
  --shadow-md: 0 4px 16px rgba(31, 27, 22, 0.08);
  --shadow-lg: 0 12px 32px rgba(31, 27, 22, 0.12);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141210;
    --surface: #1D1A16;
    --surface-alt: #26221D;
    --border: #332E27;
    --border-focus: #4EA392;

    --text: #F5F0E6;
    --text-muted: #A69E92;
    --text-dim: #70695E;

    --primary: #2D5A50;
    --primary-hover: #387063;
    --primary-contrast: #FFFFFF;

    --accent: #D4A34F;
    --accent-light: #2D2415;

    --ok: #3E9D73;
    --ok-bg: #152B20;
    --warn: #D97E2B;
    --warn-bg: #301F0E;
    --info: #4676C7;
    --info-bg: #13223D;
    --plum: #9B63AF;
    --plum-bg: #2B1633;
    --danger: #D93D33;
    --danger-bg: #381311;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  }
}

/* Box sizing and baseline */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: clip;
}

h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

h1 { font-size: 2rem; line-height: 1.25; }
h2 { font-size: 1.5rem; line-height: 1.3; }
h3 { font-size: 1.25rem; line-height: 1.4; }

p {
  color: var(--text-muted);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  text-decoration: underline;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
