/* ─── Smooth scroll ─────────────────────────────────────── */
html { scroll-behavior: smooth; }

/* ─── Soft section transitions ──────────────────────────── */
/* En vez de bordes duros entre cambios de color, agregar bandas
   de gradiente que mezclan los fondos contiguos */

/* Separador duro -> nada (lo reemplazan los fades de las secciones) */
.section-separator { border-top: none !important; }

/* Bordes duros entre hero/contacto y siguiente -> nada */
.hero { border-bottom: none !important; }
section[style*="border-bottom"] { border-bottom: none !important; }

/* Las secciones con fondo gris tienen una banda superior e inferior
   que hace fade desde/hacia blanco. Asume que el resto del sitio
   es blanco (#fff). */
.section-alt,
.section.section-alt,
[class*="section"][class*="alt"] {
  position: relative;
}
.section-alt::before,
.section.section-alt::before,
[class*="section"][class*="alt"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: linear-gradient(180deg, #ffffff 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.section-alt::after,
.section.section-alt::after,
[class*="section"][class*="alt"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: linear-gradient(0deg, #ffffff 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
/* Asegurar que el contenido quede sobre el fade */
.section-alt > *,
.section.section-alt > * {
  position: relative;
  z-index: 1;
}

/* Fade entre secciones navy (hero/cta/footer) y secciones blancas:
   se extienden con un pseudo-elemento POR FUERA de la sección que
   continúa el color navy y se desvanece hacia transparent. El
   "transparent" deja ver el fondo blanco/gris de la siguiente
   sección, generando el degradé real. */

.cta, .footer {
  position: relative;
  overflow: visible !important;
}
.hero { position: relative; }

/* Asegurar que el contenido de TODAS las secciones queda sobre
   los overlays de fade (z-index 2 contra los pseudo z-index 1) */
section, .footer { position: relative; }
section > .container,
section > div,
.footer > .container { position: relative; z-index: 2; }

/* hero::after eliminado: el sombreado lo hace el box-shadow del hero
   (la regla overflow:visible aquí rompía el clip de los blobs) */

/* CTA navy: fade leve en ambos extremos */
.cta::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 20px;
  background: linear-gradient(180deg, transparent 0%, var(--navy, #001d4a) 100%);
  pointer-events: none;
  z-index: 1;
  opacity: .5;
}
.cta::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 20px;
  background: linear-gradient(180deg, var(--navy, #001d4a) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
  opacity: .5;
}

/* Footer navy: fade leve arriba */
.footer::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 24px;
  background: linear-gradient(180deg, transparent 0%, var(--navy, #001d4a) 100%);
  pointer-events: none;
  z-index: 1;
  opacity: .5;
}

/* ─── Reveal on scroll ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s cubic-bezier(.4,0,.2,1), transform .7s cubic-bezier(.4,0,.2,1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Optional: staggered reveal for children */
.reveal.stagger > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .55s cubic-bezier(.4,0,.2,1), transform .55s cubic-bezier(.4,0,.2,1);
}
.reveal.stagger.is-visible > *           { opacity: 1; transform: none; transition-delay: 0s; }
.reveal.stagger.is-visible > *:nth-child(2) { transition-delay: .06s; }
.reveal.stagger.is-visible > *:nth-child(3) { transition-delay: .12s; }
.reveal.stagger.is-visible > *:nth-child(4) { transition-delay: .18s; }
.reveal.stagger.is-visible > *:nth-child(5) { transition-delay: .24s; }
.reveal.stagger.is-visible > *:nth-child(6) { transition-delay: .3s; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.stagger > * { transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* Header sin shadow ni border para transición limpia con el siguiente bloque */
.header { transition: background-color .25s ease; }

/* image fade-in removed: rompía imágenes renderizadas dinámicamente
   por fetch (productos, etc.) que quedaban con opacity:0 forever */

/* ─── Subtle button press ───────────────────────────────── */
button:not(:disabled):active,
.btn:not(:disabled):active,
.cta-btn:active,
.form-btn:active {
  transform: translateY(1px) scale(.98);
}

/* ─── Focus visible (accessibility refinement) ──────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--blue, #4FA1D9);
  outline-offset: 2px;
  border-radius: 4px;
}
