/* ═══════════════════════════════════════════════════════════════
   ArtID Museum Template — style.css  (v2)

   A pure-CSS gallery interior. No frameworks. Long-form by design.
   Renders core content without JS. Respects prefers-reduced-motion
   everywhere.  Editorial dark UI with restrained museum motion.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* ── Palette ─────────────────────────────────────────────── */
  --wall-0:        #050505;
  --wall-1:        #0a0908;
  --wall-2:        #100e0c;
  --wall-3:        #16130f;
  --shadow:        #030303;
  --parchment:     #ece4d2;
  --parchment-dim: #b8aa8e;
  --parchment-low: #6a6151;
  --gold:          #c8a35a;
  --gold-soft:     #d8b977;
  --gold-bright:   #f0d989;
  --rule:          rgba(200, 163, 90, 0.18);
  --rule-soft:     rgba(200, 163, 90, 0.10);

  /* ── Typography ──────────────────────────────────────────── */
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-ui:      "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  /* ── Geometry ────────────────────────────────────────────── */
  --max:          1180px;
  --rad-frame:    2px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  font-weight: 300;
  color: var(--parchment);
  background: var(--wall-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* Dim the hall when the lightbox is open (controlled via a body class) */
  --hall-dim: 1;
}
body.is-lightbox-open { --hall-dim: 0.18; }
body.is-lightbox-open .hall *:not(.lightbox):not(.lightbox *) { transition: filter 0.5s ease, opacity 0.5s ease; }

a { color: inherit; }
.mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: 0.02em; }


/* ════════════════════════════════════════════════════════════════
   THE HALL — first viewport, the gallery interior
   ════════════════════════════════════════════════════════════════ */

.hall {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  background:
    radial-gradient(ellipse at 50% 0%, var(--wall-3) 0%, var(--wall-1) 55%, var(--shadow) 100%);
  overflow: hidden;
  isolation: isolate;
  padding: 32px 24px 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  /* Hook for lightbox dim */
  filter: brightness(var(--hall-dim));
  transition: filter 0.5s ease;
}

/* ─── Ambient atmosphere layers ─── */

.ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Main spotlight cone — soft, breathing, never twitching */
.spotlight {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  mix-blend-mode: screen;
  opacity: 0.55;
  animation: lampBreathe 14s ease-in-out infinite;
}
.spotlight--main {
  width: 70vw; height: 75vh;
  left: 50%; top: -12%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side,
    rgba(255, 224, 162, 0.42),
    rgba(255, 205, 128, 0.14) 50%,
    transparent 75%);
}
.spotlight--left {
  width: 42vw; height: 52vh;
  left: -12%; top: 8%;
  background: radial-gradient(closest-side,
    rgba(180, 140, 80, 0.20),
    transparent 70%);
  animation-duration: 17s;
  animation-delay: -3s;
}
.spotlight--right {
  width: 42vw; height: 52vh;
  right: -12%; top: 8%;
  background: radial-gradient(closest-side,
    rgba(180, 140, 80, 0.20),
    transparent 70%);
  animation-duration: 19s;
  animation-delay: -7s;
}

/* Imperceptible, slow breath — never below 0.48 so it never reads as flicker */
@keyframes lampBreathe {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.48; }
}

/* Polished marble floor */
.floor {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 32%;
  background:
    linear-gradient(to bottom,
      transparent 0%,
      rgba(0,0,0,0.32) 30%,
      rgba(0,0,0,0.72) 100%),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.014) 0px,
      rgba(255,255,255,0.014) 2px,
      transparent 2px,
      transparent 96px
    );
  border-top: 1px solid rgba(200, 163, 90, 0.08);
}
.floor::after {
  content: "";
  position: absolute;
  left: 50%; top: 0;
  width: 44%; height: 100%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at top, rgba(255, 220, 160, 0.07), transparent 70%);
}

/* Almost-imperceptible wall grain (SVG noise) */
.wall-grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.55;
}

/* ─── Dust motes ─── Spatially-constrained to the spotlight cone.
   A field of tiny dots drifting up, only visible where the cone is bright.
   Uses a mask to confine them, so motes outside the cone never appear. */
