/* =====================================================================
   BASE.CSS — Reset, estilos generales, tipografía base y componentes
   ---------------------------------------------------------------------
   Establece una base limpia y consistente para todos los navegadores,
   además de estilos globales de tipografía y componentes reutilizables
   (botones y enlaces de accesibilidad).
   ===================================================================== */

/* -------------------------------------------------------------
   1. RESET MODERNO
   ------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;                /* Scroll suave entre secciones  */
  scroll-padding-top: var(--scroll-padding); /* Compensa el header fijo    */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--fuente-cuerpo);
  font-size: var(--tam-cuerpo);
  line-height: 1.7;
  color: var(--color-texto);
  background-color: var(--color-blanco);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;                     /* Evita scroll horizontal       */
}

/* -------------------------------------------------------------
   2. TIPOGRAFÍA BASE
   ------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--fuente-titulos);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-azul-profundo);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--tam-h1); font-weight: 700; }
h2 { font-size: var(--tam-h2); }
h3 { font-size: var(--tam-h3); }

/* Marca "bioquantum®": tipografía geométrica (Montserrat) para el nombre */
.marca {
  font-family: var(--fuente-marca);
  font-weight: inherit;
}

p {
  margin-bottom: var(--espacio-sm);
  color: var(--color-texto-suave);
}

a {
  color: var(--color-azul-cobalto);
  text-decoration: none;
  transition: color var(--transicion-rapida);
}
a:hover { color: var(--color-azul-cobalto-hover); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul { list-style: none; }

/* -------------------------------------------------------------
   3. ACCESIBILIDAD
   ------------------------------------------------------------- */
/* Enlace "saltar al contenido" para lectores de pantalla y teclado */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-azul-profundo);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radio-sm) 0;
  z-index: 1000;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

/* Estado de foco visible para navegación por teclado */
:focus-visible {
  outline: 3px solid var(--color-azul-cobalto);
  outline-offset: 2px;
  border-radius: 4px;
}

/* -------------------------------------------------------------
   4. COMPONENTE BOTÓN (reutilizable)
   -------------------------------------------------------------
   Clases disponibles:
   - .boton--primario  : fondo azul profundo, texto blanco.
   - .boton--secundario: contorno azul profundo (transparente).
   - .boton--whatsapp  : verde de WhatsApp (acciones de agendar).
   - .boton--claro     : fondo blanco, texto azul (cierre oscuro).
   ------------------------------------------------------------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--fuente-cuerpo);
  font-size: var(--tam-boton);
  font-weight: 600;
  line-height: 1.35;
  padding: 0.95rem 1.75rem;
  border-radius: var(--radio-pildora);
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  max-width: 100%;
  white-space: normal;
  transition:
    transform var(--transicion-rapida),
    background-color var(--transicion-rapida),
    color var(--transicion-rapida),
    box-shadow var(--transicion-rapida),
    border-color var(--transicion-rapida);
}

.boton__icono {
  width: 18px;
  height: 18px;
  flex: none;
}

/* Botón primario */
.boton--primario {
  background-color: var(--color-azul-profundo);
  color: #fff;
}
.boton--primario:hover {
  background-color: var(--color-azul-profundo-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--sombra-media);
}
.boton--primario:active {
  transform: translateY(0);
  box-shadow: var(--sombra-suave);
}

/* Botón secundario (contorno) */
.boton--secundario {
  background-color: transparent;
  color: var(--color-azul-profundo);
  border-color: var(--color-azul-profundo);
}
.boton--secundario:hover {
  background-color: var(--color-azul-profundo);
  color: #fff;
  transform: translateY(-2px);
}
.boton--secundario:active { transform: translateY(0); }

/* Botón de WhatsApp (verde institucional) */
.boton--whatsapp {
  background-color: var(--color-whatsapp);
  color: #fff;
}
.boton--whatsapp:hover {
  background-color: var(--color-whatsapp-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--sombra-media);
}
.boton--whatsapp:active { transform: translateY(0); }

/* Botón claro (fondo blanco, texto azul) — usado sobre fondo oscuro */
.boton--claro {
  background-color: var(--color-blanco);
  color: var(--color-azul-profundo);
}
.boton--claro:hover {
  background-color: var(--color-azul-celeste);
  color: var(--color-azul-profundo);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
}
.boton--claro:active { transform: translateY(0); }

/* -------------------------------------------------------------
   5. PREFERENCIA DE MOVIMIENTO REDUCIDO
   -------------------------------------------------------------
   Respeta a los usuarios que prefieren menos animaciones.
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
