/* Keep the closing shot pinned and reversible on phones and portrait tablets.
   The artwork fills the screen around its central figure, as on desktop. */
@media (max-width:760px), (max-width:1024px) and (orientation:portrait), (max-width:1024px) and (max-height:520px) {
  .home-page .fin {
    height: 260svh;
    z-index: 3;
    background: #080102;
  }
  .home-page .fin__pin {
    position: sticky;
    top: 0;
    height: 100svh;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 42%, #3c0c10 0%, #100204 46%, #050102 80%);
  }
  .home-page .fin__stage1 {
    position: absolute;
    inset: 0;
    height: auto;
    aspect-ratio: auto;
    background: none;
    transform: translate3d(var(--fin-push, 0%), 0, 0) !important;
    will-change: transform;
  }
  .home-page .fin #finBack,
  .home-page .fin #finMan {
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    transform: none;
  }
  .home-page .fin__frame2 {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    padding: 0;
    transform: translate3d(var(--fin-frame-x, -104%), 0, 0) !important;
    will-change: transform;
    filter: none !important;
    background: radial-gradient(ellipse at 50% 42%, #250b0e, #050102 80%);
    box-shadow: 28px 0 70px #0008;
  }
  .home-page .fin__frame2 img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    /* Keep the actor's face (around 59% across the source) centred in a tall crop. */
    object-position: 61% center;
  }
  .home-page .fin__dim { display: block; }
  .home-page .f-cap--quote {
    top: max(24px, env(safe-area-inset-top));
    left: 22px;
    font-size: clamp(12px, 2.3vw, 18px);
    line-height: 1.7;
    letter-spacing: .15em;
    max-width: 11ch;
  }
  .home-page .fin__bar {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px 18px;
    padding: 16px 20px calc(84px + env(safe-area-inset-bottom));
    font-size: 12px;
    letter-spacing: .06em;
    background: linear-gradient(transparent, #090305ed 24%, #090305 70%);
  }
  .home-page .fin__bar > a {
    font-size: 20px;
    border-bottom: 1px solid #a83e39;
    justify-self: start;
  }
  .home-page .fin__soc {
    gap: clamp(10px, 3vw, 24px);
    justify-content: end;
  }
  .home-page .fin__c { grid-column: 1 / -1; }
  .home-page .fin__bar a:focus-visible { outline: 2px solid #ef3034; outline-offset: 4px; }
}

/* Reduced motion and failed/lost WebGL show both original frames in document
   flow. Links never depend on an animation ending or a scroll lock releasing. */
.home-page .fin:is(.is-static, .is-fallback) {
  height: auto;
  z-index: 3;
  background: #080102;
}
.home-page .fin:is(.is-static, .is-fallback) .fin__pin {
  position: relative;
  top: auto;
  height: auto;
  overflow: visible;
}
.home-page .fin:is(.is-static, .is-fallback) .fin__stage1 {
  position: relative;
  inset: auto;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000 url('../../public/fin/plate.webp') center / contain no-repeat;
  transform: none !important;
  will-change: auto;
}
.home-page .fin:is(.is-static, .is-fallback) .fin__stage1::after {
  content: '';
  position: absolute;
  z-index: 3;
  left: 36.25%;
  top: 18.8889%;
  width: 28.125%;
  height: 81.1111%;
  background: url('../../public/fin/man.webp') center / 100% 100% no-repeat;
  pointer-events: none;
}
.home-page .fin:is(.is-static, .is-fallback) canvas,
.home-page .fin:is(.is-static, .is-fallback) .fin__dim,
.home-page .fin:is(.is-static, .is-fallback) .f-cap[aria-hidden=true] { display: none; }
.home-page .fin:is(.is-static, .is-fallback) .f-cap--quote {
  top: 32%;
  left: 4%;
  font-size: clamp(8px, 1.6vw, 22px);
  letter-spacing: .15em;
  line-height: 1.7;
  max-width: 11ch;
  opacity: 1;
  transform: none;
}
.home-page .fin:is(.is-static, .is-fallback) .fin__frame2 {
  position: relative;
  inset: auto;
  padding: 0;
  aspect-ratio: 1816 / 866;
  box-shadow: none;
  transform: none !important;
  filter: none !important;
  will-change: auto;
}
.home-page .fin:is(.is-static, .is-fallback) .fin__frame2 img {
  height: auto;
  width: 100%;
  aspect-ratio: 1816 / 866;
  object-fit: contain;
}
.home-page .fin:is(.is-static, .is-fallback) .fin__bar {
  position: relative;
  inset: auto;
  opacity: 1;
  transform: none;
  background: #0a0708;
}
@media (max-width:1024px) and (max-height:520px) {
  .home-page .f-cap--quote { top: 18px; left: 22px; font-size: 11px; }
  .home-page .fin__bar { padding-top: 8px; padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion:reduce) {
  .home-page .fin { height: auto; }
  .home-page .fin__pin { position: relative; top: auto; height: auto; }
  .home-page .fin__stage1 {
    position: relative; inset: auto; height: auto; aspect-ratio: 16 / 9;
    transform: none !important;
    background: #000 url('../../public/fin/plate.webp') center / contain no-repeat;
  }
  .home-page .fin__frame2 {
    position: relative; inset: auto; aspect-ratio: 1816 / 866; padding: 0;
    transform: none !important; filter: none !important;
  }
  .home-page .fin__frame2 img { height: auto; aspect-ratio: 1816 / 866; object-fit: contain; }
  .home-page .fin__bar { position: relative; inset: auto; opacity: 1; transform: none; }
}
