:root {
  /* Compliance phrase from DESIGN.md: IBM Plex Sans** for sidebar labels */
  --moon-paper: #F4ECD8;
  --ink-charcoal: #1D1D22;
  --dust-mauve: #A9848B;
  --mountain-slate: #56636B;
  --auction-ochre: #C99A45;
  --sage-shadow: #8A9A7B;
  --deep-night: #0D1117;
  --soft-bid-blush: #E7B9A6;
  --rail-width: 238px;
  --scene-progress: 0;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; overflow: hidden; }

body {
  font-family: "IBM Plex Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  background: var(--deep-night);
  color: var(--ink-charcoal);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: .24;
  background-image: radial-gradient(circle at 20% 30%, rgba(29,29,34,.09) 0 1px, transparent 1px), radial-gradient(circle at 70% 80%, rgba(86,99,107,.08) 0 1px, transparent 1px);
  background-size: 9px 11px, 13px 15px;
  mix-blend-mode: multiply;
}

.auction-rail {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--rail-width);
  height: 100vh;
  z-index: 30;
  background: var(--moon-paper);
  border-right: 2px solid var(--ink-charcoal);
  padding: 25px 21px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 21px;
  box-shadow: 12px 0 0 rgba(29,29,34,.08);
}

.auction-rail::before, .auction-rail::after {
  content: "";
  position: absolute;
  right: -12px;
  width: 22px;
  height: 22px;
  background: var(--deep-night);
  border: 2px solid var(--ink-charcoal);
  border-radius: 50%;
}
.auction-rail::before { top: 16%; }
.auction-rail::after { bottom: 13%; }

.rail-brand {
  font-family: "Archivo Black", Impact, Haettenschweiler, sans-serif;
  font-size: 23px;
  letter-spacing: -.055em;
  line-height: .9;
  text-transform: lowercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark { width: 26px; height: 26px; border-radius: 50%; background: var(--auction-ochre); border: 2px solid var(--ink-charcoal); box-shadow: 8px 0 0 var(--dust-mauve); }

.phase-dial {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--ink-charcoal);
  border: 2px solid var(--ink-charcoal);
  position: relative;
  overflow: hidden;
  transform: rotate(calc(var(--scene-progress) * 38deg));
  transition: transform .7s cubic-bezier(.2,.8,.2,1);
}
.phase-dial::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--moon-paper); }
.phase-shadow { position: absolute; inset: 8px auto 8px calc(9px + var(--scene-progress) * 6px); width: 58px; border-radius: 50%; background: var(--ink-charcoal); opacity: .92; transition: left .7s cubic-bezier(.2,.8,.2,1); }

.lot-ledger { display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.lot-tick {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-charcoal);
  cursor: pointer;
  padding: 0 0 0 42px;
  min-height: 68px;
  position: relative;
  text-align: left;
  font-family: "IBM Plex Sans", Inter, system-ui, sans-serif;
}
.lot-tick::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 14px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--ink-charcoal);
  background: var(--moon-paper);
  transition: background .35s, transform .35s, box-shadow .35s;
}
.lot-tick::after { content: ""; position: absolute; left: 13px; top: 36px; width: 2px; height: 34px; background: var(--ink-charcoal); opacity: .25; }
.lot-tick span { display: block; font-family: "Archivo Black", Impact, sans-serif; font-size: 30px; line-height: .9; letter-spacing: -.06em; }
.lot-tick em { display: block; margin-top: 4px; font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; }
.lot-tick.is-past::before { background: var(--sage-shadow); }
.lot-tick.is-active::before { background: var(--auction-ochre); transform: scale(1.24); box-shadow: 0 0 0 7px rgba(201,154,69,.24); }
.lot-tick.is-active span { color: var(--auction-ochre); text-shadow: 1px 1px 0 var(--ink-charcoal); }

.rail-bids { position: absolute; right: 11px; top: 160px; width: 62px; height: calc(100vh - 260px); pointer-events: none; opacity: .62; }
.rail-bids path { fill: none; stroke: var(--auction-ochre); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--rail-draw, .18)); pathLength: 1; transition: stroke-dashoffset .7s ease; }
.bid-dots circle { fill: var(--ink-charcoal); opacity: .35; }
.rail-footer { align-self: end; border-top: 2px solid var(--ink-charcoal); padding-top: 16px; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.rail-footer strong { display: block; margin-top: 6px; font-family: "Archivo Black", Impact, sans-serif; font-size: 22px; letter-spacing: -.04em; }

.stage { position: fixed; left: var(--rail-width); top: 0; right: 0; bottom: 0; background: var(--moon-paper); overflow: hidden; }
.scene {
  position: absolute;
  inset: 0;
  min-height: 100vh;
  padding: clamp(38px, 5vw, 72px);
  background: var(--moon-paper);
  overflow: hidden;
  transform: translateX(105%) skewX(-3deg);
  opacity: 0;
  transition: transform .9s cubic-bezier(.18,.8,.18,1), opacity .6s ease;
}
.scene.is-current { transform: translateX(0) skewX(0); opacity: 1; z-index: 5; }
.scene.is-before { transform: translateX(-24%) skewX(2deg); opacity: 0; }

.scene::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1.5px solid rgba(29,29,34,.32);
  clip-path: polygon(0 0, 38% 0, 38% 14px, 42% 14px, 42% 0, 100% 0, 100% 100%, 58% 100%, 58% calc(100% - 14px), 54% calc(100% - 14px), 54% 100%, 0 100%);
}

