/* FM Training: base común de las tres opciones. Paleta y tipografías del sitio actual. */
@import url("fonts/fuentes.css");

:root {
  --azul: #003153;          /* primario del sitio */
  --azul-profundo: #001a2e; /* títulos y footer */
  --azul-medio: #0b4a75;    /* hover sobre azul */
  --niebla: #f4f5f9;        /* fondos claros */
  --linea: #e5e5e7;
  --gris: #a6a6a6;
  --texto: #333333;
  --blanco: #ffffff;
  --amarillo: #ffde59;      /* acción */
  --amarillo-hondo: #f5cf3a;

  --f-display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --f-texto: "Inter", "Helvetica Neue", Arial, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --margen: clamp(1rem, 4vw, 3.5rem);
  --ancho: 84rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--texto);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--f-display); color: var(--azul-profundo); margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Superficies del navegador con la paleta */
::selection { background: var(--amarillo); color: var(--azul-profundo); }
:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 3px; border-radius: 4px; }
input, textarea { caret-color: var(--azul); }
html { scrollbar-color: var(--azul) var(--niebla); }

.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; }
.saltar { position: absolute; left: var(--margen); top: -4rem; z-index: 100; background: var(--amarillo); color: var(--azul-profundo); padding: 0.75rem 1.25rem; border-radius: 999px; font-weight: 600; text-decoration: none; }
.saltar:focus { top: 1rem; }

.contenedor { width: 100%; max-width: var(--ancho); margin-inline: auto; padding-inline: var(--margen); }

/* Botón principal del sitio: píldora amarilla con flecha en círculo blanco */
.boton {
  display: inline-flex; align-items: center; gap: 0.875rem;
  padding: 0.5rem 0.5rem 0.5rem 1.375rem;
  border: 0; border-radius: 999px;
  background: var(--amarillo); color: var(--azul);
  font-family: var(--f-texto); font-weight: 600; font-size: 1rem; line-height: 1.5;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 160ms ease, transform 140ms var(--ease-out);
}
.boton .boton-icono {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--blanco); color: var(--azul);
  transition: transform 220ms var(--ease-out);
}
.boton svg { width: 1.125rem; height: 1.125rem; }
@media (hover: hover) {
  .boton:hover { background: var(--amarillo-hondo); }
  .boton:hover .boton-icono { transform: translateX(3px); }
}
.boton:active { transform: scale(0.97); }
.boton--secundario { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.boton--secundario .boton-icono { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
@media (hover: hover) { .boton--secundario:hover { background: rgba(255, 255, 255, 0.08); } }

/* Formulario de contacto */
.campo { display: grid; gap: 0.375rem; }
.campo label { font-weight: 500; font-size: 0.9375rem; color: var(--azul-profundo); }
.campo input, .campo select, .campo textarea {
  width: 100%; padding: 0.8125rem 1rem; border-radius: 12px;
  border: 1.5px solid var(--linea); background: var(--blanco);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.campo textarea { min-height: 7.5rem; resize: vertical; }
.campo input::placeholder, .campo textarea::placeholder { color: #5b6573; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 4px rgba(0, 49, 83, 0.12); }
.campo [aria-invalid="true"] { border-color: #b3261e; }
.campo .error { color: #b3261e; font-size: 0.875rem; }
.oculto-trampa { position: absolute; left: -9999px; }
.form-estado { min-height: 1.5rem; font-weight: 500; }
.form-estado[data-tipo="ok"] { color: #136f3a; }
.form-estado[data-tipo="error"] { color: #b3261e; }
form[aria-busy="true"] .boton { opacity: 0.7; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Revelado al entrar en pantalla: visible por defecto sin JS; con JS sube y aparece una sola vez. */
.js [data-aparecer] { opacity: 0; translate: 0 18px; transition: opacity 600ms var(--ease-out), translate 700ms var(--ease-out); transition-delay: var(--retraso, 0ms); }
.js [data-aparecer].visto { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) { .js [data-aparecer] { opacity: 1; translate: none; } }