.dust {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* The mote field itself — a layered set of radial dots at different positions */
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,232,180,0.55), transparent 60%),
    radial-gradient(1px 1px at 28% 64%, rgba(255,232,180,0.45), transparent 60%),
    radial-gradient(1.2px 1.2px at 44% 36%, rgba(255,232,180,0.6), transparent 60%),
    radial-gradient(1px 1px at 58% 78%, rgba(255,232,180,0.45), transparent 60%),
    radial-gradient(1.5px 1.5px at 67% 22%, rgba(255,232,180,0.5), transparent 60%),
    radial-gradient(1px 1px at 81% 52%, rgba(255,232,180,0.5), transparent 60%),
    radial-gradient(1px 1px at 92% 86%, rgba(255,232,180,0.4), transparent 60%),
    radial-gradient(1.2px 1.2px at 36% 8%, rgba(255,232,180,0.5), transparent 60%);
  background-size: 100% 200%;
  background-repeat: no-repeat;
  /* Mask: motes only visible inside the spotlight cone (top-center radial) */
  -webkit-mask-image: radial-gradient(ellipse 55% 65% at 50% 25%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 55% 65% at 50% 25%, #000 30%, transparent 75%);
  animation: dustDrift 28s linear infinite;
  opacity: 0.85;
}
@keyframes dustDrift {
  from { background-position: 0 0; }
  to   { background-position: 0 -100%; }
}


