/* ============ 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(3rem, 0.5rem + 7vw, 7.5rem);

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

  /* Palette — white background, black text, gold trim */
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-2: #fafaf7;
  --color-surface-offset: #f5f3ec;
  --color-border: #e6e2d6;
  --color-divider: #ececec;

  --color-text: #0a0a0a;
  --color-text-muted: #4a4a4a;
  --color-text-faint: #8a8a8a;
  --color-text-inverse: #fafaf7;

  --color-primary: #0a0a0a;        /* black */
  --color-primary-hover: #1f1f1f;
  --color-accent: #b8892b;         /* gold */
  --color-accent-hover: #9a721f;
  --color-accent-soft: #f2e7c9;
  --color-accent-highlight: #faf3de;

  /* Radius */
  --radius-sm: 0.25rem;
  --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);

  --shadow-sm: 0 1px 2px rgb(10 10 10 / 0.05);
  --shadow-md: 0 6px 20px rgb(10 10 10 / 0.07);
  --shadow-lg: 0 18px 50px rgb(10 10 10 / 0.12);

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

  --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', 'Helvetica Neue', system-ui, sans-serif;
}

[data-theme="dark"] {
  --color-bg: #0b0b0b;
  --color-surface: #111111;
  --color-surface-2: #161513;
  --color-surface-offset: #1a1815;
  --color-border: #2a2724;
  --color-divider: #1f1e1c;
  --color-text: #f2f0ea;
  --color-text-muted: #b8b5ad;
  --color-text-faint: #7a7772;
  --color-text-inverse: #0a0a0a;
  --color-primary: #f2f0ea;
  --color-primary-hover: #ffffff;
  --color-accent: #e0b755;
  --color-accent-hover: #f0c76a;
  --color-accent-soft: #2b2314;
  --color-accent-highlight: #372c17;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow-md: 0 6px 20px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 18px 50px rgb(0 0 0 / 0.6);
}

/* ============ 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: 5rem;
}

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);
  -webkit-text-size-adjust: none;
}

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

h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.15; }
p, li { text-wrap: pretty; max-width: 68ch; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--color-accent-soft); color: var(--color-text); }

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

button { cursor: pointer; background: none; border: none; color: inherit; font: inherit; }

a, button {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}

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

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