/* ============================================================
   animations.css — Tech background, page transitions, reveal system
   ============================================================ */

/* ——— PAGE EXIT TRANSITION ——— */
#page-transition-overlay {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
#page-transition-overlay.exiting {
  opacity: 1;
  pointer-events: all;
}

/* ——— TECH DOT GRID (fixed background layer) ——— */
.tech-dot-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(0, 82, 255, 0.11) 1px, transparent 1px);
  background-size: 36px 36px;
  animation: techDrift 40s linear infinite;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse 100% 65% at 50% 25%, black 10%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 100% 65% at 50% 25%, black 10%, transparent 100%);
}
@keyframes techDrift {
  to { background-position: 36px 36px; }
}

/* ——— ANIMATED FLOATING ORBS ——— */
.orb-animate-1 {
  animation: orbDrift1 24s ease-in-out infinite !important;
}
.orb-animate-2 {
  animation: orbDrift2 30s ease-in-out infinite !important;
}
.orb-animate-3 {
  animation: orbDrift3 20s ease-in-out infinite !important;
}
@keyframes orbDrift1 {
  0%,  100% { transform: translate(0, 0) rotate(-15deg); }
  33%        { transform: translate(4vw, 3vh) rotate(-8deg); }
  66%        { transform: translate(-3vw, 6vh) rotate(-22deg); }
}
@keyframes orbDrift2 {
  0%,  100% { transform: translate(0, 0) rotate(10deg); }
  40%        { transform: translate(-6vw, -4vh) rotate(18deg); }
  70%        { transform: translate(3vw, -5vh) rotate(4deg); }
}
@keyframes orbDrift3 {
  0%,  100% { transform: translate(0, 0) rotate(-5deg); }
  50%        { transform: translate(-4vw, 5vh) rotate(-12deg); }
}

/* ——— FLOATING MICRO-PARTICLES ——— */
.float-particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 82, 255, 0.55);
  pointer-events: none;
  animation: particleRise linear infinite;
  will-change: transform, opacity;
}
@keyframes particleRise {
  0%   { transform: translateY(0) translateX(0);   opacity: 0; }
  6%   { opacity: 1; }
  90%  { opacity: 0.7; }
  100% { transform: translateY(-102vh) translateX(15px); opacity: 0; }
}

/* ——— HERO PULSE RING ——— */
.hero-pulse-ring {
  position: absolute;
  top: 18%;
  right: 8%;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
.hero-pulse-ring::before,
.hero-pulse-ring::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(0, 82, 255, 0.1);
  animation: ringPulse 5s ease-out infinite;
}
.hero-pulse-ring::after {
  animation-delay: 2.5s;
}
@keyframes ringPulse {
  0%   { transform: scale(0.75); opacity: 0.9; }
  100% { transform: scale(2.4);  opacity: 0; }
}

/* ——— SECONDARY DOT LAYER (depth) ——— */
.tech-dot-grid-2 {
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(0, 82, 255, 0.07) 1px, transparent 1px);
  background-size: 72px 72px;
  animation: techDrift2 60s linear infinite reverse;
  opacity: 0.25;
  mask-image: radial-gradient(ellipse 80% 50% at 70% 60%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 70% 60%, black 0%, transparent 100%);
}
@keyframes techDrift2 {
  to { background-position: 72px 72px; }
}

/* ——— SUBTLE SCAN LINE ——— */
.tech-scan-line {
  position: fixed;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 8%, rgba(0, 82, 255, 0.16) 50%, transparent 92%);
  z-index: -1;
  pointer-events: none;
  animation: scanLine 16s ease-in-out infinite;
  opacity: 0;
}
@keyframes scanLine {
  0%   { top: -2px; opacity: 0; }
  4%   { opacity: 1; }
  96%  { opacity: 0.6; }
  100% { top: 100vh; opacity: 0; }
}

/* ——— HERO GLOW ELEMENTS ——— */
.hero-glow {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 55vw;
  height: 55vw;
  max-width: 680px;
  max-height: 680px;
  background: radial-gradient(circle, rgba(0, 82, 255, 0.09) 0%, transparent 65%);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  animation: glowBreathe 7s ease-in-out infinite;
}
.hero-glow2 {
  position: absolute;
  bottom: -80px;
  left: 15%;
  width: 48vw;
  height: 48vw;
  max-width: 560px;
  max-height: 560px;
  background: radial-gradient(circle, rgba(0, 40, 200, 0.06) 0%, transparent 65%);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  animation: glowBreathe 9s ease-in-out infinite reverse;
}
@keyframes glowBreathe {
  0%,  100% { opacity: 0.55; transform: scale(1); }
  50%        { opacity: 1;    transform: scale(1.12); }
}

