/* ============================================================
   STRATA — generative gallery
   gallery black #0E0D0B · warm white #EFE9DD · brass #A6854D
   ============================================================ */

:root {
  --black: #0E0D0B;
  --black-2: #14120E;
  --black-3: #1A1712;
  --white: #EFE9DD;
  --muted: #B7AE9C;
  --faint: #86806F;
  --brass: #A6854D;
  --brass-hi: #D9B980;
  --brass-lo: #6E5732;
  --hairline: rgba(166, 133, 77, 0.28);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --font-d: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-l: "Inter", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-l);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: default;
}

::selection { background: rgba(166, 133, 77, 0.4); color: #FFF6E4; }

:focus { outline: none; }
:focus-visible {
  outline: 1px solid var(--brass);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ---------- typography ---------- */

.display {
  font-family: var(--font-d);
  font-weight: 380;
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 1;
  letter-spacing: -0.015em;
  line-height: 1.04;
}

.eyebrow {
  font-family: var(--font-l);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--brass);
}

.prose { color: var(--muted); max-width: 34em; }
.prose em { color: var(--white); font-style: italic; font-family: var(--font-d); }

/* ---------- ambient layers ---------- */

.grain {
  position: fixed;
  inset: -60px;
  z-index: 60;
  pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

.lamp {
  position: fixed;
  left: 0; top: 0;
  width: 640px; height: 640px;
  margin: -320px 0 0 -320px;
  z-index: 55;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 234, 196, 0.10) 0%,
    rgba(255, 226, 178, 0.05) 32%,
    rgba(255, 220, 170, 0.0) 68%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.8s var(--ease-out);
  will-change: transform;
}
body.lamp-on .lamp { opacity: 1; }
/* the light "notices" the art: brightens when the cursor is over the
   painting itself, not just ambient elsewhere on the page */
.lamp.near-art { filter: brightness(1.45) saturate(1.12); }

/* gallery spotlights per room */
.spot {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 42% at 68% 18%, rgba(255, 231, 188, 0.075), transparent 70%),
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(0, 0, 0, 0.5), transparent 70%);
  animation: spot-breathe 9s var(--ease-io) infinite alternate;
}
@keyframes spot-breathe {
  from { opacity: 0.82; }
  to   { opacity: 1; }
}

/* ---------- header ---------- */

.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  height: 68px;
  background: rgba(13, 12, 10, 0.86);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  /* --hdrA (0→1) is scroll progress through room one, updated per-frame —
     the threshold hairline and shadow deepen as you walk further in */
  border-bottom: 1px solid rgba(166, 133, 77, calc(0.16 + var(--hdrA, 0) * 0.26));
  box-shadow: 0 18px 34px -22px rgba(0, 0, 0, calc(0.7 + var(--hdrA, 0) * 0.25));
}

.wordmark {
  font-family: var(--font-d);
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 40, "WONK" 1;
  font-size: 1.375rem;
  letter-spacing: 0.34em;
  color: var(--white);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.7em;
}
.wordmark .tick {
  display: inline-block;
  width: 22px; height: 9px;
  border-top: 1px solid var(--brass);
  border-bottom: 1px solid var(--brass);
  position: relative;
  top: -2px;
}
.wordmark .tick::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 3px;
  border-top: 1px solid var(--brass);
}

.site-nav { display: flex; gap: clamp(16px, 2.6vw, 36px); align-items: center; }
.site-nav a {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
.site-nav a:hover { color: var(--white); border-color: var(--brass); }

/* mobile room-index toggle */
.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  margin-right: -8px;
  border: none;
  background: transparent;
  position: relative;
  cursor: pointer;
}
.menu-toggle span {
  position: absolute;
  left: 9px; right: 9px;
  height: 1px;
  background: var(--brass-hi);
  transition: transform 0.4s var(--ease-io), opacity 0.25s var(--ease-out);
}
.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { top: 20px; }
.menu-toggle span:nth-child(3) { top: 25px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 720px) {
  .wordmark .tick { display: none; }
  .menu-toggle { display: block; }
  /* #siteNav (main page — has a real toggle) becomes a drawer; the guide
     page's plain .site-nav (single "return" link, no toggle) stays put */
  #siteNav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(13, 12, 10, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--hairline);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.45s var(--ease-io), opacity 0.3s var(--ease-out);
  }
  #siteNav.nav-open { max-height: 320px; opacity: 1; }
  #siteNav a {
    padding: 17px clamp(20px, 4.5vw, 56px);
    border-bottom: 1px solid rgba(166, 133, 77, 0.1);
    font-size: 0.75rem;
  }
  #siteNav a:last-child { border-bottom: none; }
}