/* ─── Top bar ─── */

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 8px 0 0;
  color: var(--parchment-dim);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.32em;
  font-weight: 500;
  text-transform: none;
}
.brand:hover { color: var(--gold-soft); }
.brand svg { opacity: 0.85; }
.hall-meta {
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.hall-meta__label { color: var(--parchment-low); }
.hall-meta__value {
  font-family: var(--font-mono);
  color: var(--parchment);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}


/* ════════════════════════════════════════════════════════════════
   THE EXHIBIT — framed artwork + wall card, the centerpiece
   ════════════════════════════════════════════════════════════════ */

.exhibit {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: center;
  justify-items: center;
  gap: 48px;
  padding: 60px 0 80px;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
}

@media (max-width: 900px) {
  .exhibit { grid-template-columns: 1fr; gap: 32px; padding: 40px 0 60px; }
}

.frame {
  position: relative;
  max-width: 560px;
  width: 100%;
  cursor: zoom-in;
  animation: frameEnter 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  filter:
    drop-shadow(0 36px 70px rgba(0,0,0,0.7))
    drop-shadow(0 10px 18px rgba(0,0,0,0.55));
  justify-self: end;
}
@media (max-width: 900px) { .frame { justify-self: center; } }

/* Left rail — Permanent Collection accession label */
.rail {
  position: absolute;
  left: -78px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  pointer-events: none;
  opacity: 0;
  animation: railIn 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.6s forwards;
}
.rail__top, .rail__acc {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(200, 163, 90, 0.7);
  white-space: nowrap;
}
.rail__acc {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(232, 220, 199, 0.45);
  text-transform: none;
}
.rail__rule {
  display: block;
  width: 1px;
  height: 90px;
  background: linear-gradient(180deg, transparent, rgba(200, 163, 90, 0.55) 50%, transparent);
}
@keyframes railIn {
  from { opacity: 0; transform: translate(-12px, -50%); }
  to   { opacity: 1; transform: translate(0, -50%); }
}
@media (max-width: 1100px) {
  .rail { left: -54px; gap: 12px; }
  .rail__rule { height: 60px; }
}
@media (max-width: 900px) {
  .rail { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rail { animation: none; opacity: 1; }
}

@keyframes frameEnter {
  from { opacity: 0; transform: translateY(28px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ─── Picture lights ─── Two brass fixtures mounted above the frame,
   casting warm overlapping cones down onto the upper portion of the work.
   Subtle by default — never compete with the room's main spotlight. */
.frame__lights {
  position: absolute;
  left: -6%;
  right: -6%;
  top: -110px;
  height: 380px;
  pointer-events: none;
  z-index: 2; /* above frame__matte gradient, below the art image's hover */
  overflow: visible;
  /* Slow breath in sync with main lamp — never below 0.78 so never reads as flicker */
  animation: picturelightBreathe 14s ease-in-out infinite;
}
@keyframes picturelightBreathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.82; }
}

/* The cone — a single radial gradient creates a natural beam that spreads from
   above the element and tapers downward. No clip-path needed; the gradient IS
   the shape. Combined with mix-blend-mode: screen, it reads as projected light. */
.frame__lights .cone {
  position: absolute;
  top: 22px;
  width: 220px;
  height: 360px;
  background: radial-gradient(ellipse 70% 100% at 50% -8%,
    rgba(255, 238, 192, 0.90) 0%,
    rgba(255, 230, 172, 0.62) 14%,
    rgba(255, 222, 156, 0.36) 28%,
    rgba(255, 214, 144, 0.18) 46%,
    rgba(255, 212, 142, 0.07) 66%,
    rgba(255, 210, 140, 0.018) 84%,
    transparent 100%);
  filter: blur(2px);
  mix-blend-mode: screen;
}
.frame__lights .cone--left  { left: 18%;  transform: rotate(7deg);  transform-origin: top center; }
.frame__lights .cone--right { right: 18%; transform: rotate(-7deg); transform-origin: top center; }

/* The brass mount: small bar + arm + wall anchor */
.frame__lights .lamp {
  position: absolute;
  top: 0;
  width: 38px;
  height: 13px;
  background: linear-gradient(180deg, #e0c181 0%, #c8a35a 35%, #8e6f37 70%, #4d3a18 100%);
  border-radius: 3px 3px 5px 5px;
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 175, 0.7),
    inset 0 -1px 0 rgba(0,0,0,0.6),
    0 3px 6px rgba(0,0,0,0.7),
    0 0 14px rgba(255, 220, 162, 0.18);
}
.frame__lights .lamp::before {
  /* arm connecting mount to wall */
  content: "";
  position: absolute;
  top: -14px; left: 50%;
  width: 2px; height: 16px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #8e6f37 0%, #c8a35a 100%);
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
}
.frame__lights .lamp::after {
  /* wall plate */
  content: "";
  position: absolute;
  top: -18px; left: 50%;
  width: 18px; height: 5px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #c8a35a, #4d3a18);
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.6);
}
.frame__lights .lamp--left  { left:  calc(16% + 80px); }
.frame__lights .lamp--right { right: calc(16% + 80px); }

@media (max-width: 768px) {
  .frame__lights { top: -90px; }
  .frame__lights .cone { width: 170px; height: 260px; }
  .frame__lights .lamp--left  { left:  calc(16% + 56px); }
  .frame__lights .lamp--right { right: calc(16% + 56px); }
}

/* Gilded carved frame — locked v1. Layered gradients = the gold molding. */
.frame__matte {
  position: relative;
  padding: 24px;
  background:
    linear-gradient(135deg,
      #c8a35a 0%,
      #8e6f37 22%,
      #e0c181 50%,
      #6e5424 78%,
      #c8a35a 100%);
  border-radius: var(--rad-frame);
  box-shadow:
    inset 0 0 0 1px rgba(255, 220, 150, 0.65),
    inset 0 0 0 4px rgba(0, 0, 0, 0.4),
    inset 0 0 0 5px rgba(255, 220, 150, 0.28),
    inset 0 0 36px rgba(0, 0, 0, 0.6);
}
.frame__matte::before,
.frame__matte::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-radius: var(--rad-frame);
}
.frame__matte::before { inset: 9px;  border-color: rgba(255, 220, 150, 0.28); }
.frame__matte::after  { inset: 15px; border-color: rgba(0, 0, 0, 0.65); }

.frame__art {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.5);
  /* very subtle warm tint from the spotlight, kept under 4% so artwork colors stay true */
  filter: contrast(1.01);
}

/* Title plaque under the frame — the brief calls for monumental restraint */
.plaque {
  position: relative;
  margin: 22px auto 0;
  max-width: 86%;
  padding: 14px 22px 16px;
  background: linear-gradient(180deg, #1a1714, #110e0b);
  border: 1px solid var(--rule);
  border-top: 1px solid rgba(200, 163, 90, 0.4);
  box-shadow: 0 8px 24px rgba(0,0,0,0.7);
  text-align: center;
}
.plaque__title {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--parchment);
  letter-spacing: 0.02em;
  font-style: italic;
  font-weight: 400;
}
.plaque__sub {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
}


/* ════════════════════════════════════════════════════════════════
   THE WALL CARD — Creator plaque, set beside the artwork
   New in v2: precise typography, generous whitespace, real-museum feel.
   ════════════════════════════════════════════════════════════════ */

.wallcard {
  position: relative;
  width: 100%;
  max-width: 280px;
  padding: 28px 26px 28px;
  background: linear-gradient(180deg, rgba(20,17,13,0.92), rgba(12,10,8,0.92));
  border: 1px solid var(--rule);
  border-top: 1px solid rgba(200, 163, 90, 0.42);
  box-shadow:
    0 16px 40px rgba(0,0,0,0.55),
    inset 0 0 0 1px rgba(255,255,255,0.02);
  animation: cardEnter 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s both;
  justify-self: start;
}
@media (max-width: 900px) { .wallcard { justify-self: center; max-width: 86vw; } }

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wallcard__eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.wallcard__title {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.15;
  color: var(--parchment);
  letter-spacing: -0.005em;
  font-weight: 400;
  margin-bottom: 4px;
}
.wallcard__byline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--parchment-dim);
  margin-bottom: 22px;
}
.wallcard__rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule), transparent);
  margin: 0 0 18px;
}
.wallcard__rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wallcard__row {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: baseline;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.wallcard__label {
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--parchment-low);
  padding-top: 2px;
}
.wallcard__value {
  color: var(--parchment);
  font-size: 12px;
}
.wallcard__value .mono { color: var(--parchment); }

