:root {
  color-scheme: dark;
  --phosphor: #72ff45;
  --dim: #2c7b28;
  --faint: #153d17;
  --black: #010302;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 40%, #172019 0, #070a08 38rem, #010101 75rem),
    #010101;
  color: var(--phosphor);
  font-family: "Courier New", Courier, monospace;
}

button, a { font: inherit; }

body.release-pending {
  background:
    radial-gradient(circle at 50% 35%, rgba(101, 255, 0, .12), transparent 34rem),
    #000;
  color: #e6e6e6;
}

.terminal-shell {
  min-height: 100vh;
  padding: 8rem clamp(.75rem, 3vw, 2.5rem) clamp(.75rem, 3vw, 2.5rem);
  display: grid;
  place-items: center;
}

.terminal-shell.is-release-transition {
  position: relative;
  overflow: clip;
}

.is-release-transition .release-countdown {
  position: absolute;
  top: var(--release-timer-top);
  left: 0;
  z-index: 3;
  transform: translateY(-50%);
  color: #e6e6e6;
  pointer-events: none;
}

.release-preview-controls {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 100;
  display: flex;
  justify-content: center;
  gap: .5rem;
}

.release-preview-controls button {
  padding: .75rem 1rem;
  border: 1px solid #444;
  background: #080c09;
  color: #e6e6e6;
  font-size: .75rem;
  cursor: pointer;
}

.release-preview-controls button:hover,
.release-preview-controls button:focus-visible {
  border-color: var(--phosphor);
  outline: 1px dashed var(--phosphor);
  outline-offset: .2rem;
}

.terminal-bezel {
  width: min(100%, 92rem);
  padding: clamp(.55rem, 1.5vw, 1.2rem);
  border: 1px solid #263028;
  border-radius: clamp(.6rem, 2vw, 1.6rem);
  background: linear-gradient(145deg, #252a26, #080a09 38%, #181c19);
  box-shadow: 0 2rem 8rem #000, inset 0 0 0 1px #030403;
}

.terminal-screen {
  min-height: min(51rem, calc(100vh - 5rem));
  position: relative;
  overflow: hidden;
  border: 1px solid #1d4b21;
  border-radius: clamp(.35rem, 1.5vw, 1rem);
  background:
    radial-gradient(ellipse at center, rgba(39, 104, 37, .15), transparent 67%),
    #010503;
  box-shadow: inset 0 0 7rem #000, inset 0 0 1.5rem rgba(114, 255, 69, .1);
  text-shadow: 0 0 .35rem rgba(114, 255, 69, .75);
}

.terminal-screen::before {
  content: "";
  position: absolute;
  z-index: 6;
  inset: 0;
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  animation: noise .55s steps(2) infinite;
}

.crt-glare {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.035), transparent 24%, transparent 76%, rgba(255,255,255,.02));
}

.scanlines {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 3px, rgba(0,0,0,.3) 4px);
}

.signal-scan {
  height: 12%;
  position: absolute;
  z-index: 1;
  top: -15%;
  right: 0;
  left: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to bottom, transparent, rgba(114, 255, 69, .025), transparent);
}

.is-playing .signal-scan {
  opacity: 1;
  animation: signal-sweep 8s linear infinite;
}

.ambient-log {
  padding: 2rem 0 .5rem;
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  color: var(--phosphor);
  font-size: clamp(.55rem, .8vw, .72rem);
  letter-spacing: .08em;
  opacity: .085;
  text-align: right;
}

.ambient-log_line {
  margin: 0 0 1.25rem;
  animation: ambient-rise 6s linear forwards;
}

.is-playing {
  animation: playback-glow 3.8s ease-in-out infinite;
}

.terminal-screen.is-unstable {
  animation: terminal-instability .3s steps(2, end) 1 !important;
}

.terminal-screen.is-unstable .lyrics {
  text-shadow: -2px 0 rgba(255, 255, 255, .28), 3px 0 rgba(114, 255, 69, .36);
}

.terminal-screen.is-scrubbing {
  animation: scrub-distortion .12s steps(2, end) infinite !important;
}

.terminal-screen.is-scrubbing .terminal-grid {
  animation: scrub-content .14s steps(2, end) infinite;
  filter: contrast(1.12) brightness(1.08);
  text-shadow: -1px 0 rgba(255,255,255,.12), 2px 0 rgba(114,255,69,.18);
}

.terminal-screen.is-scrubbing .scanlines {
  opacity: .5;
}

.terminal-header {
  min-height: 2.7rem;
  padding: .6rem 1rem;
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--faint);
  color: var(--dim);
  font-size: clamp(.58rem, 1.3vw, .72rem);
  letter-spacing: .1em;
}

