
/* VOICE: quiet, close, a gallery after hours. Nothing speaks louder than the charcoal.
   IDEA: a dark house of rooms. You walk down the corridor and step into one drawing at a time.
   PICTURE: the drawing itself, lit, in the middle of black. The loader is a hand doodling in white.
   COLOUR and TYPE: black, white and one grey. Hanken Grotesk, light, small, lots of air (after the Loewe Craft Prize digital exhibition).
   LAYOUT: one room per screen. Lights dim around the drawing while it plays. */
:root { color-scheme: dark; --bg: #000; --ink: #f2f2f0; --dim: #8b8b88; --line: #262625; --font: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif; }
* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 300 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.locked { overflow: hidden; }
h1, h2, h3 { font-weight: 300; margin: 0; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.small { font-size: 13px; color: var(--dim); letter-spacing: .01em; }
.fade { transition: opacity 1.4s ease; }
body.listening .fade { opacity: .12; }

/* loader */
#loader { position: fixed; inset: 0; z-index: 10; background: var(--bg); display: grid; place-items: center; transition: opacity 1.2s ease, visibility 0s 1.2s; }
#loader.gone { opacity: 0; visibility: hidden; }
.load-inner { display: grid; justify-items: center; gap: 22px; text-align: center; padding: 24px; }
#doodle { width: min(62vw, 300px); aspect-ratio: 1; }
#pct { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; min-height: 1.6em; }
.phones { display: grid; justify-items: center; gap: 10px; }
.phones svg { width: 26px; height: 26px; }
.phones p { font-size: 15px; }
#enter { background: none; border: 1px solid var(--ink); border-radius: 999px; padding: 12px 34px; min-height: 44px; cursor: pointer; opacity: 0; transform: translateY(6px); transition: opacity .8s, transform .8s; pointer-events: none; letter-spacing: .02em; }
#enter.ready { opacity: 1; transform: none; pointer-events: auto; }
#enter:hover { background: var(--ink); color: var(--bg); }

/* threshold */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; gap: 16px; padding: 18px max(4vw, 16px); font-size: 13px; mix-blend-mode: difference; }
.top a { color: var(--ink); text-decoration: none; }
.top nav { display: flex; gap: 22px; }
.threshold { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 96px 24px 48px; position: relative; }
.threshold h1 { font-size: clamp(44px, 8vw, 96px); line-height: 1; letter-spacing: -.02em; }
.threshold .sub { margin-top: 18px; font-size: 18px; color: var(--dim); }
.threshold .intro { margin: 40px auto 0; max-width: 34ch; font-size: 17px; }
.cue { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); font-size: 13px; color: var(--dim); display: grid; justify-items: center; gap: 10px; }
.cue i { width: 1px; height: 42px; background: linear-gradient(var(--dim), transparent); animation: cue 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* rooms */
.room { min-height: 100svh; padding: clamp(80px, 10vh, 120px) max(5vw, 16px) 72px; border-top: 1px solid var(--line); opacity: .25; transition: opacity 1.6s ease; }
.room.here { opacity: 1; }
.door { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; max-width: 1240px; margin: 0 auto 40px; }
.door h2 { font-size: clamp(32px, 5vw, 52px); line-height: 1.05; }
.stage { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.theme { display: grid; gap: 14px; align-content: center; max-width: 30ch; }
.theme p { font-size: 17px; }
.theme p.small { font-size: 13px; }
.frame { position: relative; height: min(76svh, 760px); aspect-ratio: 9 / 16; background: #0b0b0b; cursor: pointer; }
.frame.wide { height: auto; aspect-ratio: 486 / 360; width: min(46vw, 720px); }
.frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame .play { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; border: 1px solid rgba(242,242,240,.7); background: rgba(0,0,0,.35); display: grid; place-items: center; cursor: pointer; transition: opacity .6s; }
.frame.playing .play { opacity: 0; pointer-events: none; }
.frame .bar { position: absolute; left: 0; bottom: 0; height: 1px; background: var(--ink); width: 0; }
.controls { display: grid; gap: 28px; align-content: center; }
.switch { display: grid; gap: 6px; }
.switch button { background: none; border: 0; padding: 8px 0; min-height: 44px; text-align: left; cursor: pointer; color: var(--dim); display: grid; gap: 2px; transition: color .4s; }
.switch button span { font-size: 19px; }
.switch button small { font-size: 13px; }
.switch button[aria-pressed="true"] { color: var(--ink); }
.switch button[aria-pressed="true"] span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); margin: 0 10px 3px 0; vertical-align: middle; }
.reads { display: grid; gap: 4px; min-height: 92px; opacity: 0; transition: opacity 1.2s ease; }
.reads.show { opacity: 1; }
.reads .word { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.1; transition: opacity .5s; }
.clock { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }

/* inside the room, below the drawing */
.accounts { max-width: 1240px; margin: clamp(72px, 10vw, 140px) auto 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); }
.accounts h3 { font-size: 24px; margin: 8px 0 22px; }
.reading { list-style: none; margin: 0; padding: 0; }
.reading li { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); transition: color .4s; color: var(--dim); }
.reading li.on { color: var(--ink); }
.reading button { background: none; border: 0; padding: 2px 0 0; text-align: left; cursor: pointer; font-size: 13px; font-variant-numeric: tabular-nums; color: inherit; min-height: 32px; }
.reading b { font-weight: 400; color: var(--ink); }
.hand img { width: 100%; max-width: 440px; display: block; }
.hand figcaption { margin-top: 14px; font-size: 13px; color: var(--dim); max-width: 46ch; }
.hand { margin: 0; }
.gaps { max-width: 1240px; margin: clamp(56px, 8vw, 110px) auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.gap { border-top: 1px solid var(--ink); padding-top: 16px; display: grid; gap: 8px; align-content: start; }
.gap h3 { font-size: 21px; line-height: 1.25; }
.gap p { color: var(--dim); font-size: 16px; }
.found { max-width: 1240px; margin: clamp(72px, 10vw, 140px) auto 0; }
.found .gaps { margin-top: 20px; }
.listening-note { max-width: 1240px; margin: clamp(48px, 6vw, 80px) auto 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); border-top: 1px solid var(--line); padding-top: 24px; }
.listening-note p { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.35; max-width: 34ch; }
.listening-note .fig { display: grid; gap: 14px; align-content: start; }
.meter { display: grid; grid-template-columns: 11em minmax(0, 1fr) 3em; gap: 14px; align-items: center; font-size: 14px; color: var(--dim); }
.meter .track { height: 1px; background: var(--line); position: relative; }
.meter .fill { position: absolute; left: 0; top: -1px; height: 3px; background: var(--ink); }
.meter output { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }

