/* =========================================================
   Página de inscripción · Mídete 6K
   Se apoya en los tokens y componentes de styles.css.
   ========================================================= */

.reg-hero { padding: calc(var(--header-h) + clamp(30px, 5vw, 60px)) 0 clamp(20px, 3vw, 34px); }
.reg-hero__in, .reg-wrap { max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.reg-hero h1 { font-size: clamp(2.1rem, 1.2rem + 3.6vw, 4rem); max-width: 18ch; }
.reg-hero .lead { max-width: 60ch; }
.reg-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; padding: 0; }
.reg-facts li { padding: 9px 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: 0.9375rem; font-weight: 600; }
.reg-facts li b { color: var(--white); }

.reg-wrap { display: grid; gap: 28px; padding-bottom: clamp(64px, 9vw, 110px); }

/* ---------- Pasos (kilómetros) ---------- */
.stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; padding: 0; counter-reset: st; }
.stepper li { position: relative; padding-top: 14px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); opacity: 0.7; }
.stepper li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; border-radius: 5px; background: var(--line-strong); }
.stepper li span { display: block; margin-top: 2px; font-size: 0.8125rem; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--white); }
.stepper li.done, .stepper li.cur { opacity: 1; }
.stepper li.done::before, .stepper li.cur::before { background: var(--red); box-shadow: 0 0 10px rgba(210, 52, 41, 0.7); }
.stepper li.cur::before { animation: stepbeat 1.6s ease-in-out infinite; }
@keyframes stepbeat { 50% { opacity: 0.55; } }

