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

:root {
  --morado: #510B44;
  --morado-dark: #3D0833;
  --naranja: #CC654B;
  --amarillo: #ECC545;
  --blanco: #FFFFFF;
  --gris-bg: #F7F3EF;
  --gris-texto: #2A2A2A;
  --gris-sub: #666666;
  --borde: #E8E0DA;
}

html { scroll-behavior: smooth; }
body { font-family: 'Nunito Sans', sans-serif; background: var(--gris-bg); color: var(--gris-texto); -webkit-font-smoothing: antialiased; }

/* ─── HERO ──────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 10% 4% 4% 4%; /* Pushes text below logo (10% of parent width) and aligns left edge with logo (4%) */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Stacks elements from the top down */
  align-items: flex-start; /* Left-align all children elements */
  width: 100%;
  aspect-ratio: 1920 / 900; /* Aspect ratio of hero-desktop-1920X900.webp (landscape) */
}

/* Portrait devices (mobile/tablets) - aspect ratio of hero-mobile-1080X1350.webp (1080/1350 = 4:5) */
@media (orientation: portrait) {
  .hero {
    aspect-ratio: 1080 / 1350;
    justify-content: flex-start !important; /* Pushes content to the upper half */
    padding: 18% clamp(16px, 5vw, 32px) clamp(16px, 5vw, 32px) !important; /* Top padding clears JPM Logo, sides scale fluidly */
    align-items: flex-start !important;
  }
  .hero-title {
    font-size: clamp(22px, 6.5vw, 42px) !important; /* Fluid title font size bounded between 22px and 42px */
    margin-bottom: clamp(10px, 2.5vw, 18px) !important;
    max-width: 95% !important;
  }
  .hero-sub {
    font-size: clamp(11.5px, 3.2vw, 17px) !important; /* Fluid subtitle font size bounded between 11.5px and 17px */
    margin-bottom: clamp(16px, 4vw, 28px) !important;
    line-height: 1.55 !important;
    max-width: 85% !important; /* Limit width so it wraps nicely and leaves space on the right */
  }
  .hero-cta {
    width: fit-content !important; /* Dynamic width based on text content */
    min-width: 0 !important;
    padding: clamp(11px, 2.5vw + 2px, 16px) clamp(16px, 4vw + 8px, 32px) !important; /* Fluid padding */
    font-size: clamp(11px, 3vw, 15px) !important; /* Fluid CTA font size */
    align-self: flex-start !important;
  }
}

/* Wide screen desktops (width >= 1920px) - aspect ratio of hero-4k-3849X1820.webp */
@media (min-width: 1920px) and (orientation: landscape) {
  .hero {
    aspect-ratio: 3849 / 1820;
  }
}

.hero-picture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: fill; /* Stretches the image to fill the aspect-ratio box exactly without any cropping */
}

/* Semi-transparent dark overlay to protect text readability */
/* .hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(61, 8, 51, 0.85) 0%, rgba(81, 11, 68, 0.65) 50%, rgba(204, 101, 75, 0.4) 100%);
  z-index: 1;
  pointer-events: none;
} */

/* Make sure text content sits above the image and the overlay */
.hero-logo,
.hero-eyebrow,
.hero-title,
.hero-sub,
.hero-cta,
.hero-legal {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-family: 'Rubik', sans-serif;
  font-size: 10px; font-weight: 700;
  color: var(--amarillo);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-title {
  font-family: 'Rubik', sans-serif;
  font-size: clamp(28px, 3vw, 68px); /* Fluid font size scaling with screen width on desktop */
  font-weight: 800;
  color: rgb(0, 0, 0);
  line-height: 1.2;
  margin-bottom: clamp(14px, 1.2vw, 24px);
}
.hero-title span { color: var(--naranja); }
.hero-sub {
  font-size: clamp(14px, 1.1vw, 20px); /* Fluid font size */
  color: #000;
  line-height: 1.65;
  margin-bottom: clamp(20px, 2vw, 36px);
  max-width: clamp(420px, 32vw, 750px); /* Fluid width of the text column on wide screens */
}
.hero-cta {
  display: inline-block;
  width: fit-content;
  background: var(--naranja);
  color: #fff;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: clamp(13px, 1vw, 18px); /* Fluid CTA font size */
  padding: clamp(14px, 1vw + 4px, 20px) clamp(24px, 2vw + 10px, 48px); /* Fluid button padding */
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 15px rgba(204, 101, 75, 0.3);
}
.hero-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(204, 101, 75, 0.4); }
.hero-legal {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-top: 12px;
  text-align: center;
}
.hero-logo {
  font-family: 'Rubik', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.1em;
  margin-bottom: 32px;
}

