/* BASE */
html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: clip; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }

/* LOADER */
#loader { transition: opacity 0.55s cubic-bezier(0.32, 0.72, 0, 1); }
#loader.hidden { opacity: 0; pointer-events: none; }
#loader-inner { transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.32, 0.72, 0, 1); }
#loader-inner.show { opacity: 1; transform: scale(1); }

/* NAVBAR */
#nav-pill.scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 37, 71, 0.08);
  box-shadow: 0 8px 30px rgba(15, 37, 71, 0.06);
}

/* HAMBURGER */
#menu-toggle.active .menu-bar:first-child { transform: translateY(3px) rotate(45deg); }
#menu-toggle.active .menu-bar:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

/* MOBILE MENU */
#mobile-menu { transition: opacity 0.45s ease; }
#mobile-menu.active { opacity: 1; pointer-events: all; display: flex !important; }
#mobile-menu .mob-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
}
#mobile-menu.active .mob-link { opacity: 1; transform: translateY(0); }
#mobile-menu.active .mob-link:nth-child(1) { transition-delay: 80ms; }
#mobile-menu.active .mob-link:nth-child(2) { transition-delay: 130ms; }
#mobile-menu.active .mob-link:nth-child(3) { transition-delay: 180ms; }
#mobile-menu.active .mob-link:nth-child(4) { transition-delay: 230ms; }
#mobile-menu.active .mob-link:nth-child(5) { transition-delay: 280ms; }
#mobile-menu.active .mob-link:nth-child(6) { transition-delay: 330ms; }

/* HERO REVEALS */
#hl-1, #hl-2, #hl-3 {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.32, 0.72, 0, 1), transform 0.9s cubic-bezier(0.32, 0.72, 0, 1);
}
#hl-1.in { opacity: 1; transform: translateY(0); transition-delay: 0.10s; }
#hl-2.in { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }
#hl-3.in { opacity: 1; transform: translateY(0); transition-delay: 0.40s; }

#hero-logo { opacity: 0; transform: translateY(-12px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.32, 0.72, 0, 1); }
#hero-logo.in { opacity: 1; transform: translateY(0); }

/* SCROLL REVEALS (driven by GSAP) */
[data-reveal] { opacity: 0; transform: translateY(30px); will-change: opacity, transform; }

/* COUNTERS */
.counter { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* CLIENT LOGO WALL */
.logo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.5rem;
  min-height: 122px;
  box-shadow: 0 1px 4px rgba(15, 37, 71, 0.05);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.logo-tile img {
  max-height: 62px;
  width: auto;
  filter: grayscale(1);
  opacity: 0.6;
  transition: filter 0.35s ease, opacity 0.35s ease;
}
.logo-tile:hover {
  box-shadow: 0 16px 40px rgba(15, 37, 71, 0.12);
  transform: translateY(-4px);
}
.logo-tile:hover img { filter: grayscale(0); opacity: 1; }

/* MAP PULSE (Cali) */
@keyframes mapPulse {
  0%   { r: 20px; opacity: 0.55; }
  100% { r: 56px; opacity: 0; }
}
.map-pulse { animation: mapPulse 2.8s ease-out infinite; }

/* PROCESO: STICKY CARD STACK */
.proceso-stack > .proceso-step { position: sticky; box-shadow: 0 -8px 44px rgba(15, 37, 71, 0.13); }
.proceso-stack > .proceso-step:nth-child(1) { top: 5.5rem; }
.proceso-stack > .proceso-step:nth-child(2) { top: 6.2rem; margin-top: 2.5rem; }
.proceso-stack > .proceso-step:nth-child(3) { top: 6.9rem; margin-top: 2.5rem; }

/* MARQUEE */
.marquee-item {
  display: inline-block;
  padding: 0 1.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}
.marquee-sep {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #C68856;
  vertical-align: middle;
  flex-shrink: 0;
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  #hl-1, #hl-2, #hl-3, #hero-logo { opacity: 1 !important; transform: none !important; }
  .animate-marquee, .animate-marquee2, .animate-pulse-cta { animation: none !important; }
  .proceso-stack > .proceso-step { position: static !important; margin-top: 1.25rem !important; min-height: 0 !important; }
}

/* SCROLLBAR (clean) */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #F5F2ED; }
::-webkit-scrollbar-thumb { background: #1B4080; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #A65F35; }

/* SELECTION */
::selection { background: rgba(166, 95, 53, 0.25); color: #1A1A1A; }

/* TYPOGRAPHY */
h1, h2, h3 {
  font-family: 'Clash Display', 'Hanken Grotesk', system-ui, sans-serif;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-wrap: balance;
}
p { text-wrap: pretty; }
.font-display { font-family: 'Clash Display', 'Hanken Grotesk', system-ui, sans-serif; }

/* MOBILE FINETUNES */
@media (max-width: 640px) {
  #hero { min-height: 100dvh; }
}
