/* Song pages: /songs and /songs/<slug>.
   Loaded after style.css, so the :root tokens and .btn/.sounds-like/.wrap
   rules there are already in play. Only pages that load this file define
   .wrap-narrow at this width -- shows.html and book-us.html set their own. */

.song-bg {
  position: fixed; inset: 0; z-index: -2;
  background: url('/assets/img/wicked-din.webp') center 30% / cover no-repeat;
  opacity: 0.18;
}
.song-veil {
  position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, var(--ink) 0%, rgba(20,11,28,0.72) 30%,
                    rgba(20,11,28,0.86) 70%, var(--ink) 100%),
    radial-gradient(ellipse 900px 500px at 50% 8%, rgba(233,61,155,0.16), transparent 70%);
}

/* Wide enough for a comfortable measure plus a margin-note column. */
.wrap-narrow { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* ---------- hero ---------- */
.song-hero { text-align: center; padding: 62px 20px 26px; }
.song-hero .eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--tangerine); margin: 0 0 10px;
}
.song-hero .eyebrow a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(242,137,46,0.4); }
.song-hero .eyebrow a:hover { color: var(--cream); }

/* ---------- track nav in the eyebrow ---------- */
/* "Track 7 ◀  Track 8 of 8 · Wicked Din  ▶ Track 1" -- the arrowtips sit inboard
   and point outward at what they lead to, bracketing the position line.
   Centred with a gap rather than pushed to the edges: at 1200px, links pinned to
   the far corners read as two unrelated things rather than one line. */
.track-nav {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center; gap: 4px 16px;
}
.tn-here { white-space: nowrap; }
.tn {
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
  /* the underline belongs to the words, not to the arrowhead */
  border-bottom: 0 !important;
}
.tn-lab { border-bottom: 1px solid rgba(242, 137, 46, 0.4); }
.tn:hover .tn-lab { border-bottom-color: var(--cream); }
.tn-tip {
  width: 7px; height: 9px; flex: none;
  fill: var(--tangerine);
  transition: fill 0.14s ease, transform 0.14s ease;
}
.tn:hover .tn-tip { fill: var(--cream); }
.tn-prev:hover .tn-tip { transform: translateX(-2px); }
.tn-next:hover .tn-tip { transform: translateX(2px); }

@media (prefers-reduced-motion: reduce) {
  .tn-tip { transition: none; }
  .tn-prev:hover .tn-tip, .tn-next:hover .tn-tip { transform: none; }
}

/* Three items at 13px mono with 0.22em tracking cannot fit a phone at a size
   worth reading, and left to wrap it stacks into three rows above the title --
   which looks like a list, not a position marker. So the neighbours shed the
   word "Track" and keep just their number: "7 ◀ Track 8 of 8 · Wicked Din ▶ 1".
   Screen readers still get the whole thing from the .vh spans. */
/* `.song-hero .eyebrow` above is two classes; a bare `.track-nav` here is one,
   so it loses on specificity and the font-size below silently does nothing.
   Hence the descendant selector -- this cost an hour once. */
@media (max-width: 620px) {
  .song-hero .track-nav { gap: 4px 11px; font-size: 11.5px; letter-spacing: 0.14em; }
  .tn-word { display: none; }
}
/* Measured: with "Track" already gone the line still wants ~360px, so a 375px
   phone breaks it in two. Most of that is tracking, which is the cheapest thing
   to spend here -- mono caps stay legible far tighter than 0.14em. */
@media (max-width: 430px) {
  .song-hero .track-nav { gap: 3px 9px; font-size: 11px; letter-spacing: 0.07em; }
}
.song-hero h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(38px, 8vw, 72px); line-height: 0.98;
  letter-spacing: 0.02em; margin: 0 0 16px; text-wrap: balance;
  text-shadow: 0 6px 40px rgba(0,0,0,0.7);
}
.song-hero .lede {
  color: var(--cream); font-size: 18px; line-height: 1.5;
  max-width: 46ch; margin: 0 auto; font-style: italic;
  text-shadow: 0 2px 16px rgba(0,0,0,0.8);
}
.song-hero.hub .lede { font-style: normal; color: var(--cream-dim); max-width: 52ch; }
.song-hero.hub .lede a { color: var(--cream); }
.track-player { border: 0; width: min(420px, 100%); height: 42px; margin: 26px auto 0; display: block; }
.song-hero .dur {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em;
  color: var(--cream-dim); margin: 8px 0 0;
}

/* ---------- sections ---------- */
.s { padding: 40px 0 8px; }
.s h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(24px, 3.4vw, 32px); letter-spacing: 0.02em;
  margin: 0 0 20px; color: var(--cream);
}
/* No section heading uses cyan: that is the margin notes' colour, and a cyan
   heading sitting beside cyan notes read as the same voice. */
#story h2 { color: var(--tangerine); }
#studio h2 { color: var(--green); }
#lyrics h2 { color: var(--magenta); }

/* Prose in the content column, Seva's margin notes beside it.

   The notes are positioned OUT of normal flow on purpose. They used to sit in a
   second grid column, one row per paragraph -- which meant a note taller than
   its paragraph stretched that row and drove a visible wedge between lyric
   stanzas. Absolute positioning keeps paragraph and stanza spacing dependent on
   the prose alone, however long a note runs. DOM order is untouched, so the
   narrow layout below can still flow each note under its own paragraph. */