/* Hover-expand contract address: short by default, full slides in on hover */
.addr {
  position: relative;
  display: inline-block;
  cursor: help;
}
.addr__short { display: inline; }
.addr__full {
  display: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0;
  color: var(--gold-soft);
  word-break: break-all;
}
.addr:hover .addr__short,
.addr:focus-visible .addr__short { display: none; }
.addr:hover .addr__full,
.addr:focus-visible .addr__full { display: inline; }

.wallcard__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  padding: 10px 14px;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border: 1px solid var(--rule);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.wallcard__link:hover {
  border-color: var(--gold);
  color: var(--gold-soft);
  background: rgba(200, 163, 90, 0.04);
}

.wallcard__x {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(200, 163, 90, 0.25);
  padding-bottom: 1px;
  transition: color 0.25s, border-color 0.25s;
}
.wallcard__x:hover {
  color: var(--gold-soft);
  border-bottom-color: var(--gold);
}


/* ─── Scroll cue ─── */

.scroll-cue {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--parchment-dim);
  font-size: 9px;
  letter-spacing: 0.46em;
  text-transform: uppercase;
  padding-bottom: 28px;
  animation: cueBob 3.2s ease-in-out infinite;
}
@keyframes cueBob {
  0%, 100% { transform: translateY(0);   opacity: 0.6; }
  50%      { transform: translateY(8px); opacity: 0.95; }
}


/* ════════════════════════════════════════════════════════════════
   THE VISITORS — silhouettes that walk, pause, and photograph
   v2: subtle weight-shifts (not bobs), longer pauses, slower paths.
   ════════════════════════════════════════════════════════════════ */

.visitors {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.visitor {
  position: absolute;
  bottom: 6%;
  width: 70px;
  height: 180px;
  /* Silhouette */
  background:
    radial-gradient(circle at 50% 8%, rgba(0,0,0,0.94) 0 17px, transparent 18px),
    radial-gradient(ellipse 38% 8% at 50% 23%, rgba(0,0,0,0.94) 60%, transparent 62%),
    linear-gradient(to bottom,
      transparent 14%,
      rgba(0,0,0,0.88) 22%,
      rgba(0,0,0,0.88) 70%,
      transparent 72%),
    linear-gradient(to right,
      transparent 38%,
      rgba(0,0,0,0.88) 40%,
      rgba(0,0,0,0.88) 47%,
      transparent 49%,
      transparent 51%,
      rgba(0,0,0,0.88) 53%,
      rgba(0,0,0,0.88) 60%,
      transparent 62%);
  background-repeat: no-repeat;
  filter: blur(0.4px);
  opacity: 0.85;
  /* transform-origin at feet for natural weight shift */
  transform-origin: 50% 100%;
}

/* Tiny pinpoint of light where the camera/phone is held */
.visitor__camera {
  position: absolute;
  top: 38%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 235, 180, 0.55);
  box-shadow: 0 0 4px rgba(255, 235, 180, 0.45);
  transform: translateX(-50%);
  transition: background 0.05s linear, box-shadow 0.05s linear;
}
.visitor.is-flashing .visitor__camera {
  background: #fffce8;
  box-shadow:
    0 0 14px 5px rgba(255, 252, 232, 0.95),
    0 0 40px 14px rgba(255, 240, 180, 0.65);
}

/* Depth: far visitors smaller, dimmer, blurrier */
.visitor--far  { transform: scale(0.55); opacity: 0.42; filter: blur(1.4px); }
.visitor--mid  { transform: scale(0.76); opacity: 0.62; filter: blur(0.8px); }
.visitor--near { transform: scale(1);    opacity: 0.86; filter: blur(0.4px); }

