/* ==========================================================================
   8m/s — the album page's shared chrome.
   The track list at the foot of the wall, and the lyric sheet that slides in
   over it. Everything else (buttons, the veil, type tokens) is in style.css;
   the wall itself is in wall.css.
   ========================================================================== */

/* --- the track list ----------------------------------------------------- */

.tracklist {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: .1rem;
  width: min(560px, 100%);
  text-align: left;
}
.tracklist li {
  display: grid; grid-template-columns: 2.4rem 1fr auto; gap: 1rem; align-items: baseline;
  padding: .7rem 0; border-bottom: 1px solid var(--hair-soft);
  font-size: .95rem;
  transition: border-color .35s;
}
.tracklist li:hover:not(.is-soon) { border-bottom-color: var(--hair); }
.tracklist .go {
  font-family: var(--f-mono); font-size: .7rem; color: var(--ice);
  opacity: 0; transform: translate(-4px, 3px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.tracklist li:hover .go { opacity: 1; transform: none; }
.tracklist .n { font-family: var(--f-mono); font-size: .62rem; color: var(--ice-dim); }
.tracklist button {
  background: none; border: 0; padding: 0; color: inherit; cursor: pointer;
  font: inherit; text-align: left; width: 100%;
  font-family: var(--f-display); font-weight: 500; font-variation-settings: "opsz" 12;
  text-transform: uppercase; letter-spacing: .08em;
  transition: color .3s;
}
.tracklist button:hover { color: var(--ice); }
.tracklist em { font-family: var(--f-mono); font-style: normal; font-size: .58rem; letter-spacing: .2em; color: var(--ash); }
.tracklist li > span[lang] {
  font-family: var(--f-display); font-weight: 500; font-variation-settings: "opsz" 12;
  text-transform: uppercase; letter-spacing: .08em; color: var(--ash);
}

/* tracks whose lyrics are not written down yet */
.tracklist em.soon {
  font-family: var(--f-mono); font-size: .6rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ice-dim);
}

/* --- the closing section ------------------------------------------------ */

.ledger {
  position: relative;
  padding: clamp(5rem, 14vh, 10rem) var(--gut) clamp(5rem, 12vh, 9rem);
  display: grid; justify-items: center; gap: clamp(1.8rem, 5vh, 3rem);
}
/* a long scrim rather than a band, so nothing edges */
.ledger::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom,
    rgba(1, 2, 3, 0), rgba(1, 2, 3, .5) 18%, rgba(1, 2, 3, .88) 52%, #010203 84%);
}
.ledger__head {
  font-family: var(--f-mono); font-size: .6rem;
  letter-spacing: .42em; text-indent: .42em; text-transform: uppercase;
  color: rgba(140, 162, 182, .6); margin: 0;
}
.ledger .tracklist { width: min(560px, 100%); }
.ledger__ctas { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }

/* --- thumbs, not cursors ------------------------------------------------ */
/* The ledger's rows were 26px of type inside 48px of row padding, so the only
   thing you could actually hit was the word itself. Move the padding onto the
   button and the whole row becomes the target, at the same rhythm. */
@media (hover: none) {
  .ledger .tracklist li { padding: 0; align-items: center; }
  .ledger .tracklist button,
  .ledger .tracklist li > span[lang] { display: block; padding: .85rem 0; }
}

/* --- lyric sheet -------------------------------------------------------- */

.sheet-scrim {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(2, 4, 7, .72); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .8s var(--ease);
}
.sheet-scrim.is-on { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed; z-index: 80; top: 0; right: 0; bottom: 0;
  width: min(560px, 100%);
  background: linear-gradient(150deg, #08131c, #03070c 60%);
  border-left: 1px solid var(--hair);
  transform: translateX(101%);
  /* unhurried: the sheet is read, not dismissed, so it can take its time */
  transition: transform .95s cubic-bezier(.22, .61, .2, 1);
  display: flex; flex-direction: column;
  box-shadow: -40px 0 90px rgba(0,0,0,.6);
}
.sheet.is-on { transform: none; }
.sheet__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1.6rem clamp(1.3rem, 4vw, 2.6rem) 1.2rem;
  border-bottom: var(--rule);
}
.sheet__n { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .24em; color: var(--ice); display: block; margin-bottom: .6rem; }
.sheet__title { font-family: var(--f-display); font-weight: 500; font-variation-settings: "opsz" 12; text-transform: uppercase; letter-spacing: .06em; font-size: clamp(1.3rem, 1rem + 1.2vw, 2rem); margin: 0; line-height: 1; }
.sheet__close {
  background: none; border: 1px solid var(--hair); color: var(--frost);
  font-family: var(--f-mono); font-size: .6rem; letter-spacing: .2em; text-transform: uppercase;
  padding: .6rem .85rem; cursor: pointer; flex: none;
  transition: border-color .3s, color .3s;
}
.sheet__close:hover { border-color: var(--ice); color: var(--ice); }
/* the words settle a beat after the sheet has — nothing moves on the page
   while it is still sliding */
