:root {
  --bg: #0c0805;
  --bg-2: #14100a;
  --bg-3: #1d1610;
  --paper: #efe4cd;
  --paper-2: #d6c8a8;
  --paper-dim: #9d8e72;
  --gold: #c89a5c;
  --gold-bright: #e0b677;
  --gold-deep: #8a6a3a;
  --line: rgba(200, 154, 92, 0.16);
  --line-strong: rgba(200, 154, 92, 0.32);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--paper);
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100svh;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
::selection { background: var(--gold); color: #14100a; }

button { -webkit-tap-highlight-color: transparent; font: inherit; }
img { max-width: 100%; }

/* keyboard focus ring — show on tab, hide on click */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
button:focus-visible,
a:focus-visible { outline-offset: 4px; }
input[type="range"]:focus-visible { outline-offset: 6px; }
.track-head:focus-visible {
  outline-offset: -2px;
  border-radius: 0;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  width: 100%;
  background: #000;
}
.hero-art-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.hero-art {
  width: 100%;
  height: auto;
  display: block;
}
.hero-fade-bottom {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 140px;
  background: linear-gradient(180deg, rgba(12,8,5,0) 0%, var(--bg) 100%);
  pointer-events: none;
}

/* ---------- CONTENT ---------- */
.content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px 80px;
}

/* ---------- META BAR ---------- */
.meta-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 2fr;
  gap: 32px;
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--line);
}
.meta-block { min-width: 0; }
.meta-k {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 12px;
}
.meta-v {
  font-family: "Anton", "Impact", sans-serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--paper);
}

/* ---------- SECTION HEAD ---------- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 64px 0 32px;
}
.section-head-title {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.9;
  margin: 0;
  color: var(--paper);
  letter-spacing: 0.005em;
}

.play-album {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 500;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}
.play-album:hover { background: var(--gold); color: #14100a; }
.play-album:active { transform: scale(0.97); }
.play-album svg { transition: transform 0.18s ease; }
.play-album:hover svg { transform: scale(1.08); }

/* ---------- TRACKS ---------- */
.tracks {
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.track {
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}
.track:last-child { border-bottom: none; }
.track:hover { background: rgba(200, 154, 92, 0.025); }
.track.is-open { background: rgba(200, 154, 92, 0.04); }

.track-head {
  display: grid;
  grid-template-columns: 100px 1fr 44px 32px;
  gap: 28px;
  align-items: center;
  padding: 22px 0;
  cursor: pointer;
  user-select: none;
}
.track-num {
  font-family: "Anton", sans-serif;
  font-size: 54px;
  line-height: 1;
  color: var(--paper-dim);
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}
.track:hover .track-num { color: var(--paper-2); }
.track.is-current .track-num { color: var(--gold-bright); }
.track.is-open .track-num { color: var(--paper); }

.track-title-wrap { min-width: 0; }
.track-title {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.0;
  margin: 0 0 8px;
  color: var(--paper);
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
.track.is-current .track-title { color: var(--gold-bright); }
.track-subtitle {
  color: var(--gold);
  font-weight: 400;
}
.track-meta {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--paper-dim);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  text-transform: uppercase;
}
.track-meta .dot { opacity: 0.5; }
.track-meta .coming { color: var(--gold); }

.track-play {
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--paper);
  display: grid; place-items: center;
  cursor: pointer;
  transition: all 0.18s ease;
  padding: 0;
}
.track-play:hover:not(:disabled) {
  background: var(--gold);
  border-color: var(--gold);
  color: #14100a;
}
.track-play:disabled { opacity: 0.25; cursor: not-allowed; }
.track-play.is-playing {
  background: var(--gold);
  border-color: var(--gold);
  color: #14100a;
}

/* play/pause icon swap. [hidden] on svg is flaky in safari, classes work */
.track-play .i-pause,
.ctrl-play .i-pause { display: none; }
.track-play.is-playing .i-play,
.ctrl-play.is-playing .i-play { display: none; }
.track-play.is-playing .i-pause,
.ctrl-play.is-playing .i-pause { display: block; }

.track-expand {
  display: grid; place-items: center;
  color: var(--paper-dim);
}
.expand-arrow {
  transition: transform 0.25s ease, color 0.2s ease;
  color: var(--paper-dim);
}
.track:hover .expand-arrow { color: var(--gold); }
.track.is-open .expand-arrow {
  color: var(--gold);
  transform: rotate(180deg);
}

.track-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.track.is-open .track-body { max-height: 4000px; }
.track-body-inner {
  padding: 12px 0 48px 128px;
}
.track-cols {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 64px;
}

.col-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