/* ─── Walking — long pauses so it feels like contemplation, not a treadmill ─── */
@keyframes walkPathA {
  0%   { left: -10%; }
  30%  { left: 28%;  }
  55%  { left: 28%;  } /* 25% pause */
  100% { left: 110%; }
}
@keyframes walkPathB {
  0%   { left: 110%; }
  35%  { left: 58%;  }
  62%  { left: 58%;  } /* 27% pause to photograph */
  100% { left: -10%; }
}
@keyframes walkPathC {
  0%   { left: -10%; }
  45%  { left: 72%;  }
  68%  { left: 72%;  }
  100% { left: 110%; }
}

/* Idle weight shift — applied while paused, but always-on at low amplitude.
   Subtle scaleY pulse + tiny rotate, NOT a vertical bob. */
@keyframes weightShift {
  0%, 100% { transform: var(--scale, scale(1)) skewX(0deg) translateY(0); }
  50%      { transform: var(--scale, scale(1)) skewX(0.15deg) translateY(0.5px); }
}

.visitor--a { animation: walkPathA 62s linear infinite, weightShift 5.2s ease-in-out infinite; }
.visitor--b { animation: walkPathB 74s linear infinite, weightShift 6.1s ease-in-out infinite;
              animation-delay: -12s, 0s; }
.visitor--c { animation: walkPathC 84s linear infinite, weightShift 4.7s ease-in-out infinite;
              animation-delay: -34s, -2s; }
.visitor--d { animation: walkPathA 96s linear infinite, weightShift 5.6s ease-in-out infinite;
              animation-delay: -22s, -3s; }
.visitor--e { animation: walkPathB 70s linear infinite, weightShift 5.9s ease-in-out infinite;
              animation-delay: -46s, -1s; }

/* Per-depth scale lives on a custom property so weightShift can preserve it */
.visitor--far  { --scale: scale(0.55); }
.visitor--mid  { --scale: scale(0.76); }
.visitor--near { --scale: scale(1); }


/* ════════════════════════════════════════════════════════════════
   THE FLASH — a real shutter: overexposure, fast decay, secondary pop
   ════════════════════════════════════════════════════════════════ */

.flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 40vw 38vh at var(--flash-x, 50%) var(--flash-y, 60%),
              rgba(255, 253, 240, 1) 0%,
              rgba(255, 248, 220, 0.72) 6%,
              rgba(255, 240, 196, 0.32) 14%,
              rgba(255, 230, 170, 0.10) 24%,
              transparent 38%);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
  mix-blend-mode: screen;
}

/* Shutter curve:
     1) instant overexposure (white core blows out for 40-60ms)
     2) sharp drop to ~25%
     3) brief secondary pop (mechanical iris re-opening)
     4) slow fade back to dark
   Total cycle ~600ms — feels like a real DSLR. */
.flash.is-firing {
  animation: shutter 620ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
@keyframes shutter {
  0%   { opacity: 0; }
  3%   { opacity: 1; }      /* overexposure */
  10%  { opacity: 0.96; }
  14%  { opacity: 0.22; }   /* iris closes */
  20%  { opacity: 0.65; }   /* secondary pop */
  28%  { opacity: 0.18; }
  100% { opacity: 0; }      /* slow fade */
}


/* ════════════════════════════════════════════════════════════════
   THE PASSPORT — second viewport, metadata as a curated catalog
   ════════════════════════════════════════════════════════════════ */

.passport {
  position: relative;
  background:
    linear-gradient(180deg, var(--shadow) 0%, var(--wall-2) 30%, var(--wall-2) 100%);
  padding: 140px 24px 96px;
}
.passport::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule), transparent);
}

.passport__inner {
  max-width: 860px;
  margin: 0 auto;
}

.passport__heading {
  text-align: center;
  margin-bottom: 96px;
}

.eyebrow {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.46em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  color: var(--parchment);
  font-size: clamp(40px, 6.4vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 28px;
  text-wrap: balance;
}

.lede {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 20px;
  line-height: 1.7;
  color: var(--parchment-dim);
  max-width: 620px;
  margin: 0 auto;
  text-wrap: pretty;
}

/* Block separator: thin gold rule with ❦ ornament */
.block {
  position: relative;
  margin-bottom: 88px;
}
.block::before {
  content: "❦";
  display: block;
  text-align: center;
  color: var(--gold);
  font-size: 20px;
  margin-bottom: 32px;
  opacity: 0.55;
}

.block__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.46em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin-bottom: 40px;
}


/* ─── Traits ─── */

