@font-face {
  font-family: "MenuFont";
  src: url("fonts/unsteady.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --text: #dcefdc;
  --accent: #a8d8a8;
  --bg: #020302;

  --menu-font: "MenuFont", Georgia, serif;

  /*
    Fake CSS bulge pressure.
    This stays global. If performance suffers, lower it.
  */
  --screen-scale: 1.5;

  /*
    Unified responsive UI sizing.
    These use both width and height, so phones do not get wrecked
    just because vw becomes ridiculous on narrow screens.
  */
  --page-pad-top: clamp(1rem, 6svh, 4.5rem);
  --page-pad-x: clamp(0.75rem, 4vw, 3rem);
  --page-pad-bottom: calc(1rem + env(safe-area-inset-bottom));

  --logo-size: clamp(2.8rem, min(18vw, 14svh), 10rem);
  --logo-gap: clamp(0.25rem, 1svh, 0.9rem);

  --subtitle-size: clamp(0.75rem, min(3vw, 2svh), 1.4rem);

  --menu-size: clamp(2rem, min(12vw, 8svh), 8rem);
  --menu-gap: clamp(0.75rem, 2svh, 1.5rem);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, sans-serif;
}

body {
  cursor: default;
}

/* =========================
   BACKGROUND VIDEO
   ========================= */

.background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;

  /*
    No border-radius here.
    The vignette creates the screen shape instead.
  */
  border-radius: 0;
  transform: none;
}

.background-video {
  position: absolute;

  /*
    Overscan the video so vignette/corners never expose weird edges.
  */
  inset: -4%;
  width: 108%;
  height: 108%;

  object-fit: cover;
  display: block;

  opacity: 0;
  transform: scale(var(--screen-scale));
  transform-origin: center;

  filter:
    brightness(0.75)
    contrast(1.06)
    saturate(0.78)
    blur(0.18px);

  transition: opacity 220ms steps(2, end);
  will-change: opacity;
}

.background-video.active {
  opacity: 1;
}

/* =========================
   CHANNEL CHANGE FLASH
   ========================= */

.channel-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;

  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.48) 0px,
      rgba(255, 255, 255, 0.48) 1px,
      rgba(0, 0, 0, 0.75) 2px,
      rgba(0, 0, 0, 0.75) 4px
    );

  opacity: 0;
}

.channel-flash.active {
  animation: channel-flash 260ms steps(2, end);
}

@keyframes channel-flash {
  0% {
    opacity: 0;
  }

  20% {
    opacity: 0.85;
  }

  55% {
    opacity: 0.28;
  }

  100% {
    opacity: 0;
  }
}

/* =========================
   CRT COLOR TINT
   ========================= */

.crt-tint {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;

  background:
    linear-gradient(
      rgba(120, 255, 170, 0.035),
      rgba(80, 180, 130, 0.025)
    );

  mix-blend-mode: screen;
  opacity: 0.75;
}

/* =========================
   CRT OVERLAY / VIGNETTE
   ========================= */

.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;

  border-radius: 0;
}

/* Scanlines */
.crt-overlay::before {
  content: "";
  position: absolute;
  inset: 0;

  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.045) 0px,
      rgba(255, 255, 255, 0.045) 2px,
      rgba(0, 0, 0, 0.2) 4px,
      rgba(0, 0, 0, 0.2) 6px
    );

  opacity: 0.7;
  mix-blend-mode: overlay;
}

/*
  Vignette + fake curved glass shading.
  This hides the corners without relying on border-radius.
*/
.crt-overlay::after {
  content: "";
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      ellipse 78% 64% at center,
      rgba(255, 255, 255, 0.10) 0%,
      rgba(255, 255, 255, 0.035) 28%,
      rgba(0, 0, 0, 0.08) 48%,
      rgba(0, 0, 0, 0.45) 68%,
      rgba(0, 0, 0, 0.86) 84%,
      rgba(0, 0, 0, 1) 100%
    );

  opacity: 1;
}

/* =========================
   FOREGROUND UI
   ========================= */

.content {
  position: fixed;
  inset: 0;
  z-index: 5;

  /*
    One unified layout.

    Row 1: logo takes the space it needs.
    Row 2: menu gets the remaining space.
    The menu is centered inside row 2.

    This works on desktop and mobile without separate layout systems.
  */
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);

  padding-top: calc(var(--page-pad-top) + env(safe-area-inset-top));
  padding-inline: var(--page-pad-x);
  padding-bottom: var(--page-pad-bottom);

  pointer-events: none;
  text-align: center;

  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.65),
    0 0 22px rgba(67, 67, 67, 0.45);
}

/* =========================
   TEXT LOGO
   ========================= */

.logo {
  justify-self: center;
  align-self: start;

  width: min(92vw, 1200px);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--logo-gap);

  user-select: none;
  pointer-events: auto;
}

.logo-text {
  font-family: var(--menu-font);
  font-size: var(--logo-size);

  /*
    This controls the actual height of the logo block.
    Your old 4lh made the layout box enormous.
  */
  line-height: 1.2;

  color: var(--text);
  letter-spacing: -0.06em;
  text-decoration: none;
  text-align: center;

  /*
    Prefer one line.
    If the screen is too narrow, it may wrap naturally.
  */
  white-space: normal;
  max-width: 100%;
  text-wrap: balance;

  transform: scaleX(1) scaleY(1);
  transform-origin: center;

  filter:
    brightness(1.05)
    contrast(1.05)
    blur(0.15px);

  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.75),
    0 0 12px rgba(255, 255, 255, 0.55),
    0 0 28px rgba(208, 208, 208, 0.35),
    4px 4px 0 rgba(0, 0, 0, 0.45),
    -2px -1px 0 rgba(180, 255, 210, 0.18),
    2px 1px 0 rgba(255, 120, 120, 0.12);
}

