/* =============================================================================
   styles.css  —  Landing Au Pair (solo formulario)
   -----------------------------------------------------------------------------
   Índice:
     01. Variables y reset
     02. Tipografía y utilidades
     03. Botones
     04. Header y footer
     05. FLUJO DE REGISTRO  (stepper, stage, paneles, iframe)
     06. Reproductor de video con gate
     07. Pantalla de éxito
     08. Animaciones y responsive
   ============================================================================= */

/* ==========================================================================
   01. VARIABLES Y RESET
   ========================================================================== */
:root {
  /* ---------------------------------------------------------------------
     PALETA TOMADA DEL LOGO
     Los valores no son inventados: salen de muestrear assets/logo-upper.jpg.
       Tipografía del logo ....... #453F36
       Fondo base ................ #F4EDDF
       Degradado ................. rosa #FFECEE · verde #EAF0E2 · ámbar #FFF0D3

     La marca es de pasteles cálidos. Para que un pastel se vea profesional y
     no infantil hacen falta dos cosas: que los colores saturados aparezcan
     solo en detalles pequeños, y que el contraste fuerte lo cargue un neutro
     oscuro. Por eso los botones principales son del gris cálido del logo y
     no de un color: es lo que le da el aire caro.
     --------------------------------------------------------------------- */

  /* Neutro cálido de la marca */
  --brand-900: #2E2A24;
  --brand-800: #453F36;      /* el color exacto de la tipografía del logo */
  --brand-700: #5A5248;
  --brand-500: #8A8071;
  --brand-200: #D8D2C6;

  /* Rosa del degradado */
  --rose-100: #FFECEE;
  --rose-200: #FBDDDC;
  --rose-300: #F3C7C3;
  --rose-500: #DDA5A0;
  --rose-600: #C0817B;

  /* Verde del degradado */
  --sage-100: #EAF0E2;
  --sage-300: #D2E0C2;
  --sage-600: #7E9968;

  /* Ámbar del degradado */
  --amber-100: #FFF0D3;
  --amber-300: #F3DDAC;
  --amber-600: #C29A4F;

  /* Cremas de fondo */
  --cream-50:  #FDFBF6;
  --cream-100: #F9F4EA;
  --cream-200: #F4EDDF;      /* el fondo del logo */
  --cream-300: #E8DFCB;

  /* Texto */
  --ink-900: #2E2A24;
  --ink-700: #4F483E;
  --ink-500: #7C7365;
  --ink-300: #A79E8F;

  --white: #FFFFFF;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  /* Sombras cálidas: una sombra gris azulada sobre fondo crema se ve sucia */
  --shadow-sm: 0 2px 8px rgba(69, 63, 54, .06);
  --shadow: 0 12px 32px rgba(69, 63, 54, .10);
  --shadow-lg: 0 28px 64px rgba(69, 63, 54, .16);

  --container: 960px;
  --gutter: 20px;

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-700);
  background:
    radial-gradient(90% 60% at 50% 0%, var(--cream-100) 0%, var(--cream-50) 60%),
    var(--cream-50);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; display: block; }
button { font: inherit; }

h1, h2, h3 {
  color: var(--brand-900);
  line-height: 1.18;
  margin: 0 0 .5em;
  letter-spacing: -.02em;
}

p { margin: 0 0 1em; }
a { color: var(--brand-700); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-800);
  color: #fff;
  padding: 12px 20px;
  z-index: 999;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--rose-500);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   02. TIPOGRAFÍA Y UTILIDADES
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding: clamp(32px, 6vw, 64px) 0 clamp(48px, 7vw, 80px); }

.section__head {
  max-width: 640px;
  margin: 0 auto clamp(28px, 4vw, 40px);
  text-align: center;
}
.section__head--tight { margin-bottom: clamp(24px, 3.5vw, 34px); }

.section__title { font-size: clamp(27px, 4.4vw, 40px); }
.section__lead { font-size: clamp(15px, 2vw, 18px); color: var(--ink-500); margin: 0; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rose-600);
  background: var(--rose-100);
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0 0 16px;
}

