/* ==========================================================================
   JAP Formación GC · Landing prueba 5 días
   Identidad extraída de japformaciongc.com (theme-color y variables Elementor)
   ========================================================================== */

:root {
  /* Marca */
  --verde: #4A665A;
  --verde-hondo: #2E3F37;
  --verde-noche: #1C2621;
  --amarillo: #FFFA04;

  /* Superficies claro */
  --fondo: #F4F2ED;
  --superficie: #FFFFFF;
  --superficie-alt: #EAE7E0;
  --tinta: #1C2621;
  --tinta-suave: #55605A;
  --linea: #D8D4CB;

  /* Sistema */
  --radio: 3px;
  --ancho: 1200px;
  --paso: clamp(4rem, 9vw, 7rem);
  --curva: cubic-bezier(0.16, 1, 0.3, 1);

  --fuente-titulo: "Roboto Slab", Georgia, serif;
  --fuente-texto: "Lato", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --fondo: #151A17;
    --superficie: #1C2621;
    --superficie-alt: #232E28;
    --tinta: #E9E7E1;
    --tinta-suave: #A3AFA8;
    --linea: #33403A;
  }
}

:root[data-tema="oscuro"] {
  --fondo: #151A17;
  --superficie: #1C2621;
  --superficie-alt: #232E28;
  --tinta: #E9E7E1;
  --tinta-suave: #A3AFA8;
  --linea: #33403A;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--fuente-texto);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--fuente-titulo);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
img { max-width: 100%; display: block; }

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

@media (min-width: 768px) { .contenedor { padding-inline: 2rem; } }

.seccion { padding-block: var(--paso); }

.etiqueta {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--verde);
  margin-bottom: 1rem;
}

.banda-oscura .etiqueta { color: var(--amarillo); }

/* ---------- Navegación ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 68px;
  display: flex;
  align-items: center;
  background: var(--verde-noche);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.nav__fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
}

.nav__marca {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-family: var(--fuente-titulo);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
}

/* El texto va dentro de un solo elemento: así el espacio entre "JAP" y el
   resto es flujo normal y flex no se lo come. */
.nav__nombre { white-space: nowrap; }
.nav__nombre b { color: var(--amarillo); font-weight: 700; }

.nav__escudo {
  height: 44px;
  width: auto;
  flex-shrink: 0;
}

/* En móvil el CTA vive en la barra fija de abajo, así que aquí sobra.
   La especificidad tiene que ganar a `.boton { display: inline-flex }`. */
@media (max-width: 767px) {
  .nav .nav__boton { display: none; }
  .nav__marca { font-size: 1.05rem; }
  .nav__escudo { height: 40px; }
}

/* ---------- Botones ---------- */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  padding: 0.9rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radio);
  font-family: var(--fuente-texto);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--curva), background-color 0.18s var(--curva);
}

.boton--primario {
  background: var(--amarillo);
  color: #1C2621;
}

.boton--primario:hover { background: #E8E404; }
.boton:active { transform: translateY(1px); }

.boton--compacto { padding: 0.65rem 1.1rem; font-size: 0.8125rem; }

.boton--bloque { width: 100%; padding-block: 1.1rem; font-size: 1rem; }

.boton:focus-visible {
  outline: 3px solid var(--amarillo);
  outline-offset: 3px;
}

.nav .boton:focus-visible { outline-color: #fff; }

/* ---------- Bandas oscuras ---------- */

.banda-oscura {
  background: var(--verde-noche);
  color: #E9E7E1;
}

.banda-oscura h2 { color: #fff; }

/* ---------- Portada ---------- */

.portada {
  padding-top: clamp(3rem, 7vw, 6rem);
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
  position: relative;
  overflow: hidden;
}

.portada::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -55deg,
      rgba(255, 255, 255, 0.022) 0 2px,
      transparent 2px 22px
    );
  pointer-events: none;
}

.portada__rejilla {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .portada__rejilla { grid-template-columns: 1.15fr 0.85fr; gap: 4rem; }
}

.portada h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.5rem);
  color: #fff;
  margin-bottom: 1.25rem;
}

.portada h1 em {
  font-style: normal;
  color: var(--amarillo);
}

.portada__entrada {
  font-size: clamp(1.0625rem, 2vw, 1.2rem);
  color: #C5CFC9;
  max-width: 46ch;
  margin-bottom: 2rem;
}

/* Panel de credibilidad de la portada */

.credencial {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radio);
  padding: 1.75rem;
}

.credencial__dato {
  font-family: var(--fuente-titulo);
  font-size: clamp(2.6rem, 6vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--amarillo);
}

.credencial__pie {
  font-size: 0.9375rem;
  color: #C5CFC9;
  margin-top: 0.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.credencial__lista {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
  font-size: 0.9375rem;
  color: #D6DEDA;
}

.credencial__lista li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}