/* lyrics */
.lyrics-col { min-width: 0; }
.lyrics-body {
  font-family: "Archivo", sans-serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.45;
  color: var(--paper);
  letter-spacing: -0.005em;
}
.lyric-block { margin-bottom: 30px; }
.lyric-block:last-child { margin-bottom: 0; }
.lyric-header {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  font-weight: 500;
}
.lyric-line {
  color: var(--paper);
  font-weight: 500;
  padding: 6px 0 6px 16px;
  border-left: 2px solid transparent;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.35s ease,
              border-color 0.35s ease,
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* lines with a timestamp = tappable to seek */
.lyric-line[data-t] { cursor: pointer; }

/* only dim once something is actively playing, otherwise lyrics look normal */
.lyrics-body:has(.lyric-line.is-active) .lyric-line[data-t] { opacity: 0.32; }
.lyrics-body:has(.lyric-line.is-active) .lyric-line[data-t]:hover { opacity: 0.65; }
.lyrics-body:has(.lyric-line.is-active) .lyric-line[data-t].is-past { opacity: 0.18; }
.lyrics-body:has(.lyric-line.is-active) .lyric-line.is-active {
  opacity: 1;
  color: var(--gold-bright);
  border-left-color: var(--gold);
  transform: translateX(3px);
}

/* info */
.info-col {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.info-theme {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--paper-2);
  text-wrap: pretty;
}
.info-style {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: var(--paper-dim);
  line-height: 1.7;
}
.scripture-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.scripture-list li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: baseline;
}
.scripture-ref {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--gold);
  font-weight: 500;
}
.scripture-note {
  font-size: 14px;
  color: var(--paper-2);
  line-height: 1.55;
}
.prod-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--paper-2);
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
}

/* ---------- CLOSING ---------- */
.closing {
  margin: 96px auto 40px;
  max-width: 720px;
  text-align: center;
}
.closing-rule {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 36px;
}
.closing-quote {
  font-family: "Archivo", sans-serif;
  font-weight: 300;
  font-size: 22px;
  line-height: 1.45;
  color: var(--paper);
  text-wrap: pretty;
  margin: 0 0 24px;
  font-style: italic;
}
.closing-attr {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gold);
}
.closing-by {
  margin-top: 28px;
  font-size: 14px;
  color: var(--paper-dim);
}
.credits-trigger {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--paper);
  cursor: pointer;
  border-bottom: 1px solid var(--gold-deep);
  transition: color 0.18s ease, border-color 0.18s ease;
}
.credits-trigger:hover {
  color: var(--gold-bright);
  border-bottom-color: var(--gold-bright);
}

/* credits modal */
.credits {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 80px);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--bg-2);
  color: var(--paper);
  padding: 0;
  overflow: hidden;
}
.credits[open] { display: flex; flex-direction: column; }
.credits::backdrop {
  background: rgba(8, 5, 3, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.credits-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: rgba(239, 228, 205, 0.06);
  color: var(--paper-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  z-index: 2;
}
.credits-close:hover { background: rgba(239, 228, 205, 0.14); color: var(--paper); }
.credits-body {
  padding: 44px 44px 36px;
  overflow-y: auto;
  font-size: 16px;
  line-height: 1.6;
}
.credits-h {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: 38px;
  line-height: 1;
  margin: 0 0 22px;
  color: var(--paper);
  letter-spacing: 0.005em;
}
.credits-body p {
  margin: 0 0 16px;
  color: var(--paper-2);
}
.credits-body p a {
  color: var(--gold-bright);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-deep);
}
.credits-body p a:hover { border-bottom-color: var(--gold-bright); }
.credits-section { margin: 28px 0 0; }
.credits-section-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.credits-tools {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.credits-tool {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(239, 228, 205, 0.03);
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.credits-tool:hover {
  background: rgba(200, 154, 92, 0.1);
  border-color: var(--gold-deep);
}
.credits-tool:active { transform: scale(0.97); }
.credits-tool img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(239, 228, 205, 0.06);
  padding: 4px;
}
.credits-foot {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-style: italic;
  color: var(--paper-dim);
  font-size: 13px;
}
@media (max-width: 560px) {
  .credits-body { padding: 36px 24px 28px; font-size: 15px; }
  .credits-h { font-size: 32px; }
}

.player-spacer { height: calc(120px + env(safe-area-inset-bottom)); }

/* ---------- PLAYER ---------- */
.player {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  background: rgba(10, 7, 4, 0.88);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  border-top: 1px solid var(--line-strong);
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.player-bg-viz {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  z-index: 0;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.7) 40%, rgba(0,0,0,1) 100%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.7) 40%, rgba(0,0,0,1) 100%);
}
.visualizer-canvas {
  width: 100%; height: 100%; display: block;
}

