/*
 * CrossAIHub · Living Atlas · Timeline · v1.0
 * --------------------------------------------
 * Standalone stylesheet for /atlas/timeline/.
 * Palette + typography inherited from CrossAIHub House Bible.
 *
 * Peace be to this house.
 */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #FDFBF5;
  color: #2B2418;
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.atlas-timeline__skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.atlas-timeline__skip:focus {
  left: 8px;
  top: 8px;
  background: #6B1F2E;
  color: #FDFBF5;
  padding: 8px 12px;
  z-index: 100;
  font-family: 'Inter', system-ui, sans-serif;
  text-decoration: none;
  border-radius: 4px;
}

/* ─── Header ──────────────────────────────────────────────────────────────── */

.atlas-timeline__header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid #E7DFC7;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.atlas-timeline__wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #6B1F2E;
  width: fit-content;
}

.atlas-timeline__wordmark-cross {
  width: 28px;
  height: 28px;
}

.atlas-timeline__wordmark-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.atlas-timeline__wordmark-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 500;
}

.atlas-timeline__wordmark-tag {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.7rem;
  color: #3C2E1B;
  letter-spacing: 0.04em;
}

.atlas-timeline__breadcrumb {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  color: #3C2E1B;
}

.atlas-timeline__breadcrumb a {
  color: #6B1F2E;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.atlas-timeline__breadcrumb a:hover,
.atlas-timeline__breadcrumb a:focus-visible {
  border-bottom-color: #B48748;
}

/* ─── Main ────────────────────────────────────────────────────────────────── */

.atlas-timeline__main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */

.atlas-timeline__hero {
  text-align: center;
  padding: 2rem 0 3rem;
  border-bottom: 1px solid #E7DFC7;
  margin-bottom: 2rem;
}

.atlas-timeline__kicker {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #B48748;
  margin: 0 0 0.75rem;
}

.atlas-timeline__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.5rem;
  font-weight: 500;
  color: #6B1F2E;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.atlas-timeline__lede {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  font-style: italic;
  color: #3C2E1B;
  margin: 0 auto;
  max-width: 640px;
}

/* ─── Filters ─────────────────────────────────────────────────────────────── */

.atlas-timeline__filters {
  margin-bottom: 2rem;
}

.atlas-timeline__filters-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: #F6EFDC;
  border: 1px solid #E7DFC7;
  border-radius: 8px;
}

.atlas-timeline__filters-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3C2E1B;
  margin-right: 0.25rem;
}

