/* Palette and type come straight from the game (src/style.css, src/data.js):
   near-black violet space, the band's rainbow livery, each member's weapon color,
   and the five stage fogs used as the ambient light behind each section. */
:root {
  --bg: #050308;
  --panel: rgba(10, 6, 18, 0.78);
  --line: rgba(180, 140, 255, 0.25);
  --text: #e8e2f4;
  --muted: #9a90b0;
  --accent: #b45cff;
  --red: #ff3b2f;
  --orange: #ff9a1f;
  --yellow: #ffe01f;
  --green: #5cff3a;
  --blue: #3ec7ff;
  --violet: #a35cff;
  --rainbow: linear-gradient(90deg, var(--red), var(--orange), var(--yellow), var(--green), var(--blue), var(--violet));
  /* Wreck stripes, in hull order */
  --livery-1: #ff3b2f;
  --livery-2: #ffb020;
  --livery-3: #c8ff2a;
  --livery-4: #3ec7ff;
  --livery-5: #a35cff;
  /* Stage fogs (skyBottom) */
  --fog-crimson: #4a0a0a;
  --fog-amber: #5a3008;
  --fog-verdant: #0c3a14;
  --fog-cobalt: #0a1c5a;
  --fog-violet: #2a0a4a;
  /* Set every frame by main.js: beat decays 1 → 0, level is loudness 0..1 */
  --beat: 0;
  --level: 0.3;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  background: var(--bg); color: var(--text); font-family: 'Rajdhani', system-ui, sans-serif; font-size: 18px;
  line-height: 1.5; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .btn, .kicker, .brand, nav a { font-family: 'Orbitron', sans-serif; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* Starfield + drifting nebula canvas sits behind everything */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--gutter); background: linear-gradient(rgba(5, 3, 8, 0.92), rgba(5, 3, 8, 0.6));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid rgba(180, 140, 255, 0.12);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; letter-spacing: 0.25em; font-size: 15px; }
.brand img { width: 34px; height: 34px; border-radius: 50%; filter: drop-shadow(0 0 calc(4px + 8px * var(--beat)) rgba(180, 92, 255, 0.8)); }
nav { display: flex; gap: 28px; }
nav a { text-decoration: none; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); transition: color 0.15s, text-shadow 0.15s; }
nav a:hover, nav a.active { color: var(--text); text-shadow: 0 0 12px var(--accent); }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; flex-direction: column; justify-content: center; gap: 6px; padding: 8px; }
.nav-toggle i { display: block; height: 2px; background: var(--text); transition: transform 0.2s, opacity 0.2s; }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: #07040c;
    border-bottom: 1px solid var(--line); max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
  }
  nav a { padding: 16px var(--gutter); border-top: 1px solid rgba(180, 140, 255, 0.08); font-size: 13px; }
  .nav.open nav { max-height: 400px; }
  .nav.open .nav-toggle i:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav.open .nav-toggle i:nth-child(2) { opacity: 0; }
  .nav.open .nav-toggle i:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- Shared pieces ---------- */
