/* ============================================================
   MICROTOPIA — a tiny isometric city that builds itself
   Pure CSS 3D + GSAP scroll choreography. No images, no canvas.
   ============================================================ */

@property --blink { syntax: '<number>'; inherits: false; initial-value: 1; }
@property --arot  { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --bob   { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --wag   { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --pul   { syntax: '<number>'; inherits: false; initial-value: 1; }
@property --so    { syntax: '<number>'; inherits: false; initial-value: 0; }

:root {
  --mint:   #9fe6c3;
  --coral:  #ff8a70;
  --butter: #ffd97a;
  --skyblu: #bfe3ff;
  --paper:  #fbf1e1;
  --ink:    #47372d;
  --ink-soft: #6f5b4d;

  --sky-a: #8ecdf5;
  --sky-b: #ffeed2;
  --night: 0;
  --spin: 45;
  --fit: 1;
  --fity: 7.5vh;
}

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

html { scroll-behavior: auto; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Nunito', 'Avenir Next', 'Trebuchet MS', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, .baloo { font-family: 'Baloo 2', 'Nunito', sans-serif; }

a { color: inherit; }
::selection { background: var(--butter); color: var(--ink); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 10px;
}

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 22px; pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.wordmark {
  font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 21px;
  letter-spacing: .04em; text-decoration: none; color: var(--ink);
  background: rgba(251,241,225,.88); border-radius: 999px; padding: 5px 16px 6px;
  box-shadow: 0 3px 14px rgba(90,60,30,.14);
}
.wordmark .dot { color: var(--coral); }
.guide-link {
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 14.5px;
  text-decoration: none; color: var(--ink);
  background: rgba(251,241,225,.88); border-radius: 999px; padding: 7px 16px 8px;
  box-shadow: 0 3px 14px rgba(90,60,30,.14);
  transition: transform .18s ease, background .18s ease;
}
.guide-link:hover { transform: translateY(-2px) rotate(-1deg); background: var(--butter); }

/* ---------- journey / stage ---------- */
.journey { height: 900vh; position: relative; }

.stage {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  background:
    linear-gradient(180deg, var(--sky-a) 0%, var(--sky-b) 58%, var(--paper) 96%);
}

/* sky props (screen space) */
.sun {
  position: absolute; top: 12vh; right: 14vw; width: 82px; height: 82px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fff3c8, var(--butter) 62%, #ffc95e);
  box-shadow: 0 0 60px 22px rgba(255, 217, 122, .55);
}
.moon {
  position: absolute; top: 10vh; left: 16vw; width: 58px; height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fffdf2, #f4ecd2 70%);
  box-shadow: inset -13px 9px 0 rgba(197,186,150,.45), 0 0 44px 12px rgba(244,236,210,.35);
  opacity: 0; visibility: hidden;
}
.stars {
  position: absolute; inset: 0; opacity: calc(var(--night) * .95); pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 22% 28%, #fff9e6 48%, transparent 55%),
    radial-gradient(1.2px 1.2px at 64% 14%, #fff9e6 48%, transparent 55%),
    radial-gradient(1.9px 1.9px at 83% 34%, #ffeeb8 48%, transparent 55%),
    radial-gradient(1.1px 1.1px at 42% 9%,  #fff9e6 48%, transparent 55%),
    radial-gradient(1.4px 1.4px at 9% 12%,  #fff9e6 48%, transparent 55%),
    radial-gradient(1.3px 1.3px at 55% 31%, #ffeeb8 48%, transparent 55%);
  background-size: 46% 52%;
}
.cloud {
  position: absolute; height: 26px; border-radius: 999px; background: #fff;
  opacity: calc((1 - var(--night)) * .85); filter: none;
}
.cloud::before, .cloud::after {
  content: ''; position: absolute; background: #fff; border-radius: 50%;
}
.cloud::before { width: 34px; height: 34px; left: 18%; top: -14px; }
.cloud::after  { width: 24px; height: 24px; left: 52%; top: -9px; }
/* a shooting star, only visible after nightfall */
.shoot {
  position: absolute; top: 15vh; left: 63vw; width: 90px; height: 2px;
  border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, #fff9e6 0%, rgba(255,249,230,.5) 45%, transparent 85%);
  transform: rotate(17deg);
  opacity: calc(var(--night) * var(--so) * .9);
  animation: shoot 13s linear infinite;
}
.shoot-2 { top: 24vh; left: 30vw; width: 70px; transform: rotate(160deg); animation-duration: 17s; animation-delay: -7s; }
@keyframes shoot {
  0%, 76% { --so: 0; translate: 0 0; }
  79%     { --so: .95; }
  87%     { --so: 0; translate: -170px 52px; }
  100%    { --so: 0; translate: -170px 52px; }
}

.cloud-1 { width: 120px; top: 16vh; left: -140px; animation: drift 84s linear infinite; }
.cloud-2 { width: 88px;  top: 9vh;  left: -100px; animation: drift 116s linear infinite; animation-delay: -48s; }
.cloud-3 { width: 150px; top: 26vh; left: -170px; animation: drift 98s linear infinite; animation-delay: -76s; opacity: calc((1 - var(--night)) * .55); }
@keyframes drift { to { transform: translateX(calc(100vw + 340px)); } }

.nightveil {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: radial-gradient(120% 90% at 50% 42%, transparent 46%, rgba(15,18,54,.55) 100%);
  opacity: calc(var(--night) * .8);
}
.dayveil {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: radial-gradient(130% 100% at 50% 40%, transparent 55%, rgba(120,80,40,.14) 100%);
  opacity: calc(1 - var(--night));
}

/* ---------- the 3D scene ---------- */
.scene { position: absolute; inset: 0; z-index: 2; }
.camera {
  position: absolute; left: 50%; top: 50%;
  width: 760px; height: 760px; margin: -380px 0 0 -380px;
  will-change: transform;
}
.fit { transform: translateY(var(--fity)) scale(var(--fit)); }
.tilt {
  width: 760px; height: 760px;
  transform: perspective(2300px) rotateX(calc((55 + var(--ptilt, 0)) * 1deg));
  transform-style: preserve-3d;
}
.spin {
  width: 760px; height: 760px;
  transform: rotateZ(calc((var(--spin) + var(--pspin, 0)) * 1deg));
  transform-style: preserve-3d;
}
.world {
  position: relative; width: 760px; height: 760px;
  transform-style: preserve-3d;
}

/* faces */
.face {
  position: absolute; left: 0; top: 0;
  transform-origin: 0 0;
  backface-visibility: visible;
  box-sizing: border-box;
}
/* uniform nightfall tint on every surface */
.face::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: rgb(24 28 66 / calc(var(--night) * 0.38));
  border-radius: inherit;
}

/* structures */
.b {
  position: absolute;
  transform: translateZ(var(--bz, 0px)) rotateZ(var(--rz, 0deg)) scaleZ(var(--sz, 1));
  transform-style: preserve-3d;
  transform-origin: 0 0;
}
html.js:not(.reduced) .b { visibility: hidden; }

/* window grids: evenly-spaced cells via background-repeat: space */
.win {
  background-image: linear-gradient(var(--glass, #46587a) 0 0);
  background-size: var(--wcw, 7px) var(--wch, 9px);
  background-repeat: space;
  background-origin: content-box;
  background-clip: content-box;
}
.win::after {
  content: ''; position: absolute; inset: 0; padding: inherit; box-sizing: border-box;
  background-image: linear-gradient(#ffe49a 0 0);
  background-size: var(--wcw, 7px) var(--wch, 9px);
  background-repeat: space;
  background-origin: content-box;
  background-clip: content-box;
  opacity: calc(var(--night) * var(--blink, 1));
  pointer-events: none;
}
.flick { animation: blink 7s steps(1, end) infinite; animation-delay: var(--fd, 0s); }
@keyframes blink {
  0%   { --blink: 1; }
  8%   { --blink: .15; }
  12%  { --blink: 1; }
  46%  { --blink: 1; }
  49%  { --blink: .3; }
  54%  { --blink: 1; }
  81%  { --blink: .5; }
  84%  { --blink: 1; }
}

.door {
  position: absolute; top: 0; background: #5b4238;
  border-radius: 0 0 5px 5px; /* world-space: rounded top */
  width: 9px; height: 13px;
}
.door::after { /* tiny knob */
  content: ''; position: absolute; right: 2px; top: 6px; width: 1.5px; height: 1.5px;
  border-radius: 50%; background: var(--butter);
}

/* roads */
.road-v { background-color: #e7d1a8; background-image: repeating-linear-gradient(0deg, #fff6e0 0 12px, transparent 12px 28px); background-size: 3px 100%; background-position: 50% 0; background-repeat: no-repeat; }
.road-h { background-color: #e7d1a8; background-image: repeating-linear-gradient(90deg, #fff6e0 0 12px, transparent 12px 28px); background-size: 100% 3px; background-position: 0 50%; background-repeat: no-repeat; }
.cross-v { background-image: repeating-linear-gradient(0deg, #fff7e6 0 4px, transparent 4px 9px); }
.cross-h { background-image: repeating-linear-gradient(90deg, #fff7e6 0 4px, transparent 4px 9px); }

/* tram track */
.track-h { background-image: linear-gradient(0deg, transparent 3px, #ab8b60 3px 4.5px, transparent 4.5px 9.5px, #ab8b60 9.5px 11px, transparent 11px); }
.track-v { background-image: linear-gradient(90deg, transparent 3px, #ab8b60 3px 4.5px, transparent 4.5px 9.5px, #ab8b60 9.5px 11px, transparent 11px); }

/* water */
.water {
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,.28) 0 3px, transparent 3px 34px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.14) 0 2px, transparent 2px 46px);
  animation: lap 9s linear infinite;
  border: 4px solid #ecd7ab;
}
@keyframes lap { to { background-position: 48px 48px, -64px 64px; } }

/* fountain ripples */
.ripple {
  position: absolute; border: 2px solid rgba(255,255,255,.75); border-radius: 50%;
  animation: ripple 3.4s ease-out infinite;
}
@keyframes ripple {
  from { transform: translateZ(1.6px) scale(.25); opacity: .9; }
  to   { transform: translateZ(1.6px) scale(1.05); opacity: 0; }
}

/* billboards (always face the camera) */
.bbwrap { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.bb {
  position: absolute; left: 0; top: 0;
  transform: rotateZ(calc((var(--spin) + var(--pspin, 0)) * -1deg)) rotateX(calc((55 + var(--ptilt, 0)) * -1deg)) translate(-50%, -50%);
}

/* smoke */
.puff {
  position: absolute; left: 50%; bottom: 0; width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #ffffff, #f0e9de 75%);
  opacity: 0; transform: translate(-50%, 0);
  animation: puff 4.6s linear infinite;
}
@keyframes puff {
  0%   { transform: translate(-50%, 0) scale(.35); opacity: 0; }
  12%  { opacity: .85; }
  100% { transform: translate(calc(-50% + 10px), -52px) scale(1.35); opacity: 0; }
}

/* gulls */
.gull {
  position: absolute; left: 0; top: 0; width: 20px; height: 12px;
  opacity: calc(1 - var(--night));
  animation: gullfloat 7.5s ease-in-out infinite alternate;
}
.gull::before, .gull::after {
  content: ''; position: absolute; top: 3px; width: 10px; height: 8px;
  border: 2.2px solid #fdfaf2; border-radius: 50%;
  border-bottom-color: transparent; border-left-color: transparent; border-right-color: transparent;
}
.gull::before { left: 0; transform: rotate(-14deg); }
.gull::after  { left: 8px; transform: rotate(14deg); }
@keyframes gullfloat {
  from { transform: translate(0, 0); }
  to   { transform: translate(30px, -12px); }
}

/* lamp / lighthouse glows */
.glow {
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,223,138,.95) 0%, rgba(255,217,122,.35) 45%, transparent 70%);
  opacity: calc(var(--night) * .9);
}
.lh-glow { animation: pulse 2.6s ease-in-out infinite; opacity: calc(var(--night) * var(--pul, 1)); }
/* Tram No. 1's headlamp comes on a little early, because it likes dusk */
.tram .glow { opacity: calc(min(1, var(--night) * 2.4) * .85); }
@keyframes pulse { 0%,100% { --pul: .35; } 50% { --pul: 1; } }

/* crane arm swing */
.crane-arm {
  position: absolute; transform-style: preserve-3d;
  transform: translateZ(56px) rotateZ(calc(var(--arot) * 1deg));
  animation: craneswing 16s ease-in-out infinite alternate;
}
@keyframes craneswing { from { --arot: -18; } to { --arot: 34; } }
.crane-arm-2 { animation-duration: 21s; animation-delay: -8s; }

/* boat + buoy bob */
.bob {
  position: absolute; transform-style: preserve-3d;
  transform: translateZ(calc(var(--bob) * 1px)) rotateZ(calc(var(--bob) * .4deg));
  animation: bob 5.2s ease-in-out infinite alternate;
}
@keyframes bob { from { --bob: 0; } to { --bob: 2.6; } }
.bob-2 { animation-duration: 3.8s; animation-delay: -2s; }

/* cat tail */
.cat-tail {
  position: absolute; transform-style: preserve-3d;
  transform: rotateZ(calc(var(--wag) * 1deg));
  animation: wag 3.1s ease-in-out infinite alternate;
}
@keyframes wag { from { --wag: -14; } to { --wag: 16; } }

/* tram loop */
.tram-mover {
  position: absolute; left: 0; top: 0; transform-style: preserve-3d;
  animation: tramloop 26s linear infinite;
}
@keyframes tramloop {
  0%    { transform: translate3d(313px, 313px, 0) rotateZ(0deg); }
  22.5% { transform: translate3d(453px, 313px, 0) rotateZ(0deg); }
  25%   { transform: translate3d(453px, 313px, 0) rotateZ(90deg); }
  47.5% { transform: translate3d(453px, 453px, 0) rotateZ(90deg); }
  50%   { transform: translate3d(453px, 453px, 0) rotateZ(180deg); }
  72.5% { transform: translate3d(313px, 453px, 0) rotateZ(180deg); }
  75%   { transform: translate3d(313px, 453px, 0) rotateZ(270deg); }
  97.5% { transform: translate3d(313px, 313px, 0) rotateZ(270deg); }
  100%  { transform: translate3d(313px, 313px, 0) rotateZ(360deg); }
}

/* laundry flags */
.flag {
  position: absolute; bottom: 0; width: 6px; height: 7px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

/* ---------- overlay: hero, cards, hud ---------- */
.overlay { position: absolute; inset: 0; z-index: 5; pointer-events: none; }

.hero {
  position: absolute; left: 50%; top: 9vh; transform: translateX(-50%);
  text-align: center; width: min(92vw, 900px);
}
.hero .kicker {
  display: inline-block; font-family: 'Baloo 2', sans-serif; font-weight: 700;
  font-size: 14px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink); background: rgba(255,255,255,.72);
  border-radius: 999px; padding: 6px 18px 7px; margin-bottom: 10px;
}
.hero h1 {
  font-size: clamp(52px, 9.5vw, 118px); font-weight: 800; line-height: .96;
  letter-spacing: .01em; color: var(--ink);
  text-shadow: 0 3px 0 rgba(255,255,255,.6);
}
.hero h1 .lt { display: inline-block; }
.hero h1 .o1 { color: var(--coral); }
.hero h1 .o2 { color: #2e9d6c; }
.hero h1 .o3 { color: #e8a20c; }
.hero .sub {
  margin-top: 10px; font-size: clamp(16px, 2vw, 20px); font-weight: 600;
  color: var(--ink-soft); max-width: 520px; margin-inline: auto;
}
.scrollcue {
  margin-top: 26px; display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 13px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ink);
}
.scrollcue svg { animation: cue 1.6s ease-in-out infinite; }
@keyframes cue { 0%,100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* story cards */
.card {
  position: absolute; width: min(400px, 86vw);
  background: rgba(255, 250, 240, .94);
  border-radius: 24px; padding: 26px 28px 24px;
  box-shadow: 0 22px 54px rgba(96, 62, 28, .22), inset 0 0 0 2px rgba(71, 55, 45, .07);
  opacity: 0; visibility: hidden;
}
.card-left  { left: 5.5vw; top: calc(50% - 170px); }
.card-right { right: 5.5vw; top: calc(50% - 170px); }
.card-center { left: 50%; margin-left: min(-200px, -43vw); top: calc(50% - 190px); text-align: center; }
.chip {
  display: inline-block; font-family: 'Baloo 2', sans-serif; font-weight: 700;
  font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase;
  border-radius: 999px; padding: 4px 13px 5px; margin-bottom: 12px; color: var(--ink);
}
.chip-mint   { background: var(--mint); }
.chip-coral  { background: var(--coral); color: #fff6ee; }
.chip-butter { background: var(--butter); }
.chip-sky    { background: var(--skyblu); }
.chip-night  { background: #3a3f78; color: #ffe9ad; }
.card h2 { font-size: 31px; font-weight: 800; line-height: 1.08; margin-bottom: 9px; }
.card p  { font-size: 15.5px; line-height: 1.62; color: var(--ink-soft); font-weight: 500; }
.card p strong { color: var(--ink); }
.cmeta {
  margin-top: 14px; padding-top: 12px; border-top: 2px dashed rgba(71,55,45,.16);
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft);
}
.card-center .cmeta { border-top: 0; padding-top: 4px; }
#card-final h2 { font-size: 38px; }
#card-final .bigpop { color: var(--coral); }

/* hud */
.hud {
  position: absolute; left: 22px; bottom: 20px;
  display: flex; align-items: center; gap: 12px;
  background: rgba(251,241,225,.9); border-radius: 999px; padding: 9px 18px 9px 14px;
  box-shadow: 0 6px 22px rgba(90,60,30,.18);
  font-family: 'Baloo 2', sans-serif; opacity: 0; visibility: hidden;
}
.hud-meter { display: flex; gap: 3px; }
.hud-cell { width: 7px; height: 12px; border-radius: 2.5px; background: rgba(71,55,45,.14); }
.hud-cell.on { background: var(--coral); }
.hud-label { font-weight: 700; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.hud-district { font-weight: 800; font-size: 14.5px; letter-spacing: .05em; color: var(--ink); min-width: 128px; }
.hud-pct { font-weight: 800; font-size: 14.5px; color: var(--coral); min-width: 42px; text-align: right; }

/* ---------- post-journey content ---------- */
.post { position: relative; background: var(--paper); z-index: 6; }
.post::before { /* soft seam */
  content: ''; display: block; height: 5px; width: 100%;
  background: repeating-linear-gradient(90deg, var(--mint) 0 34px, var(--butter) 34px 68px, var(--coral) 68px 102px, var(--skyblu) 102px 136px);
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 26px; }

.fieldnotes { padding: 110px 0 70px; }
.sec-kicker {
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 13.5px;
  letter-spacing: .24em; text-transform: uppercase; color: var(--coral); margin-bottom: 8px;
}
.fieldnotes h2, .census h2, .colophon h2 {
  font-size: clamp(34px, 4.6vw, 52px); font-weight: 800; line-height: 1.04; margin-bottom: 14px;
}
.sec-intro { max-width: 620px; color: var(--ink-soft); font-weight: 500; margin-bottom: 44px; }

.note-row {
  display: grid; grid-template-columns: 200px 1fr; gap: 10px 40px;
  padding: 26px 4px; border-top: 2px dashed rgba(71,55,45,.18);
  align-items: baseline;
}
.note-row:last-child { border-bottom: 2px dashed rgba(71,55,45,.18); }
.note-id {
  font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 15px; color: var(--coral);
  letter-spacing: .08em;
}
.note-name { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 21px; display: block; margin-top: 2px; }
.note-body { color: var(--ink-soft); font-weight: 500; font-size: 16px; }

/* census */
.census { padding: 88px 0 96px; background: #eaf7ee; }
.census-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 34px 22px; margin-top: 46px;
}
.stat .num {
  font-family: 'Baloo 2', sans-serif; font-weight: 800;
  font-size: clamp(38px, 4.4vw, 54px); line-height: 1; color: var(--ink);
}
.stat:nth-child(odd) .num { color: #e2694f; }
.stat .lbl {
  margin-top: 6px; font-family: 'Baloo 2', sans-serif; font-weight: 700;
  font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft);
}

/* colophon */
.colophon { padding: 104px 0 110px; }
.colo-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 60px; margin-top: 26px; }
.colophon p { color: var(--ink-soft); font-weight: 500; margin-bottom: 16px; }
.colophon p strong { color: var(--ink); }
.tech-list { list-style: none; }
.tech-list li {
  padding: 13px 2px; border-top: 2px dashed rgba(71,55,45,.18);
  font-weight: 600; font-size: 15.5px; color: var(--ink);
  display: flex; align-items: baseline; gap: 4px;
}
.tech-list li span + * { min-width: 0; }
.tech-list li:last-child { border-bottom: 2px dashed rgba(71,55,45,.18); }
.tech-list .tag {
  display: inline-block; font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 11.5px;
  letter-spacing: .1em; text-transform: uppercase; background: var(--butter);
  border-radius: 999px; padding: 2px 10px 3px; margin-right: 10px;
}
.colo-cta {
  display: inline-block; margin-top: 10px; font-family: 'Baloo 2', sans-serif; font-weight: 800;
  font-size: 17px; text-decoration: none; color: var(--ink);
  background: var(--mint); border-radius: 999px; padding: 12px 26px 13px;
  box-shadow: 0 6px 0 #6fc79c; transition: transform .15s ease, box-shadow .15s ease;
}
.colo-cta:hover { transform: translateY(2px); box-shadow: 0 4px 0 #6fc79c; }

/* footer */
footer {
  background: #3d2f26; color: #f4e7d2; padding: 54px 0 60px; position: relative; z-index: 6;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 22px; justify-content: space-between; align-items: center; }
.foot-mark { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 22px; }
.foot-mark .dot { color: var(--coral); }
.foot-note { font-size: 14.5px; color: #cbb69c; font-weight: 500; }
.foot-note a { color: var(--butter); font-weight: 700; text-decoration: none; border-bottom: 2px solid rgba(255,217,122,.4); }
.foot-note a:hover { border-bottom-color: var(--butter); }

/* reveal helper */
.reveal { opacity: 0; transform: translateY(28px); }
html.reduced .reveal, html.no-gsap .reveal { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { :root { --fit: .82; } }
@media (max-width: 820px)  {
  :root { --fit: .62; --fity: 2vh; }
  .card-left, .card-right { left: 4vw; right: 4vw; width: auto; top: auto; bottom: 4.5vh; }
  .card-center { left: 4vw; right: 4vw; width: auto; margin-left: 0; top: auto; bottom: 6vh; }
  .card { padding: 20px 22px 18px; border-radius: 20px; }
  .card h2 { font-size: 25px; }
  .card p { font-size: 14.5px; }
  #card-final h2 { font-size: 29px; }
  .hud { left: 14px; bottom: auto; top: 66px; padding: 7px 14px 7px 11px; gap: 8px; }
  .hud-district { min-width: 0; font-size: 12.5px; }
  .hud-pct { font-size: 12.5px; min-width: 34px; }
  .hud-label { display: none; }
  .note-row { grid-template-columns: 1fr; gap: 4px 0; padding: 20px 2px; }
  .colo-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero { top: 10vh; }
  .sun { width: 58px; height: 58px; top: 30vh; right: 5vw; }
  .moon { width: 44px; height: 44px; top: 16vh; left: 8vw; }
}
@media (max-width: 460px) { :root { --fit: .54; --fity: 0vh; } .hero h1 { font-size: 15vw; } }

/* ---------- reduced motion: city arrives fully built, daytime ---------- */
@media (prefers-reduced-motion: reduce) {
  .scrollcue svg { animation: none; }
}
html.reduced * { animation: none !important; }
html.reduced .b, html.reduced .card, html.reduced .hero { visibility: visible; }
html.reduced .journey { height: auto; }
html.reduced .stage { position: relative; height: auto; display: flex; flex-direction: column; padding-bottom: 40px; }
html.reduced .overlay { display: contents; }
html.reduced .hero { position: static; transform: none; order: 0; margin: 90px auto 0; }
html.reduced .scene { position: relative; order: 1; height: 74vh; min-height: 480px; }
html.reduced .card {
  position: static; order: 2; opacity: 1; margin: 18px auto; width: min(560px, 90vw);
}
html.reduced .hud, html.reduced .moon, html.reduced .stars, html.reduced .scrollcue { display: none; }
html.reduced .tram-mover { transform: translate3d(453px, 380px, 0) rotateZ(90deg); }
html.reduced .sun { top: 6vh; right: 8vw; }
