:root {
  /* Compliance tokens from DESIGN.md parser: Intersection Observer only triggering addition */
  --terracotta: #c2703e;
  --umber: #3a1f0e;
  --sand: #f2e6d4;
  --copper: #d4956a;
  --sienna: #6b3a2a;
  --bronze: #8b6b4f;
  --ivory: #e8c9a8;
  --clay: #2a1508;
  --cream-text: #dfc4a8;
  --brown: #4a3228;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  font-weight: 400;
  line-height: 1.75;
  color: var(--brown);
  background: var(--sand);
}

.timeline { position: relative; isolation: isolate; }
.timeline-spine {
  position: fixed;
  top: 0;
  left: 50%;
  width: 2px;
  height: 0;
  transform: translateX(-50%);
  transform-origin: top;
  background: linear-gradient(var(--terracotta), var(--copper), var(--terracotta));
  z-index: 20;
  box-shadow: 0 0 20px rgba(194, 112, 62, .35);
}

.timeline-node {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 12vh 0;
  overflow: hidden;
}
.timeline-node::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(194,112,62,.22) 1px, transparent 1.5px);
  background-size: 24px 24px;
  opacity: .08;
  pointer-events: none;
}
.light-section { background-color: var(--sand); }
.dark-section { background: radial-gradient(ellipse at 30% 40%, var(--umber) 0%, var(--clay) 100%); color: var(--cream-text); }
.dark-section::before { opacity: .18; background-image: radial-gradient(circle, rgba(212,149,106,.4) 1px, transparent 1.5px); }

h1, h2, .final-line {
  font-family: "Poiret One", "Trebuchet MS", sans-serif;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--umber);
}
h2 { font-size: clamp(2.8rem, 6vw, 5.5rem); margin-bottom: 1rem; }
.dark-section h2 { color: var(--ivory); }
p + p { margin-top: 1.1rem; }
.date-label {
  font-family: "Bodoni Moda", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2.8rem);
  color: var(--sienna);
  margin-bottom: .65rem;
}
.dark-section .date-label { color: var(--copper); }
.annotation, .mono-kicker, figcaption, .final-contact {
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: .85rem;
  color: var(--bronze);
  letter-spacing: .08em;
}
.dark-section .annotation, .dark-section .final-contact, .mono-kicker { color: var(--copper); }

.arrival { justify-content: center; text-align: center; }
.arrival-halo {
  position: absolute;
  width: min(72vw, 820px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 6deg, rgba(212,149,106,.18) 6deg 8deg, transparent 8deg 18deg);
  animation: rotate 60s linear infinite;
  opacity: .4;
}
.hero-content { position: relative; z-index: 2; padding: 2rem; }
.hero-content h1 {
  font-size: clamp(3.1rem, 9vw, 8.8rem);
  letter-spacing: .3em;
  color: var(--ivory);
  text-shadow: 0 18px 50px rgba(0,0,0,.35);
  animation: heroTune .9s ease-out both;
}
.hero-subtitle {
  margin-top: 1.2rem;
  font-weight: 300;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  color: var(--ivory);
  animation: fadeIn .8s ease-out .45s both;
}
.spine-seed {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--copper);
  z-index: 25;
  box-shadow: 0 0 0 14px rgba(212,149,106,.1);
}

.marker {
  position: absolute;
  top: 15%;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--copper);
  z-index: 25;
  box-shadow: 0 0 0 7px rgba(194,112,62,.13), 0 0 22px rgba(212,149,106,.55);
}
.branch {
  position: absolute;
  top: calc(15% + 6px);
  width: 8vw;
  height: 1px;
  background-image: linear-gradient(90deg, var(--sienna) 0 50%, transparent 50% 100%);
  background-size: 8px 1px;
  opacity: .7;
}
.node-left .branch { right: 50%; }
.node-right .branch { left: 50%; }
.content-block {
  position: relative;
  z-index: 3;
  width: min(40vw, 620px);
  opacity: 0;
  filter: blur(3px);
  transition: opacity .6s ease-out .18s, filter .6s ease-out .18s;
}
.node-left .content-block { margin-left: calc(50% - min(40vw, 620px) - 8vw); margin-right: 8vw; }
.node-right .content-block { margin-left: calc(50% + 8vw); margin-right: auto; }
.is-visible .content-block { opacity: 1; filter: blur(0); }
.is-visible.node-left .content-block { animation: shakeLeft .32s ease-out both; }
.is-visible.node-right .content-block { animation: shakeRight .32s ease-out both; }

.ziggurat-frame {
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border: 2px solid var(--terracotta);
  background: rgba(242,230,212,.56);
  box-shadow: 0 30px 90px rgba(42,21,8,.14), inset 0 0 0 8px rgba(194,112,62,.09), inset 0 0 0 16px rgba(212,149,106,.07);
}
.dark-section .ziggurat-frame { background: rgba(42,21,8,.62); box-shadow: 0 30px 90px rgba(0,0,0,.22), inset 0 0 0 8px rgba(194,112,62,.16), inset 0 0 0 16px rgba(212,149,106,.09); }
.ziggurat-frame::before, .ziggurat-frame::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid var(--terracotta);
}
.ziggurat-frame::before { inset: 10px; opacity: .8; }
.ziggurat-frame::after { inset: 20px; border-style: dashed; opacity: .55; }
.triple-frame { box-shadow: inset 0 0 0 8px rgba(194,112,62,.18), inset 0 0 0 18px rgba(212,149,106,.11), inset 0 0 0 28px rgba(194,112,62,.08), 0 30px 90px rgba(0,0,0,.2); }