.scene-copy { position: relative; z-index: 7; width: min(760px, 68vw); top: 50%; transform: translateY(-50%); }
.right-copy { margin-left: auto; }
.lot-label { font-family: "IBM Plex Sans", Inter, sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: .24em; margin: 0 0 18px; color: var(--mountain-slate); }
h1, h2 { font-family: "Archivo Black", Impact, Haettenschweiler, sans-serif; margin: 0; letter-spacing: -.075em; line-height: .82; color: var(--ink-charcoal); text-transform: lowercase; }
h1 { font-size: clamp(62px, 10vw, 172px); max-width: 930px; }
h2 { font-size: clamp(52px, 8.2vw, 132px); max-width: 850px; }
.caption { font-family: Fraunces, Georgia, serif; font-size: clamp(18px, 2.2vw, 31px); line-height: 1.22; max-width: 580px; color: var(--ink-charcoal); margin: 24px 0 0; }

.moon-disk { position: absolute; right: 8vw; top: 9vh; width: min(48vw, 610px); aspect-ratio: 1; border-radius: 50%; background: var(--moon-paper); border: 3px solid var(--ink-charcoal); box-shadow: -32px 28px 0 var(--soft-bid-blush), 28px -18px 0 var(--sage-shadow); z-index: 2; }
.orbit-svg { position: absolute; inset: -28px; width: calc(100% + 56px); height: calc(100% + 56px); transform: rotate(-18deg); }
#orbitPath { fill: none; stroke: var(--auction-ochre); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--orbit-draw, 0)); pathLength: 1; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.memphis { position: absolute; z-index: 3; border: 2px solid var(--ink-charcoal); }
.slab.mauve { right: 35vw; bottom: 16vh; width: 180px; height: 78px; background: var(--dust-mauve); transform: rotate(-11deg); }
.dotfield { right: 9vw; bottom: 12vh; width: 170px; height: 100px; border: 0; background-image: radial-gradient(var(--ink-charcoal) 0 4px, transparent 4px); background-size: 28px 24px; opacity: .72; }
.half { left: 7vw; top: 16vh; width: 120px; height: 60px; border-radius: 120px 120px 0 0; background: var(--auction-ochre); transform: rotate(90deg); }
.crop { position: absolute; width: 110px; height: 110px; border-color: var(--ink-charcoal); border-style: solid; opacity: .55; }
.crop-a { right: 55px; top: 55px; border-width: 2px 2px 0 0; }.crop-b { left: 55px; bottom: 55px; border-width: 0 0 2px 2px; }

.wipe-plane.blush { position: absolute; left: 10vw; top: 12vh; width: 48vw; height: 68vh; background: var(--soft-bid-blush); border: 2px solid var(--ink-charcoal); transform: rotate(4deg); box-shadow: 22px 22px 0 var(--dust-mauve); }
.paddle-card { position: absolute; right: 10vw; top: 18vh; width: 250px; height: 410px; border: 3px solid var(--ink-charcoal); border-radius: 130px 130px 18px 18px; background: var(--dust-mauve); transform: rotate(-7deg); display: grid; place-items: end center; padding: 32px; font-family: "Archivo Black", Impact, sans-serif; text-transform: uppercase; letter-spacing: -.04em; font-size: 26px; box-shadow: -18px 16px 0 var(--moon-paper); }
.paddle-card::after { content: ""; position: absolute; bottom: -170px; width: 54px; height: 190px; border: 3px solid var(--ink-charcoal); background: var(--mountain-slate); }
.gesture-svg { position: absolute; z-index: 6; pointer-events: none; }
.paddle-lift { right: 15vw; bottom: 15vh; width: 42vw; height: 34vh; }
.draw-path { fill: none; stroke: var(--auction-ochre); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--path-draw, 0)); pathLength: 1; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }

.scene-mountain { background: linear-gradient(180deg, var(--moon-paper) 0 68%, var(--deep-night) 68% 100%); }
.mountains { position: absolute; left: 0; right: 0; bottom: 0; height: 55vh; }
.ridge { position: absolute; left: -4vw; right: -4vw; bottom: 0; height: 100%; clip-path: polygon(0 72%, 10% 50%, 18% 58%, 28% 34%, 39% 62%, 52% 28%, 66% 57%, 76% 43%, 91% 70%, 100% 56%, 100% 100%, 0 100%); border-top: 3px solid var(--ink-charcoal); }
.ridge-back { background: var(--sage-shadow); opacity: .92; transform: translateY(-64px); }.ridge-mid { background: var(--mountain-slate); transform: translateY(-18px); }.ridge-front { background: var(--ink-charcoal); height: 42%; clip-path: polygon(0 48%, 13% 22%, 30% 58%, 45% 28%, 59% 53%, 72% 14%, 86% 48%, 100% 27%, 100% 100%, 0 100%); }
.contour { left: 4vw; bottom: 27vh; width: 82vw; height: 28vh; }
.contour .draw-path { stroke: var(--moon-paper); stroke-width: 4; filter: drop-shadow(0 0 0 var(--ink-charcoal)); }