.traits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.trait {
  position: relative;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.014);
  border: 1px solid var(--rule);
  transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
}
.trait:hover {
  background: rgba(200, 163, 90, 0.05);
  border-color: rgba(200, 163, 90, 0.45);
  transform: translateY(-2px);
}
.trait__type {
  display: block;
  font-size: 9px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.trait__value {
  font-family: var(--font-display);
  font-size: 21px;
  color: var(--parchment);
  font-style: italic;
  line-height: 1.2;
}
.trait__rarity {
  display: block;
  font-size: 10px;
  color: var(--parchment-low);
  margin-top: 8px;
  letter-spacing: 0.06em;
}


/* ─── Ledger (on-chain provenance) ─── */

.ledger {
  border-top: 1px solid var(--rule);
}
.ledger__row {
  display: grid;
  grid-template-columns: 200px 1fr;
  padding: 22px 4px;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
  gap: 16px;
}
.ledger__row dt {
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--parchment-low);
}
.ledger__row dd {
  color: var(--parchment);
  word-break: break-all;
  font-size: 14px;
}
.ledger__row dd a {
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.3s;
}
.ledger__row dd a:hover { border-bottom-color: var(--gold); }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
  justify-content: center;
}
.btn-link {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  padding: 14px 26px;
  border: 1px solid var(--rule);
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}
.btn-link:hover {
  border-color: var(--gold);
  background: rgba(200, 163, 90, 0.05);
  color: var(--gold-soft);
}


/* ─── Timeline ─── */

.timeline {
  list-style: none;
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 8px; bottom: 8px;
  width: 1px;
  background: var(--rule);
}
.timeline__item {
  position: relative;
  margin-bottom: 36px;
  padding-left: 14px;
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: -28px; top: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 163, 90, 0.18);
}
.timeline__item--placeholder::before {
  background: transparent;
  border: 1px solid var(--rule);
  box-shadow: none;
}
.timeline__year {
  display: block;
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.timeline__item strong {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--parchment);
  font-size: 21px;
  margin-bottom: 6px;
}
.timeline__item p {
  color: var(--parchment-dim);
  font-size: 14px;
  line-height: 1.75;
}


/* ════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════ */

.foot {
  background: var(--shadow);
  padding: 48px 24px 40px;
  border-top: 1px solid var(--rule);
}
.foot__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.foot__mark {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.42em;
  color: var(--gold);
  margin-bottom: 6px;
}
.foot__line {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--parchment-dim);
}
.foot__line a {
  color: var(--parchment);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.foot__cid {
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--parchment-dim);
}
.foot__cid-label {
  color: var(--gold);
  margin-right: 10px;
}


/* ════════════════════════════════════════════════════════════════
   LIGHTBOX — when the artwork is zoomed, the hall dims behind
   ════════════════════════════════════════════════════════════════ */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(3, 3, 3, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 56px;
  /* No blur — clean dim, more cinematic */
}
.lightbox.is-open { display: flex; animation: lbFade 0.4s ease; }
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow:
    0 40px 100px rgba(0,0,0,0.9),
    0 0 0 1px rgba(200, 163, 90, 0.3);
  animation: lbZoom 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.lightbox__close {
  position: absolute;
  top: 28px; right: 36px;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--parchment);
  width: 44px; height: 44px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.lightbox__close:hover { border-color: var(--gold); color: var(--gold); }
.lightbox__caption {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--parchment-dim);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.06em;
}

@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbZoom { from { transform: scale(0.97); opacity: 0; } to { transform: scale(1); opacity: 1; } }


/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .hall { padding: 20px 16px 0; }
  .frame { max-width: 92vw; }
  .plaque { max-width: 100%; padding: 12px 16px; }
  .plaque__title { font-size: 19px; }
  .topbar { font-size: 10px; flex-direction: column; gap: 10px; align-items: flex-start; }
  .passport { padding: 96px 20px 64px; }
  .ledger__row { grid-template-columns: 1fr; gap: 6px; }
  .ledger__row dt { font-size: 10px; }
  .traits { grid-template-columns: 1fr 1fr; }
  .visitor { width: 50px; height: 130px; }
  .wallcard { padding: 24px 22px; }
}


/* ════════════════════════════════════════════════════════════════
   REDUCED MOTION — kill everything kinetic, keep the design intact
   ════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .flash    { display: none !important; }
  .visitors { display: none !important; }
  .dust     { display: none !important; }
  .frame__lights { animation: none !important; }
  .scroll-cue { animation: none; }
}