.atlas-timeline__filter {
  padding: 0.4rem 0.85rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #6B1F2E;
  background: transparent;
  border: 1px solid #B48748;
  border-radius: 999px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.atlas-timeline__filter:hover,
.atlas-timeline__filter:focus-visible {
  background: #B48748;
  color: #FDFBF5;
}

.atlas-timeline__filter:focus-visible {
  outline: 2px solid #B48748;
  outline-offset: 2px;
}

.atlas-timeline__filter.is-active {
  background: #6B1F2E;
  border-color: #6B1F2E;
  color: #FDFBF5;
}

/* ─── Spine ───────────────────────────────────────────────────────────────── */

.atlas-timeline__spine {
  position: relative;
}

.atlas-timeline__fallback {
  padding: 1.5rem;
  background: #F6EFDC;
  border: 1px solid #E7DFC7;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.atlas-timeline__fallback-note {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  color: #3C2E1B;
  margin: 0 0 1rem;
  font-style: italic;
}

.atlas-timeline__fallback-list {
  margin: 0;
  padding-left: 1.5rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1.8;
}

.atlas-timeline__fallback-list li {
  margin-bottom: 0.5rem;
}

.atlas-timeline__fallback-list a {
  color: #6B1F2E;
  text-decoration: none;
  border-bottom: 1px solid #B48748;
}

/* ─── Era blocks ──────────────────────────────────────────────────────────── */

.atlas-timeline__eras {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.atlas-timeline__era {
  padding: 2rem 1.5rem;
  border: 1px solid #E7DFC7;
  border-radius: 12px;
  position: relative;
}

.atlas-timeline__era::before {
  content: '';
  position: absolute;
  left: 2rem;
  top: 5rem;
  bottom: 2rem;
  width: 3px;
  background: linear-gradient(180deg, #B48748 0%, #E7DFC7 100%);
  border-radius: 2px;
}

.atlas-timeline__era-header {
  margin-bottom: 1.5rem;
}

.atlas-timeline__era-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: #6B1F2E;
  margin: 0 0 0.25rem;
}

.atlas-timeline__era-range {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.85rem;
  color: #3C2E1B;
  margin: 0;
}

/* ─── Event cards on the spine ────────────────────────────────────────────── */

.atlas-timeline__events {
  list-style: none;
  margin: 0;
  padding: 0 0 0 3rem;
  position: relative;
  z-index: 1;
}

.atlas-timeline__event {
  position: relative;
  padding-bottom: 1.5rem;
}

.atlas-timeline__event::before {
  content: '';
  position: absolute;
  left: -2.15rem;
  top: 0.75rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #B48748;
  border: 3px solid #FDFBF5;
  box-shadow: 0 0 0 2px #B48748;
}

.atlas-timeline__event-card {
  padding: 1.25rem 1.5rem;
  background: #FDFBF5;
  border: 1px solid #E7DFC7;
  border-radius: 8px;
  transition: box-shadow 200ms ease;
}

.atlas-timeline__event-card:hover {
  box-shadow: 0 2px 8px rgba(43, 36, 24, 0.08);
}

.atlas-timeline__event-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: #6B1F2E;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.atlas-timeline__event-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}

.atlas-timeline__event-link:hover,
.atlas-timeline__event-link:focus-visible {
  border-bottom-color: #B48748;
}

.atlas-timeline__event-link:focus-visible {
  outline: 2px solid #B48748;
  outline-offset: 4px;
  border-radius: 2px;
}

.atlas-timeline__event-date {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.8rem;
  color: #3C2E1B;
  margin: 0 0 0.5rem;
}

.atlas-timeline__event-summary {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  color: #2B2418;
  margin: 0 0 0.75rem;
  line-height: 1.6;
}

.atlas-timeline__event-anchor {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #B48748;
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
}

.atlas-timeline__event-location {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  color: #3C2E1B;
  margin: 0;
}

.atlas-timeline__event-location a {
  color: #6B1F2E;
  text-decoration: none;
  border-bottom: 1px solid #B48748;
}

/* ─── Pathways ────────────────────────────────────────────────────────────── */

.atlas-timeline__pathways {
  margin-top: 3rem;
  padding: 2rem;
  background: #F6EFDC;
  border: 1px solid #E7DFC7;
  border-radius: 12px;
  text-align: center;
}

.atlas-timeline__pathways-kicker {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #B48748;
  margin: 0 0 0.5rem;
}

.atlas-timeline__pathways-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: #6B1F2E;
  margin: 0 0 1.5rem;
}

.atlas-timeline__pathways-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.atlas-timeline__pathway {
  padding: 0.6rem 1.25rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6B1F2E;
  background: #FDFBF5;
  border: 1px solid #6B1F2E;
  border-radius: 999px;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.atlas-timeline__pathway:hover,
.atlas-timeline__pathway:focus-visible {
  background: #6B1F2E;
  color: #FDFBF5;
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */

.atlas-timeline__footer {
  border-top: 1px solid #E7DFC7;
  padding: 2rem 1.5rem;
  text-align: center;
  background: #F6EFDC;
  margin-top: 3rem;
}

.atlas-timeline__footer-blessing {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-style: italic;
  color: #6B1F2E;
  margin: 0 0 0.5rem;
}

.atlas-timeline__footer-note {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  color: #3C2E1B;
  margin: 0 0 0.75rem;
  letter-spacing: 0.04em;
}

.atlas-timeline__footer-nav {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  margin: 0;
}

.atlas-timeline__footer-nav a {
  color: #6B1F2E;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.atlas-timeline__footer-nav a:hover,
.atlas-timeline__footer-nav a:focus-visible {
  border-bottom-color: #B48748;
}

/* ─── Reduced motion ──────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .atlas-timeline__event-card,
  .atlas-timeline__event-link,
  .atlas-timeline__filter,
  .atlas-timeline__pathway,
  .atlas-timeline__breadcrumb a,
  .atlas-timeline__footer-nav a {
    transition: none;
  }
}

/* ─── Mobile (≤ 640px) ────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .atlas-timeline__title {
    font-size: 1.75rem;
  }
  .atlas-timeline__lede {
    font-size: 1rem;
  }
  .atlas-timeline__hero {
    padding: 1rem 0 2rem;
  }
  .atlas-timeline__era {
    padding: 1.5rem 1rem;
  }
  .atlas-timeline__era::before {
    left: 1.5rem;
    top: 5rem;
  }
  .atlas-timeline__events {
    padding-left: 2rem;
  }
  .atlas-timeline__event::before {
    left: -1.65rem;
  }
  .atlas-timeline__event-card {
    padding: 1rem 1.25rem;
  }
  .atlas-timeline__event-title {
    font-size: 1.15rem;
  }
}

/* ─── Print ───────────────────────────────────────────────────────────────── */

@media print {
  .atlas-timeline__filters,
  .atlas-timeline__pathways {
    display: none;
  }
  .atlas-timeline__era-header {
    page-break-after: avoid;
  }
  .atlas-timeline__event-card {
    box-shadow: none;
  }
}
