:root {
  --bg: #0a0a0a;
  --ink: #c8c8c0;
  --phosphor: #9fe870;
  --phosphor-dim: #6b9c4d;
  --rule: #1a1a1a;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

/* Subtle scanline + grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.012) 0px,
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px,
      transparent 3px
    );
  z-index: 100;
  mix-blend-mode: overlay;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  z-index: 101;
  opacity: 0.6;
}

.frame {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(20px, 4vw, 40px);
  position: relative;
  z-index: 1;
}

/* HEADER */
header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink);
  opacity: 0.55;
  text-transform: uppercase;
}

header .left, header .right {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
header .right { text-align: right; }

/* MAIN */
main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(40px, 10vh, 120px) 0;
  max-width: 720px;
}

.catalog-marker {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--phosphor-dim);
  opacity: 0.7;
  margin-bottom: clamp(40px, 8vh, 80px);
  text-transform: uppercase;
}

.logotype {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--phosphor);
  font-size: clamp(48px, 9vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: clamp(32px, 6vh, 56px);
  text-shadow: 0 0 22px rgba(159, 232, 112, 0.18);
  animation: flicker 9s infinite;
}
.logotype .glyph {
  display: block;
  padding-left: 0.4ch;
  color: var(--phosphor-dim);
  font-size: 0.7em;
}

@keyframes flicker {
  0%, 96%, 100% { opacity: 1; }
  97% { opacity: 0.88; }
  97.5% { opacity: 1; }
  98% { opacity: 0.92; }
}

.tagline {
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.6;
  color: var(--ink);
  max-width: 48ch;
  margin-bottom: clamp(40px, 6vh, 56px);
}
.tagline em {
  font-style: normal;
  color: var(--phosphor);
  opacity: 0.85;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px 48px;
  max-width: 600px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: clamp(48px, 8vh, 72px);
}
.meta-grid dt {
  color: var(--phosphor-dim);
  opacity: 0.7;
  margin-bottom: 6px;
}
.meta-grid dd {
  color: var(--ink);
  opacity: 0.9;
}

/* Signal form */
.signal {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  max-width: 480px;
  width: 100%;
}
.signal label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--phosphor-dim);
  margin-bottom: 12px;
}
.signal-row {
  display: flex;
  gap: 0;
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.015);
}
.signal input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  padding: 12px 14px;
  outline: none;
  letter-spacing: 0.02em;
}
.signal input::placeholder {
  color: var(--ink);
  opacity: 0.3;
}
.signal input:focus { background: rgba(159, 232, 112, 0.03); }
.signal button {
  background: transparent;
  border: none;
  border-left: 1px solid var(--rule);
  color: var(--phosphor);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0 18px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.signal button:hover {
  background: rgba(159, 232, 112, 0.08);
}
.signal-status {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--phosphor-dim);
  margin-top: 10px;
  min-height: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.signal-status.visible { opacity: 1; }
.signal-status.error { color: #d97757; }
.signal button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* FOOTER */
footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.4;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
footer a:hover {
  color: var(--phosphor);
  border-bottom-color: var(--phosphor-dim);
}
footer .links {
  display: flex;
  gap: 24px;
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(8px); animation: reveal 0.8s ease-out forwards; }
.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.25s; }
.reveal-3 { animation-delay: 0.45s; }
.reveal-4 { animation-delay: 0.65s; }
.reveal-5 { animation-delay: 0.85s; }
.reveal-6 { animation-delay: 1.05s; }
@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  header { font-size: 10px; }
  .meta-grid { grid-template-columns: 1fr 1fr; gap: 20px 24px; }
  footer { flex-direction: column; gap: 16px; align-items: flex-start; }
}

/* ── Artist page ──────────────────────────────────────────── */
.artist-glyph {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--phosphor);
  font-size: clamp(80px, 16vw, 180px);
  line-height: 1;
  margin-bottom: clamp(24px, 4vh, 40px);
  text-shadow: 0 0 28px rgba(159, 232, 112, 0.22);
  animation: flicker 9s infinite;
  display: block;
}

