:root {
  --bg: #f6ecda;
  --bg-soft: #fff9ef;
  --ink: #1f1d1b;
  --muted: #645d57;
  --line: rgba(45, 33, 22, 0.12);
  --card: rgba(255, 251, 243, 0.74);
  --accent: #b74f2d;
  --accent-strong: #7d2b18;
  --teal: #256e6a;
  --gold: #d5a445;
  --shadow: 0 20px 60px rgba(75, 42, 17, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Baskerville, "Palatino Linotype", "Noto Serif SC", serif;
  background:
    radial-gradient(circle at top left, rgba(183, 79, 45, 0.18), transparent 26%),
    radial-gradient(circle at 85% 18%, rgba(37, 110, 106, 0.16), transparent 22%),
    linear-gradient(180deg, #f9f2e5 0%, #f5ead5 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(122, 91, 55, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 91, 55, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 56px;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 18px 0 22px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  background: rgba(255, 249, 238, 0.72);
  box-shadow: var(--shadow);
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.2rem;
  letter-spacing: 0.18em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.96rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.95fr);
  gap: 24px;
  align-items: stretch;
  min-height: 72vh;
  padding: 32px 0 20px;
}

.hero-copy,
.hero-panel,
.card,
.gallery-card,
.timeline {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 42px;
}

.eyebrow,
.section-kicker,
.meta,
.timeline-date,
.panel-badge {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.8rem, 5vw, 5.6rem);
  line-height: 0.94;
  max-width: 10ch;
}

.lead,
.section-heading p,
.card p,
.gallery-copy p,
.timeline-item p,
.footer p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.source-links a,
.card a,
.footer a {
  color: var(--accent-strong);
  text-underline-offset: 3px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 138px;
  padding: 13px 20px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #fff8f1;
  background: linear-gradient(135deg, var(--accent), #da7f53);
}

.button.secondary {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.95);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 248, 239, 0.96), rgba(245, 231, 204, 0.92)),
    linear-gradient(140deg, rgba(37, 110, 106, 0.12), transparent 46%);
}

.hero-panel::after {
  position: absolute;
  right: -24px;
  bottom: -12px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 110, 106, 0.24), transparent 66%);
  content: "";
}

.stat-list {
  display: grid;
  gap: 16px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.stat-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 252, 246, 0.76);
}

.stat-number {
  color: var(--teal);
  font-size: 1.6rem;
}

.stat-copy {
  align-self: center;
  font-size: 1rem;
  line-height: 1.6;
}

.section {
  padding: 30px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 22px;
}

.section h2 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 3.2vw, 3.4rem);
  line-height: 1.05;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  padding: 24px;
}

.card h3,
.gallery-copy h3,
.timeline-item h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 16px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gallery-card {
  overflow: hidden;
}

.thumb {
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid var(--line);
}

.thumb-link {
  display: block;
  background: rgba(255, 251, 243, 0.82);
}

.thumb-image {
  display: block;
  width: 100%;
  height: 100%;
  padding: 22px;
  object-fit: contain;
  object-position: center;
}

.gallery-copy {
  padding: 20px;
}

.timeline {
  padding: 26px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 18px;
  padding: 14px 0;
}

.timeline-item + .timeline-item {
  border-top: 1px solid var(--line);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
  padding: 20px 4px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero,
  .split,
  .card-grid,
  .gallery {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
  }

  .topbar {
    position: static;
    padding: 14px 16px;
  }

  .hero-copy,
  .hero-panel,
  .card,
  .gallery-copy,
  .timeline {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2.4rem, 11vw, 3.8rem);
  }

  .timeline-item,
  .stat-list li {
    grid-template-columns: 1fr;
  }
}
