/* ==========================================================================
   12 — VOICES · room.css
   Sound-studio-at-midnight: warm charcoal, amber console glow,
   one cool phosphor trace reserved for live waveform readouts only.
   ========================================================================== */

@font-face {
  font-family: "Fraunces Var";
  src: url("/vendor/fonts/Fraunces-Variable.woff2") format("woff2-variations"),
       url("/vendor/fonts/Fraunces-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader Var";
  src: url("/vendor/fonts/Newsreader-Variable.woff2") format("woff2-variations"),
       url("/vendor/fonts/Newsreader-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader Var";
  src: url("/vendor/fonts/Newsreader-Italic-Variable.woff2") format("woff2-variations"),
       url("/vendor/fonts/Newsreader-Italic-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk Var";
  src: url("/vendor/fonts/SpaceGrotesk-Variable.woff2") format("woff2-variations"),
       url("/vendor/fonts/SpaceGrotesk-Variable.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Var";
  src: url("/vendor/fonts/Inter-Variable.woff2") format("woff2-variations"),
       url("/vendor/fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0908;
  --bg-1: #120e0b;
  --bg-2: #1a140f;
  --panel: #17110d;
  --ink: #f3e9da;
  --ink-dim: #b8a992;
  --ink-faint: #7c6f5d;
  --amber: #e3a04c;
  --amber-hot: #ff9a4d;
  --ember: #c1502c;
  --trace: #9fd6ac;
  --trace-dim: #4f7458;
  --line: rgba(243, 233, 218, 0.14);
  --line-soft: rgba(243, 233, 218, 0.07);
  --shadow: rgba(0, 0, 0, 0.55);

  --f-display: "Fraunces Var", "Iowan Old Style", ui-serif, serif;
  --f-read: "Newsreader Var", ui-serif, Georgia, serif;
  --f-mono: "Space Grotesk Var", ui-monospace, monospace;
  --f-body: "Inter Var", ui-sans-serif, system-ui, sans-serif;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(120vw 70vh at 50% -10%, rgba(227, 160, 76, 0.07), transparent 60%),
    radial-gradient(90vw 60vh at 85% 110%, rgba(193, 80, 44, 0.06), transparent 55%),
    linear-gradient(180deg, var(--bg-1), var(--bg) 40%, var(--bg-1));
  color: var(--ink);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

body::before {
  /* fine film grain, self-contained data URI, no network request */
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.var { font-family: var(--f-mono); font-size: 0.92em; color: var(--amber); }

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

.chrome {
  position: fixed;
  z-index: 40;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  background: rgba(11, 9, 8, 0.55);
  backdrop-filter: blur(6px);
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.chrome--index { top: 1.1rem; left: 1.1rem; }
.chrome--index:hover, .chrome--index:focus-visible { color: var(--amber); border-color: var(--line); }
.chrome--label { top: 1.1rem; right: 1.1rem; color: var(--ink-faint); }

.chrome--mute {
  bottom: 1.1rem;
  left: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font: inherit;
}
.chrome--mute:hover, .chrome--mute:focus-visible { border-color: var(--line); color: var(--amber); }
.muteIcon { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.muteIcon__body { fill: currentColor; stroke: none; }
.muteIcon__x { display: none; }
.chrome--mute[aria-pressed="true"] .muteIcon__waves { display: none; }
.chrome--mute[aria-pressed="true"] .muteIcon__x { display: inline; stroke: var(--ember); }
.chrome--mute[aria-pressed="true"] { color: var(--ember); }

/* ---------- rail nav ---------- */

.railnav {
  position: fixed;
  right: 1.35rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.railnav__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-faint);
  opacity: 0.55;
  cursor: pointer;
  transition: all 0.35s ease;
  display: block;
}
.railnav__dot:hover { opacity: 1; }
.railnav__dot.is-active { background: var(--amber); opacity: 1; box-shadow: 0 0 8px rgba(227,160,76,0.7); transform: scale(1.4); }

@media (max-width: 640px) {
  .railnav { right: 0.7rem; gap: 0.5rem; }
}

/* ---------- layout ---------- */

main { position: relative; z-index: 2; }

.room {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6.5rem 1.5rem;
  position: relative;
}

.room__inner {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 2rem;
}
.eyebrow__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9em;
  height: 1.9em;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--amber);
  font-size: 0.95em;
}

.desc {
  font-family: var(--f-body);
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--ink-dim);
  max-width: 56ch;
}

/* ---------- intro ---------- */

.room--intro .room__inner { max-width: 640px; }
.intro__title {
  font-family: var(--f-display);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 70, "SOFT" 30, "WONK" 0;
  font-weight: 380;
  font-size: clamp(2.4rem, 7vw, 4.1rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0 0 1.6rem;
  color: var(--ink);
}
.desc--intro { max-width: 52ch; }

/* ==========================================================================
   SECTION A — the quote as waveform
   ========================================================================== */

.quoteRig {
  position: relative;
  margin-bottom: 2.6rem;
}

.quote {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: var(--f-read);
  font-style: italic;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 28;
  font-weight: 420;
  font-size: clamp(1.35rem, 3.6vw, 2.05rem);
  line-height: 2.05;
  color: var(--ink);
}
.qline {
  display: block;
  padding-bottom: 0.1em;
  position: relative;
}
.qline .qword {
  display: inline-block;
  transition: color 0.18s ease, text-shadow 0.18s ease, transform 0.18s ease;
  will-change: transform;
}

.quoteThread {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.transport {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem 1.1rem;
}

.playBtn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: linear-gradient(180deg, rgba(227,160,76,0.16), rgba(227,160,76,0.05));
  border: 1px solid rgba(227,160,76,0.4);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding: 0.72rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.playBtn:hover { border-color: var(--amber); transform: translateY(-1px); }
.playBtn:active { transform: translateY(0); }
.playBtn--small { padding: 0.6rem 0.95rem; }

.playBtn__icon {
  width: 0; height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid var(--amber);
  display: inline-block;
  transition: all 0.15s ease;
}
.playBtn[aria-pressed="true"] .playBtn__icon {
  width: 9px; height: 12px;
  border: none;
  background:
    linear-gradient(90deg, var(--amber) 0 3px, transparent 3px 6px, var(--amber) 6px 9px);
  border-left: none;
}

.sourceTag {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  margin: 0;
}

/* ==========================================================================
   SECTION B — the synced reveal
   ========================================================================== */

.stage {
  min-height: clamp(180px, 26vw, 260px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.8rem;
  padding: 1.5rem 0.5rem;
  margin-bottom: 2rem;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.stage__phrase {
  font-family: var(--f-display);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 40, "SOFT" 10;
  font-size: clamp(1.5rem, 4.4vw, 2.5rem);
  line-height: 1.32;
  color: var(--ink);
  max-width: 20ch;
  min-height: 1.32em;
}
.stage__phrase .sword {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.28em);
  filter: blur(2px);
  animation: swordIn 0.5s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes swordIn {
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .stage__phrase .sword { animation: none; opacity: 1; transform: none; filter: none; }
}

.voiceSlot {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px dashed var(--line);
  border-radius: 999px;
  padding: 0.5rem 1rem 0.5rem 0.7rem;
}
.voiceSlot__dash {
  width: 34px;
  height: 12px;
  background-image: repeating-linear-gradient(90deg, var(--ink-faint) 0 3px, transparent 3px 7px);
  opacity: 0.55;
  border-radius: 2px;
}

.transport--b { flex-direction: column; align-items: stretch; gap: 0.9rem; }
.transport--b .playBtn { align-self: flex-start; }

.scrubRig {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
}
.scrubRig__time {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  min-width: 2.6em;
}
.scrub {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(90deg,
    var(--amber) 0%, var(--amber) var(--fill, 0%),
    var(--line) var(--fill, 0%), var(--line) 100%);
}
.scrub::-webkit-slider-runnable-track { height: 3px; background: transparent; }
.scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--amber);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px rgba(227,160,76,0.5);
  margin-top: -5px;
  cursor: pointer;
}
.scrub::-moz-range-track { height: 3px; background: var(--line); border-radius: 999px; }
.scrub::-moz-range-thumb {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--amber); border: 2px solid var(--bg); cursor: pointer;
}
/* ==========================================================================
   SECTION C — the listening desk
   ========================================================================== */

.room--c .room__inner { max-width: 900px; }
.desc--c { margin-bottom: 2.4rem; }

.desk {
  position: relative;
  border-radius: 22px;
  padding: 2.6rem 1.6rem 2rem;
  background:
    linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -20px var(--shadow), inset 0 1px 0 rgba(255,255,255,0.03);
  overflow: hidden;
  min-height: 420px;
}

.desk__glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 60%;
  background: radial-gradient(60% 100% at 50% 0%, rgba(227,160,76,0.10), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.fragments {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.frag {
  position: absolute;
  font-family: var(--f-read);
  font-style: italic;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  color: var(--ink-dim);
  opacity: 0.08;
  white-space: nowrap;
  transition: opacity 0.5s ease;
  animation: fragDrift 22s ease-in-out infinite;
}
@keyframes fragDrift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(0, -10px); }
}
@media (prefers-reduced-motion: reduce) {
  .frag { animation: none; }
}
.frag--pulse { animation: fragDrift 22s ease-in-out infinite, fragPulse 0.7s ease-out; }
@keyframes fragPulse {
  0% { transform: scale(1.14); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .frag--pulse { animation: none; }
}
.frag:nth-child(1) { top: 12%; left: 6%; animation-delay: 0s; }
.frag:nth-child(2) { top: 22%; right: 7%; animation-delay: -4s; }
.frag:nth-child(3) { top: 68%; left: 9%; animation-delay: -9s; }
.frag:nth-child(4) { top: 42%; left: 34%; animation-delay: -13s; }
.frag:nth-child(5) { top: 8%; left: 40%; animation-delay: -6s; }
.frag:nth-child(6) { top: 78%; right: 12%; animation-delay: -16s; }
.frag:nth-child(7) { top: 55%; right: 28%; animation-delay: -2s; }
.frag:nth-child(8) { top: 88%; left: 30%; animation-delay: -19s; }

.console {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.2rem;
}

.powerBtn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.powerBtn__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 6px rgba(193,80,44,0.8);
  transition: all 0.3s ease;
}
.powerBtn:hover { border-color: var(--amber); color: var(--ink); }
.console[data-awake="true"] .powerBtn__dot { background: var(--trace); box-shadow: 0 0 8px rgba(159,214,172,0.9); }
.console[data-awake="true"] .powerBtn { border-color: rgba(159,214,172,0.35); color: var(--ink); }

.channels {
  display: flex;
  gap: clamp(1.2rem, 4vw, 3.2rem);
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
}

.channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  width: 108px;
}

.channel__meter {
  width: 30px;
  height: 90px;
  border-radius: 4px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.channel__vu { width: 100%; height: 100%; display: block; }

.channel__faderTrack {
  width: 44px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 8px;
  background:
    repeating-linear-gradient(180deg, transparent 0 17px, var(--line-soft) 17px 18px),
    linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.15));
  border: 1px solid var(--line-soft);
}

.channel__fader {
  -webkit-appearance: none;
  appearance: none;
  width: 190px;
  height: 44px;
  background: transparent;
  transform: rotate(-90deg);
  cursor: pointer;
  margin: 0;
  touch-action: none;
}
.channel__fader:disabled { cursor: default; }
.channel__fader::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(90deg, var(--trace-dim), var(--amber));
  border-radius: 999px;
}
.channel__fader::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 34px;
  height: 18px;
  border-radius: 4px;
  margin-top: -7px;
  background: linear-gradient(180deg, #f0d3a3, var(--amber) 55%, #a86f2c);
  border: 1px solid rgba(0,0,0,0.4);
  box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
.channel__fader::-moz-range-track {
  height: 4px;
  background: linear-gradient(90deg, var(--trace-dim), var(--amber));
  border-radius: 999px;
}
.channel__fader::-moz-range-thumb {
  width: 34px; height: 18px; border-radius: 4px;
  background: linear-gradient(180deg, #f0d3a3, var(--amber) 55%, #a86f2c);
  border: 1px solid rgba(0,0,0,0.4);
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.channel__label {
  margin: 0;
  font-family: var(--f-mono);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.channel__sub {
  margin: -0.4rem 0 0;
  font-family: var(--f-body);
  font-size: 0.68rem;
  color: var(--ink-faint);
  text-align: center;
  line-height: 1.3;
}

/* ---------- notes footer (shared house pattern) ---------- */

.notes {
  position: relative;
  z-index: 3;
  border-top: 1px solid var(--line);
  background: var(--bg-1);
  padding: 1rem 1.5rem 3rem;
}
.notes__toggle {
  display: block;
  margin: 0.5rem auto 0;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.notes__toggle:hover { color: var(--amber); border-color: var(--amber); }
.notes__panel {
  max-width: 1080px;
  margin: 2rem auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2rem;
}
.notes__col h2 {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 0.7rem;
}
.notes__col p {
  font-family: var(--f-body);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-dim);
  margin: 0;
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .notes__panel { grid-template-columns: 1fr; gap: 1.6rem; }
}

@media (max-width: 640px) {
  .room { padding: 5.5rem 1.15rem; }
  .chrome { font-size: 0.66rem; padding: 0.5rem 0.7rem; }
  .quote { line-height: 1.85; }
  .channels { gap: 1.2rem; }
  .channel { width: 84px; }
  .channel__faderTrack { width: 38px; height: 150px; }
  .channel__fader { width: 150px; height: 38px; }
  .desk { padding: 2.2rem 0.9rem 1.7rem; }
  .stage { min-height: 200px; }
}

@media (max-width: 390px) {
  .channels { gap: 0.7rem; }
  .channel { width: 74px; }
  .channel__sub { display: none; }
}
