/* ESPACIO · Formulario de reclutamiento
   Identidad: azul marino + turquesa del logo. Tipografías: Barlow (títulos, cercana al logotipo) y Poppins (texto). */

@font-face { font-family: 'Barlow'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/barlow-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 800; font-style: normal; font-display: swap; src: url('/fonts/barlow-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/poppins-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/poppins-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/poppins-latin-600-normal.woff2') format('woff2'); }

:root {
  --navy-900: #07141f;
  --navy: #0a1e30;
  --navy-700: #12304a;
  --navy-500: #2b4c68;
  --teal: #04bfad;
  --teal-press: #03a898;
  --teal-ink: #037d72;
  --teal-wash: #e4f6f3;
  --mist: #edf3f4;
  --white: #ffffff;
  --ink: #0a1e30;
  --muted: #44566a;
  --placeholder: #5e7080;
  --line: #c7d5db;
  --danger: #b42318;
  --danger-wash: #fdeceb;
  --radius: 10px;
  --display: 'Barlow', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 1rem/1.6 var(--body); color: var(--ink); background: var(--mist); }
img { max-width: 100%; height: auto; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--white); color: var(--navy); padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.hero :focus-visible { outline-color: var(--teal); }

/* ───────── Estructura ───────── */
.layout { display: grid; grid-template-columns: minmax(360px, 5fr) 7fr; min-height: 100vh; }

.hero { background: var(--navy); color: var(--white); }
.hero-inner { position: sticky; top: 0; height: 100vh; min-height: 600px; display: flex; flex-direction: column; padding: clamp(24px, 4.2vh, 48px) clamp(28px, 4vw, 64px); gap: clamp(14px, 2.4vh, 28px); }
.logo { width: 220px; height: auto; flex: none; }

