/* FETRI · landing de registro */
:root {
  --asfalto: #14181f;
  --asfalto-2: #1d232c;
  --blanco: #ffffff;
  --pista: #f3f4f6;
  --linea: #e5e7eb;
  --rojo: #d8232a;
  --rojo-oscuro: #b21b21;
  --ambar: #f2a900;
  --agua: #1e88e5;
  --tinta: #1f2937;
  --tinta-2: #4b5563;
  --mudo: #6b7280;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 20px;
  --ring: 0 0 0 4px rgba(20, 24, 31, 0.12);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--tinta);
  background: var(--asfalto);
  -webkit-font-smoothing: antialiased;
  /* La página ocupa al menos la pantalla: el pie queda abajo sin scroll sobrante */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; }
input, select { font: inherit; color: inherit; }

/* Cabecera */
.site-head {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1160px;
  margin: 0 auto;
  padding: 22px 24px;
}
.site-logo img { height: 44px; width: auto; }
.lang-switch {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
.lang-switch:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* Hero */
.hero { position: relative; flex: 1; }
.hero-bg {
  position: absolute;
  inset: 0;
  height: auto;
  background:
    radial-gradient(60% 50% at 8% 100%, rgba(216, 35, 42, 0.35), transparent 70%),
    radial-gradient(40% 40% at 90% 0%, rgba(30, 136, 229, 0.18), transparent 70%),
    repeating-linear-gradient(115deg, transparent 0 46px, rgba(255, 255, 255, 0.035) 46px 48px),
    linear-gradient(180deg, var(--asfalto-2), var(--asfalto));
  overflow: hidden;
}
.hero-bg::after {
  /* Línea de meta: banda a cuadros muy sutil al pie del asfalto */
  display: none;
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 10px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0 10px, transparent 10px 20px),
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(255,255,255,.12) 10px 20px);
  background-size: 20px 5px, 20px 5px;
  background-position: 0 0, 0 5px;
  background-repeat: repeat-x;
  opacity: .5;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1160px;
  margin: 0 auto;
  padding: 128px 24px 96px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 520px);
  gap: 56px;
  align-items: start;
}
.hero-copy { color: #fff; padding-top: 24px; }
@media (min-width: 961px) {
  /* El titular acompaña al formulario mientras se hace scroll */
  .hero-copy { position: sticky; top: 124px; align-self: start; }
}
.eyebrow {
  margin: 0 0 18px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ambar);
}
.hero h1 {
  margin: 0 0 22px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(54px, 7.2vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.hero h1 .accent { font-style: normal; color: var(--rojo); }
.lead {
  margin: 0 0 32px;
  max-width: 44ch;
  font-size: 19px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.76);
}

/* Tarjeta del formulario */
.card {
  position: relative;
  background: var(--blanco);
  border-radius: var(--radius);
  border: 1px solid rgba(20, 24, 31, 0.06);
  box-shadow: 0 30px 80px -30px rgba(20, 24, 31, 0.55), 0 8px 24px -12px rgba(20, 24, 31, 0.3);
  padding: 30px 30px 28px;
  animation: card-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.card-title {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 34px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.card-note { margin: 0 0 22px; color: var(--mudo); font-size: 15px; }


fieldset {
  border: 0;
  margin: 0 0 10px;
  padding: 0;
  min-width: 0;
}
legend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tinta-2);
}
fieldset.complete legend { color: var(--tinta); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > span { font-weight: 600; font-size: 14px; color: var(--tinta-2); }
.field-age { max-width: 160px; }
.field input, .field select {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1.5px solid var(--linea);
  border-radius: 12px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.field input::placeholder { color: #9ca3af; }
.field input:focus, .field select:focus, .field input:focus-visible { border-color: var(--asfalto); box-shadow: var(--ring); }
.field.invalid input, .field.invalid select { border-color: var(--rojo); }
.field.invalid input:focus, .field.invalid select:focus { box-shadow: 0 0 0 4px rgba(216, 35, 42, 0.14); }
.field.valid input, .field.valid select { border-color: #a7b0bd; }
.err { display: none; color: var(--rojo); font-size: 13px; font-weight: 500; }
.field.invalid .err, .err.show { display: block; }
input[type='number'] { -moz-appearance: textfield; }
input[type='number']::-webkit-inner-spin-button, input[type='number']::-webkit-outer-spin-button { -webkit-appearance: none; }

.phone { display: grid; grid-template-columns: minmax(118px, auto) 1fr; gap: 10px; }
.phone input { min-width: 0; }
.flag { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); flex: none; }

/* Desplegable de países con buscador */
.fs { position: relative; }
.fs .fs-native { position: absolute; opacity: 0; pointer-events: none; width: 100%; height: 100%; left: 0; top: 0; }
.fs-button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: 50px; padding: 0 12px 0 14px;
  border: 1.5px solid var(--linea); border-radius: 12px; background: #fff;
  text-align: left; cursor: pointer; color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.fs-button:hover { border-color: #cbd2dc; }
.fs-button[aria-expanded='true'], .fs-button:focus-visible { outline: none; border-color: var(--asfalto); box-shadow: var(--ring); }
.fs-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-dial .fs-text { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.fs-caret { width: 9px; height: 9px; margin-left: auto; border-right: 2px solid #6b7280; border-bottom: 2px solid #6b7280; transform: rotate(45deg) translate(-2px, -2px); flex: none; transition: transform .2s; }
.fs-button[aria-expanded='true'] .fs-caret { transform: rotate(225deg) translate(-3px, -3px); }
.field.invalid .fs-button { border-color: var(--rojo); }

.fs-panel {
  /* Anclado al propio campo: mismo ancho, flotando por encima y sin afectar al resto */
  position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; right: 0; width: auto;
  contain: layout paint;
  background: #fff; border: 1px solid var(--linea); border-radius: 16px;
  box-shadow: 0 30px 70px -28px rgba(20, 24, 31, .5), 0 6px 16px -8px rgba(20, 24, 31, .22);
  padding: 10px; display: flex; flex-direction: column; max-height: min(400px, 65vh);
  animation: fs-in .16s ease-out;
}
@keyframes fs-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.fs-search {
  height: 46px; padding: 0 14px 0 42px; width: 100%; font-size: 16px;
  border: 1.5px solid var(--linea); border-radius: 12px; outline: none; background: #f8f9fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat left 14px center;
  transition: border-color .15s, background-color .15s;
}
.fs-search::placeholder { color: #9ca3af; }
.fs-search:focus { border-color: var(--asfalto); background-color: #fff; }
.fs-list { list-style: none; margin: 8px 0 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.fs-list::-webkit-scrollbar { width: 8px; }
.fs-list::-webkit-scrollbar-thumb { background: #d9dde4; border-radius: 8px; border: 2px solid #fff; }
.fs-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; cursor: pointer; font-size: 15.5px; line-height: 1.2; }
.fs-item .flag { width: 24px; height: 18px; }
.fs-item.is-active { background: var(--pista); }
.fs-item[aria-selected='true'] { font-weight: 600; }
.fs-item[aria-selected='true']::after { content: '✓'; margin-left: auto; color: var(--rojo); font-weight: 700; }
.fs-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-dialcode { margin-left: auto; color: var(--mudo); font-variant-numeric: tabular-nums; font-weight: 500; }
.fs-item[aria-selected='true'] .fs-dialcode + * { margin-left: 0; }
.fs-empty { margin: 14px 12px; color: var(--mudo); font-size: 14.5px; text-align: center; }
/* El campo del prefijo es estrecho: su panel necesita más ancho, anclado a la izquierda */
.fs-dial .fs-panel { right: auto; width: 300px; max-width: calc(100vw - 40px); }
.fs-up .fs-panel { top: auto; bottom: calc(100% + 8px); animation: fs-in-up .16s ease-out; }
@keyframes fs-in-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.flag-any { display: inline-block; width: 20px; height: 15px; border-radius: 2px; background: repeating-linear-gradient(45deg, #e5e7eb 0 4px, #f3f4f6 4px 8px); }

.hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  margin: 10px 0 18px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--tinta-2);
  cursor: pointer;
}
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--rojo); }
.consent a { color: var(--tinta); font-weight: 600; }

.btn-go {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 58px;
  border: 0;
  border-radius: 999px;
  background: var(--asfalto);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, transform 0.15s;
}
.btn-go:hover { background: var(--rojo); }
.btn-go:active { transform: scale(0.99); }
.btn-go:focus-visible { outline: 3px solid var(--ambar); outline-offset: 3px; }
.btn-go .btn-arrow { transition: transform 0.25s; font-family: var(--body); font-weight: 600; }
.btn-go:hover .btn-arrow { transform: translateX(6px); }
.card.ready .btn-go { background: var(--rojo); box-shadow: 0 10px 30px -10px rgba(216, 35, 42, 0.7); }
.card.ready .btn-go:hover { background: var(--rojo-oscuro); }
.btn-go[disabled] { opacity: 0.6; cursor: progress; }
.form-error { margin: 12px 0 0; color: var(--rojo); font-weight: 500; text-align: center; }
.alert { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: #fdecec; color: #9b1c1c; font-weight: 500; }

/* Estado "revisa tu correo" */
.done { text-align: center; padding: 18px 6px 6px; }
.done-icon {
  width: 72px; height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 30px;
  background: var(--pista);
  color: var(--tinta);
  animation: pop 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.done-icon.ok { background: #e8f7ee; color: #15803d; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.done p { color: var(--tinta-2); max-width: 40ch; margin: 8px auto 20px; }
.done-actions { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 22px;
  border: 1.5px solid var(--asfalto);
  border-radius: 999px;
  background: #fff;
  color: var(--asfalto);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-ghost:hover { background: var(--asfalto); color: #fff; }
.btn-ghost[disabled] { opacity: 0.5; cursor: default; }
.btn-link { background: none; border: 0; color: var(--mudo); text-decoration: underline; cursor: pointer; padding: 6px; }
.card-center { max-width: 560px; margin: 0 auto; }
/* Confirmación y avisos: mismo fondo que el formulario, ocupando toda la pantalla */
.hero-simple { display: flex; flex-direction: column; }
.hero-simple .hero-inner { grid-template-columns: 1fr; flex: 1; display: grid; align-content: center; padding: 120px 24px 56px; }


/* Pie */
.site-foot {
  position: relative;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1160px; margin: 0 auto; padding: 4px 24px 32px;
  color: rgba(255, 255, 255, 0.45); font-size: 13px;
}
.site-foot a { color: rgba(255, 255, 255, 0.7); }

/* Responsive */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; padding: 104px 20px 64px; }
  .hero-copy { padding-top: 0; }
  .hero h1 { font-size: clamp(46px, 12vw, 84px); }
  .lead { font-size: 17px; }
}
@media (max-width: 560px) {
  .site-head { padding: 16px; }
  .site-logo img { height: 36px; }
  .card { padding: 26px 18px 22px; border-radius: 16px; }
  .grid2 { grid-template-columns: 1fr; gap: 0; }
  .field-age { max-width: 100%; }
  .card-title { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
