/* =========================================================
   Tu Profe Bilingüe — Design tokens
   Colores y tipografía medidos directamente de la imagen de
   referencia aprobada: assets/Imagen de hero.png
   ========================================================= */

:root {
  /* Colores — muestreados píxel a píxel de la referencia */
  --navy: #0B4888;          /* azul marca (logo, iconos, acentos, links) */
  --navy-dark: #082f5c;
  --navy-ink: #0A1B33;      /* navy casi negro — texto de titulares */
  --red: #E63038;           /* rojo americana (acento, CTA) */
  --red-dark: #c11f27;
  --ivory: #F8F6F4;         /* fondo cálido — muestreado de la referencia */
  --ivory-soft: #F1EDE7;
  --white: #FFFFFF;

  --font-display: "Baloo 2", "Segoe UI", sans-serif;   /* titulares — geométrica redondeada */
  --font-body: "Nunito Sans", "Segoe UI", sans-serif;  /* cuerpo de texto */
  --font-script: "Pacifico", cursive;                  /* acento de marca ("Bilingüe") */

  --container-w: 1536px;    /* ancho de diseño de la referencia */
  --header-h: 100px;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 10px 30px -12px rgba(10, 27, 51, 0.18);
  --shadow-btn: 0 12px 24px -10px rgba(230, 48, 56, 0.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy-ink);
  background: var(--ivory);
  line-height: 1.5;
  -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 { list-style: none; margin: 0; padding: 0; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 45px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--navy-ink);
  margin: 0;
}

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

.accent { color: var(--red); }

section[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* Mejora de accesibilidad: estado de foco visible y consistente en
   todo el sitio (el reset por defecto de muchos navegadores lo oculta
   en botones/links, lo que rompe la navegación por teclado). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2.5px solid var(--navy);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 1000;
  background: var(--navy);
  color: var(--white);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* Botón flotante de WhatsApp — aparece al bajar del Hero. Mejora de
   conversión: mantiene el canal preferido del segmento (ver ADN, Cap.
   6 — "canal de conversión preferido") siempre a un toque, sin repetir
   el CTA del header que ya queda fuera de vista en móvil al hacer scroll. */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 28px -10px rgba(230, 48, 56, 0.55);
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s ease;
}
.wa-float svg { width: 28px; height: 28px; }
.wa-float.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.wa-float:hover { background: var(--red-dark); }

@media (prefers-reduced-motion: reduce) {
  .wa-float { transition: opacity 0.01ms; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
