/* Second String — stage tungsten, vinyl black, teal second-string accent.
   Interaction pattern adapted from sidebysidephilosophy meditations (hash state, dual pane). */

:root {
  --ink: #0e0d0c;
  --stage: #161310;
  --smoke: #241f1a;
  --fog: #3a322a;
  --paper: #f3eee6;
  --paper-dim: #d9d1c5;
  --ember: #e8923a;
  --ember-hot: #ffb45a;
  --ember-deep: #b45a12;
  --teal: #2ec4b6;
  --teal-deep: #1a8f85;
  --teal-soft: #a8efe7;
  --muted: #a89c8d;
  --line: rgba(232, 146, 58, 0.28);
  --gutter: clamp(1rem, 3vw, 1.75rem);
  --max: 1180px;
  --font-display: "Syne", "Arial Narrow", sans-serif;
  --font-body: "Source Serif 4", "Georgia", serif;
  --font-ui: "Figtree", "Helvetica Neue", sans-serif;
  --shadow-glow: 0 0 60px -10px rgba(232, 146, 58, 0.35);
  --radius: 4px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--ember-hot);
}
a:hover {
  color: #fff;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--ember);
  color: var(--ink);
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-family: var(--font-ui);
  font-weight: 600;
}
.skip-link:focus {
  transform: none;
}

/* ---------- Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(14, 13, 12, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(243, 238, 230, 0.08);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--paper);
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}
.brand span {
  color: var(--teal);
  font-weight: 700;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.35rem;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
}
.nav-links a {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--paper);
  border-bottom-color: var(--ember);
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-small {
  padding: 0.5rem 0.9rem;
  font-size: 0.72rem;
}

.btn-ember {
  color: var(--ink);
  background: linear-gradient(180deg, var(--ember-hot), var(--ember) 55%, var(--ember-deep));
  box-shadow: var(--shadow-glow);
}
.btn-ember:hover {
  color: #1a0f05;
}

.btn-teal {
  color: var(--ink);
  background: linear-gradient(180deg, var(--teal-soft), var(--teal) 60%, var(--teal-deep));
}
.btn-teal:hover {
  color: #042422;
}

.btn-ghost {
  color: var(--paper);
  border-color: rgba(243, 238, 230, 0.28);
  background: rgba(255, 255, 255, 0.04);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(100vh, 920px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 5rem var(--gutter) 4.5rem;
  overflow: hidden;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(1.2px 1.2px at 18% 22%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 72% 14%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.4px 1.4px at 88% 36%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(ellipse 55% 40% at 70% 0%, rgba(232, 146, 58, 0.28), transparent 70%),
    radial-gradient(ellipse 40% 50% at 10% 80%, rgba(46, 196, 182, 0.16), transparent 65%),
    radial-gradient(ellipse 80% 55% at 50% 110%, rgba(180, 90, 18, 0.35), transparent 70%),
    linear-gradient(165deg, #0a0908 0%, #17140f 42%, #2a1c12 78%, #3d2414 100%);
}
.hero-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background:
    repeating-radial-gradient(circle at 50% 120%, transparent 0 6px, rgba(0, 0, 0, 0.35) 7px 8px);
  mix-blend-mode: multiply;
  animation: groove 28s linear infinite;
  pointer-events: none;
}

@keyframes groove {
  from {
    transform: rotate(0deg) scale(1.4);
  }
  to {
    transform: rotate(360deg) scale(1.4);
  }
}

.hero-beam {
  position: absolute;
  width: 42vw;
  height: 90vh;
  top: -10%;
  right: 8%;
  background: linear-gradient(180deg, rgba(255, 180, 90, 0.2), transparent 70%);
  transform: skewX(-18deg);
  filter: blur(8px);
  animation: beam 7s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 1;
}

@keyframes beam {
  from {
    opacity: 0.45;
    transform: skewX(-18deg) translateX(0);
  }
  to {
    opacity: 0.85;
    transform: skewX(-14deg) translateX(-2%);
  }
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
}

.hero-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 12vw, 7.5rem);
  letter-spacing: -0.04em;
  line-height: 0.92;
  margin: 0 0 1.25rem;
  background: linear-gradient(180deg, #fff8ee 0%, #f3eee6 40%, var(--ember-hot) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.45));
}
.hero-brand span {
  display: block;
  color: var(--teal);
  background: none;
  -webkit-text-fill-color: var(--teal);
  font-size: 0.42em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 0.55rem;
  font-weight: 700;
}

.hero-line {
  font-family: var(--font-ui);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 500;
  max-width: 32rem;
  color: #ebe3d7;
  margin: 0 0 1.75rem;
  line-height: 1.4;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-example {
  margin-top: 2.75rem;
  max-width: 36rem;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: var(--muted);
}
.hero-example strong {
  color: var(--paper);
  font-weight: 650;
}
.hero-example a {
  color: var(--teal-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(46, 196, 182, 0.45);
}
.hero-example a:hover {
  color: #fff;
}

/* ---------- Sections ---------- */

