/* =========================================================
   PLANTILLA DE SECUENCIA DE BIENVENIDA — CORE
   Rellena SOLO el bloque "Marca". El resto no se toca.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

:root {
  /* ---------- MARCA — RELLENAR ---------- */
  --color-fondo:      #F6F3FB;
  --color-texto:      #0D3D5C;
  --color-suave:      #5B6878;
  --color-linea:      #DCD3EA;
  --color-acento:     #0D3D5C;
  --color-acento-txt: #FFFFFF;
  --color-error:      #B4231E;
  --fuente-titular:   'Bebas Neue', system-ui, sans-serif;
  --fuente-texto:     system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radio:            4px;

  /* ---------- ESCALA — NO TOCAR ---------- */
  --paso-1: .5rem;
  --paso-2: 1rem;
  --paso-3: 2rem;
  --paso-4: 3.5rem;
  --ancho:  38rem;
}

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

body {
  background: var(--color-fondo);
  color: var(--color-texto);
  font-family: var(--fuente-texto);
  font-size: 1.0625rem;
  line-height: 1.6;
  padding: var(--paso-3) var(--paso-2) var(--paso-4);
  -webkit-text-size-adjust: 100%;
}

main { max-width: var(--ancho); margin: 0 auto; }

img { max-width: 100%; height: auto; }
.logo { height: 2.5rem; width: auto; display: block; margin: 0 auto var(--paso-4); }

h1 {
  font-family: var(--fuente-titular);
  font-size: clamp(1.75rem, 5vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -.01em;
  margin-bottom: var(--paso-2);
}

h2 {
  font-family: var(--fuente-titular);
  font-size: 1.375rem;
  line-height: 1.25;
  margin-bottom: var(--paso-1);
}

p + p { margin-top: var(--paso-2); }

a { color: inherit; }

/* ---------- Vídeo ---------- */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  margin: var(--paso-3) 0;
  border-radius: var(--radio);
  overflow: hidden;
  background: #000;
}
.video iframe, .video video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; object-fit: cover;
}

/* ---------- Botones ---------- */
.cta {
  display: block;
  width: 100%;
  padding: var(--paso-2);
  background: var(--color-acento);
  color: var(--color-acento-txt);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: 0;
  border-radius: var(--radio);
  cursor: pointer;
}
.cta:hover { opacity: .9; }
.cta:focus-visible { outline: 3px solid var(--color-texto); outline-offset: 3px; }
.cta[disabled] { opacity: .4; cursor: not-allowed; }

.cta-secundario {
  background: transparent;
  color: var(--color-texto);
  border: 1px solid var(--color-linea);
}

.botonera { display: flex; gap: var(--paso-2); margin-top: var(--paso-4); }
.botonera .cta { flex: 1; }

/* ---------- Notas y avisos ---------- */
.nota { color: var(--color-suave); font-size: .9375rem; margin-top: var(--paso-2); }

.aviso {
  margin-top: var(--paso-3);
  padding: var(--paso-2);
  border: 1px solid var(--color-linea);
  border-radius: var(--radio);
  font-size: .9375rem;
}
.aviso strong { display: block; margin-bottom: .25rem; }

/* ---------- Pasos numerados ---------- */
.paso { margin-top: var(--paso-4); }
.paso-num {
  font-family: var(--fuente-titular);
  font-size: .8125rem;
  font-weight: 700;
  color: var(--color-suave);
  margin-bottom: var(--paso-1);
}
.paso ul { margin: var(--paso-2) 0 0; padding-left: 1.1rem; }
.paso li { margin-bottom: .35rem; }

/* ---------- Formulario ---------- */
.progreso {
  position: sticky; top: 0;
  background: var(--color-fondo);
  padding: var(--paso-2) 0;
  margin-bottom: var(--paso-3);
  border-bottom: 1px solid var(--color-linea);
  font-size: .875rem;
  color: var(--color-suave);
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--paso-2);
}
.barra { flex: 1; height: 3px; background: var(--color-linea); border-radius: 2px; overflow: hidden; }
.barra span { display: block; height: 100%; width: 0; background: var(--color-acento); transition: width .25s; }

fieldset { border: 0; padding: 0; margin: 0; }
fieldset[hidden] { display: none; }
legend { font-family: var(--fuente-titular); font-size: 1.5rem; line-height: 1.2; margin-bottom: var(--paso-1); padding: 0; }
.intro-seccion { color: var(--color-suave); margin-bottom: var(--paso-2); }

label { display: block; margin-top: var(--paso-3); font-weight: 600; }
.ayuda { display: block; font-weight: 400; color: var(--color-suave); font-size: .9375rem; margin-top: .2rem; }

input, textarea, select {
  width: 100%;
  padding: .75rem;
  margin-top: var(--paso-1);
  font: inherit;
  color: inherit;
  background: var(--color-fondo);
  border: 1px solid var(--color-linea);
  border-radius: var(--radio);
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--color-acento); outline-offset: 1px; border-color: var(--color-acento);
}
textarea { min-height: 7.5rem; resize: vertical; }

.opciones { margin-top: var(--paso-1); }
.opcion { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; margin-top: .6rem; }
.opcion input { width: auto; margin: .35rem 0 0; flex: none; }

.consentimiento { display: flex; gap: .75rem; align-items: flex-start; margin-top: var(--paso-4); font-weight: 400; font-size: .9375rem; }
.consentimiento input { width: auto; margin: .3rem 0 0; flex: none; }

.error { color: var(--color-error); font-size: .875rem; margin-top: .35rem; }
.error[hidden] { display: none; }
.campo-error input, .campo-error textarea, .campo-error select { border-color: var(--color-error); }

