/* ============================================================
   re:Mutable // NO CODE — ASCII / Matrix / Glitch
   ============================================================ */

:root {
  --bg: #050805;
  --green: #7CF77C;
  --green-dim: #3a7a3a;
  --green-bright: #b8ffb8;
  --green-glow: rgba(124, 247, 124, 0.6);
  --red: #ff3b3b;
  --cyan: #2bf5e0;
  --mono: 'Share Tech Mono', monospace;
  --pixel: 'VT323', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--green);
  font-family: var(--mono);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-bright); text-shadow: 0 0 8px var(--green-glow); }

/* ---------- Matrix canvas ---------- */
#matrix {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.28;
  pointer-events: none;
}

/* ---------- CRT overlays ---------- */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.25) 3px,
    rgba(0,0,0,0.25) 4px
  );
  mix-blend-mode: multiply;
}
.scanlines::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(124,247,124,0.02), rgba(124,247,124,0.02));
  animation: flicker 4s infinite steps(40);
}
.noise {
  position: fixed;
  inset: 0;
  z-index: 49;
  pointer-events: none;
  opacity: 0.04;
  background-image:
    repeating-radial-gradient(circle at 17% 32%, #fff 0, #000 1px, transparent 1px);
  animation: noise 0.4s steps(2) infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; }
  92% { opacity: 0.7; }
  93% { opacity: 1; }
}
@keyframes noise {
  0% { transform: translate(0,0); }
  100% { transform: translate(-2%, 1%); }
}

/* ---------- Boot sequence ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}
.boot.done { opacity: 0; pointer-events: none; }
/* Visite déjà bootée : on masque l'intro instantanément, sans fondu. */
html.booted .boot { display: none; }
#boot-text {
  font-family: var(--mono);
  color: var(--green);
  font-size: clamp(11px, 2.4vw, 15px);
  text-shadow: 0 0 8px var(--green-glow);
  white-space: pre-wrap;
  max-width: 90vw;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: rgba(5,8,5,0.75);
  backdrop-filter: blur(2px);
  border-bottom: 1px solid var(--green-dim);
}
.brand { font-size: 1.3rem; font-weight: bold; letter-spacing: 1px; }
.links a { margin-left: 18px; font-size: 0.95rem; }

/* ---------- Glitch text ---------- */
.glitch {
  position: relative;
  display: inline-block;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
}
.glitch::before {
  color: var(--cyan);
  z-index: -1;
  animation: glitch-x 2.6s infinite linear alternate-reverse;
}
.glitch::after {
  color: var(--red);
  z-index: -2;
  animation: glitch-y 1.9s infinite linear alternate-reverse;
}
@keyframes glitch-x {
  0% { transform: translate(0); clip-path: inset(0 0 85% 0); }
  20% { transform: translate(-3px, 1px); clip-path: inset(30% 0 40% 0); }
  40% { transform: translate(2px, -1px); clip-path: inset(60% 0 10% 0); }
  60% { transform: translate(-2px, 0); clip-path: inset(10% 0 70% 0); }
  80% { transform: translate(3px, 1px); clip-path: inset(45% 0 35% 0); }
  100% { transform: translate(0); clip-path: inset(0 0 90% 0); }
}
@keyframes glitch-y {
  0% { transform: translate(0); clip-path: inset(80% 0 5% 0); }
  25% { transform: translate(3px, -2px); clip-path: inset(20% 0 55% 0); }
  50% { transform: translate(-3px, 1px); clip-path: inset(50% 0 25% 0); }
  75% { transform: translate(1px, 2px); clip-path: inset(5% 0 80% 0); }
  100% { transform: translate(0); clip-path: inset(70% 0 15% 0); }
}

/* ---------- Sections ---------- */
main { position: relative; z-index: 10; }
.section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 24px;
}
.section-title {
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  margin-bottom: 36px;
  letter-spacing: 2px;
  text-shadow: 0 0 12px var(--green-glow);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 70px 24px 40px;
  min-height: 80vh;
}
.hero-art {
  position: relative;
  aspect-ratio: 1;
  max-width: 460px;
  justify-self: center;
  width: 100%;
}
.cover {
  width: 100%;
  display: block;
  border: 1px solid var(--green-dim);
  box-shadow: 0 0 40px rgba(124,247,124,0.25);
  position: relative;
  z-index: 2;
}
.cover-glitch {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  mix-blend-mode: screen;
  opacity: 0;
  z-index: 3;
  pointer-events: none;
}
.cover-glitch { animation: coverGlitch 5s infinite; }
.cover-glitch.g2 { animation: coverGlitch2 7s infinite; }
@keyframes coverGlitch {
  0%, 90%, 100% { opacity: 0; transform: translate(0); clip-path: inset(0 0 100% 0); }
  92% { opacity: 0.8; transform: translate(-6px, 2px); clip-path: inset(20% 0 30% 0); filter: hue-rotate(60deg); }
  94% { opacity: 0.6; transform: translate(5px, -3px); clip-path: inset(55% 0 10% 0); }
  96% { opacity: 0.7; transform: translate(-4px, 0); clip-path: inset(10% 0 60% 0); filter: hue-rotate(-40deg); }
}
@keyframes coverGlitch2 {
  0%, 85%, 100% { opacity: 0; transform: translate(0); }
  87% { opacity: 0.5; transform: translate(8px, -4px); clip-path: inset(40% 0 20% 0); filter: invert(1); }
  90% { opacity: 0.4; transform: translate(-7px, 3px); clip-path: inset(15% 0 65% 0); }
}

