/* For The Books design system: colors (light + dark), fonts, spacing, corners, shadow and text styles. Mirrors tokens.json; change both together. */

@font-face { font-family: "Fraunces"; src: url("fonts/Fraunces-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/Fraunces-Variable-Italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Berkshire Swash"; src: url("fonts/BerkshireSwash-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-400-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* Light theme (default) */
:root,
[data-theme="light"] {
  --mint: #f5fcf7;
  --olive: #96be8c;
  --sage: #629460;
  --evergreen: #243119;
  --salmon: #ff9b85;
  --surface: var(--mint);
  --surface-raised: #ffffff;
  --surface-tint: #e3efe0;
  --ink: var(--evergreen);
  --ink-muted: #4e5f4a;
  --brand: var(--sage);
  --brand-text: #3f6b3d;
  --link: var(--brand-text);
  --accent: var(--salmon);
  --on-accent: var(--evergreen);
  --accent-text: #b4432c;
  --highlight: var(--olive);
  --on-highlight: var(--evergreen);
  --line: #d6e4d1;
  --line-strong: #6a8764;
  --focus: #3f6b3d;
  --shadow-pop: 1px 1px 2px 1px #2431190d;
  --shadow-offset: 3px 3px 0 0 #243119;
  --shadow-offset-hover: 4px 4px 0 0 #243119;
}

/* Dark (Sage) theme — opt in with data-theme="dark" on <html> */
[data-theme="dark"] {
  --mint: #f5fcf7;
  --olive: #96be8c;
  --sage: #629460;
  --evergreen: #243119;
  --salmon: #ff9b85;
  --surface: var(--sage);
  --surface-raised: #4a734a;
  --surface-tint: #3f6b3d;
  --ink: var(--mint);
  --ink-muted: var(--mint);
  --brand: var(--sage);
  --brand-text: var(--mint);
  --link: var(--brand-text);
  --accent: var(--salmon);
  --on-accent: var(--evergreen);
  --accent-text: var(--salmon);
  --highlight: var(--olive);
  --on-highlight: var(--evergreen);
  --line: #7ba878;
  --line-strong: var(--mint);
  --focus: var(--mint);
  --shadow-pop: 1px 1px 2px 1px #2431190e;
  --shadow-offset: 3px 3px 0 0 #f5fcf7;
  --shadow-offset-hover: 4px 4px 0 0 #f5fcf7;
}

/* Spacing, radius, font families */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-swash: "Berkshire Swash", Georgia, "Times New Roman", serif;
}

/* Base */
html { background: var(--surface); color: var(--ink); font-family: var(--font-sans); }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Type styles — use as classes, e.g. <h1 class="h1"> */
.display { font-family: var(--font-serif); font-size: 56px; line-height: 60px; font-weight: 700; letter-spacing: -0.02em; font-variation-settings: 'opsz' 144; }
.display-xl { font-family: var(--font-swash); font-size: 88px; line-height: 92px; font-weight: 400; }
@media (max-width: 479px) { .display-xl { font-size: 60px; line-height: 64px; } }
.h1 { font-family: var(--font-serif); font-size: 40px; line-height: 46px; font-weight: 700; letter-spacing: -0.015em; }
.h2 { font-family: var(--font-serif); font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.01em; }
.h3 { font-family: var(--font-serif); font-size: 22px; line-height: 28px; font-weight: 700; }
.quote { font-family: var(--font-serif); font-size: 24px; line-height: 34px; font-weight: 700; font-style: italic; }
.body-lg { font-family: var(--font-sans); font-size: 18px; line-height: 30px; font-weight: 400; }
.body { font-family: var(--font-sans); font-size: 16px; line-height: 26px; font-weight: 400; }
.label { font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 500; }
.caption { font-family: var(--font-sans); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.04em; }
