/* TRIO case (business branch, case-trio.html): the opening (the shared .day-open: headline, film, side), the night band with the figures (the shared .stage), the story with its
   pictures, the đàn tranh still, the role and credits, the sign-off. Shared parts: css/system.css (tab, play, --frame), css/sections.css
   (.frame, .staff, .hl, .sheet), css/day.css (.day-wrap, .day-open, .credit, .edge, .stage, .signoff). The ground is the shared business ground (css/day.css): each work casts its own light (.work-light)
   and the dance chapter adds one crimson field from the still's side on top of the work light. */

.trio-story,
.trio-ch--dance,
.trio-role,
.trio-close,
.trio-band {
  position: relative;
  z-index: 1;
}

/* ───────── The labels, and the side of the opening: the line and the services ───────── */
.trio-back {
  display: grid;
  gap: 6px;
  align-content: start;
}
.trio-back .frame__link {
  justify-self: start;
  font-size: 16px;
}
.trio-label {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--violet-deep);
  font-variation-settings:
    'wdth' 100,
    'wght' 650;
}
.trio-line {
  margin: 0;
  max-width: 34em;
  color: var(--sheet-ink);
}
.trio-services {
  container-type: inline-size;
}
.trio-services ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.trio-services li + li {
  border-top: 1px solid rgba(90, 43, 194, 0.28);
}
.trio-services__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 14px 0;
  font-size: 22px;
  line-height: 1.2;
  color: var(--sheet-ink);
  font-variation-settings:
    'wdth' 82,
    'wght' 700;
}
@media (hover: hover) {
  .trio-services__link:hover {
    color: var(--violet-deep);
  }
}
@container (min-width: 640px) {
  .trio-services ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
  .trio-services li {
    border-top: 1px solid rgba(90, 43, 194, 0.28);
  }
  .trio-services li + li {
    border-top-width: 1px;
  }
  .trio-services__link {
    align-items: flex-start;
    min-height: 0;
    padding-top: 16px;
    font-size: clamp(22px, 1.5vw, 28px);
  }
}

/* ───────── The opening: the case printed on its own film (css/day.css .day-open.is-cover) ───────── */
/* The figure flattens into the wrap, so the film and the card are the opening's own layers and the headline and the side print over the film. Phones put the
   film between the headline and the card, so the work stands visible while the case's name and its facts stay whole. */
