/* ============ Base ============ */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

::selection {
  background: #2F6FED;
  color: #fff;
}

.font-heading { font-family: 'Poppins', sans-serif; }
.font-body { font-family: 'Inter', sans-serif; }

/* ============ Preloader ============ */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #1F3B73;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .5s ease, visibility .5s ease;
}
#preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.orbit-loader {
  position: relative;
  width: 64px;
  height: 64px;
}
.orbit-loader .orbit-ring {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: #2F6FED;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.orbit-loader .orbit-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px;
  background: #2F6FED;
  border-radius: 50%;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ Logo isotipo (anillo + punto) ============ */
.logo-mark {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-ring {
  position: absolute;
  width: 30px;
  height: 16px;
  border: 2px solid #2F6FED;
  border-radius: 50%;
  transform: rotate(-25deg);
}
.logo-dot {
  width: 8px;
  height: 8px;
  background: #2F6FED;
  border-radius: 50%;
}

/* ============ Navbar ============ */
#navbar {
  background: transparent;
  padding-top: 4px;
}
#navbar.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(31,59,115,0.08);
}
#navbar #logo-text { color: #fff; }
#navbar.scrolled #logo-text { color: #1F3B73; }

.nav-link { color: rgba(255,255,255,0.85); }
#navbar.scrolled .nav-link { color: #1F3B73; }
.nav-link:hover { color: #ffffff; }
#navbar.scrolled .nav-link:hover { color: #2F6FED; }
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width .3s ease;
}
.nav-link:hover::after { width: 100%; }

