/* mindcrete.com: the oculus is the page. Type floats in its fog: a display serif for what is
   playing, a small mono for everything else, hairlines, one red signal light. */

@font-face { font-family: "Instrument Serif"; font-weight: 400; font-display: swap; src: url(fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/instrument-serif-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 300; font-display: swap; src: url(fonts/ibm-plex-sans-latin-300.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Plex Sans"; font-weight: 300; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-300.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-400.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-cyrillic-400.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-cyrillic-500.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --ink: #f1efea;
  --soft: rgba(241, 239, 234, 0.66);
  --dim: rgba(241, 239, 234, 0.42);
  --faint: rgba(241, 239, 234, 0.16);
  --signal: #e2553b;
  --serif: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --pad: clamp(20px, 3.6vw, 60px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { background: #080808; }
body {
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* --- the scene: the still plate first, the live canvas over it once drawing */
.still, .scene, .shade { position: fixed; inset: 0; width: 100%; height: 100%; }
/* The still plate only where the live scene cannot run (no WebGL2): the scene fades in from
   black in its own framing, so nothing visibly swaps on load. */
.still { background: #080808 url(plate.webp) 50% 30% / cover no-repeat; opacity: 0; transition: opacity 1.2s ease; }
.no-scene .still { opacity: 1; }
@media (max-aspect-ratio: 3/4) {
  .still { background-size: auto 62%; background-position: 50% 0; -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 62%); mask-image: linear-gradient(to bottom, #000 45%, transparent 62%); }
}
.scene { opacity: 0; transition: opacity 2.4s ease; }
.scene.on { opacity: 1; }
.shade {
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 20%, transparent 40%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0, transparent 18%),
    linear-gradient(to top, rgba(0, 0, 0, 0.78) 0, rgba(0, 0, 0, 0.42) 30%, transparent 58%);
}

/* the signal: a hairline across the bottom that moves with the sound */
.scope { position: fixed; left: 0; right: 0; bottom: 0; width: 100%; height: 140px; pointer-events: none; opacity: 0; transition: opacity 2s ease; }
.playing .scope, .scope.idle { opacity: 1; }

/* --- the top line */
.top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: calc(var(--pad) * 0.7) var(--pad);
  padding-top: max(calc(var(--pad) * 0.7), env(safe-area-inset-top));
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}
.top > *:not(.lang) { filter: drop-shadow(0 1px 8px rgba(0, 0, 0, 0.55)); }
.mark { display: block; color: var(--ink); line-height: 0; }
.mark .wordmark { height: 24px; width: auto; display: block; }
.mark .meter rect { transition: opacity 0.12s; }
.mark .meter rect.off { opacity: 0.14; }
.spacer { flex: 1; }
@keyframes beacon { 0% { box-shadow: 0 0 0 0 rgba(226, 85, 59, 0.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(226, 85, 59, 0); } }
.links { display: inline-flex; align-items: center; gap: 20px; margin-right: 10px; }
.links a { display: inline-flex; align-items: center; gap: 9px; color: var(--soft); text-decoration: none; transition: color 0.3s; }
.links a:hover { color: var(--ink); }
.links a:not([href]) { opacity: 0.35; pointer-events: none; }
.links svg { width: 16px; height: 16px; fill: currentColor; }
.links .kofi { padding: 7px 14px 7px 12px; border: 1px solid rgba(241, 239, 234, 0.28); border-radius: 999px; letter-spacing: 0.24em; transition: color 0.3s, border-color 0.3s, background-color 0.3s; }
.links .kofi:hover { border-color: var(--ink); background-color: rgba(241, 239, 234, 0.08); }
.links .kofi svg { width: 15px; height: 15px; }
.lang { position: relative; filter: none; }
.lang-button { display: inline-flex; align-items: center; gap: 9px; padding: 6px 2px 6px 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; color: var(--soft); filter: drop-shadow(0 1px 8px rgba(0, 0, 0, 0.55)); transition: color 0.3s; }
.lang-button:hover, .lang-button[aria-expanded="true"] { color: var(--ink); }
.lang-button svg { width: 9px; height: 6px; fill: none; stroke: currentColor; stroke-width: 1.3; transition: transform 0.3s; }
.lang-button[aria-expanded="true"] svg { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  min-width: 168px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: rgba(14, 14, 14, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(241, 239, 234, 0.12);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  animation: drop 0.22s cubic-bezier(0.2, 0.7, 0.1, 1);
  text-transform: none;
  letter-spacing: 0;
}
.lang-menu[hidden] { display: none; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.lang-menu button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 12px; border-radius: 8px; font-family: var(--sans); font-size: 14px; color: var(--soft); text-align: left; transition: background-color 0.2s, color 0.2s; }
.lang-menu button:hover, .lang-menu button:focus-visible { background: rgba(241, 239, 234, 0.07); color: var(--ink); outline: none; }
.lang-menu button[aria-checked="true"] { color: var(--ink); }
.lang-menu button[aria-checked="true"]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 10px rgba(226, 85, 59, 0.7); }

/* --- the stage: what is playing (left), the broadcast log (right) */
.radio { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.stage {
  position: relative;
  z-index: 2;
  margin-top: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 48px var(--pad);
  padding: 0 var(--pad) calc(var(--pad) * 1.05);
  padding-bottom: max(calc(var(--pad) * 1.05), env(safe-area-inset-bottom));
}

.kicker { display: flex; align-items: center; gap: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--dim); }
.kicker .state { color: var(--soft); }
.kicker .rule { position: relative; width: clamp(80px, 12vw, 180px); height: 1px; background: var(--faint); }
.kicker .rule i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--ink); }
.kicker .clock { letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }

.title {
  margin: 0.12em 0 0.2em -0.04em;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(58px, 9.4vw, 176px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.45);
  max-width: 14ch;
  position: relative;
}
.title span { display: inline-block; }
.title span.appear { animation: appear 1.8s ease both; }
/* One after the other, never both at once: the old name is gone before the new one comes. */
.title span.leave { position: absolute; left: 0; top: 0; pointer-events: none; animation: leave 0.55s cubic-bezier(0.55, 0, 1, 0.45) both; }
.title span.enter { animation: enter 1.1s cubic-bezier(0.15, 0.7, 0.2, 1) 0.6s both; }
@keyframes appear { from { opacity: 0; } }
@keyframes leave { to { opacity: 0; transform: translateX(-0.7em); } }
@keyframes enter { from { opacity: 0; transform: translateX(0.7em); } }

.controls { display: flex; align-items: center; gap: 28px; margin-top: 18px; }

/* The button: one clean ring. Hover fills it faintly; tuning in, the ring breathes. */
.play {
  width: 88px;
  height: 88px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(241, 239, 234, 0.5);
  background: rgba(8, 8, 8, 0.35);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}
.play:hover { background-color: rgba(241, 239, 234, 0.1); border-color: var(--ink); }
.connecting .play { animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { border-color: rgba(241, 239, 234, 0.15); } }
.play .icon { width: 24px; height: 24px; fill: var(--ink); }
.play .i-pause, .playing .play .i-play, .connecting .play .i-play { display: none; }
.playing .play .i-pause, .connecting .play .i-pause { display: block; }

.aside { display: grid; gap: 14px; }
.tagline { margin: 0; font-size: 15px; line-height: 1.45; color: var(--soft); white-space: pre-line; }
.volume { display: flex; align-items: center; gap: 12px; color: var(--dim); transition: color 0.3s; }
.volume:hover { color: var(--soft); }
.mute { display: grid; place-items: center; width: 28px; height: 28px; margin: -6px -4px -6px -6px; color: inherit; }
.mute:hover { color: var(--ink); }
.volume svg { width: 16px; height: 16px; fill: currentColor; }
.volume svg .wave, .volume svg .cross { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.volume svg .cross, .muted .volume svg .wave { display: none; }
.muted .volume svg .cross { display: inline; }
.muted .volume input { opacity: 0.35; }
.volume input { width: 120px; appearance: none; -webkit-appearance: none; background: transparent; height: 16px; cursor: pointer; margin: 0; }
.volume input::-webkit-slider-runnable-track { height: 1px; background: linear-gradient(to right, var(--soft) var(--v, 80%), var(--faint) var(--v, 80%)); }
.volume input::-moz-range-track { height: 1px; background: var(--faint); }
.volume input::-moz-range-progress { height: 1px; background: var(--soft); }
.volume input::-webkit-slider-thumb { -webkit-appearance: none; width: 7px; height: 7px; margin-top: -3px; background: var(--ink); border-radius: 50%; border: 0; }
.volume input::-moz-range-thumb { width: 7px; height: 7px; background: var(--ink); border-radius: 50%; border: 0; }

/* the broadcast log: earlier above, now, next below, fading into the fog both ways */
.log { width: clamp(260px, 25vw, 360px); }
.log h2 { margin: 0 0 18px 26px; font-family: var(--mono); font-weight: 400; font-size: 10px; letter-spacing: 0.36em; text-transform: uppercase; color: var(--dim); }
.rows { list-style: none; margin: 0; padding: 0; position: relative; }
.rows::before { content: ""; position: absolute; left: 4px; top: 10px; bottom: 10px; width: 1px; background: linear-gradient(to bottom, transparent, var(--faint) 20%, var(--faint) 80%, transparent); }
.rows li {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 7px 0 7px 26px;
  font-size: 14px;
  color: var(--soft);
  opacity: calc(1 - var(--d, 0) * 0.17);
  transition: opacity 0.6s;
}
.rows li::before { content: ""; position: absolute; left: 2px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: rgba(241, 239, 234, 0.35); }
.rows .when, .rows .len { font-family: var(--mono); font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.rows li > span { line-height: 20px; }
.rows .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows li.past .name { color: var(--dim); }
.rows li.current { padding-top: 12px; padding-bottom: 12px; color: var(--ink); }
.rows li.current::before { left: 0; width: 9px; height: 9px; margin-top: -4.5px; background: var(--signal); box-shadow: 0 0 14px rgba(226, 85, 59, 0.8); }
.rows li.current .name { font-family: var(--serif); font-size: 22px; line-height: 24px; letter-spacing: 0; padding-top: 2px; }
.rows li.current .when { color: var(--signal); letter-spacing: 0.2em; text-transform: uppercase; font-size: 10px; margin-right: -0.2em; }

/* entrance */
.top, .kicker, .controls, .log { animation: rise 1.4s cubic-bezier(0.2, 0.7, 0.1, 1) both; }
.kicker { animation-delay: 0.15s; }
.controls { animation-delay: 0.4s; }
.log { animation-delay: 0.55s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; gap: 40px; }
  .log { width: 100%; max-width: 460px; }
  .rows li.far { display: none; }
}
@media (max-width: 560px) {
  :root { --pad: 20px; }
  .top { gap: 10px; letter-spacing: 0.26em; }
  .mark .wordmark { height: 17px; }
  .links { gap: 13px; margin-right: 0; }
  .lang-button { gap: 7px; padding-left: 4px; }
  .links .kofi { padding: 6px; border-radius: 50%; }
  .links .kofi span { display: none; }
  .title { font-size: clamp(50px, 15vw, 84px); }
  .play { width: 76px; height: 76px; }
  .controls { gap: 22px; }
  .tagline { font-size: 14px; }
  .volume input { width: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- the landing stub at / (until the game's own site) */
.home { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.home .hero { position: relative; z-index: 2; margin-top: auto; padding: 0 var(--pad) calc(var(--pad) * 1.3); animation: rise 1.6s cubic-bezier(0.2, 0.7, 0.1, 1) both; }
.home .word { margin: 0; line-height: 0; color: var(--ink); }
.home .word .wordmark { width: min(88vw, 1180px); height: auto; display: block; }
.home .soon { margin: 18px 0 40px; font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.4vw, 34px); color: var(--soft); }
.home .go { display: inline-flex; align-items: center; gap: 16px; padding: 18px 26px; border-radius: 999px; border: 1px solid rgba(241, 239, 234, 0.3); background: rgba(241, 239, 234, 0.05); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); text-decoration: none; font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; transition: background 0.4s, border-color 0.4s; }
.home .go:hover { background: rgba(241, 239, 234, 0.12); border-color: var(--ink); }
.home .go i { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); animation: beacon 2.6s ease-out infinite; }