/* ---------- hero / room I ---------- */

.room-one {
  position: relative;
  min-height: 100vh;
  padding: clamp(96px, 13vh, 150px) clamp(20px, 4.5vw, 64px) clamp(56px, 7vh, 96px);
  display: grid;
  grid-template-columns: minmax(320px, 30rem) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: center;
  max-width: 1500px;
  margin: 0 auto;
}

.wall-text { position: relative; z-index: 2; }

.wall-text .eyebrow { display: block; margin-bottom: 1.5rem; }

.wall-text h1 {
  font-size: clamp(2.5rem, 4.6vw, 4.15rem);
  margin-bottom: 1.4rem;
  text-wrap: balance;
}
.wall-text h1 .amp {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  color: var(--brass-hi);
}

.wall-text .prose { margin-bottom: 2.2rem; font-size: 0.9375rem; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 2.6rem; }

.btn {
  font-family: var(--font-l);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 15px 26px 14px;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out),
              border-color 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.btn-mint {
  background: linear-gradient(160deg, rgba(166,133,77,0.16), rgba(166,133,77,0.05));
  border: 1px solid var(--brass);
  color: var(--brass-hi);
}
.btn-mint:hover {
  background: linear-gradient(160deg, #C29A5C, #8F6E3D);
  color: #16120A;
  transform: translateY(-1px);
}
.btn-mint:active { transform: translateY(0); }
.btn-mint[disabled] { opacity: 0.45; pointer-events: none; }
.btn-mint .coin {
  width: 11px; height: 11px;
  border: 1px solid currentColor;
  border-radius: 50%;
  position: relative;
}
.btn-mint .coin::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 1px dotted currentColor;
  opacity: 0.7;
}
.btn-mint[disabled] .coin { animation: coin-spin 0.7s linear infinite; }
@keyframes coin-spin {
  0%   { transform: scaleX(1); }
  25%  { transform: scaleX(0.12); }
  50%  { transform: scaleX(1); }
  75%  { transform: scaleX(0.12); }
  100% { transform: scaleX(1); }
}
.btn-ghost {
  border: 1px solid rgba(239, 233, 221, 0.18);
  color: var(--muted);
  background: transparent;
}
.btn-ghost:hover { color: var(--white); border-color: rgba(239, 233, 221, 0.45); }
.btn-ghost:active { transform: translateY(1px); }

/* museum label card */
.label-card {
  border: 1px solid var(--hairline);
  background: linear-gradient(170deg, rgba(26, 23, 18, 0.85), rgba(14, 13, 11, 0.6));
  padding: 22px 24px 20px;
  max-width: 27rem;
  position: relative;
}
.label-card::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(166, 133, 77, 0.12);
  pointer-events: none;
}
.label-card .lc-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  gap: 12px;
}
.label-card .lc-head .eyebrow { font-size: 0.5625rem; letter-spacing: 0.3em; }
.lc-status {
  font-size: 0.5625rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--faint);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.lc-status .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 6px rgba(217, 185, 128, 0.8);
  animation: dot-pulse 2.4s var(--ease-io) infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.lc-fields { display: grid; grid-template-columns: auto 1fr; gap: 7px 20px; }
.lc-fields dt {
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 3px;
}
.lc-fields dd {
  font-size: 0.8125rem;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.lc-fields dd.lc-title {
  font-family: var(--font-d);
  font-style: italic;
  font-size: 1.0625rem;
  font-variation-settings: "opsz" 60, "SOFT" 80, "WONK" 1;
}
.lc-fields dd .pal-chips { display: inline-flex; gap: 4px; margin-left: 10px; vertical-align: middle; }
.lc-fields dd .pal-chips i {
  width: 9px; height: 9px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0,0,0,0.4);
}

/* the painting wall */
.easel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  perspective: 1600px;
}

