/* Music hub (music.html). Home's parts do the work: rise and crest, strip, the two-row lineup (css/sections.css .lineup, js/lineup.js),
   score, close, footer, room and header. This file adds the hub's composition: the stage head, the two channels, the projects wall,
   the network head, and the name-only figure of Cường Seven. Shared rules are not restated here. The page frame is --frame (css/system.css). */

/* ───────── 1. Stage head: the lead film, the title, the line, the action ───────── */
.stage {
  position: relative;
}
.stage__label {
  position: absolute;
  z-index: 5;
  top: calc(var(--hdr) + 14px);
  left: var(--frame);
  margin: 0;
  color: var(--night-ink);
}
.stage__film {
  --pos: 55%;
  flex: none;
  width: 100%;
  aspect-ratio: auto;
  height: 45svh;
  min-height: 300px;
  max-height: 520px;
  cursor: auto;
}
/* The open stage film takes the 16:9 shape of every open film at every width: its closed height does not apply. */
.stage__film.is-open {
  height: auto;
  min-height: 0;
  max-height: none;
}
.stage__film .strip__credit {
  position: static;
  top: auto;
  left: auto;
  max-width: none;
  padding: 0;
  color: var(--night-ink);
  font-size: 12px;
  text-shadow: 0 1px 12px rgba(11, 10, 10, 0.85);
}
.stage__credit {
  position: absolute;
  z-index: 4;
  left: var(--margin);
  right: var(--margin);
  bottom: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px 16px;
}
.stage__credit .strip__credit {
  grid-column: 1 / -1;
  justify-self: end;
}
.stage__text {
  position: relative;
  padding: 28px var(--margin) 44px;
}
.stage__h1 {
  margin: 0;
  font-size: 13vw;
  line-height: 0.96;
}
.stage__line {
  margin: 22px 0 0;
  max-width: 30em;
  font-size: 16px;
  line-height: 1.55;
  color: var(--night-ink);
}
.stage__action {
  margin-top: 28px;
  --hh: 48px;
}
.stage .strip__play {
  position: relative;
  right: auto;
  bottom: auto;
  width: 48px;
  height: 48px;
}

@media (min-width: 1440px) {
  .stage__film {
    --pos: 64%;
  }
}

@media (min-width: 1024px) {
  .stage {
    height: 100svh;
    min-height: 640px;
  }
  .stage:has(.stage__film.is-open) .stage__text {
    visibility: hidden;
  }
  .stage__film {
    position: absolute;
    inset: 0;
    height: auto;
    min-height: 0;
    max-height: none;
  }
  .stage__label {
    top: 112px;
  }
  .stage__credit {
    left: auto;
    right: var(--frame);
    top: 112px;
    bottom: auto;
    width: min(360px, 30vw);
    grid-template-columns: 1fr;
    justify-items: end;
    text-align: right;
    gap: 14px;
  }
  .stage__credit .strip__credit {
    grid-column: auto;
  }
  .stage__text {
    position: absolute;
    left: var(--frame);
    right: var(--frame);
    bottom: 9svh;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    align-items: end;
  }
  .stage__h1 {
    grid-column: 1 / span 8;
    grid-row: 1;
    font-size: clamp(64px, 8.4vw, 128px);
  }
  .stage__line {
    grid-column: 9 / span 4;
    grid-row: 1;
    margin: 0;
  }
  .stage__action {
    grid-column: 1 / span 4;
    grid-row: 2;
    justify-self: start;
    margin-top: 32px;
  }
}

