/* Estilo tomado de mcmabo.com: IBM Plex, marino + acción, bordes finos, radios pequeños. */
@font-face { font-family: "Plex Sans"; src: url(/fuentes/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url(/fuentes/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url(/fuentes/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Serif"; src: url(/fuentes/ibm-plex-serif-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Serif"; src: url(/fuentes/ibm-plex-serif-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Serif"; src: url(/fuentes/ibm-plex-serif-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light;
  --marino-950: #06162b;
  --marino-900: #0b2545;
  --marino-800: #13315c;
  --accion-100: #e9eef7;
  --accion-400: #8aa6d6;
  --accion-600: #1f4b99;
  --accion-700: #173a7a;
  --suave: #c9d4e4;
  --claro: #dfe6f0;
  --niebla: #f5f7fa;
  --linea: #d9dfe7;
  --tinta: #1b2533;
  --gris: #4a5668;
  --arena: #c9a96e;
  --error: #b42318;
  --exito: #1b7a4b;
  --sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --serif: "Plex Serif", Georgia, "Times New Roman", serif;
  --salida: cubic-bezier(.16, 1, .3, 1);
  --sombra: 0 30px 70px -44px rgba(11, 37, 69, .45);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--tinta); background: var(--niebla); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
.contenedor { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Cabecera */
.cabecera { background: #fff; border-bottom: 1px solid var(--linea); }
.cabecera__fila { height: 60px; display: flex; align-items: center; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--marino-900); }
.logo img { width: 34px; height: auto; }
.logo__texto { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; line-height: 1.1; display: flex; flex-direction: column; }

/* Portada marino */
.portada { position: relative; overflow: hidden; isolation: isolate; background: radial-gradient(120% 140% at 85% 0%, var(--marino-800) 0%, var(--marino-900) 45%, var(--marino-950) 100%); color: #fff; padding: 40px 0 96px; }
/* Dos luces suaves que se mueven lento detrás del título */
.portada__luz, .portada::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.portada__luz { width: 420px; height: 420px; right: -80px; top: -160px; background: rgba(31, 75, 153, .55); animation: deriva 14s ease-in-out infinite alternate; }
.portada::after { width: 300px; height: 300px; left: -120px; bottom: -180px; background: rgba(201, 169, 110, .18); animation: deriva 18s ease-in-out infinite alternate-reverse; }
.antetitulo { margin: 0 0 12px; font-size: .78rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--suave); }
.antetitulo--oscuro { color: var(--accion-600); }
.portada h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.15; margin: 0 0 12px; max-width: 18ch; text-wrap: balance; }
.portada__texto { margin: 0; color: var(--claro); max-width: 52ch; font-size: 1.05rem; }
.beneficios { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--claro); font-size: .92rem; }
.beneficios li { display: inline-flex; align-items: center; gap: 8px; }
.beneficios svg { width: 18px; height: 18px; color: var(--arena); flex: none; }

/* Tarjeta principal, superpuesta a la portada */
.principal { flex: 1; margin-top: -64px; padding-bottom: 48px; }
.principal--solo { margin-top: 48px; }
.tarjeta { background: #fff; border: 1px solid var(--linea); border-radius: 8px; box-shadow: var(--sombra); padding: 28px 22px; max-width: 640px; }
.tarjeta h2 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; line-height: 1.25; color: var(--marino-900); margin: 0 0 4px; }
.tarjeta__bajada { margin: 0 0 20px; color: var(--gris); }
.aviso {
  display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 12px 14px;
  border: 1px solid #f1b8b1; background: #fff6f5;
  color: #912018; border-radius: 6px; font-size: .92rem; font-weight: 500; animation: aparecer .3s var(--salida);
}
.aviso::before { content: ""; flex: none; width: 20px; height: 20px; background: url(/iconos/alerta.svg) center / contain no-repeat; }

/* Formulario */
.rejilla { display: grid; grid-template-columns: 1fr; gap: 18px 16px; }
.campo label { display: block; font-size: .875rem; font-weight: 500; color: var(--tinta); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=tel], select {
  width: 100%; height: 46px; font: inherit; font-size: 1rem; padding: 0 14px; color: var(--tinta);
  background: #fff; border: 1px solid var(--linea); border-radius: 6px; transition: border-color .15s, box-shadow .15s;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gris) 50%), linear-gradient(135deg, var(--gris) 50%, transparent 50%); background-position: calc(100% - 20px) 20px, calc(100% - 15px) 20px; background-size: 5px 5px; background-repeat: no-repeat; }
input:hover, select:hover { border-color: var(--suave); }
/* Autocompletado del celular: sin el fondo amarillo/azul del navegador, también en modo oscuro */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--tinta); caret-color: var(--tinta);
  box-shadow: 0 0 0 1000px #fff inset; transition: background-color 9999s;
}
.con-error input:-webkit-autofill { box-shadow: 0 0 0 1000px #fff inset, 0 0 0 3px rgba(180, 35, 24, .1); }
input::placeholder { color: var(--gris); opacity: 1; }
input:focus-visible, select:focus-visible { outline: none; border-color: var(--accion-600); box-shadow: 0 0 0 3px var(--accion-100); }
.ayuda { margin: 6px 0 0; font-size: .8rem; color: var(--gris); }
.error {
  display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 0; padding: 8px 10px;
  font-size: .82rem; line-height: 1.4; font-weight: 500; color: #912018;
  background: #fef3f2; border-radius: 6px; animation: aparecer .25s var(--salida);
}
.error::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 1px; background: url(/iconos/alerta.svg) center / contain no-repeat; }
/* Campo con error: borde rojo con halo suave e ícono a la derecha */
.con-error input:not([type=checkbox]), .con-error select { border-color: var(--error); box-shadow: 0 0 0 3px rgba(180, 35, 24, .1); }
.con-error input:not([type=checkbox]) { padding-right: 42px; background: #fff url(/iconos/alerta.svg) right 14px center / 18px no-repeat; }
.campo.con-error label { color: #912018; }
/* Campo bien completado: check verde a la derecha */
.valido input:not([type=checkbox]), .valido select { border-color: #9fd8b9; }
.valido input:not([type=checkbox]) { padding-right: 42px; background: #fff url(/iconos/ok.svg) right 14px center / 18px no-repeat; }
.valido input:focus-visible { border-color: var(--exito); box-shadow: 0 0 0 3px rgba(27, 122, 75, .12); }
.casilla { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; padding: 14px; background: var(--niebla); border: 1px solid var(--linea); border-radius: 6px; font-size: .92rem; }
.casilla input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accion-600); }
.casilla label { color: var(--tinta); }
.casilla .error { grid-column: 1 / -1; margin: 4px 0 0; }
.casilla.con-error { border-color: #f6cfca; background: #fffafa; }
.trampa { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* CTA principal */
.cta {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 54px; padding: 0 28px; border: 0; border-radius: 8px; cursor: pointer; text-decoration: none;
  font: inherit; font-size: 1.05rem; font-weight: 600; letter-spacing: .01em; color: #fff;
  background: linear-gradient(135deg, #2a63c4 0%, var(--accion-600) 45%, var(--marino-800) 100%);
  box-shadow: 0 10px 24px -10px rgba(31, 75, 153, .7), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: transform .2s var(--salida), box-shadow .2s var(--salida), filter .2s;
}
.cta::before { /* brillo que cruza el botón */
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  animation: brillo 3.6s ease-in-out 1.2s infinite;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(31, 75, 153, .85), inset 0 1px 0 rgba(255, 255, 255, .22); filter: saturate(1.1); }
.cta--enviando, .cta:disabled { cursor: progress; filter: saturate(.6); transform: none; }
.cta--enviando::before { animation-duration: 1.1s; animation-delay: 0s; }
.cta--enviando .icono-flecha { display: none; }
.cta:active { transform: translateY(0) scale(.985); box-shadow: 0 6px 14px -8px rgba(31, 75, 153, .8); }
.cta .icono-flecha { transition: transform .25s var(--salida); }
.cta:hover .icono-flecha { transform: translateX(4px); }
.cta:focus-visible, .opcion:focus-visible { outline: 3px solid var(--accion-400); outline-offset: 3px; }
.icono-flecha { width: 20px; height: 20px; flex: none; }

/* Opciones de descarga (como "¿Dónde quieres empezar?" de mcmabo.com) */
.opciones { display: grid; gap: 12px; }
.opcion { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--linea); border-radius: 10px; background: #fff; color: var(--tinta); text-decoration: none; transition: transform .2s var(--salida), box-shadow .2s var(--salida), border-color .2s, background .2s; }
a.opcion:hover { transform: translateY(-3px); border-color: var(--accion-400); box-shadow: 0 14px 30px -18px rgba(11, 37, 69, .55); }
.opcion__icono { width: 48px; height: 48px; border-radius: 10px; background: var(--accion-100); color: var(--accion-600); display: grid; place-items: center; flex: none; transition: transform .25s var(--salida); }
a.opcion:hover .opcion__icono { transform: scale(1.08) rotate(-4deg); }
.opcion__icono svg { width: 26px; height: 26px; }
.opcion__texto { display: flex; flex-direction: column; flex: 1; line-height: 1.35; }
.opcion__texto strong { font-weight: 600; font-size: 1.02rem; }
.opcion__texto span { font-size: .85rem; color: var(--gris); }
.opcion__ir { display: inline-flex; align-items: center; gap: 6px; color: var(--accion-600); font-weight: 600; font-size: .9rem; }
.opcion__ir .icono-flecha { transition: transform .25s var(--salida); }
a.opcion:hover .opcion__ir .icono-flecha { transform: translateX(4px); }
/* Android: la opción principal, con más peso visual */
.opcion--destacada {
  padding: 20px 18px; border: 0; color: #fff;
  background: linear-gradient(135deg, var(--marino-800) 0%, var(--marino-900) 60%, var(--marino-950) 100%);
  box-shadow: 0 18px 36px -18px rgba(11, 37, 69, .8);
}
.opcion--destacada .opcion__icono { background: linear-gradient(135deg, #3ddc84, #1e9e5a); color: #fff; box-shadow: 0 6px 16px -6px rgba(61, 220, 132, .6); }
.opcion--destacada .opcion__texto span { color: var(--suave); }
.opcion--destacada .opcion__ir { background: #fff; color: var(--marino-900); padding: 8px 12px; border-radius: 999px; font-size: .85rem; }
a.opcion--destacada:hover { box-shadow: 0 22px 40px -16px rgba(11, 37, 69, .9); }
.opcion--pronto { background: var(--niebla); }
.opcion--pronto .opcion__icono { background: var(--claro); color: var(--gris); }
.pronto { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); border: 1px solid var(--linea); border-radius: 999px; padding: 2px 10px; background: #fff; }

/* Insignia de éxito que se dibuja */
.exito { width: 56px; height: 56px; margin-bottom: 16px; }
.exito__circulo { stroke: var(--arena); stroke-dasharray: 151; stroke-dashoffset: 151; animation: trazo .7s var(--salida) .15s forwards; }
.exito__check { stroke: #fff; stroke-dasharray: 36; stroke-dashoffset: 36; animation: trazo .45s var(--salida) .75s forwards; }

/* Entradas */
.aparece { opacity: 0; animation: aparecer .7s var(--salida) forwards; }
.aparece--2 { animation-delay: .08s; }
.aparece--3 { animation-delay: .16s; }
.aparece--4 { animation-delay: .24s; }
.sube { opacity: 0; animation: subir .8s var(--salida) .2s forwards; }
.sube--1 { animation-delay: .45s; }
.sube--2 { animation-delay: .55s; }
.sube--3 { animation-delay: .65s; }
.campo input, .campo select { transition: border-color .15s, box-shadow .15s, transform .15s; }
.campo:focus-within label { color: var(--accion-600); }
.con-error input:not([type=checkbox]), .con-error select { animation: sacudida .3s ease-in-out; }

@keyframes aparecer { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes subir { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes deriva { from { transform: translate(0, 0) scale(1); } to { transform: translate(-60px, 40px) scale(1.15); } }
@keyframes brillo { 0% { transform: translateX(-120%); } 35%, 100% { transform: translateX(120%); } }
@keyframes respira { 0%, 100% { box-shadow: 0 18px 36px -18px rgba(11, 37, 69, .8), 0 0 0 0 rgba(138, 166, 214, 0); } 50% { box-shadow: 0 18px 36px -18px rgba(11, 37, 69, .8), 0 0 0 6px rgba(138, 166, 214, .28); } }
@keyframes trazo { to { stroke-dashoffset: 0; } }
@keyframes sacudida { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* La opción principal sube y después respira (selector más específico que .sube) */
.opcion.opcion--destacada { animation: subir .8s var(--salida) .45s forwards, respira 2.8s ease-in-out 1.3s infinite; }

/* Pie */
.pie { border-top: 1px solid var(--linea); background: #fff; color: var(--gris); font-size: .8rem; padding: 18px 0; }

@media (min-width: 720px) {
  .portada { padding: 56px 0 120px; }
  .principal { margin-top: -88px; }
  .tarjeta { padding: 36px 40px; }
  .rejilla { grid-template-columns: 1fr 1fr; }
  .rejilla > :not(.campo--medio) { grid-column: 1 / -1; }
  .cta { width: auto; justify-self: start; min-width: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .aparece, .sube { opacity: 1; }
  .exito__circulo, .exito__check { stroke-dashoffset: 0; }
}