/* ==========================================================================
   03. BOTONES
   ========================================================================== */
.btn {
  --btn-bg: var(--brand-800);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }

/* El botón principal va en el gris cálido del logo, no en rosa: sobre un fondo
   de pasteles, un botón pastel se pierde y otro saturado desentona. El neutro
   oscuro destaca por contraste y es lo que da el aire profesional. */
.btn--primary {
  --btn-bg: linear-gradient(135deg, var(--brand-800), var(--brand-900));
  box-shadow: 0 8px 20px rgba(46, 42, 36, .22);
}
.btn--primary:hover { box-shadow: 0 14px 30px rgba(46, 42, 36, .30); }

.btn--lg { padding: 17px 34px; font-size: 17px; }

.btn:disabled,
.btn[disabled] {
  cursor: not-allowed;
  opacity: .45;
  transform: none !important;
  box-shadow: none;
  filter: grayscale(.5);
}

/* Pequeño latido cuando el botón se desbloquea tras el video */
.btn.is-ready { animation: pulse 1.6s var(--ease) 2; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(46, 42, 36, .22); }
  50%      { box-shadow: 0 8px 20px rgba(46, 42, 36, .22), 0 0 0 12px rgba(192, 129, 123, .18); }
}

/* ==========================================================================
   04. HEADER Y FOOTER
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 252, 248, .86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  transition: box-shadow .3s, background .3s;
}
.header.is-scrolled { box-shadow: 0 1px 0 rgba(69, 63, 54, .08), var(--shadow-sm); }

.header__inner {
  display: flex;
  align-items: center;
  min-height: 72px;
  gap: 16px;
}
.header__inner--simple { justify-content: center; }

.brand { display: flex; align-items: center; }
/* El logo es cuadrado y trae su propio fondo degradado. A 38px de alto (lo que
   servía para un logo apaisado) el texto quedaba ilegible, así que se le da más
   altura y esquinas redondeadas para que el fondo se lea como una tarjeta y no
   como un recorte mal hecho. */
.brand__logo {
  height: 54px;
  width: auto;
  border-radius: 12px;
  display: block;
}

.footer {
  flex: 0 0 auto;
  background: var(--brand-900);
  color: var(--brand-200);
  padding: 26px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__legal { margin: 0; font-size: 14px; }
.footer__nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__nav a { color: var(--brand-200); font-size: 14px; text-decoration: none; }
.footer__nav a:hover { color: #fff; text-decoration: underline; }

/* ==========================================================================
   05. FLUJO DE REGISTRO
   ========================================================================== */
.stepper {
  display: flex;
  list-style: none;
  margin: 0 auto clamp(20px, 3vw, 30px);
  padding: 0;
  max-width: 640px;
  gap: 6px;
}
.stepper__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-300);
  text-align: center;
  position: relative;
  transition: color .3s;
}
.stepper__item span {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #fff;
  border: 2px solid var(--cream-200);
  color: var(--ink-300);
  font-weight: 800;
  font-size: 14px;
  transition: all .35s var(--ease);
  z-index: 1;
}
.stepper__item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 17px;
  left: calc(50% + 22px);
  right: calc(-50% + 22px);
  height: 2px;
  background: var(--cream-200);
  transition: background .35s;
}
.stepper__item.is-current { color: var(--brand-800); }
.stepper__item.is-current span {
  border-color: var(--rose-500);
  background: var(--rose-500);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 0 6px rgba(192, 129, 123, .18);
}
.stepper__item.is-done { color: var(--sage-600); }
.stepper__item.is-done span {
  border-color: var(--sage-600);
  background: var(--sage-600);
  color: #fff;
}
.stepper__item.is-done::after { background: var(--sage-600); }