/* ───────── 2. Services: two channels, each a live film strip of the work, then the channel's words on strings ───────── */
.svc,
.projects,
.network {
  padding-inline: var(--frame);
}
.world__head {
  padding-inline: 0;
}
.svc .channels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px 24px;
  margin-top: 56px;
}
.channel {
  position: relative;
  min-width: 0;
}
.channel__film {
  flex: none;
  width: 100%;
  aspect-ratio: 4 / 3;
}
.channel__film.is-open {
  aspect-ratio: 16 / 9;
}
.channel__h {
  margin: 32px 0 0;
  font-size: 32px;
}
.channel__p {
  margin: 20px 0 0;
  max-width: 34em;
  font-size: 17px;
  line-height: 1.55;
  color: var(--night-muted);
}
.channel__rows {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.row {
  position: relative;
  padding: 12px 0 0;
}
.row__t {
  display: block;
  font-size: 20px;
  line-height: 1.3;
  color: var(--night-ink);
  font-variation-settings:
    'wdth' 90,
    'wght' 650;
}
.channel:first-child .row__t {
  font-size: 17px;
  color: var(--night-muted);
  font-variation-settings:
    'wdth' 100,
    'wght' 400;
}
.channel:first-child .row__t b {
  font-size: 20px;
  font-weight: inherit;
  color: var(--night-ink);
  font-variation-settings:
    'wdth' 82,
    'wght' 700;
}
.row .string {
  margin-top: 8px;
}
.svc__cross {
  margin-top: 40px;
  height: auto;
  min-height: var(--hh);
  max-width: 100%;
  padding-block: 12px;
  white-space: normal;
  text-align: left;
  line-height: 1.3;
}
.svc__cross .mk {
  margin-right: 4px;
}
@media (min-width: 1024px) {
  .svc .channels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 72px;
  }
  .channel__h {
    font-size: 48px;
    margin-top: 40px;
  }
}
@media (min-width: 1600px) {
  .channel__h {
    font-size: 64px;
  }
  .channel__p {
    font-size: 19px;
  }
  .row__t {
    font-size: 22px;
  }
  .channel:first-child .row__t {
    font-size: 19px;
  }
  .channel:first-child .row__t b {
    font-size: 22px;
  }
}

/* ───────── 3. Artists: the head; the lineup is home's two-row module ───────── */
.artists .world__head {
  padding-inline: var(--frame);
}
/* the lettering and its label stand on the inner side of the slot, the side the row brings it in from, and are narrower than it, so they are whole between the margins soon after the slot comes in */
.fig--name .fig__line,
.fig--name .fig__rise-in {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-inline: var(--over);
}
.lineup__row[data-side='right'] .fig--name :is(.fig__line, .fig__rise-in) {
  justify-content: flex-end;
  text-align: right;
}
.lineup__row[data-side='left'] .fig--name :is(.fig__line, .fig__rise-in) {
  justify-content: flex-start;
  text-align: left;
}
.fig--name :is(.fig__name, .fig__role) {
  width: fit-content;
  max-width: var(--slot);
}
.lineup__row[data-side='right'] .fig--name :is(.fig__name, .fig__role) {
  margin-left: auto;
  text-align: right;
}
.lineup__row[data-side='left'] .fig--name :is(.fig__name, .fig__role) {
  margin-right: auto;
  text-align: left;
}
.fig__vname {
  text-align: inherit;
  text-wrap: balance;
  line-height: 0.92;
  padding-bottom: calc(var(--h) * 0.05);
  max-width: calc(var(--slot) * 0.6);
  font-size: min(calc(var(--slot) / 4.2), calc(var(--h) * 0.4));
  text-transform: uppercase;
  font-variation-settings:
    'wdth' 62,
    'wght' 900;
}
.fig__line .fig__vname {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--violet);
}
.fig__vname--fill {
  color: var(--vermilion);
}
/* the outline and the label show only once the lettering and label are whole on the screen, and then arrive together over half the lettering's width (--within, js/lineup.js) */
.js .lineup:not(.is-still) .fig--name:not(.is-on) :is(.fig__line, .fig__name, .fig__role) {
  opacity: var(--within, 1);
}
.js .lineup:not(.is-still) .fig--name:not(.is-on) :is(.fig__name, .fig__role) {
  transition:
    opacity var(--fall-fig, var(--fall)) linear,
    color 200ms linear;
}

