/* Aplicación del tema: superficies, contenedores, botones y utilidades compartidas */
html {
  /* Deja aire bajo el header fijo al saltar a un ancla */
  scroll-padding-top: 5rem;
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

.container {
  margin-inline: auto;
  max-width: 72rem;
  padding-inline: 1.25rem;
  width: 100%;
}

.surface-dark {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* ── Accesibilidad ────────────────────────────────────────────────────────── */

.sr-only {
  border-width: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.visually-hidden {
  left: -999rem;
  position: absolute;
}

.skip-link {
  background: hsl(var(--accent));
  border-radius: 0 0 0.5rem 0;
  color: hsl(var(--accent-foreground));
  font-weight: 600;
  left: 0;
  padding: 0.75rem 1.25rem;
  position: absolute;
  top: -100%;
  z-index: 100;
}

.skip-link:focus-visible {
  top: 0;
}

:focus-visible {
  outline: 2px solid hsl(var(--accent));
  outline-offset: 2px;
}

.grecaptcha-badge {
  display: none;
}

/* ── Marca ────────────────────────────────────────────────────────────────── */

/* Logo original (bitmap). El recorte por object-position descarta el margen
   sobrante del PNG y el blend lo integra sobre los fondos oscuros. */
.brand-logo {
  aspect-ratio: 464 / 195;
  display: block;
  height: 2.1rem;
  mix-blend-mode: lighten;
  object-fit: cover;
  object-position: 50% 47%;
  width: auto;
}

.brand-logo--lg {
  height: 3rem;
}

/* ── Botones ──────────────────────────────────────────────────────────────── */

.btn {
  align-items: center;
  border-radius: 0.85rem;
  display: inline-flex;
  font-family: Outfit, Inter, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  gap: 0.5rem;
  justify-content: center;
  min-height: 3rem;
  padding-inline: 1.25rem;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
  white-space: nowrap;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn--accent {
  background-image: linear-gradient(
    120deg,
    hsl(var(--accent-light)),
    hsl(var(--accent))
  );
  box-shadow: 0 12px 28px -14px hsl(var(--accent) / 0.9);
  color: hsl(var(--accent-foreground));
}

.btn--accent:hover:not(:disabled) {
  box-shadow: 0 16px 34px -12px hsl(var(--accent) / 0.95);
  transform: translateY(-1px);
}

.btn--ghost {
  border: 1px solid hsl(0 0% 100% / 0.16);
  color: hsl(var(--primary-foreground) / 0.85);
}

.btn--ghost:hover {
  background-color: hsl(0 0% 100% / 0.06);
}

.btn--outline-accent {
  border: 1px solid hsl(var(--accent) / 0.5);
  border-radius: 999px;
  color: hsl(var(--accent-light));
}

.btn--outline-accent:hover {
  background-color: hsl(var(--accent) / 0.12);
}

.btn--block {
  flex: 1;
}

.btn--lg {
  font-size: 1rem;
  min-height: 3.5rem;
  padding-inline: 1.75rem;
}

/* ── WhatsApp flotante ────────────────────────────────────────────────────── */

.whatsapp-fab {
  align-items: center;
  background-color: hsl(142 70% 42%);
  border-radius: 1.1rem;
  bottom: 1.5rem;
  box-shadow: 0 14px 30px -10px hsl(142 70% 30% / 0.7);
  display: flex;
  height: 3.5rem;
  justify-content: center;
  position: fixed;
  right: 1.5rem;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  width: 3.5rem;
  z-index: 50;
}

.whatsapp-fab:hover {
  box-shadow: 0 18px 38px -10px hsl(142 70% 30% / 0.8);
  transform: scale(1.08);
}

.whatsapp-fab svg {
  fill: #fff;
  height: 1.75rem;
  width: 1.75rem;
}

/* ── Animaciones compartidas ──────────────────────────────────────────────── */

@keyframes fade-slide-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  animation: spin 0.8s linear infinite;
  height: 1rem;
  width: 1rem;
}

/* ── Aparición al entrar en pantalla ──────────────────────────────────────── */

/* El estado oculto se aplica sólo si reveal.js corrió: sin JS el contenido se ve
   igual, en vez de quedar invisible para siempre. */
.has-reveal [data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.has-reveal [data-animate].is-visible {
  opacity: 1;
  transform: none;
}

/* Escalonado: cada elemento entra un pelo después que el anterior */
.has-reveal [data-animate-delay="1"] { transition-delay: 80ms; }
.has-reveal [data-animate-delay="2"] { transition-delay: 160ms; }
.has-reveal [data-animate-delay="3"] { transition-delay: 240ms; }
.has-reveal [data-animate-delay="4"] { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  .has-reveal [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
