:root {
  /* DESIGN TYPOGRAPHY TOKENS: Interface accents: **Inter** for tiny coordinates */
  --polar-ivory: #F3EFE4;
  --fjord-ink: #172321;
  --tarnished-gold: #B79A58;
  --birch-gray: #C9C2B3;
  --oxide-red: #7E3328;
  --night-pine: #263A34;
  --display: "Cormorant Garamond", Cormorant, Garamond, Georgia, serif;
  --body: "EB Garamond", Garamond, Georgia, serif;
  --interface: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--polar-ivory);
  color: var(--fjord-ink);
  font-family: var(--body);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  opacity: .18;
  background-image:
    radial-gradient(circle at 14% 26%, rgba(23,35,33,.12) 0 1px, transparent 1px),
    radial-gradient(circle at 78% 62%, rgba(183,154,88,.14) 0 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,35,33,.035), transparent 35%, rgba(126,51,40,.04));
  background-size: 7px 7px, 11px 11px, 100% 100%;
  mix-blend-mode: multiply;
}

.gold-rule {
  position: fixed;
  top: 76px;
  left: 18vw;
  width: 0;
  height: 1px;
  background: var(--tarnished-gold);
  z-index: 20;
  animation: ruleTravel 2.2s cubic-bezier(.16,1,.3,1) forwards;
}

@keyframes ruleTravel { to { width: 68vw; } }

.top-lintel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  z-index: 18;
  display: grid;
  grid-template-columns: 18vw 1fr auto;
  align-items: center;
  padding: 0 4vw 0 5vw;
  border-bottom: 1px solid rgba(201,194,179,.75);
  background: rgba(243,239,228,.82);
  backdrop-filter: blur(14px);
}

.domain-mark {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.1vw, 3.5rem);
  letter-spacing: .025em;
}

.lintel-caption,
.coordinate,
.kicker,
.accession-tag,
.plaque span,
.engine-caption,
.world-index .label {
  font-family: var(--interface);
  text-transform: uppercase;
  letter-spacing: .14em;
}

