/* Dwell and Domain: Animations and Enhanced Interactivity */

/* Keep content visible only until AOS attaches per-element classes */
[data-aos]:not(.aos-init) {
  opacity: 1 !important;
  transform: none !important;
}

:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --anim-duration: 0.6s;
}

/* ── Keyframes ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes heroKenBurns {
  0% { transform: scale(1); }
  100% { transform: scale(1.04); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes slideUnderline {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes iconPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@keyframes trustMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Hero enhancements ── */
.hero__bg {
  transition: transform 0.1s linear;
  will-change: transform;
}

.hero__bg > img,
.hero-swiper .swiper-slide-active img {
  animation: heroKenBurns 20s ease-in-out infinite alternate;
  will-change: transform;
}

.hero__content > * {
  animation: fadeInUp 0.8s var(--ease-out-expo) backwards;
}

.hero__eyebrow { animation-delay: 0.1s; }
.hero h1 { animation-delay: 0.2s; }
.hero__sub { animation-delay: 0.35s; }
.hero__actions { animation-delay: 0.5s; }
.hero__trust { animation-delay: 0.65s; }

.hero--page .hero__content > * {
  animation-duration: 0.6s;
}

.hero--carousel .hero__content {
  transition: opacity 0.45s ease, transform 0.45s var(--ease-out-expo);
}

.hero--carousel .hero__content.is-updating {
  opacity: 0;
  transform: translateY(12px);
}

.hero--carousel .hero__content.is-updating > * {
  animation: none;
}

/* ── Scroll-aware header ── */
.site-chrome {
  transition: box-shadow 0.3s ease;
}

.site-chrome.is-scrolled {
  box-shadow: 0 4px 30px rgba(26, 42, 87, 0.12);
}

.site-chrome.is-scrolled .site-header {
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.95);
}

.site-header {
  transition: height 0.3s var(--ease-out-expo),
              box-shadow 0.3s ease,
              background 0.3s ease;
}

.site-chrome.is-scrolled .site-header {
  height: 60px;
}

.site-chrome.is-scrolled .site-header__inner {
  height: 60px;
}

.site-chrome.is-scrolled .site-header__logo img {
  height: 34px;
  transition: height 0.3s var(--ease-out-expo);
}

/* ── Enhanced buttons ── */
.btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease-spring),
              box-shadow 0.25s ease,
              background 0.2s ease,
              border-color 0.2s ease,
              color 0.2s ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 70%
  );
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 42, 87, 0.15);
}

.btn:hover::after {
  opacity: 1;
  animation: shimmer 1.2s ease;
}

.btn:active {
  transform: translateY(0);
}

.btn--gold:hover {
  box-shadow: 0 6px 24px rgba(200, 162, 75, 0.4);
}

/* ── Section headings ── */
.section-heading__eyebrow {
  position: relative;
  display: inline-block;
}

.section-heading__eyebrow::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 40px;
  height: 2px;
  background: var(--gold);
  transform-origin: center;
  transition: transform 0.5s var(--ease-out-expo);
}

.section-heading.is-visible .section-heading__eyebrow::after,
[data-aos="fade-up"].aos-animate .section-heading__eyebrow::after {
  transform: translateX(-50%) scaleX(1);
}

/* ── Cards: enhanced hover ── */
.card,
.service-card,
.testimonial-card,
.duration-card {
  transition: transform 0.35s var(--ease-out-expo),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
}

.card:hover,
.service-card:hover,
.testimonial-card:hover,
.duration-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(26, 42, 87, 0.14);
}

/* Service card image zoom */
.service-card__img {
  overflow: hidden;
}

.service-card__img img {
  transition: transform 0.6s var(--ease-out-expo);
}

.service-card:hover .service-card__img img {
  transform: scale(1.08);
}

.service-card:hover .service-card__overlay {
  background: linear-gradient(
    135deg,
    rgba(26, 42, 87, 0.58) 0%,
    rgba(26, 42, 87, 0.32) 100%
  );
}

