:root {
  /* Compliance typography tokens: Inter** from Google Fonts */
  --obsidian-ledger: #17130F;
  --terracotta-mars: #B65332;
  --champagne-parchment: #F2D7A1;
  --olive-orbit: #6F7042;
  --copper-shadow: #C47A3A;
  --dusty-rose: #D99A82;
  --cream-highlight: #FFF1D0;
  --ink: #17130F;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--obsidian-ledger);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--obsidian-ledger);
  font-family: "Nunito Sans", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 18%, rgba(217, 154, 130, .38), transparent 24rem),
    radial-gradient(circle at 82% 34%, rgba(242, 215, 161, .22), transparent 21rem),
    linear-gradient(145deg, #17130F 0%, #2a1811 48%, #17130F 100%);
}

.atmosphere {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.bokeh {
  position: absolute;
  border-radius: 999px;
  filter: blur(22px);
  opacity: .62;
  transform: translate3d(calc(var(--mx, 0px) * .018), calc(var(--my, 0px) * .018), 0) scale(var(--focus-scale, 1));
  transition: transform 900ms cubic-bezier(.18, .86, .21, 1), filter 900ms ease, opacity 900ms ease;
}

body.scene-focused .bokeh { filter: blur(34px); opacity: .78; }

.bokeh-one { width: 36rem; height: 36rem; left: -9rem; top: 3rem; background: #D99A82; }
.bokeh-two { width: 23rem; height: 23rem; right: 7vw; top: 10vh; background: #F2D7A1; opacity: .32; }
.bokeh-three { width: 28rem; height: 28rem; left: 49vw; top: 58vh; background: #B65332; opacity: .36; }
.bokeh-four { width: 15rem; height: 15rem; left: 11vw; bottom: 7vh; background: #FFF1D0; opacity: .24; }
.bokeh-five { width: 42rem; height: 42rem; right: -15rem; bottom: -12rem; background: #C47A3A; opacity: .32; }

.route-ribbon {
  position: fixed;
  inset: 0 auto 0 7.4rem;
  width: 16vw;
  height: 100vh;
  opacity: .72;
}

.route-ribbon path {
  fill: none;
  stroke: #C47A3A;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-dasharray: 11 10;
  filter: drop-shadow(5px 5px 0 #17130F);
  transition: stroke-width 320ms ease;
}

body.route-thick .route-ribbon path { stroke-width: 7; }

.route-ledger {
  position: fixed;
  z-index: 8;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.route-mark {
  width: 3.35rem;
  min-height: 3.35rem;
  display: grid;
  grid-template-columns: 2.9rem 0fr;
  align-items: center;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  background: var(--champagne-parchment);
  border: 4px solid var(--ink);
  border-radius: 999px 1.4rem 1.4rem 999px;
  box-shadow: 6px 6px 0 var(--copper-shadow);
  transition: width 280ms ease, grid-template-columns 280ms ease, transform 280ms ease, background 280ms ease;
}

.route-mark span {
  width: 2.9rem;
  text-align: center;
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: .88rem;
}

.route-mark b {
  white-space: nowrap;
  padding-right: 1rem;
  font-size: .82rem;
  font-weight: 800;
  opacity: 0;
  transition: opacity 220ms ease;
}

.route-mark:hover,
.route-mark.is-active {
  width: 14.7rem;
  grid-template-columns: 2.9rem 1fr;
  transform: translateX(.25rem) rotate(-1deg);
  background: var(--cream-highlight);
}

.route-mark:hover b,
.route-mark.is-active b { opacity: 1; }

.promenade {
  position: relative;
  z-index: 2;
}

.scene {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  padding: 7vh 6vw 7vh 18vw;
  perspective: 1200px;
}

.scene:nth-child(even) { justify-content: flex-end; padding-left: 12vw; padding-right: 10vw; }
.scene:nth-child(3) { justify-content: center; }

.chamber {
  position: relative;
  width: min(78vw, 980px);
  min-height: 68vh;
  padding: clamp(1.4rem, 4vw, 4.2rem);
  background: var(--champagne-parchment);
  border: 7px solid var(--ink);
  box-shadow: 18px 20px 0 var(--copper-shadow), 29px 31px 0 rgba(23, 19, 15, .72);
  border-radius: 3.2rem 1rem 4.8rem 1.6rem;
  transform: rotate(-1.2deg) translateY(2rem) scale(.94);
  opacity: .76;
  transition: transform 700ms cubic-bezier(.18, .86, .21, 1), opacity 700ms ease, box-shadow 700ms ease;
}

.scene.is-active .chamber {
  transform: rotate(-.4deg) translateY(0) scale(1);
  opacity: 1;
  box-shadow: 24px 25px 0 var(--copper-shadow), 38px 40px 0 rgba(23, 19, 15, .78);
}

.chamber-dome { background: #D99A82; border-radius: 1.2rem 4.5rem 1.7rem 3.8rem; transform: rotate(1.5deg) translateY(2rem) scale(.94); }
.chamber-treaty { background: #FFF1D0; border-radius: 5rem 1.1rem 2rem 4rem; }
.chamber-freight { background: #6F7042; color: #FFF1D0; border-radius: 1.5rem 5rem 4rem 1.1rem; box-shadow: 18px 20px 0 #B65332, 29px 31px 0 rgba(23, 19, 15, .72); }
.scene.is-active .chamber-freight { box-shadow: 24px 25px 0 #B65332, 38px 40px 0 rgba(23, 19, 15, .78); }
.chamber-stamp { background: #B65332; color: #FFF1D0; border-radius: 4.6rem 1.4rem 4rem 1.1rem; }

.eyebrow {
  display: inline-block;
  margin: 0 0 1.15rem;
  padding: .52rem .8rem;
  background: var(--olive-orbit);
  color: var(--cream-highlight);
  border: 4px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .03em;
  box-shadow: 6px 7px 0 var(--ink);
}

h1, h2 {
  margin: 0;
  max-width: 820px;
  font-family: Inter, "Arial Black", sans-serif;
  font-weight: 900;
  letter-spacing: -.075em;
  line-height: .82;
}

h1 { font-size: clamp(4.2rem, 13vw, 11.5rem); }
h2 { font-size: clamp(3rem, 8vw, 7.4rem); }

.document-row {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) 19rem;
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
  margin-top: 2rem;
}

.narrative {
  margin: 1.6rem 0 0;
  max-width: 42rem;
  font-size: clamp(1.15rem, 2.1vw, 1.75rem);
  line-height: 1.25;
  font-weight: 600;
}

.narrative.narrow { max-width: 34rem; }

.bubble-viewport {
  position: relative;
  width: clamp(12rem, 24vw, 21rem);
  height: clamp(12rem, 24vw, 21rem);
  margin: 1.2rem;
  display: grid;
  place-items: center;
  border: 6px solid var(--ink);
  border-radius: 50%;
  background:
    radial-gradient(circle at 31% 22%, #FFF1D0 0 10%, transparent 11%),
    radial-gradient(circle at 65% 72%, rgba(255,241,208,.65) 0 8%, transparent 9%),
    linear-gradient(135deg, rgba(255,241,208,.62), rgba(217,154,130,.32));
  box-shadow: 13px 14px 0 var(--copper-shadow), inset -18px -20px 0 rgba(23, 19, 15, .12);
  transform: scale(.92) rotate(5deg);
  transition: transform 680ms cubic-bezier(.18, .86, .21, 1), box-shadow 680ms ease, filter 680ms ease;
}

.scene.is-active .bubble-viewport {
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 20px 21px 0 var(--copper-shadow), inset -12px -16px 0 rgba(23, 19, 15, .08);
  filter: saturate(1.18);
}

.bubble-viewport:hover { animation: wobble 760ms ease; }

.bubble-core {
  font-family: "Archivo Black", Impact, sans-serif;
  text-align: center;
  font-size: clamp(1.5rem, 3.1vw, 3.2rem);
  line-height: .9;
  color: var(--ink);
}

.customs-tag,
.memo-strip,
.treaty-capsules span,
.final-ledger {
  border: 5px solid var(--ink);
  box-shadow: 8px 9px 0 var(--copper-shadow);
  font-weight: 800;
}

.customs-tag {
  position: absolute;
  background: var(--olive-orbit);
  color: var(--cream-highlight);
  padding: .75rem 1rem;
  border-radius: .7rem;
}

.customs-tag.vertical {
  right: -2.2rem;
  top: 20%;
  writing-mode: vertical-rl;
  transform: rotate(3deg);
}

.customs-tag.diagonal {
  right: 8%;
  bottom: 9%;
  transform: rotate(-8deg);
  max-width: 18rem;
}

.stamp-seal {
  position: absolute;
  right: 8%;
  bottom: 8%;
  width: 9.7rem;
  height: 9.7rem;
  display: grid;
  place-items: center;
  text-align: center;
  border: 6px solid var(--ink);
  border-radius: 50%;
  background: var(--terracotta-mars);
  color: var(--cream-highlight);
  font-family: "Archivo Black", Impact, sans-serif;
  line-height: .92;
  box-shadow: 10px 12px 0 var(--copper-shadow);
  transform: rotate(-13deg);
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.stamp-seal:hover { transform: rotate(-9deg) translateY(-.35rem) scale(1.05); box-shadow: 15px 17px 0 var(--copper-shadow); }
.stamp-seal.small { width: 7.2rem; height: 7.2rem; right: auto; left: -2rem; bottom: 10%; }
.stamp-seal.grand { width: 14rem; height: 14rem; right: 7%; bottom: 7%; background: var(--champagne-parchment); color: var(--ink); font-size: 1.45rem; }

.memo-strip {
  display: inline-block;
  margin-top: 1.8rem;
  padding: 1rem 1.25rem;
  max-width: 34rem;
  background: var(--cream-highlight);
  border-radius: 1rem 2.5rem 1rem 1rem;
}

.memo-strip.olive { background: var(--champagne-parchment); color: var(--ink); }

.treaty-capsules {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin: 1.8rem 0 .8rem;
}

.treaty-capsules span {
  padding: .8rem 1rem;
  background: var(--dusty-rose);
  border-radius: 999px;
}

.cargo-orbits {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orbit-dot {
  position: absolute;
  width: 4.4rem;
  height: 4.4rem;
  display: grid;
  place-items: center;
  border: 5px solid var(--ink);
  border-radius: 50%;
  background: var(--cream-highlight);
  color: var(--ink);
  font-family: "Archivo Black", Impact, sans-serif;
  box-shadow: 7px 8px 0 var(--copper-shadow);
}

.dot-a { right: 10%; top: 12%; }
.dot-b { right: 28%; bottom: 12%; }
.dot-c { left: 8%; bottom: 18%; }
.dot-d { left: 41%; top: 9%; }

.final-ledger {
  max-width: 44rem;
  margin-top: 2rem;
  padding: 1.4rem;
  background: var(--champagne-parchment);
  color: var(--ink);
  border-radius: 1rem 3rem 1.2rem 1rem;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.lore-card {
  position: fixed;
  z-index: 9;
  right: 1.4rem;
  bottom: 1.2rem;
  max-width: 31rem;
  padding: 1rem 1.1rem;
  background: var(--cream-highlight);
  border: 5px solid var(--ink);
  border-radius: 1rem 2.2rem 1rem 1rem;
  box-shadow: 9px 10px 0 var(--copper-shadow);
  font-weight: 800;
  transform: translateY(130%);
  transition: transform 420ms cubic-bezier(.18, .86, .21, 1);
}

.lore-card.is-visible { transform: translateY(0); }

@keyframes wobble {
  0%, 100% { border-radius: 50%; transform: scale(1.08) rotate(-2deg); }
  35% { border-radius: 43% 57% 49% 51%; transform: scale(1.13) rotate(3deg); }
  70% { border-radius: 56% 44% 54% 46%; transform: scale(1.05) rotate(-5deg); }
}

@media (max-width: 820px) {
  .route-ledger { left: .7rem; top: auto; bottom: .75rem; transform: none; flex-direction: row; max-width: calc(100vw - 1.4rem); overflow: hidden; }
  .route-mark, .route-mark:hover, .route-mark.is-active { width: 3.2rem; grid-template-columns: 2.8rem 0fr; box-shadow: 4px 5px 0 var(--copper-shadow); }
  .route-mark b { display: none; }
  .route-ribbon { left: -1rem; width: 33vw; opacity: .38; }
  .scene, .scene:nth-child(even) { padding: 5vh 5vw 14vh; justify-content: center; }
  .chamber { width: 100%; min-height: 70vh; padding: 1.3rem; border-width: 5px; box-shadow: 12px 14px 0 var(--copper-shadow); }
  .document-row { grid-template-columns: 1fr; }
  .customs-tag.vertical { right: .8rem; top: auto; bottom: 1rem; writing-mode: horizontal-tb; }
  .stamp-seal { position: relative; right: auto; bottom: auto; margin-top: 1rem; }
  .stamp-seal.grand { width: 10rem; height: 10rem; }
  .bubble-viewport { width: 12rem; height: 12rem; }
  .lore-card { left: .8rem; right: .8rem; bottom: 5.8rem; }
}
