:root {
  --magenta: #ff2fb9;
  --purple: #7b2fff;
  --acid: #a8ff2f;
  --orange: #ff7a2f;
  --ink: #0d0418;
  --cream: #fdf3e3;
  --logo-yellow: #ffde59;
  --logo-green: #7ed957;
  --font-display: "Titan One", cursive;
  --font-head: "Baloo 2", sans-serif;
  --font-body: "Space Grotesk", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--cream);
  background: var(--ink);
  overflow-x: hidden;
}

.svg-defs { position: absolute; width: 0; height: 0; }

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

/* ---------- animated psychedelic background ---------- */

/* Full-page kaleidoscope fractal background. Rotation is driven by scroll
   position from extras.js. */
.kaleido-bg {
  position: fixed;
  /* Extend well past the viewport so Safari's rubber-band overscroll never
     exposes the layer's edge. Anchor to the top with an explicit height
     instead of top+bottom insets: on iOS the fixed-position containing block
     resizes as the toolbar collapses during scroll, so a bottom-anchored
     layer gets resized/repositioned mid-scroll and visibly slips downward.
     vh units are measured against the large viewport and never change with
     toolbar state, keeping the layer rock solid. */
  top: -20vh;
  left: -20vw;
  width: 140vw;
  height: 140vh;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background: var(--ink);
  /* keep the layer on its own compositor layer so it doesn't flicker or
     detach during inertial scrolling on iOS */
  transform: translateZ(0);
}

.kaleido-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
}

/* Once the WebGL shader is running, the canvas replaces the CSS-gradient
   fallback layers below. */
.kaleido-bg.kaleido-webgl .kaleido-canvas { display: block; }
.kaleido-bg.kaleido-webgl::before,
.kaleido-bg.kaleido-webgl::after { display: none; }

.kaleido-bg::before,
.kaleido-bg::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220vmax;
  height: 220vmax;
  margin: -110vmax 0 0 -110vmax;
  border-radius: 50%;
  will-change: transform;
}

/* Palindromic colour stops inside each repeat give the mirrored,
   kaleidoscope-style symmetry. */
.kaleido-bg::before {
  background: repeating-conic-gradient(
    from 0deg,
    var(--magenta) 0deg,
    var(--purple) 12deg,
    var(--ink) 24deg,
    var(--acid) 36deg,
    var(--ink) 48deg,
    var(--purple) 60deg,
    var(--magenta) 72deg
  );
  opacity: 0.6;
  transform: rotate(var(--kaleido-rot, 0deg));
  filter: hue-rotate(var(--kaleido-hue, 0deg));
}

.kaleido-bg::after {
  background: repeating-conic-gradient(
    from 22deg,
    transparent 0deg,
    var(--orange) 18deg,
    var(--magenta) 36deg,
    var(--orange) 54deg,
    transparent 72deg
  );
  opacity: 0.45;
  mix-blend-mode: screen;
  transform: rotate(calc(var(--kaleido-rot, 0deg) * -1.6));
}

/* Darkens the edges and keeps the sections readable over the pattern. */
.kaleido-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 50%,
      rgba(13, 4, 24, 0.4) 0%,
      rgba(13, 4, 24, 0.7) 55%,
      rgba(13, 4, 24, 0.94) 100%);
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.5rem;
  background: rgba(13, 4, 24, 0.55);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 47, 185, 0.35);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--magenta);
  text-decoration: none;
  text-shadow: 0 0 12px var(--magenta);
}

.nav-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }

.nav-links a {
  font-family: var(--font-head);
  color: var(--cream);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  transition: color 0.25s, text-shadow 0.25s;
}

.nav-links a:hover {
  color: var(--acid);
  text-shadow: 0 0 10px var(--acid);
}

/* ---------- hero + video ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem 4rem;
}

.hero-title {
  line-height: 0;
}

.hero-logo-glow {
  display: inline-block;
  line-height: 0;
  animation: title-throb 6s ease-in-out infinite;
  /* Safari applies drop-shadow to the img's layout box; filter on a wrapper
     respects the PNG alpha channel instead of rendering a square glow. */
  filter:
    drop-shadow(0 0 20px var(--magenta))
    drop-shadow(0 0 60px var(--purple));
}

.hero-logo {
  display: block;
  width: min(340px, 45vw);
  height: auto;
  /* trim the transparent padding baked into the PNG (~17% top/bottom of its
     height; percentage margins resolve against width, hence ~9%) */
  margin: -9.4% auto -8.9%;
}

@keyframes title-throb {
  0%, 100% { transform: scale(1) rotate(-1deg); }
  50%      { transform: scale(1.04) rotate(1deg); }
}

.hero-tagline {
  font-family: var(--font-head);
  margin-top: 1rem;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--acid);
  text-shadow: 0 0 14px rgba(168, 255, 47, 0.6);
}

.video-section {
  width: min(900px, 100%);
  margin-top: 3rem;
}