.section {
  padding: 4.5rem var(--gutter);
}
.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-kicker {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.section h2 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin-bottom: 0.75rem;
}

.section-lede {
  font-family: var(--font-ui);
  color: var(--muted);
  max-width: 38rem;
  margin: 0 0 2rem;
  font-size: 1.05rem;
}

.section-paper {
  background:
    linear-gradient(180deg, rgba(243, 238, 230, 0.96), #ebe4d8),
    var(--paper);
  color: var(--ink);
}
.section-paper .section-kicker {
  color: var(--ember-deep);
}
.section-paper .section-lede,
.section-paper p {
  color: #4a433a;
}
.section-paper a {
  color: var(--teal-deep);
}

.section-stage {
  background:
    radial-gradient(ellipse 60% 40% at 80% 0%, rgba(232, 146, 58, 0.12), transparent),
    var(--stage);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Concept strip — one job */

.concept-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
  font-family: var(--font-ui);
}
.concept-flow > div {
  padding: 1.25rem 0;
  border-top: 2px solid var(--ember);
}
.concept-flow strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}
.concept-flow span {
  color: var(--muted);
  font-size: 0.95rem;
}
.concept-flow > div:nth-child(2) {
  border-top-color: var(--paper-dim);
}
.concept-flow > div:nth-child(3) {
  border-top-color: var(--teal);
}

@media (max-width: 800px) {
  .concept-flow {
    grid-template-columns: 1fr;
  }
}

/* ---------- Page header (inner) ---------- */

.page-hero {
  padding: 3.5rem var(--gutter) 1.5rem;
  background:
    radial-gradient(ellipse 50% 80% at 0% 0%, rgba(46, 196, 182, 0.12), transparent 55%),
    radial-gradient(ellipse 40% 60% at 100% 0%, rgba(232, 146, 58, 0.14), transparent 50%),
    var(--ink);
}
.page-hero-inner {
  max-width: var(--max);
  margin: 0 auto;
}
.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin-bottom: 0.6rem;
}
.page-hero p {
  font-family: var(--font-ui);
  color: var(--muted);
  max-width: 40rem;
  margin: 0;
}

/* ---------- Explore ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin: 1.5rem 0 1rem;
  font-family: var(--font-ui);
}
.filters label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.filters select,
.filters input {
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--paper);
  background: var(--smoke);
  border: 1px solid rgba(243, 238, 230, 0.14);
  border-radius: var(--radius);
  padding: 0.55rem 0.75rem;
  min-width: 9rem;
}
.filters input {
  min-width: min(100%, 16rem);
}
.count-line {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.entry-grid {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.entry-row {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.1fr) 5rem;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 1rem 0.85rem;
  text-decoration: none;
  color: inherit;
  border-left: 3px solid var(--accent, var(--ember));
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.2s ease, transform 0.2s ease;
  font-family: var(--font-ui);
}
.entry-row:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(3px);
  color: inherit;
}
.entry-year {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ember-hot);
  font-size: 1.1rem;
}
.entry-one {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--paper);
}
.entry-artist,
.entry-album {
  color: var(--muted);
  font-size: 0.9rem;
}
.entry-two-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
}
.entry-two-title {
  font-weight: 650;
  color: var(--teal-soft);
}
.entry-conf {
  justify-self: end;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.conf-high {
  color: var(--ember-hot);
}
.conf-medium {
  color: var(--paper-dim);
}

@media (max-width: 900px) {
  .entry-row {
    grid-template-columns: 3.5rem 1fr;
    grid-template-areas:
      "year main"
      "year two"
      "year album";
  }
  .entry-year {
    grid-area: year;
  }
  .entry-main {
    grid-area: main;
  }
  .entry-album {
    grid-area: album;
  }
  .entry-two {
    grid-area: two;
  }
  .entry-conf {
    display: none;
  }
}

/* ---------- Compare / reader ---------- */

.compare-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 2fr);
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 4rem;
}

