/* ══════════════════════════════════════════════════════════════════
   CLE HISTORY — SHARED SITE STYLES
   All rules that appeared duplicated across 10+ pages, consolidated.
   Page-specific styles remain in each page's inline <style>.
   ══════════════════════════════════════════════════════════════════ */

/* ─── DESIGN TOKENS ───────────────────────────────────────────── */
:root {
  --bg: #ffffff;
  --paper: #fcfaf7;
  --ink: #1a1a1a;
  --accent: #b84a1e;
  --gold: #c9a84c;
  --border: #e0e0e0;
  --muted: #777;
  --muted-light: #aaa;
  /* Lake-themed extensions used on lakefront sub-pages */
  --lake: #2a6080;
  --lake-light: #4a8aa8;
  --lake-pale: #e8f2f7;
  --nature: #5a8f5a;
  --infra: #5a7a9a;
}

/* ─── RESET & BASE ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Crimson Pro', Georgia, serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── NAVIGATION (shared shell) ──────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,0.98);
  border-bottom: 1px solid var(--border);
  padding: 0 5vw; height: 80px;
  display: flex; justify-content: space-between; align-items: center;
  backdrop-filter: blur(10px);
}
.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 1px;
}
.nav-logo span { color: var(--accent); }
.site-nav ul {
  display: flex;
  list-style: none;
  gap: 2.2rem;
  align-items: center;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 2px;
  font-size: 0.88rem;
  transition: color 0.3s;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a.active { color: var(--accent); }
.nav-back {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 2px;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  display: flex; align-items: center; gap: 0.5rem;
  transition: color 0.3s;
}
.nav-back:hover { color: var(--accent); }
@media (max-width: 900px) {
  .site-nav ul { gap: 1.3rem; }
  .site-nav a { font-size: 0.78rem; letter-spacing: 1.5px; }
  .nav-hide-mobile { display: none; }
}
@media (max-width: 640px) {
  .site-nav { padding: 0 4vw; }
  .site-nav ul { gap: 1rem; }
  .site-nav a { font-size: 0.72rem; letter-spacing: 1px; }
}

/* ─── FOOTER (shared shell) ──────────────────────────────────── */
.site-footer {
  padding: 5rem 5vw;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.site-footer .footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  max-width: 60ch;
}
.site-footer .footer-copy {
  text-align: right;
  font-size: 0.85rem;
  color: var(--muted-light);
  line-height: 1.5;
}
.site-footer .footer-copy span {
  font-size: 0.78rem;
  display: inline-block;
  margin-top: 0.2rem;
}
.site-footer .footer-copy a {
  color: var(--muted-light);
  text-decoration: underline;
  text-decoration-color: #ddd;
  text-underline-offset: 2px;
}
.site-footer .footer-copy a:hover { color: var(--accent); }
.site-footer .footer-link {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 3px;
  font-size: 0.78rem;
  color: var(--muted-light);
  text-decoration: none;
  border-bottom: 1px solid #ddd;
  padding-bottom: 2px;
  transition: color 0.3s, border-color 0.3s;
}
.site-footer .footer-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ─── SCROLL REVEAL ANIMATION (shared) ───────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* ─── SECTION TAG (used everywhere) ──────────────────────────── */
.section-tag {
  font-family: 'Bebas Neue', sans-serif;
  color: var(--accent);
  letter-spacing: 4px;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}
.chapter-tag {
  font-family: 'Bebas Neue', sans-serif;
  color: var(--accent);
  letter-spacing: 4px;
  font-size: 0.8rem;
  margin-bottom: 1.2rem;
}

/* ─── FOCUS STYLES (accessibility) ───────────────────────────── */
*:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.site-nav a:focus-visible,
.nav-back:focus-visible,
.nav-logo:focus-visible {
  outline-offset: 4px;
}

/* ─── EXPLORE CARDS (shared between index, origins, cuyahoga, architecture, new pages) ─── */
.cards-section {
  padding: 8rem 5vw;
  background: #fff;
  border-top: 1px solid var(--border);
}
.cards-heading { margin-bottom: 4rem; max-width: 100%; }
.cards-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  font-weight: 900;
}
.cards-title em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}
.cards-intro {
  font-size: 1.1rem;
  color: var(--muted);
  font-style: italic;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.card {
  text-decoration: none;
  color: inherit;
  display: block;
  border: 1px solid var(--border);
  transition: transform 0.4s, border-color 0.4s;
  background: #fff;
}
.card:hover {
  transform: translateY(-10px);
  border-color: var(--accent);
}
.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.4s;
  display: block;
}
.card:hover img { filter: grayscale(0%); }
.card-body { padding: 1.5rem; }
.card-era {
  font-family: 'Bebas Neue', sans-serif;
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 2px;
}
.card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  margin: 0.5rem 0 0;
  font-weight: 700;
}
.card p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 0.6rem;
  line-height: 1.55;
}

.dig-deeper-wrap {
  margin-top: 4rem;
  display: flex;
  justify-content: center;
}
.dig-deeper-btn {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  text-decoration: none;
  color: var(--muted);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 4px;
  font-size: 0.8rem;
  transition: color 0.3s;
}
.dig-deeper-btn:hover { color: var(--accent); }
.dig-rule {
  display: block;
  width: 60px;
  height: 1px;
  background: currentColor;
  transition: width 0.4s;
}
.dig-deeper-btn:hover .dig-rule { width: 100px; }