/* ───────── 4. Projects: filters, count, the justified wall ───────── */
.wall-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 48px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter {
  --hh: 40px;
  font-size: 13px;
}
.wall-count {
  margin: 0;
  font-size: 14px;
  color: var(--night-muted);
  white-space: nowrap;
}
.wall {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 48px 24px;
}
.wall.is-justified {
  --wall-row: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  column-gap: 24px;
  row-gap: 0;
  margin-bottom: calc(var(--wall-row) * -1);
}
.wall.is-justified > .tile {
  /* The flex factors are the tiles' ratios scaled by 100: flexbox hands out only the share their sum names, so a row holding one
     narrow tile (a 4:5 poster alone in a phone row) stops short of the wall's edge unless the sum stays above one. */
  flex: calc(var(--ar) * 100) 1 0;
  min-width: 0;
  margin-bottom: var(--wall-row);
}
.wall.is-justified > .wall__break {
  flex: 1 0 100%;
  height: 0;
  margin: 0;
  padding: 0;
}
.tile {
  min-width: 0;
  transition: opacity 200ms linear;
}
.tile.is-out {
  opacity: 0;
  transition-duration: 120ms;
}
.tile[hidden] {
  display: none;
}
.tile__hit {
  display: block;
  color: inherit;
}
.tile__hit:focus-visible {
  outline: 2px solid var(--night-ink);
  outline-offset: 4px;
}
.tile__media,
.tile__type {
  display: block;
  position: relative;
  aspect-ratio: var(--ar);
  overflow: hidden;
}
.tile__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile--film .frame {
  aspect-ratio: var(--ar);
  border: 0;
}
.tile__cap {
  margin-top: 14px;
}
.tile__role {
  margin: 0;
  color: var(--vermilion);
}
.tile__title {
  margin: 8px 0 0;
  font-size: 22px;
  line-height: 1.24;
  color: var(--night-ink);
}
.tile__people {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--night-muted);
}
/* The project's own way in, under its credit: the site's film-frame link (underline, offset), read in the wall's ink instead of the day's violet. */
.tile__go {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  color: var(--night-ink);
}
.tile__go:focus-visible {
  outline: 2px solid var(--night-ink);
  outline-offset: 4px;
}
@media (hover: hover) and (pointer: fine) {
  .tile__go:hover {
    color: var(--vermilion);
  }
}
/* A work with no picture is a type poster: its title, fitted to the tile (--fit, in cqi, measured per title), on the vermilion mass of the home close. */
.tile__type {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    radial-gradient(ellipse 70% 75% at 10% 100%, #f98a61 0%, transparent 70%),
    radial-gradient(ellipse 55% 70% at 100% 0%, #bd3817 0%, transparent 72%), var(--vermilion);
}
.tile__type-title {
  margin: 0;
  padding: 0 7cqi 7cqi;
  font-size: calc(var(--fit) * 1cqi);
  line-height: var(--lh, 1.28);
  color: var(--on-vermilion);
  text-wrap: balance;
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover .tile__role {
    filter: brightness(1.25);
  }
}
.wall-empty {
  margin: 48px 0 0;
  color: var(--night-muted);
}
.wall-empty[hidden] {
  display: none;
}
@media (max-width: 1023.98px) {
  .tile__title {
    font-size: 16px;
  }
  .tile__people {
    font-size: 13px;
  }
  .wall.is-justified {
    --wall-row: 40px;
    column-gap: 16px;
  }
}

/* ───────── 5. Network: the head; the score is home's ───────── */
.network {
  padding-bottom: 112px;
  max-width: none;
  margin-inline: 0;
}
.network .world__h2 {
  font-size: clamp(42px, 11.4vw, 124px);
  max-width: 11em;
}
.network .world__line {
  max-width: 34em;
}
.network .score {
  margin: 56px calc(-1 * max(var(--margin), (100vw - var(--page)) / 2)) 0;
  width: auto;
} /* the score's lines run to the screen edge at any width */
@media (min-width: 1024px) {
  .network {
    padding-bottom: 160px;
  }
  .network .world__h2 {
    font-size: clamp(88px, 8.4vw, 120px);
    max-width: 9.8em;
  }
  .network .score {
    margin-top: 72px;
  }
}
/* The heading holds the left nine columns; the founder line sits at the far right on its last baseline, so the head's right side is closed. */
@media (min-width: 1100px) {
  .network .world__head {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    align-items: end;
  }
  .network .world__label,
  .network .world__h2 {
    grid-column: 1 / span 9;
  }
  .network .world__line {
    grid-column: 10 / -1;
    grid-row: 1 / span 2;
    align-self: end;
    margin: 0;
    padding-bottom: 0.5em;
    font-size: 16px;
  }
}
@media (min-width: 1440px) {
  .network .world__line {
    font-size: 18px;
  }
}

/* ───────── 6. Close: home's music close, its action the night tab, its contact block home's ───────── */
.close__go {
  --hh: 52px;
}
