/*
 * Unboxed mobile pass
 * Load after precision.css. This is intentionally additive: the existing
 * player, fallback link, mode switch, controls and reduced-motion rules stay
 * in the document and continue to work without JavaScript.
 */

/* The editorial sheet positioned these SVGs at the arrow's top-left corner.
 * Make every icon-bearing control a real centering context. Keep the
 * arrow-echo animation when present, but start both states from center. */
.button .arrow,
summary > span,
.direction {
  display: grid;
  place-items: center;
  align-content: center;
  justify-content: center;
  line-height: 1;
}
summary > span { position:relative; font-size:0 !important; }
summary > span::before, summary > span::after {
  content:""; position:absolute; left:50%; top:50%; width:12px; height:1.5px;
  background:currentColor; transform:translate(-50%,-50%);
}
summary > span::after { transform:translate(-50%,-50%) rotate(90deg); }
.nav .nav-cta { padding:6px 6px 6px 16px; border-bottom:0; }

.button .arrow .icon,
summary > span .icon,
.direction .icon {
  position: static;
  inset: auto;
  display: block;
  width: 22px;
  height: 22px;
  margin: 0;
  grid-area: 1 / 1;
  transform: rotate(0deg);
}

/* Preserve the semantic direction rotations without inheriting editorial's
 * absolute/inset rule. */
.direction.diagonal .icon,
.button .arrow.diagonal .icon { transform: rotate(-45deg); }
.direction.down .icon { transform: rotate(90deg); }

/* Re-center the optional paired icon used by studio.js on hover. */
.button .arrow .arrow-echo {
  position: static;
  inset: auto;
  grid-area: 1 / 1;
  width: 22px;
  height: 22px;
  transform: translateX(-32px) rotate(-45deg);
}
.button:hover .arrow .icon:first-child {
  transform: translateX(32px) rotate(-45deg);
}
.button:hover .arrow .arrow-echo {
  transform: rotate(-45deg);
}

@media (max-width: 900px) {
  /* Make the reading order: eyebrow → heading → video → supporting copy.
   * display:contents lets the existing, useful hero copy remain intact. */
  .hero {
    --hero-edge:20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap:0;
    padding-inline:var(--hero-edge);
    overflow-x: clip;
  }
  .hero-copy { display: contents; }
  .hero > .hero-copy > .eyebrow { order: 1; margin-bottom:20px; }
  .hero > .hero-copy > h1 { order: 2; }
  .hero > .hero-stage { order: 3; }
  .hero > .hero-copy > .hero-intro { order: 4; }
  .hero > .hero-bottom { order: 5; }

  /* True viewport breakout: no 12/14px gutter inherited from prior passes. */
  .hero-stage {
    width: calc(100% + var(--hero-edge) * 2);
    max-width: none;
    min-width: 0;
    margin-inline: calc(var(--hero-edge) * -1);
    padding: 0;
    margin-top:20px;
  }
  .hero-stage-bar {
    width: min(100% - 32px, 720px);
    margin-inline: auto;
    padding-block: 12px;
  }
  .stage-brand { display: none; }
  .hero-modes { margin-inline-start: auto; }

  /* The video itself is an unboxed, uncropped 16:9 surface. The mode switch
   * remains above it; only the decorative titlebar/frame/caption is removed. */
  .hero-film {
    min-height:0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  #video-status:empty { display:none; }
  .film-titlebar,
  .hero-film > figcaption { display: none; }
  .film-media {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background: #08163a;
  }
  .film-media video {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
  }
  /* The desktop-only character is display:none in cinematic.css; it reserves
   * no row, height or margin here. */

  /* The play affordance remains over the media and remains keyboard/fallback
   * accessible through the existing button and video link. */
  .film-play { border-radius: 0; }

  .hero > .hero-copy > .hero-intro {
    width: min(100%, 720px);
    margin-inline: auto;
    padding-inline: 0;
  }
  .hero > .hero-bottom {
    width: min(100%, 720px);
    margin-inline: auto;
  }
}

@media (max-width: 390px) {
  .hero-stage-bar { width: calc(100% - 24px); }
  .hero > .hero-copy > .hero-intro { padding-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .button .arrow .icon,
  .button .arrow .arrow-echo { transition: none !important; }
}
