/* Hero depth: one ambient light behind the arch and a pointer-driven depth on desktop. transform/opacity only. */
.hero.hero--cinematic > .neo-depth-background {
  position: absolute; z-index: 0; inset: -3%; overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse at 73% 42%, rgba(38, 108, 103, .2), transparent 49%);
}
.neo-depth-light {
  position: absolute; inset: -15%;
  background: radial-gradient(ellipse at 72% 35%, rgba(97, 235, 217, .18), transparent 30%),
    radial-gradient(ellipse at 57% 75%, rgba(218, 166, 74, .09), transparent 32%);
}

/* Light that follows the pointer across the arch's glass. */
.hero--cinematic .neo-portrait-refraction {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  border-radius: inherit; opacity: 0;
  background: radial-gradient(ellipse at var(--light-x,50%) var(--light-y,35%), rgba(181,255,246,.14), transparent 52%);
  box-shadow: inset 1px 0 0 rgba(196,255,248,.24), inset -1px 0 0 rgba(255,224,154,.16);
  transition: opacity 350ms ease;
}
@media (min-width:981px) and (hover:hover) and (pointer:fine) {
  .hero.hero--cinematic .hero-portrait {
    translate: var(--depth-x,0px) var(--depth-y,0px);
    rotate: var(--depth-angle,0deg);
    transition: translate 240ms ease-out, rotate 300ms ease-out;
  }
  .hero.hero--cinematic > .neo-depth-background {
    translate: var(--back-x,0px) var(--back-y,0px);
    transition: translate 550ms ease-out;
  }
  .hero--cinematic[data-depth-active] .neo-portrait-refraction { opacity: 1; }
}
html[data-motion="off"] .hero--cinematic .hero-portrait,
html[data-motion="off"] .hero--cinematic .neo-depth-background,
html[data-motion="off"] .neo-portrait-refraction { transition: none; }

@media (max-width: 980px) {
  .hero--cinematic .hero-portrait img { animation: none; }
  /* Phones keep the portrait's slow breathing while the hero is on screen. */
  html[data-motion="on"] .hero--cinematic[data-future-motion="on"] .hero-portrait img {
    animation: cinematic-portrait 18s ease-in-out infinite alternate !important;
  }
}

/* Halo: the ring is a mask over the arch edge; only the conic light inside it rotates, so it stays on the compositor. */
.hero--cinematic .hero-halo {
  position: absolute; inset: 0; z-index: 6; overflow: hidden;
  padding: 3px; border-radius: inherit; pointer-events: none; opacity: 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  transition: opacity 1.2s ease;
}
.hero--cinematic .hero-halo::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 220%; aspect-ratio: 1;
  background: conic-gradient(
    transparent 0 270deg, rgba(120, 247, 232, .5) 318deg, #f2fffd 356deg, transparent 360deg),
    conic-gradient(from 180deg,
    transparent 0 280deg, rgba(255, 226, 122, .5) 324deg, #fff6d6 357deg, transparent 360deg);
  transform: translate(-50%, -50%);
}
@keyframes hero-halo { to { transform: translate(-50%, -50%) rotate(360deg); } }
html[data-motion="on"] .hero--cinematic[data-future-motion="on"]:not([data-boot]) .hero-halo { opacity: 1; }
html[data-motion="on"] .hero--cinematic .hero-halo::before { animation: hero-halo 14s linear infinite !important; animation-play-state: paused !important; }
html[data-motion="on"] .hero--cinematic[data-future-motion="on"] .hero-halo::before { animation-play-state: running !important; }