/* --- Escenario compartido: el iframe vive aquí y no se mueve jamás --- */
.stage {
  position: relative;
  background: #fff;
  border: 1px solid var(--cream-300);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  min-height: 320px;
  /* clip en vez de hidden: recorta a las esquinas redondeadas sin crear un
     contenedor de scroll que atrape la página. */
  overflow: clip;
}

.panel { position: relative; }

/* PANEL FORMULARIO
   ¡Importante! Se oculta con visibility/opacity, NUNCA con display:none con
   re-parenting ni desmontando el nodo: eso reiniciaría Microsoft Forms y se
   perdería la Sección 1 ya respondida. */
/* Sin altura fija: el formulario mide lo que necesite y la página crece con
   él. La altura fija venía de cuando aquí había un iframe de Microsoft Forms,
   y era la que dejaba el formulario cortado a la mitad. */
.panel--form {
  transition: opacity .3s var(--ease);
}
.panel--form.is-hidden {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  inset: 0;
  pointer-events: none;
}



.notice {
  margin: 0;
  padding: 18px 22px;
  background: var(--amber-100);
  border-bottom: 1px solid var(--amber-300);
  color: #8A6A22;
  font-size: 15px;
}

/* PANEL VIDEO — superpuesto al formulario */
.panel--video {
  padding: clamp(24px, 4vw, 40px);
  background: linear-gradient(165deg, var(--brand-800), var(--brand-900));
  color: var(--brand-200);
  animation: panelIn .45s var(--ease) both;
}
.panel--video .panel__head { text-align: center; max-width: 620px; margin: 0 auto 24px; }
.panel--video h2 { color: #fff; font-size: clamp(21px, 3vw, 28px); }
.panel--video .panel__head p { color: var(--brand-200); font-size: 16px; margin: 0; }

.panel__actions { text-align: center; margin-top: 26px; }
.panel__hint { font-size: 14px; color: var(--ink-500); margin: 12px 0 0; }
.panel--video .panel__hint { color: rgba(216, 210, 198, .75); }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.stage-actions {
  text-align: center;
  margin-top: 24px;
}

/* ==========================================================================
   06. REPRODUCTOR CON GATE
   ========================================================================== */
.vg { max-width: 820px; margin: 0 auto; }

.vg__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.vg__media { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.vg__media--embed iframe { width: 100%; height: 100%; border: 0; }

/* Capa que impide interactuar directamente con el reproductor
   (menú contextual, doble-tap para adelantar en móvil, etc.) */
.vg__shield { position: absolute; inset: 0; cursor: pointer; }

.vg__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 132px; height: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  color: var(--brand-900);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: transform .3s var(--ease), opacity .3s;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}
.vg__play:hover { transform: scale(1.06); }
.vg__play.is-hidden { opacity: 0; pointer-events: none; transform: scale(.8); }
.vg__play-icon {
  width: 0; height: 0;
  border-style: solid;
  border-width: 13px 0 13px 22px;
  border-color: transparent transparent transparent var(--rose-500);
  margin-left: 6px;
}

.vg__bar { margin-top: 16px; }
.vg__bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(216, 210, 198, .25);
  overflow: hidden;
}
.vg__bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose-500), var(--amber-600));
  transition: width .25s linear;
}
.vg__bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  font-size: 13px;
  color: rgba(216, 210, 198, .8);
  flex-wrap: wrap;
}
.vg__time { font-variant-numeric: tabular-nums; }
.vg__status.is-warn { color: var(--amber-600); font-weight: 700; }
.vg__status.is-ok { color: var(--sage-300); font-weight: 700; }

.vg__frame.is-complete { box-shadow: 0 0 0 2px var(--sage-600), var(--shadow-lg); }

/* --- Maqueta animada (VIDEO_PROVIDER: 'simulacion') ------------------------
   Sustituye al video mientras no exista la grabación. Se borra sola del flujo
   en cuanto cambies VIDEO_PROVIDER a 'mp4'.                                   */
