/* ============================================================
   PROTOTYPE layer — identity upgrade + MUSIC chapter
   Local-only. Extends css/styles.css; no design token replaced.
   Palette / type / motion follow docs/DESIGN.md.
   ============================================================ */

/* ---------- Hero: unchanged (kept from approved production hero) ---------- */

/* ---------- 03 / MUSIC — homepage chapter v2: full-bleed cinematic ---------- */
.music-home {
  position: relative;
  min-height: 90vh;
  background: var(--bg-deep);
  overflow: hidden;
}

/* slow crossfade layers — text-free bands cut from EFREM concept art */
.mh-bands {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.mh-band {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.mh-band[data-base] {
  z-index: 0;
  opacity: 1;
}

.mh-band.is-on {
  opacity: 1;
}

.mh-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.mh-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.72) 0%, rgba(5, 5, 5, 0.38) 34%, rgba(5, 5, 5, 0.52) 66%, rgba(5, 5, 5, 0.9) 100%),
    linear-gradient(90deg, rgba(5, 5, 5, 0.88) 0%, rgba(5, 5, 5, 0.55) 46%, rgba(5, 5, 5, 0.3) 100%),
    radial-gradient(125% 95% at 62% 42%, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0.5) 100%);
}

.mh-inner {
  position: relative;
  z-index: 3;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: clamp(4.5rem, 12vh, 7.5rem) var(--gutter);
}

.mh-copy {
  max-width: 640px;
}

.mh-copy .eyebrow {
  margin-bottom: 1.5rem;
}

.mh-name {
  margin: 0 -0.32em 0 0;
  font-size: clamp(2.25rem, 5.4vw, 4.5rem);
  font-weight: 500;
  letter-spacing: 0.32em;
  line-height: 1;
  color: var(--ink);
}

.mh-album {
  margin: clamp(1.1rem, 2.5vh, 1.6rem) 0 0;
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 500;
  letter-spacing: 0.3em;
  color: rgba(242, 240, 235, 0.88);
}

.mh-meta {
  margin: 0.85rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.mh-listen {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  margin-top: clamp(1.8rem, 4vh, 2.6rem);
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.mh-listen .tri {
  font-size: 0.62rem;
  transition: transform 0.5s var(--ease);
}

.mh-listen:hover .tri,
.mh-listen:focus-visible .tri {
  transform: translateX(5px);
}

.mh-listen:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

/* ============================================================
   MUSIC page — /music
   ============================================================ */
.mu-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  min-height: min(94vh, 940px);
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line-soft);
}

.mu-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.mu-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.mu-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.55) 0%, rgba(5, 5, 5, 0.22) 32%, rgba(5, 5, 5, 0.55) 70%, rgba(5, 5, 5, 0.92) 100%),
    linear-gradient(90deg, rgba(5, 5, 5, 0.85) 0%, rgba(5, 5, 5, 0.45) 55%, rgba(5, 5, 5, 0.28) 100%);
}

.mu-hero-copy {
  position: relative;
  z-index: 2;
  padding: clamp(3rem, 9vh, 6.5rem) clamp(1.5rem, 4.5vw, 4rem) clamp(3.5rem, 11vh, 7rem);
  max-width: 46rem;
}

.mu-hero-copy .eyebrow {
  margin-bottom: 1.6rem;
}

.mu-name {
  font-size: clamp(2.9rem, 9.5vw, 8rem);
  font-weight: 400;
  letter-spacing: 0.36em;
  line-height: 1;
  margin: 0 -0.36em 0 0;
  color: rgba(242, 240, 235, 0.85);
  white-space: nowrap;
}

.mu-tagline {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: clamp(1.05rem, 1.7vw, 1.45rem);
  letter-spacing: 0.03em;
  color: rgba(242, 240, 235, 0.6);
  margin: clamp(1.4rem, 3.5vh, 2.4rem) 0 0;
  max-width: 22em;
  line-height: 1.6;
}

/* ---------- Track list ---------- */
.mu-tracks {
  position: relative;
  padding: clamp(4.5rem, 15vh, 9rem) 0;
}

.track-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.track-row {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr) auto 46px;
  gap: 1.1rem;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: clamp(1.05rem, 2.6vh, 1.65rem) 0.35rem;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: background 0.5s var(--ease), padding 0.5s var(--ease);
}

.track-row:hover,
.track-row:focus-visible {
  background: rgba(255, 255, 255, 0.025);
  padding-left: 0.5rem;
}

.track-row:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}

.t-no {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
  opacity: 1;
  transition: color 0.45s var(--ease), opacity 0.45s var(--ease);
}

.track-row:hover .t-no,
.track-row:focus-visible .t-no {
  opacity: 0.5;
}

.t-title {
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: clamp(1.3rem, 2.5vw, 2.15rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  color: rgba(242, 240, 235, 0.9);
  transition: transform 0.5s var(--ease), color 0.5s var(--ease);
  will-change: transform;
}

.track-row:hover .t-title,
.track-row:focus-visible .t-title {
  transform: translateX(4px);
  color: var(--ink);
}

.t-dur {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

.track-row:hover .t-dur,
.track-row:focus-visible .t-dur,
.track-row.is-active .t-dur {
  opacity: 1;
}

.t-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), border-color 0.35s;
}

.track-row:hover .t-play,
.track-row:focus-visible .t-play,
.track-row.is-active .t-play {
  opacity: 1;
  transform: none;
}

.track-row.is-active .t-no {
  color: var(--accent);
}

.track-row.is-active .t-play {
  border-color: rgba(196, 181, 160, 0.7);
}

