/* The Táo profile (artist-tao.html): the poster head, the liner notes and the close, on home's music world. Rise, figure, strip, close and
   titles come from css/sections.css and css/system.css; this file only places them. Load after css/page.css. */

@property --fill {
  syntax: '<percentage>';
  inherits: true;
  initial-value: 0%;
}

/* ───────── Poster head: the name, the figure in front of it, on a floor string ───────── */
.tao-head {
  --fig-h: min(calc(.72 * (100vw - 2 * var(--margin)) / 1.9011), calc(100svh - var(--hdr) - 120px));
  position: relative;
  height: 100svh;
  min-height: 520px;
}
.tao-credit {
  position: absolute;
  z-index: 2;
  left: var(--frame);
  top: calc(var(--hdr) + 40px);
  display: grid;
  justify-items: start;
  gap: 8px;
}
.tao-back {
  color: var(--night-muted);
}
@media (hover: hover) {
  .tao-back:hover {
    color: var(--night-ink);
  }
}
.tao-label {
  margin: 16px 0 0;
  color: var(--vermilion);
}
.tao-role {
  display: flex;
  align-items: center;
  gap: 0.32em;
  margin: 0;
  font-size: 32px;
  line-height: 1;
  color: var(--night-ink);
}

.tao-h1 {
  --h1: min(calc((100svh - var(--hdr)) * .62), calc((100vw - 2 * var(--margin)) * .34), calc(var(--page) * .37));
  position: absolute;
  z-index: 1;
  left: var(--frame);
  top: calc(var(--hdr) + 150px);
  margin: 0;
  font-size: var(--h1);
  line-height: 1;
  color: var(--vermilion);
  white-space: nowrap;
}

.tao-fig {
  --H: var(--fig-h);
  --ar: 1.9011;
  --Wmax: calc(100vw - 2 * var(--margin));
  --lap: 1;
  --slot-min: 0px;
  --N: 0px;
  position: absolute;
  z-index: 2;
  right: var(--margin);
  bottom: 11svh;
  width: var(--W);
}
.tao-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
}

/* ───────── Liner notes: "Dự án đã đồng hành" ─────────
   Every work is a stage of its own on the 12-column grid: the tabular date in columns 1 and 2, the title as the picture of the entry in
   columns 3 to 12, and the facts under it. A title is fitted to its box: each line's width in em was measured in Archivo 62/900 and is
   held in --vi (--en where the English line differs), so its size is container width / em and follows the box at every width.
   Pictures stand at the size their source holds and touch an edge of the page. */
.tao-notes {
  position: relative;
  padding-top: 128px;
}
.tao-notes .world__head {
  padding-inline: var(--frame);
}
.tao-notes__h {
  font-size: clamp(42px, 8.4vw, 120px);
  max-width: 11em;
}
.tao-list {
  margin: 72px 0 0;
  padding: 0;
  list-style: none;
}

.tao-entry {
  --gap: 24px;
  position: relative;
  display: grid;
  align-items: start;
  column-gap: var(--gap);
  /* The two outer tracks are the page frame, so a picture can span one and touch the edge of the screen; the text sits on the twelve inner columns. */
  grid-template-columns: calc(var(--frame) - var(--gap)) repeat(12, minmax(0, 1fr)) calc(var(--frame) - var(--gap));
  padding-block: clamp(80px, 7vw, 136px) clamp(72px, 6.4vw, 124px);
}
.tao-entry__date {
  grid-column: 2 / span 2;
  grid-row: 1;
  margin: 0;
  color: var(--night-muted);
}
.tao-entry__head {
  grid-column: 4 / -2;
  grid-row: 1;
  min-width: 0;
  container-type: inline-size;
}
.tao-entry__role {
  margin: 0;
  color: var(--vermilion);
}

.tao-entry__title {
  --w: var(--vi);
  margin: 0;
  letter-spacing: -0.01em;
}
:lang(en) .tao-entry__title,
:lang(en) .tao-line {
  --w: var(--en, var(--vi));
}
.tao-line {
  --w: var(--vi);
  display: block;
  font-size: calc(100cqw / var(--w));
  white-space: nowrap;
}
.tao-entry__title--run {
  font-size: calc(100cqw / var(--w));
  line-height: 1;
  margin-block: -0.02em -0.1em;
}
.tao-entry__title--marks {
  margin-top: 0.1em;
}
.tao-entry__title--run .tao-line {
  display: inline;
  font-size: inherit;
}
.tao-entry__title--stack {
  margin-top: 16px;
}
.tao-entry__title--stack .tao-line {
  line-height: 1.14;
  margin-block: -0.04em;
}