.hero-copy { max-width: 34rem; }
.hero h1 { margin: 0 0 clamp(10px, 1.8vh, 18px); font: 800 clamp(2rem, min(3vw, 5.4vh), 3.4rem)/1.02 var(--display); letter-spacing: -0.005em; text-wrap: balance; }
.lead { margin: 0 0 clamp(10px, 1.8vh, 18px); color: #d4e0e6; font-size: clamp(0.9rem, 1.9vh, 1rem); line-height: 1.55; }
.perks { list-style: none; margin: 0 0 clamp(10px, 1.8vh, 16px); padding: 0; display: grid; gap: clamp(6px, 1.1vh, 10px); }
.perks li { position: relative; padding-left: 26px; font-size: clamp(0.85rem, 1.8vh, 0.95rem); line-height: 1.4; color: #eef4f6; }
.perks li::before { content: ''; position: absolute; left: 3px; top: 0.42em; width: 9px; height: 9px; background: var(--teal); transform: rotate(45deg); }
.model { margin: 0; padding: 10px 14px; border-left: 3px solid var(--teal); background: rgba(255, 255, 255, 0.06); color: var(--white); font-size: 0.9rem; font-weight: 500; line-height: 1.45; }
.hero .start { display: none; margin-top: 22px; }

/* Indicador de progreso: las capas del ícono de ESPACIO */
.stack { margin-top: auto; flex: 1 1 auto; min-height: 110px; max-height: 260px; display: flex; align-items: stretch; gap: 18px; }
.stack-svg { height: 100%; width: auto; aspect-ratio: 585 / 591; flex: none; overflow: visible; }
.stack-svg .p, .mini-svg .p { transition: fill 0.5s ease; }
.stack-labels { list-style: none; margin: 0; padding: 0; position: relative; flex: 1; min-width: 0; }
.stack-labels li { position: absolute; left: 0; transform: translateY(-50%); font-size: 0.875rem; font-weight: 500; line-height: 1.2; color: rgba(255, 255, 255, 0.5); transition: color 0.4s ease; }
.stack-labels li[data-layer='4'] { top: 27%; }
.stack-labels li[data-layer='3'] { top: 52%; }
.stack-labels li[data-layer='2'] { top: 68%; }
.stack-labels li[data-layer='1'] { top: 84%; }
.stack-labels li.is-current { color: var(--white); font-weight: 600; }
.stack-labels li.is-done { color: var(--teal); }

/* estados de las capas (se usan en el ícono grande y en el chico) */
[data-layer] .p { fill: rgba(255, 255, 255, 0.14); }
[data-layer='4'] .p { fill: rgba(4, 191, 173, 0.3); }
[data-layer].is-current .p { fill: #fff; }
[data-layer='4'].is-current .p { fill: var(--teal); }
[data-layer].is-done .p { fill: var(--teal); }

.slogan { margin: 0; font: 600 1rem/1.2 var(--display); letter-spacing: 0.01em; color: rgba(255, 255, 255, 0.7); }

/* ───────── Columna del formulario ───────── */
.form-side { padding: clamp(20px, 4vh, 56px) clamp(16px, 4vw, 64px) 32px; display: flex; flex-direction: column; align-items: center; }
.card { width: 100%; max-width: 680px; background: var(--white); border-radius: 18px; padding: clamp(22px, 4vw, 44px); box-shadow: 0 1px 0 rgba(10, 30, 48, 0.05), 0 18px 40px -22px rgba(10, 30, 48, 0.28); }
.foot { width: 100%; max-width: 680px; padding: 18px 4px 0; color: var(--muted); font-size: 0.85rem; }
.foot p { margin: 0; }
.linklike { background: none; border: 0; padding: 0; color: var(--teal-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.loading { color: var(--muted); margin: 0; }
.notice { background: var(--danger-wash); color: var(--danger); padding: 12px 14px; border-radius: 8px; margin: 0 0 16px; }

.mobilebar { display: none; }

.step-head { margin-bottom: 26px; }
.step-count { margin: 0 0 6px; font-size: 0.875rem; font-weight: 600; color: var(--teal-ink); }
.step-title { margin: 0 0 6px; font: 700 clamp(1.75rem, 3.2vw, 2.4rem)/1.08 var(--display); letter-spacing: -0.005em; outline: none; }
.step-sub { margin: 0; color: var(--muted); font-size: 0.95rem; }

.callout { margin: 0 0 24px; padding: 14px 16px; border-radius: var(--radius); background: var(--teal-wash); color: var(--navy); font-size: 0.9rem; line-height: 1.5; }
.callout strong { font-weight: 600; }
.restored { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 0 22px; padding: 12px 14px; border-radius: var(--radius); background: var(--mist); font-size: 0.875rem; color: var(--muted); }

/* ───────── Campos ───────── */
.qs { display: grid; gap: 24px; }
.field { min-width: 0; border: 0; margin: 0; padding: 0; }
.label { display: block; margin: 0 0 6px; padding: 0; font-size: 0.97rem; font-weight: 500; line-height: 1.45; color: var(--ink); }
.opt-mark { color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.help { margin: 0 0 8px; font-size: 0.85rem; line-height: 1.45; color: var(--muted); }
.label + .help { margin-top: -2px; }

.input, .textarea {
  display: block; width: 100%; min-height: 50px; padding: 11px 14px;
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius);
  font-size: 1rem; line-height: 1.4; transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { min-height: 112px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--placeholder); opacity: 1; }
.input:hover, .textarea:hover { border-color: var(--navy-500); }
.input:focus, .textarea:focus { outline: none; border-color: var(--teal-ink); box-shadow: 0 0 0 3px rgba(4, 125, 114, 0.22); }
.counter { display: block; margin-top: 4px; text-align: right; font-size: 0.78rem; color: var(--muted); }

.opts { display: grid; gap: 8px; margin-top: 8px; }
.opts.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt {
  position: relative; display: flex; align-items: flex-start; gap: 12px; min-height: 52px; padding: 13px 14px;
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer;
  font-size: 0.95rem; line-height: 1.4; transition: border-color 0.15s, background-color 0.15s;
}
.opt:hover { border-color: var(--navy-500); }
.opt input { position: absolute; opacity: 0; width: 100%; height: 100%; left: 0; top: 0; margin: 0; cursor: pointer; }
.opt .mark { flex: none; width: 20px; height: 20px; margin-top: 1px; border: 2px solid #8296a3; background: var(--white); transition: background-color 0.15s, border-color 0.15s; }
.opt .mark.diamond { width: 14px; height: 14px; margin: 4px 3px 0; transform: rotate(45deg); }
.opt .mark.box { border-radius: 5px; position: relative; }
.opt .mark.box::after { content: ''; position: absolute; left: 5px; top: 1px; width: 6px; height: 11px; border: solid var(--navy); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform 0.12s; }
.opt:has(input:checked) { border-color: var(--teal-ink); background: var(--teal-wash); }
.opt input:checked ~ .mark { background: var(--teal); border-color: var(--teal-ink); }
.opt input:checked ~ .mark.box::after { transform: rotate(45deg) scale(1); }
.opt:has(input:focus-visible) { outline: 3px solid var(--navy); outline-offset: 2px; }
.opt .txt { min-width: 0; overflow-wrap: anywhere; }

.filebox { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px; border: 1.5px dashed var(--line); border-radius: var(--radius); background: #fafcfc; }
.filebox .fname { font-size: 0.9rem; color: var(--muted); overflow-wrap: anywhere; }
.filebox .fname.has { color: var(--ink); font-weight: 500; }
.filebox input[type='file'] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.filebox:has(input:focus-visible) { outline: 3px solid var(--navy); outline-offset: 2px; }

.consent { margin-top: 0; }
.consent .opt { background: #fafcfc; }

.err { display: none; margin: 8px 0 0; font-size: 0.875rem; font-weight: 500; line-height: 1.4; color: var(--danger); }
.field.has-error .err { display: block; }
.field.has-error .input, .field.has-error .textarea, .field.has-error .opt, .field.has-error .filebox { border-color: var(--danger); }
.field.has-error .opt:has(input:checked) { border-color: var(--teal-ink); }
.summary { display: none; margin: 0 0 20px; padding: 12px 14px; border-radius: var(--radius); background: var(--danger-wash); color: var(--danger); font-size: 0.92rem; font-weight: 500; }
.summary.show { display: block; }

/* ───────── Botones ───────── */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--mist); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border: 0; border-radius: var(--radius); font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color 0.15s, transform 0.05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: var(--navy); }
.btn-primary:hover { background: var(--teal-press); }
.btn-ghost { background: transparent; color: var(--navy-700); padding: 0 14px; text-decoration: underline; text-underline-offset: 4px; font-weight: 500; }
.btn-ghost:hover { color: var(--teal-ink); }
.btn-small { min-height: 42px; padding: 0 16px; font-size: 0.9rem; background: var(--white); color: var(--navy); border: 1.5px solid var(--navy-500); }
.btn-small:hover { background: var(--mist); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ───────── Pantalla final ───────── */
.done { text-align: left; }
.done h2 { margin: 0 0 12px; font: 800 clamp(2rem, 4vw, 2.8rem)/1.05 var(--display); }
.done p { margin: 0 0 14px; color: var(--muted); font-size: 1rem; }
.done .big { color: var(--ink); font-size: 1.1rem; font-weight: 500; }
.done ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.done li { position: relative; padding-left: 26px; color: var(--ink); font-size: 0.95rem; }
.done li::before { content: ''; position: absolute; left: 3px; top: 0.5em; width: 9px; height: 9px; background: var(--teal); transform: rotate(45deg); }

/* ───────── Diálogo de privacidad ───────── */
dialog { width: min(92vw, 560px); padding: 0; border: 0; border-radius: 16px; color: var(--ink); box-shadow: 0 30px 80px -20px rgba(7, 20, 31, 0.5); }
dialog::backdrop { background: rgba(7, 20, 31, 0.6); }
.privacy-box { padding: clamp(20px, 4vw, 32px); }
.privacy-box h2 { margin: 0 0 12px; font: 700 1.6rem/1.1 var(--display); }
.privacy-box p, .privacy-box li { font-size: 0.92rem; color: var(--muted); line-height: 1.55; }
.privacy-box ul { padding-left: 18px; margin: 0 0 18px; display: grid; gap: 6px; }
.privacy-box p { margin: 0 0 12px; }

/* ───────── Pantallas pequeñas ───────── */
@media (max-width: 960px) {
  .layout { display: block; }
  .hero-inner { position: static; height: auto; min-height: 0; gap: 24px; padding: 28px 22px 34px; }
  .logo { width: 190px; }
  .hero h1 { font-size: clamp(2.2rem, 9.2vw, 3rem); }
  .lead, .perks li { font-size: 0.95rem; }
  .stack, .slogan { display: none; }
  .hero .start { display: inline-flex; width: 100%; }
  .form-side { padding: 0 0 28px; align-items: stretch; }
  .card { max-width: none; border-radius: 0; box-shadow: none; padding: 24px 18px 0; }
  .foot { max-width: none; padding: 16px 18px 0; }
  .mobilebar { display: flex; position: sticky; top: 0; z-index: 20; align-items: center; gap: 12px; padding: 10px 18px; background: var(--navy); color: var(--white); }
  .mobilebar[hidden] { display: none !important; }
  .mini-svg { width: 30px; height: auto; flex: none; }
  .mobilebar-text { display: grid; line-height: 1.2; min-width: 0; }
  .mobilebar-text span:first-child { font-size: 0.75rem; color: rgba(255, 255, 255, 0.7); }
  .mobilebar-text span:last-child { font-size: 0.95rem; font-weight: 600; }
  .nav { position: sticky; bottom: 0; margin: 28px -18px 0; padding: 14px 18px; background: var(--white); border-top: 1px solid var(--line); z-index: 10; }
  .nav .btn-primary { flex: 1; }
}

@media (max-width: 520px) {
  .opts.grid { grid-template-columns: 1fr; }
  .step-title { font-size: 1.85rem; }
}

@media (max-height: 760px) and (min-width: 961px) {
  .lead { display: none; }
}

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

/* Campo trampa para bots: fuera de pantalla, nunca visible para personas */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.card { scroll-margin-top: 0; }
@media (max-width: 960px) { .card { scroll-margin-top: 56px; } }

.consent .help { margin: 10px 0 0; }
