/* ============================================================
   SCROLL EFFECTS & TRANSITIONS — Enhanced animation system
   ============================================================ */

/* ------------------------------------------------------------
   SCROLL REVEAL (desktop only — mobile gets simpler fade)
   ------------------------------------------------------------ */
.reveal-up,
.reveal-fade,
.reveal-left,
.reveal-right {
  will-change: opacity, transform;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  transition-duration: 750ms;
  transition-property: opacity, transform;
}
.reveal-up    { opacity: 0; transform: translateY(40px); }
.reveal-fade  { opacity: 0; transform: translateY(16px); }
.reveal-left  { opacity: 0; transform: translateX(-48px); }
.reveal-right { opacity: 0; transform: translateX(48px); }

.reveal-up.is-visible,
.reveal-fade.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible { opacity: 1; transform: translate(0,0); }

[data-delay=1] { transition-delay: 80ms; }
[data-delay=2] { transition-delay: 180ms; }
[data-delay=3] { transition-delay: 280ms; }
[data-delay=4] { transition-delay: 380ms; }
[data-delay=5] { transition-delay: 480ms; }
[data-delay=6] { transition-delay: 580ms; }

/* Simplified on mobile — just fade, no translate */
@media (max-width: 768px) {
  .reveal-up, .reveal-fade, .reveal-left, .reveal-right {
    transform: translateY(12px) !important;
  }
  .reveal-up.is-visible,
  .reveal-fade.is-visible,
  .reveal-left.is-visible,
  .reveal-right.is-visible {
    transform: translateY(0) !important;
  }
}

/* ------------------------------------------------------------
   SECTION ENTRANCE — whole sections slide up on first view
   ------------------------------------------------------------ */
.section-entrance {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.section-entrance.is-visible { opacity: 1; transform: translateY(0); }

/* ------------------------------------------------------------
   TESTIMONIALS — Horizontal auto-scroll carousel
   ------------------------------------------------------------ */
.testimonials-slider {
  position: relative;
  overflow: hidden;
  margin-top: var(--space-12);
}

.testimonials-track-DISABLED {
  display: flex;
  transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.testimonial-slide {
  flex: 0 0 100%;
  min-width: 0;
  display: block;
  padding: var(--space-2);
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
  pointer-events: none;
}
.testimonial-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: all;
}

/* Progress bar under testimonials */
.testimonials-progress {
  height: 3px;
  background: var(--color-gray-200);
  border-radius: 2px;
  margin-top: var(--space-6);
  overflow: hidden;
}
.testimonials-progress__bar {
  height: 100%;
  background: var(--color-gold);
  border-radius: 2px;
  transition: width 100ms linear;
  width: 0%;
}

/* ------------------------------------------------------------
   SCROLL-TRIGGERED COUNTER EFFECT (numbers count up)
   ------------------------------------------------------------ */
.stat-number {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  color: var(--color-gold);
  font-family: var(--font-heading);
  line-height: 1;
  display: block;
}

/* ------------------------------------------------------------
   PARALLAX SECTION BACKGROUNDS
   ------------------------------------------------------------ */
.parallax-section {
  position: relative;
  overflow: hidden;
}
.parallax-section__bg {
  position: absolute;
  inset: -20%;
  background-size: cover;
  background-position: center;
  will-change: transform;
  transition: transform 0ms linear;
}

/* ------------------------------------------------------------
   SERVICE CARD IMAGE HEADER
   ------------------------------------------------------------ */
.service-card__img {
  height: 180px;
  margin: calc(-1 * var(--space-8)) calc(-1 * var(--space-8)) var(--space-6);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: visible; /* Prevent badge clipping */
}
.service-card__img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,22,40,.08) 0%, rgba(10,22,40,.35) 100%);
}
.service-card__img-label {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  z-index: 1;
  background: var(--color-gold);
  color: var(--color-navy);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

/* ------------------------------------------------------------
   WHY-US CARD — image strip on top
   ------------------------------------------------------------ */
.why-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-lg);
  /* overflow: hidden removed — breaks 3D rotateX flip animation */
  transition: background var(--duration-base), border-color var(--duration-base), transform var(--duration-base);
}
.why-card:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(201,168,76,.3);
  transform: translateY(-4px);
}
.why-card__inner { padding: var(--space-8); }
.why-card__accent {
  height: 4px;
  background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
  width: 0;
  transition: width 600ms var(--ease-out);
}
.why-card.is-visible .why-card__accent { width: 100%; }

/* ------------------------------------------------------------
   ABOUT IMAGE — parallax on scroll + float-gentle on badge
   ------------------------------------------------------------ */
.about-snippet__image .img-zoom-wrap {
  height: 460px;
}
.about-badge.badge-float {
  animation: float-gentle 6s ease-in-out infinite;
}

/* ------------------------------------------------------------
   HERO FLOATING BADGES — responsive hide
   ------------------------------------------------------------ */
@media (max-width: 1100px) {
  .hero__badges { display: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .testimonials-track-DISABLED { transition: none !important; }
  .testimonial-slide  { transition: none !important; }
  .section-entrance   { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   TESTIMONIALS — Clean fade-only carousel (replaces track slide)
   ============================================================ */
.testimonials-track {
  position: relative;
  min-height: 260px; /* prevents collapse when all slides are absolute */
}

.testimonial-slide {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0 !important;
  transform: scale(0.97) !important;
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out) !important;
  pointer-events: none;
  /* Remove flex-shrink from old horizontal approach */
  flex: none;
}

.testimonial-slide.is-active {
  opacity: 1 !important;
  transform: scale(1) !important;
  pointer-events: all;
  position: relative !important; /* active slide drives the container height */
  z-index: 1;
}