.player-inner {
  position: relative;
  z-index: 1;
  height: 92px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 56px minmax(180px, 1.4fr) auto minmax(320px, 2.4fr) minmax(120px, 160px);
  gap: 28px;
  align-items: center;
}

.player-num {
  font-family: "Anton", sans-serif;
  font-size: 46px;
  line-height: 1;
  color: var(--gold);
}

.player-meta { min-width: 0; }
.player-title {
  font-family: "Anton", sans-serif;
  font-size: 22px;
  line-height: 1.1;
  color: var(--paper);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-sub { color: var(--gold); }
.player-album {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ctrl-btn {
  width: 32px; height: 32px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--paper-2);
  display: grid; place-items: center;
  cursor: pointer;
  transition: color 0.18s ease;
  padding: 0;
}
.ctrl-btn:hover { color: var(--gold-bright); }
.ctrl-play {
  width: 44px; height: 44px;
  background: var(--paper);
  color: #0c0805;
}
.ctrl-play:hover:not(:disabled) {
  background: var(--gold-bright);
  color: #0c0805;
}
.ctrl-play:disabled { opacity: 0.3; cursor: not-allowed; }

.player-progress {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.player-time {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--paper-dim);
  min-width: 32px;
  text-align: center;
}

.scrubber {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: pointer;
  --prog: 0%;
}
.scrubber::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(to right,
    var(--gold) 0%, var(--gold) var(--prog),
    rgba(200, 154, 92, 0.18) var(--prog), rgba(200, 154, 92, 0.18) 100%);
}
.scrubber::-moz-range-track {
  height: 2px;
  background: rgba(200, 154, 92, 0.18);
}
.scrubber::-moz-range-progress {
  height: 2px;
  background: var(--gold);
}
.scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px; height: 10px;
  border-radius: 999px;
  background: var(--paper);
  margin-top: -4px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.scrubber::-webkit-slider-thumb:hover { transform: scale(1.3); }
.scrubber::-moz-range-thumb {
  width: 10px; height: 10px;
  border-radius: 999px;
  background: var(--paper);
  border: none;
  cursor: pointer;
}
.scrubber:disabled { opacity: 0.4; cursor: not-allowed; }

.player-volume {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--paper-2);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .content { padding: 0 32px 60px; }
  .meta-bar { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .meta-block-wide { grid-column: span 2; }
  .track-head {
    grid-template-columns: 70px 1fr 44px 28px;
    gap: 18px;
  }
  .track-num { font-size: 40px; }
  .track-body-inner { padding: 8px 0 36px 88px; }
  .track-cols { grid-template-columns: 1fr; gap: 40px; }
  .scripture-list li { grid-template-columns: 1fr; gap: 6px; }

  .player-inner {
    height: auto;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 8px 16px;
    padding: 10px 20px;
  }
  .player-num { grid-column: 1; grid-row: 1; font-size: 32px; }
  .player-meta { grid-column: 2; grid-row: 1; }
  .player-controls { grid-column: 3; grid-row: 1; }
  .player-progress { grid-column: 1 / -1; grid-row: 2; }
  .player-volume { display: none; }
}

/* bump touch targets to 44px on touch devices (apple hig minimum) */
@media (pointer: coarse) {
  .ctrl-btn { width: 44px; height: 44px; }
  .scrubber { height: 28px; }
  .scrubber::-webkit-slider-thumb {
    width: 16px; height: 16px; margin-top: -7px;
  }
  .scrubber::-moz-range-thumb { width: 16px; height: 16px; }
}

@media (max-width: 640px) {
  .content { padding: 0 20px 60px; }
  .meta-bar { padding: 36px 0 40px; gap: 18px; }
  .meta-v { font-size: 18px; }
  .section-head {
    padding: 48px 0 24px;
    gap: 20px;
    flex-direction: column;
    align-items: flex-start;
  }
  .play-album { padding: 12px 20px; font-size: 10.5px; }
  .track-head {
    grid-template-columns: 54px 1fr 44px 24px;
    gap: 12px;
    padding: 18px 0;
  }
  .track-num { font-size: 32px; }
  .track-title { font-size: 22px; }
  .track-meta { font-size: 10px; }
  .track-body-inner { padding: 4px 0 32px; }
  .lyrics-body { font-size: 17px; line-height: 1.5; }
  .lyric-block { margin-bottom: 22px; }
  .closing-quote { font-size: 18px; }
  .closing { margin: 64px auto 32px; }
}
