/* ============================================================
   22° SUR — ANIMATIONS & TRANSITIONS
   ============================================================ */

/* ---- REVEAL ON SCROLL ---- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.services-grid .reveal:nth-child(1)  { transition-delay: 0.05s; }
.services-grid .reveal:nth-child(2)  { transition-delay: 0.13s; }
.services-grid .reveal:nth-child(3)  { transition-delay: 0.21s; }
.services-grid .reveal:nth-child(4)  { transition-delay: 0.29s; }
.services-grid .reveal:nth-child(5)  { transition-delay: 0.37s; }

.why-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.why-grid .reveal:nth-child(2) { transition-delay: 0.15s; }
.why-grid .reveal:nth-child(3) { transition-delay: 0.25s; }
.why-grid .reveal:nth-child(4) { transition-delay: 0.35s; }

.areas-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.areas-grid .reveal:nth-child(2) { transition-delay: 0.15s; }
.areas-grid .reveal:nth-child(3) { transition-delay: 0.25s; }
.areas-grid .reveal:nth-child(4) { transition-delay: 0.35s; }

.industries-grid .reveal:nth-child(1) { transition-delay: 0.04s; }
.industries-grid .reveal:nth-child(2) { transition-delay: 0.10s; }
.industries-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.industries-grid .reveal:nth-child(4) { transition-delay: 0.22s; }
.industries-grid .reveal:nth-child(5) { transition-delay: 0.28s; }
.industries-grid .reveal:nth-child(6) { transition-delay: 0.34s; }

.agents-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.agents-grid .reveal:nth-child(2) { transition-delay: 0.15s; }
.agents-grid .reveal:nth-child(3) { transition-delay: 0.25s; }

.blog-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.blog-grid .reveal:nth-child(2) { transition-delay: 0.15s; }
.blog-grid .reveal:nth-child(3) { transition-delay: 0.25s; }

/* ---- HERO CONTENT ENTRANCE ---- */
.hero-slide.active .hero-label {
  animation: fadeSlideUp 0.6s ease 0.2s both;
}
.hero-slide.active .hero-title {
  animation: fadeSlideUp 0.7s ease 0.35s both;
}
.hero-slide.active .hero-divider {
  animation: fadeIn 0.6s ease 0.5s both;
}
.hero-slide.active .hero-subtitle {
  animation: fadeSlideUp 0.65s ease 0.55s both;
}
.hero-slide.active .btn-hero {
  animation: fadeSlideUp 0.6s ease 0.7s both;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---- PULSE (WhatsApp) ---- */
.btn-whatsapp {
  animation: pulse 2.5s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,.4); }
  50%       { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
}

/* ---- COUNTER (stats) ---- */
.stat-num.counting { color: var(--green); }

/* ---- TYPING BAR (hero divider) ---- */
.hero-divider {
  position: relative;
  overflow: hidden;
}
.hero-divider::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  animation: shimmer 2.5s infinite 1.2s;
}
@keyframes shimmer {
  0%   { left: -60%; }
  100% { left: 140%; }
}

/* ---- NAV UNDERLINE HOVER ---- */
.nav-link::after {
  content: '';
  display: block;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
  margin-top: 2px;
}
.nav-link:hover::after,
.nav-item.active .nav-link::after {
  transform: scaleX(1);
}
.nav-item.active .nav-link::after { display: none; }

/* ---- SECTION LABEL ANIMATE ---- */
.section-label {
  position: relative;
  overflow: hidden;
}

/* ---- SERVICE CARD HOVER ICON ---- */
.service-card .service-icon svg path,
.service-card .service-icon svg rect,
.service-card .service-icon svg circle,
.service-card .service-icon svg line,
.service-card .service-icon svg polygon {
  transition: stroke 0.3s ease, fill 0.3s ease;
}
.service-card:hover .service-icon svg path,
.service-card:hover .service-icon svg rect,
.service-card:hover .service-icon svg circle,
.service-card:hover .service-icon svg line,
.service-card:hover .service-icon svg polygon {
  stroke: var(--green-light);
}

/* ---- LOADING SPINNER (form submit) ---- */
.btn-submit.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn-submit.loading::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ---- MOBILE NAV OVERLAY ---- */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 98;
  opacity: 0;
  transition: opacity 0.3s;
}
.nav-overlay.active { display: block; opacity: 1; }

/* ---- SCROLL PROGRESS BAR ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--navy));
  z-index: 9999;
  transition: width 0.1s linear;
  width: 0%;
}

/* ---- FOOTER ANIMATION ---- */
.footer-col { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.footer-col.visible { opacity: 1; transform: translateY(0); }
.footer-col:nth-child(1) { transition-delay: 0.0s; }
.footer-col:nth-child(2) { transition-delay: 0.1s; }
.footer-col:nth-child(3) { transition-delay: 0.2s; }
.footer-col:nth-child(4) { transition-delay: 0.3s; }

/* ---- IMAGE FADE IN ---- */
img { opacity: 0; transition: opacity 0.4s ease; }
img.loaded { opacity: 1; }