.links-section {
  margin-bottom: clamp(32px, 5vh, 48px);
  max-width: 480px;
  width: 100%;
}
.links-section + .links-section {
  margin-top: clamp(-16px, -2vh, -8px);
}
.links-heading {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--phosphor-dim);
  opacity: 0.7;
  margin-bottom: 0;
  font-weight: 400;
}
.links-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.links-list li {
  border-top: 1px solid var(--rule);
}
.links-list li:last-child {
  border-bottom: 1px solid var(--rule);
}
.links-list a {
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.02em;
  display: block;
  padding: 12px 0;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.links-list a:hover {
  color: var(--phosphor);
  padding-left: 8px;
}

/* ── Catalog page ─────────────────────────────────────────── */
.catalog-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: clamp(32px, 5vh, 48px);
  font-size: 13px;
  max-width: 600px;
}
.catalog-table th {
  text-align: left;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--phosphor-dim);
  opacity: 0.7;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.catalog-table td {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.catalog-table .cat-id {
  color: var(--phosphor-dim);
  width: 30%;
}
.catalog-table .cat-artist a {
  color: var(--ink);
  text-decoration: none;
  display: block;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.catalog-table .cat-artist a:hover {
  color: var(--phosphor);
  padding-left: 6px;
}
.catalog-table .cat-status {
  text-align: right;
  color: var(--phosphor);
  width: 15%;
}

/* Footer back-link (← catalog / ← index) */
footer .back-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
}
footer .back-link:hover {
  color: var(--phosphor);
  border-bottom-color: var(--phosphor-dim);
}

/* ── Index 2-column layout (only when artists grid present) ── */
main:has(.artists-grid) {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px);
  max-width: 1200px;
  align-items: start;
}
main:has(.artists-grid) .main-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 720px;
}

@media (max-width: 900px) {
  main:has(.artists-grid) {
    grid-template-columns: 1fr;
    max-width: 720px;
  }
}

/* ── Artists grid (right column on index) ─────────────────── */
.artists-grid {
  width: 100%;
  position: sticky;
  top: clamp(40px, 8vh, 80px);
}
.artists-grid-heading {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--phosphor-dim);
  opacity: 0.7;
  margin-bottom: clamp(20px, 3vh, 28px);
}
.artists-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, 220px);
  gap: 16px;
}
.artist-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 4vh, 40px) 16px;
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.015);
  text-decoration: none;
  color: inherit;
  aspect-ratio: 1 / 1;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.artist-tile:hover {
  border-color: var(--phosphor-dim);
  background: rgba(159, 232, 112, 0.04);
}
.tile-glyph {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--phosphor);
  font-size: clamp(48px, 6vw, 72px);
  line-height: 1;
  margin-bottom: 18px;
  text-shadow: 0 0 22px rgba(159, 232, 112, 0.18);
  transition: text-shadow 0.2s ease;
}
.artist-tile:hover .tile-glyph {
  text-shadow: 0 0 32px rgba(159, 232, 112, 0.4);
}
.tile-name {
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}
.artist-tile:hover .tile-name {
  color: var(--phosphor);
}
.tile-id {
  color: var(--phosphor-dim);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}

@media (max-width: 900px) {
  .artists-grid {
    position: static;
    margin-top: clamp(40px, 6vh, 56px);
  }
  .artists-tiles {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

/* ── Release player (Bandcamp embed wrapper) ──────────────── */
.release-player {
  width: 100%;
  max-width: 480px;
  margin-bottom: clamp(36px, 5vh, 56px);
}
.release-embed {
  margin-top: 14px;
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 0.2s ease;
}
.release-embed:hover {
  border-color: var(--phosphor-dim);
}
.release-embed iframe {
  display: block;
  width: 100%;
  height: 470px;
  border: 0;
}
