:root {
  --mouse-x: 0;
  --mouse-y: 0;
  --scroll: 0;
  --page-bg: #090019;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
}

body {
  min-height: 320vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--page-bg);
  color: white;
  font-family: Arial, Helvetica, sans-serif;
}

.page-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(9, 0, 25, 0.08), rgba(9, 0, 25, 0.28) 48%, rgba(9, 0, 25, 0.58) 100%),
    url("assets/fira-purple-background.png") center / cover no-repeat,
    var(--page-bg);
}

.page-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(198, 57, 255, 0.2), transparent 36%),
    radial-gradient(circle at 50% 84%, rgba(175, 48, 255, 0.18), transparent 42%);
}

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 320vh;
}

.site-actions {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 20;
  display: flex;
  gap: 10px;
  align-items: center;
}

.discord-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(88, 101, 242, 0.86), rgba(171, 59, 255, 0.74)),
    rgba(9, 0, 25, 0.62);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.24),
    0 0 18px rgba(146, 80, 255, 0.24);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.discord-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.46);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(164, 90, 255, 0.34);
}

.discord-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.82);
  outline-offset: 3px;
}

.discord-button.compact {
  min-height: 42px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.discord-button.large {
  min-height: 50px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: clamp(0.82rem, 1.35vw, 1rem);
}

.discord-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.discord-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.hero {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
}

.hero-bg,
.hero-vignette {
  position: absolute;
  inset: 0;
}

.hero-bg {
  z-index: -3;
  background-image: url("assets/fira-purple-background.png");
  background-size: cover;
  background-position: center;
  transform:
    translate3d(
      calc(var(--mouse-x) * -18px),
      calc((var(--mouse-y) * -18px) + (var(--scroll) * -60px)),
      0
    )
    scale(1.08);
  transition: transform 120ms ease-out;
  will-change: transform;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: -12%;
  background:
    radial-gradient(circle at calc(50% + (var(--mouse-x) * 20%)) calc(28% + (var(--mouse-y) * 16%)), rgba(196, 67, 255, 0.34), transparent 34%),
    radial-gradient(circle at 50% 90%, rgba(197, 43, 255, 0.2), transparent 38%);
  opacity: calc(0.78 - (var(--scroll) * 0.28));
}

.hero-vignette {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(3, 0, 11, 0.08), rgba(3, 0, 11, 0.38)),
    radial-gradient(circle at center, transparent 28%, rgba(3, 0, 12, 0.48) 100%);
  pointer-events: none;
}

.logo-stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  pointer-events: none;
}

.logo-glow {
  position: absolute;
  width: min(58vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(116, 255, 238, 0.24), rgba(216, 54, 255, 0.18) 36%, transparent 68%);
  filter: blur(12px);
  opacity: calc(0.82 - (var(--scroll) * 0.82));
  transform:
    translate3d(
      calc(var(--mouse-x) * 28px),
      calc((var(--mouse-y) * 24px) - (var(--scroll) * 80px)),
      0
    )
    scale(calc(1 - (var(--scroll) * 0.18)));
  will-change: transform, opacity;
}

.hero-brand {
  display: grid;
  justify-items: center;
  gap: clamp(22px, 4vh, 38px);
  transform:
    translate3d(
      calc(var(--mouse-x) * 18px),
      calc((var(--mouse-y) * 15px) - (var(--scroll) * 185px)),
      0
    )
    scale(calc(1 - (var(--scroll) * 0.36)));
  opacity: calc(1 - var(--scroll));
  transition: transform 120ms ease-out, opacity 120ms ease-out;
  animation: floatLogo 5.8s ease-in-out infinite;
  will-change: transform, opacity;
}

.hero-brand h1 {
  max-width: min(1100px, calc(100vw - 36px));
  margin: 0;
  text-align: center;
  color: #fff;
  font-size: clamp(1.55rem, 4.6vw, 4.75rem);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.2),
    0 14px 34px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(189, 67, 255, 0.5);
}

.hero-brand h1 span {
  font-weight: 1000;
}

.logo-card {
  width: clamp(170px, 28vw, 350px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 23%;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.45),
    0 0 42px rgba(150, 54, 255, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.logo-card img {
  display: block;
  width: 146%;
  height: 146%;
  object-fit: cover;
  object-position: center;
  transform: translate(-15.8%, -15.8%);
  user-select: none;
}

.scroll-space {
  position: absolute;
  left: 50%;
  bottom: 30px;
  width: 2px;
  height: 58px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  opacity: calc(0.8 - (var(--scroll) * 1.4));
  transform: translateX(-50%);
}

.scroll-space::after {
  content: "";
  position: absolute;
  left: 0;
  top: -40%;
  width: 100%;
  height: 42%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.85);
  animation: scrollPulse 1.5s ease-in-out infinite;
}

.about-section {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(320px, 520px);
  gap: 28px;
  min-height: 82vh;
  padding: 120px 5vw 40px;
  justify-content: space-between;
  align-items: start;
}

.tv-panel,
.about-panel {
  align-self: start;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(8, 0, 20, 0.62);
  box-shadow:
    0 24px 68px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.tv-panel {
  width: 100%;
  justify-self: start;
}

.about-panel {
  width: min(520px, 100%);
  justify-self: end;
}

.about-panel h2 {
  max-width: 440px;
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 2.1vw, 2.1rem);
  line-height: 1;
  text-transform: uppercase;
  text-shadow:
    0 12px 28px rgba(0, 0, 0, 0.44),
    0 0 24px rgba(189, 67, 255, 0.4);
}

.tv-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
}

