/* ============================================================
   koroenight — music site
   type: Bebas Neue (headings/nav), Rubik Glitch (wordmark only),
         Share Tech Mono (body/UI)
   signature: the whole site staged as a CRT set — content lives
   inside a screen with a live broadcast HUD, and "changes
   channel" (static burst) when you use the remote below it.
   palette: muted moss-green + rust on a near-black CRT — grungy,
   not neon. phosphor-monitor feel.
   ============================================================ */

:root {
  --void: #0b0c09;
  --panel: #15170f;
  --panel-2: #1b1e15;
  --bone: #d4d2c2;
  --dim: #83816f;
  --green: #8a9c68;
  --green-light: #a9b87e;
  --green-dim: #4c5a3a;
  --rust: #a35d35;

  --font-display: 'Rubik Glitch', cursive;
  --font-head: 'Bebas Neue', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: var(--green); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

button {
  font-family: var(--font-mono);
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--green-light);
  outline-offset: 2px;
}

h1, h2, p, ul, ol { margin: 0; }

/* ---------------- CRT overlay (persistent, whole page) ---------------- */
.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.18) 0px,
      rgba(0, 0, 0, 0.18) 1px,
      transparent 2px,
      transparent 3px
    ),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
  mix-blend-mode: multiply;
  animation: flicker 6s infinite steps(30);
}
.crt-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes flicker {
  0%, 100% { opacity: 0.9; }
  8%  { opacity: 0.78; }
  9%  { opacity: 0.92; }
  50% { opacity: 0.85; }
  62% { opacity: 0.95; }
}

/* ---------------- static burst (power-on / channel change) ---------------- */
.static-burst {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  opacity: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 120px 120px;
  transition: opacity 0.08s linear;
}
.static-burst.is-active { opacity: 0.85; }

/* ---------------- gate / boot screen ---------------- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--void);
  text-align: center;
  padding: 24px;
}
.gate.is-hidden { display: none; }

.gate-noise {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.gate-content { position: relative; max-width: 480px; }

.gate-eyebrow {
  font-size: 13px;
  color: var(--green-light);
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}

.gate-wordmark {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 9vw, 4.4rem);
  color: var(--bone);
  font-weight: 400;
}

/* reusable RGB-split glitch treatment — used once, on the wordmark only */
.glitch { position: relative; display: inline-block; }
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0; width: 100%;
  overflow: hidden;
}
.glitch::before {
  color: var(--green);
  clip-path: polygon(0 2%, 100% 2%, 100% 40%, 0 40%);
  animation: glitchShiftA 3.4s infinite steps(1, end);
}
.glitch::after {
  color: var(--rust);
  clip-path: polygon(0 60%, 100% 60%, 100% 98%, 0 98%);
  animation: glitchShiftB 2.7s infinite steps(1, end);
}
@keyframes glitchShiftA {
  0%, 88%, 100% { transform: translate(0, 0); opacity: 0; }
  89% { transform: translate(-3px, 1px); opacity: 0.9; }
  91% { transform: translate(3px, -1px); opacity: 0.9; }
  93% { transform: translate(-2px, 0); opacity: 0.5; }
  95% { opacity: 0; }
}
@keyframes glitchShiftB {
  0%, 84%, 100% { transform: translate(0, 0); opacity: 0; }
  85% { transform: translate(3px, -1px); opacity: 0.9; }
  87% { transform: translate(-3px, 1px); opacity: 0.9; }
  90% { opacity: 0; }
}

.gate-tagline {
  color: var(--dim);
  letter-spacing: 0.08em;
  margin: 10px 0 32px;
}

/* old-web "click here to enter" beveled button — raised 3D edge,
   inverts + drops on press instead of glowing/scaling */
.tune-in-btn {
  font-family: var(--font-head);
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--void);
  background: var(--green);
  padding: 12px 34px;
  border: none;
  border-radius: 2px;
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.35),
    inset -2px -2px 0 rgba(0, 0, 0, 0.45),
    0 3px 0 rgba(0, 0, 0, 0.6);
}
.tune-in-btn:hover, .tune-in-btn:focus-visible {
  background: var(--green-light);
}
.tune-in-btn:active {
  box-shadow:
    inset -2px -2px 0 rgba(255, 255, 255, 0.2),
    inset 2px 2px 0 rgba(0, 0, 0, 0.5);
  transform: translateY(3px);
}
.power-icon { margin-right: 6px; }

.gate-hint {
  margin-top: 20px;
  font-size: 12px;
  color: var(--dim);
}

/* ---------------- site shell ---------------- */
.site {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.site.is-visible { display: flex; }

/* ---------------- ticker ---------------- */
.ticker-bar {
  background: var(--green);
  color: var(--void);
  overflow: hidden;
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 5px 0;
  font-weight: bold;
}
.ticker-track {
  display: inline-block;
  padding-left: 100%;
  animation: ticker 22s linear infinite;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ---------------- TV ---------------- */
.tv-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 32px 16px;
}

.tv-bezel {
  width: min(880px, 94vw);
  background: linear-gradient(160deg, #24261f, #14150f 60%);
  border-radius: 22px;
  padding: 22px 22px 30px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(138, 156, 104, 0.1);
  position: relative;
}

.tv-brand {
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--dim);
  margin-bottom: 10px;
}
.tv-brand span { color: #4f5246; }

.screen {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #070805;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.85), inset 0 0 2px #000;
}

.screen-hud {
  position: absolute;
  top: 10px; left: 12px; right: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(212, 210, 194, 0.75);
  z-index: 5;
  pointer-events: none;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}
.hud-rec { color: var(--rust); display: flex; align-items: center; gap: 5px; }
.hud-rec i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rust); display: inline-block;
  animation: recPulse 1.4s infinite;
}
@keyframes recPulse { 50% { opacity: 0.25; } }
.hud-channel { margin-left: auto; }
.hud-signal { letter-spacing: 1px; color: var(--green-light); }

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