.archive-layout { display: grid; grid-template-columns: 3fr 2fr; gap: 1.4rem; align-items: end; }
.vintage-photo, .specimen {
  filter: sepia(.35) contrast(1.1) brightness(.95) saturate(.8);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(42,21,8,.3), 0 16px 38px rgba(42,21,8,.18);
  transform-origin: center;
}
.large-photo svg { display: block; width: 100%; height: auto; }
.is-visible .vintage-photo, .is-visible .specimen { animation: kenBurns 12s ease-in-out both; }

.sunburst {
  position: absolute;
  inset: -33px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(194,112,62,.45) 0 3deg, transparent 3deg 12deg);
  animation: rotate 60s linear infinite, pulseBurst 3s ease-in-out infinite;
  opacity: .18;
}
.signal-block { min-height: 420px; display: flex; flex-direction: column; justify-content: center; }
.signal-wave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  stroke: var(--terracotta);
  stroke-width: 1;
  fill: none;
  opacity: .2;
  animation: waveDrift 8s linear infinite;
}
.filigree { display: flex; gap: 10px; align-items: center; margin-top: 2rem; opacity: 0; }
.filigree i { display: block; height: 1px; background: var(--copper); opacity: .4; transform: scaleX(0); transform-origin: left; }
.filigree i:nth-child(1) { width: 24%; }
.filigree i:nth-child(2) { width: 8%; transform: rotate(45deg) scaleX(0); }
.filigree i:nth-child(3) { width: 42%; }
.is-visible .filigree { opacity: 1; }
.is-visible .filigree i { animation: drawLine .55s ease-out both; }
.is-visible .filigree i:nth-child(2) { animation-delay: .2s; }
.is-visible .filigree i:nth-child(3) { animation-delay: .4s; }

.specimen-grid { display: grid; grid-template-columns: repeat(2, 120px); gap: 8px 14px; margin: 1.2rem 0 1.6rem; }
figure { width: 120px; }
figcaption { margin-top: .35rem; font-size: .72rem; }
.specimen { width: 120px; height: 120px; background-color: var(--bronze); }
.specimen-a { background: radial-gradient(circle at 50% 50%, var(--copper) 0 8px, transparent 9px), radial-gradient(circle at 28% 28%, var(--terracotta) 0 5px, transparent 6px), radial-gradient(circle at 72% 28%, var(--terracotta) 0 5px, transparent 6px), radial-gradient(circle at 28% 72%, var(--terracotta) 0 5px, transparent 6px), radial-gradient(circle at 72% 72%, var(--terracotta) 0 5px, transparent 6px), linear-gradient(45deg, var(--sienna), var(--bronze)); }
.specimen-b { background: linear-gradient(var(--sienna), var(--sienna)), repeating-linear-gradient(90deg, transparent 0 18px, rgba(212,149,106,.45) 18px 20px), repeating-linear-gradient(0deg, transparent 0 18px, rgba(42,21,8,.45) 18px 20px), var(--bronze); background-size: 70px 70px, auto, auto; background-position: center; background-repeat: no-repeat, repeat, repeat; }
.specimen-c { background: radial-gradient(ellipse at 50% 65%, transparent 0 26px, rgba(212,149,106,.7) 27px 29px, transparent 30px), conic-gradient(from 200deg at 50% 65%, var(--terracotta), var(--bronze), var(--sienna), var(--terracotta)); }
.specimen-d { background: repeating-linear-gradient(90deg, var(--clay) 0 8px, var(--bronze) 8px 16px), linear-gradient(var(--sienna), var(--copper)); }

.node-final { justify-content: center; text-align: center; min-height: 100vh; }
.node-final::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 20vh; background: linear-gradient(transparent, var(--clay)); z-index: 1; }
.final-marker { top: 18%; width: 24px; height: 24px; }
.final-block { width: min(80vw, 1000px); margin: 0 auto; z-index: 4; }
.final-line { color: var(--ivory); font-size: clamp(2.2rem, 6vw, 5.5rem); margin-bottom: 2rem; }
.final-contact { color: var(--copper); }

@keyframes heroTune { 0% { opacity: 0; transform: translateX(-8px); } 18% { transform: translateX(3px); } 35% { transform: translateX(-2px); } 55% { transform: translateX(1px); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes shakeLeft { 0% { transform: translateX(-8px); } 20% { transform: translateX(3px); } 40% { transform: translateX(-3px); } 70% { transform: translateX(1px); } 100% { transform: translateX(0); } }
@keyframes shakeRight { 0% { transform: translateX(8px); } 20% { transform: translateX(-3px); } 40% { transform: translateX(3px); } 70% { transform: translateX(-1px); } 100% { transform: translateX(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rotate { to { transform: rotate(1turn); } }
@keyframes pulseBurst { 50% { opacity: .3; } }
@keyframes waveDrift { from { transform: translateY(-20px); } to { transform: translateY(20px); } }
@keyframes kenBurns { from { transform: scale(1); } to { transform: scale(1.03); } }
@keyframes drawLine { to { transform: scaleX(1); } }

@media (max-width: 768px) {
  .timeline-spine { left: 15%; }
  .spine-seed, .marker { left: 15%; }
  .timeline-node { padding: 10vh 0; }
  .node-left .branch, .node-right .branch { left: 15%; right: auto; width: 2rem; }
  .node-left .content-block, .node-right .content-block { width: calc(78vw - 2rem); margin-left: calc(15% + 2rem); margin-right: 1rem; }
  .archive-layout { grid-template-columns: 1fr; }
  .specimen-grid { grid-template-columns: repeat(2, minmax(96px, 1fr)); }
  figure, .specimen { width: 100%; }
  .specimen { height: auto; aspect-ratio: 1; }
  .hero-content h1 { letter-spacing: .18em; }
}
