/* ==========================================================================
   Base, estructura de secciones y elementos compartidos
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* Deja aire bajo la barra fija al saltar a un ancla */
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--on-light);
  /* Azul marino, no claro: la barra fija es traslúcida y arriba de todo no
     tiene ninguna sección detrás. */
  background-color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* Todas las cifras de dinero se alinean en columna: mismo ancho por dígito. */
.figure,
.money {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.02em;
}

/* --- Foco visible y consistente en todo el sitio --- */
:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* Visible solo para lectores de pantalla. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% -120%;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--cyan);
  color: var(--ink-900);
  font-weight: 600;
  border-radius: 0 0 var(--r-md) var(--r-md);
  transition: translate 0.2s var(--ease);
}

.skip-link:focus-visible {
  translate: -50% 0;
}

/* --- Contenedores y secciones -------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow {
  max-width: var(--wrap-narrow);
}

.section {
  padding-block: var(--section-y);
}

.section--dark {
  background-color: var(--ink-900);
  color: var(--on-dark);
}

.section--light {
  background-color: var(--paper);
  color: var(--on-light);
}

/* --- Encabezados de sección ---------------------------------------------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

/* La regla se estira hasta el borde: marca el arranque de cada sección. */
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
}

.section--light .eyebrow {
  color: var(--cyan-ink);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--t-h2);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.section-lead {
  font-size: var(--t-lead);
  max-width: 58ch;
  margin-top: 1rem;
  color: var(--on-light-muted);
  text-wrap: pretty;
}

.section--dark .section-lead {
  color: var(--on-dark-muted);
}

/* --- Botones -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.6rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease), translate 0.2s var(--ease);
}

.btn i {
  font-size: 1.15em;
}

.btn--whatsapp {
  background-color: var(--green);
  color: #06331a;
}

.btn--whatsapp:hover {
  background-color: #43e07d;
  translate: 0 -2px;
}

.btn--solid {
  background-color: var(--cyan);
  color: var(--ink-900);
}

.btn--solid:hover {
  background-color: var(--cyan-bright);
  translate: 0 -2px;
}

/* Contorno sobre fondo oscuro */
.btn--outline {
  border-color: var(--ink-600);
  color: var(--on-dark);
}

.btn--outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* Contorno sobre fondo claro */
.section--light .btn--outline {
  border-color: var(--line);
  color: var(--on-light);
}

.section--light .btn--outline:hover {
  border-color: var(--cyan-ink);
  color: var(--cyan-ink);
}

.btn:active {
  translate: 0 0;
}

/* --- Animación de entrada ------------------------------------------------- */

.reveal {
  opacity: 0;
  translate: 0 18px;
  animation: reveal 0.7s var(--ease) forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes reveal {
  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* Quien pide menos movimiento no recibe ninguno. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    translate: none;
  }
}