/* Feature cards (Why Choose Us) -  lift + accent, no 3D tilt */
.feature-card {
  position: relative;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease-out-expo),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
}

.feature-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.75rem;
  bottom: 1.75rem;
  width: 3px;
  background: var(--gold);
  border-radius: 0 3px 3px 0;
  transform: scaleY(0);
  transform-origin: center top;
  transition: transform 0.4s var(--ease-out-expo);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(200, 162, 75, 0.25);
  box-shadow: 0 16px 48px rgba(26, 42, 87, 0.12);
}

.feature-card:hover::before {
  transform: scaleY(1);
}

/* Interactive cards: cursor-following spotlight + lift.
   No 3D rotation, so text stays crisp (fixes text disappearing on hover). */
.tilt-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.tilt-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    320px circle at var(--mx, 50%) var(--my, 50%),
    rgba(200, 162, 75, 0.16),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.tilt-card:hover::before {
  opacity: 1;
}

.tilt-card__inner {
  position: relative;
  z-index: 1;
  height: 100%;
}

/* ── Split cards ── */
.split-card {
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease;
  text-decoration: none;
  color: inherit;
}

.split-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.split-card__bg img {
  transition: transform 0.7s var(--ease-out-expo);
}

.split-card:hover .split-card__bg img {
  transform: scale(1.1);
}

.split-card__overlay {
  transition: background 0.4s ease;
}

.split-card:hover .split-card__overlay {
  background: linear-gradient(to top, rgba(26, 42, 87, 0.95), rgba(26, 42, 87, 0.3) 70%);
}

.split-card__content .btn {
  transition: transform 0.3s var(--ease-spring), opacity 0.3s ease;
}

.split-card:hover .btn {
  transform: translateX(4px);
}

/* ── Step cards ── */
.step-card__number {
  transition: transform 0.4s var(--ease-spring),
              box-shadow 0.4s ease,
              background 0.3s ease;
}

.step-card:hover .step-card__number {
  transform: scale(1.12) rotate(5deg);
  box-shadow: 0 8px 24px rgba(26, 42, 87, 0.2);
}

/* ── Trust strip ── */
.trust-strip__item {
  transition: transform 0.3s var(--ease-spring), color 0.2s ease;
}

.trust-strip__item:hover {
  transform: translateY(-2px);
  color: var(--gold);
}

.trust-strip__item svg {
  transition: transform 0.3s var(--ease-spring);
}

.trust-strip__item:hover svg {
  transform: scale(1.2);
}

/* ── Services swiper (homepage) ── */
.services-swiper {
  padding: 0.5rem 0 3rem !important;
  overflow: hidden;
}

.services-swiper .swiper-slide {
  height: auto;
}

.services-swiper .service-card,
.services-swiper .service-slide {
  height: 100%;
}

.service-slide__bg {
  overflow: hidden;
}

.service-slide__bg img {
  transition: transform 0.6s var(--ease-out-expo);
}

.service-slide:hover .service-slide__bg img {
  transform: scale(1.06);
}

.services-swiper .service-slide {
  transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s ease;
}

.services-swiper .service-slide:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(26, 42, 87, 0.2);
}

/* ── Testimonials Swiper ── */
.testimonials-swiper {
  padding: 0.5rem 0 3rem !important;
  overflow: hidden;
}

.testimonials-swiper .swiper-slide {
  height: auto;
}

.testimonials-swiper .testimonial-card {
  height: 100%;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease;
}

.testimonials-swiper .swiper-slide-active .testimonial-card {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(26, 42, 87, 0.12);
}

.swiper-pagination-bullet {
  background: var(--navy) !important;
  opacity: 0.3 !important;
  width: 9px !important;
  height: 9px !important;
  margin: 0 3px !important;
  padding: 8px !important;
  box-sizing: content-box !important;
  background-clip: content-box !important;
  border-radius: 50%;
  transition: transform 0.3s var(--ease-spring), opacity 0.3s ease !important;
}

