/* Accueil passerelle — séquence d’entrée (montagne + logo conservés) */

@media (prefers-reduced-motion: no-preference) {
  /* Accueil standard uniquement — wow/ultra : voir gateway-fx.css */
  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .hero-bg-photo--gateway {
    animation: gatewayKenBurns 16s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    transform-origin: 58% 38%;
    will-change: transform;
  }

  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .hero-bg-blend {
    animation: gatewayBlendReveal 1.6s ease-out forwards;
  }

  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .hero-bg-blend::after {
    content: "";
    position: absolute;
    inset: -10% -20%;
    background: linear-gradient(
      108deg,
      transparent 42%,
      rgba(255, 255, 255, 0.06) 48%,
      rgba(196, 163, 90, 0.14) 50%,
      rgba(255, 255, 255, 0.05) 52%,
      transparent 58%
    );
    transform: translateX(-45%) skewX(-12deg);
    animation: gatewayLightSweep 2.4s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
    pointer-events: none;
    opacity: 0;
  }

  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .gateway-brand-mark {
    animation:
      gatewayMarkIn 1.15s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both,
      gatewayMarkGlow 3.2s ease-in-out 1.25s 1;
  }

  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .gateway-brand-text {
    animation: gatewayFadeUp 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.38s both;
  }

  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .audience-gateway-eyebrow {
    animation: gatewayFadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
  }

  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .audience-gateway-intro h1 {
    animation: gatewayTitleIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.68s both;
  }

  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .audience-gateway-intro h1::after {
    animation: gatewayGoldLine 0.85s cubic-bezier(0.22, 1, 0.36, 1) 1.05s both;
    transform-origin: center;
  }

  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .audience-gateway-intro .hero-lead {
    animation: gatewayFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 1.15s both;
  }

  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .audience-card:nth-child(1) {
    animation: gatewayCardIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) 1.28s both;
  }

  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .audience-card:nth-child(2) {
    animation: gatewayCardIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) 1.42s both;
  }

  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .audience-card:nth-child(3) {
    animation: gatewayCardIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) 1.56s both;
  }

  /* État initial pendant la séquence (évite le flash avant animation) */
  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .gateway-brand-mark,
  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .gateway-brand-text,
  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .audience-gateway-eyebrow,
  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .audience-gateway-intro h1,
  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .audience-gateway-intro .hero-lead,
  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .audience-card {
    opacity: 0;
  }

  body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .hero-bg-blend {
    opacity: 0;
  }

  @keyframes gatewayKenBurns {
    from {
      transform: scale(1.1);
    }
    to {
      transform: scale(1);
    }
  }

  @keyframes gatewayBlendReveal {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  @keyframes gatewayLightSweep {
    0% {
      opacity: 0;
      transform: translateX(-48%) skewX(-12deg);
    }
    18% {
      opacity: 1;
    }
    100% {
      opacity: 0;
      transform: translateX(42%) skewX(-12deg);
    }
  }

  @keyframes gatewayMarkIn {
    from {
      opacity: 0;
      transform: translateY(-22px) scale(0.82);
      filter: drop-shadow(0 0 0 transparent);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
      filter: drop-shadow(0 2px 8px rgba(5, 21, 37, 0.35));
    }
  }

  @keyframes gatewayMarkGlow {
    0%,
    100% {
      filter: drop-shadow(0 2px 8px rgba(5, 21, 37, 0.35));
    }
    50% {
      filter:
        drop-shadow(0 6px 22px rgba(196, 163, 90, 0.42))
        drop-shadow(0 2px 12px rgba(5, 21, 37, 0.45));
    }
  }

  @keyframes gatewayFadeUp {
    from {
      opacity: 0;
      transform: translateY(18px);
      filter: blur(6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
      filter: blur(0);
    }
  }

  @keyframes gatewayTitleIn {
    from {
      opacity: 0;
      transform: translateY(22px) scale(0.97);
      filter: blur(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
      filter: blur(0);
    }
  }

  @keyframes gatewayGoldLine {
    from {
      opacity: 0;
      transform: scaleX(0);
    }
    to {
      opacity: 1;
      transform: scaleX(1);
    }
  }

  @keyframes gatewayCardIn {
    from {
      opacity: 0;
      transform: translateY(28px) scale(0.94);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  /* Après la séquence : léger « respir » sur le logo (desktop) */
  @media (min-width: 641px) {
    body.page-home.gateway-entrance:not([data-audience]):not(.gateway-fx--wow):not(.gateway-fx--ultra):not(.gateway-fx--aurore):not(.gateway-fx--affiche) .gateway-brand-mark {
      animation:
        gatewayMarkIn 1.15s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both,
        gatewayMarkGlow 3.5s ease-in-out 1.35s 1,
        gatewayMarkFloat 7s ease-in-out 2.2s infinite;
    }

    @keyframes gatewayMarkFloat {
      0%,
      100% {
        transform: translateY(0);
      }
      50% {
        transform: translateY(-5px);
      }
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-home.gateway-entrance:not([data-audience]) .hero-bg-blend::after {
    content: none;
  }
}
