#hero .hero-bg::after {
  z-index: 1;
  pointer-events: none;
}

#hero > .hero-study-label { z-index: 2; }
#hero .hero-workshop-label,
#hero.is-workshop .hero-concept-label { display: none; }
#hero.is-workshop .hero-workshop-label { display: inline; }

.hero-mobile-scene {
  position: absolute;
  inset: 0;
}

/* Keep the controls clear of the wordmark centered in the new film poster. */
#film.film-translucent:not(:has(video)),
.film-translucent #filmCover { background: transparent; }
#film.film-translucent:not(:has(video)) {
  box-shadow: 0 8px 36px -25px rgb(30 34 36 / .4);
}
#filmCover[data-video-src]::after { display: none; }
#filmCover[data-video-src] .play {
  transform: none;
  color: #5e3b29;
  box-shadow: 0 2px 8px rgb(30 33 32 / .22);
}
#filmCover[data-video-src] .film-tag { color: #191c19; font-weight: 600; }
#filmCover .film-tag [dir="ltr"] { font-variant-numeric: tabular-nums; opacity: .94; }
@media (min-width: 861px) {
  #filmCover[data-video-src] .play {
    inset: auto;
    inset-inline-start: 16px;
    bottom: 13px;
    width: 34px;
    height: 34px;
  }
  #filmCover[data-video-src] .play svg { width: 12px; height: 14px; }
  #filmCover[data-video-src] .film-tag {
    inset-inline-start: 60px;
    bottom: 13px;
    min-height: 34px;
  }
  .film-translucent #filmCover[data-video-src] .film-tag {
    inset-inline-end: auto;
    bottom: 15px;
    min-height: 30px;
    padding-inline: 10px;
    border-radius: 16px;
    background: rgb(250 249 246 / .78);
  }
}
@media (max-width: 860px) {
  #filmCover[data-video-src] .play { position: static; flex: none; }
  #filmCover[data-video-src] .film-tag [dir="ltr"] { display: block; }
}

.hero-scene-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
}

.hero-scene-layer.is-visible { opacity: 1; }

#hero .hero-scene-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

#hero .hero-bg .hero-scene-image[data-scene="stone"] { object-position: 38% 44%; }
#hero .hero-mobile-scene .hero-scene-image[data-scene="stone"] { inset-block-start: auto; height: 116%; object-position: 26% bottom; }
#hero .hero-mobile-scene .hero-scene-window[data-scene="steel"] { --hero-image-x: .78; }
#hero .hero-mobile-scene .hero-scene-window[data-scene="bronze"] { --hero-image-x: .2; }
#hero .hero-mobile-scene .hero-scene-image[data-scene="factory-yard"] { object-position: 35% center; }
#hero .hero-scene-image--context { display: none; }

/* Frame the 1400 × 788 concept sources using rows 0–715 so their baked-in lower captions stay out of view. */
#hero .hero-scene-window {
  container-type: size;
  overflow: hidden;
}

#hero .hero-scene-window > img {
  --view-height: max(51.142857cqw, 100cqh);
  --view-width: calc(var(--view-height) * 350 / 179);
  position: absolute;
  inset: auto;
  left: calc((100cqw - var(--view-width)) * var(--hero-image-x, .5));
  top: calc((100cqh - var(--view-height)) / 2);
  width: var(--view-width);
  height: calc(var(--view-height) * 197 / 179);
  max-width: none;
  max-height: none;
  clip-path: inset(0 0 9.1371% 0);
}

@media (min-width: 1081px) {
  #hero .hero-in {
    grid-template-columns: minmax(0, 1fr) minmax(0, 60%);
    gap: clamp(22px, 3vw, 52px);
  }

  #hero .hero-copy .display { font-size: clamp(35px, 3.1vw, 46px); }

  #hero .hero-film {
    position: relative;
    aspect-ratio: 16 / 9;
    container-type: inline-size;
  }

  /* Reproduce the approved 560 × 315 frame at (736, 352) on the 1420 × 889 desktop canvas. */
  #hero .hero-film-position {
    --film-width: min(560px, calc(100cqw - 14px));
    --film-extra-drop: clamp(0px, calc((100svh - 690px) / 4), 30px);
    position: absolute;
    width: var(--film-width);
    inset-inline-end: 14px;
    inset-block-start: clamp(0px, calc((100cqw - var(--film-width)) * 9 / 16 + var(--film-extra-drop)), 120px);
  }

  /* Keep each focal area on the text side. Blend the surrounding part of the same photo into the other side. */
  #hero .hero-bg .hero-scene-layer.is-framed {
    --hero-blend: to right;
    --hero-context-width: min(88svh, 820px);
    background: linear-gradient(180deg, #c8ccce 10%, #abb1b0 48%, #65716f 74%, #737979);
  }

  html[dir="rtl"] #hero .hero-bg .hero-scene-layer.is-framed { --hero-blend: to left; }

  #hero .hero-bg .is-framed .hero-scene-image:not(.hero-scene-image--context) {
    --hero-image-x: 1;
    inset-inline-end: auto;
    width: min(56%, 50% + 8px);
    mask-image: linear-gradient(var(--hero-blend), #000 88%, transparent);
  }

  #hero .hero-bg .hero-scene-image--context {
    --hero-image-x: 0;
    inset-inline-start: 46%;
    inset-inline-end: auto;
    width: min(54%, var(--hero-context-width));
    display: block;
    mask-image: linear-gradient(var(--hero-blend), #000 83%, transparent);
  }
}

#hero .hero-rotation {
  position: absolute;
  inset-block-end: 12px;
  inset-inline-start: 50%;
  translate: -50% 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: clamp(7px, 1.25vw, 19px);
  color: #fff;
}

html[dir="rtl"] #hero .hero-rotation { translate: 50% 0; }
#hero .hero-rotation[hidden] { display: none; }

.hero-rotation button {
  display: grid;
  place-items: center;
  width: clamp(34px, 5.6vw, 62px);
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.hero-rotation button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgb(31 31 28 / .65);
}

.hero-rotation [data-scene]::before {
  content: "";
  width: 100%;
  height: clamp(5px, .6vw, 8px);
  border-radius: 99px;
  background: rgb(48 48 42 / .63);
  box-shadow: 0 0 0 1px rgb(255 255 255 / .25);
}

.hero-rotation [data-scene]:not([aria-current="true"]):hover::before { background: rgb(48 48 42 / .86); }
.hero-rotation [aria-current="true"]::before { background: #fa644b; }

@media (min-width: 861px) and (max-width: 1080px), (min-width: 861px) and (max-height: 650px) {
  #hero .hero-in { padding-bottom: 70px; }
}

@media (max-width: 860px) {
  #hero .hero-rotation {
    inset-block-end: 10px;
  }

  #hero .hero-site-photo .hero-study-label { inset-block: 12px auto; inset-inline-start: 12px; z-index: 2; }
}

@media (prefers-reduced-motion: reduce) {
  #hero .hero-scene-layer { transition: none; }
}
