/* Fluid interpolation for the accepted phone and wide-screen hero endpoints. */
:root {
  --report-wide: 0;
  --report-hero-height: max(30rem, calc(100svh - (1 - var(--report-wide)) * 60px));
}

/* Legacy fallback: a few restrained width steps when typed division is absent. */
@supports not (opacity: calc((100vw - 640px) / 640px)) {
  @media (min-width: 40.001rem) and (max-width: 41rem) { :root { --report-wide: .01; } }
  @media (min-width: 41.001rem) and (max-width: 48rem) { :root { --report-wide: .2; } }
  @media (min-width: 48.001rem) and (max-width: 56rem) { :root { --report-wide: .4; } }
  @media (min-width: 56.001rem) and (max-width: 64rem) { :root { --report-wide: .6; } }
  @media (min-width: 64.001rem) and (max-width: 72rem) { :root { --report-wide: .8; } }
  @media (min-width: 72.001rem) { :root { --report-wide: 1; } }
}

@supports (opacity: calc((100vw - 640px) / 640px)) {
  :root {
    --report-wide: clamp(0, calc((100vw - 640px) / 640px), 1);
  }
}

.opening,
html.cinematic .opening,
.opening-stage,
html.cinematic .opening-stage {
  min-height: var(--report-hero-height);
}

.hero-photo,
.hero-photo img {
  height: var(--report-hero-height);
}

.hero-photo img {
  object-position:
    100%
    calc(50% - (1 - var(--report-wide)) * 18.7679%);
}

.hero-photo::after {
  width: calc(100% - var(--report-wide) * 37%);
  background: linear-gradient(
    to right,
    rgba(6, 12, 7, calc(.9 + var(--report-wide) * .06)),
    rgba(6, 12, 7, calc(.65 + var(--report-wide) * .11))
      calc(46% - var(--report-wide) * 3%),
    rgba(6, 12, 7, calc(.15 - var(--report-wide) * .15)) 88%,
    transparent
  );
}

.title-composition,
html.cinematic .title-composition {
  top: calc(12svh - var(--report-wide) * 1svh);
  bottom: auto;
  left: calc(8% - var(--report-wide) * 1%);
  right: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  width: calc(84% - var(--report-wide) * 42%);
  height: auto;
  padding: 0;
  pointer-events: none;
}

.title-composition .opening-note {
  position: static;
  order: 1;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  color: var(--paper);
  font-size: calc(1.8rem + var(--report-wide) * .84rem);
  line-height: 1.05;
  text-wrap: initial;
}

html[lang="es-MX"] .title-composition .opening-note {
  font-size: calc(1.5rem + var(--report-wide) * 1.14rem);
}

.title-composition .report-season {
  display: block;
  white-space: nowrap;
}

.title-composition .brand-mark {
  position: static;
  order: 2;
  display: block;
  flex: 0 0 auto;
  width: calc(94% + var(--report-wide) * 1%);
  max-width: none;
  height: auto;
  margin-top: max(0px, calc(
    clamp(32px, calc(100svh - 644px), 200px)
    - var(--report-wide) * clamp(0px, calc(100svh - 744px), 100px)
    - 15.84% - var(--report-wide) * .17%
  ));
  margin-left: calc(1px + var(--report-wide) * 1px - 9.8406% - var(--report-wide) * .1047%);
  transform: none;
}

.report-language {
  top: auto;
  bottom: calc(
    max(1.25rem, env(safe-area-inset-bottom))
    + var(--report-wide) * clamp(0rem, calc(3svh - 1.25rem), .75rem)
  );
  left: calc(8% - var(--report-wide) * 1%);
  right: auto;
  gap: calc(.5rem + var(--report-wide) * .4rem);
  text-decoration: none;
}

.report-language a[aria-current="page"] {
  text-decoration: none;
}

/* Keep the camera operator, sound recordist and right-hand crew member together.
   A narrow screen needs a wider field of view than a full-height cover crop. */
.hero-photo {
  background: var(--forest);
}

.opening .hero-photo img {
  position: absolute;
  inset: auto 0 0;
  height: min(var(--report-hero-height), max(30rem, calc(100svh - 20px)), 90vw);
  object-position: right center;
}

.title-composition .brand-mark {
  width: calc(62.666667% + var(--report-wide) * .666667%);
  margin-left: calc(1px + var(--report-wide) * 1px - 6.5604% - var(--report-wide) * .0698%);
}

@media (max-aspect-ratio: 10 / 9) {
  .opening .hero-photo img {
    height: min(90vw, calc(var(--report-hero-height) - 18rem));
    /* Show the complete photograph at the existing lower frame's top edge. */
    -webkit-mask-image: none;
    mask-image: none;
    object-fit: contain;
    object-position: center top;
  }

  .title-composition .opening-note {
    text-align: left;
  }

  .hero-photo::after {
    width: 100%;
    background: none;
  }
}

@media (min-width: 30rem) and (max-aspect-ratio: 10 / 9) {
  .title-composition .brand-mark {
    margin-top: 0;
  }
}