.vg__sim {
  position: relative;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--brand-900) 0%, var(--brand-700) 55%, var(--brand-900) 100%);
  overflow: hidden;
  padding: clamp(20px, 4vw, 40px);
  text-align: center;
}
.vg__sim-bg { position: absolute; inset: 0; pointer-events: none; }
.vg__sim-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .45;
  animation: simFloat 14s ease-in-out infinite;
}
.vg__sim-blob--1 { width: 300px; height: 300px; background: var(--rose-500); top: -90px; right: -60px; }
.vg__sim-blob--2 { width: 260px; height: 260px; background: var(--sage-600); bottom: -80px; left: -50px; animation-delay: -6s; }

@keyframes simFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-24px, 20px) scale(1.12); }
}

.vg__sim-tag {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber-600);
  background: rgba(194, 154, 79, .16);
  border: 1px solid rgba(194, 154, 79, .34);
  padding: 5px 10px;
  border-radius: 999px;
}

.vg__sim-scene { position: relative; max-width: 560px; }
.vg__sim-scene.is-in .vg__sim-eyebrow,
.vg__sim-scene.is-in .vg__sim-title { animation: simIn .6s var(--ease) both; }
.vg__sim-scene.is-in .vg__sim-title { animation-delay: .1s; }
.vg__sim-scene.is-in li { animation: simIn .6s var(--ease) both; }

.vg__sim-eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rose-300);
}
.vg__sim-title {
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(19px, 3.2vw, 30px);
  line-height: 1.22;
  letter-spacing: -.02em;
}
.vg__sim-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.vg__sim-lines li {
  color: rgba(255, 255, 255, .88);
  font-size: clamp(14px, 1.9vw, 17px);
  line-height: 1.45;
}

@keyframes simIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}


/* ==========================================================================
   07. PANTALLA DE ÉXITO
   ========================================================================== */
.panel--success { padding: clamp(48px, 8vw, 88px) 24px; }
.success { text-align: center; max-width: 560px; margin: 0 auto; }
.success h2 { font-size: clamp(26px, 4vw, 36px); color: var(--brand-900); }
.success p { color: var(--ink-500); font-size: 17px; }
.success__hint {
  font-size: 15px;
  background: var(--cream-100);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 22px;
}
/* Enlace a la charla de Teams en la pantalla de éxito. Se muestra además del
   correo porque el correo puede tardar o caer en spam, y perder al lead ahí
   sería absurdo después de todo el embudo. */
.success__teams {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--cream-200);
}
.success__teams-label {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-500);
}

.success__check { display: flex; justify-content: center; margin-bottom: 18px; }
.success__circle {
  stroke: var(--sage-600);
  stroke-width: 3;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: drawCircle .7s var(--ease) forwards;
}
.success__tick {
  stroke: var(--sage-600);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: drawTick .4s var(--ease) .55s forwards;
}
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawTick   { to { stroke-dashoffset: 0; } }




/* ==========================================================================
   08. ANIMACIONES DE ENTRADA Y RESPONSIVE
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* --- Móvil: prioridad absoluta, el tráfico llega de Instagram --- */
@media (max-width: 768px) {
  body { font-size: 16px; }

  .brand__logo { height: 46px; border-radius: 10px; }
  .header__inner { min-height: 64px; }

  .stage { border-radius: var(--radius); }

  .stepper { gap: 2px; }
  .stepper__item { font-size: 11px; }
  .stepper__item span { width: 30px; height: 30px; font-size: 13px; }
  .stepper__item:not(:last-child)::after { left: calc(50% + 19px); right: calc(-50% + 19px); top: 15px; }

  .panel--video { padding: 20px 14px 26px; }
  .vg__play { width: 96px; height: 96px; font-size: 12px; }
  .vg__bar-meta { font-size: 12px; }
  .vg__status { flex: 1 1 100%; }


  .footer__inner { flex-direction: column; text-align: center; }
}

/* --- Móviles pequeños --- */
@media (max-width: 400px) {
  .stepper__item { font-size: 10px; }
  .btn--lg { padding: 15px 20px; font-size: 15px; width: 100%; }
}
