/* THE AGENTIC MUSEUM — night wing design system
   Curated by Neon. Palette: ink, aged ivory, brass. Type: Fraunces + Instrument Sans. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..700;1,9..144,300..600&family=Instrument+Sans:ital,wght@0,400..600;1,400&display=swap');

:root {
  --ink: #131015;
  --ink-2: #1a161d;
  --ink-3: #221d26;
  --ivory: #efe7d6;
  --ivory-dim: #a89f8c;
  --ivory-ghost: rgba(239, 231, 214, .55);
  --brass: #c9a35c;
  --brass-dim: rgba(201, 163, 92, .38);
  --oxblood: #9a4a38;
  --hairline: rgba(239, 231, 214, .14);
  --hairline-soft: rgba(239, 231, 214, .08);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", sans-serif;
  --placard-w: 1140px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Grain overlay — the museum is never fully lit */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--brass); color: var(--ink); }

a { color: var(--brass); text-decoration: none; }
a:hover { color: var(--ivory); }

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

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  max-width: var(--placard-w);
  margin: 0 auto;
  padding: 26px 28px 0;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}
.topbar .wordmark {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .12em;
  color: var(--ivory);
  font-style: italic;
}
.topbar a { color: var(--ivory-dim); }
.topbar a:hover { color: var(--brass); }

/* ---------- placards & type ---------- */

.wrap { max-width: var(--placard-w); margin: 0 auto; padding: 0 28px; }

.meta {
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--brass);
}

h1.display {
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(52px, 9vw, 118px);
  line-height: .98;
  letter-spacing: -.015em;
  font-variation-settings: "opsz" 144;
}

h2.room-title {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.06;
  font-variation-settings: "opsz" 100;
}

.lede {
  font-family: var(--serif);
  font-weight: 340;
  font-style: italic;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.5;
  color: var(--ivory-ghost);
}

.prose p { margin-bottom: 1.15em; max-width: 66ch; }
.prose em { color: var(--brass); font-style: italic; }

.rule { border: 0; border-top: 1px solid var(--hairline); margin: 0; }

/* ---------- audio guide ---------- */

.guide {
  border: 1px solid var(--hairline);
  background: var(--ink-2);
  padding: 16px 20px 14px;
  margin: 34px 0;
}
.guide .guide-label {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  margin-bottom: 10px;
}
.guide .guide-label b { color: var(--brass); font-weight: 600; }
.guide audio { width: 100%; height: 34px; filter: invert(.92) hue-rotate(180deg) saturate(.4); }

/* ---------- reveal ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.rise { opacity: 0; animation: rise .9s cubic-bezier(.2,.6,.2,1) forwards; }
.rise.d1 { animation-delay: .12s; } .rise.d2 { animation-delay: .26s; }
.rise.d3 { animation-delay: .42s; } .rise.d4 { animation-delay: .58s; }
.rise.d5 { animation-delay: .74s; } .rise.d6 { animation-delay: .9s; }

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ---------- halls / exhibit cards ---------- */

.hall-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin: 84px 0 26px;
  flex-wrap: wrap;
}
.hall-head .hall-no {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--brass);
}
.hall-head h2 {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(24px, 3vw, 34px);
}
.hall-head .hall-sub { color: var(--ivory-dim); font-size: 14px; margin-left: auto; text-align: right; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--hairline);
  background: linear-gradient(170deg, var(--ink-2), var(--ink) 70%);
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  color: var(--ivory);
  transition: transform .45s cubic-bezier(.2,.6,.2,1), border-color .45s;
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 2px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s cubic-bezier(.2,.6,.2,1);
}
.card:hover { transform: translateY(-5px); border-color: var(--brass-dim); }
.card:hover::before { transform: scaleX(1); }