.tao-entry__more {
  grid-column: 4 / -2;
  grid-row: 2;
  min-width: 0;
  margin-top: 40px;
}
.tao-entry__people {
  margin: 0;
  font-size: clamp(26px, 2.3vw, 46px);
  color: var(--night-ink);
}
.tao-entry__text {
  max-width: 34em;
  margin: 12px 0 0;
  font-size: clamp(18px, 1.3vw, 24px);
  line-height: 1.6;
  color: var(--night-ink);
}
.tao-entry__link {
  display: inline-block;
  margin-top: 24px;
  color: var(--night-ink);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.07em;
}
.tao-entry__pic {
  margin: 0;
  min-width: 0;
}
.tao-entry__pic img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}
.tao-entry__rule {
  position: absolute;
  left: var(--frame);
  right: var(--frame);
  bottom: 0;
}

/* Entries without a picture: the title is the picture, contour type that fills with vermilion when the entry is engaged. */
.tao-entry__title--contour {
  color: transparent;
  -webkit-text-stroke: max(2px, 0.008em) var(--violet);
  background: linear-gradient(to top, var(--vermilion) var(--fill), transparent var(--fill));
  -webkit-background-clip: text;
  background-clip: text;
  transition: --fill 900ms var(--ease-swell);
}
.tao-entry.is-on .tao-entry__title--contour {
  --fill: 100%;
}

/* The facts of an entry whose title spans the row: who on the left, what and the link on the right, on the same two column lines as the title. */
.tao-entry--plain .tao-entry__more,
.tao-entry--films .tao-entry__more {
  display: grid;
  grid-template-columns: subgrid;
  align-items: start;
  row-gap: 0;
}
.tao-entry--plain .tao-entry__people,
.tao-entry--films .tao-entry__people {
  grid-column: 1 / span 4;
}
.tao-entry--plain .tao-entry__text,
.tao-entry--films .tao-entry__text {
  grid-column: 5 / -1;
}
.tao-entry--plain .tao-entry__link,
.tao-entry--films .tao-entry__link {
  grid-column: 5 / -1;
  justify-self: start;
}

/* A poster: the title and the facts in columns 3 to 8, the poster in columns 9 to 12 and out to the right edge. */
.tao-entry--poster .tao-entry__head,
.tao-entry--poster .tao-entry__more {
  grid-column: 4 / span 6;
}
.tao-entry--poster .tao-entry__pic {
  grid-column: 10 / -1;
  grid-row: 1 / span 2;
}
.tao-entry--poster .tao-entry__more {
  display: grid;
  row-gap: 0;
  align-self: end;
}

/* A still: the title across, then the still in columns 1 to 8 and out to the left edge, the facts beside it. */
.tao-entry--still .tao-entry__pic {
  grid-column: 1 / span 9;
  grid-row: 2;
  margin: 56px 0 0;
}
.tao-entry--still .tao-entry__more {
  grid-column: 10 / -2;
  grid-row: 2;
  align-self: center;
  margin-top: 56px;
}