.sheet__head, .sheet__body { opacity: 0; transition: opacity .7s var(--ease) .35s; }
.sheet.is-on .sheet__head, .sheet.is-on .sheet__body { opacity: 1; }
.sheet:not(.is-on) .sheet__head, .sheet:not(.is-on) .sheet__body { transition-delay: 0s; transition-duration: .3s; }
.sheet__body {
  /* the pane ends flush with the screen, so the last line of a long lyric was
     sitting under the home indicator */
  padding-bottom: calc(clamp(1.6rem, 4vw, 2.6rem) + env(safe-area-inset-bottom));
  overflow-y: auto; padding: clamp(1.6rem, 4vw, 2.6rem);
  -webkit-overflow-scrolling: touch;
}
.sheet__lyrics {
  margin: 0; font-family: var(--f-body); font-weight: 200;
  font-size: clamp(.95rem, .9rem + .3vw, 1.12rem); line-height: 2;
  white-space: pre-wrap; color: #d3e3ea;
}

@media (max-width: 700px) {
  .sheet { top: auto; height: 86svh; width: 100%; transform: translateY(101%); border-left: 0; border-top: 1px solid var(--hair); }
  .sheet.is-on { transform: none; }
}

/* the sheet keeps its scrolling to itself — reaching the end of the lyrics
   should not start moving the wall behind it */
.sheet__body { overscroll-behavior: contain; }

/* --- the way back is not a button --------------------------------------- */
/* "Back to the surface" was a bordered box beside "Dig a little deeper",
   giving two calls equal weight when only one of them is the call. It is now
   set like the mason's mark under a carving — the same face, size and tracking
   — so it reads as a way out rather than an offer. */
.ledger__ctas .btn--ghost {
  border: 0; padding: .6rem 0; background: none;
  font-family: var(--f-mono); font-size: .6rem;
  letter-spacing: .42em; text-indent: .42em;
  text-transform: uppercase;
  color: rgba(158, 182, 202, .72);
  transition: color .4s var(--ease);
}
.ledger__ctas .btn--ghost:hover,
.ledger__ctas .btn--ghost:focus-visible {
  border: 0; background: none; color: var(--frost);
}
/* stacked, not side by side: the call, then the way out beneath it */
.ledger__ctas { flex-direction: column; align-items: center; gap: 1.5rem; }
.ledger__ctas .btn--call { font-size: .74rem; letter-spacing: .26em; }
@media (hover: none) {
  .ledger__ctas .btn--call { min-height: 52px; padding-inline: 2.2rem; }
}
@media (hover: none) {
  /* the overlay keeps the target at a thumb's size without a border */
  .ledger__ctas .btn--ghost { position: relative; }
  .ledger__ctas .btn--ghost::after { content: ""; position: absolute; inset: -.6rem -1rem; }
}

/* the artist's credit, last thing on the wall: set like the ledger's head,
   no hover tween (see CLAUDE.md), only a colour change on hover */
.ledger__credit {
  margin: clamp(1rem, 4vh, 2.4rem) 0 0;
  font-family: var(--f-mono); font-size: .56rem;
  letter-spacing: .32em; text-indent: .32em; text-transform: uppercase;
  color: rgba(140, 162, 182, .68); text-align: center;
}
.ledger__credit a { color: rgba(190, 212, 228, .8); text-decoration: none; border-bottom: 1px solid rgba(143, 199, 220, .3); padding-bottom: .15em; }
.ledger__credit a:hover, .ledger__credit a:focus-visible { color: var(--frost); border-bottom-color: rgba(143, 199, 220, .7); }
