/* ============================================================
   BASE — Reset, tipografía, utilidades
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; } /* smooth scroll lo maneja Lenis/JS, no CSS nativo */
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--color-text); }
h1 { font-weight: 900; letter-spacing: -0.02em; }
h2 { font-weight: 700; letter-spacing: -0.01em; }
h3 { font-weight: 700; }
p { text-align: justify; text-justify: inter-word; }

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section {
  padding-block: clamp(3.5rem, 8vw, 7rem);
  position: relative;
}
.section--alt { background: var(--color-bg-alt); }
.section--dark { background: var(--color-bg-dark); color: var(--color-text-on-dark); }
.section--dark h2, .section--dark h3 { color: var(--color-text-on-dark); }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: .75rem;
}
.section--dark .eyebrow { color: #8f7fff; }

.section-heading {
  max-width: 720px;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-heading h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.15;
}
.section-heading p {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--color-text-muted);

}
.section--dark .section-heading p { color: #cfcfe0; }

.section-heading--center {
  margin-inline: auto;
  text-align: center;
}
.section-heading--center p { text-align: justify; text-justify: inter-word; }

/* Textura sutil (puntos) para secciones planas de un solo color */
.section--textured {
  position: relative;
  background-color: var(--color-bg-alt);
  background-image: radial-gradient(rgba(24,0,173,.09) 1.4px, transparent 1.4px);
  background-size: 22px 22px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--brand-blue);
  color: #fff;
  padding: 1rem 1.5rem;
  z-index: 10000;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 700;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 2px;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .9rem 1.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .98rem;
  white-space: nowrap;
  border: 2px solid transparent;
  transition: transform .25s var(--ease-smooth), box-shadow .25s var(--ease-smooth), background .25s, color .25s;
  will-change: transform;
}
.btn-primary {
  background: linear-gradient(160deg, #4a3dff 0%, #2410c9 28%, #1800AD 55%, #0c0060 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(24,0,173,.4), inset 0 1px 0 rgba(255,255,255,.4), inset 0 -2px 6px rgba(0,0,0,.35);
  border-color: rgba(255,255,255,.15);
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.btn-primary:hover {
  background: linear-gradient(160deg, #5d51ff 0%, #3120e0 28%, #1e02c4 55%, #100076 100%);
  box-shadow: 0 14px 34px rgba(24,0,173,.5), inset 0 1px 0 rgba(255,255,255,.5), inset 0 -2px 6px rgba(0,0,0,.35);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-light {
  background: #fff;
  color: var(--brand-blue);
}
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.25); }

/* Ripple */
.ripple-host { position: relative; overflow: hidden; }
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255,255,255,.55);
  animation: ripple-anim .6s ease-out forwards;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(2.8); opacity: 0; }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #e9e9ea 25%, #f5f5f7 37%, #e9e9ea 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
}
@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Utilidades responsive */
@media (max-width: 1024px) {
  .section { padding-block: clamp(3rem, 7vw, 5rem); }
}
@media (max-width: 480px) {
  body { font-size: 15px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
