/* Hero cinematografico Fase 4 — home pubblica (.home-hero--ambient) */

.home-hero--ambient.is-hero-entrance-on.is-hero-entrance-play .portal-hero-entrance-target {
  opacity: 0;
  transform: translateY(28px);
  animation: portal-hero-entrance 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-hero--ambient.is-hero-entrance-on.is-hero-entrance-play .home-logo.portal-hero-entrance-target {
  animation-delay: 0.06s;
}

.home-hero--ambient.is-hero-entrance-on.is-hero-entrance-play .home-hero-copy.portal-hero-entrance-target {
  animation-delay: 0.22s;
}

.home-hero--ambient.is-hero-entrance-on.is-hero-entrance-play .home-search-panel.portal-hero-entrance-target {
  animation-delay: 0.4s;
}

@keyframes portal-hero-entrance {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-hero--ambient.is-hero-parallax-on .home-hero-media,
.home-hero--ambient.is-hero-parallax-on .home-hero-copy,
.home-hero--ambient.is-hero-parallax-on .home-search-panel {
  will-change: transform;
}

.home-hero--ambient.is-hero-parallax-on .home-hero-vignette {
  transition: opacity 0.2s ease;
}

.portal-panel-cursor-light {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  border-radius: inherit;
  transition: opacity 0.18s ease;
  mix-blend-mode: soft-light;
  background: radial-gradient(
    300px circle at var(--portal-cursor-x, 50%) var(--portal-cursor-y, 50%),
    rgba(var(--brand-rgb), 0.32) 0%,
    rgba(255, 255, 255, 0.2) 30%,
    transparent 64%
  );
}

.home-hero--ambient.is-panel-cursor-light-on.is-glass-on .home-search-panel.is-cursor-active {
  box-shadow:
    0 24px 56px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 1px rgba(var(--brand-rgb), 0.14),
    0 0 40px rgba(var(--brand-rgb), 0.18);
}

.home-hero--ambient.is-panel-cursor-light-on.is-glass-on .home-search-panel > *:not(.portal-panel-cursor-light) {
  position: relative;
  z-index: 3;
}

@media (prefers-reduced-motion: reduce) {
  .home-hero--ambient.is-hero-entrance-on .portal-hero-entrance-target {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .home-hero--ambient.is-hero-parallax-on .home-hero-media,
  .home-hero--ambient.is-hero-parallax-on .home-hero-copy,
  .home-hero--ambient.is-hero-parallax-on .home-search-panel {
    transform: none !important;
  }
}

.home-shell[data-portal-ambient-freeze="1"] .home-hero--ambient.is-hero-entrance-on .portal-hero-entrance-target {
  opacity: 1;
  transform: none;
  animation: none !important;
}

.home-shell[data-portal-ambient-freeze="1"] .home-hero--ambient.is-hero-parallax-on .home-hero-media,
.home-shell[data-portal-ambient-freeze="1"] .home-hero--ambient.is-hero-parallax-on .home-hero-copy,
.home-shell[data-portal-ambient-freeze="1"] .home-hero--ambient.is-hero-parallax-on .home-search-panel {
  transform: none !important;
}
