/* ============== DESIGN TOKENS ============== */
:root,
[data-theme='light'] {
  /* Surfaces — warm cream / parchment */
  --color-bg: #f5f0e6;
  --color-surface: #faf6ee;
  --color-surface-2: #fdfaf3;
  --color-surface-offset: #ece4d3;
  --color-surface-offset-2: #e2d8c3;
  --color-divider: #d8cdb6;
  --color-border: #c8bca2;

  /* Text — deep ink */
  --color-text: #1d2533;
  --color-text-muted: #5a6573;
  --color-text-faint: #8a8e93;
  --color-text-inverse: #faf6ee;

  /* Primary — Blue Zone navy (matches the existing logo) */
  --color-primary: #1a3a5c;
  --color-primary-hover: #244e7a;
  --color-primary-active: #122a44;
  --color-primary-highlight: #c9d4e1;

  /* Warm secondary — golden hour amber */
  --color-accent-warm: #c89a4b;
  --color-accent-warm-hover: #b08236;

  /* Sage — Blue Zone life */
  --color-sage: #6e8a6a;
  --color-sage-hover: #557352;

  /* Terracotta — earth, ground */
  --color-terra: #b8674a;

  /* Status */
  --color-success: #4a7a3a;
  --color-warning: #c47a26;
  --color-error: #a83a3a;

  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 1rem + 5.5vw, 6rem);

  /* Spacing */
  --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;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --transition-interactive: 220ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(26, 58, 92, 0.08);
  --shadow-md: 0 4px 16px rgba(26, 58, 92, 0.12);
  --shadow-lg: 0 16px 40px rgba(26, 58, 92, 0.18);

  /* Content widths */
  --content-narrow: 720px;
  --content-default: 1080px;
  --content-wide: 1280px;

  /* Type families */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

[data-theme='dark'] {
  --color-bg: #0e1620;
  --color-surface: #14202e;
  --color-surface-2: #1a2838;
  --color-surface-offset: #1f2e3f;
  --color-surface-offset-2: #283b50;
  --color-divider: #2a3a4d;
  --color-border: #3a4c63;

  --color-text: #ebe4d4;
  --color-text-muted: #9aa3ad;
  --color-text-faint: #6a7380;
  --color-text-inverse: #14202e;

  --color-primary: #7eb0e2;
  --color-primary-hover: #a3c5ec;
  --color-primary-active: #5e98d2;
  --color-primary-highlight: #1f3950;

  --color-accent-warm: #e8c87c;
  --color-accent-warm-hover: #f0d795;

  --color-sage: #9bb594;
  --color-terra: #d18b6b;

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

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0e1620;
    --color-surface: #14202e;
    --color-surface-2: #1a2838;
    --color-surface-offset: #1f2e3f;
    --color-surface-offset-2: #283b50;
    --color-divider: #2a3a4d;
    --color-border: #3a4c63;
    --color-text: #ebe4d4;
    --color-text-muted: #9aa3ad;
    --color-text-faint: #6a7380;
    --color-text-inverse: #14202e;
    --color-primary: #7eb0e2;
    --color-primary-hover: #a3c5ec;
    --color-primary-active: #5e98d2;
    --color-primary-highlight: #1f3950;
    --color-accent-warm: #e8c87c;
    --color-sage: #9bb594;
    --color-terra: #d18b6b;
  }
}

/* ============== RESET / BASE ============== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  hanging-punctuation: first last;
}

body {
  min-height: 100dvh;
  line-height: 1.65;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
  line-height: 1.15;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
}

p,
li,
figcaption {
  text-wrap: pretty;
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
}

::selection {
  background: rgba(200, 154, 75, 0.3);
  color: var(--color-text);
}

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

@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;
  }
}

a,
button,
[role='button'],
input,
textarea,
select {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

.container {
  width: 100%;
  max-width: var(--content-wide);
  margin: 0 auto;
  padding-inline: clamp(var(--space-5), 4vw, var(--space-12));
}
