/* managerWEB immersive UI — transform/opacity only for 60fps */

/* ——— Hero CSS entrance (no JS / LCP-safe) ——— */
.hero-enter {
  animation: heroEnter 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: opacity, transform;
}
.hero-enter-delay-1 { animation-delay: 0.08s; }
.hero-enter-delay-2 { animation-delay: 0.16s; }
.hero-enter-delay-3 { animation-delay: 0.24s; }
.hero-enter-delay-4 { animation-delay: 0.32s; }
@keyframes heroEnter {
  from { opacity: 0; transform: translate3d(0, 20px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-enter {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ——— Scroll reveal ——— */
.reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-particle,
  .hero-grid-pulse,
  .cta-pulse-soft {
    animation: none !important;
  }
}

@media (max-width: 767px) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
  }
  .reveal:not(.is-visible) {
    opacity: 0.01;
  }
}

/* ——— Glass cards + spotlight glow ——— */
.glass-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.42));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 8px 32px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
  will-change: transform;
}
.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    420px circle at var(--spot-x, 50%) var(--spot-y, 50%),
    rgba(14, 165, 233, 0.22),
    transparent 55%
  );
  transition: opacity 0.3s ease;
  z-index: 0;
}
.glass-card:hover::before,
.glass-card.is-spotlight-active::before {
  opacity: 1;
}
.glass-card > * {
  position: relative;
  z-index: 1;
}
.glass-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow:
    0 20px 48px rgba(14, 165, 233, 0.12),
    0 0 0 1px rgba(14, 165, 233, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.glass-card--violet:hover {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 20px 48px rgba(139, 92, 246, 0.14);
}
.glass-card--violet::before {
  background: radial-gradient(
    420px circle at var(--spot-x, 50%) var(--spot-y, 50%),
    rgba(139, 92, 246, 0.22),
    transparent 55%
  );
}

@media (max-width: 767px) {
  .glass-card:hover {
    transform: none;
  }
  .glass-card::before {
    display: none;
  }
}

/* ——— CTA micro-interactions ——— */
.btn-micro {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease;
  will-change: transform;
}
.btn-micro:hover {
  transform: scale(1.035);
}
.btn-micro:active {
  transform: scale(0.985);
}
.btn-micro::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--rx, 50%) var(--ry, 50%), rgba(255, 255, 255, 0.35), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.btn-micro:hover::after {
  opacity: 1;
}

@media (max-width: 767px) {
  .btn-micro:hover {
    transform: none;
  }
}

/* ——— Hero tech grid + particles ——— */
.hero-immersive {
  position: relative;
  overflow: hidden;
}
.hero-tech-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(14, 165, 233, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  animation: heroGridDrift 28s linear infinite;
  will-change: transform;
}
.hero-grid-pulse {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  background: radial-gradient(circle at 30% 40%, rgba(6, 182, 212, 0.18), transparent 40%),
    radial-gradient(circle at 75% 30%, rgba(14, 165, 233, 0.14), transparent 35%),
    radial-gradient(circle at 55% 75%, rgba(245, 158, 11, 0.08), transparent 40%);
  animation: heroAura 10s ease-in-out infinite alternate;
  will-change: opacity, transform;
}
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 9999px;
  background: rgba(14, 165, 233, 0.55);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.45);
  animation: particleFloat linear infinite;
  will-change: transform, opacity;
}
.hero-spline-slot {
  position: absolute;
  inset: auto 5% 8% auto;
  width: min(280px, 32vw);
  height: min(280px, 32vw);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.35;
  background: conic-gradient(from 120deg, rgba(14, 165, 233, 0.25), transparent, rgba(6, 182, 212, 0.2), transparent);
  filter: blur(2px);
  animation: heroAura 12s ease-in-out infinite alternate-reverse;
}

@keyframes heroGridDrift {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(48px, 48px, 0); }
}
@keyframes heroAura {
  0% { opacity: 0.65; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.06); }
}
@keyframes particleFloat {
  0% { transform: translate3d(0, 20px, 0); opacity: 0; }
  15% { opacity: 0.8; }
  85% { opacity: 0.6; }
  100% { transform: translate3d(0, -120px, 0); opacity: 0; }
}

@media (max-width: 767px) {
  .hero-tech-grid,
  .hero-particles,
  .hero-spline-slot {
    display: none;
  }
  .hero-grid-pulse {
    animation: none;
    opacity: 0.7;
  }
}

/* ——— Sticky stacking feature cards (desktop) ——— */
.stack-stage {
  position: relative;
}
@media (min-width: 1024px) {
  .stack-stage {
    display: grid;
    gap: 1.5rem;
  }
  .stack-card {
    position: sticky;
    top: calc(5.5rem + var(--stack-offset, 0px));
    transition: transform 0.4s ease, box-shadow 0.4s ease;
  }
}

/* ——— Comparison / trust polish ——— */
.immersive-panel {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.85), rgba(248, 250, 252, 0.65));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.08);
}

.hero-visual-frame {
  position: relative;
}
.hero-visual-frame::after {
  content: "";
  position: absolute;
  inset: -8%;
  z-index: -1;
  border-radius: 2rem;
  background: radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.28), transparent 65%);
  filter: blur(24px);
  opacity: 0.8;
}
