/* Layout and page shell (UI/UX lane). Mobile first. */
html { scroll-behavior: smooth; scroll-padding-top: 4rem; }

/* Header and era navigator */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--rule); }
.site-header nav { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.site-header nav::-webkit-scrollbar { display: none; }
.site-header nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0 .5rem; width: max-content; min-width: 100%; }
.site-header nav a {
  display: block; padding: .8rem .75rem; min-height: 44px;
  font-size: var(--text-sm); letter-spacing: .06em; white-space: nowrap;
  color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.site-header nav a:hover { color: var(--fg); }
.site-header nav a[aria-current="location"] { color: var(--accent); border-bottom-color: var(--accent); }
.site-header nav a:focus-visible { outline-offset: -3px; }

/* Story sections: each fills the screen, text sits in a readable column */
main { display: block; }
.hero, .era {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  width: 100%; max-width: calc(var(--measure) + 2rem); margin: 0 auto;
  padding: var(--space-5) var(--space);
}
.era { border-top: 1px solid var(--rule); scroll-margin-top: 4.5rem; } /* clears the one-row sticky header */
.era > * { max-width: var(--measure); }
.era h2 { font-size: var(--text-2xl); letter-spacing: var(--tracking-display); line-height: var(--leading-tight); margin: 0 0 var(--space-3); }
.era-years { font-family: var(--font-display); font-size: var(--text-xl); margin: 0 0 var(--space-2); }
.era p { font-size: var(--text-base); }
.hero h1 { overflow-wrap: anywhere; }

.site-footer { padding: var(--space-4) var(--space); text-align: center; color: var(--muted); border-top: 1px solid var(--rule); font-size: var(--text-sm); }
.site-footer p { margin: 0; }

@media (min-width: 48em) {
  .site-header nav ul { justify-content: center; }
  .hero, .era { padding-left: var(--space-4); padding-right: var(--space-4); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