/* TRÚ:BÃO: its credit, then its two films side by side. The row is not named `films`, so films.js keeps both tiles. */
.tao-films {
  grid-column: 1 / -1;
  grid-row: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 64px;
}
.tao-films .strip {
  flex: none;
  width: 100%;
  aspect-ratio: 16 / 9;
}
/* A film at rest shows its lit still under the colour mask, with a lighter shade and an ink title; the playing film's picture fades in over it. */
.tao-films .strip:not(.is-on)::after {
  background: linear-gradient(180deg, rgba(11, 10, 10, 0.3) 0, transparent 30%, transparent 50%, rgba(11, 10, 10, 0.7) 100%);
}
.tao-films .strip__title {
  color: var(--night-ink);
}
img[src='/assets/films/tao/XGnZ-_wATi8-tao-rest.jpg'] {
  background-image: url(data:image/webp;base64,UklGRngAAABXRUJQVlA4IGwAAAAwBACdASogABIAPu1kq06ppaQiKA1RMB2JYwC06A7pW6vQHPTzrL77w0AA/kQX++Jrd51f7LjXvCAbt1tKQO7CxTLS7Xqan0jdqLAFZXBv5rM3fogwiQATYezHovicEHCZkrAgdlgQqQy4AAA=);
  aspect-ratio: auto 1280/720;
}
img[src='/assets/films/tao/_Tpe1UthUeI-rest.jpg'] {
  background-image: url(data:image/webp;base64,UklGRo4AAABXRUJQVlA4IIIAAACwBACdASogABIAPuVio02pJaMiMAwBIByJZQDE2BhygOV5VoIOu+lBlKqDFnzgAP6BkGOyvtO84ceELjP+oR4fMimRjLvlPs6ooow0X83ZX/5TCpJ8mKHYKyr86WELOqRS55uXG1NU0qazarJ4pSGCMHnA98Mn6qYebOeZ+Ipf4AAA);
  aspect-ratio: auto 1280/720;
}
@media (min-width: 1024px) {
  .tao-films {
    padding-inline: var(--margin);
  }
}
.tao-notes__all {
  margin: 0;
  padding: 40px var(--frame) clamp(24px, 2vw, 40px);
}

/* ───────── The close: the contact block of the page, as on home ───────── */
.close__contact {
  font-style: normal;
}
.close__contact span {
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.3;
  font-variation-settings:
    'wdth' 82,
    'wght' 700;
}

/* ───────── Phone and tablet: the head keeps the figure whole and the name below it; the entries stack, each title fitted to the width ───────── */
@media (max-width: 639.98px) {
  .tao-head {
    --fig-h: calc(100vw / 1.9011);
    height: 590px;
    min-height: 0;
  }
  .tao-credit {
    top: calc(var(--hdr) + 24px);
  }
  .tao-role {
    font-size: 26px;
  }
  .tao-h1 {
    --h1: 60vw;
    top: 192px;
  }
  .tao-fig {
    right: 0;
    bottom: 34px;
  }
  .tao-notes {
    padding-top: 24px;
  }
  .tao-list {
    margin-top: 8px;
  }
}

@media (max-width: 1023.98px) {
  .tao-entry {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
    padding: 48px var(--frame) 52px;
  }
  .tao-entry > * {
    grid-column: 1;
    grid-row: auto;
  }
  .tao-entry__date {
    order: 1;
    margin-bottom: 8px;
  }
  .tao-entry__head {
    order: 2;
  }
  .tao-entry__pic {
    order: 3;
    margin-top: 28px;
  }
  .tao-entry__more {
    order: 4;
    margin-top: 28px;
  }
  .tao-films {
    order: 5;
    margin-top: 36px;
    grid-template-columns: minmax(0, 1fr);
  }
  .tao-entry--plain .tao-entry__more,
  .tao-entry--films .tao-entry__more {
    display: block;
  }
  .tao-entry__text {
    margin-top: 12px;
  }
  .tao-entry__title--run .tao-line {
    display: block;
    font-size: calc(100cqw / var(--w));
    line-height: 1;
  }
  .tao-entry__title--marks .tao-line {
    line-height: 1.28;
    margin-block: -0.1em;
  }
  .tao-entry__title--run {
    font-size: inherit;
    line-height: inherit;
    margin-block: 16px 0;
  }
  .tao-entry--poster .tao-entry__head,
  .tao-entry--poster .tao-entry__more {
    grid-column: 1;
  }
  .tao-entry--poster .tao-entry__pic,
  .tao-entry--still .tao-entry__pic {
    grid-column: 1;
    grid-row: auto;
    margin-inline: 0;
    margin-top: 28px;
  }
  .tao-entry--poster .tao-entry__pic {
    width: min(100%, calc(70svh * 0.8));
  }
  .tao-entry--still .tao-entry__pic {
    margin-inline: calc(var(--margin) * -1);
  }
  .tao-entry--still .tao-entry__more {
    grid-column: 1;
    grid-row: auto;
    margin-top: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tao-entry__title--contour {
    transition: none;
  }
}