/* subtle CRT jitter/glow on the logo */
.logo-text::selection {
  background: transparent;
}

.logo-subtitle {
  /*
    No margin-top here.
    The parent .logo gap controls spacing consistently.
  */
  margin-top: 2rem;

  font-family: var(--menu-font);
  font-size: var(--subtitle-size);
  line-height: 1.5;

  color: rgba(220, 239, 220, 0.86);
  letter-spacing: -0.08em;
  text-align: center;

  max-width: 100%;

  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.5),
    0 0 14px rgba(125, 125, 125, 0.35);

  filter:
    brightness(1.02)
    contrast(1.04)
    blur(0.08px);

  user-select: none;
}

/* =========================
   CENTERED TEXT MENU LINKS
   ========================= */

.menu {
  /*
    Unified behavior:
    center inside the remaining space below the logo.
  */
  justify-self: center;
  align-self: center;

  display: flex;
  flex-direction: column;
  gap: var(--menu-gap);
  align-items: center;

  max-width: 96vw;

  pointer-events: auto;
}

.menu-link {
  position: relative;

  color: var(--text);
  font-family: var(--menu-font);
  font-size: var(--menu-size);
  line-height: 1;
  letter-spacing: -0.001em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;

  max-width: 96vw;
  overflow-wrap: anywhere;

  cursor: pointer;
  user-select: none;

  transform: scale(1);
  transition:
    transform 160ms ease,
    color 160ms ease,
    text-shadow 160ms ease;

  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.65),
    0 0 22px rgba(67, 67, 67, 0.45);
}

.menu-link:hover,
.menu-link:focus-visible {
  color: #f0fff0;
  transform: scale(1.12);
  text-transform: none;

  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.65),
    0 0 32px rgba(67, 67, 67, 0.45);

  outline: none;
}

.menu-link:hover::after,
.menu-link:focus-visible::after {
  width: 100%;
}

.menu-link.clicked {
  animation: menu-hit 420ms ease;
}

@keyframes menu-hit {
  0% {
    transform: scale(1.12);
  }

  35% {
    transform: scale(1.28) rotate(-1deg);
  }

  70% {
    transform: scale(0.98) rotate(1deg);
  }

  100% {
    transform: scale(1.12);
  }
}

/* =========================
   MUSIC WIDGET
   ========================= */

.music-widget {
  position: fixed;
  left: clamp(0.75rem, 2vw, 18px);
  bottom: calc(clamp(0.75rem, 2svh, 16px) + env(safe-area-inset-bottom));
  z-index: 6;

  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.4vw, 0.9rem);

  max-width: min(48vw, 420px);

  font-family: var(--menu-font);
  color: var(--text);

  pointer-events: none;
  user-select: none;

  opacity: 0.86;

  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.55),
    0 0 18px rgba(125, 125, 125, 0.35);
}

.vinyl {
  display: block;

  width: clamp(34px, min(7vw, 7svh), 64px);
  height: clamp(34px, min(7vw, 7svh), 64px);

  object-fit: contain;
  transform-origin: center;

  filter:
    drop-shadow(0 0 6px rgba(157, 157, 157, 0.35))
    drop-shadow(0 0 18px rgba(181, 181, 181, 0.975));

  animation: vinyl-spin 5.4s linear infinite;
  animation-play-state: paused;
}

.music-widget.is-playing .vinyl {
  animation-play-state: running;
}

.music-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  min-width: 0;
}

.music-label {
  font-size: clamp(0.58rem, min(1.3vw, 1.3svh), 0.78rem);
  line-height: 1;

  letter-spacing: 0.1em;
  text-transform: uppercase;

  color: rgba(255, 255, 255, 0.72);
}

.music-title {
  margin-top: 0.18rem;

  font-size: clamp(0.8rem, min(1.8vw, 1.8svh), 1.15rem);
  line-height: 1;

  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.78);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;

  max-width: min(34vw, 320px);
}

@keyframes vinyl-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* =========================
   CONTACT WIDGET
   ========================= */

.contact-widget {
  position: fixed;
  right: clamp(0.75rem, 2vw, 18px);
  bottom: calc(clamp(0.75rem, 2svh, 16px) + env(safe-area-inset-bottom));
  z-index: 6;

  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.18rem;

  max-width: min(42vw, 360px);

  margin: 0;

  font-family: var(--menu-font);
  font-size: clamp(0.65rem, min(1.6vw, 1.4svh), 0.9rem);
  line-height: 1.05;
  font-style: normal;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.06em;

  color: rgba(255, 255, 255, 0.78);

  pointer-events: auto;
  user-select: none;

  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.45),
    0 0 16px rgba(125, 125, 125, 0.35);
}

.contact-widget a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.contact-widget a:hover,
.contact-widget a:focus-visible {
  color: #f0fff0;
  outline: none;

  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.7),
    0 0 22px rgba(125, 125, 125, 0.45);
}

/* =========================
   SOUND HINT
   ========================= */

.sound-hint {
  position: fixed;
  left: 50%;
  bottom: calc(clamp(0.75rem, 2svh, 16px) + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 6;

  font-family: var(--menu-font);
  font-size: clamp(0.65rem, min(2.4vw, 1.6svh), 0.85rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;

  max-width: 90vw;

  opacity: 0.76;
  color: var(--accent);

  text-shadow: 0 0 8px rgba(249, 249, 249, 0.75);
  pointer-events: none;
}

.sound-hint.hidden {
  display: none;
}

/* =========================
   ACCESSIBILITY
   ========================= */

@media (prefers-reduced-motion: reduce) {
  .background-video,
  .menu-link,
  .menu-link.clicked,
  .channel-flash.active,
  .vinyl {
    animation: none;
    transition: none;
  }
}