/* ══════════════════════════════════════════════════════════
   Simplex — SPA Transition Layer
   ══════════════════════════════════════════════════════════ */

/* ── Page visibility (GSAP handles opacity now) ── */
body {
  opacity: 1 !important;
  transition: none !important;
}
body.page-loaded { opacity: 1; }

/* ── Curtain overlay ── */
#page-curtain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: var(--navy-dark);
  display: none;
  transform-origin: left center;
  pointer-events: none;
}

/* ── Word split reveal ── */
.word-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.05em;
}
.word {
  display: inline-block;
  will-change: transform;
}

/* ── Nav active state ── */
.nav-active {
  color: var(--navy) !important;
}
.nav-active::after {
  width: 100% !important;
}

/* ── Nav logo section label ── */
.logo-section {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: block;
  margin-top: 3px;
  line-height: 1;
}
.nav-logo {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.logo-icon-img + div > .logo-text,
.nav-logo .logo-icon + .logo-text {
  line-height: 1.1;
}
.nav-logo-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Service item hover ── */
.service-item {
  will-change: transform;
}

/* ── Magnetic buttons ── */
.btn-gold,
.btn-whatsapp,
.nav-cta {
  will-change: transform;
  transform: translate(0, 0);
}

/* ── CTA Band reveal ── */
.cta-band > * {
  will-change: transform, opacity;
}

/* ── Barba wrapper + container ── */
[data-barba="wrapper"] {
  overflow: hidden;
}
[data-barba="container"] {
  width: 100%;
}

/* ── Dropdown open state ── */
.nav-dropdown.open .nav-dropdown-menu {
  display: flex !important;
  animation: dropdownIn 0.22s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Page transition: content arrives fresh from below ── */
[data-barba="container"] {
  transform-origin: top center;
}

/* ── ScrollTrigger: remove old IntersectionObserver classes ── */
.reveal-on-scroll {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
.reveal-on-scroll.revealed {
  opacity: 1 !important;
  transform: none !important;
}

/* ── GSAP will handle initial states via fromTo/from ── */

/* ── Service card hover (CSS layer, GSAP handles enter anim) ── */
.service-item {
  transition: box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.service-item:hover {
  box-shadow: 0 24px 56px rgba(27,42,74,0.16);
}

/* ── Benefit block hover ── */
.benefit-block {
  transition: box-shadow 0.3s ease;
}
.benefit-block:hover {
  box-shadow: 0 12px 32px rgba(27,42,74,0.1);
}

/* ── Testimonial card hover ── */
.testimonial-card, .t-card {
  transition: box-shadow 0.3s ease;
}
.testimonial-card:hover, .t-card:hover {
  box-shadow: 0 16px 40px rgba(27,42,74,0.12);
}

/* ── Audience tag ── */
.audience-tag {
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.audience-tag:hover {
  background: var(--navy);
  color: #fff;
  transform: translateY(-2px);
}

/* ── Trust logo ── */
.trust-logo {
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.trust-logo:hover {
  opacity: 1 !important;
  transform: scale(1.08);
}

/* ── Nav link underline ── */
.nav-links > a {
  position: relative;
}
.nav-links > a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width 0.28s ease;
}
.nav-links > a:hover::after,
.nav-links > a.nav-active::after {
  width: 100%;
}

/* ── Ripple ── */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
  transform: scale(0);
  animation: ripple-anim 0.7s linear;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(2.5); opacity: 0; }
}

/* ── WhatsApp FAB ── */
.wa-fab {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 9997;
  width: 58px; height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,0.45);
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s ease;
}
.wa-fab:hover {
  transform: scale(1.12) translateY(-3px);
  box-shadow: 0 12px 36px rgba(37,211,102,0.55);
}
.wa-fab svg { width: 30px; height: 30px; fill: #fff; }

@keyframes wa-pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}
.wa-pulse { animation: wa-pulse-ring 2.5s ease infinite; }

@media (max-width: 640px) {
  .wa-fab { bottom: 20px; right: 16px; width: 52px; height: 52px; }
}

/* ── Service item number on hover ── */
.service-item-num {
  transition: color 0.25s ease;
}
.service-item:hover .service-item-num {
  color: var(--gold);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  #page-curtain { display: none !important; }
  .word-wrap { overflow: visible; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