.frame {
  position: relative;
  width: min(100%, 62vh);
  padding: clamp(10px, 1.4vw, 18px);
  background:
    linear-gradient(125deg, #322718 0%, #191510 34%, #241C12 62%, #0F0D09 100%);
  border: 1px solid rgba(217, 185, 128, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 180, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.7),
    0 30px 80px -18px rgba(0, 0, 0, 0.85),
    0 8px 26px rgba(0, 0, 0, 0.6);
  /* rotateX/Y set continuously from JS (pointer-tilt), lerped — no CSS
     transition here so it stays perfectly smooth frame-to-frame */
}
.frame::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(166, 133, 77, 0.4);
  pointer-events: none;
  z-index: 2;
}
.frame::after {
  /* corner escutcheons */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(circle 5px at 10px 10px, var(--brass) 1.6px, rgba(166,133,77,0.45) 2.4px, transparent 3.2px),
    radial-gradient(circle 5px at calc(100% - 10px) 10px, var(--brass) 1.6px, rgba(166,133,77,0.45) 2.4px, transparent 3.2px),
    radial-gradient(circle 5px at 10px calc(100% - 10px), var(--brass) 1.6px, rgba(166,133,77,0.45) 2.4px, transparent 3.2px),
    radial-gradient(circle 5px at calc(100% - 10px) calc(100% - 10px), var(--brass) 1.6px, rgba(166,133,77,0.45) 2.4px, transparent 3.2px);
}

.canvas-mat {
  position: relative;
  background: #090807;
  padding: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.9);
}
.canvas-mat canvas {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--black-2);
}
.canvas-glaze {
  position: absolute;
  inset: 4px;
  pointer-events: none;
  /* --gx/--gy walk toward the cursor as it crosses the frame — the varnish
     sheen catches the light exactly like glass on a real hung painting */
  background:
    radial-gradient(ellipse 90% 55% at var(--gx, 50%) var(--gy, -8%), rgba(255, 236, 200, 0.13), transparent 60%),
    radial-gradient(ellipse 130% 120% at 50% 50%, transparent 52%, rgba(0, 0, 0, 0.42) 100%);
}
.canvas-dim {
  position: absolute;
  inset: 0;
  background: var(--black);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s var(--ease-io);
  z-index: 3;
}
.frame.dimming .canvas-dim { opacity: 1; }

/* the unveiling flash — fires the instant the new edition is swapped in
   under the fading dim, like a strobe catching fresh pigment */
.canvas-flash {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse 90% 75% at 50% 42%,
    rgba(255, 244, 220, 0.95), rgba(255, 224, 178, 0.35) 42%, transparent 74%);
  mix-blend-mode: screen;
}
.frame.flash .canvas-flash { animation: flash-pop 0.7s var(--ease-out); }
@keyframes flash-pop {
  0%   { opacity: 0; }
  14%  { opacity: 1; }
  100% { opacity: 0; }
}

/* brass plaque */
.plaque {
  position: relative;
  text-align: center;
  padding: 11px 26px 10px;
  border-radius: 2px;
  background: linear-gradient(168deg, #C9A566 0%, #A6854D 38%, #7C5F33 74%, #97783F 100%);
  background-size: 200% 200%;
  box-shadow:
    inset 0 1px 0 rgba(255, 241, 208, 0.75),
    inset 0 -1px 1px rgba(46, 32, 12, 0.85),
    0 10px 22px -8px rgba(0, 0, 0, 0.8);
  animation: plaque-sheen 11s var(--ease-io) infinite alternate;
  min-width: min(78%, 340px);
}
@keyframes plaque-sheen {
  from { background-position: 0% 0%; }
  to   { background-position: 100% 100%; }
}
.plaque::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(58, 41, 16, 0.55);
  border-radius: 1px;
  pointer-events: none;
}
.plaque .p-no {
  font-size: 0.71875rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #2B1F0D;
  text-shadow: 0 1px 0 rgba(255, 240, 205, 0.4);
}
.plaque .p-title {
  font-family: var(--font-d);
  font-style: italic;
  font-size: 0.875rem;
  font-variation-settings: "opsz" 40, "SOFT" 80, "WONK" 1;
  color: #3A2C14;
  text-shadow: 0 1px 0 rgba(255, 240, 205, 0.3);
}
.plaque .p-seed {
  font-size: 0.5625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(43, 31, 13, 0.75);
  text-shadow: 0 1px 0 rgba(255, 240, 205, 0.25);
  font-variant-numeric: tabular-nums;
}
.plaque.stamp { animation: plaque-stamp 0.7s var(--ease-out), plaque-sheen 11s var(--ease-io) infinite alternate; }
@keyframes plaque-stamp {
  0% { transform: scale(1.045); }
  100% { transform: scale(1); }
}

/* ---------- section chrome ---------- */

