/*
 * tokens.css — shared design tokens and base styles
 * Linked by all four pages. Each page's inline <style> may add
 * page-specific overrides after this file is parsed.
 */

/* ─────────────────────────────────────────────
   DESIGN TOKENS
   ───────────────────────────────────────────── */

:root {
  /* Typography */
  --font-body:    'Newsreader', Georgia, serif;
  --font-display: 'Fraunces', Georgia, serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* Core surface + text */
  --bg:          #FAFAF8;
  --bg-alt:      #F4F1EB;
  --card:        #FFFFFF;
  --heading:     #1B2A1C;
  --body:        #2A2D28;
  --text-muted:  #8A7D6B;
  --line:        #E0DDD4;

  /* Accent */
  --accent:      #B8620A;
  --accent-deep: #7A3D04;
  --accent-light: #FDF3E0;

  /* Brand palette */
  --teal:        #2E7D32;
  --teal-dark:   #1B2821;
  --teal-light:  #E8EFE5;
  --amber:       #B8860B;
  --coral:       #A4582A;
  --urgency:     #A4582A;
  --blue:        #378ADD;
  --purple:      #7F77DD;

  /* Forest / nature palette */
  --forest:      #1B2821;
  --meadow:      #2E7D32;
  --spring:      #4CAF50;
  --sage:        #A5D6A7;
  --mist:        #E8F5E9;

  /* Warm tones */
  --harvest:     #B8860B;
  --goldenrod:   #DAA520;
  --wheat:       #F5E6C8;
  --wheat-light: #FDF3E0;
  --gray-bar:    #B0A898;

  /* Layout */
  --shadow:     0 1px 3px rgba(0, 0, 0, 0.06);
  --radius:     12px;
  --radius-sm:   8px;

  /* Animation — micro (hover/focus) | standard (state changes) */
  --t-fast:  150ms ease;
  --t-std:   300ms ease;
}

/* ─────────────────────────────────────────────
   DOCUMENT BASE
   ───────────────────────────────────────────── */

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

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, strong {
  color: var(--heading);
}

h1, h2 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

::selection {
  background: rgba(184, 98, 10, 0.15);
  color: inherit;
}

:focus-visible {
  outline: 2px solid #B8620A;
  outline-offset: 2px;
}

/* ─────────────────────────────────────────────
   PROGRESS BAR
   ───────────────────────────────────────────── */

.progress-track {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--line);
  z-index: 1100;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 100ms linear;
}

/* ─────────────────────────────────────────────
   SITE FOOTER  (light warm variant — matches storymap)
   ───────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 1.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 38rem;
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
}

.footer-nav a {
  color: var(--body);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}

.footer-nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.footer-rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 1.5rem 0;
}

.footer-credit {
  color: var(--body);
  font-family: var(--font-body);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 2.5rem 1rem;
  }
}