.trio .day-open__stage {
  display: contents;
}
.trio .day-open.is-cover :is(.day-open__h1, .day-open__side) {
  position: relative;
  z-index: 2;
}
/* The side prints over the footage's bright half, so a soft pool of night gathers under it, with no edge of its own. */
.trio .day-open.is-cover .day-open__side::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -56px calc(-1 * var(--frame)) -24px -12%;
  pointer-events: none;
  background: radial-gradient(
    ellipse 62% 78% at 72% 52%,
    rgba(12, 10, 11, 0.94) 0%,
    rgba(12, 10, 11, 0.8) 46%,
    rgba(12, 10, 11, 0.34) 72%,
    transparent 92%
  );
}
.trio .day-open.is-cover > .day-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  min-height: 100svh;
}
.trio .day-open__h1 {
  grid-row: 1;
  padding-top: calc(var(--hdr) + 28px);
}
.trio .day-open__fig > .film {
  grid-row: 2;
}
.trio .day-open__side {
  grid-row: 4;
  gap: 20px;
  padding-top: 28px;
}
.trio .day-open__cap {
  grid-row: 3;
  margin-inline: 0;
}
.trio .day-open.is-cover .trio-label,
.trio .day-open.is-cover .trio-back .frame__link {
  color: var(--violet);
}
.trio .day-open.is-cover .trio-back .day-open__meta {
  color: rgba(244, 239, 234, 0.72);
}
.trio .day-open.is-cover :is(.trio-line, .trio-services__link) {
  color: rgba(244, 239, 234, 0.86);
}
.trio .day-open.is-cover .trio-services li {
  border-top-color: rgba(172, 115, 255, 0.34);
}
@media (hover: hover) {
  .trio .day-open.is-cover :is(.trio-back .frame__link, .trio-services__link):hover {
    color: var(--violet);
  }
}
@media (min-width: 1024px) {
  /* The case's words print on a night that falls in from both sides and the foot, so the film stays open across the centre of the screen. */
  .trio .day-open.is-cover::before {
    background:
      radial-gradient(ellipse 50% 50% at 86% 10%, color-mix(in oklab, #483688 46%, transparent), transparent 74%),
      linear-gradient(
        270deg,
        rgba(12, 10, 11, 0.9) 0%,
        rgba(12, 10, 11, 0.72) 18%,
        rgba(12, 10, 11, 0.4) 36%,
        rgba(12, 10, 11, 0.12) 54%,
        transparent 68%
      ),
      linear-gradient(0deg, rgba(12, 10, 11, 0.94) 0%, rgba(12, 10, 11, 0.6) 10%, rgba(12, 10, 11, 0.2) 20%, transparent 34%),
      linear-gradient(98deg, rgba(12, 10, 11, 0.86) 0%, rgba(12, 10, 11, 0.5) 16%, transparent 34%);
  }
@media (min-width: 1024px) {
  .trio .day-open.is-cover > .day-wrap {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto 1fr auto;
    column-gap: 24px;
    padding-bottom: 40px;
  }
  .trio .day-open__h1 {
    grid-column: 1 / -1;
    grid-row: 1;
    padding-top: calc(var(--hdr) + 40px);
  }
  .trio .day-open__side {
    grid-column: 7 / -1;
    grid-row: 2;
    align-self: end;
    padding: 0 0 48px;
  }
  .trio .day-open__cap {
    grid-column: 1 / -1;
    grid-row: 3;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}

/* The night band: the figures on the staff and the line under them */
.stage.trio-stage {
  margin-top: 24px;
  padding-top: 48px;
}
.trio-stage {
  padding-bottom: 72px;
}
/* Light fades out before the story's night plate, so band and story read as one mass */
.stage.trio-stage::after {
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 200px);
  mask-image: linear-gradient(180deg, transparent, #000 200px);
}
.trio-stage .ev__facts {
  margin-top: 48px;
  max-width: 26em;
  text-wrap: balance;
  font-size: clamp(24px, 6.6vw, 30px);
  line-height: 1.18;
  font-variation-settings:
    'wdth' 82,
    'wght' 700;
}

/* ───────── Story ───────── */
/* The story prints on the case's night as one plate across the width */
.trio-story {
  margin-top: 0;
  padding-bottom: 72px;
  color: var(--night-ink);
}
.trio-story::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 calc(50% - 50vw);
  pointer-events: none;
  background:
    radial-gradient(ellipse 46% 26% at 8% 6%, color-mix(in oklab, #483688 62%, transparent), transparent 72%),
    radial-gradient(ellipse 42% 22% at 0% 74%, rgba(224, 35, 78, 0.3), transparent 72%),
    linear-gradient(180deg, var(--night) 0%, color-mix(in oklab, #483688 22%, var(--night)) 50%, var(--night) 100%);
}
.trio-story__head {
  position: relative;
  display: grid;
  gap: 28px;
  padding-top: 32px;
  color: var(--night-ink);
}
.trio-story .trio-fig--stage {
  margin-top: 0;
}
.trio-story :is(.trio-h2, .trio-lead) {
  color: var(--night-ink);
}
.trio-story :is(.trio-label, .credit) {
  color: var(--violet);
}
.trio-story :is(.string, .edge) {
  --crest: var(--violet);
}
.trio-h2 {
  margin: 16px 0 0;
  font-size: clamp(34px, 9.4vw, 40px);
  line-height: 1.08;
  color: var(--sheet-ink);
}
.trio-lead {
  margin: 0;
  max-width: 34em;
  color: var(--sheet-ink);
}

.trio-fig {
  display: flex;
  flex-direction: column;
  margin: 0;
}
.trio-fig__media {
  position: relative;
  flex: 1 1 auto;
  overflow: clip;
  background: var(--sheet-ink);
}
.trio-fig__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.trio-fig__cap {
  position: relative;
  flex: none;
  margin-top: 16px;
  padding-top: 26px;
}
.trio-fig--stage {
  margin-top: 48px;
}
.trio-fig--stage .trio-fig__media {
  aspect-ratio: 4 / 3;
}
.trio-fig--stage img {
  object-position: 50% 100%;
}
.trio-fig--founder {
  width: 82%;
}
.trio-fig--founder .trio-fig__media {
  aspect-ratio: 590 / 393;
}
.trio-fig--dance .trio-fig__media {
  flex: none;
  aspect-ratio: 4 / 3;
}
.trio-fig--dance img {
  object-position: 45% 50%;
}
/* The opening's ground: the case tint falls from the film's side across the whole width, with a weaker fall on the text side. The bottom fade stays; the top is whole. */
main.sheet > .day-open {
  --case: #483688;
}
main.sheet > .day-open::before {
  background:
    radial-gradient(ellipse 60% 66% at 34% 42%, color-mix(in srgb, var(--case) 30%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 44% 56% at 96% 74%, color-mix(in srgb, var(--case) 18%, transparent) 0%, transparent 72%);
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 160px), transparent);
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 160px), transparent);
}
/* Each figure's work light falls from the side where its picture sits (day.css) */
.trio-fig--stage {
  --lx: 62%;
  --ly: 40%;
}
.trio-fig--founder {
  --lx: 84%;
  --ly: 42%;
}
.trio-fig--dance {
  --lx: 16%;
  --ly: 46%;
}

.trio-ch {
  display: grid;
  gap: 28px;
  margin-top: 72px;
}
.trio-ch--dance {
  padding-block: 40px 56px;
}
.trio-dance__text {
  display: grid;
  gap: 20px;
  align-content: start;
}
.trio-pull {
  margin: 0;
  font-size: clamp(30px, 8.4vw, 44px);
  line-height: 1.1;
  color: var(--violet-deep);
  text-wrap: balance;
}

/* The đàn tranh still: the one picture that runs to the screen edge; its string is the instrument's own */
.trio-band {
  margin: 96px 0 0;
  container-type: inline-size;
}
.trio-band__media {
  position: relative;
  overflow: clip;
  aspect-ratio: 4 / 3;
  background: var(--sheet-ink);
}
.trio-band__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 22% 50%;
}
.trio-band__cap {
  display: block;
}

/* ───────── Role and credits ───────── */
.trio-role {
  display: grid;
  gap: 72px;
  margin-top: 88px;
  padding-block: 40px 56px;
  color: var(--night-ink);
}
.trio-role::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 54% 52% at 92% 0%, color-mix(in oklab, #483688 44%, transparent), transparent 74%),
    linear-gradient(
      180deg,
      color-mix(in oklab, #483688 32%, var(--night)) 0%,
      var(--night) 48%,
      color-mix(in oklab, #5a2bc2 26%, var(--night)) 100%
    );
}
.trio-role :is(.trio-h3, .trio-credits__name, .trio-role__list li) {
  color: var(--night-ink);
}
.trio-role :is(.trio-label, .credit) {
  color: var(--violet);
}
.trio-role .trio-role__close,
.trio-role .trio-role__link {
  color: var(--violet);
}
.trio-role :is(.string, .edge) {
  --crest: var(--violet);
}
.trio-h3 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  color: var(--sheet-ink);
}
.trio-role__list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.trio-role__list li {
  position: relative;
  padding: 20px 0 24px;
  font-size: 19px;
  line-height: 1.45;
  color: var(--sheet-ink);
}
.trio-role__list .string {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}
.trio-role__close {
  margin: 40px 0 0;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.25;
  color: var(--violet-deep);
  text-wrap: balance;
}
.trio-credits {
  display: grid;
  gap: 20px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.trio-credits li {
  display: grid;
  gap: 4px;
}
.trio-credits__name {
  font-size: 22px;
  line-height: 1.25;
  color: var(--sheet-ink);
  font-variation-settings:
    'wdth' 82,
    'wght' 700;
}
.trio-role__link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: 24px;
  font-size: 15px;
  color: var(--violet-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-variation-settings:
    'wdth' 100,
    'wght' 600;
}

/* ───────── Sign-off: one line in the frame, the one action, the contact once ───────── */
.signoff.trio-close {
  margin-top: 0;
  padding-top: 96px;
}
.trio-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 40px;
  margin: 40px 0 0;
}
.trio-contact a {
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.3;
  color: var(--sheet);
  font-variation-settings:
    'wdth' 82,
    'wght' 700;
  text-decoration: underline;
  text-decoration-color: var(--sheet);
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}
@media (hover: hover) {
  .trio-contact a:hover {
    color: var(--sheet-ink);
  }
}

/* ───────── Desktop ───────── */
@media (min-width: 1024px) {
  .stage.trio-stage {
    margin-top: 32px;
    padding-top: 56px;
  }
  .trio-stage {
    padding-bottom: 104px;
  }
  .trio-stage .ev__facts {
    margin-top: 72px;
    font-size: clamp(30px, 2.9vw, 42px);
  }

  .trio-story__head {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    align-items: end;
    padding-top: 36px;
  }
  .trio-story__title {
    grid-column: 1 / span 6;
  }
  .trio-story__head .trio-lead {
    grid-column: 7 / -1;
    max-width: var(--measure);
    padding-bottom: 0.5em;
  }
  .trio-h2 {
    font-size: clamp(34px, 3.9vw, 56px);
  }
  .trio-fig--stage .trio-fig__media {
    aspect-ratio: 21 / 9;
  }
  .trio-ch--script .trio-fig--founder {
    grid-column: 7 / -1;
    width: auto;
    max-width: none;
  }
  .trio-ch {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    align-items: center;
    margin-top: 104px;
  }
  .trio-ch--script .trio-lead {
    grid-column: 1 / span 6;
  }
  .trio-fig--founder {
    grid-column: 8 / -1;
    width: auto;
    max-width: 440px;
  }
  .trio-ch--dance {
    margin-top: 128px;
    padding-block: 56px 72px;
  }
  .trio-fig--dance {
    grid-column: 1 / span 7;
    grid-row: 1;
    width: auto;
    margin: 0;
  }
  .trio-fig--dance .trio-fig__media {
    aspect-ratio: 4 / 3;
  }
  .trio-dance__text {
    grid-column: 9 / -1;
    grid-row: 1;
    gap: 32px;
    align-content: center;
  }
  .trio-pull {
    font-size: clamp(32px, 4.4vw, 64px);
  }
  .trio-band {
    margin-top: 112px;
  }
  .trio-band__media {
    aspect-ratio: auto;
    height: min(calc(100cqw * 9 / 21), 88svh);
  }
  .trio-band__media img {
    object-position: 50% 40%;
  }

  .trio-role {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    align-items: start;
    margin-top: 112px;
    padding-block: 44px 64px;
  }
  .trio-role__mine {
    grid-column: 1 / span 7;
  }
  .trio-role__credits {
    grid-column: 9 / -1;
  }
  .trio-role__list li {
    font-size: 21px;
  }

  .signoff.trio-close {
    padding-top: 96px;
    padding-bottom: 112px;
  }
}

/* Above 1600px the still would be enlarged past 1.25 times its 1280 px source: it sits on the frame there */
@media (min-width: 1600px) {
  .trio-band__media {
    margin-inline: var(--frame);
    height: min(calc(var(--page) * 9 / 21), 88svh);
  }
}

@media (min-width: 640px) and (max-width: 1023.98px) {
  .trio-fig--founder {
    width: 62%;
  }
  .trio-fig--dance {
    width: 72%;
  }
  .trio-credits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

/* ───────── Phone ───────── */
@media (max-width: 639.98px) {
  .trio-story__head .trio-lead {
    margin-top: 4px;
  }
  .stage.trio-stage {
    margin-top: 24px;
    padding-top: 40px;
  }
}