/* ─── CANDIDATO ──────────────────────────────────── */
.section { padding: 36px 24px; }
.section-title {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--morado);
  margin-bottom: 6px;
  line-height: 1.3;
}
.section-sub {
  font-size: 13.5px;
  color: var(--gris-sub);
  margin-bottom: 20px;
  line-height: 1.6;
}

.criteria-list { display: flex; flex-direction: column; gap: 10px; }
.criteria-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: white;
  border-radius: 10px;
  padding: 14px 16px;
  border-left: 3px solid var(--naranja);
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.criteria-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--naranja);
  color: white;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
  font-weight: 700;
}
.criteria-text { font-size: 14px; line-height: 1.55; color: var(--gris-texto); }
.criteria-text strong { color: var(--morado); }

/* ─── CÓMO FUNCIONA ─────────────────────────────── */
.steps { background: white; }
.step-list { display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--borde);
}
.step:last-child { border-bottom: none; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--morado);
  color: white;
  font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-content {}
.step-title { font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 14px; color: var(--morado); margin-bottom: 3px; }
.step-desc { font-size: 13px; color: var(--gris-sub); line-height: 1.55; }

/* ─── DIVIDER ──────────────────────────────────── */
.divider { height: 6px; background: linear-gradient(90deg, var(--amarillo), var(--naranja), var(--morado)); }

/* ─── FORMULARIO ──────────────────────────────── */
.form-section { background: white; padding: 0; }

.form-header {
  background: var(--morado);
  padding: 24px 24px 20px;
}
.form-header-title {
  font-family: 'Rubik', sans-serif;
  font-weight: 800; font-size: 20px;
  color: white; margin-bottom: 6px;
}
.form-header-sub { font-size: 13px; color: rgba(255,255,255,0.7); }

/* Progress bar */
.progress-wrap { padding: 0 24px; background: var(--morado); padding-bottom: 20px; }
.progress-steps { display: flex; gap: 5px; }
.progress-step {
  flex: 1; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.2);
  transition: background 0.3s;
}
.progress-step.done { background: var(--amarillo); }
.progress-step.active { background: rgba(236,197,69,0.6); }

/* Form body */
.form-body { padding: 24px; }

.form-step { display: none; }
.form-step.active { display: block; }

.form-q {
  font-family: 'Rubik', sans-serif;
  font-weight: 700; font-size: 17px;
  color: var(--morado);
  margin-bottom: 6px;
  line-height: 1.35;
}
.form-hint {
  font-size: 12px; color: var(--gris-sub);
  margin-bottom: 20px; line-height: 1.5;
}

