/* =============================================
   SCROLL REVEAL - Blur + Translate + Fade
   Heavy, cinematic entrance animations
   ============================================= */

.reveal {
  opacity: 0;
  transform: translateY(3rem);
  filter: blur(8px);
  transition: opacity 0.9s var(--easing-smooth),
              transform 0.9s var(--easing-smooth),
              filter 0.9s var(--easing-smooth);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Staggered children - cascading reveal */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(2rem);
  filter: blur(6px);
  transition: opacity 0.8s var(--easing-smooth),
              transform 0.8s var(--easing-smooth),
              filter 0.8s var(--easing-smooth);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.38s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.46s; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 0.52s; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: 0.58s; }

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Fade in from left */
.reveal-left {
  opacity: 0;
  transform: translateX(-3rem);
  filter: blur(6px);
  transition: opacity 0.9s var(--easing-smooth),
              transform 0.9s var(--easing-smooth),
              filter 0.9s var(--easing-smooth);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
}

/* Fade in from right */
.reveal-right {
  opacity: 0;
  transform: translateX(3rem);
  filter: blur(6px);
  transition: opacity 0.9s var(--easing-smooth),
              transform 0.9s var(--easing-smooth),
              filter 0.9s var(--easing-smooth);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
}

/* Scale in */
.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  filter: blur(8px);
  transition: opacity 0.9s var(--easing-smooth),
              transform 0.9s var(--easing-smooth),
              filter 0.9s var(--easing-smooth);
}

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

/* Pulse for ambient elements */
@keyframes pulse-glow {
  0%, 100% { opacity: 0.04; }
  50% { opacity: 0.1; }
}

/* Ambient orb float */
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.02); }
}

/* =============================================
   INNER-PAGE HERO — canvas + entrance + parallax
   ============================================= */

.page-hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.9;
  mix-blend-mode: screen;
}

.page-hero .page-hero__grid,
.page-hero__content {
  position: relative;
  z-index: 2;
}

/* Parallax-capable bg image (JS sets --hero-parallax) */
.page-hero__bg {
  transform: translate3d(0, var(--hero-parallax, 0px), 0) scale(1.04);
  transition: transform 1.2s var(--easing-smooth);
  will-change: transform;
}

/* Entrance — label, title, subtitle ride in on load */
.page-hero .section__label,
.page-hero__title,
.page-hero__subtitle {
  opacity: 0;
  transform: translateY(1.5rem);
  filter: blur(8px);
  animation: page-hero-rise 1.1s var(--easing-smooth) forwards;
}

.page-hero .section__label { animation-delay: 0.05s; }
.page-hero__title          { animation-delay: 0.18s; }
.page-hero__subtitle       { animation-delay: 0.34s; }

@keyframes page-hero-rise {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Soft halo that drifts behind hero text */
.page-hero--cinematic::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -15%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: hero-halo-drift 18s var(--easing-smooth) infinite alternate;
}

@keyframes hero-halo-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; }
  100% { transform: translate3d(40px, 30px, 0) scale(1.08); opacity: 1; }
}

/* =============================================
   CARD / PILLAR / TESTIMONIAL INTERACTIVE POLISH
   ============================================= */

/* 3D tilt target — JS sets --tilt-x / --tilt-y, hover sets --tilt-lift */
.card,
.pillar,
.testimonial,
.team-card,
.svc-step-card,
.svc-cap-card {
  transform: perspective(900px)
    rotateX(var(--tilt-y, 0deg))
    rotateY(var(--tilt-x, 0deg))
    translateY(var(--tilt-lift, 0px));
  transform-style: preserve-3d;
}

/* Reassert the composite transform on hover so the existing translateY rules
   in components.css don't wipe out the tilt; push the lift via --tilt-lift. */
.card:hover,
.pillar:hover,
.testimonial:hover,
.team-card:hover,
.svc-step-card:hover,
.svc-cap-card:hover {
  --tilt-lift: -6px;
  transform: perspective(900px)
    rotateX(var(--tilt-y, 0deg))
    rotateY(var(--tilt-x, 0deg))
    translateY(var(--tilt-lift, 0px));
}

