/* Design tokens */
:root, [data-theme="light"] {
  /* 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 + 6vw, 6.5rem);

  /* 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;

  /* Surfaces — warm off-white, financial-services restraint */
  --color-bg: #F5F2EC;
  --color-surface: #FAF7F2;
  --color-surface-2: #FDFBF7;
  --color-surface-offset: #EFEBE3;
  --color-surface-offset-2: #E7E2D8;
  --color-divider: #DDD7CB;
  --color-border: #CFC8B8;

  /* Text — deep ink, not black */
  --color-text: #1A1D1C;
  --color-text-muted: #5E655F;
  --color-text-faint: #9CA098;
  --color-text-inverse: #FAF7F2;

  /* Primary — deep teal, one accent only */
  --color-primary: #0C4A46;
  --color-primary-hover: #0A3A37;
  --color-primary-active: #082B28;
  --color-primary-highlight: #D2DFDA;

  /* Semantic reserves */
  --color-warning: #8A4A1A;
  --color-error: #8E2E2E;
  --color-success: #3A6B2A;

  /* Radius — restrained, corporate */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-full: 9999px;

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

  --shadow-sm: 0 1px 2px rgba(26, 29, 28, 0.04);
  --shadow-md: 0 4px 12px rgba(26, 29, 28, 0.06);
  --shadow-lg: 0 12px 32px rgba(26, 29, 28, 0.08);

  --content-narrow: 640px;
  --content-default: 1040px;
  --content-wide: 1240px;

  --font-display: 'Boska', 'Playfair Display', Georgia, serif;
  --font-body: 'Satoshi', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"] {
  --color-bg: #131614;
  --color-surface: #191C1A;
  --color-surface-2: #1D211E;
  --color-surface-offset: #222622;
  --color-surface-offset-2: #2A2E29;
  --color-divider: #262A26;
  --color-border: #363A35;
  --color-text: #E8E5DE;
  --color-text-muted: #8C8F87;
  --color-text-faint: #5C5F58;
  --color-text-inverse: #131614;
  --color-primary: #4A9992;
  --color-primary-hover: #5CADA6;
  --color-primary-active: #6BBBB4;
  --color-primary-highlight: #223533;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
}

/* 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: var(--space-16);
}
body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; }
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: 500; letter-spacing: -0.01em; }
p, li, figcaption { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(12, 74, 70, 0.2); 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;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
button { cursor: pointer; background: none; border: none; }
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);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