.system-status { color: var(--phosphor); }
.system-status i {
  width: .45rem;
  height: .45rem;
  margin-right: 0;
  display: inline-block;
  border-radius: 50%;
  background: var(--phosphor);
  box-shadow: 0 0 .7rem var(--phosphor);
  opacity: .2;
}
.is-playing .system-status i {
  opacity: 1;
  animation: blink 1.7s infinite;
}

.orientation-gate {
  display: none;
}

.terminal-shell.is-release-locked {
  min-height: 100svh;
  padding: 1.5rem;
}

.is-release-locked .orientation-gate {
  display: none;
}

.release-countdown {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.release-countdown_digits {
  max-width: 100%;
  display: flex;
  align-items: baseline;
  gap: clamp(.2rem, 1.2vw, .75rem);
  font-size: clamp(1.6rem, 8.5vw, 5rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: .03em;
}

.release-countdown_separator {
  color: #666;
}

.release-countdown_retry {
  margin-top: 1rem;
  padding: .75rem 1rem;
  border: 1px solid #444;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.release-countdown_retry:hover,
.release-countdown_retry:focus-visible {
  border-color: currentColor;
  outline: 1px dashed currentColor;
  outline-offset: .2rem;
}

.terminal-grid {
  min-height: calc(min(51rem, 100vh - 5rem) - 2.7rem);
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
}

.system-panel {
  padding: clamp(1.2rem, 3vw, 2.5rem);
  border-right: 1px solid var(--faint);
  background: rgba(0, 10, 3, .25);
}

.system-data { margin: 0; }
.system-data > div {
  padding: .7rem 0;
  border-top: 1px dashed var(--faint);
}
.system-data dt {
  color: var(--dim);
  font-size: .62rem;
  letter-spacing: .16em;
}
.system-data dd {
  margin: .25rem 0 0;
  overflow-wrap: anywhere;
  font-size: clamp(.7rem, 1.5vw, .86rem);
}

.time-readout {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-size: .72rem;
}
.progress-track {
  height: .35rem;
  margin-top: .65rem;
  border: 1px solid var(--dim);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.progress-track:hover,
.progress-track:focus-visible {
  border-color: var(--phosphor);
  box-shadow: 0 0 .45rem rgba(114, 255, 69, .35);
  outline: none;
}
.progress-bar {
  width: 0;
  height: 100%;
  background: var(--phosphor);
  box-shadow: 0 0 .65rem var(--phosphor);
}

.terminal-controls {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.terminal-controls button {
  padding: .45rem .65rem;
  border: 0;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
}
.terminal-controls button:hover,
.terminal-controls button:focus-visible { color: var(--phosphor); outline: 1px dashed var(--dim); }

.playback-error {
  margin: 1rem 0 0;
  color: var(--phosphor);
  font-size: .72rem;
  line-height: 1.5;
}

.lyric-panel {
  min-height: 35rem;
  padding: clamp(1.3rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
}
.boot-ascii {
  width: max-content;
  max-width: none;
  margin: 0;
  transform: translateY(-1.05em);
  position: relative;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
  color: var(--phosphor);
  font-size: clamp(.35rem, .72vw, .67rem);
  line-height: 1.05;
  white-space: pre;
}

.terminal-title_row {
  padding-bottom: clamp(1rem, 2vw, 1.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 20rem);
  align-items: end;
  gap: clamp(1.5rem, 4vw, 4rem);
  border-bottom: 1px solid var(--faint);
}

.playback-panel {
  width: 100%;
  position: relative;
  z-index: 1;
  justify-self: end;
}

.playback-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--dim);
  font-size: .68rem;
  letter-spacing: .08em;
}

.playback-meta b { color: inherit; font-weight: normal; }
.playback-panel .terminal-controls { margin-top: .65rem; justify-content: flex-end; }

.visually-hidden {
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lyrics-stage {
  min-height: 28rem;
  position: relative;
  flex: 1;
}

.lyrics {
  min-height: 28rem;
  padding: clamp(1.5rem, 4vw, 3.5rem) 0;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.lyric-line {
  margin: 0;
  color: var(--faint);
  font-size: clamp(1rem, 3vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  transition: color .35s ease, opacity .35s ease, transform .35s ease;
}
.lyric-line.is-past { color: #245523; opacity: .45; }
.lyric-line.is-current {
  color: var(--phosphor);
  opacity: 1;
  transform: translateX(.8rem);
}
.lyric-line.is-current::before { content: "> "; }
.lyric-line.is-future { opacity: .14; }

.lyric-copy {
  position: relative;
  display: inline-block;
}

.lyric-base {
  color: var(--dim);
  opacity: .58;
}

.lyric-reveal {
  width: 0;
  position: absolute;
  inset: 0 auto 0 0;
  overflow: hidden;
  color: var(--phosphor);
  opacity: 1;
  white-space: nowrap;
  animation: type-reveal var(--type-duration) steps(var(--characters), end) forwards;
}


.nav_component,
.site-footer {
  font-family: Aktivgrotesk, Arial, sans-serif;
  text-shadow: none;
}

@keyframes blink { 50% { opacity: .15; } }
@keyframes type-reveal { to { width: 100%; } }
@keyframes signal-sweep { from { transform: translateY(0); } to { transform: translateY(950%); } }
@keyframes ambient-rise {
  0% { transform: translateY(8rem); opacity: 0; }
  15%, 70% { opacity: 1; }
  100% { transform: translateY(-21rem); opacity: 0; }
}
@keyframes playback-glow {
  0%, 100% { border-color: #1d4b21; box-shadow: inset 0 0 7rem #000, inset 0 0 1.5rem rgba(114, 255, 69, .1); }
  50% { border-color: #34763a; box-shadow: inset 0 0 6rem #000, inset 0 0 2.2rem rgba(114, 255, 69, .17), 0 0 1rem rgba(114, 255, 69, .09); }
}
@keyframes terminal-instability {
  0%, 100% { transform: translate(0); filter: brightness(1); }
  18% { transform: translate(-2px, 1px) skewX(-.12deg); filter: brightness(1.35); }
  42% { transform: translate(3px, -1px); filter: contrast(1.35); }
  68% { transform: translate(-1px, 0); filter: brightness(.72); }
  84% { transform: translate(2px, 1px); filter: brightness(1.2); }
}
@keyframes scrub-distortion {
  0% { transform: translateX(-1px); filter: brightness(.95); }
  50% { transform: translateX(1.5px) skewX(.04deg); filter: brightness(1.14); }
  100% { transform: translateX(-.5px); filter: contrast(1.1); }
}
@keyframes scrub-content {
  0% { transform: translateX(1px); }
  50% { transform: translateX(-2px); }
  100% { transform: translateX(.5px); }
}
@keyframes noise {
  0% { transform: translate(0); }
  25% { transform: translate(-1%, 1%); }
  50% { transform: translate(1%, -1%); }
  75% { transform: translate(.5%, 1%); }
}

@media (max-width: 720px) {
  .terminal-shell { padding: 6rem 0 0; }
  .terminal-bezel { padding: .35rem; border: 0; border-radius: 0; }
  .terminal-screen { min-height: 100vh; border-radius: 0; }
  .terminal-grid { grid-template-columns: 1fr; }
  .boot-ascii { font-size: clamp(.27rem, 1.17vw, .38rem); }
  .terminal-title_row { grid-template-columns: 1fr; }
  .playback-panel { max-width: 22rem; justify-self: stretch; }
  .terminal-header span:nth-child(2) { display: none; }
  .lyric-panel { min-height: 31rem; }
  .lyrics-stage,
  .lyrics { min-height: 18rem; }
}

@media (max-width: 720px) and (orientation: portrait) {
  .terminal-shell {
    min-height: calc(100vh - 6rem);
    padding: 6rem 1.25rem 2rem;
  }

  .terminal-bezel {
    display: none;
  }

  .orientation-gate {
    width: min(100%, 28rem);
    min-height: 15rem;
    padding: 2.25rem 1.5rem;
    position: relative;
    overflow: hidden;
    display: block;
    border: 1px solid #28592a;
    border-radius: .65rem;
    background:
      repeating-linear-gradient(to bottom, transparent 0, transparent 3px, rgba(0,0,0,.28) 4px),
      radial-gradient(ellipse at center, rgba(39, 104, 37, .16), transparent 70%),
      #010503;
    box-shadow: inset 0 0 3rem #000, 0 1.5rem 5rem #000;
    text-align: center;
    text-shadow: 0 0 .35rem rgba(114, 255, 69, .75);
  }

  .orientation-gate_code {
    margin: 0 0 2.5rem;
    color: var(--dim);
    font-size: .62rem;
    letter-spacing: .14em;
  }

  .orientation-gate_message {
    margin: 0;
    color: var(--phosphor);
    font-size: clamp(.9rem, 4vw, 1.15rem);
    letter-spacing: .09em;
  }

  .orientation-gate_hint {
    margin: .85rem 0 0;
    color: var(--dim);
    font-size: .68rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  .lyric-line { transition: none; }
}