.card .numeral {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--brass);
}
.card .card-artist {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ivory-ghost);
  margin: -6px 0 0;
}
.card h3 {
  font-family: var(--serif);
  font-weight: 420;
  font-size: 25px;
  line-height: 1.1;
}
.card p { color: var(--ivory-dim); font-size: 15px; line-height: 1.55; flex: 1; }
.card .card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ivory-ghost);
  border-top: 1px solid var(--hairline-soft);
  padding-top: 12px;
}
.card .enter { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.card .enter::after { content: " →"; }

/* ---------- exhibit page ---------- */

.exhibit-head { padding: 54px 0 0; }
.exhibit-head .numeral-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
}
.exhibit-head .provenance {
  font-size: 13px;
  color: var(--ivory-dim);
  margin-top: 14px;
  font-style: italic;
  font-family: var(--serif);
}

.story {
  max-width: 70ch;
  padding: 44px 0 10px;
}
.story h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 380;
  font-size: 22px;
  color: var(--brass);
  margin-bottom: 18px;
}
.story p { margin-bottom: 1.1em; color: rgba(239,231,214,.86); }

.piece {
  margin: 40px 0 70px;
  border: 1px solid var(--hairline);
  background: var(--ink-2);
}
.piece .piece-label {
  padding: 12px 18px;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  border-bottom: 1px solid var(--hairline-soft);
  display: flex;
  justify-content: space-between;
}

.frame-wrap { position: relative; }
.frame-wrap iframe { display: block; width: 100%; height: 74vh; border: 0; background: #0b0910; }

.exhibit-foot {
  max-width: var(--placard-w);
  margin: 0 auto;
  padding: 0 28px 70px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}
.exhibit-foot a { color: var(--brass); }

/* ---------- narrative sections (home) ---------- */

.section { padding: 66px 0; border-top: 1px solid var(--hairline-soft); }
.section .kicker { margin-bottom: 22px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 30px; } }

.fact-list { list-style: none; }
.fact-list li {
  padding: 13px 0;
  border-bottom: 1px solid var(--hairline-soft);
  display: flex;
  gap: 16px;
  align-items: baseline;
  font-size: 15.5px;
}
.fact-list li span:first-child {
  font-family: var(--serif);
  font-style: italic;
  color: var(--brass);
  font-size: 14px;
  min-width: 74px;
}

/* live line from the generator */
.live-line {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 340;
  font-size: clamp(19px, 2.6vw, 26px);
  color: var(--ivory-ghost);
  min-height: 2.6em;
  transition: opacity 1.1s ease;
  max-width: 30ch;
}
.live-line.fading { opacity: 0; }
.live-src { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ivory-dim); margin-top: 14px; }

/* ---------- founders quote ---------- */

.founders-quote {
  border-left: 2px solid var(--brass);
  padding: 14px 0 14px 22px;
  margin: 26px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--ivory-ghost);
}
.founders-quote cite {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-style: normal;
  font-family: var(--sans);
  letter-spacing: .08em;
  color: var(--ivory-dim);
}
.founders-quote cite a { color: var(--brass); }



/* ---------- founder's note ---------- */

.founder-note p {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.85;
  color: rgba(239, 231, 214, .88);
}
.founder-note .attribution {
  margin-top: 26px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brass);
}

/* ---------- compare notes (encounter-first) ---------- */

details.compare {
  max-width: 70ch;
  margin: 30px auto 0;
  border: 1px solid var(--hairline);
  background: var(--ink-2);
}
details.compare summary {
  cursor: pointer;
  padding: 14px 18px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brass);
  list-style: none;
}
details.compare summary::-webkit-details-marker { display: none; }
details.compare summary::before { content: "+ "; }
details.compare[open] summary { border-bottom: 1px solid var(--hairline-soft); }
details.compare[open] summary::before { content: "− "; }
details.compare .compare-body { padding: 4px 18px 18px; }
details.compare .story { padding: 10px 0 0; }
p.seen {
  max-width: 70ch;
  margin: 30px auto 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ivory-ghost);
  text-align: center;
}
p.seen a { color: var(--brass); }

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

.colophon {
  border-top: 1px solid var(--hairline);
  margin-top: 40px;
  padding: 46px 28px 60px;
  max-width: var(--placard-w);
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  font-size: 14px;
  color: var(--ivory-dim);
}
@media (max-width: 860px) { .colophon { grid-template-columns: 1fr; } }
.colophon .clock {
  font-family: var(--serif);
  font-style: italic;
  color: var(--brass);
  font-size: 15px;
}