.credencial__lista strong { color: #fff; }

.marca-verif {
  color: var(--amarillo);
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- Franja de reseñas ---------- */

.franja {
  background: var(--superficie);
  border-bottom: 1px solid var(--linea);
  padding-block: 1.5rem;
}

.franja__fila {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 2rem;
  text-align: center;
}

.estrellas {
  color: #E8A400;
  font-size: 1.15rem;
  letter-spacing: 0.1em;
}

.franja__texto {
  font-size: 0.9375rem;
  color: var(--tinta-suave);
}

.franja__texto strong { color: var(--tinta); }

/* ---------- Dolores ---------- */

.dolores__rejilla {
  display: grid;
  gap: 1px;
  background: var(--linea);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  overflow: hidden;
  margin-top: 3rem;
}

@media (min-width: 800px) {
  .dolores__rejilla { grid-template-columns: 1fr 1fr; }
}

.dolor {
  background: var(--superficie);
  padding: 2rem;
}

.dolor__voz {
  font-family: var(--fuente-titulo);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--tinta);
  margin-bottom: 0.9rem;
  padding-left: 1rem;
  border-left: 3px solid var(--amarillo);
}

.dolor__respuesta {
  font-size: 0.9875rem;
  color: var(--tinta-suave);
}

/* ---------- Bento: qué incluye ---------- */

.bento {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
}

@media (min-width: 860px) {
  .bento {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(0, auto);
  }
  .bento__celda--ancha { grid-column: span 2; }
}

.bento__celda {
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 1.9rem;
  background: var(--superficie);
}

.bento__celda h3 {
  font-size: 1.1875rem;
  margin-bottom: 0.65rem;
}

.bento__celda p {
  font-size: 0.9375rem;
  color: var(--tinta-suave);
}

.bento__celda--verde {
  background: var(--verde-hondo);
  border-color: var(--verde-hondo);
  color: #D6DEDA;
}

.bento__celda--verde h3 { color: #fff; }
.bento__celda--verde p { color: #C5CFC9; }

.bento__celda--amarilla {
  background: var(--amarillo);
  border-color: var(--amarillo);
}

.bento__celda--amarilla h3,
.bento__celda--amarilla p { color: #1C2621; }


/* ---------- Cifras ---------- */

.cifras {
  display: grid;
  gap: 2.5rem 2rem;
  margin-top: 3rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 860px) {
  .cifras { grid-template-columns: repeat(4, 1fr); }
}

.cifra__valor {
  font-family: var(--fuente-titulo);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1;
  color: var(--amarillo);
}

.cifra__etiqueta {
  font-size: 0.9375rem;
  color: #C5CFC9;
  margin-top: 0.6rem;
  max-width: 24ch;
}

/* ---------- Reseñas ---------- */

.resenas {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
}

@media (min-width: 760px) { .resenas { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .resenas { grid-template-columns: repeat(3, 1fr); } }

.resena {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.resena__texto {
  font-size: 0.9875rem;
  color: var(--tinta);
}

.resena__autor {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--tinta-suave);
  letter-spacing: 0.03em;
  margin-top: auto;
}

.resena .estrellas { font-size: 0.9375rem; }

/* ---------- Pasos ---------- */

.pasos {
  list-style: none;
  counter-reset: paso;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  max-width: 780px;
}

.paso {
  counter-increment: paso;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--linea);
  align-items: start;
}

.paso:last-child { border-bottom: 1px solid var(--linea); }

.paso::before {
  content: counter(paso);
  font-family: var(--fuente-titulo);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--verde);
  line-height: 1.1;
  min-width: 2ch;
}

.paso h3 { font-size: 1.1875rem; margin-bottom: 0.4rem; }
.paso p { font-size: 0.9375rem; color: var(--tinta-suave); }

/* ---------- Formulario ---------- */

.inscripcion__rejilla {
  display: grid;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 940px) {
  .inscripcion__rejilla { grid-template-columns: 0.9fr 1.1fr; gap: 4rem; }
}

.inscripcion__sintesis h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 1.25rem; }

.inscripcion__lista {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: grid;
  gap: 0.85rem;
  font-size: 0.9875rem;
  color: #D6DEDA;
}

.inscripcion__lista li { display: flex; gap: 0.7rem; align-items: baseline; }

.formulario {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

.campo { display: grid; gap: 0.5rem; margin-bottom: 1.25rem; }

.campo label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--tinta);
}

.campo input,
.campo select {
  width: 100%;
  padding: 0.85rem 0.9rem;
  font-family: var(--fuente-texto);
  font-size: 1rem;
  color: var(--tinta);
  background: var(--fondo);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  transition: border-color 0.15s var(--curva);
}

.campo input::placeholder { color: var(--tinta-suave); opacity: 1; }

.campo input:focus-visible,
.campo select:focus-visible {
  outline: none;
  border-color: var(--verde);
  box-shadow: 0 0 0 3px rgba(74, 102, 90, 0.25);
}

.campo__ayuda { font-size: 0.8125rem; color: var(--tinta-suave); }

.campo__error {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #B3261E;
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) .campo__error { color: #FF9C94; }
}

.campo--fallo input,
.campo--fallo select { border-color: #B3261E; }
.campo--fallo .campo__error { display: block; }

.consentimiento {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  margin-bottom: 1.5rem;
  /* Zona pulsable holgada: en móvil se marca con el pulgar, no con el ratón. */
  padding: 0.65rem 0.5rem;
  margin-inline: -0.5rem;
  border-radius: var(--radio);
  cursor: pointer;
}

.consentimiento:hover { background: var(--fondo); }

.consentimiento input {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--verde);
  cursor: pointer;
}

.consentimiento label {
  font-size: 0.8375rem;
  line-height: 1.5;
  color: var(--tinta-suave);
  font-weight: 400;
  cursor: pointer;
}

.consentimiento a { color: var(--verde); }

/* Reserva de altura fija: aparece y desaparece sin mover nada de sitio. */
.error-consentimiento {
  min-height: 1.4em;
  margin: -0.75rem 0 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #B3261E;
  visibility: hidden;
}

.error-consentimiento.visible { visibility: visible; }

@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) .error-consentimiento { color: #FF9C94; }
}