/* ---------- Panel del formulario ---------- */
.panel { padding: clamp(20px, 3.6vw, 40px); border: 1px solid var(--line-strong); border-radius: calc(var(--radius) + 6px); background: rgba(13, 24, 68, 0.86); }
.step { min-width: 0; margin: 0; padding: 0; border: 0; }
.step:not(.is-current) { display: none; }
.step > legend { float: left; width: 100%; padding: 0; margin: 0 0 6px; font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2.1rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.step > legend + * { clear: both; }
.step__hint { margin: 0 0 24px; color: var(--gray); font-size: 0.9375rem; }
.grid2 { display: grid; gap: 20px; margin-bottom: 20px; }
.field { display: grid; gap: 8px; align-content: start; min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
.grid2 > .field { margin-bottom: 0; }
.grid2--tight { grid-template-columns: 1fr 1fr; gap: 12px; }
.field[hidden] { display: none; }
.linklike2 { color: var(--white); }
.field > label, .field > legend { padding: 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.35; }
.field > legend { margin-bottom: 8px; }
.req { color: var(--gray); }
.help { margin: 0; font-size: 0.8125rem; color: var(--gray); line-height: 1.4; }

.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field input[type="date"], .field select {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 2px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(19, 25, 57, 0.92);
  color: var(--white);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, background-color 0.2s;
}
.field select { cursor: pointer; padding-right: 12px; }
.field select option { background: var(--navy); color: var(--white); }
.field input::placeholder { color: rgba(214, 217, 229, 0.55); }
.field input:hover, .field select:hover { border-color: rgba(214, 217, 229, 0.55); }
.field input:focus-visible, .field select:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; border-color: var(--white); }
.field input[type="date"] { min-width: 0; }

/* Opciones tipo píldora (radios) */
.opts { display: flex; flex-wrap: wrap; gap: 10px; }
.opt { position: relative; display: inline-flex; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.opt span {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 20px;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(19, 25, 57, 0.92);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.opt:hover span { border-color: rgba(214, 217, 229, 0.7); }
.opt input:checked + span { background: var(--white); border-color: var(--white); color: var(--navy); }
.opt input:focus-visible + span { outline: 3px solid var(--white); outline-offset: 3px; }
.opts--stack { flex-direction: column; align-items: stretch; }
.opts--stack .opt, .opts--stack .opt span { width: 100%; }
.opts--stack .opt span { border-radius: 16px; }
.other-box { margin-top: 10px; }
.other-box[hidden] { display: none; }

/* Mensajes de error (blanco sobre rojo: contraste AA) */
.msg { display: none; align-items: flex-start; gap: 8px; margin: 0; padding: 8px 12px; border-radius: 10px; background: rgba(210, 52, 41, 0.28); border: 1px solid var(--red); font-size: 0.875rem; font-weight: 500; line-height: 1.35; }
.msg::before { content: "!"; flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--red); font-size: 0.75rem; font-weight: 800; }
.field.err .msg { display: flex; }
.field.err input, .field.err select { border-color: var(--red); }
.field.err .opt span { border-color: rgba(210, 52, 41, 0.9); }
.errsum { margin: 0 0 22px; padding: 14px 18px; border: 2px solid var(--red); border-radius: 14px; background: rgba(210, 52, 41, 0.2); font-weight: 600; }
.errsum[hidden] { display: none; }
.errsum a { color: var(--white); }

.consent { display: flex; gap: 14px; align-items: flex-start; margin: 4px 0 0; padding: 16px; border: 2px solid var(--line-strong); border-radius: 16px; background: rgba(24, 42, 87, 0.6); cursor: pointer; }
.consent input { flex: none; width: 26px; height: 26px; margin: 2px 0 0; accent-color: var(--red); cursor: pointer; }
.consent span { font-size: 0.9375rem; line-height: 1.5; }
.consent a { color: var(--white); text-underline-offset: 3px; }
.field.err .consent { border-color: var(--red); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.nav-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 30px; }
.nav-row .btn { flex: 1 1 200px; }
.nav-row .btn--ghost { flex: 0 1 auto; min-width: 140px; }
.nav-row [hidden] { display: none; }
.btn[disabled] { opacity: 0.65; cursor: wait; transform: none; }
.send-note { margin: 14px 0 0; font-size: 0.8125rem; color: var(--gray); text-align: center; }
.send-note a { color: var(--white); }
.fail { margin: 18px 0 0; padding: 16px 18px; border: 2px solid var(--red); border-radius: 14px; background: rgba(210, 52, 41, 0.2); font-size: 0.9375rem; }
.fail[hidden] { display: none; }
.fail a { color: var(--white); font-weight: 600; }

/* ---------- Pantalla final: pago ---------- */
.done { text-align: center; }
.done[hidden] { display: none; }
.done__ok { display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 20px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 10px rgba(210, 52, 41, 0.2), 0 20px 50px -16px rgba(210, 52, 41, 0.9); }
.done__ok svg { width: 44px; height: 44px; fill: none; stroke: var(--white); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.done:not([hidden]) .done__ok svg { animation: tick 0.7s 0.2s ease-out forwards; }
@keyframes tick { to { stroke-dashoffset: 0; } }
.done h2 { font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3rem); margin-bottom: 14px; }
.done h2:focus { outline: none; }
.done p { max-width: 54ch; margin-inline: auto; color: var(--gray); }
.done p strong { color: var(--white); }
.done .btn { width: min(100%, 460px); margin-top: 10px; }
.done .btn--lg { min-height: 68px; }
.done__sub { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; margin-top: 26px; font-size: 0.9375rem; }
.done__sub a, .done__sub button { color: var(--white); }
.linklike2 { padding: 0; border: 0; background: none; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pay-steps { display: grid; gap: 10px; max-width: 460px; margin: 22px auto 24px; padding: 0; text-align: left; counter-reset: p; }
.pay-steps li { position: relative; padding: 4px 0 4px 44px; counter-increment: p; color: var(--gray); font-size: 0.9375rem; }
.pay-steps li::before { content: counter(p); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-solid); border: 1px solid var(--line-strong); font-weight: 700; font-size: 0.8125rem; color: var(--white); }
.pay-steps b { color: var(--white); }

/* ---------- Lateral ---------- */
.reg-aside { display: grid; gap: 16px; align-content: start; }
.ticket { padding: clamp(20px, 3vw, 28px); border-radius: var(--radius); background: linear-gradient(160deg, rgba(210, 52, 41, 0.95), #a9261d); border: 1px solid rgba(255, 255, 255, 0.25); }
.ticket__price { display: block; font-size: clamp(4.2rem, 3rem + 5vw, 6rem); font-weight: 800; line-height: 0.9; letter-spacing: -0.05em; }
.ticket__price small { display: block; margin-top: 10px; font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.ticket ul { margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.ticket li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9375rem; font-weight: 500; }
.ticket li::before { content: "\2713"; flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: var(--white); color: #a9261d; font-size: 0.75rem; font-weight: 800; line-height: 1; }
.aside-card { padding: clamp(18px, 2.6vw, 24px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.aside-card h2 { font-size: 1.0625rem; letter-spacing: -0.01em; margin-bottom: 8px; }
.aside-card p { margin: 0; font-size: 0.9375rem; color: var(--gray); }
.aside-card p + p { margin-top: 10px; }
.aside-card a { color: var(--white); text-underline-offset: 3px; }
.cd-mini { display: flex; align-items: center; gap: 10px; font-size: 0.9375rem; color: var(--gray); }
.cd-mini .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: beat 1s ease-in-out infinite; flex: none; }
.cd-mini b { color: var(--white); font-variant-numeric: tabular-nums; }
.closed-note { margin: 0 0 20px; padding: 14px 18px; border: 2px solid var(--line-strong); border-radius: 14px; background: var(--surface); font-size: 0.9375rem; }
.closed-note[hidden] { display: none; }

@media (min-width: 640px) {
  .grid2 { grid-template-columns: 1fr 1fr; }
  .opts--stack { flex-direction: row; flex-wrap: wrap; }
  .opts--stack .opt, .opts--stack .opt span { width: auto; }
  .opts--stack .opt span { border-radius: 999px; }
}
@media (min-width: 960px) {
  .reg-wrap { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .reg-aside { position: sticky; top: calc(var(--header-h) + 24px); }
}
@media (max-width: 559px) {
  .stepper li { font-size: 0.6875rem; letter-spacing: 0.06em; }
  .stepper li span { font-size: 0.75rem; }
  .nav-row .btn--ghost { order: 2; flex: 1 1 100%; }
  main { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .done__ok svg { stroke-dashoffset: 0; animation: none; }
  .stepper li.cur::before { animation: none; }
}
@media print { .reg-aside, .nav-row { display: none !important; } }
