/* ===== BASE.CSS — Reset & Tokens ===== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Color palette — light */
  --color-bg: #F7F3EE;
  --color-surface: #FDFAF6;
  --color-surface-offset: #F0EAE2;
  --color-divider: #D9CFC4;
  --color-text: #2C2420;
  --color-text-secondary: #6B5D55;
  --color-text-faint: #A89890;
  --color-accent: #7B3F5E;
  --color-accent-hover: #692F50;
  --color-accent-subtle: #F3E6EE;

  /* 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-7: 1.75rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Typography */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.875rem;
  --text-3xl: 2.25rem;
  --text-4xl: 2.75rem;
  --text-5xl: 3.5rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(44,36,32,0.08);
  --shadow-md: 0 4px 12px rgba(44,36,32,0.10);
  --shadow-lg: 0 8px 24px rgba(44,36,32,0.12);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

[data-theme="dark"] {
  --color-bg: #1A1512;
  --color-surface: #221E1B;
  --color-surface-offset: #2A2420;
  --color-divider: #3D3530;
  --color-text: #F0E8DF;
  --color-text-secondary: #B8A89A;
  --color-text-faint: #7A6A60;
  --color-accent: #C47FA0;
  --color-accent-hover: #D490B2;
  --color-accent-subtle: #3A2030;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
}

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

body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--transition-base), color var(--transition-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img, video { max-width: 100%; display: block; }

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

ul, ol { list-style: none; }

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

input, textarea, select {
  font: inherit;
  border: none;
  outline: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Lora', Georgia, serif;
  line-height: 1.25;
  font-weight: 500;
}

p { max-width: 68ch; }

/* Containers */
.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.container--wide { max-width: 1080px; }
.container--narrow { max-width: 560px; }

/* Sections */
section {
  padding: var(--space-20) 0;
}

@media (max-width: 640px) {
  section { padding: var(--space-12) 0; }
  .container { padding: 0 var(--space-4); }
}