.guardado { font-size: .8125rem; color: var(--color-suave); text-align: center; margin-top: var(--paso-3); }

/* ---------- EquilibraTuVida: logo, titulares y fondo animado ---------- */
.logo { height: 6rem; }

h1, h2, legend, .paso-num { font-weight: 400; }

.titular-grande {
  font-size: clamp(2.75rem, 10vw, 4.75rem);
  line-height: .95;
  letter-spacing: .01em;
  margin-bottom: var(--paso-3);
}

main { position: relative; z-index: 1; }

.fondo {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Manchas de color de la marca que se mueven despacio */
.fondo::before,
.fondo::after {
  content: "";
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
}
.fondo::before {
  background: #B48FD8;
  top: -30vmax;
  left: -25vmax;
  animation: deriva-1 26s ease-in-out infinite alternate;
}
.fondo::after {
  background: #6DC4BC;
  bottom: -30vmax;
  right: -25vmax;
  animation: deriva-2 32s ease-in-out infinite alternate;
}

/* Logotipo difuminado girando en el centro */
.fondo-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(110vmin, 760px);
  aspect-ratio: 1;
  background: url("logo-fondo.png") center / contain no-repeat;
  opacity: .12;
  filter: blur(5px);
  transform: translate(-50%, -50%);
  animation: girar 70s linear infinite;
}

/* Anillos que giran alrededor del logo */
.fondo-anillo {
  position: absolute;
  top: 50%;
  left: 50%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.fondo-anillo.a1 {
  width: min(78vmin, 560px);
  border: 2px dashed rgba(13, 61, 92, .14);
  animation: girar 80s linear infinite reverse;
}
.fondo-anillo.a2 {
  width: min(112vmin, 820px);
  border: 2px solid rgba(180, 143, 216, .14);
  border-top-color: rgba(180, 143, 216, .6);
  border-right-color: rgba(180, 143, 216, .35);
  animation: girar 28s linear infinite;
}
.fondo-anillo.a3 {
  width: min(150vmin, 1120px);
  border: 3px dotted rgba(109, 196, 188, .3);
  animation: girar 140s linear infinite reverse;
}
.fondo-anillo.a4 {
  width: min(190vmin, 1440px);
  border: 1px solid rgba(109, 196, 188, .12);
  border-bottom-color: rgba(109, 196, 188, .55);
  animation: girar 45s linear infinite reverse;
}

@keyframes girar   { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes deriva-1 { to { transform: translate(18vmax, 22vmax) scale(1.15); } }
@keyframes deriva-2 { to { transform: translate(-20vmax, -16vmax) scale(1.1); } }

/* ---------- Botón de mantener pulsado ---------- */
.pulsar {
  position: relative;
  display: block;
  width: 13rem;
  height: 13rem;
  margin: var(--paso-4) auto var(--paso-3);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.pulsar:focus-visible { outline: 3px solid var(--color-acento); outline-offset: 6px; border-radius: 50%; }

.pulsar-halo {
  position: absolute;
  inset: -1.75rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 143, 216, .6) 0%, rgba(109, 196, 188, .35) 42%, transparent 70%);
  filter: blur(10px);
  animation: latido 2.6s ease-in-out infinite;
}

.pulsar-disco {
  position: absolute;
  inset: 1.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, .55),
    0 0 36px rgba(180, 143, 216, .75),
    0 0 72px rgba(109, 196, 188, .5);
  transition: transform .2s ease, box-shadow .3s ease;
}
.pulsar-disco img { width: 72%; pointer-events: none; -webkit-user-drag: none; }

.pulsar svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.pulsar .pista { fill: none; stroke: rgba(13, 61, 92, .12); stroke-width: 6; }
.pulsar .arco {
  fill: none;
  stroke: url(#degradado-arco);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 597;
  stroke-dashoffset: 597;
}

.pulsar.activo .pulsar-disco { transform: scale(.93); }
.pulsar.activo .pulsar-halo  { animation-duration: .9s; }
.pulsar.hecho .pulsar-disco {
  transform: scale(1.1);
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, .8),
    0 0 60px rgba(180, 143, 216, 1),
    0 0 120px rgba(109, 196, 188, .9);
}

@keyframes latido { 50% { transform: scale(1.08); opacity: .75; } }

.pulsar-texto {
  font-family: var(--fuente-titular);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.15;
  letter-spacing: .04em;
  text-align: center;
}
.pulsar-sub { text-align: center; color: var(--color-suave); margin-top: .35rem; }
.alternativa { text-align: center; font-size: .875rem; color: var(--color-suave); margin-top: var(--paso-2); }

/* Los botones ocultos se ocultan de verdad (la plantilla los dejaba visibles) */
.cta[hidden] { display: none; }

/* ---------- Transición entre pantallas del formulario ---------- */
fieldset.sale       { animation: sale .28s ease-in forwards; }
fieldset.sale-atras { animation: sale-atras .28s ease-in forwards; }
fieldset.entra       { animation: entra .55s cubic-bezier(.2, .8, .2, 1); }
fieldset.entra-atras { animation: entra-atras .55s cubic-bezier(.2, .8, .2, 1); }

@keyframes sale        { to   { opacity: 0; transform: translateY(-36px) scale(.98); filter: blur(4px); } }
@keyframes sale-atras  { to   { opacity: 0; transform: translateY(36px)  scale(.98); filter: blur(4px); } }
@keyframes entra       { from { opacity: 0; transform: translateY(48px)  scale(.98); filter: blur(6px); } }
@keyframes entra-atras { from { opacity: 0; transform: translateY(-48px) scale(.98); filter: blur(6px); } }

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