/* ==========================================================================
   LIQUID ENTRANCE CURTAIN, VIEW TRANSITIONS & REVEAL MOTION
   Grounded in modern-web-guidance: motion + cross-document-transitions
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  .liquid-entrance-curtain {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    background:
      radial-gradient(circle at 50% 42%, rgba(24, 226, 153, 0.22) 0%, rgba(11, 16, 14, 0.94) 48%, #060707 100%);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    opacity: 1;
    transform: scale(1);
    animation: liquidCurtainLift 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }

  @keyframes liquidCurtainLift {
    0% {
      opacity: 1;
      transform: scale(1);
      clip-path: circle(120% at 50% 45%);
    }
    45% {
      opacity: 0.92;
      transform: scale(1.04);
      clip-path: circle(85% at 50% 45%);
    }
    100% {
      opacity: 0;
      transform: scale(1.12);
      clip-path: circle(0% at 50% 42%);
      visibility: hidden;
    }
  }

  .hero-liquid-in {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(0.985);
    filter: blur(8px);
    animation: liquidHeroBloom 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.14s forwards;
  }

  .hero-liquid-in-delay {
    opacity: 0;
    transform: translate3d(0, 22px, 0) scale(0.98);
    filter: blur(10px);
    animation: liquidHeroBloom 1.05s cubic-bezier(0.16, 1, 0.3, 1) 0.28s forwards;
  }

  @keyframes liquidHeroBloom {
    to {
      opacity: 1;
      transform: translate3d(0, 0, 0) scale(1);
      filter: blur(0px);
    }
  }

  .reveal-item {
    opacity: 0;
    transform: translate3d(0, 30px, 0) scale(0.978);
    filter: blur(11px);
    transition:
      opacity 1.05s cubic-bezier(0.22, 1, 0.36, 1),
      transform 1.05s cubic-bezier(0.22, 1, 0.36, 1),
      filter 1.05s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .reveal-item.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0px);
  }

  .gap-split.reveal-item,
  .docs-layout.reveal-item,
  .waitlist-shell.reveal-item {
    transition-delay: 0.08s;
  }

  .gap-refs-row.reveal-item,
  .gap-bridge-cta.reveal-item {
    transition-delay: 0.16s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .liquid-entrance-curtain {
    display: none !important;
  }
  .hero-liquid-in,
  .hero-liquid-in-delay,
  .reveal-item {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