.room {
  position: relative;
  padding: clamp(80px, 12vh, 140px) clamp(20px, 4.5vw, 64px);
  max-width: 1500px;
  margin: 0 auto;
}
.room-head { max-width: 46rem; margin-bottom: clamp(40px, 6vh, 72px); position: relative; z-index: 1; }
.room-head .eyebrow { display: block; margin-bottom: 1.2rem; }
.room-head h2 { font-size: clamp(1.9rem, 3.2vw, 2.9rem); margin-bottom: 1.1rem; text-wrap: balance; }
.room-head .prose { font-size: 0.9375rem; }

.rule {
  border: none;
  height: 1px;
  max-width: 1500px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--hairline) 18%, var(--hairline) 82%, transparent);
}

/* the seam: threshold between gallery rooms — an overhead spot on the
   doorway hairline, so a section change reads as a step through a wall,
   not a stylesheet break */
.seam {
  position: relative;
  height: clamp(56px, 8vh, 100px);
  max-width: 1500px;
  margin: 0 auto;
  pointer-events: none;
}
.seam::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 26% 160% at 50% 0%, rgba(255, 226, 180, 0.06), transparent 72%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.38) 50%, transparent);
}
.seam::after {
  content: "";
  position: absolute;
  left: 12%; right: 12%; top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline) 18%, var(--hairline) 82%, transparent);
  box-shadow: 0 0 18px rgba(166, 133, 77, 0.1);
}

/* ---------- room II : the wall ---------- */

.room-two { max-width: none; padding-left: 0; padding-right: 0; }
.room-two .room-head { padding: 0 clamp(20px, 4.5vw, 64px); margin-left: auto; margin-right: auto; max-width: 1500px; }
.room-two .room-head-inner { max-width: 46rem; }
.room-two .spot::before {
  background:
    radial-gradient(ellipse 40% 34% at 22% 20%, rgba(255, 231, 188, 0.06), transparent 70%),
    radial-gradient(ellipse 40% 34% at 74% 26%, rgba(255, 231, 188, 0.05), transparent 70%);
  animation: spot-breathe 12s var(--ease-io) infinite alternate-reverse;
}

.wall-shell { position: relative; }
.wall {
  display: flex;
  gap: clamp(36px, 4.5vw, 72px);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 26px max(calc((100vw - 1500px) / 2 + 56px), 6vw) 46px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.wall::-webkit-scrollbar { display: none; }

.piece {
  flex: 0 0 auto;
  width: clamp(220px, 24vw, 300px);
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.piece .frame { width: 100%; padding: 8px; }
.piece .frame::after { display: none; }
.piece .canvas-mat { padding: 3px; }
.piece .canvas-mat canvas { aspect-ratio: 4 / 5; }
.piece .plaque {
  min-width: 82%;
  padding: 8px 16px 7px;
  animation-duration: 14s;
}
.piece .plaque .p-no { font-size: 0.59375rem; letter-spacing: 0.26em; }
.piece .plaque .p-title { font-size: 0.78125rem; }
.piece .plaque .p-seed { font-size: 0.5rem; }
.piece .frame { transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out); }
.piece:hover .frame {
  transform: translateY(-6px);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 180, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.7),
    0 42px 90px -18px rgba(0, 0, 0, 0.9),
    0 10px 30px rgba(0, 0, 0, 0.65);
}

.wall-nav {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 0 clamp(20px, 4.5vw, 64px);
  max-width: 1500px;
  margin: 0 auto 8px;
}
.wall-nav button {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--brass-hi);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.35s var(--ease-out), background 0.35s var(--ease-out),
              color 0.35s var(--ease-out), transform 0.2s var(--ease-out);
}
.wall-nav button:hover { border-color: var(--brass); background: rgba(166, 133, 77, 0.12); color: var(--white); }
.wall-nav button:active { transform: scale(0.9); }
.wall-nav button[disabled] {
  opacity: 0.32;
  cursor: default;
  pointer-events: none;
}

/* ---------- process / algorithm ---------- */

.process-grid {
  display: grid;
  grid-template-columns: minmax(300px, 30rem) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  position: relative;
  z-index: 1;
}
.process .spot::before {
  background:
    radial-gradient(ellipse 50% 40% at 30% 10%, rgba(255, 231, 188, 0.06), transparent 70%);
}