/* Options */
.options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.option {
  display: flex; align-items: center; gap: 14px;
  background: var(--gris-bg);
  border: 2px solid var(--borde);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.option:hover { border-color: var(--naranja); background: #FFF7F3; }
.option.selected { border-color: var(--morado); background: #F8F0F6; }
.option-radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--borde);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.option.selected .option-radio { border-color: var(--morado); background: var(--morado); }
.option.selected .option-radio::after { content: ''; width: 8px; height: 8px; background: white; border-radius: 50%; }
.option-text { font-size: 14px; line-height: 1.45; color: var(--gris-texto); font-weight: 600; }
.option-sub { font-size: 11.5px; color: var(--gris-sub); font-weight: 400; margin-top: 2px; }

/* NSS input */
.nss-wrap { margin-bottom: 24px; }
.nss-example { font-size: 12px; color: var(--gris-sub); margin-bottom: 12px; line-height: 1.5; }
.nss-example strong { color: var(--morado); }
.nss-boxes { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.nss-box {
  width: 42px; height: 52px;
  background: var(--gris-bg);
  border: 2px solid var(--borde);
  border-radius: 8px;
  font-family: 'Rubik', sans-serif;
  font-weight: 700; font-size: 20px;
  text-align: center;
  color: var(--morado);
  outline: none;
}
.nss-box:focus { border-color: var(--morado); background: white; }
.nss-box.highlight { border-color: var(--naranja); background: #FFF7F3; }
.nss-sep { font-weight: 700; color: #ccc; font-size: 18px; }
.nss-label { font-size: 10px; font-weight: 700; color: var(--naranja); text-transform: uppercase; letter-spacing: 0.1em; }

/* Contact inputs */
.input-group { margin-bottom: 16px; }
.input-label { font-size: 11px; font-weight: 700; color: var(--gris-sub); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; display: block; }
.input-field {
  width: 100%;
  background: var(--gris-bg);
  border: 2px solid var(--borde);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 15px;
  color: var(--gris-texto);
  outline: none;
  transition: border-color 0.15s;
}
.input-field:focus { border-color: var(--morado); background: white; }

/* Buttons */
.btn-primary {
  display: block; width: 100%;
  background: var(--morado);
  color: white;
  font-family: 'Rubik', sans-serif;
  font-weight: 700; font-size: 15px;
  padding: 16px 24px;
  border: none; border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.btn-primary:hover { background: var(--morado-dark); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

/* Spinner loader styles */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── RESULTADO ─────────────────────────────────── */
#resultado {
  display: none;
  background: var(--gris-bg);
  padding: 40px 16px;
}

.result-card {
  max-width: 600px;
  margin: 0 auto;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(81, 11, 68, 0.05);
}

.result-header {
  padding: 30px 24px;
  text-align: center;
}
.result-badge {
  display: inline-block;
  font-family: 'Rubik', sans-serif;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.result-icon { font-size: 40px; margin-bottom: 10px; }
.result-title {
  font-family: 'Rubik', sans-serif;
  font-weight: 800;
  font-size: 22px;
  line-height: 1.3;
  margin-bottom: 10px;
}
.result-sub {
  font-size: 14px;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
}

.result-next {
  padding: 28px 24px 24px 24px;
}
.next-title {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--morado);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--borde);
  padding-bottom: 8px;
}
.next-item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.next-num { width: 28px; height: 28px; border-radius: 50%; background: var(--morado); color: white; font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.next-text { font-size: 13.5px; color: var(--gris-texto); line-height: 1.55; }

.result-footer {
  background-color: #3D0833 !important;
  padding: 24px;
  text-align: center;
  border-top: 1px solid var(--borde) !important;
}
.result-footer-text {
  font-size: 11px !important;
  color: #A08098 !important;
  line-height: 1.5 !important;
  margin-bottom: 12px;
}
.result-footer-brand {
  font-family: 'Rubik', sans-serif;
  font-weight: 800;
  font-size: 13px !important;
  color: var(--amarillo) !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ─── TRUST STRIP ────────────────────────────────── */
.trust {
  background: white;
  padding: 24px;
  border-top: 1px solid var(--borde);
}
.trust-title { font-size: 11px; font-weight: 700; color: #aaa; text-transform: uppercase; letter-spacing: 0.1em; text-align: center; margin-bottom: 16px; }
.trust-items { display: flex; flex-direction: column; gap: 10px; }
.trust-item { display: flex; align-items: flex-start; gap: 10px; }
.trust-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.trust-text { font-size: 12.5px; color: var(--gris-sub); line-height: 1.5; }

/* ─── FOOTER ─────────────────────────────────────── */
.footer {
  background: var(--morado-dark);
  padding: 24px;
  text-align: center;
}
.footer-brand { font-family: 'Rubik', sans-serif; font-weight: 800; font-size: 16px; color: white; margin-bottom: 6px; }
.footer-name { font-size: 11px; color: rgba(255,255,255,0.4); margin-bottom: 12px; }
.footer-legal { font-size: 10px; color: rgba(255,255,255,0.3); line-height: 1.6; }

/* Utility */
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; }
.text-center { text-align: center; }