.tv-brand img {
  width: clamp(76px, 8vw, 116px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 8px;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(37, 217, 255, 0.24);
}

.tv-brand h2 {
  max-width: 440px;
  margin: 0;
  font-size: clamp(2.2rem, 5.6vw, 5.2rem);
  line-height: 0.86;
  text-transform: uppercase;
  text-shadow:
    0 12px 28px rgba(0, 0, 0, 0.44),
    0 0 24px rgba(189, 67, 255, 0.4);
}

.tv-brand .panel-kicker {
  margin-bottom: 6px;
}

.tv-panel p,
.about-panel p {
  max-width: 460px;
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.88rem;
  line-height: 1.48;
}

.youtube-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin: 6px 0 18px;
  padding: 0 15px 0 12px;
  color: #fff;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 0, 0, 0.88), rgba(167, 46, 255, 0.72)),
    rgba(9, 0, 25, 0.62);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.22),
    0 0 18px rgba(255, 64, 126, 0.2);
  transition: transform 160ms ease, border-color 160ms ease;
}

.youtube-link:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.45);
}

.youtube-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.youtube-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.video-slot {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  min-height: 360px;
  min-height: 0;
  padding: 0;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(0, 0, 0, 0.2);
}

.video-slot iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-title-link {
  display: inline-block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.video-title-link:hover {
  color: #fff;
  text-decoration: underline;
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 18px 0 18px;
}

.feature-item {
  min-height: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.feature-item h3 {
  margin: 0 0 5px;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.feature-item p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.38;
}

.about-panel .disclaimer {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-style: italic;
}

.background-extension {
  position: relative;
  z-index: 4;
  display: grid;
  align-items: end;
  min-height: 130vh;
  padding: 0 24px 54px;
  background:
    linear-gradient(180deg, rgba(10, 0, 27, 0), rgba(10, 0, 27, 0.2) 45%, rgba(9, 0, 25, 0.46) 100%);
}

.discord-panel {
  position: relative;
  z-index: 5;
  width: min(620px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 2.8vw, 26px);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(7, 0, 18, 0.52);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.panel-kicker {
  margin: 0 0 7px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.discord-panel h2 {
  margin: 0 0 17px;
  font-size: clamp(1.45rem, 3.3vw, 2.55rem);
  line-height: 0.95;
  text-transform: uppercase;
  text-shadow:
    0 10px 24px rgba(0, 0, 0, 0.42),
    0 0 22px rgba(189, 67, 255, 0.36);
}

.discord-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

@keyframes floatLogo {
  0%,
  100% {
    margin-top: 0;
  }

  50% {
    margin-top: -14px;
  }
}

@keyframes scrollPulse {
  0% {
    transform: translateY(0);
    opacity: 0;
  }

  35% {
    opacity: 1;
  }

  100% {
    transform: translateY(180px);
    opacity: 0;
  }
}

@media (max-width: 720px) {
  .site-actions {
    top: 14px;
    right: 14px;
    left: 14px;
    justify-content: center;
    gap: 8px;
  }

  .discord-button.compact {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.68rem;
  }

  .discord-icon {
    width: 22px;
    height: 22px;
  }

  .hero-brand {
    gap: 20px;
  }

  .hero-brand h1 {
    max-width: min(420px, calc(100vw - 28px));
    font-size: clamp(1.35rem, 7.2vw, 2.5rem);
    line-height: 1.06;
  }

  .logo-card {
    width: clamp(150px, 48vw, 240px);
  }

  .hero-bg {
    background-position: 42% center;
  }

  .background-extension {
    padding: 0 14px 56px;
  }

  .about-section {
    min-height: auto;
    padding: 82px 14px 24px;
    grid-template-columns: 1fr;
    gap: 16px;
    justify-items: center;
  }

  .tv-panel,
  .about-panel {
    width: min(420px, 100%);
    justify-self: center;
    padding: 18px 14px;
  }

  .tv-brand {
    gap: 12px;
  }

  .tv-brand img {
    width: 68px;
  }

  .tv-brand h2 {
    font-size: clamp(2rem, 13vw, 3.2rem);
  }

  .video-slot {
    min-height: 0;
  }

  .discord-panel {
    padding: 24px 14px;
  }

  .discord-links {
    display: grid;
  }

  .discord-button.large {
    width: 100%;
    min-height: 48px;
    padding: 0 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