.lintel-caption {
  margin: 0;
  color: rgba(23,35,33,.7);
  font-size: .69rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coordinate { font-size: .62rem; color: var(--oxide-red); }

.world-index {
  position: fixed;
  z-index: 19;
  left: 4.7vw;
  top: 118px;
  bottom: 52px;
  width: 12vw;
  min-width: 128px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.index-rail {
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(var(--birch-gray), var(--tarnished-gold), var(--birch-gray));
}

.index-item {
  position: relative;
  display: grid;
  grid-template-columns: 16px 42px 26px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  color: rgba(23,35,33,.45);
  transition: color .45s ease, transform .45s ease;
}

.index-item.active { color: var(--fjord-ink); transform: translateX(8px); }
.index-item.active .marker { background: var(--tarnished-gold); box-shadow: 0 0 0 7px rgba(183,154,88,.16); }
.marker { width: 15px; height: 15px; border-radius: 50%; background: var(--birch-gray); border: 1px solid var(--tarnished-gold); transition: all .45s ease; }
.num { font-family: var(--display); font-size: clamp(2rem, 4vw, 4.8rem); font-weight: 300; line-height: 1; }
.symbol { color: var(--oxide-red); font-size: 1.05rem; }
.label { font-size: .57rem; line-height: 1.4; }

main { position: relative; }

.scene {
  min-height: 100vh;
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: 18vw repeat(10, 1fr) 4vw;
  gap: 2vw;
  align-items: center;
  padding: 110px 0 58px;
  background: var(--polar-ivory);
  overflow: hidden;
}

.scene:nth-child(even) { background: linear-gradient(115deg, var(--polar-ivory), #e9e2d3 58%, rgba(201,194,179,.65)); }
.scene::before {
  content: "";
  position: absolute;
  inset: 96px 4vw 42px 18vw;
  border: 1px solid rgba(201,194,179,.65);
  pointer-events: none;
}

.scene-copy { grid-column: 2 / span 4; position: relative; z-index: 3; align-self: start; margin-top: 10vh; }
.scene-copy.compact { grid-column: 2 / span 3; }
.kicker { margin: 0 0 24px; color: var(--oxide-red); font-size: .72rem; font-weight: 600; }
h1, h2 { font-family: var(--display); font-weight: 300; letter-spacing: -.035em; line-height: .9; margin: 0; }
h1 { font-size: clamp(5rem, 10vw, 13rem); max-width: 880px; }
h2 { font-size: clamp(3.6rem, 7.2vw, 9.4rem); }
.lead, .scene-copy p:not(.kicker) { font-size: clamp(1.25rem, 1.6vw, 1.75rem); line-height: 1.42; max-width: 540px; color: rgba(23,35,33,.82); }

.accession-tag {
  display: inline-grid;
  gap: 7px;
  margin-top: 30px;
  padding: 18px 24px;
  border: 1px solid var(--tarnished-gold);
  background: rgba(243,239,228,.6);
  color: var(--fjord-ink);
  font-size: .62rem;
}
.accession-tag strong { font-family: var(--display); font-size: 1.35rem; text-transform: none; letter-spacing: .04em; color: var(--oxide-red); }

.archive-photo { grid-column: 7 / span 4; margin: 0; position: relative; z-index: 2; }
.portrait-photo { height: min(72vh, 780px); border: 1px solid var(--birch-gray); padding: 18px; background: rgba(201,194,179,.42); }
.photo-face,
.plaque-image {
  height: 100%;
  filter: sepia(.58) saturate(.64) contrast(1.14);
  background-color: var(--night-pine);
  background-blend-mode: screen, multiply, normal;
  position: relative;
  overflow: hidden;
}
.photo-face::after,
.plaque-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, transparent 0 11%, rgba(23,35,33,.15) 12% 20%, transparent 21%), linear-gradient(rgba(243,239,228,.06), rgba(23,35,33,.25));
}
.face-one {
  background-image:
    radial-gradient(ellipse at 52% 24%, #F3EFE4 0 7%, #C9C2B3 8% 13%, transparent 14%),
    radial-gradient(ellipse at 50% 46%, #C9C2B3 0 18%, transparent 19%),
    linear-gradient(135deg, #263A34, #172321 48%, #B79A58 49%, #C9C2B3 52%, #172321 70%);
}
.developing { opacity: 0; transform: translateY(16px); animation: develop 2.8s .35s ease forwards; }
@keyframes develop { to { opacity: 1; transform: translateY(0); } }
figcaption { margin-top: 12px; font-size: 1.05rem; font-style: italic; color: rgba(23,35,33,.65); }

.plaque-procession { grid-column: 5 / span 7; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2vw; align-items: end; position: relative; z-index: 2; }
.plaque { min-height: 520px; border: 1px solid var(--birch-gray); background: rgba(243,239,228,.58); padding: 16px; transition: transform .35s ease; }
.plaque.tall { min-height: 650px; }
.plaque-image { height: 380px; margin-bottom: 18px; }
.tall .plaque-image { height: 510px; }
.hall-image { background-image: repeating-linear-gradient(90deg, rgba(243,239,228,.18) 0 10px, transparent 11px 52px), linear-gradient(150deg, #172321, #263A34 62%, #B79A58); }
.textile-image { background-image: repeating-linear-gradient(45deg, #7E3328 0 8px, #C9C2B3 9px 17px, #263A34 18px 28px), linear-gradient(#172321, #B79A58); }
.machine-image { background-image: radial-gradient(circle at 50% 38%, transparent 0 20%, #C9C2B3 21% 22%, transparent 23%), radial-gradient(circle at 50% 38%, #B79A58 0 4%, transparent 5%), linear-gradient(135deg, #263A34, #172321); }
.plaque span { font-size: .62rem; color: var(--oxide-red); }
.plaque p { font-size: 1.15rem; line-height: 1.25; margin: 12px 0 0; }

.engine-board { grid-column: 7 / span 4; height: min(70vh, 700px); border: 1px solid var(--tarnished-gold); border-radius: 50% 50% 46% 46%; position: relative; background: radial-gradient(circle, rgba(183,154,88,.18), transparent 38%), rgba(201,194,179,.3); z-index: 2; }
.compass-rosette { position: absolute; inset: 17%; border: 1px solid var(--birch-gray); border-radius: 50%; background: conic-gradient(from 20deg, transparent, rgba(183,154,88,.28), transparent, rgba(126,51,40,.18), transparent); }
.compass-rosette::before { content: ""; position: absolute; inset: 28%; border-radius: 50%; border: 1px solid var(--tarnished-gold); background: rgba(243,239,228,.54); }
.vellum-note { position: absolute; padding: 14px 18px; background: rgba(243,239,228,.72); border: 1px solid rgba(201,194,179,.9); font-size: 1.05rem; font-style: italic; box-shadow: 0 20px 50px rgba(23,35,33,.08); }
.note-a { top: 17%; left: -4%; }
.note-b { right: -7%; top: 42%; }
.note-c { bottom: 18%; left: 12%; }
.orbit-dot { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: var(--tarnished-gold); box-shadow: 0 0 0 10px rgba(183,154,88,.12); }
.d1 { top: 13%; left: 49%; animation: drift 7s infinite alternate ease-in-out; }
.d2 { top: 48%; right: 12%; animation: drift 8s .6s infinite alternate ease-in-out; }
.d3 { bottom: 16%; left: 28%; animation: drift 6.5s .2s infinite alternate ease-in-out; }
.d4 { top: 36%; left: 14%; animation: drift 9s .4s infinite alternate ease-in-out; }
@keyframes drift { to { transform: translate(22px, -14px); } }
.engine-caption { position: absolute; left: 26%; bottom: 9%; right: 18%; font-size: .66rem; color: var(--night-pine); }

.table-diagram { grid-column: 6 / span 5; display: grid; grid-template-columns: 1fr; justify-items: center; gap: 42px; position: relative; z-index: 2; }
.oval-table { width: min(52vw, 720px); aspect-ratio: 1.75; border: 1px solid var(--tarnished-gold); border-radius: 50%; background: radial-gradient(ellipse, rgba(243,239,228,.86), rgba(201,194,179,.45)); position: relative; display: grid; place-items: center; }
.oval-table strong { font-family: var(--display); font-size: clamp(2.5rem, 5vw, 6rem); font-weight: 300; letter-spacing: .02em; }
.oval-table span { position: absolute; font-family: var(--interface); text-transform: uppercase; font-size: .62rem; letter-spacing: .18em; color: var(--oxide-red); }
.oval-table span:nth-child(1) { top: 9%; left: 20%; }
.oval-table span:nth-child(2) { top: 20%; right: 12%; }
.oval-table span:nth-child(3) { bottom: 13%; right: 24%; }
.oval-table span:nth-child(4) { bottom: 20%; left: 13%; }
blockquote { margin: 0; max-width: 700px; font-family: var(--display); font-size: clamp(2.2rem, 4vw, 5rem); line-height: .98; text-align: center; color: var(--night-pine); }

.magnetic { will-change: transform; transition: transform .28s cubic-bezier(.2,.8,.2,1); }

@media (max-width: 900px) {
  .top-lintel { grid-template-columns: 1fr; height: auto; gap: 6px; padding: 14px 22px; }
  .gold-rule { top: 90px; left: 22px; }
  .coordinate { display: none; }
  .world-index { left: 16px; top: 150px; min-width: 88px; width: 88px; }
  .label { display: none; }
  .index-item { grid-template-columns: 16px 34px 20px; }
  .scene { grid-template-columns: 96px 1fr 18px; padding-top: 150px; position: relative; }
  .scene::before { inset: 132px 18px 28px 96px; }
  .scene-copy, .scene-copy.compact, .archive-photo, .plaque-procession, .engine-board, .table-diagram { grid-column: 2; }
  .scene-copy { margin-top: 0; }
  h1 { font-size: clamp(4rem, 16vw, 8rem); }
  .portrait-photo { height: 58vh; }
  .plaque-procession { grid-template-columns: 1fr; }
  .plaque, .plaque.tall { min-height: auto; }
  .plaque-image, .tall .plaque-image { height: 300px; }
  .engine-board { width: 100%; height: 520px; }
  .oval-table { width: 100%; }
}