.annotated { position: relative; padding-right: 288px; }
.annotated .para {
  margin: 0 0 18px; max-width: 62ch;
  color: var(--cream-dim); line-height: 1.68;
}
.annotated > .notecol { position: absolute; top: 0; right: 0; width: 258px; }
.annotated > span { display: none; }

/* The phrase a note was written about, and the number tying the two together. */
.anch {
  background: none; color: var(--cream);
  box-shadow: inset 0 -1px 0 0 rgba(76, 200, 214, 0.55);
}
.anch-n {
  font-family: var(--mono); font-size: 10px; line-height: 1;
  color: var(--cyan); vertical-align: super; margin-left: 2px;
}

.note {
  border-left: 2px solid var(--cyan);
  padding: 2px 0 2px 14px; margin: 4px 0 18px;
  font-size: 14px; line-height: 1.55;
}
.n-who {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--cyan); margin: 0 0 6px;
  display: flex; align-items: center; gap: 7px;
}
.n-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; border-radius: 50%; flex: none;
  background: var(--cyan); color: var(--ink);
  font-size: 10px; letter-spacing: 0;
}
.n-text { margin: 0; color: var(--cream-dim); }
.n-reply { margin: 8px 0 0; color: var(--cream); }
.n-reply span {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--tangerine); margin-right: 6px;
}

/* ---------- lyrics ---------- */
.lyricbox { margin-top: 4px; }
.stanza {
  margin: 0 0 22px; max-width: 52ch;
  padding-left: 18px; border-left: 3px solid var(--magenta);
  color: var(--cream); line-height: 1.75; font-size: 17px;
}

/* ---------- notes from the studio ---------- */
.voice {
  background: color-mix(in srgb, var(--ink-2) 82%, transparent);
  border: 1px solid var(--hairline); border-left: 3px solid var(--green);
  border-radius: 12px; padding: 20px 22px;
  max-width: 62ch; margin: 0 0 18px;
}
.v-who {
  font-family: var(--display); font-size: 19px; letter-spacing: 0.02em;
  margin: 0 0 12px; color: var(--cream);
}
.v-who span {
  display: block; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cream-dim); margin-top: 3px;
}
.voice p { margin: 0 0 12px; color: var(--cream-dim); line-height: 1.65; font-size: 15px; }
.voice p:last-child { margin-bottom: 0; }

/* ---------- credits + fan quote ---------- */
.credits { max-width: 62ch; }
.fan {
  margin: 0; max-width: 62ch;
  border-left: 3px solid var(--tangerine); padding: 6px 0 6px 20px;
  font-size: 19px; line-height: 1.5; color: var(--cream); font-style: italic;
}

/* ---------- prev / next ---------- */
.prevnext {
  display: flex; gap: 14px; flex-wrap: wrap; justify-content: space-between;
  border-top: 1px solid var(--hairline); margin-top: 44px; padding-top: 26px;
}
.pn {
  display: flex; flex-direction: column; gap: 4px;
  text-decoration: none; color: var(--cream);
  font-family: var(--display); font-size: 19px; letter-spacing: 0.02em;
}
.pn.next { margin-left: auto; text-align: right; }
.pn span {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--cream-dim);
}
.pn:hover { color: var(--magenta); }

.song-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; padding: 40px 0 80px; }

/* ---------- hub ---------- */
.song-list { display: flex; flex-direction: column; gap: 12px; padding: 10px 0 6px; max-width: 760px; margin: 0 auto; }
.song-card {
  display: grid; grid-template-columns: 42px 1fr auto; gap: 18px; align-items: center;
  background: color-mix(in srgb, var(--ink-2) 82%, transparent);
  border: 1px solid var(--hairline); border-left: 3px solid var(--magenta);
  border-radius: 12px; padding: 18px 22px; text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.song-card:hover { transform: translateY(-2px); border-left-color: var(--tangerine); }
.c-num { font-family: var(--mono); font-size: 15px; color: var(--green); }
.c-title { display: block; font-family: var(--display); font-size: 22px; color: var(--cream); letter-spacing: 0.02em; }
.song-card:hover .c-title { color: var(--magenta); }
.c-quote { display: block; color: var(--cream-dim); font-size: 14px; line-height: 1.5; margin-top: 4px; font-style: italic; }
.c-dur { font-family: var(--mono); font-size: 13px; color: var(--cream-dim); font-variant-numeric: tabular-nums; }

/* ---------- narrow ---------- */
@media (max-width: 900px) {
  /* Back into normal flow, so each note lands under the paragraph it belongs to. */
  .annotated { padding-right: 0; }
  .annotated > .notecol { position: static; width: auto; }
  .note {
    margin: 2px 0 20px; padding: 12px 0 12px 14px;
    background: color-mix(in srgb, var(--ink-2) 60%, transparent);
    border-radius: 0 8px 8px 0; max-width: 62ch;
  }
}
@media (max-width: 560px) {
  .song-card { grid-template-columns: 28px 1fr; }
  .c-dur { grid-column: 2; }
  .pn.next { text-align: left; }
}
