/* Design tokens - locked off the museum-wall lane + ui-ux-pro-max "gallery" recommendation */
:root {
  --wall-top: #BBB19F;
  --wall-bottom: #998E7A;
  --rail: #6E6350;
  --baseboard: #241C15;
  --label-bg: #F3EEE1;
  --label-edge: rgba(28, 23, 18, 0.16);
  --ink: #1C1712;
  --ink-soft: #4B443A;
  --ink-faint: #7A6F5D;
  --brass: #B8892B;
  --accent: #CCFF00;
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 48px;
  --sp-6: 64px;
  --radius: 2px;
  --font-serif: 'Old Standard TT', Georgia, 'Times New Roman', serif;
  --font-mono: 'PT Mono', 'Courier New', monospace;
}

@font-face {
  font-family: 'Old Standard TT';
  src: url('fonts/old-standard-tt/old-standard-tt-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Old Standard TT';
  src: url('fonts/old-standard-tt/old-standard-tt-latin-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Old Standard TT';
  src: url('fonts/old-standard-tt/old-standard-tt-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PT Mono';
  src: url('fonts/pt-mono/pt-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-serif);
  color: var(--ink);
  background: var(--wall-bottom);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.room { display: flex; flex-direction: column; min-height: 100vh; }

.wall {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-6);
  padding: var(--sp-6) var(--sp-4) var(--sp-5);
  background: linear-gradient(180deg, var(--wall-top) 0%, var(--wall-bottom) 100%);
  overflow: hidden;
}

.rail {
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(180deg, var(--rail) 0%, rgba(110, 99, 80, 0.35) 100%);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.spotlight {
  position: absolute;
  top: -10%;
  left: 50%;
  width: min(70vw, 900px);
  height: 60%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at top, rgba(255, 244, 214, 0.5) 0%, rgba(255, 244, 214, 0) 65%);
  animation: breathe 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes breathe {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .spotlight { animation: none; opacity: 0.85; }
}

.hang { position: relative; flex: 0 0 auto; }

.wire { position: absolute; top: -52px; left: 50%; width: 0; height: 0; }
.wire::before, .wire::after {
  content: '';
  position: absolute;
  top: 0;
  width: 1px;
  height: 52px;
  background: rgba(184, 137, 43, 0.5);
  transform-origin: top center;
}
.wire::before { left: -1px; transform: rotate(19deg); }
.wire::after { left: 1px; transform: rotate(-19deg); }

.painting {
  display: block;
  width: min(58vw, 460px);
  height: auto;
  aspect-ratio: 1 / 1;
  box-shadow: 10px 14px 0 rgba(0, 0, 0, 0.28);
}

.label {
  align-self: flex-end;
  margin-bottom: 4%;
  width: min(86vw, 300px);
  background: var(--label-bg);
  border: 1px solid var(--label-edge);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.18);
  padding: var(--sp-3);
  position: relative;
}
.label:focus { outline: 2px solid var(--brass); outline-offset: 2px; }

.label-tag {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.label-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 4px rgba(204, 255, 0, 0.7); }

.label-title { font-style: italic; font-weight: 700; font-size: 27px; margin: 0 var(--sp-4) 2px 0; line-height: 1.15; }
.label-attrib { font-style: italic; font-size: 12.5px; color: var(--ink-soft); margin: 0 0 var(--sp-3); }

.label-facts { margin: 0 0 var(--sp-3); border-top: 1px solid var(--label-edge); padding-top: var(--sp-2); }
.label-facts > div { display: flex; justify-content: space-between; gap: var(--sp-2); padding: 3px 0; }
.label-facts dt { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); }
.label-facts dd { margin: 0; font-size: 13px; text-align: right; color: var(--ink); }

.label-note { font-size: 14px; line-height: 1.5; margin: 0 0 var(--sp-2); }

.label-provenance {
  font-size: 12.5px;
  font-style: italic;
  color: var(--ink-soft);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  transition: max-height 0.35s ease, opacity 0.35s ease, margin 0.35s ease;
}
.label:hover .label-provenance,
.label:focus-within .label-provenance,
.label.revealed .label-provenance {
  max-height: 60px;
  opacity: 1;
  margin: var(--sp-2) 0 0;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  border-top: 1px solid var(--label-edge);
  padding-top: var(--sp-2);
  margin-top: var(--sp-2);
}
.label-row .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); }
.label-row .v { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink); }

.label-cat {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.ca {
  display: block;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  background: none;
  border: none;
  border-bottom: 1px dashed var(--ink-faint);
  padding: 2px 0;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}
.ca:hover, .ca:focus { color: var(--brass); border-bottom-color: var(--brass); }

.label-hint {
  margin: var(--sp-2) 0 0;
  font-size: 10.5px;
  font-style: italic;
  color: var(--ink-faint);
  text-align: right;
}

.baseboard { height: 22px; background: var(--baseboard); }

.signage {
  background: var(--baseboard);
  color: #EDE7D8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  font-family: var(--font-serif);
}

.next-gallery {
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(237, 231, 216, 0.4);
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.next-gallery:hover { background: rgba(237, 231, 216, 0.1); border-color: var(--brass); }

.donor { color: #C9A45C; display: flex; }
.donor:hover { color: var(--accent); }

@media (max-width: 720px) {
  .wall { flex-direction: column; gap: var(--sp-4); padding: var(--sp-5) var(--sp-2) var(--sp-3); }
  .painting { width: min(78vw, 340px); }
  .label { align-self: center; margin-bottom: 0; width: min(92vw, 340px); }
  .wire { display: none; }
  .signage { flex-wrap: wrap; padding: var(--sp-2) var(--sp-3); }
}