/* ——— HERO ENTRANCE ANIMATIONS ——— */
@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(44px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes badgeFade {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-eyebrow-anim  { animation: badgeFade  0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both; }
.hero-title-anim    { animation: slideUpFade 0.90s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both; }
.hero-sub-anim      { animation: slideUpFade 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.32s both; }
.hero-actions-anim  { animation: slideUpFade 0.80s cubic-bezier(0.16, 1, 0.3, 1) 0.48s both; }
.hero-stats-anim    { animation: slideUpFade 0.90s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both; }

/* ——— HERO SCROLL INDICATOR ——— */
.hero-scroll-indicator {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
  grid-column: 1 / -1;
  pointer-events: none;
  animation: slideUpFade 1s cubic-bezier(0.16, 1, 0.3, 1) 1s both;
}
.scroll-mouse {
  width: 22px;
  height: 36px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-radius: 11px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-mouse-dot {
  width: 3px;
  height: 8px;
  background: var(--gold);
  border-radius: 2px;
  animation: scrollBounce 2.2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%,  100% { transform: translateY(0); opacity: 1; }
  60%        { transform: translateY(10px); opacity: 0.35; }
}

/* ——— STAGGER GRID REVEAL ——— */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity  0.65s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-stagger.reveal-visible > * { opacity: 1; transform: none; }
.reveal-stagger.reveal-visible > *:nth-child(1) { transition-delay: 0.04s; }
.reveal-stagger.reveal-visible > *:nth-child(2) { transition-delay: 0.13s; }
.reveal-stagger.reveal-visible > *:nth-child(3) { transition-delay: 0.22s; }
.reveal-stagger.reveal-visible > *:nth-child(4) { transition-delay: 0.31s; }
.reveal-stagger.reveal-visible > *:nth-child(5) { transition-delay: 0.40s; }
.reveal-stagger.reveal-visible > *:nth-child(6) { transition-delay: 0.49s; }
.reveal-stagger.reveal-visible > *:nth-child(7) { transition-delay: 0.58s; }
.reveal-stagger.reveal-visible > *:nth-child(8) { transition-delay: 0.67s; }

/* Left / right reveal variants */
.reveal-left {
  opacity: 0;
  transform: translateX(-36px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right {
  opacity: 0;
  transform: translateX(36px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.reveal-visible,
.reveal-right.reveal-visible  { opacity: 1; transform: translateX(0); }

/* ——— BUTTON ENHANCEMENTS ——— */
.btn-gold {
  box-shadow: 0 4px 18px rgba(0, 82, 255, 0.22);
  transition: background 0.2s ease, box-shadow 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.btn-gold:hover {
  box-shadow: 0 8px 28px rgba(0, 82, 255, 0.38) !important;
  transform: translateY(-2px) !important;
}
.btn-outline {
  transition: all 0.2s ease !important;
}
.btn-outline:hover {
  background: var(--bg2) !important;
}

/* ——— PROCESS ACTIVE STEP ——— */
.process-step.active-step .step-dot {
  background: var(--gold) !important;
  color: #fff !important;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 7px rgba(0, 82, 255, 0.1), 0 0 22px rgba(0, 82, 255, 0.45) !important;
  transform: scale(1.2) !important;
}

/* ======================================================
   SERVICIOS PAGE — Professional card styles
   ====================================================== */

/* Page hero header */
.services-page-hero {
  padding: 2.5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.services-page-hero .sph-inner {
  max-width: 820px;
}
.services-page-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 1.4rem;
}
.services-page-hero h1 em {
  font-style: normal;
  color: var(--gold);
}
.services-page-hero .sph-sub {
  font-size: 1.08rem;
  color: var(--text2);
  max-width: 620px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

/* Quick stats bar */
.sph-stats {
  display: flex;
  gap: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.sph-stat-n {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  display: block;
}
.sph-stat-l {
  font-size: 0.78rem;
  color: var(--text3);
  font-weight: 500;
  display: block;
  margin-top: 0.2rem;
}

/* ——— SERVICE CARD PRO ——— */
.services-pro-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.8rem;
}
@media (max-width: 860px) {
  .services-pro-grid { grid-template-columns: 1fr; }
}

.service-card-pro {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
}
.service-card-pro::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), rgba(0, 82, 255, 0.35), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-card-pro:hover::after   { transform: scaleX(1); }
.service-card-pro:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 55px rgba(0, 82, 255, 0.09);
  border-color: rgba(0, 82, 255, 0.18);
}

/* Icon */
.svc-icon {
  width: 56px; height: 56px;
  border-radius: 15px;
  background: var(--gold-dim);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-card-pro:hover .svc-icon {
  background: var(--gold);
  color: #ffffff;
  transform: rotate(6deg) scale(1.06);
}
.svc-icon svg { width: 25px; height: 25px; }

/* Card content */
.svc-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.svc-desc {
  font-size: 0.95rem;
  color: var(--text2);
  line-height: 1.75;
  flex-grow: 1;
}

/* Metric pills */
.svc-metrics {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
}
.svc-metric {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.28rem 0.7rem;
  border-radius: 100px;
  background: rgba(0, 82, 255, 0.06);
  border: 1px solid rgba(0, 82, 255, 0.12);
  font-size: 0.74rem; font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}
.svc-metric svg { width: 10px; height: 10px; }

/* Impact box */
.svc-impact {
  background: var(--bg2);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--gold);
}
.svc-impact-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.3rem;
  display: block;
}
.svc-impact p {
  font-size: 0.86rem;
  color: var(--text2);
  line-height: 1.6;
  margin: 0;
}

/* CTA section improved */
.services-cta-wrap {
  background: linear-gradient(135deg, rgba(0, 82, 255, 0.04) 0%, rgba(0, 40, 200, 0.02) 100%);
  border: 1px solid rgba(0, 82, 255, 0.1);
  border-radius: 28px;
  padding: 4rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.services-cta-wrap::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(0, 82, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.services-cta-wrap h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 1rem;
}
.services-cta-wrap p {
  font-size: 1.05rem;
  color: var(--text2);
  max-width: 500px;
  margin: 0 auto 2.2rem;
}

/* ======================================================
   MOBILE OPTIMIZATIONS
   ====================================================== */
@media (max-width: 768px) {
  /* Disable heavy background effects on mobile */
  .tech-dot-grid,
  .tech-dot-grid-2,
  .tech-scan-line,
  .float-particle,
  .hero-pulse-ring { display: none; }

  /* Reduce orb intensity on mobile */
  .orb-animate-1,
  .orb-animate-2,
  .orb-animate-3 {
    animation-duration: 40s !important;
    filter: blur(100px) !important;
    opacity: 0.6 !important;
  }

  /* Hide scroll indicator on mobile */
  .hero-scroll-indicator { display: none; }

  /* Hero glows smaller on mobile */
  .hero-glow, .hero-glow2 {
    width: 80vw;
    height: 80vw;
    filter: blur(60px);
  }

  /* Faster, snappier reveals on mobile */
  .reveal-up,
  .reveal-left,
  .reveal-right {
    transition-duration: 0.5s !important;
  }
  .reveal-stagger > * {
    transition-duration: 0.45s !important;
  }
  .reveal-stagger.reveal-visible > *:nth-child(1) { transition-delay: 0.02s; }
  .reveal-stagger.reveal-visible > *:nth-child(2) { transition-delay: 0.08s; }
  .reveal-stagger.reveal-visible > *:nth-child(3) { transition-delay: 0.14s; }
  .reveal-stagger.reveal-visible > *:nth-child(4) { transition-delay: 0.20s; }
  .reveal-stagger.reveal-visible > *:nth-child(5) { transition-delay: 0.26s; }
  .reveal-stagger.reveal-visible > *:nth-child(6) { transition-delay: 0.32s; }

  /* Buttons: no hover lift on touch */
  .btn-gold:hover { transform: none !important; }

  /* Service cards: no lift on mobile */
  .service-card-pro:hover  { transform: none; }
  .services-cta-wrap { padding: 2.5rem 1.5rem; }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .tech-dot-grid, .tech-dot-grid-2,
  .tech-scan-line, .float-particle,
  .orb-animate-1, .orb-animate-2, .orb-animate-3,
  .hero-glow, .hero-glow2, .hero-pulse-ring,
  .scroll-mouse-dot {
    animation: none !important;
  }
  .reveal-up, .reveal-fade, .reveal-left, .reveal-right,
  .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Breadcrumbs (shared) */
.breadcrumbs-container {
  padding: 1.2rem 0 0;
}
.breadcrumbs {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  font-size: 0.78rem;
  color: var(--text3);
}
.breadcrumbs li + li::before {
  content: '→';
  margin-right: 0.5rem;
  opacity: 0.4;
}
.breadcrumbs a {
  color: var(--text3);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumbs a:hover { color: var(--gold); }