.steps { counter-reset: step; display: grid; gap: 34px; }
.step { position: relative; padding-left: 64px; }
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  left: 0; top: 0.05em;
  font-family: var(--font-d);
  font-size: 1.6rem;
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
  color: var(--brass);
}
.step::after {
  content: "";
  position: absolute;
  left: 42px; top: 8px; bottom: -26px;
  width: 1px;
  background: linear-gradient(rgba(166, 133, 77, 0.35), transparent);
}
.step:last-child::after { display: none; }
.step h3 {
  font-family: var(--font-d);
  font-weight: 480;
  font-variation-settings: "opsz" 60, "SOFT" 60, "WONK" 1;
  font-size: 1.2rem;
  margin-bottom: 0.45rem;
}
.step p { font-size: 0.875rem; color: var(--muted); max-width: 30em; }
.step code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.78em;
  color: var(--brass-hi);
  background: rgba(166, 133, 77, 0.1);
  border: 1px solid rgba(166, 133, 77, 0.2);
  padding: 1px 6px 2px;
  border-radius: 3px;
  white-space: nowrap;
}

.field-diagram {
  position: relative;
  border: 1px solid var(--hairline);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 231, 188, 0.045), transparent 65%),
    linear-gradient(170deg, rgba(26, 23, 18, 0.75), rgba(14, 13, 11, 0.4));
  padding: clamp(14px, 2vw, 26px);
}
.field-diagram::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(166, 133, 77, 0.12);
  pointer-events: none;
}
.field-diagram svg { display: block; width: 100%; height: auto; }
.field-diagram figcaption {
  margin-top: 14px;
  font-size: 0.625rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: center;
}

/* ---------- colophon / closing ---------- */

.colophon { text-align: center; padding-bottom: clamp(60px, 8vh, 100px); }
.colophon .mark {
  width: 44px; height: 14px;
  margin: 0 auto 2rem;
  border-top: 1px solid var(--brass);
  border-bottom: 1px solid var(--brass);
  position: relative;
}
.colophon .mark::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px; top: 5px;
  border-top: 1px solid var(--brass);
}
.colophon blockquote {
  font-family: var(--font-d);
  font-style: italic;
  font-weight: 340;
  font-variation-settings: "opsz" 144, "SOFT" 90, "WONK" 1;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  line-height: 1.3;
  max-width: 24em;
  margin: 0 auto 1.6rem;
  text-wrap: balance;
}
.colophon cite {
  font-family: var(--font-l);
  font-style: normal;
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--hairline);
  padding: 34px clamp(20px, 4.5vw, 64px) 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  align-items: center;
  justify-content: space-between;
  max-width: 1500px;
  margin: 0 auto;
}
.site-foot p {
  font-size: 0.71875rem;
  letter-spacing: 0.14em;
  color: var(--faint);
  text-transform: uppercase;
}
.site-foot p b { color: var(--muted); font-weight: 500; }
.site-foot nav { display: flex; gap: 26px; }
.site-foot a {
  font-size: 0.71875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.site-foot a:hover { color: var(--brass-hi); border-color: var(--brass-hi); }

/* ---------- entrances ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* hero load-in (plays without observer) */
.enter { opacity: 0; transform: translateY(22px); animation: enter 1.1s var(--ease-out) forwards; }
.enter-1 { animation-delay: 0.15s; }
.enter-2 { animation-delay: 0.3s; }
.enter-3 { animation-delay: 0.45s; }
.enter-4 { animation-delay: 0.6s; }
.enter-5 { animation-delay: 0.5s; }
@keyframes enter { to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .room-one {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 96px;
    min-height: 0;
  }
  /* the painting leads on mobile — it is the exhibit, not the wall text */
  .easel { order: 1; }
  .wall-text { order: 2; }
  .frame { width: min(100%, 420px); }
  .process-grid { grid-template-columns: 1fr; }
  .field-diagram { order: 1; }
  .steps { order: 2; }
}

@media (max-width: 720px) {
  .wall-text h1 { font-size: clamp(2.1rem, 9.4vw, 2.6rem); }
  .wall-text .eyebrow { font-size: 0.59375rem; letter-spacing: 0.26em; }
  .wall-text .prose { font-size: 0.875rem; margin-bottom: 1.8rem; }
  .actions { margin-bottom: 2rem; }
  .btn { padding: 13px 20px 12px; font-size: 0.625rem; }
  .label-card { max-width: none; }
  .wall { gap: 30px; padding-left: 8vw; padding-right: 8vw; scroll-snap-type: x mandatory; }
  .piece { width: min(72vw, 280px); }
  .site-foot { justify-content: center; text-align: center; }
  .wordmark { font-size: 1.125rem; letter-spacing: 0.28em; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .enter, .reveal { opacity: 1; transform: none; animation: none; }
  .lamp { display: none; }
  .lc-status .dot { animation: none; }
}
