@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/unbounded-800.woff2") format("woff2");
}

@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("/assets/geologica.woff2") format("woff2");
}

:root {
  --cobalto: #1F4BFF;
  --cobalto-profundo: #0A1A6B;
  --cielo: #CFE0FF;
  --tinta: #0B1020;
  --lima: #D7F26B;
  --blanco: #FFFFFF;
  --margen: 20px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Geologica", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.55;
  color: var(--blanco);
  background-color: var(--cobalto);
  background-image: url("/assets/fondo-movil.webp");
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  -webkit-font-smoothing: antialiased;
}

/* Grano fino por encima del degradado */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

.pagina {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 1280px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) var(--margen) max(20px, env(safe-area-inset-bottom));
}

/* Cabecera */

.cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-family: "Unbounded", system-ui, sans-serif;
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: var(--blanco);
  text-decoration: none;
}

.logo span {
  color: var(--lima);
}

.estado {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 500;
  color: var(--blanco);
}

/* Conmutador de idioma */

.idiomas {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(11, 16, 32, 0.28);
}

.idiomas a {
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: var(--blanco);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.idiomas a:hover {
  background: rgba(255, 255, 255, 0.16);
}

.idiomas a[aria-current="page"] {
  color: var(--tinta);
  background: var(--blanco);
}

.idiomas a:focus-visible {
  outline: 3px solid var(--lima);
  outline-offset: 2px;
}

/* Contenido */

.contenido {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  padding: 28px 0 20px;
}

h1 {
  margin: 0;
  font-family: "Unbounded", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(27px, 7.6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 em {
  font-style: normal;
  color: var(--lima);
}

.apoyo {
  margin: 18px 0 0;
  max-width: 34em;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.5;
  text-wrap: pretty;
}

/* Lista de espera */

.espera {
  width: 100%;
  max-width: 440px;
}

.espera-cabecera {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-left: 4px;
}

.espera h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.iman {
  flex: none;
  width: 76px;
  height: 76px;
  margin: 0 10px -14px 0;
  transform: rotate(8deg);
  position: relative;
  z-index: 1;
}

form {
  display: grid;
  gap: 10px;
}

.campo {
  width: 100%;
  height: 56px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 17px;
  color: var(--tinta);
  background: var(--blanco);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.campo::placeholder {
  color: #5A6690;
  opacity: 1;
}

.campo:focus-visible {
  border-color: var(--lima);
  box-shadow: 0 0 0 3px rgba(11, 16, 32, 0.35);
}

.consentimiento {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 6px 4px 4px;
  font-size: 16px;
  line-height: 1.4;
  cursor: pointer;
}

.consentimiento input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 2px solid var(--blanco);
  border-radius: 8px;
  background: transparent center / 16px no-repeat;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.consentimiento input:checked {
  border-color: var(--lima);
  background-color: var(--lima);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B1020' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.consentimiento input:focus-visible {
  outline: 3px solid var(--lima);
  outline-offset: 3px;
}

.boton {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  height: 56px;
  padding: 0 8px 0 26px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--blanco);
  background: var(--tinta);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.boton-flecha {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--tinta);
  background: var(--lima);
  transition: transform 0.2s ease;
}

.boton:hover .boton-flecha {
  transform: rotate(45deg);
}

.boton:active {
  transform: scale(0.985);
}

.boton:focus-visible {
  outline: 3px solid var(--lima);
  outline-offset: 3px;
}

.boton[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.aviso {
  margin: 0;
  padding: 0 4px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

.aviso:empty {
  display: none;
}

.privacidad {
  margin: 4px 4px 0;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
  text-wrap: pretty;
}

.privacidad a,
.vuelta {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Estado de confirmación */

.confirmacion:focus {
  outline: none;
}

.confirmacion h2 {
  margin: 0 0 8px;
  font-family: "Unbounded", system-ui, sans-serif;
  font-weight: 800;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.confirmacion p {
  margin: 0;
  font-weight: 300;
}

.confirmacion .iman {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 0 16px -8px;
}

/* Pie */

.pie {
  font-size: 16px;
  font-weight: 300;
}

/* Utilidades */

.oculto {
  display: none;
}

.solo-lector {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Escritorio */

@media (min-width: 900px) {
  :root {
    --margen: 48px;
  }

  body {
    background-image: url("/assets/fondo-1920.webp");
  }

  .pagina {
    padding-top: 36px;
    padding-bottom: 32px;
  }

  .logo {
    font-size: 30px;
  }

  .contenido {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 72px;
    padding: 48px 0;
  }

  .mensaje {
    flex: 1;
    max-width: 700px;
  }

  h1 {
    font-size: clamp(40px, 4.1vw, 58px);
    line-height: 1.08;
  }

  .apoyo {
    margin-top: 28px;
    font-size: 21px;
  }

  .espera {
    flex: none;
    width: 400px;
  }

  .iman {
    width: 96px;
    height: 96px;
    margin-bottom: -18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