.formulario__nota {
  font-size: 0.8125rem;
  color: var(--tinta-suave);
  text-align: center;
  margin-top: 1rem;
}

.trampa {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* Estados del envío */

.boton[aria-busy="true"] { opacity: 0.75; cursor: progress; }

.exito {
  display: none;
  text-align: center;
  padding: 1rem 0;
}

.exito h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.exito p { font-size: 0.9875rem; color: var(--tinta-suave); margin-bottom: 1.5rem; }


.formulario--enviado .formulario__cuerpo { display: none; }
.formulario--enviado .exito { display: block; }

.aviso-fallo {
  display: none;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #B3261E;
  border-radius: var(--radio);
  font-size: 0.875rem;
  color: #B3261E;
}

.formulario--error .aviso-fallo { display: block; }

/* ---------- Preguntas ---------- */

.preguntas { margin-top: 3rem; max-width: 780px; }

.pregunta {
  border-top: 1px solid var(--linea);
}

.preguntas .pregunta:last-child { border-bottom: 1px solid var(--linea); }

.pregunta summary {
  cursor: pointer;
  list-style: none;
  padding-block: 1.4rem;
  padding-right: 2rem;
  position: relative;
  font-family: var(--fuente-titulo);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--tinta);
}

.pregunta summary::-webkit-details-marker { display: none; }

.pregunta summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--verde);
}

.pregunta[open] summary::after { content: "\2212"; }

.pregunta summary:focus-visible { outline: 3px solid var(--verde); outline-offset: 2px; }

.pregunta p {
  font-size: 0.9375rem;
  color: var(--tinta-suave);
  padding-bottom: 1.4rem;
  max-width: 65ch;
}

/* ---------- Cierre y pie ---------- */

.cierre { text-align: center; }
.cierre h2 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); margin-bottom: 1rem; }
.cierre p { color: #C5CFC9; max-width: 52ch; margin: 0 auto 2rem; }

.pie {
  background: var(--verde-noche);
  color: #8D9B94;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-block: 2.5rem;
  font-size: 0.8125rem;
}

.pie__fila {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.pie a {
  color: #C5CFC9;
  display: inline-block;
  padding-block: 0.75rem;
}

.pie__marca {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 60ch;
}

.pie__escudo {
  height: 50px;
  width: auto;
  flex-shrink: 0;
}

/* ---------- Barra fija de móvil ----------
   El tráfico llega de comentarios en Instagram y TikTok, así que esto se ve
   casi siempre en móvil. La barra mantiene el CTA a un pulgar de distancia
   durante todo el scroll, y se aparta sola cuando el formulario está a la vista. */

.barra-movil {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: none;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: var(--verde-noche);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -8px 24px rgba(28, 38, 33, 0.28);
  transition: transform 0.28s var(--curva);
}

.barra-movil__nota {
  font-size: 0.75rem;
  color: #A3AFA8;
  text-align: center;
  margin-top: 0.5rem;
}

.barra-movil--oculta { transform: translateY(105%); }

@media (max-width: 767px) {
  .barra-movil { display: block; }
  /* Reserva para que la barra no tape el final del pie. */
  body { padding-bottom: 7.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .barra-movil { transition: none; }
}

/* ---------- Movimiento ---------- */

@media (prefers-reduced-motion: no-preference) {
  .revelar {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.65s var(--curva), transform 0.65s var(--curva);
  }
  .revelar.visible { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .boton { transition: none; }
}