@media (hover: none), (pointer: coarse) {
  .t-play {
    opacity: 1;
    transform: none;
    width: 38px;
    height: 38px;
  }

  .t-dur {
    opacity: 1;
  }
}

/* ---------- Album head — fixed album cover (no per-track imagery) ---------- */
.mu-album-head {
  align-items: flex-end;
}

.mu-album-head .mu-album-note {
  margin-top: 1.1rem;
}

.mu-sleeve {
  margin: 0;
  width: clamp(200px, 22vw, 280px);
  flex: none;
}

.mu-sleeve img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Listen On ---------- */
.listen-on {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.9rem 1.9rem;
  margin-top: clamp(2.2rem, 6vh, 3.5rem);
}

.lo-label {
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.lo-plat {
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}

a.lo-plat {
  text-decoration: none;
  transition: color 0.3s;
}

a.lo-plat:hover,
a.lo-plat:focus-visible {
  color: var(--ink);
}

.lo-plat[data-pending] {
  color: var(--ink-dim);
  border-bottom: 1px dotted var(--line);
  padding-bottom: 2px;
  cursor: default;
}

/* ---------- Artist bio ---------- */
.mu-bio {
  border-top: 1px solid var(--line-soft);
  padding: clamp(5rem, 17vh, 10rem) 0;
}

.mu-bio-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(2.5rem, 7vw, 6.5rem);
  align-items: center;
}

.mu-bio-fig {
  margin: 0;
  max-width: 430px;
  overflow: hidden;
}

.mu-bio-fig img {
  width: 100%;
  height: auto;
  display: block;
}

.mu-bio-copy .eyebrow {
  margin-bottom: 2.2rem;
}

.mu-bio-text {
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  line-height: 2.15;
  letter-spacing: 0.06em;
  color: rgba(242, 240, 235, 0.82);
  max-width: 34em;
}

.mu-bio-text p {
  margin: 0 0 1.7em;
}

.mu-bio-text p:last-child {
  margin-bottom: 0;
  color: var(--ink-muted);
}

/* ---------- Persistent player ---------- */
.np {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: #0d0d0d;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto minmax(140px, 0.9fr) minmax(160px, 1.4fr) auto auto;
  gap: clamp(0.9rem, 2.4vw, 2rem);
  align-items: center;
  padding: 0.7rem clamp(1rem, 3vw, 2.25rem);
  transform: translateY(110%);
  transition: transform 0.55s var(--ease);
}

.np.is-on {
  transform: none;
}

.np-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.np-btn {
  width: 38px;
  height: 38px;
  border: 0;
  background: none;
  color: var(--ink-muted);
  font-size: 0.85rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: color 0.3s, background 0.3s;
}

.np-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}

.np-btn:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 1px;
}

.np-play {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.7rem;
}

.np-play:hover {
  border-color: rgba(196, 181, 160, 0.7);
  color: var(--accent);
}

.np-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1.3;
}

.np-title {
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-artist {
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.np-seek-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.np-time {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.np-seek,
.np-vol {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: var(--line);
  cursor: pointer;
  accent-color: var(--ink);
}

.np-seek::-webkit-slider-thumb,
.np-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 0.25s var(--ease);
}

.np-seek:hover::-webkit-slider-thumb,
.np-vol:hover::-webkit-slider-thumb {
  transform: scale(1.3);
}

.np-seek::-moz-range-thumb,
.np-vol::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
}

.np-vol-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 110px;
}

.np-vol-label {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--ink-dim);
}

body.player-on {
  padding-bottom: 66px;
}

/* ---------- Music page responsive ---------- */
@media (max-width: 900px) {
  .mu-hero {
    min-height: 88svh;
  }

  .mu-hero-copy {
    padding-top: clamp(3.5rem, 10vh, 5rem);
    max-width: none;
  }

  .mu-bio-grid {
    grid-template-columns: 1fr;
  }

  .mu-bio-fig {
    max-width: 320px;
  }
}

@media (max-width: 720px) {
  /* MUSIC section v3 — mobile: one full screen of atmosphere + identity */
  .music-home {
    min-height: 100svh;
  }

  .mh-inner {
    min-height: 100svh;
    align-items: flex-end;
    padding: clamp(3.5rem, 9vh, 5rem) var(--gutter) clamp(3rem, 8vh, 4.5rem);
  }

  .mh-copy {
    max-width: none;
  }

  .track-row {
    grid-template-columns: 2.5rem minmax(0, 1fr) auto 38px;
    gap: 0.7rem;
  }

  .mu-sleeve {
    width: min(46vw, 190px);
    align-self: flex-end;
  }

  .np {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "ctrl meta time"
      "seek seek seek";
    row-gap: 0.45rem;
    padding-top: 0.6rem;
    padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px));
  }

  .np-controls {
    grid-area: ctrl;
  }

  .np-meta {
    grid-area: meta;
  }

  .np-seek-wrap {
    grid-area: seek;
  }

  .np-time.total {
    grid-area: time;
  }

  .np-vol-wrap {
    display: none;
  }

  body.player-on {
    padding-bottom: 88px;
  }
}

/* ---------- i18n typographic alignment (measured via pixel audit 2026-09-27) ---------- */
/* zh hero: 电影与广告导演 ink sat 35px short of 李岩 ink — extend right (em scales with role size) */
html[lang="zh-CN"] .hero-role {
  margin-right: -1.953em;
}

/* contact: DIRECTOR / 导演 first glyph sits left of the big name's ink — align ink-left */
html[lang="en"] .contact-role {
  margin-left: clamp(7px, 1.85vw, 19px);
}

html[lang="zh-CN"] .contact-role {
  margin-left: clamp(5px, 0.75vw, 8px);
}