.channel {
  position: absolute;
  inset: 0;
  display: none;
  opacity: 0;
  padding: 44px 22px 18px;
  overflow-y: auto;
}
.channel.active {
  display: block;
  opacity: 1;
  animation: chIn 0.35s ease both;
}
@keyframes chIn {
  from { opacity: 0; transform: scale(1.01); }
  to   { opacity: 1; transform: scale(1); }
}
.screen.is-flipping .channel.active { opacity: 0; }

#ch-00.active { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
#visualizer { width: 90%; max-width: 480px; height: 120px; }
.idle-caption { color: var(--dim); font-size: 12px; letter-spacing: 0.1em; margin-top: 6px; }

.channel-inner { max-width: 640px; margin: 0 auto; }

.ch-title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone);
  margin-bottom: 18px;
}

/* about */
.about-grid { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: start; }
.photo-slot {
  aspect-ratio: 1;
  border: 1px dashed rgba(212, 210, 194, 0.3);
  display: flex; align-items: center; justify-content: center;
  color: var(--dim); font-size: 11px; text-align: center;
}
.about-copy p { margin-bottom: 14px; color: rgba(212, 210, 194, 0.9); }
.tag-list { list-style: none; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.tag-list li {
  border: 1px solid var(--green); color: var(--green);
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
}

/* links */
.link-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.link-list a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid rgba(212, 210, 194, 0.12);
  color: var(--bone); text-transform: lowercase; letter-spacing: 0.04em;
}
.link-list a:hover, .link-list a:focus-visible { color: var(--green); text-decoration: none; }
.link-list .ic { width: 18px; height: 18px; fill: currentColor; stroke: none; flex-shrink: 0; }

.channel-note { color: var(--dim); font-size: 11px; margin-top: 16px; }

/* music / player */
.player-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.now-playing { font-size: 12px; color: var(--dim); }
.now-playing span { color: var(--green-light); }
.eq-bars { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.eq-bars i { width: 3px; background: var(--green); display: inline-block; animation: eq 1s ease-in-out infinite; }
.eq-bars i:nth-child(2n) { animation-duration: 0.7s; background: var(--rust); }
.eq-bars i:nth-child(3n) { animation-duration: 1.3s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 20px; } }
.player.is-paused .eq-bars i { animation: none; height: 4px; }

.player-controls { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.player-controls button { font-size: 18px; color: var(--bone); line-height: 1; }
.player-controls button:hover, .player-controls button:focus-visible { color: var(--green); }
.progress { flex: 1; height: 4px; background: rgba(212, 210, 194, 0.15); border-radius: 2px; overflow: hidden; }
.progress-fill { width: 35%; height: 100%; background: var(--green); }

.tracklist { list-style: none; padding: 0; margin-bottom: 14px; border-top: 1px solid rgba(212, 210, 194, 0.12); }
.track {
  display: flex; gap: 12px; padding: 10px 4px;
  border-bottom: 1px solid rgba(212, 210, 194, 0.12);
  cursor: pointer; font-size: 13px;
}
.track:hover { color: var(--green); }
.track.active { color: var(--green-light); }
.t-num { color: var(--dim); width: 18px; }
.t-name { flex: 1; }
.t-len { color: var(--dim); }

/* contact */
.contact-blurb { color: rgba(212, 210, 194, 0.85); margin-bottom: 14px; }
.contact-email {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--green);
}

/* ---------------- remote nav ---------------- */
.remote { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.remote-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel-2);
  border: 1px solid rgba(212, 210, 194, 0.1);
  padding: 10px 16px;
  border-radius: 8px;
  font-family: var(--font-head);
  letter-spacing: 0.08em;
  font-size: 15px;
  color: var(--bone);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.remote-btn .num { color: var(--dim); font-size: 11px; }
.remote-btn:hover, .remote-btn:focus-visible { border-color: var(--green); color: var(--green); }
.remote-btn[aria-pressed="true"] { border-color: var(--green-light); color: var(--green-light); }
.remote-btn.power { padding: 10px 14px; color: var(--dim); }
.remote-btn.power:hover, .remote-btn.power:focus-visible { color: var(--green); border-color: var(--green); }

/* ---------------- footer ---------------- */
.site-footer {
  padding: 18px 20px 26px;
  text-align: center;
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.04em;
}
.footer-row { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.badges { display: flex; gap: 8px; }
.badge { border: 1px solid rgba(212, 210, 194, 0.2); padding: 2px 8px; border-radius: 3px; }

/* ---------------- responsive ---------------- */
@media (max-width: 640px) {
  .about-grid { grid-template-columns: 84px 1fr; }
  .remote-btn { padding: 9px 12px; font-size: 13px; }
  .screen { aspect-ratio: 3 / 4; }
}

/* ---------------- reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  .crt-overlay { animation: none; }
  .glitch::before, .glitch::after { animation: none; opacity: 0; }
  .ticker-track { animation-duration: 70s; }
  .channel.active { animation: none; }
  .eq-bars i { animation: none; height: 10px; }
}
