/* Visceral Vaults — base styles */

:root {
  --bg: #0a0a0a;
  --bg-raised: #161616;
  --fg: #f5f5f5;
  --fg-dim: #999999;
  --line: #2a2a2a;
  --max-width: 1180px;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Touch-dragging on the liquid was highlighting text / triggering iOS's
     long-press callout menu instead of just poking the surface. */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

img { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- hero (fixed full-viewport background) ---------- */

.hero {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#liquid-canvas {
  width: 100%;
  height: 100%;
  display: block;
  /* Without this, touch-dragging on the canvas scrolls/bounces the page
     instead of poking the liquid — there's nothing to scroll to anyway
     now that the release grid is a toggled overlay, not page content. */
  touch-action: none;
}

.hero-fallback {
  width: 100%;
  max-width: 720px;
  padding: 0 24px;
}

.releases-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.releases-overlay.open {
  opacity: 1;
}

.hero-cta {
  position: fixed;
  top: 48px;
  left: 50%;
  transform: translate(-50%, 0);
  z-index: 3;
  width: 64px;
  height: 64px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.5;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.hero-cta img {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.hero-cta:hover {
  transform: translate(-50%, 0) scale(1.08);
  opacity: 1;
}

main.wrap {
  position: fixed;
  top: 90px;
  left: 0;
  right: 0;
  bottom: 24px;
  z-index: 2;
  overflow-y: auto;
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

main.wrap.open {
  opacity: 1;
}

/* dat.gui's outer container hardcodes z-index:0, same level as the fixed
   background — without this it now renders behind main.wrap's content. */
.dg.ac {
  z-index: 50 !important;
}

/* Move the panel itself to the bottom-left instead of dat.gui's default
   top-right float. */
.dg.main {
  position: fixed !important;
  top: auto !important;
  bottom: 16px !important;
  left: 16px !important;
  right: auto !important;
  float: none !important;
  margin: 0 !important;
  /* dat.gui's own "taller than window" auto-scroll (added once enough
     folders exist, even ones that stay closed) sets overflow-y:auto on
     this fixed, bottom-anchored box; combined with its height collapsing
     to 0 while closed, that clips the "Open/Close Controls" button
     entirely instead of just scrolling content. We keep every folder
     collapsed by default anyway, so we don't need dat.gui's own scroll
     behavior here. */
  overflow: visible !important;
}

/* dat.gui sizes its own rows in pixels assuming the browser default
   content-box model; the site-wide border-box reset above shrinks the
   padding/border into that width instead of adding to it, so a row's
   contents (label + slider + number field) end up wider than the panel
   and force a horizontal scrollbar. */
.dg, .dg * {
  box-sizing: content-box;
}

.hero-fallback[hidden] {
  display: none;
}

/* ---------- section headings ---------- */

.section {
  padding: 56px 0;
}

/* ---------- release grid ---------- */

.release-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px;
}

.release-card {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
}

.release-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.release-card:hover img {
  border-color: var(--fg-dim);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.release-card .r-title {
  margin: 14px 0 2px;
  font-weight: 700;
  font-size: 15px;
}

.release-card .r-artist {
  margin: 0 0 2px;
  font-size: 13px;
  color: var(--fg-dim);
}

.release-card .r-date {
  margin: 0;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* ---------- modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 80vw;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  border-radius: 8px 0 0 8px;
}

.modal-body {
  padding: 40px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: 0;
  color: var(--fg-dim);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover { color: var(--fg); }

.modal-body h3 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 6px;
  padding-right: 20px;
}

.modal-body .artist { color: var(--fg-dim); margin: 0 0 4px; }
.modal-body .credit { color: var(--fg-dim); font-size: 13px; margin: 0 0 4px; }
.modal-body .date { color: var(--fg-dim); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 20px; }

.modal-player {
  margin: 0 0 20px;
}

.modal-player iframe {
  display: block;
}

.modal-platforms {
  display: flex;
  gap: 14px;
}

.platform-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.platform-link:hover {
  border-color: var(--fg-dim);
  transform: translateY(-2px);
}

.platform-link img {
  width: 18px;
  height: 18px;
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .modal {
    max-width: 92vw;
    grid-template-columns: 1fr;
  }

  .modal-cover {
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 8px 8px 0 0;
  }
}

@media (max-width: 600px) {
  .release-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .release-card .r-title {
    font-size: 13px;
  }

  .release-card .r-artist {
    font-size: 11px;
  }
}