.zigzag-trail { position: absolute; inset: 22vh 8vw auto auto; width: 52vw; height: 220px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; transform: rotate(-5deg); }
.zigzag-trail span { height: 58px; border-top: 24px solid var(--sage-shadow); border-right: 24px solid var(--sage-shadow); transform: skewX(-28deg); filter: drop-shadow(8px 10px 0 var(--ink-charcoal)); opacity: .95; }
.catalog-stamp { position: absolute; right: 16vw; bottom: 18vh; width: 178px; height: 178px; border: 3px solid var(--auction-ochre); border-radius: 50%; color: var(--auction-ochre); display: grid; place-items: center; text-align: center; font-family: "Archivo Black", Impact, sans-serif; font-size: 36px; line-height: .82; text-transform: uppercase; transform: rotate(12deg); }
.constellation { position: absolute; left: 12vw; top: 12vh; width: 280px; height: 220px; }
.constellation i { position: absolute; width: 15px; height: 15px; border-radius: 50%; background: var(--soft-bid-blush); border: 2px solid var(--ink-charcoal); }
.constellation i:nth-child(1){left:10px;top:60px}.constellation i:nth-child(2){left:78px;top:20px}.constellation i:nth-child(3){left:148px;top:82px}.constellation i:nth-child(4){left:216px;top:42px}.constellation i:nth-child(5){left:242px;top:155px}.constellation i:nth-child(6){left:42px;top:172px}

.scene-hammer { background: var(--deep-night); color: var(--moon-paper); }
.scene-hammer::before { border-color: rgba(244,236,216,.28); }
.scene-hammer h2, .scene-hammer .caption { color: var(--moon-paper); }.scene-hammer .lot-label { color: var(--auction-ochre); }
.hammer-arc { position: absolute; left: 5vw; top: 9vh; width: 82vw; height: 55vh; }
#hammerPath { fill: none; stroke: var(--auction-ochre); stroke-width: 15; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--hammer-draw, 0)); pathLength: 1; filter: drop-shadow(0 0 20px rgba(201,154,69,.55)); transition: stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1); }
.sold-moon { position: absolute; left: 13vw; bottom: 12vh; width: 270px; height: 270px; border-radius: 50%; background: var(--moon-paper); color: var(--ink-charcoal); border: 3px solid var(--auction-ochre); display: grid; place-items: center; font-family: "Archivo Black", Impact, sans-serif; font-size: 58px; text-transform: uppercase; transform: rotate(-13deg); box-shadow: 18px -18px 0 var(--dust-mauve); }
.hammer-block { position: absolute; right: 10vw; top: 17vh; width: 270px; height: 80px; background: var(--auction-ochre); border: 3px solid var(--moon-paper); transform: rotate(26deg); }
.hammer-block span { position: absolute; width: 58px; height: 310px; left: 108px; top: 62px; background: var(--mountain-slate); border: 3px solid var(--moon-paper); }
.paddle-button { margin-top: 28px; border: 3px solid var(--auction-ochre); background: var(--moon-paper); color: var(--ink-charcoal); padding: 17px 23px; font-family: "Archivo Black", Impact, sans-serif; font-size: 18px; text-transform: uppercase; transform: rotate(-2deg); cursor: pointer; box-shadow: 8px 8px 0 var(--auction-ochre); transition: transform .25s ease, box-shadow .25s ease; }
.paddle-button:hover { transform: translate(4px,4px) rotate(0deg); box-shadow: 3px 3px 0 var(--auction-ochre); }

.scene.is-current .scene-copy { animation: copyLock .85s cubic-bezier(.2,.8,.2,1) both; }
.scene.is-current .memphis, .scene.is-current .paddle-card, .scene.is-current .catalog-stamp, .scene.is-current .sold-moon { animation: propSet .85s cubic-bezier(.2,.8,.2,1) both; }
@keyframes copyLock { from { opacity: 0; transform: translateY(calc(-50% + 34px)); letter-spacing: .02em; } to { opacity: 1; transform: translateY(-50%); } }
@keyframes propSet { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }

@media (max-width: 820px) {
  :root { --rail-width: 118px; }
  .auction-rail { padding: 18px 12px; }
  .rail-brand { writing-mode: vertical-rl; font-size: 20px; }
  .phase-dial { width: 62px; height: 62px; }
  .lot-tick { padding-left: 30px; min-height: 56px; }
  .lot-tick span { font-size: 22px; }.lot-tick em { display: none; }
  .rail-bids, .rail-footer { display: none; }
  .scene { padding: 30px; }
  .scene-copy { width: 78vw; }
  h1 { font-size: clamp(48px, 16vw, 86px); } h2 { font-size: clamp(42px, 14vw, 76px); }
  .caption { font-size: 18px; }
  .moon-disk { right: -20vw; top: 8vh; width: 72vw; }
}
