/* ============================================================
   THE GOLDENLAND MUSEUM (museum.html)
   A scroll-driven virtual museum of the church photo archive:
   entrance doors → curator's note → directory → gallery wings
   (pinned sideways corridors) → Salon (flashlight room) → the
   "40" mosaic finale → exit. Layout/motion lives in museum.js.
   ============================================================ */

:root{
  --ink: #0B0806;
  --stone: #17120D;
  --gold: #C6A24D;
  --gold-bright: #E7C873;
  --gold-pale: #F6DE98;
  --cream: #FAF3E4;
  --paper: #FFFDF8;
  --muted: #B8AE9C;
  --display: 'Fraunces', Georgia, serif;
  --body: 'Inter', 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* frame finishes */
  --f-gold: linear-gradient(145deg, #6E5114 0%, #E9CF7E 16%, #A8822C 32%, #FFF0BD 48%, #9A7626 64%, #DCBC62 82%, #6E5114 100%);
  --f-walnut: linear-gradient(145deg, #2E1B0F 0%, #6B4426 26%, #4A2D18 52%, #7B5230 78%, #2E1B0F 100%);
  --f-silver: linear-gradient(145deg, #5F6165 0%, #E8E9EB 22%, #9A9CA0 44%, #F5F6F7 60%, #7F8185 80%, #C9CACD 100%);
  --f-black: linear-gradient(145deg, #050505, #2A2A2A 40%, #0C0C0C 70%, #232323);
}
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
html, body{ margin: 0; background: var(--ink); }
body.mu{ color: var(--cream); font-family: var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.mu.locked{ overflow: hidden; }
img{ display: block; max-width: 100%; }
button{ font: inherit; color: inherit; }
[hidden]{ display: none !important; }
a:focus-visible, button:focus-visible{ outline: 3px solid var(--gold-bright); outline-offset: 3px; border-radius: 4px; }

/* ================= TOP BAR ================= */
.mu-bar{
  position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 16px; padding: 12px clamp(16px, 3vw, 32px);
  background: linear-gradient(180deg, rgba(8,6,4,.85), rgba(8,6,4,0)); pointer-events: none;
}
.mu-bar > *{ pointer-events: auto; }
.mu-home{ display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold-bright); font-weight: 800; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; }
.mu-home img{ width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 2px var(--gold); }
.mu-now{
  flex: 1; margin: 0; text-align: center; font-family: var(--display); font-style: italic; font-size: clamp(13px, 1.6vw, 17px);
  color: var(--cream); opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .3s;
}
.mu-dir{
  padding: 8px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); background: linear-gradient(180deg, #FFE9A6, var(--gold));
}
.mu-progress{ position: absolute; left: 0; bottom: 0; height: 2px; width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, var(--gold), var(--gold-pale)); box-shadow: 0 0 10px var(--gold); }
@media (max-width: 560px){ .mu-home span{ display: none; } .mu-now{ text-align: left; } }

/* ================= ENTRANCE ================= */
.foyer{ position: relative; height: 320vh; }
.foyer-stage{ position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; perspective: 1200px; background: #060403; }

.hall{
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  background:
    radial-gradient(ellipse 60% 55% at 50% 45%, rgba(255,226,150,.28), transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% 120%, #2A1C0E, transparent 60%),
    linear-gradient(180deg, #120C07, #1E150C 60%, #0E0905);
  transform: scale(calc(1.35 - .35 * var(--walk, 0)));
}
.dust{ position: absolute; inset: 0; width: 100%; height: 100%; }
.hall-rays{
  position: absolute; inset: -20%; opacity: calc(.25 + .5 * var(--walk, 0));
  background: repeating-conic-gradient(from 0deg at 50% 38%, rgba(255,228,160,.09) 0 4deg, transparent 4deg 13deg);
  mask-image: radial-gradient(circle at 50% 38%, #000 0, transparent 55%);
  -webkit-mask-image: radial-gradient(circle at 50% 38%, #000 0, transparent 55%);
  animation: muSpin 90s linear infinite;
}
@keyframes muSpin{ to{ transform: rotate(360deg); } }
.hall-title{ position: relative; padding: 0 20px; opacity: var(--title, 0); transform: translateY(calc((1 - var(--title, 0)) * 4vh)); }
.hall-emblem{
  width: clamp(110px, 17vh, 170px); height: auto; margin: 0 auto 2.4vh; border-radius: 50%;
  box-shadow: 0 0 0 3px var(--gold), 0 0 60px rgba(231,200,115,.55), 0 0 140px rgba(231,200,115,.3);
  animation: muFloat 6s ease-in-out infinite;
}
@keyframes muFloat{ 50%{ transform: translateY(-1.2vh); } }
.hall-kicker{ margin: 0 0 1.4vh; font-size: clamp(10px, 1.5vh, 13px); font-weight: 700; letter-spacing: .34em; text-transform: uppercase; color: var(--gold-bright); }
.hall-title h1{
  margin: 0; font-family: var(--display); font-weight: 900; line-height: .95; font-size: clamp(44px, 11vw, 150px); letter-spacing: -.02em;
  background: linear-gradient(110deg, #B8902F, var(--gold-pale) 35%, var(--gold) 55%, #FFF1C4 75%, #C6A24D);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 30px rgba(0,0,0,.6)); animation: muShimmer 8s linear infinite;
}
.hall-title h1 em{ display: block; font-style: italic; font-weight: 600; }
@keyframes muShimmer{ from{ background-position: 120% 0; } to{ background-position: -130% 0; } }
.hall-sub{ margin: 2.4vh 0 0; font-family: var(--display); font-style: italic; font-size: clamp(16px, 2.6vh, 24px); color: var(--cream); }

/* the wall with an arched doorway, which the camera walks through */
.portal{
  position: absolute; inset: 0; display: grid; place-items: center;
  transform: scale(calc(1 + 7 * var(--zoom, 0) * var(--zoom, 0))); opacity: calc(1 - var(--fade, 0));
  transform-origin: 50% 56%;
}
.doorway{
  --dw: min(66vw, 46vh, 460px);
  position: relative; width: var(--dw); height: calc(var(--dw) * 1.5); margin-top: 9vh;
  border-radius: 50% 50% 0 0 / 22% 22% 0 0;
  box-shadow: 0 0 0 250vmax #0D0906, inset 0 0 0 10px #3A2A14, inset 0 0 0 14px var(--gold);
  perspective: 1400px;
}
.portal-wall{
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(ellipse 45% 50% at 50% 60%, transparent 55%, rgba(0,0,0,.5)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.012) 0 1px, transparent 1px 128px);
  mask-image: radial-gradient(ellipse 40% 50% at 50% 58%, transparent 40%, #000 62%);
  -webkit-mask-image: radial-gradient(ellipse 40% 50% at 50% 58%, transparent 40%, #000 62%);
}
.lintel{
  position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -3.4vh); margin: 0; white-space: nowrap; z-index: 2;
  font-family: var(--display); font-weight: 600; letter-spacing: min(.3em, 1vw); text-transform: uppercase; font-size: clamp(9px, min(1.7vh, 2.9vw), 15px);
  color: var(--gold); text-shadow: 0 1px 0 #000, 0 0 18px rgba(231,200,115,.35);
}
.door-light{
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden;
  background: radial-gradient(ellipse 70% 60% at 50% 42%, rgba(255,246,220,.85), rgba(242,204,114,.35) 45%, rgba(122,85,24,0) 85%);
  opacity: calc((.2 + .8 * var(--open, 0)) * (1 - var(--zoom, 0)));
}
.doors{ position: absolute; inset: 14px; display: flex; border-radius: 50% 50% 0 0 / 21% 21% 0 0; transform-style: preserve-3d; }
.door{
  position: relative; flex: 1; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0,0,0,.35), transparent 12%, transparent 88%, rgba(0,0,0,.35)),
    repeating-linear-gradient(90deg, #123D2C 0 3px, #0F3526 3px 7px),
    #103A2A;
  box-shadow: inset 0 0 0 2px rgba(198,162,77,.6);
  transition: filter .3s;
}
.door-l{ border-radius: 100% 0 0 0 / 42% 0 0 0; transform-origin: 0 50%; transform: rotateY(calc(var(--open, 0) * 82deg)); filter: brightness(calc(1 - .45 * var(--open, 0))); }
.door-r{ border-radius: 0 100% 0 0 / 0 42% 0 0; transform-origin: 100% 50%; transform: rotateY(calc(var(--open, 0) * -82deg)); filter: brightness(calc(1 - .45 * var(--open, 0))); }
.door-panel{ position: absolute; left: 16%; right: 16%; border: 2px solid rgba(198,162,77,.75); box-shadow: inset 0 0 0 5px rgba(0,0,0,.25), inset 0 0 0 7px rgba(198,162,77,.3); }
.door-panel.p1{ top: 30%; height: 24%; }
.door-panel.p2{ top: 62%; height: 30%; }
.door-l .door-panel{ border-radius: 3px; }
.door-seal{
  position: absolute; top: 12%; width: min(34vh, 60%); aspect-ratio: 1; height: auto; max-width: none; border-radius: 50%;
  box-shadow: 0 0 0 4px var(--gold), 0 0 0 7px #2A1E0C, 0 10px 30px rgba(0,0,0,.6);
}
.door-l .door-seal{ right: 0; transform: translateX(50%); }
.door-r .door-seal{ left: 0; transform: translateX(-50%); }
.door-handle{
  position: absolute; top: 57%; width: 10px; height: 13%; border-radius: 6px;
  background: linear-gradient(90deg, #6E5114, #FFF0BD 45%, #A8822C); box-shadow: 0 4px 10px rgba(0,0,0,.6);
}
.door-l .door-handle{ right: 9%; }
.door-r .door-handle{ left: 9%; }

.scroll-cue{
  position: absolute; left: 50%; bottom: 3.5vh; z-index: 3; transform: translateX(-50%); margin: 0; display: grid; justify-items: center; gap: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-bright); opacity: calc(1 - var(--cue, 0));
}
.scroll-cue i{ width: 22px; height: 36px; border-radius: 12px; border: 2px solid var(--gold); position: relative; }
.scroll-cue i::after{ content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold-bright); animation: muWheel 1.8s ease-in-out infinite; }
@keyframes muWheel{ 0%{ transform: translateY(0); opacity: 1; } 80%{ transform: translateY(12px); opacity: 0; } 100%{ opacity: 0; } }

/* ================= CURATOR'S NOTE ================= */
.note{
  position: relative; padding: clamp(80px, 14vh, 140px) clamp(16px, 5vw, 64px);
  background:
    radial-gradient(ellipse 70% 60% at 20% 0%, rgba(198,162,77,.12), transparent 60%),
    linear-gradient(180deg, #0E0905, #15100A);
}
.note-inner{ max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: clamp(40px, 6vw, 90px); align-items: center; }
@media (max-width: 820px){ .note-inner{ grid-template-columns: 1fr; justify-items: center; } }
.eyebrow{ margin: 0 0 14px; font-size: 12px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-bright); }
.note-text h2{ margin: 0 0 20px; font-family: var(--display); font-weight: 600; font-size: clamp(28px, 4vw, 46px); line-height: 1.12; color: var(--paper); }
.note-text p{ font-size: 17px; line-height: 1.75; color: #D9CFBE; }
.note-verse{ margin-top: 26px; padding-left: 18px; border-left: 2px solid var(--gold); font-family: var(--display); font-style: italic; font-size: 20px !important; color: var(--gold-pale) !important; }
.note-verse span{ display: block; margin-top: 6px; font-family: var(--body); font-style: normal; font-size: 13px; letter-spacing: .1em; color: var(--muted); }

.ticket{
  position: relative; display: flex; width: min(100%, 400px); padding: 0; border: 0; cursor: pointer; background: none; text-align: left;
  transform: rotate(-5deg); transition: transform .6s var(--ease); filter: drop-shadow(0 24px 40px rgba(0,0,0,.55));
}
.ticket:hover{ transform: rotate(-1deg) translateY(-6px); }
.ticket-main, .ticket-stub{
  background:
    radial-gradient(circle at 0 50%, transparent 12px, transparent 12px),
    linear-gradient(135deg, #FBF3DC, #EFD9A5);
  color: #3A2A10;
}
.ticket-main{
  flex: 1; display: grid; gap: 6px; padding: 26px 22px 22px 28px; border-radius: 10px 0 0 10px;
  -webkit-mask: radial-gradient(circle 10px at 0 50%, transparent 98%, #000); mask: radial-gradient(circle 10px at 0 50%, transparent 98%, #000);
  box-shadow: inset 0 0 0 1px rgba(110,81,20,.25);
}
.ticket-top{ font-size: 11px; font-weight: 800; letter-spacing: .4em; text-transform: uppercase; color: #8C2F2F; }
.ticket-name{ font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.1; }
.ticket-line{ font-family: var(--display); font-style: italic; font-size: 14px; color: #6B5428; }
.ticket-code{ height: 34px; margin-top: 8px; background: repeating-linear-gradient(90deg, #3A2A10 0 2px, transparent 2px 4px, #3A2A10 4px 5px, transparent 5px 8px, #3A2A10 8px 11px, transparent 11px 13px); opacity: .8; }
.ticket-no{ font-size: 11px; font-weight: 700; letter-spacing: .2em; color: #6B5428; }
.ticket-stub{
  width: 96px; display: grid; place-content: center; text-align: center; border-radius: 0 10px 10px 0; border-left: 2px dashed rgba(58,42,16,.45);
  transition: transform .9s var(--ease), opacity .9s ease;
}
.ticket-stub span{ font-family: var(--display); font-weight: 900; font-size: 44px; line-height: 1; color: #8C6A1C; }
.ticket-stub small{ font-size: 10px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; }
.ticket.torn .ticket-stub{ transform: translate(40px, 90px) rotate(28deg); opacity: 0; }
.ticket.torn .ticket-main{ border-radius: 10px; }

.stats{ max-width: 1100px; margin: clamp(60px, 10vh, 100px) auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(198,162,77,.25); border-block: 1px solid rgba(198,162,77,.25); }
.stats > div{ padding: 28px 12px; text-align: center; background: #120D08; }
.stats dt{ font-family: var(--display); font-weight: 700; font-size: clamp(34px, 5vw, 60px); line-height: 1; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.stats dd{ margin: 10px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 620px){ .stats{ grid-template-columns: repeat(2, 1fr); } }

/* ================= DIRECTORY: felt letterboard ================= */
.directory{ padding: clamp(60px, 10vh, 110px) clamp(16px, 5vw, 64px) clamp(90px, 14vh, 150px); background: #15100A; }
.letterboard{
  max-width: 820px; margin: 0 auto; padding: clamp(24px, 4vw, 44px) clamp(18px, 4vw, 48px);
  border-radius: 6px; border: 14px solid transparent;
  background:
    repeating-linear-gradient(180deg, #151515 0 6px, #0B0B0B 6px 8px) padding-box,
    var(--f-walnut) border-box;
  box-shadow: 0 30px 60px rgba(0,0,0,.6), inset 0 0 40px rgba(0,0,0,.8);
  font-family: 'Courier New', ui-monospace, monospace; text-transform: uppercase; color: #F4F1EA;
}
.lb-head, .lb-foot{ margin: 0; text-align: center; font-weight: 700; letter-spacing: .28em; font-size: clamp(11px, 1.6vw, 15px); color: #D9D4C7; }
.lb-head{ padding-bottom: 20px; margin-bottom: 14px; border-bottom: 1px dashed rgba(255,255,255,.18); }
.lb-foot{ padding-top: 18px; margin-top: 10px; border-top: 1px dashed rgba(255,255,255,.18); color: var(--gold-bright); }
.lb-rows{ margin: 0; padding: 0; list-style: none; }
.lb-rows a{
  display: grid; grid-template-columns: 3.4em 1fr auto; align-items: baseline; gap: 12px; padding: 10px 6px; text-decoration: none; color: inherit;
  font-weight: 700; letter-spacing: .12em; font-size: clamp(12px, 2vw, 18px); border-radius: 3px; transition: color .25s, background .25s;
}
.lb-rows a .dots{ overflow: hidden; white-space: nowrap; }
.lb-rows a .dots::after{ content: " ····································································"; color: rgba(255,255,255,.25); }
.lb-rows a .yrs{ color: #CFC8B8; font-size: .85em; }
.lb-rows a:hover, .lb-rows a:focus-visible{ color: var(--gold-bright); background: rgba(231,200,115,.06); }
@media (max-width: 560px){ .lb-rows a{ grid-template-columns: 2.6em 1fr; } .lb-rows a .yrs{ grid-column: 2; margin-top: -4px; } .lb-rows a .dots::after{ content: ""; } }

/* ================= GALLERY WINGS ================= */
.wing{ position: relative; --wall: #2A1C13; --frame: var(--f-gold); --mat: #F4ECD8; }
.wing-sticky{ position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--wall); }
.wing-wall{
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.55), transparent 22%, transparent 70%, rgba(0,0,0,.35) 80%),
    linear-gradient(180deg, transparent 79.4%, rgba(231,200,115,.35) 79.6%, rgba(0,0,0,.4) 80.2%, transparent 81%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 2px, transparent 2px 11px),
    var(--wall);
}
.wing-floor{
  position: absolute; left: 0; right: 0; bottom: 0; height: 17%; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,230,170,.08), transparent 40%),
    repeating-linear-gradient(90deg, rgba(0,0,0,.25) 0 1px, transparent 1px 90px),
    linear-gradient(180deg, #2A1A0E, #120A05);
  box-shadow: inset 0 14px 30px rgba(0,0,0,.55);
}
.wing-track{
  position: absolute; top: 58px; left: 0; height: calc(83% - 58px); display: flex; align-items: center; gap: 0;
  padding: 0 12vw 0 clamp(20px, 7vw, 110px); will-change: transform;
}

.wing-intro{ flex: none; width: min(560px, 82vw); margin-right: 8vw; position: relative; }
.wing-numeral{
  position: absolute; left: -2vw; top: 50%; transform: translateY(-58%); z-index: -1; margin: 0;
  font-family: var(--display); font-weight: 900; font-size: min(60vh, 70vw); line-height: 1; color: transparent;
  -webkit-text-stroke: 2px rgba(231,200,115,.12); pointer-events: none; user-select: none;
}
.wing-no{ margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-bright); }
.wing-intro h2{ margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(38px, 7.5vh, 84px); line-height: 1; color: var(--paper); text-shadow: 0 6px 30px rgba(0,0,0,.5); }
.wing-years{ margin: 14px 0 0; font-family: var(--display); font-style: italic; font-size: clamp(18px, 3vh, 28px); color: var(--gold-pale); }
.wing-blurb{ margin: 18px 0 0; max-width: 460px; font-size: clamp(14px, 2vh, 17px); line-height: 1.7; color: rgba(250,243,228,.82); }
.wing-actions{ display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 24px; }
.wing-hint{ font-size: 11px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: rgba(250,243,228,.6); }
.wing-hint::after{ content: " \2192"; display: inline-block; animation: muNudge 1.6s ease-in-out infinite; }
@keyframes muNudge{ 50%{ transform: translateX(6px); } }

.mu-btn{
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; cursor: pointer; text-decoration: none;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--cream);
  background: rgba(255,255,255,.06); border: 1px solid rgba(231,200,115,.45); transition: background .25s, transform .25s var(--ease);
}
.mu-btn:hover{ background: rgba(231,200,115,.14); transform: translateY(-2px); }
.mu-btn-gold{ color: var(--ink); border-color: transparent; background: linear-gradient(180deg, #FFE9A6, var(--gold)); }
.mu-btn-gold:hover{ background: linear-gradient(180deg, #FFF1C4, var(--gold-bright)); }

/* a framed photograph with its spotlight and plaque */
.piece{ --lit: 0; position: relative; flex: none; margin: 0 clamp(28px, 4.5vw, 70px); display: flex; flex-direction: column; align-items: center; transform: translateY(var(--hang, 0)); }
.piece::before{ /* ceiling spotlight cone */
  content: ""; position: absolute; left: 50%; bottom: 30%; width: 220%; height: 150vh; transform: translateX(-50%); pointer-events: none; z-index: -1;
  background: linear-gradient(180deg, rgba(255,238,196,.26), rgba(255,238,196,.08) 75%, transparent);
  clip-path: polygon(46% 0, 54% 0, 88% 100%, 12% 100%);
  opacity: var(--lit); transition: opacity .2s linear;
}
.piece::after{ /* pool of light on the wall */
  content: ""; position: absolute; inset: -18% -30%; z-index: -1; pointer-events: none; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, rgba(255,232,180,.22), transparent 65%); opacity: var(--lit);
}
.frame{
  display: block; padding: clamp(8px, 1.5vh, 15px); border: 0; cursor: zoom-in; background: var(--frame);
  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,.35), inset 0 0 0 5px rgba(255,255,255,.18), inset 0 0 0 7px rgba(0,0,0,.25),
    0 2.6vh 4vh rgba(0,0,0,.6), 0 .6vh 1vh rgba(0,0,0,.4);
  transform: scale(calc(.95 + .05 * var(--lit))) rotate(var(--tilt, 0deg));
  transition: transform .5s var(--ease);
}
.frame:hover{ --tilt: -.6deg; }
.mat{ display: block; padding: clamp(10px, 2.2vh, 24px); background: var(--mat); box-shadow: inset 0 .4vh 1vh rgba(0,0,0,.35); }
.mat img{
  height: min(var(--h, 36vh), calc(58vw / var(--ar))); width: auto; aspect-ratio: var(--ar); object-fit: cover; background: #2B2520;
  filter: brightness(calc(.45 + .55 * var(--lit))) saturate(calc(.7 + .3 * var(--lit)));
}
.piece{ --h: min(36vh, calc(100vh - 330px)); }
.piece.tall{ --h: min(48vh, calc(100vh - 300px)); }
.plaque{
  margin-top: clamp(14px, 2.6vh, 26px); padding: 10px 14px; max-width: 260px; display: grid; gap: 2px; text-align: left;
  background: linear-gradient(180deg, #F7EEDA, #E6D6B2); color: #3A2A10; border-radius: 2px; box-shadow: 0 6px 14px rgba(0,0,0,.45);
  font-size: clamp(10px, 1.45vh, 13px); line-height: 1.35; opacity: calc(.35 + .65 * var(--lit));
}
.plaque .acc{ font-size: .8em; font-weight: 800; letter-spacing: .16em; color: #8C6A1C; }
.plaque b{ font-family: var(--display); font-size: 1.2em; font-weight: 700; }
.plaque em{ font-size: .9em; color: #6B5428; }

.wing-exit{
  flex: none; display: grid; gap: 8px; margin-left: 6vw; padding: 26px 28px; text-decoration: none; color: var(--cream);
  border: 1px solid rgba(231,200,115,.4); border-radius: 4px; background: rgba(0,0,0,.25); max-width: 300px;
}
.wing-exit span{ font-size: 11px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-bright); }
.wing-exit b{ font-family: var(--display); font-size: 24px; font-weight: 600; line-height: 1.15; }
.wing-exit i{ font-style: normal; font-size: 28px; color: var(--gold-bright); }

/* velvet rope along the floor */
.rope{
  position: absolute; left: 0; bottom: -14%; height: 11vh; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 80' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='b' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%236E5114'/%3E%3Cstop offset='.5' stop-color='%23FFF0BD'/%3E%3Cstop offset='1' stop-color='%23A8822C'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M8 14 Q150 64 292 14' fill='none' stroke='%237A1020' stroke-width='7' stroke-linecap='round'/%3E%3Cpath d='M8 12 Q150 60 292 12' fill='none' stroke='%23B0283A' stroke-width='2' opacity='.6'/%3E%3Crect x='4' y='8' width='8' height='70' rx='3' fill='url(%23b)'/%3E%3Ccircle cx='8' cy='8' r='7' fill='url(%23b)'/%3E%3C/svg%3E") repeat-x;
  background-size: 34vh 100%;
}

/* per-wing finishes */
.wing[data-theme="walnut"]{ --wall: #2A1C13; }
.wing[data-theme="teal"]{ --wall: #0E2A2E; }
.wing[data-theme="oxblood"]{ --wall: #34151A; }
.wing[data-theme="forest"]{ --wall: #0F2A1F; --frame: var(--f-walnut); --mat: #EFE6D2; }
.wing[data-theme="slate"]{ --wall: #141C2B; --frame: var(--f-silver); --mat: #F5F5F2; }
.wing[data-theme="modern"]{ --wall: #1B1B1D; --frame: var(--f-black); --mat: #FAFAF8; }

/* reduced motion: corridors become plain swipeable rows */
.static .wing-sticky{ position: relative; height: auto; min-height: 88vh; }
.static .wing-track{ position: relative; height: 88vh; min-height: 560px; width: 100%; overflow-x: auto; }
.static .piece{ --lit: 1; }

/* ================= SALON (flashlight room) ================= */
.salon{
  position: relative; padding: clamp(90px, 14vh, 140px) clamp(12px, 3vw, 40px) clamp(60px, 10vh, 100px);
  background:
    radial-gradient(circle at 25% 25%, rgba(231,200,115,.05) 0 2px, transparent 3px) 0 0 / 38px 38px,
    radial-gradient(circle at 75% 75%, rgba(231,200,115,.05) 0 2px, transparent 3px) 0 0 / 38px 38px,
    #3B0F14;
}
.salon-head{ max-width: 900px; margin: 0 auto clamp(40px, 7vh, 70px); text-align: center; }
.salon-head h2{ margin: 0; font-family: var(--display); font-size: clamp(38px, 6vw, 76px); line-height: 1; color: var(--paper); }
.salon-head .wing-years{ margin-top: 12px; }
.salon-head .wing-blurb{ margin: 18px auto 0; }
.salon-head .wing-actions{ justify-content: center; }
.salon-wall{
  position: relative; max-width: 1400px; margin: 0 auto; display: grid; gap: clamp(10px, 1.6vw, 22px);
  grid-template-columns: repeat(auto-fill, minmax(clamp(90px, 13vw, 180px), 1fr));
  grid-auto-rows: clamp(70px, 9vw, 130px); grid-auto-flow: dense;
}
.salon .piece{ margin: 0; transform: none; }
.salon .piece::before{ display: none; }
.salon .piece::after{ display: none; }
.salon .piece .frame{ width: 100%; height: 100%; padding: clamp(5px, .8vw, 10px); transform: none; }
.salon .piece .frame:hover{ transform: scale(1.03); }
.salon .piece .mat{ width: 100%; height: 100%; padding: clamp(4px, .7vw, 10px); }
.salon .piece .mat img{ width: 100%; height: 100%; aspect-ratio: auto; filter: none; }
.salon .piece:nth-child(3n) .frame{ background: var(--f-walnut); }
.salon .piece:nth-child(5n+1) .frame{ background: var(--f-silver); }
.salon .piece:nth-child(7n+2) .frame{ background: var(--f-black); }
.salon .s-w{ grid-column: span 2; grid-row: span 2; }
.salon .s-t{ grid-row: span 2; }
.salon .s-big{ grid-column: span 3; grid-row: span 3; }
@media (max-width: 560px){ .salon .s-big{ grid-column: span 2; grid-row: span 2; } }
.salon .plaque{ display: none; }
.salon-dark{
  position: absolute; inset: -40px; z-index: 5; pointer-events: none; transition: opacity 1.4s ease;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 30%), transparent 0, transparent clamp(90px, 12vmax, 200px), rgba(6,3,2,.55) clamp(140px, 17vmax, 290px), rgba(6,3,2,.96) clamp(220px, 26vmax, 440px));
}
.salon.lights .salon-dark{ opacity: 0; }

/* ================= FINALE: the Wall of Forty ================= */
.finale{
  position: relative; padding: clamp(90px, 14vh, 150px) clamp(12px, 3vw, 40px) clamp(60px, 10vh, 100px); text-align: center; overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 55%, #1E170D, #080604 70%);
}
.finale-kicker{ margin: 0 0 14px; font-size: 12px; font-weight: 800; letter-spacing: .34em; text-transform: uppercase; color: var(--gold-bright); }
.finale-title{ margin: 0 auto; max-width: 900px; font-family: var(--display); font-weight: 700; font-size: clamp(32px, 5.4vw, 68px); line-height: 1.05; color: var(--paper); }
.finale-title em{ display: block; font-weight: 600; color: var(--gold-pale); }
.mosaic-wrap{ position: relative; max-width: 1200px; margin: clamp(30px, 6vh, 60px) auto 0; }
.mosaic{ display: block; width: 100%; cursor: pointer; touch-action: pan-y; }
.mosaic-tip{
  position: absolute; z-index: 2; transform: translate(-50%, calc(-100% - 14px)); padding: 8px 12px; pointer-events: none; white-space: nowrap;
  border-radius: 6px; background: rgba(10,8,5,.92); border: 1px solid rgba(231,200,115,.5); font-size: 13px; font-weight: 600; color: var(--cream);
}
.finale-note{ margin: 26px auto 0; max-width: 520px; font-family: var(--display); font-style: italic; font-size: 17px; color: var(--muted); }

/* ================= EXIT ================= */
.exit{ padding: clamp(90px, 16vh, 170px) 20px clamp(40px, 8vh, 70px); text-align: center; background: linear-gradient(180deg, #080604, #0F3D2E); }
.exit-kicker{ margin: 0 0 16px; font-size: 12px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-bright); }
.exit h2{ margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(32px, 5vw, 60px); line-height: 1.1; color: var(--paper); }
.exit h2 em{ color: var(--gold-pale); font-weight: 600; }
.exit-actions{ display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 38px; }
.exit-foot{ margin: clamp(60px, 12vh, 110px) 0 0; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: rgba(250,243,228,.5); }

/* ================= EXHIBIT VIEW (lightbox) ================= */
.lbx{
  position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: auto 1fr 320px auto; align-items: center; gap: 20px; padding: 24px;
  background: radial-gradient(ellipse at 40% 45%, #241A0F, #050403 75%); animation: muFade .35s ease;
}
@keyframes muFade{ from{ opacity: 0; } }
.lbx-stage{ min-width: 0; height: 100%; display: grid; place-items: center; }
.lbx-frame{
  padding: clamp(10px, 1.6vh, 18px); background: var(--f-gold); max-height: 100%;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.35), inset 0 0 0 5px rgba(255,255,255,.18), 0 30px 80px rgba(0,0,0,.8), 0 0 120px rgba(231,200,115,.15);
}
.lbx-frame img{ max-width: 100%; max-height: calc(100vh - 110px); max-height: calc(100svh - 110px); width: auto; height: auto; border: clamp(8px, 1.6vh, 18px) solid #F4ECD8; transition: opacity .3s; }
.lbx-frame img.loading{ opacity: .6; }
.lbx-plaque{ align-self: center; padding: 22px 24px; background: linear-gradient(180deg, #F7EEDA, #E6D6B2); color: #3A2A10; border-radius: 3px; box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.lbx-plaque .acc{ margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .2em; color: #8C6A1C; }
.lbx-plaque h3{ margin: 0 0 6px; font-family: var(--display); font-size: 26px; line-height: 1.15; }
.lbx-plaque p{ margin: 0 0 4px; font-size: 14px; }
.lbx-medium{ font-style: italic; color: #6B5428; }
.lbx-count{ margin-top: 14px !important; font-size: 12px !important; font-weight: 700; letter-spacing: .14em; color: #8C6A1C; }
.lbx-close{
  position: absolute; top: 14px; right: 16px; z-index: 2; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(231,200,115,.5);
  background: rgba(0,0,0,.5); color: var(--cream); font-size: 26px; line-height: 1; cursor: pointer;
}
.lbx-nav{
  width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(231,200,115,.5); background: rgba(0,0,0,.4);
  color: var(--gold-bright); font-size: 34px; line-height: 1; cursor: pointer; transition: background .2s;
}
.lbx-nav:hover, .lbx-close:hover{ background: rgba(231,200,115,.18); }
@media (max-width: 900px){
  .lbx{ grid-template-columns: 1fr; grid-template-rows: 1fr auto; padding: 64px 12px 12px; gap: 12px; }
  .lbx-frame img{ max-height: calc(100svh - 280px); }
  .lbx-plaque{ padding: 14px 16px; }
  .lbx-plaque h3{ font-size: 20px; }
  .lbx-nav{ position: absolute; top: 40%; z-index: 2; width: 46px; height: 46px; font-size: 28px; }
  .lbx-prev{ left: 8px; } .lbx-next{ right: 8px; }
}

/* ================= ARCHIVE DRAWER ================= */
.drawer{ position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: rgba(10,8,5,.97); animation: muFade .3s ease; }
.drawer-head{ display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px clamp(16px, 3vw, 36px); border-bottom: 1px solid rgba(231,200,115,.25); }
.drawer-kicker{ margin: 0 0 4px; font-size: 11px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-bright); }
.drawer-head h3{ margin: 0; font-family: var(--display); font-size: clamp(22px, 3vw, 32px); color: var(--paper); }
.drawer-head .lbx-close{ position: static; flex: none; }
.drawer-grid{ flex: 1; overflow-y: auto; padding: clamp(14px, 3vw, 32px); display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); align-content: start; }
.drawer-grid button{ position: relative; display: block; height: 0; padding: 0 0 75%; border: 0; cursor: zoom-in; overflow: hidden; border-radius: 4px; background: #221B14; }
.drawer-grid img{ position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .5s var(--ease); }
.drawer-grid button:hover img{ transform: scale(1.06); }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
