:root {
  --bg-canvas: #fbf1f0;
  --bg-surface: #fffaf8;
  --bg-surface-hover: #f5e6e4;
  --text-primary: #1c1917;
  --text-muted: #57504d;
  --accent-primary: #6b2155;
  --accent-secondary: #8c3472;
  --border-subtle: rgba(107, 33, 85, 0.25);
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --font-main: 'Trebuchet MS', 'Segoe UI', sans-serif;
}

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

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.75;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
  hyphens: auto;
}

h1, h2, h3, h4 {
  color: var(--text-primary);
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin-bottom: 1.25rem; }

a {
  color: var(--accent-primary);
  text-decoration: none;
  position: relative;
  display: inline-block;
  font-weight: 600;
}

a:not(.btn-solid):not(.brand)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background-color: currentColor;
  transition: width 0.3s var(--ease-kinetic);
}

a:not(.btn-solid):not(.brand):hover::after {
  width: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.reading-width {
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
}

/* Header */
.site-header-wrapper {
  padding: 1.5rem 1.5rem 0.5rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.site-header {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.75rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: auto;
}

.brand-mark {
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: var(--accent-primary);
  border-radius: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-primary);
  font-size: 0.95rem;
}

.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--accent-primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--accent-primary);
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    flex-direction: column;
    padding: 1.25rem;
    gap: 1rem;
    z-index: 50;
  }
  .nav-links.active { display: flex; }
}

/* Buttons */
.btn-solid {
  background-color: var(--accent-primary);
  color: #fffaf8;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  border: 1px solid var(--accent-primary);
  font-weight: 700;
  cursor: pointer;
  display: inline-block;
  transition: background-color 0.25s var(--ease-kinetic), transform 0.2s var(--ease-kinetic);
}

.btn-solid:hover {
  background-color: var(--accent-secondary);
  transform: translateY(-2px);
}

.btn-text {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0;
  position: relative;
}

.btn-text::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-primary);
  transition: width 0.3s var(--ease-kinetic);
}

.btn-text:hover::after { width: 100%; }

/* Hero */
.hero {
  padding: 3.5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: var(--accent-primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: block;
}

.hero-collage {
  position: relative;
  height: 400px;
  width: 100%;
}

.collage-img {
  position: absolute;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  object-fit: cover;
  background-color: var(--bg-surface);
  padding: 4px;
}

.collage-1 {
  width: 65%;
  height: 240px;
  top: 0;
  left: 0;
  z-index: 1;
}

.collage-2 {
  width: 60%;
  height: 220px;
  top: 85px;
  right: 0;
  z-index: 2;
}

.collage-3 {
  width: 55%;
  height: 190px;
  bottom: 0;
  left: 12%;
  z-index: 3;
}

@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-collage { height: 320px; margin-top: 1rem; }
}

/* Timeline Pathway & Sections */
.pathway-wrapper {
  position: relative;
  padding-left: 2.5rem;
  margin: 2rem 0;
}

.pathway-wrapper::before {
  content: '';
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 0.65rem;
  width: 1px;
  background-color: var(--accent-primary);
}

.discovery-stop {
  position: relative;
  margin-bottom: 4rem;
}

.discovery-stop:last-child {
  margin-bottom: 1rem;
}

.stop-marker {
  position: absolute;
  left: -2.5rem;
  top: 0.25rem;
  width: 1.4rem;
  height: 1.4rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--accent-primary);
  border-radius: 4px;
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stop-header {
  margin-bottom: 1.5rem;
}

.stop-number-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-primary);
  display: block;
  margin-bottom: 0.25rem;
}

/* Full-width Plum Interruption Blocks */
.plum-block {
  background-color: var(--accent-primary);
  color: #fffaf8;
  padding: 4rem 0;
  margin: 3rem 0;
}

.plum-block h2, .plum-block h3, .plum-block p {
  color: #fffaf8;
}

.plum-block a:not(.btn-solid) {
  color: #fbf1f0;
}

.plum-block .fact-card {
  background-color: #541742;
  border-color: rgba(255, 250, 248, 0.3);
  color: #fffaf8;
}

.plum-block .source-slip {
  background-color: rgba(255, 250, 248, 0.1);
  border-color: rgba(255, 250, 248, 0.25);
  color: #fbf1f0;
}

/* Flat Fact Panels & Grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.fact-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background-color 0.25s var(--ease-kinetic);
}

.fact-card:hover {
  background-color: var(--bg-surface-hover);
}

.plum-block .fact-card:hover {
  background-color: #461237;
}

.card-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-bottom: 1.25rem;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.card-img-wrap.wide {
  aspect-ratio: 16 / 9;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fact-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.75rem;
  background-color: var(--bg-canvas);
}

/* Source Slips & Expandable Explanations */
.source-slip {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.source-slip strong {
  color: var(--text-primary);
}

.plum-block .source-slip strong {
  color: #fffaf8;
}

.expand-box {
  margin-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.expand-content {
  display: none;
  margin-top: 0.75rem;
  padding: 1rem;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-size: 0.95rem;
}

.plum-block .expand-content {
  background-color: #3f1031;
  color: #fffaf8;
}

.expand-content.open {
  display: block;
}

/* Quiz Panel */
.quiz-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 2rem;
}

.quiz-options {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.quiz-opt-btn {
  text-align: left;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.85rem 1.25rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.2s;
}

.quiz-opt-btn:hover {
  background-color: var(--bg-surface-hover);
}

.quiz-opt-btn.selected {
  border-color: var(--accent-primary);
  background-color: #f3dce9;
  font-weight: 700;
}

.quiz-feedback {
  display: none;
  margin-top: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--accent-primary);
  border-radius: 4px;
  background-color: var(--bg-canvas);
}

/* Postcard Contact Form */
.postcard {
  background-color: var(--bg-surface);
  border: 1px solid var(--accent-primary);
  border-radius: 4px;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
}

.postcard-left {
  border-right: 1px solid var(--border-subtle);
  padding-right: 2rem;
}

.stamp-box {
  width: 70px;
  height: 85px;
  border: 1px dashed var(--accent-primary);
  border-radius: 4px;
  margin-left: auto;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  text-align: center;
  color: var(--accent-primary);
  padding: 0.25rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background-color: var(--bg-canvas);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
}

.form-control:focus {
  outline: 2px solid var(--accent-primary);
}

@media (max-width: 768px) {
  .postcard { grid-template-columns: 1fr; }
  .postcard-left { border-right: none; border-bottom: 1px solid var(--border-subtle); padding-right: 0; padding-bottom: 1.5rem; }
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-surface);
  text-align: left;
  font-size: 0.95rem;
}

th, td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background-color: #f5e6e4;
  color: var(--accent-primary);
  font-weight: 700;
}

/* Footer */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 0 2.5rem;
  margin-top: 4rem;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-kinetic), transform 0.6s var(--ease-kinetic);
}

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

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