.row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--text);
  padding: 13px 28px; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:hover { background: rgba(180, 92, 255, 0.18); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: linear-gradient(90deg, #6a1fd0, #b45cff); border-color: transparent; font-weight: 700; }
.btn.primary:hover { box-shadow: 0 0 24px rgba(180, 92, 255, 0.7); }

.panel {
  background: var(--panel); border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

/* Hull livery: the five-color swoosh from the wreck */
.livery { display: flex; flex-direction: column; gap: 3px; width: 100%; transform: skewY(-2deg); }
.livery i { display: block; height: 4px; box-shadow: 0 0 10px currentColor; opacity: calc(0.7 + 0.3 * var(--beat)); }
.livery i:nth-child(1) { background: var(--livery-1); color: var(--livery-1); }
.livery i:nth-child(2) { background: var(--livery-2); color: var(--livery-2); }
.livery i:nth-child(3) { background: var(--livery-3); color: var(--livery-3); }
.livery i:nth-child(4) { background: var(--livery-4); color: var(--livery-4); }
.livery i:nth-child(5) { background: var(--livery-5); color: var(--livery-5); }

/* ---------- Sections: each one is lit by a stage's fog ---------- */
.section, .hero { position: relative; padding: 110px var(--gutter) 90px; isolation: isolate; }
.section::before, .hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, color-mix(in srgb, var(--fog) 85%, transparent), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 100%, color-mix(in srgb, var(--fog) 40%, transparent), transparent 70%);
}
.ring-crimson { --fog: var(--fog-crimson); --glow: var(--red); }
.ring-amber { --fog: var(--fog-amber); --glow: var(--orange); }
.ring-verdant { --fog: var(--fog-verdant); --glow: var(--green); }
.ring-cobalt { --fog: var(--fog-cobalt); --glow: var(--blue); }
.ring-violet { --fog: var(--fog-violet); --glow: var(--accent); }

.section > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
.kicker { color: var(--glow, var(--accent)); letter-spacing: 0.3em; text-transform: uppercase; font-size: 12px; font-weight: 700; text-align: center; text-shadow: 0 0 12px var(--glow, var(--accent)); }
.section h2 { font-size: clamp(26px, 4.4vw, 46px); letter-spacing: 0.12em; text-transform: uppercase; text-align: center; margin: 10px auto 28px; line-height: 1.15; }
.lede { max-width: 720px; text-align: center; color: #cfc7e0; font-size: 20px; margin-bottom: 44px; }
.fine { text-align: center; color: var(--muted); margin-top: 24px; }
.fine a { color: var(--glow); }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding-top: 96px; }
.hero::before { background: radial-gradient(ellipse 80% 60% at 50% 45%, color-mix(in srgb, var(--fog) 90%, transparent), transparent 72%); }
.hero-logo { position: relative; width: min(400px, 72vw); aspect-ratio: 1; margin-bottom: 12px; }
/* The logo's black is keyed out to alpha in the file itself (mix-blend-mode isn't reliable on mobile Safari) */
.hero-logo img {
  width: 100%; height: 100%;
  transform: scale(calc(1 + 0.04 * var(--beat)));
  filter: brightness(calc(1 + 0.3 * var(--beat))) drop-shadow(0 0 calc(8px + 16px * var(--level)) rgba(180, 92, 255, 0.6));
}
/* The crosshair beat ring: closes in on every beat */
.beat-ring {
  position: absolute; inset: -14%; border-radius: 50%; border: 2px solid var(--accent);
  transform: scale(calc(1.18 - 0.18 * var(--beat))); opacity: calc(0.15 + 0.55 * var(--beat));
  box-shadow: 0 0 24px rgba(180, 92, 255, 0.5), inset 0 0 24px rgba(180, 92, 255, 0.3);
}
.tagline { font-size: clamp(17px, 2.2vw, 22px); color: var(--muted); letter-spacing: 0.08em; max-width: 560px; }
.hero .row { margin-top: 10px; }
.hero .livery { position: absolute; left: 0; right: 0; bottom: 48px; width: auto; }

/* ---------- Members ---------- */
.members { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1000px) { .members { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .members { grid-template-columns: 1fr; } }
.member {
  --c: #fff; position: relative; background: var(--panel); border: 1px solid var(--line); padding: 24px 20px;
  display: flex; flex-direction: column; gap: 8px; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.member::after { content: ''; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--c); box-shadow: 0 0 14px var(--c); opacity: calc(0.5 + 0.5 * var(--beat)); }
.member:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 0 30px color-mix(in srgb, var(--c) 40%, transparent); }
.member .icon { height: 92px; display: flex; align-items: center; justify-content: center; color: var(--c); filter: drop-shadow(0 0 calc(8px + 10px * var(--beat)) var(--c)); }
.member .icon svg { height: 100%; width: auto; max-width: 120px; }
.member h3 { font-size: 26px; letter-spacing: 0.1em; color: var(--c); }
.member .inst { text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted); font-size: 13px; margin-top: -6px; }
.member p { color: #cfc7e0; font-size: 16px; line-height: 1.45; flex: 1; }
.member .plays { text-align: center; color: var(--c); text-transform: uppercase; letter-spacing: 0.15em; font-size: 12px; font-weight: 700; text-shadow: 0 0 10px color-mix(in srgb, var(--c) 50%, transparent); }

/* ---------- Music ---------- */
.player { padding: 28px 30px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px 30px; align-items: center; margin-bottom: 18px; }
.now-label { color: var(--muted); letter-spacing: 0.3em; text-transform: uppercase; font-size: 12px; }
.now-title { font-family: 'Orbitron', sans-serif; font-size: clamp(20px, 2.6vw, 28px); font-weight: 700; letter-spacing: 0.06em; color: var(--track, var(--orange)); text-shadow: 0 0 calc(8px + 14px * var(--beat)) var(--track, var(--orange)); }
.now-meta { color: var(--muted); letter-spacing: 0.15em; text-transform: uppercase; font-size: 14px; }
/* Holographic EQ, like the one mounted on each weapon */
.eq { height: 90px; display: flex; align-items: flex-end; gap: 4px; grid-row: span 2; padding: 6px; border: 1px solid rgba(255, 154, 31, 0.18); background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 10px); }
.eq i { flex: 1; height: 8%; background: linear-gradient(to top, var(--track, var(--orange)), color-mix(in srgb, var(--track, var(--orange)) 30%, #fff)); box-shadow: 0 0 10px var(--track, var(--orange)); opacity: 0.85; }
.controls { display: flex; align-items: center; gap: 16px; }
.play {
  flex: none; width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer; color: #120a00;
  background: var(--track, var(--orange)); box-shadow: 0 0 calc(12px + 16px * var(--beat)) var(--track, var(--orange));
  display: grid; place-items: center; transition: transform 0.1s;
}
.play:active { transform: scale(0.94); }
.play svg { width: 24px; height: 24px; }
.play .i-pause, .playing .play .i-play { display: none; }
.playing .play .i-pause { display: block; }
.progress { flex: 1; height: 6px; background: rgba(255, 255, 255, 0.08); cursor: pointer; position: relative; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--rainbow); box-shadow: 0 0 10px rgba(255, 160, 60, 0.6); }
.player-note { grid-column: 1 / -1; color: var(--muted); font-size: 15px; }
@media (max-width: 720px) {
  .player { grid-template-columns: 1fr; padding: 22px 20px; }
  .eq { grid-row: auto; height: 70px; }
}

.tracks { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 30px; counter-reset: t; }
@media (max-width: 720px) { .tracks { grid-template-columns: 1fr; } }
.tracks button {
  --c: var(--orange); width: 100%; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; text-align: left;
  padding: 14px 16px; background: rgba(10, 6, 18, 0.6); border: 1px solid var(--line); color: var(--text); cursor: pointer; font: inherit;
  border-left: 3px solid var(--c); transition: background 0.15s, box-shadow 0.15s;
}
.tracks button:hover { background: color-mix(in srgb, var(--c) 12%, rgba(10, 6, 18, 0.6)); }
.tracks button.current { box-shadow: 0 0 22px color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 14%, rgba(10, 6, 18, 0.6)); }
.tracks .n { font-family: 'Orbitron', sans-serif; color: var(--c); font-size: 14px; }
.tracks .t { font-weight: 700; font-size: 18px; letter-spacing: 0.04em; }
.tracks .b { color: var(--muted); font-size: 13px; letter-spacing: 0.15em; }

/* ---------- Tour ---------- */
.soon {
  padding: 36px 24px; text-align: center; font-family: 'Orbitron', sans-serif; font-weight: 700;
  font-size: clamp(18px, 3vw, 28px); letter-spacing: 0.14em; text-transform: uppercase; color: var(--green);
  text-shadow: 0 0 calc(10px + 14px * var(--beat)) rgba(92, 255, 58, 0.7); border-color: rgba(92, 255, 58, 0.3);
}

/* ---------- Media ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: clamp(180px, 26vw, 320px); gap: 12px; margin-bottom: 26px; }
.gallery figure { position: relative; overflow: hidden; border: 1px solid rgba(62, 199, 255, 0.2); }
.gallery figure.wide { grid-column: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s, filter 0.4s; filter: saturate(0.9) brightness(0.9); }
.gallery figure::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 28, 90, 0.55), transparent 45%); pointer-events: none; }
.gallery figure:hover img { transform: scale(1.04); filter: saturate(1.1) brightness(1); }
@media (max-width: 720px) {
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 42vw; gap: 8px; }
}

.game-card { display: grid; grid-template-columns: 120px 1fr auto; gap: 24px; align-items: center; padding: 24px 28px; text-decoration: none; transition: box-shadow 0.15s, border-color 0.15s; }
.game-card:hover { border-color: var(--blue); box-shadow: 0 0 30px rgba(62, 199, 255, 0.25); }
.game-card img { width: 120px; border-radius: 50%; filter: drop-shadow(0 0 14px rgba(62, 199, 255, 0.4)); }
.game-card .kicker { text-align: left; }
.game-card h3 { font-size: 28px; letter-spacing: 0.2em; text-transform: uppercase; margin: 4px 0 6px; }
.game-card p { color: #cfc7e0; font-size: 16px; }
@media (max-width: 720px) {
  .game-card { grid-template-columns: 72px 1fr; padding: 20px; gap: 16px; }
  .game-card img { width: 72px; }
  .game-card .btn { grid-column: 1 / -1; text-align: center; }
}

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } }
.channels, .signup { padding: 28px 30px; display: flex; flex-direction: column; gap: 16px; }
.channels > div:not(.socials) { display: flex; flex-direction: column; border-bottom: 1px solid rgba(180, 140, 255, 0.12); padding-bottom: 12px; }
.channels span { font-family: 'Orbitron', sans-serif; font-size: 11px; letter-spacing: 0.3em; color: var(--accent); text-transform: uppercase; }
.channels a { font-size: 20px; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.channels a:hover { text-shadow: 0 0 12px var(--accent); }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a { font-size: 14px; letter-spacing: 0.15em; text-transform: uppercase; border: 1px solid var(--line); padding: 8px 14px; }
.socials a:hover { border-color: var(--accent); box-shadow: 0 0 14px rgba(180, 92, 255, 0.35); }
.signup h3 { font-size: 22px; letter-spacing: 0.12em; text-transform: uppercase; }
.signup p { color: #cfc7e0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.field input {
  font: inherit; font-size: 18px; color: var(--text); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  padding: 12px 14px; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(180, 92, 255, 0.25), 0 0 20px rgba(180, 92, 255, 0.25); }
.signup .btn { align-self: flex-start; }
.thanks { color: var(--green); font-weight: 700; letter-spacing: 0.05em; }

/* ---------- Footer ---------- */
.footer { padding: 40px var(--gutter) 48px; text-align: center; color: var(--muted); font-size: 15px; letter-spacing: 0.08em; }
.footer .livery { max-width: 420px; margin: 0 auto 24px; }

/* Focus and motion */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
