/* ============================================================
   SPECIMEN/4 — base: reset, type system, exhibition chrome
   ============================================================ */

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

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

body {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.55;
  background: var(--room-bg);
  color: var(--room-ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
}

/* room pages carry a fixed injected header — clear it */
body[data-room] { padding-top: var(--header-h); }

img, svg, video, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection { background: var(--room-accent); color: var(--room-bg); }

:focus-visible {
  outline: 2px solid var(--room-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ------------------------------------------------------------
   Exhibition typographic chrome
   ------------------------------------------------------------ */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9em;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 1.25rem;
  height: 1px;
  background: var(--room-accent);
}

.room-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 780;
  font-stretch: 90%;
  line-height: 0.92;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.exhibit-note {
  max-width: 55ch;
  font-size: var(--text-md);
  line-height: 1.6;
  color: color-mix(in srgb, var(--room-ink) 80%, var(--room-bg));
}

/* ------------------------------------------------------------
   Fixed header (injected by nav.js on room pages;
   the lobby writes the same markup statically)
   ------------------------------------------------------------ */

.s4-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: 0 var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--room-bg) 80%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.s4-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.s4-room-label {
  color: var(--ink-soft);
  white-space: nowrap;
}
.s4-room-label em {
  font-style: normal;
  color: var(--room-accent);
}

.s4-index-link {
  color: var(--ink-soft);
  transition: color 0.25s var(--ease-page);
}
.s4-index-link:hover { color: var(--room-accent); }

/* ------------------------------------------------------------
   Next-room footer band (injected by nav.js)
   ------------------------------------------------------------ */

.s4-footer {
  border-top: 1px solid var(--hairline);
  margin-top: var(--space-10);
}

.s4-footer a {
  display: block;
  padding: var(--space-8) var(--space-6) var(--space-9);
  transition: background 0.35s var(--ease-page), color 0.35s var(--ease-page);
}

.s4-footer-title {
  display: block;
  margin-top: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 760;
  font-stretch: 92%;
  line-height: 1;
  letter-spacing: -0.01em;
}

.s4-footer .s4-arrow {
  display: inline-block;
  transition: transform 0.35s var(--ease-page);
}

.s4-footer a:hover,
.s4-footer a:focus-visible {
  background: var(--room-accent);
  color: var(--room-bg);
}
.s4-footer a:hover .eyebrow,
.s4-footer a:focus-visible .eyebrow {
  color: var(--room-bg);
}
.s4-footer a:hover .eyebrow::before,
.s4-footer a:focus-visible .eyebrow::before {
  background: var(--room-bg);
}
.s4-footer a:hover .s4-arrow,
.s4-footer a:focus-visible .s4-arrow {
  transform: translateX(0.35em);
}

@media (max-width: 640px) {
  .s4-header { padding: 0 var(--space-4); }
  .s4-label-title { display: none; }
  .s4-footer a { padding: var(--space-7) var(--space-4) var(--space-8); }
}

/* ------------------------------------------------------------
   Reduced motion: kill CSS-driven ambience globally.
   (JS-driven motion is gated per page via matchMedia.)
   ------------------------------------------------------------ */

@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;
  }
}