/* ---------- constrainr exhibit ---------- */

.cr-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 0; }
@media (max-width: 980px) { .cr-grid { grid-template-columns: 1fr; } }
.cr-story-side {
  padding: 30px 30px 26px;
  border-right: 1px solid var(--hairline-soft);
}
@media (max-width: 980px) { .cr-story-side { border-right: 0; border-bottom: 1px solid var(--hairline-soft); } }

.cr-text {
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.85;
}
.cr-text .s { cursor: pointer; transition: background .3s, color .3s; border-bottom: 1px solid transparent; }
.cr-text .s:hover { color: var(--brass); }
.cr-text .s.picked { color: var(--oxblood); border-bottom-color: var(--oxblood); }
.cr-text .s.correct { color: var(--brass); border-bottom-color: var(--brass); }
.cr-text .s.reveal-wrong { color: var(--ivory-dim); }
.cr-text.placeholder { color: var(--ivory-ghost); font-style: italic; }

.cr-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

button.museum-btn {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  background: none;
  color: var(--brass);
  border: 1px solid var(--brass-dim);
  padding: 11px 20px;
  cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
}
button.museum-btn:hover { background: var(--brass); color: var(--ink); border-color: var(--brass); }
button.museum-btn:disabled { opacity: .35; cursor: default; }
button.museum-btn:disabled:hover { background: none; color: var(--brass); border-color: var(--brass-dim); }

.cr-side { padding: 30px 30px 26px; font-size: 14.5px; }
.cr-side h4 {
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 14px;
  font-weight: 600;
}
.cr-verdict { font-family: var(--serif); font-style: italic; font-size: 19px; min-height: 1.6em; margin-bottom: 12px; }
.cr-verdict.pass { color: var(--brass); }
.cr-verdict.fail { color: var(--oxblood); }
.cr-facts div { padding: 7px 0; border-bottom: 1px solid var(--hairline-soft); display: flex; justify-content: space-between; gap: 14px; }
.cr-facts .k { color: var(--ivory-dim); }
.cr-facts .v { font-family: var(--serif); font-style: italic; }
.cr-status { margin-top: 16px; color: var(--ivory-dim); font-size: 13px; line-height: 1.6; }

/* ---------- kaleidoscope exhibit ---------- */

.kal-wrap { padding: 30px; }
.kal-input-row { display: flex; gap: 14px; flex-wrap: wrap; }
.kal-input-row input[type=text] {
  flex: 1;
  min-width: 260px;
  background: var(--ink);
  border: 1px solid var(--hairline);
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 18px;
  padding: 14px 16px;
  outline: none;
  transition: border-color .3s;
}
.kal-input-row input[type=text]:focus { border-color: var(--brass-dim); }
.kal-scenarios { margin: 16px 0 4px; font-size: 13px; color: var(--ivory-dim); font-style: italic; font-family: var(--serif); }
.kal-results { margin-top: 26px; display: grid; gap: 16px; }
.kal-card { border: 1px solid var(--hairline-soft); background: var(--ink); padding: 16px 18px; animation: rise .7s cubic-bezier(.2,.6,.2,1) both; }
.kal-card .kal-name { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--brass); margin-bottom: 8px; }
.kal-card pre {
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: rgba(239,231,214,.88);
}

/* ---------- vigil reading room ---------- */

.vigil-room { padding: 40px 30px; }
.vigil-page {
  font-family: var(--serif);
  font-weight: 340;
  font-size: 18px;
  line-height: 2;
  max-width: 58ch;
  margin: 0 auto;
  white-space: pre-wrap;
  color: rgba(239,231,214,.9);
}

/* ---------- ghost / threshold media ---------- */

.media-stage { background: #0b0910; display: grid; place-items: center; padding: 34px; }
.media-stage img { max-width: 100%; max-height: 62vh; border: 1px solid var(--hairline-soft); }
.media-stage video { width: 100%; max-width: 900px; }
.audio-stage { padding: 40px 30px; }
.audio-stage audio { width: 100%; filter: invert(.92) hue-rotate(180deg) saturate(.4); }
