/* site/assets/app.css — shared foundation: fonts, reset, theme vars */

/* ==== Fonts: EB Garamond — Regular, Italic, SemiBold.
   Каждый файл содержит и латиницу и кириллицу (не subsettили). */

@font-face {
  font-family: 'EB Garamond';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('./fonts/EBGaramond-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic; font-weight: 400; font-display: swap;
  src: url('./fonts/EBGaramond-Italic.woff2') format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('./fonts/EBGaramond-SemiBold.woff2') format('woff2');
}

/* ==== Reset ==== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ==== CSS variables: light theme (default) ==== */
:root {
  --font-serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;

  --color-bg: #fafaf7;
  --color-bg-warm: #f5efe4;
  --color-text: #2a2a2a;
  --color-text-muted: #666;
  --color-text-subtle: #888;
  --color-border: #eaeae5;
  --color-accent: #1a1a1a;
  --color-accent-invert: #fafaf7;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-pill: 24px;
}

/* ==== Sepia theme (for reader) ==== */
[data-theme="sepia"] {
  --color-bg: #f5efe4;
  --color-text: #3a2e1f;
  --color-text-muted: #6b5d4a;
  --color-border: #e5dcc9;
}

/* ==== Dark theme (for reader) ==== */
[data-theme="dark"] {
  --color-bg: #1a1a1a;
  --color-text: #e8e2d2;
  --color-text-muted: #888;
  --color-border: #2a2a2a;
}