/* rooms still being drawn */
.empty { display: grid; justify-items: center; gap: 18px; text-align: center; max-width: 1240px; margin: 0 auto; }
.empty canvas { width: min(56vw, 260px); aspect-ratio: 1; }
.empty p { color: var(--dim); max-width: 34ch; }

/* about */
.about { border-top: 1px solid var(--line); padding: clamp(80px, 12vw, 160px) max(5vw, 16px) 48px; }
.about-in { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(32px, 5vw, 80px); }
.about h2 { font-size: clamp(32px, 4vw, 44px); line-height: 1.05; }
.about-text { display: grid; gap: 20px; max-width: 62ch; }
.about-text p:first-child { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.35; }
.about dl { display: grid; grid-template-columns: 9em 1fr; gap: 10px 20px; margin: 16px 0 0; font-size: 15px; }
.about dt { color: var(--dim); }
.about dd { margin: 0; }
footer { max-width: 1240px; margin: clamp(80px, 10vw, 140px) auto 0; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13px; color: var(--dim); }


/* the sound, drawn */
.score { max-width: 1240px; margin: clamp(40px, 6vw, 72px) auto 0; display: grid; gap: 10px; }
.strips { position: relative; display: grid; gap: 4px; cursor: pointer; }
.strip { position: relative; opacity: .3; transition: opacity .6s; }
.strip.on { opacity: 1; }
.strip img { display: block; width: 100%; height: clamp(52px, 7vw, 92px); }
.strip span { position: absolute; left: 10px; top: 6px; font-size: 13px; color: #fff; text-shadow: 0 0 6px rgba(0,0,0,.6); }
.strips .head { position: absolute; top: -4px; bottom: -4px; width: 1px; left: 0; background: var(--ink); pointer-events: none; }
.hand img { height: auto; }
.frame.r2 { aspect-ratio: 360 / 486; }
@media (max-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .theme, .controls { max-width: 420px; width: 100%; }
  .frame { height: auto; width: min(100%, 380px); }
  .frame.wide { width: 100%; max-width: 640px; }
  .theme { order: 3; }
  .reads { min-height: 64px; }
  .controls { gap: 18px; }
  .accounts, .listening-note, .about-in { grid-template-columns: minmax(0, 1fr); }
  .gaps { grid-template-columns: minmax(0, 1fr); }
  .top nav a:not(:first-child) { display: none; }
}
@media (max-width: 600px) {
  .door { flex-direction: column; gap: 6px; margin-bottom: 28px; }
  .meter { grid-template-columns: minmax(0, 1fr) 3em; }
  .meter .track { grid-column: 1 / -1; grid-row: 2; }
  .about dl { grid-template-columns: 1fr; gap: 2px; }
  .about dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }

/* ---- multi-page additions ---- */
.room { opacity: 1; border-top: 0; }
.top .here-link { color: var(--ink); }
.top nav a { opacity: .7; } .top nav a[aria-current="page"] { opacity: 1; }

/* the introduction page */
.film { max-width: 1240px; margin: 0 auto; padding: 0 max(5vw, 16px); }
.film-frame { position: relative; aspect-ratio: 16 / 9; background: #0b0b0b; border: 1px solid var(--line); display: grid; place-items: center; }
.film-frame video { width: 100%; height: 100%; display: block; }
.film-frame .soon { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 24px; }
.film-frame canvas { width: min(30vw, 180px); aspect-ratio: 1; }
.film figcaption { margin-top: 14px; font-size: 13px; color: var(--dim); }
.index { max-width: 1240px; margin: clamp(96px, 12vw, 160px) auto 0; padding: 0 max(5vw, 16px); }
.index ol { list-style: none; margin: 20px 0 0; padding: 0; }
.index li a { display: grid; grid-template-columns: 7em minmax(0, 1fr) auto; gap: 24px; align-items: baseline; padding: 26px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: padding .5s ease; }
.index li:last-child a { border-bottom: 1px solid var(--line); }
.index li a:hover { padding-left: 14px; }
.index .no { font-size: 13px; color: var(--dim); }
.index .nm { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; }
.index .meta { font-size: 13px; color: var(--dim); text-align: right; }
.index li.wait .nm { color: var(--dim); }
.about.intro-about { border-top: 0; }

/* arriving in a room */
#arrive { position: fixed; inset: 0; z-index: 10; background: var(--bg); display: grid; place-items: center; transition: opacity 1s ease, visibility 0s 1s; }
#arrive.gone { opacity: 0; visibility: hidden; }
#arrive .in { display: grid; justify-items: center; gap: 18px; text-align: center; }
#arrive canvas { width: min(40vw, 200px); aspect-ratio: 1; }
#arrive h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.05; }

/* doorway to the next room */
.doorway { max-width: 1240px; margin: clamp(96px, 12vw, 160px) auto 0; padding: 32px max(5vw, 16px) 48px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.doorway a { color: var(--ink); text-decoration: none; display: grid; gap: 6px; }
.doorway a .small { display: block; }
.doorway a .nm { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; }
.doorway a.next { text-align: right; }
.doorway a:hover .nm { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
@media (max-width: 600px) { .index li a { grid-template-columns: minmax(0, 1fr); gap: 4px; } .index .meta { text-align: left; } .doorway a.next { text-align: left; } }

/* ---- gallery entrance + quieter rooms ---- */
main { transition: opacity 2.4s ease; }
body.dark main, body.dark .doorway, body.dark footer, body.dark .top { opacity: 0; }
.top, .doorway, footer { transition: opacity 2.4s ease; }
#arrive .in { gap: 0; max-width: 520px; padding: 24px; }
#arrive .title-img { width: min(38vw, 228px); height: auto; display: block; opacity: 0; animation: up 1.8s ease .3s forwards; }
#arrive .tomb { margin-top: 44px; font-size: 14px; line-height: 1.7; color: var(--dim); opacity: 0; animation: up 1.4s ease 1.5s forwards; }
#arrive .tomb b { font-weight: 400; color: var(--ink); }
#arrive .phones { margin-top: 40px; opacity: 0; animation: up 1.2s ease 2.4s forwards; }
#arrive .phones p { font-size: 14px; color: var(--dim); }
#enterRoom { margin-top: 28px; background: none; border: 1px solid var(--ink); border-radius: 999px; padding: 12px 34px; min-height: 44px; cursor: pointer; letter-spacing: .02em; opacity: 0; animation: up 1.2s ease 3s forwards; }
#enterRoom:hover { background: var(--ink); color: var(--bg); }
@keyframes up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.room.quiet { padding-top: clamp(96px, 12vh, 140px); }
.wall { display: grid; gap: 22px; align-content: center; max-width: 26ch; }
.wall img { width: 102px; height: auto; display: block; }
.wall p { font-size: 14px; line-height: 1.7; color: var(--dim); margin: 0; }
.wall p b { font-weight: 400; color: var(--ink); }
.switch.simple button { padding: 6px 0; }
.switch.simple button span { font-size: 22px; }
.reads .word { font-size: clamp(24px, 2.4vw, 32px); }
.accounts.quiet { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.accounts.quiet .small { display: block; margin-bottom: 18px; }
.words { list-style: none; margin: 0; padding: 0; }
.words li { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--dim); font-size: 19px; transition: color .4s; }
.words li:last-child { border-bottom: 1px solid var(--line); }
.words li.on { color: var(--ink); }
.words button { background: none; border: 0; padding: 3px 0 0; text-align: left; cursor: pointer; font-size: 13px; color: inherit; font-variant-numeric: tabular-nums; min-height: 32px; }
.doorway img { width: 72px; height: auto; display: block; }
.doorway a.next img { margin-left: auto; }
.index li a .nm img { width: clamp(72px, 8vw, 102px); height: auto; display: block; }
@media (max-width: 900px) { .wall { order: -1; max-width: 420px; width: 100%; } .accounts.quiet { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .doorway a.next img { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { #arrive .title-img, #arrive .tomb, #arrive .phones, #enterRoom { opacity: 1; animation: none; } }

.machine { border-left: 1px solid var(--ink); padding-left: 22px; display: grid; gap: 12px; }
.machine p { margin: 0; }