.video-frame {
  position: relative;
  border-radius: 18px;
  padding: 6px;
  background: rgba(123, 47, 255, 0.22);
  /* soft blurred edge instead of a hard 1px border */
  box-shadow:
    0 0 6px 1px rgba(255, 47, 185, 0.4),
    0 0 30px rgba(255, 47, 185, 0.5),
    0 0 80px rgba(123, 47, 255, 0.35);
}

.video-frame video {
  display: block;
  width: 100%;
  border-radius: 13px;
  background: var(--ink);
}

.video-caption {
  margin-top: 0.9rem;
  font-family: var(--font-head);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(253, 243, 227, 0.75);
}

.transmission-archive {
  margin-top: 2rem;
  text-align: left;
}

.transmission-archive-title {
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(253, 243, 227, 0.55);
  margin-bottom: 0.9rem;
}

.transmission-thumbs {
  list-style: none;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.transmission-thumb {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 4px;
  border: 2px solid rgba(123, 47, 255, 0.45);
  border-radius: 12px;
  background: rgba(13, 4, 24, 0.75);
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.transmission-thumb:hover {
  border-color: var(--magenta);
  box-shadow: 0 0 20px rgba(255, 47, 185, 0.35);
  transform: translateY(-3px);
}

.transmission-thumb.is-active {
  border-color: var(--acid);
  box-shadow: 0 0 22px rgba(168, 255, 47, 0.4);
}

.transmission-thumb img {
  display: block;
  width: 140px;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  background: var(--ink);
}

.transmission-thumb-label {
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(253, 243, 227, 0.7);
  padding: 0 0.2rem 0.15rem;
  max-width: 140px;
}

.scroll-hint {
  margin-top: 2.5rem;
  font-size: 2rem;
  color: var(--acid);
  text-decoration: none;
  animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(10px); }
}

/* ---------- sections ---------- */

.section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  margin-bottom: 2.2rem;
  background: linear-gradient(to bottom, var(--logo-yellow) 35%, var(--logo-green) 75%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: url(#melt) drop-shadow(0 0 12px rgba(255, 47, 185, 0.75)) drop-shadow(0 0 30px rgba(123, 47, 255, 0.45));
}

/* bio */

.bio-card {
  background: rgba(13, 4, 24, 0.65);
  border: 2px solid var(--purple);
  border-radius: 20px;
  padding: 2.2rem;
  font-size: 1.15rem;
  line-height: 1.8;
  text-align: left;
  box-shadow: 0 0 40px rgba(123, 47, 255, 0.35), inset 0 0 30px rgba(123, 47, 255, 0.12);
}

.bio-card p + p { margin-top: 1rem; }

.bio-card strong { color: var(--magenta); }

/* band */

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.8rem;
}

.member-card {
  background: rgba(13, 4, 24, 0.65);
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s;
}

.member-card:hover {
  transform: translateY(-8px) rotate(-1.2deg);
  border-color: var(--acid);
  box-shadow: 0 0 35px rgba(168, 255, 47, 0.4);
}

.member-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #5a5a5a;
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.member-card h3 {
  font-family: var(--font-head);
  color: var(--magenta);
  font-size: 1.25rem;
  margin: 1rem 0 0.3rem;
}

.member-card p {
  color: rgba(253, 243, 227, 0.8);
  padding-bottom: 1.2rem;
}

/* music */

.music-card {
  background: rgba(13, 4, 24, 0.65);
  border: 2px dashed var(--magenta);
  border-radius: 20px;
  padding: 2.5rem;
  font-size: 1.15rem;
  line-height: 1.9;
  box-shadow: 0 0 40px rgba(255, 47, 185, 0.3);
}

.release-count {
  font-family: var(--font-head);
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.big-zero {
  font-family: var(--font-display);
  display: inline-block;
  font-size: 4.5rem;
  background: linear-gradient(to bottom, var(--logo-yellow) 30%, var(--logo-green) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  vertical-align: middle;
  margin-right: 0.6rem;
  filter: drop-shadow(0 0 14px rgba(255, 47, 185, 0.8)) drop-shadow(0 0 35px rgba(123, 47, 255, 0.5));
  animation: title-throb 5s ease-in-out infinite;
}

.album-teaser {
  margin-top: 1rem;
  font-style: italic;
  color: rgba(253, 243, 227, 0.75);
}

.music-notify-btn {
  display: inline-block;
  margin-top: 1.8rem;
  font-family: var(--font-head);
  font-size: 1.05rem;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  color: var(--cream);
  text-decoration: none;
  background: rgba(123, 47, 255, 0.22);
  border: 1px solid rgba(255, 47, 185, 0.45);
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, border-color 0.25s;
}

.music-notify-btn:hover {
  transform: scale(1.04);
  background: rgba(123, 47, 255, 0.35);
  border-color: rgba(255, 47, 185, 0.7);
  box-shadow: 0 0 22px rgba(255, 47, 185, 0.35);
}

/* signup */

.signup-blurb {
  margin-bottom: 1.8rem;
  font-size: 1.1rem;
  color: rgba(253, 243, 227, 0.85);
}

.signup-form {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.signup-form input {
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 0.9rem 1.2rem;
  min-width: min(320px, 80vw);
  border-radius: 999px;
  border: 2px solid var(--purple);
  background: rgba(13, 4, 24, 0.8);
  color: var(--cream);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.signup-form input:focus {
  border-color: var(--acid);
  box-shadow: 0 0 20px rgba(168, 255, 47, 0.4);
}

.signup-form button {
  font-family: var(--font-head);
  font-size: 1.05rem;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  color: var(--cream);
  background: rgba(13, 4, 24, 0.85);
  border: 1px solid rgba(255, 47, 185, 0.45);
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, border-color 0.25s;
}

.signup-form button:hover {
  transform: scale(1.04);
  background: rgba(13, 4, 24, 0.95);
  border-color: rgba(255, 47, 185, 0.7);
  box-shadow: 0 0 22px rgba(255, 47, 185, 0.35);
}

.signup-result {
  font-family: var(--font-head);
  font-size: 1.2rem;
  padding: 1.5rem;
  border-radius: 18px;
  max-width: 560px;
  margin: 0 auto;
}

.signup-success {
  color: var(--acid);
  border: 2px solid var(--acid);
  box-shadow: 0 0 30px rgba(168, 255, 47, 0.35);
  animation: title-throb 4s ease-in-out infinite;
}

.signup-glyph { font-size: 2rem; display: block; margin-bottom: 0.4rem; }

.signup-error {
  color: var(--orange);
  border: 2px solid var(--orange);
  box-shadow: 0 0 25px rgba(255, 122, 47, 0.35);
}

.signup-error .signup-form { margin-top: 1.2rem; }

/* socials */

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-link {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--cream);
  text-decoration: none;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  border: 2px solid var(--magenta);
  background: rgba(13, 4, 24, 0.65);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
}

.social-link:hover {
  transform: translateY(-4px) rotate(1deg);
  border-color: var(--acid);
  color: var(--acid);
  box-shadow: 0 0 25px rgba(168, 255, 47, 0.45);
}

.social-glyph { margin-right: 0.4rem; }

.social-glyph svg {
  width: 1.05em;
  height: 1.05em;
  display: inline-block;
  vertical-align: -0.15em;
}

/* footer */

.footer {
  text-align: center;
  padding: 1.5rem 1.5rem 1.25rem;
  border-top: 1px solid rgba(255, 47, 185, 0.35);
  background: rgba(13, 4, 24, 0.7);
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.8rem;
  background: linear-gradient(to bottom, var(--logo-yellow) 30%, var(--logo-green) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 47, 185, 0.75)) drop-shadow(0 0 24px rgba(123, 47, 255, 0.45));
  margin-bottom: 1rem;
}

.social-links-small { gap: 1.2rem; margin-bottom: 1rem; }

.social-links-small a {
  font-family: var(--font-head);
  color: rgba(253, 243, 227, 0.85);
  text-decoration: none;
}

.social-links-small a:hover { color: var(--acid); }

.footer-note {
  font-size: 0.85rem;
  color: rgba(253, 243, 227, 0.5);
}

/* ---------- scroll glitch ---------- */

.section-title,
.big-zero,
.footer-name {
  position: relative;
}

/* Frames are driven by JS custom-property updates from the scroll handler
   rather than CSS animations: Safari won't advance main-thread animation
   timelines while scrolling, but style invalidations still repaint. */
.is-glitching {
  animation: none;
  transform:
    translate(var(--glitch-x, 0px), var(--glitch-y, 0px))
    skewX(var(--glitch-skew, 0deg));
}

/* RGB-split ghost copies, sliced up and offset behind the gradient text */
.is-glitching::before,
.is-glitching::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.is-glitching::before {
  color: var(--magenta);
  transform: translate(var(--glitch-a-x, -6px), -2px);
  clip-path: inset(var(--glitch-a-top, 10%) 0 var(--glitch-a-bottom, 55%) 0);
}

.is-glitching::after {
  color: var(--acid);
  transform: translate(var(--glitch-b-x, 6px), 2px);
  clip-path: inset(var(--glitch-b-top, 55%) 0 var(--glitch-b-bottom, 10%) 0);
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .kaleido-bg { display: none; }
  .hero-logo-glow,
  .big-zero,
  .signup-success,
  .scroll-hint {
    animation: none;
  }
  .hero-logo-glow { animation: none; filter: none; }
  .section-title { filter: drop-shadow(0 0 12px rgba(255, 47, 185, 0.75)) drop-shadow(0 0 30px rgba(123, 47, 255, 0.45)); }
}