/* Glare sweep for cards (triggered on hover) */
.card,
.pillar,
.testimonial,
.svc-step-card,
.svc-cap-card {
  position: relative;
  overflow: hidden;
}

.card::after,
.pillar::after,
.testimonial::after,
.svc-step-card::after,
.svc-cap-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 40%,
    rgba(56, 189, 248, 0.08) 50%,
    transparent 60%,
    transparent 100%
  );
  transform: translateX(-120%);
  transition: transform 0.9s var(--easing-smooth);
  pointer-events: none;
  z-index: 1;
}

.card:hover::after,
.pillar:hover::after,
.testimonial:hover::after,
.svc-step-card:hover::after,
.svc-cap-card:hover::after {
  transform: translateX(120%);
}

/* Keep inner content above the glare */
.card__inner,
.pillar__inner,
.testimonial__inner,
.svc-step-card__inner,
.svc-cap-card__inner {
  position: relative;
  z-index: 2;
}

/* =============================================
   BUTTON POLISH — magnetic lift + shine
   ============================================= */

.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  transition: left 0.7s var(--easing-smooth);
  pointer-events: none;
}

.btn:hover::before {
  left: 130%;
}

.btn__icon {
  transition: transform 0.35s var(--easing-spring);
}

.btn:hover .btn__icon {
  transform: translate(3px, -3px) rotate(-4deg);
}

/* =============================================
   FORM FIELD FOCUS GLOW
   ============================================= */

.form__input,
.form__textarea {
  transition:
    border-color 0.3s var(--easing-smooth),
    box-shadow 0.35s var(--easing-smooth),
    background 0.3s var(--easing-smooth);
}

.form__input:focus,
.form__textarea:focus {
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.12),
    0 0 24px rgba(56, 189, 248, 0.10);
}

.topic-select__chip {
  position: relative;
  overflow: hidden;
}

.topic-select__chip::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--chip-x, 50%) var(--chip-y, 50%),
    rgba(56, 189, 248, 0.25) 0%,
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.3s var(--easing-smooth);
  pointer-events: none;
}

.topic-select__option:hover .topic-select__chip::before {
  opacity: 1;
}

/* =============================================
   FAQ — smoother open + subtle nudge
   ============================================= */

.faq__item {
  transition:
    border-color 0.4s var(--easing-smooth),
    transform 0.5s var(--easing-smooth),
    box-shadow 0.5s var(--easing-smooth);
}

.faq__item:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.10);
}

.faq__item[open] .faq__answer {
  animation: faq-slide 0.45s var(--easing-smooth);
}

@keyframes faq-slide {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   FOUNDER / TEAM IMAGE — parallax zoom
   ============================================= */

.team-card__image {
  transition: transform 1s var(--easing-smooth), filter 1s var(--easing-smooth);
  will-change: transform;
}

.team-card:hover .team-card__image {
  transform: scale(1.04);
  filter: saturate(1.08) brightness(1.04);
}

/* =============================================
   LEGAL PAGE — section reveal
   ============================================= */

.legal-body h2 {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.7s var(--easing-smooth), transform 0.7s var(--easing-smooth);
}

.legal-body h2.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   Reduced motion — respect user preference
   ============================================= */

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale,
  .reveal-stagger > * {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  .logo-slider__track {
    animation: none;
  }

  .hero__shape {
    animation: none !important;
  }

  .hero__shape--ring svg {
    animation: none;
  }

  .page-hero .section__label,
  .page-hero__title,
  .page-hero__subtitle {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
  }

  .page-hero--cinematic::before,
  .page-hero__bg,
  .team-card__image,
  .btn::before,
  .btn:hover .btn__icon,
  .card::after,
  .pillar::after,
  .testimonial::after,
  .svc-step-card::after,
  .svc-cap-card::after {
    animation: none !important;
    transition: none;
    transform: none;
  }

  .card,
  .pillar,
  .testimonial,
  .team-card,
  .svc-step-card,
  .svc-cap-card {
    transform: none;
  }

  .legal-body h2 {
    opacity: 1;
    transform: none;
  }
}