.menu-bar { background: #fff; }
#navbar.scrolled .menu-bar { background: #1F3B73; }
#menu-toggle.open .menu-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#menu-toggle.open .menu-bar:nth-child(2) { opacity: 0; }
#menu-toggle.open .menu-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
  background: #1F3B73;
  transform: translateX(100%);
  transition: transform .4s cubic-bezier(.65,0,.35,1);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-link { transition: color .3s ease; }
.mobile-link:hover { color: #2F6FED; }

/* ============ Hero orbit animation ============ */
.hero {
  background: radial-gradient(ellipse at 30% 20%, #274a8f 0%, #1F3B73 55%, #172e5c 100%);
}
.orbit-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}
.orbit-bg--subtle { opacity: 0.5; }

.orbit-bg .ring {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 50%;
}
.orbit-bg .ring-1 { width: 420px; height: 420px; animation: rotate-cw 40s linear infinite; }
.orbit-bg .ring-2 { width: 620px; height: 620px; border-color: rgba(47,111,237,0.25); animation: rotate-ccw 55s linear infinite; }
.orbit-bg .ring-3 { width: 820px; height: 300px; border-color: rgba(255,255,255,0.08); animation: rotate-cw 70s linear infinite; }

.orbit-bg .planet {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  background: #2F6FED;
  border-radius: 50%;
  box-shadow: 0 0 14px 3px rgba(47,111,237,0.7);
}
.orbit-bg .ring-2 .planet { background: #ffffff; box-shadow: 0 0 10px 2px rgba(255,255,255,0.6); width: 6px; height: 6px; margin-left: -3px; }
.orbit-bg .ring-3 .planet { background: #a7c3ff; }

.orbit-bg .core-dot {
  width: 14px;
  height: 14px;
  background: #2F6FED;
  border-radius: 50%;
  box-shadow: 0 0 30px 8px rgba(47,111,237,0.55);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes rotate-cw { to { transform: rotate(360deg); } }
@keyframes rotate-ccw { to { transform: rotate(-360deg); } }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.75; }
}

@media (max-width: 768px) {
  .orbit-bg .ring-1 { width: 260px; height: 260px; }
  .orbit-bg .ring-2 { width: 380px; height: 380px; }
  .orbit-bg .ring-3 { width: 480px; height: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  .orbit-bg .ring, .orbit-bg .core-dot, .orbit-loader .orbit-ring { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ============ Section divider (motivo de órbita) ============ */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: linear-gradient(to bottom, #ffffff 50%, #EAF0FB 50%);
}
.divider-ring {
  position: relative;
  width: 46px;
  height: 24px;
  border: 2px solid #2F6FED;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  animation: rotate-cw 12s linear infinite;
}
.divider-dot {
  width: 7px;
  height: 7px;
  background: #1F3B73;
  border-radius: 50%;
}

/* ============ Section backgrounds (degradados, no color plano) ============ */
.bg-section-light {
  background: linear-gradient(180deg, #ffffff 0%, #f3f7ff 55%, #eaf1fd 100%);
}
.bg-section-alt {
  background: linear-gradient(180deg, #eef4fd 0%, #e2ebfb 50%, #d7e5fb 100%);
}

/* ============ Eyebrow (etiqueta de sección) ============ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(47,111,237,0.1);
  border: 1px solid rgba(47,111,237,0.18);
  padding: 6px 16px 6px 12px;
  border-radius: 999px;
}
.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2F6FED;
  box-shadow: 0 0 0 3px rgba(47,111,237,0.18);
  flex-shrink: 0;
}

/* ============ Services ============ */
.icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #EAF0FB, #dbe6fb);
  color: #2F6FED;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px -10px rgba(31,59,115,0.25);
  transition: all .35s ease;
}
.service-card {
  position: relative;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, #2F6FED, #1F3B73);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s ease;
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover {
  box-shadow: 0 24px 48px -16px rgba(31,59,115,0.28) !important;
}
.service-card:hover .icon-wrap {
  background: linear-gradient(135deg, #2F6FED, #1F3B73);
  color: #fff;
  box-shadow: 0 14px 28px -10px rgba(47,111,237,0.55);
  transform: rotate(-6deg) scale(1.08);
}
.check { color: #2F6FED; font-weight: 700; }
.check-light { color: #8fb4ff; font-weight: 700; }

/* ============ Timeline ============ */
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
.timeline-line {
  display: none;
}
.timeline-item {
  position: relative;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.timeline-marker {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #2F6FED;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 0 6px rgba(47,111,237,0.12), 0 10px 20px -8px rgba(31,59,115,0.4);
}
.timeline-marker span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2F6FED, #1F3B73);
  box-shadow: 0 0 10px 2px rgba(47,111,237,0.5);
}
.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 21px;
  top: 44px;
  width: 2px;
  height: calc(100% + 3rem - 44px);
  background: repeating-linear-gradient(to bottom, rgba(47,111,237,0.45) 0, rgba(47,111,237,0.45) 6px, transparent 6px, transparent 12px);
}
.timeline-step {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: #2F6FED;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

@media (min-width: 1024px) {
  .timeline {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
  }
  .timeline-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .timeline-item:not(:last-child)::before {
    left: 50%;
    top: 21px;
    width: calc(100% - 44px + 1.5rem);
    height: 2px;
    background: repeating-linear-gradient(to right, rgba(47,111,237,0.45) 0, rgba(47,111,237,0.45) 6px, transparent 6px, transparent 12px);
  }
}

/* ============ Pricing ============ */
.pricing-card { transition: all .4s ease; }
.pricing-card:hover {
  box-shadow: 0 24px 48px -18px rgba(31,59,115,0.3) !important;
  border-color: rgba(47,111,237,0.35) !important;
}
.pricing-featured { transition: all .4s ease; }
.pricing-featured:hover {
  box-shadow: 0 30px 60px -14px rgba(31,59,115,0.55) !important;
}

/* ============ Portfolio ============ */
.portfolio-card:hover {
  box-shadow: 0 24px 48px -16px rgba(31,59,115,0.3) !important;
}

/* ============ Portfolio: capturas reales ============ */
.portfolio-shot {
  height: 190px;
  overflow: hidden;
}
.portfolio-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform .5s ease;
}
.portfolio-card:hover .portfolio-shot img {
  transform: scale(1.06);
}

/* ============ Testimonial carousel ============ */
.testimonial-carousel { position: relative; }
.testimonial-track {
  display: flex;
  transition: transform .5s cubic-bezier(.65,0,.35,1);
}
.testimonial-slide {
  flex: 0 0 100%;
  min-width: 100%;
}
.testimonial-card {
  background: linear-gradient(160deg, #ffffff 0%, #eaf0fb 100%);
  border: 1px solid rgba(47,111,237,0.15);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: 0 20px 44px -20px rgba(31,59,115,0.28);
}
.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #dbe6fb;
  color: #1F3B73;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s ease;
}
.carousel-btn:hover {
  background: #2F6FED;
  border-color: #2F6FED;
  color: #fff;
}
.t-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cddcf7;
  cursor: pointer;
  transition: all .3s ease;
}
.t-dot.active {
  background: #2F6FED;
  width: 22px;
  border-radius: 5px;
}

/* ============ Accordion ============ */
.accordion-trigger {
  cursor: pointer;
}
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
.accordion-item.open .accordion-panel {
  max-height: 200px;
}
.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
}

/* ============ AOS tuning ============ */
[data-aos] {
  transition-timing-function: cubic-bezier(.25,.8,.25,1) !important;
}

/* ============ Scroll cue ============ */
.scroll-cue { z-index: 10; }

/* ============ Decoración de fondo (motivo de órbita) ============ */
.section-decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(55px);
  mix-blend-mode: multiply;
}
.blob-accent { background: rgba(47,111,237,0.42); }
.blob-primary { background: rgba(31,59,115,0.38); }

.faint-ring {
  position: absolute;
  border: 1.5px solid rgba(47,111,237,0.28);
  border-radius: 50%;
}
.faint-ring.spin-slow { animation: rotate-cw 70s linear infinite; }
.faint-ring.spin-slow-rev { animation: rotate-ccw 90s linear infinite; }
.faint-ring .ring-tick {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  background: #2F6FED;
  box-shadow: 0 0 12px 3px rgba(47,111,237,0.6);
  border-radius: 50%;
}

.dot-grid-bg {
  background-image: radial-gradient(rgba(31,59,115,0.22) 1.6px, transparent 1.6px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 50%, #000 40%, transparent 100%);
          mask-image: radial-gradient(ellipse 85% 75% at 50% 50%, #000 40%, transparent 100%);
}

@media (prefers-reduced-motion: reduce) {
  .faint-ring.spin-slow, .faint-ring.spin-slow-rev { animation: none !important; }
}

@media (max-width: 640px) {
  .blob { filter: blur(40px); }
}