.kicker {
  color: var(--green-dim);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.title {
  font-size: clamp(3rem, 11vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: 4px;
  text-shadow: 0 0 18px var(--green-glow);
  margin-bottom: 18px;
}
.tagline {
  min-height: 1.6em;
  color: var(--green-bright);
  margin-bottom: 28px;
  font-size: 1.05rem;
}
/* ---------- Release date / countdown ---------- */
.release {
  border: 1px solid var(--green-dim);
  background: rgba(5,12,5,0.5);
  padding: 14px 18px;
  margin-bottom: 28px;
  max-width: 440px;
}
.release-label {
  display: block;
  color: var(--green-dim);
  font-size: 0.75rem;
  letter-spacing: 3px;
}
.release-date {
  display: block;
  font-size: 1.6rem;
  color: var(--green-bright);
  letter-spacing: 3px;
  text-shadow: 0 0 12px var(--green-glow);
  margin: 2px 0 10px;
}
.countdown {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}
.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 46px;
}
.cd-unit span {
  font-size: 1.7rem;
  color: var(--green);
  text-shadow: 0 0 8px var(--green-glow);
  font-variant-numeric: tabular-nums;
}
.cd-unit em {
  font-style: normal;
  font-size: 0.65rem;
  color: var(--green-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.cd-sep {
  font-size: 1.5rem;
  color: var(--green-dim);
  animation: blink 1s steps(1) infinite;
}
.release-platforms { color: var(--green-dim); font-size: 0.85rem; letter-spacing: 1px; }
.release.out .release-date::after {
  content: " // OUT NOW";
  color: var(--green);
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 26px;
  border: 1px solid var(--green);
  color: var(--green);
  font-family: var(--mono);
  letter-spacing: 2px;
  background: rgba(124,247,124,0.05);
  transition: all 0.15s;
  cursor: pointer;
}
.btn:hover {
  background: var(--green);
  color: var(--bg);
  box-shadow: 0 0 20px var(--green-glow);
  transform: translateY(-2px);
}
.btn.ghost { border-color: var(--green-dim); color: var(--green-dim); }
.btn.ghost:hover { border-color: var(--green); color: var(--bg); background: var(--green); }

/* ---------- Player ---------- */
.player {
  border: 1px solid var(--green-dim);
  background: rgba(5,12,5,0.7);
  padding: 24px;
  box-shadow: 0 0 30px rgba(124,247,124,0.1);
}
.player-now {
  display: flex;
  gap: 20px;
  align-items: center;
  border-bottom: 1px dashed var(--green-dim);
  padding-bottom: 18px;
  margin-bottom: 18px;
}
.viz {
  width: 160px;
  height: 64px;
  overflow: hidden;
  flex-shrink: 0;
}
#viz-bars {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1;
  color: var(--green);
  text-shadow: 0 0 6px var(--green-glow);
  letter-spacing: 2px;
}
.now-label { display: block; color: var(--green-dim); font-size: 0.75rem; letter-spacing: 3px; }
.now-title { display: block; font-size: 1.2rem; color: var(--green-bright); margin-top: 4px; }

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.ctrl {
  background: transparent;
  border: 1px solid var(--green-dim);
  color: var(--green);
  font-family: var(--mono);
  font-size: 1rem;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.ctrl:hover { border-color: var(--green); box-shadow: 0 0 12px var(--green-glow); }
.ctrl.play { font-size: 1.2rem; min-width: 52px; }
.progress {
  flex: 1;
  min-width: 120px;
  height: 10px;
  border: 1px solid var(--green-dim);
  cursor: pointer;
  position: relative;
  background: rgba(124,247,124,0.06);
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green-glow);
}
.time { font-size: 0.85rem; color: var(--green-dim); white-space: nowrap; }

.tracklist { list-style: none; counter-reset: t; }
.track {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(58,122,58,0.3);
  cursor: pointer;
  transition: background 0.12s, padding-left 0.12s;
  counter-increment: t;
}
.track::before {
  content: counter(t, decimal-leading-zero);
  color: var(--green-dim);
  font-size: 0.9rem;
  width: 28px;
}
.track:hover { background: rgba(124,247,124,0.07); padding-left: 18px; }
.track.active { background: rgba(124,247,124,0.12); }
.track.active .track-name { color: var(--green-bright); text-shadow: 0 0 8px var(--green-glow); }
.track-name { flex: 1; }
.track-dur { color: var(--green-dim); font-size: 0.85rem; }
.track.active::before { content: "▶"; color: var(--green); }
.track.unavailable { opacity: 0.45; cursor: not-allowed; }
.track.unavailable:hover { background: transparent; padding-left: 10px; }
.track-tag { font-size: 0.7rem; color: var(--green-dim); border: 1px solid var(--green-dim); padding: 1px 6px; }

/* ---------- Merch ---------- */
.merch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.merch-card {
  border: 1px solid var(--green-dim);
  background: rgba(5,12,5,0.6);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.merch-card:hover { transform: translateY(-4px); box-shadow: 0 0 26px rgba(124,247,124,0.2); }
.merch-ascii {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.1;
  color: var(--green);
  text-shadow: 0 0 6px var(--green-glow);
  white-space: pre;
  text-align: center;
  margin-bottom: 16px;
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* --- Product photo (t-shirt etc.) --- */
.merch-photo {
  width: 100%;
  height: 200px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.merch-photo img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  transition: filter 0.2s, transform 0.3s;
}
.merch-card:hover .merch-photo img {
  transform: scale(1.04);
  filter: drop-shadow(0 0 10px var(--green-glow)) saturate(1.1);
}

/* --- 3D disc / sleeve effect (CD & vinyl) --- */
.disc-stage {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 18px;
  perspective: 900px;
}
.disc-cover {
  position: relative;
  z-index: 3;
  width: 200px;
  height: 200px;
  object-fit: cover;
  border: 1px solid var(--green-dim);
  box-shadow: 0 10px 24px rgba(0,0,0,0.5), 0 0 18px rgba(124,247,124,0.18);
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.disc {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  z-index: 1;
  transform: translateX(8px) rotate(0deg);
  transition: transform 0.7s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 8px 20px rgba(0,0,0,0.6);
}
/* vinyl: black disc with grooves + green label */
.disc-vinyl .disc {
  background:
    repeating-radial-gradient(circle at center,
      #0c0c0c 0 1px, #1c1c1c 1px 2px, #0c0c0c 2px 3px);
  background-color: #0a0a0a;
}
.disc-vinyl .disc::after {
  content: "";
  position: absolute;
  inset: 33%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--green) 0 60%, var(--green-dim) 61% 100%);
  box-shadow: 0 0 12px var(--green-glow);
}
.disc-vinyl .disc::before {
  content: "";
  position: absolute;
  inset: 48%;
  border-radius: 50%;
  background: var(--bg);
  z-index: 2;
}
/* cd: reflective rainbow ring + center hole */
.disc-cd .disc {
  background:
    radial-gradient(circle, var(--bg) 0 14%, transparent 14.5%),
    conic-gradient(from 0deg,
      #7CF77C, #2bf5e0, #b8ffb8, #d8ffd8, #2bf5e0, #7CF77C, #2bf5e0, #b8ffb8, #7CF77C);
  filter: brightness(1.05);
}
.disc-cd .disc::after {
  content: "";
  position: absolute;
  inset: 40%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--bg) 0 45%, rgba(124,247,124,0.25) 46% 100%);
}
/* hover: disc slides out & spins, cover tilts */
.merch-card:hover .disc {
  transform: translateX(48%) rotate(220deg);
}
.merch-card:hover .disc-cover {
  transform: rotateY(-18deg) translateX(-6px);
}
.disc-cd:hover .disc { animation: spin 1.4s linear infinite; }
.disc-vinyl:hover .disc { animation: spin 2.2s linear infinite; }
@keyframes spin {
  from { transform: translateX(48%) rotate(0deg); }
  to   { transform: translateX(48%) rotate(360deg); }
}

.merch-name { font-size: 1.25rem; color: var(--green-bright); margin-bottom: 6px; letter-spacing: 1px; }
.merch-desc { color: var(--green-dim); font-size: 0.9rem; margin-bottom: 14px; flex: 1; }
.merch-foot { display: flex; justify-content: space-between; align-items: center; }
.merch-price { font-size: 1.4rem; color: var(--green); }

/* ---------- About ---------- */
.about-ascii {
  font-family: var(--mono);
  color: var(--green);
  text-shadow: 0 0 8px var(--green-glow);
  font-size: clamp(7px, 1.8vw, 13px);
  white-space: pre;
  overflow-x: auto;
  margin-bottom: 28px;
}
.about-text { font-size: 1.05rem; line-height: 2; }
.prompt { color: var(--green-dim); margin-right: 8px; }
.cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--green-dim);
  color: var(--green-dim);
}
.footer-social { margin-bottom: 12px; }
.footer-social a {
  font-size: 1rem;
  letter-spacing: 1px;
  color: var(--green);
  text-shadow: 0 0 8px var(--green-glow);
}
.footer-social a:hover { color: var(--green-bright); }
.footer-sub { font-size: 0.8rem; margin-top: 8px; color: var(--green-dim); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 40px; }
  .hero-cta { justify-content: center; }
  .hero-art { max-width: 320px; }
  .links { display: none; }
  .player-now { flex-direction: column; align-items: flex-start; }
  .viz { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .glitch::before, .glitch::after,
  .cover-glitch, .scanlines::after, .noise { animation: none; }
}
