/* MUCKSNIPE — dark stage, portrait coverflow cards, white pill CTAs.
   Brand theme: gold accents from the grill, static film grain, a brief
   glitch flicker on the hero title (motion only, never under reduced
   motion). Motion rules: transform/opacity only. Reduced motion kills
   every transition and the JS snaps instead of lerping, so the site stays
   fully usable with animations off. */

* { box-sizing: border-box; }

:root {
  --bg: #050505;
  --panel: #111111;
  --line: #262626;
  --text: #ffffff;
  --muted: #b8b8b8;
  --faint: #8a8a8a;
  --gold: #e3b93e;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

/* Static film grain over the page (no animation, so it stays under
   reduced motion too). Sits below the header and the lightbox. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

a { color: var(--text); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: #000;
  padding: 0.6rem 1rem;
  z-index: 200;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  border-radius: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(5, 5, 5, 0.92);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 900;
  letter-spacing: 0.14em;
  text-decoration: none;
  font-size: 1.05rem;
}

.site-header nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-header nav a { text-decoration: none; color: var(--muted); font-weight: 600; }
.site-header nav a:hover, .site-header nav a:focus { color: #fff; }

main { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

.hero { text-align: center; padding: 5rem 1rem 3rem; }

.eyebrow {
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 1rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.5rem, 12vw, 9rem);
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: -0.02em;
}

/* Glitch flicker: mostly still, with a brief red/cyan split twice per
   5-second cycle. Gated to motion-ok users only. */
@media (prefers-reduced-motion: no-preference) {
  .glitch-title { animation: glitch-flicker 5s infinite steps(1); }
  @keyframes glitch-flicker {
    0%, 88%, 94%, 100% { text-shadow: none; transform: none; }
    89% { text-shadow: -3px 0 #ff2d55, 3px 0 #22d3ee; transform: translateX(1px); }
    91% { text-shadow: 3px 0 #ff2d55, -3px 0 #22d3ee; transform: translateX(-1px); }
  }
}

.hero-sub {
  max-width: 34rem;
  margin: 1.5rem auto 2rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.8rem 1.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}
.btn-primary { background: #fff; color: #000; }
.btn-ghost { background: transparent; color: #fff; border-color: #444; }
.btn-pill { background: #fff; color: #000; padding: 0.6rem 1.2rem; font-size: 0.95rem; }
.btn:hover, .btn:focus { filter: brightness(0.9); }

/* ---- Marquee ticker (decorative: same titles as the cards below) ---- */
.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0;
}
.ticker-track { display: flex; width: max-content; animation: ticker-scroll 32s linear infinite; }
.ticker-track span { white-space: nowrap; font-weight: 800; letter-spacing: 0.18em; font-size: 0.95rem; }
.ticker-track i { color: var(--gold); font-style: normal; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.section { padding: 4rem 0; }
#releases, #features, #timeline, #about, #sweatbox, #listen { scroll-margin-top: 80px; }
.section h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.15; margin: 0 0 2rem; max-width: 40rem; }

/* ---- Scroll-scrubbed coverflow stage (ported pattern: 21st.dev 3D Coverflow Carousel) ---- */
.scrub { height: 600vh; }
.sticky { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; }
.sticky .stage-wrap { width: 100%; }
.stage-wrap { position: relative; }
.ambience {
  position: absolute;
  inset: -2rem 0 auto 0;
  height: 420px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.55;
}
.ambience img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(70px) brightness(0.55) saturate(1.2);
  transform: scale(1.2);
}

.stage {
  position: relative;
  height: 560px;
  perspective: 1200px;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
}
.stage:active { cursor: grabbing; }

.track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

/* No-JS baseline: a horizontal scroll row. JS adds .js-3d and takes over. */
.track:not(.js-3d) { overflow-x: auto; justify-content: flex-start; padding: 0 1rem; }
.track:not(.js-3d) .card { flex: 0 0 300px; margin-right: 1rem; }

.card {
  position: absolute;
  width: min(320px, 78vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  will-change: transform, opacity, filter;
}
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #1a1a1a; }
.card-play { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.card-body { padding: 1.1rem 1.2rem 1.3rem; }
.card-tag { margin: 0 0 0.3rem; font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.card h3 { margin: 0 0 0.3rem; font-size: 1.35rem; line-height: 1.2; }
.card-meta { margin: 0 0 0.9rem; color: var(--muted); }
.card-note { margin: -0.4rem 0 0.9rem; color: var(--faint); font-size: 0.85rem; }

.controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1rem; position: relative; }
.ctrl-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid #444;
  background: #141414;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}
.ctrl-btn:hover, .ctrl-btn:focus { background: #222; }
.dots { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: none;
  background: #444;
  cursor: pointer;
  padding: 0;
}
.dot.active { background: var(--gold); transform: scale(1.3); }
.stage-hint { text-align: center; color: var(--faint); font-size: 0.9rem; margin: 1rem 0 0; }

/* ---- Video lightbox (plays the official video on the page) ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.lightbox[hidden] { display: none; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.88); }
.lightbox-box { position: relative; width: min(900px, 100%); }
.lightbox-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #333;
}
.lightbox-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lightbox-close {
  position: absolute;
  top: -2.75rem;
  right: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid #444;
  background: #141414;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}
.lightbox-close:hover, .lightbox-close:focus { background: #222; }

/* ---- Features grid ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.grid-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.grid-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #1a1a1a; }
.text-link { display: inline-block; margin-left: 0.8rem; color: var(--muted); font-size: 0.95rem; }

/* ---- Timeline ---- */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { display: flex; gap: 1rem; padding: 0.9rem 0 0.9rem 1.25rem; position: relative; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 1.35rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
}
.tl-year { font-weight: 900; min-width: 3.2rem; color: var(--gold); letter-spacing: 0.06em; }
.tl-text { color: var(--muted); }

.about { max-width: 44rem; }
.about p { color: var(--muted); font-size: 1.15rem; }

.sweat-text { color: var(--muted); font-size: 1.15rem; max-width: 44rem; margin: 0 0 1.5rem; }

.listen-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.listen-links a { font-size: 1.15rem; font-weight: 600; }

footer { border-top: 1px solid var(--line); padding: 2rem 1.5rem 3rem; text-align: center; color: var(--faint); }

/* Scroll reveals: only when JS + motion are OK (html.js-motion). Otherwise visible. */
html.js-motion .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js-motion .reveal.in { opacity: 1; transform: none; }

@media (max-width: 640px) {
  .stage { height: 520px; }
  .site-header { padding: 0.8rem 1rem; }
  .site-header nav { gap: 0.8rem; }
  .hero { padding-top: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js-motion .reveal { opacity: 1; transform: none; transition: none; }
  .dot.active { transform: none; }
  .scrub { height: auto; }
  .sticky { position: static; height: auto; display: block; }
  .ticker-track { animation: none; flex-wrap: wrap; width: auto; }
  .ticker-track span + span { display: none; }
}