/* ─── CHAPTER BUTTONS (shared) ───────────────────────────────── */
.chapter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
  text-decoration: none;
  color: var(--ink);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 3px;
  font-size: 0.85rem;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 4px;
  position: relative;
  transition: color 0.35s ease, gap 0.35s ease;
  width: fit-content;
}
.chapter-btn::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.4s;
}
.chapter-btn:hover::after { width: 100%; }
.chapter-btn:hover { color: var(--accent); gap: 1.2rem; }
.chapter-btn .btn-arrow {
  width: 28px; height: 28px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: background 0.35s, border-color 0.35s, color 0.35s;
}
.chapter-btn:hover .btn-arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ─── UTILITIES ──────────────────────────────────────────────── */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 4 ADDITIONS
   ═══════════════════════════════════════════════════════════════ */

/* ─── BREADCRUMBS ─────────────────────────────────────────────── */
.breadcrumb-bar {
  background: var(--paper);
  padding: 0.9rem 5vw;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 2px;
  font-size: 0.72rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.breadcrumb-bar a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb-bar a:hover { color: var(--accent); }
.breadcrumb-bar .crumb-sep {
  margin: 0 0.5rem;
  color: var(--muted-light);
}
.breadcrumb-bar .crumb-current {
  color: var(--ink);
}

/* ─── FLOATING TOC (right-side rail on wide screens) ───────── */
.toc-float {
  position: fixed;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  padding: 1.25rem 1.5rem;
  background: rgba(252, 250, 247, 0.96);
  backdrop-filter: blur(6px);
  border-left: 3px solid var(--gold);
  max-width: 240px;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 900;
  box-shadow: 0 4px 18px rgba(0,0,0,0.06);
  transition: opacity 0.4s, transform 0.4s;
}
.toc-float[aria-hidden="true"] {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(20px);
}
.toc-float .toc-label {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 4px;
  font-size: 0.65rem;
  color: var(--muted-light);
  margin-bottom: 1rem;
  display: block;
}
.toc-float ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-float li {
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.toc-float li:last-child { margin-bottom: 0; }
.toc-float a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: 'Crimson Pro', Georgia, serif;
  display: block;
  padding-left: 0.7rem;
  border-left: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s, padding-left 0.2s;
}
.toc-float a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
  padding-left: 0.9rem;
}
.toc-float a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}
@media (max-width: 1280px) {
  .toc-float { display: none; }
}

/* ─── STICKY TOC RAIL (existing settlers-landing pattern) ──── */
.toc-rail {
  position: sticky;
  top: 110px;
  padding: 1.5rem 1.8rem;
  background: var(--paper);
  border-left: 3px solid var(--gold);
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.toc-rail .toc-label {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 4px;
  font-size: 0.7rem;
  color: var(--muted-light);
  margin-bottom: 1.2rem;
  display: block;
}
.toc-rail ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-rail li {
  margin-bottom: 0.9rem;
  line-height: 1.4;
}
.toc-rail a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-family: 'Crimson Pro', Georgia, serif;
  display: block;
  padding-left: 0.8rem;
  border-left: 2px solid transparent;
  transition: border-color 0.25s, color 0.25s, padding-left 0.25s;
}
.toc-rail a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
  padding-left: 1rem;
}
.toc-rail a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}
@media (max-width: 1024px) {
  .toc-rail { display: none; }
}

/* ─── CONTRAST FIX: promote grays from #bbb/#aaa to #777/#888 in key contexts ─── */
.card-era { color: #9a8436; }  /* gold, slightly darker than var(--gold) for better contrast */

/* ─── PRINT STYLESHEET ────────────────────────────────────────── */
@media print {
  /* Remove interactive chrome */
  .site-nav,
  .site-footer,
  .breadcrumb-bar,
  .toc-rail,
  .cards-section,
  .dig-deeper-wrap,
  .reveal-trigger,
  nav,
  .page-hero-accent {
    display: none !important;
  }

  /* Reset colors for printing */
  body {
    background: #fff !important;
    color: #000 !important;
    font-family: Georgia, serif !important;
    font-size: 11pt;
    line-height: 1.5;
  }

  /* Reset reveal-on-scroll state so printed pages always show content */
  .reveal,
  .reveal.visible {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Scope headings for print */
  h1 { font-size: 24pt; margin-bottom: 0.5em; color: #000 !important; }
  h2 { font-size: 18pt; margin-top: 1.5em; margin-bottom: 0.5em; color: #000 !important; page-break-after: avoid; }
  h3 { font-size: 14pt; margin-top: 1em; margin-bottom: 0.3em; color: #000 !important; page-break-after: avoid; }
  h1 em, h2 em, h3 em { font-style: italic; color: #444 !important; font-weight: normal; }

  /* Images */
  img {
    max-width: 100% !important;
    filter: none !important;
    page-break-inside: avoid;
  }
  .section-img, .hood-img, .biohead-img, .main-frame img {
    max-height: 4in !important;
    width: auto !important;
  }

  /* Pull-quote boxes */
  .pull-quote-box, .bio-pull-quote {
    border-left: 3pt solid #000 !important;
    background: #f5f5f5 !important;
    padding: 0.5em 1em !important;
    font-size: 11pt !important;
    page-break-inside: avoid;
  }

  /* Date lists */
  .date-list li, .bio-timeline li {
    page-break-inside: avoid;
    border-bottom: 1px dotted #888 !important;
  }

  /* Links: show URLs inline after the anchor text */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }

  /* Page break hints */
  section, .epoch, .hood {
    page-break-inside: avoid;
  }

  /* Prevent orphans and widows */
  p, li {
    orphans: 3;
    widows: 3;
  }
}