.swiper-pagination-bullet-active {
  opacity: 1 !important;
  background: var(--gold) !important;
  transform: scale(1.1);
}

.hero-swiper__pagination .swiper-pagination-bullet {
  width: 8px !important;
  height: 8px !important;
  padding: 9px !important;
  background: var(--white) !important;
  opacity: 0.45 !important;
}

.hero-swiper__pagination .swiper-pagination-bullet-active {
  background: var(--gold) !important;
  opacity: 1 !important;
  transform: scale(1.15);
}

.swiper-button-prev,
.swiper-button-next {
  color: var(--navy) !important;
  background: var(--white);
  width: 44px !important;
  height: 44px !important;
  border-radius: 50%;
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
}

@media (max-width: 640px) {
  .swiper-button-prev,
  .swiper-button-next {
    display: none !important;
  }
}

.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 18px !important;
  font-weight: 700;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
  color: var(--gold) !important;
}

/* ── CTA band ── */
.cta-band {
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 30% 50%,
    rgba(200, 162, 75, 0.12) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.cta-band h2 {
  animation: fadeInUp 0.7s var(--ease-out-expo) backwards;
}

/* ── WhatsApp float ── */
.whatsapp-float {
  animation: float 3s ease-in-out infinite, pulse-ring 2.5s ease-out infinite;
}

.whatsapp-float:hover {
  animation: none;
  transform: scale(1.12);
}

/* ── FAQ accordion smooth ── */
.faq-item__answer {
  transition: max-height 0.4s var(--ease-out-expo), opacity 0.3s ease;
  opacity: 0;
}

.faq-item.open .faq-item__answer {
  opacity: 1;
}

.faq-item__question {
  transition: color 0.2s ease, padding-left 0.3s var(--ease-out-expo);
}

.faq-item__question:hover {
  padding-left: 0.5rem;
}

/* ── Form focus glow ── */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  transform: translateY(-1px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

/* ── Roles pills ── */
.roles-list__item {
  transition: transform 0.25s var(--ease-spring),
              background 0.25s ease,
              color 0.25s ease;
  cursor: default;
}

.roles-list__item:hover {
  transform: translateY(-3px) scale(1.04);
  background: var(--green);
  color: var(--white);
}

/* ── Footer social ── */
.site-footer__social a {
  transition: transform 0.3s var(--ease-spring),
              background 0.3s ease,
              color 0.3s ease;
}

.site-footer__social a:hover {
  transform: translateY(-4px) rotate(5deg);
}

/* ── Nav link underline ── */
.site-nav a {
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s var(--ease-out-expo);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

/* ── Card link arrow slide ── */
.card__link i {
  transition: transform 0.3s var(--ease-out-expo);
}

.card__link:hover i {
  transform: translateX(4px);
}

/* ── Stats counter strip (optional) ── */
.stats-strip {
  background: var(--navy);
  padding: 2.5rem 0;
  color: var(--white);
}

.stats-strip__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  text-align: center;
}

@media (min-width: 641px) {
  .stats-strip__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stats-strip__number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stats-strip__label {
  font-size: 0.875rem;
  opacity: 0.85;
  font-weight: 500;
}

/* ── Page transition fade ── */
main {
  animation: fadeIn 0.5s ease;
}

/* ── Touch devices: reduce hover jank ── */
@media (hover: none) {
  .card:hover,
  .service-card:hover,
  .split-card:hover,
  .testimonial-card:hover,
  .careers-feature:hover,
  .role-path-card:hover,
  .position-card:hover {
    transform: none;
    box-shadow: var(--shadow);
  }

  .split-card:hover .split-card__bg img,
  .service-slide:hover .service-slide__bg img {
    transform: none;
  }

  .faq-item__question:hover {
    padding-left: 0;
  }

  .trust-strip__item:hover {
    transform: none;
  }

  .site-footer__social a:hover {
    transform: none;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero__bg > img,
  .hero-swiper .swiper-slide-active img {
    animation: none;
  }

  .whatsapp-float {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}