@media (max-width: 980px) {
  .compare-layout {
    grid-template-columns: 1fr;
  }
}

.rail {
  font-family: var(--font-ui);
  max-height: calc(100vh - 6rem);
  overflow: auto;
  position: sticky;
  top: 5rem;
  padding-right: 0.25rem;
}
.rail h2 {
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rail-link {
  display: block;
  padding: 0.65rem 0.5rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.rail-link:hover,
.rail-link[aria-current="true"] {
  background: rgba(46, 196, 182, 0.08);
  color: inherit;
}
.rail-link[aria-current="true"] {
  border-left: 2px solid var(--teal);
}
.rail-year {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--ember);
  font-weight: 700;
  margin-right: 0.4rem;
}
.rail-title {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
}
.rail-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.reader {
  background:
    linear-gradient(180deg, rgba(243, 238, 230, 0.98), #e8e0d4);
  color: var(--ink);
  border-radius: 10px;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.7);
}

.reader-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.step {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid rgba(14, 13, 12, 0.2);
  background: #fff;
  font-size: 1.35rem;
  cursor: pointer;
  color: var(--ink);
}
.step:disabled {
  opacity: 0.35;
  cursor: default;
}
.reader-ref {
  font-family: var(--font-display);
  min-width: 8rem;
}
.ref-value {
  display: block;
  font-size: 1.6rem;
  line-height: 1;
}
.ref-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: #5c5348;
  margin-top: 0.2rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  width: 100%;
}
.chip {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(14, 13, 12, 0.18);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  color: var(--ink);
}
.chip[aria-pressed="true"] {
  background: hsl(var(--h, 18) 55% 42%);
  color: #fff;
  border-color: transparent;
}

.album-strip {
  font-family: var(--font-ui);
  padding: 0.85rem 0 1rem;
  border-top: 1px solid rgba(14, 13, 12, 0.1);
  border-bottom: 1px solid rgba(14, 13, 12, 0.1);
  margin-bottom: 1rem;
}
.album-strip strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  display: block;
}
.album-strip p {
  margin: 0.25rem 0 0;
  color: #5c5348;
  font-size: 0.9rem;
}

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.col {
  background: #fff;
  border-top: 4px solid hsl(var(--h, 18) 60% 42%);
  padding: 1rem 1rem 1.15rem;
  min-height: 100%;
}
.col-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: #6a6156;
  margin-bottom: 0.65rem;
}
.col-title {
  font-size: 1.55rem;
  margin-bottom: 0.2rem;
}
.col-artist {
  font-family: var(--font-ui);
  margin: 0 0 0.65rem;
  color: #4a433a;
}
.col-note {
  font-size: 0.95rem;
  color: #5c5348;
  margin: 0 0 1rem;
}
.col-empty {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: #6a6156;
}
.col-actions {
  margin-top: 0.75rem;
}
.col-actions .btn-ghost {
  color: var(--ink);
  border-color: rgba(14, 13, 12, 0.25);
}
.spotify-embed {
  width: 100%;
  min-height: 152px;
  border: 0;
}

.outbound {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.chip-link {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(14, 13, 12, 0.06);
  color: var(--ink);
}
.chip-link:hover {
  background: var(--ink);
  color: var(--paper);
}

.reader-blurb {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: #3f3830;
  margin: 0.75rem 0 0;
}

.affiliate-disclosure {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: #6a6156;
  margin: 1rem 0 0;
}

/* ---------- Playlist ---------- */

.play-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.play-row {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem 0.75rem;
  border-left: 3px solid var(--accent, var(--teal));
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--font-ui);
}
.play-num {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--muted);
}
.play-title {
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--paper);
}
.play-title:hover {
  color: var(--teal-soft);
}
.play-meta,
.play-seed {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.play-seed a {
  color: var(--ember-hot);
}
.play-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .play-row {
    grid-template-columns: 2.5rem 1fr;
  }
  .play-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin: 1.25rem 0;
  font-family: var(--font-ui);
}
.toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 2.5rem var(--gutter) 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-ui);
  color: var(--muted);
  font-size: 0.88rem;
}
.site-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
}
.site-footer a {
  color: var(--paper-dim);
}
.site-footer .brand {
  font-size: 1rem;
  color: var(--paper);
}

/* ---------- Motion ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-atmosphere::after,
  .hero-beam {
    animation: none;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.loading,
.empty {
  font-family: var(--font-ui);
  color: var(--muted);
  padding: 2rem 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
