/* ═══════════════════════════════════════════════════════════════════════
 *  entrada.css · the front door, and only the front door
 *  ─────────────────────────────────────────────────────────────────────
 *  Design and logic live in separate files here on purpose: this is the
 *  look, entrada.js is the behaviour, and neither has to be opened to
 *  change the other.
 *
 *  Every value comes from design-tokens.css. There is not a single
 *  hardcoded colour, radius or duration below — that is what makes the
 *  rest of the software able to change its skin without anybody coming
 *  back here.
 * ═══════════════════════════════════════════════════════════════════════ */

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--sp-5) var(--sp-4);
  background: var(--paper-sunk);
  color: var(--ink);
  font: var(--txt)/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.puerta { width: 100%; max-width: 380px; }

/* ── Cargando ─────────────────────────────────────────────────────────
   Tres puntos y nada más. Una barra de progreso miente —no sabe cuánto
   queda— y un logo girando pide que lo mires. Esto solo dice «sigo
   aquí», que es lo único cierto. */
.cargando {
  display: flex; gap: var(--sp-2);
  align-items: center; justify-content: center;
  min-height: 120px;
}
.cargando[hidden] { display: none; }

.punto {
  width: 7px; height: 7px; border-radius: var(--r-round);
  background: var(--cherry);
  opacity: .25;
  animation: latir 1.1s var(--ease) infinite;
}
.punto:nth-child(2) { animation-delay: .14s; }
.punto:nth-child(3) { animation-delay: .28s; }

@keyframes latir {
  0%, 70%, 100% { opacity: .25; transform: translateY(0); }
  35%           { opacity: 1;   transform: translateY(-3px); }
}
/* Sin movimiento, los puntos siguen ahí y solo cambian de opacidad:
   quitar la animación no puede dejar la pantalla sin señal de vida. */
@media (prefers-reduced-motion: reduce) {
  .punto { animation: none; opacity: .5; }
}

/* ── El formulario ──────────────────────────────────────────────────── */
.entrada {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  box-shadow: var(--lift-2);
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
}
.entrada[hidden] { display: none; }

.marca {
  margin: 0 0 var(--sp-5);
  font-size: var(--tit-s);
  font-weight: 650;
  letter-spacing: -.015em;
  color: var(--ink);
}

.campo { display: block; margin-bottom: var(--sp-4); }
.campo > span {
  display: block; margin-bottom: var(--sp-2);
  font-size: var(--txt-s); font-weight: 550; color: var(--ink-soft);
}
.campo > input {
  width: 100%;
  min-height: var(--touch);
  padding: 0 var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
  font: var(--txt-l)/1 inherit;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
/* 16px en el campo y no 14: por debajo de eso, iOS hace zoom al tocarlo
   y la pantalla se descoloca sola. */
.campo > input:focus {
  outline: none;
  border-color: var(--cherry);
  box-shadow: 0 0 0 3px var(--cherry-ring);
}

.aviso {
  margin: 0 0 var(--sp-4);
  padding: var(--sp-3);
  border-radius: var(--r);
  background: var(--cherry-soft);
  border: 1px solid var(--cherry-edge);
  color: var(--cherry-deep);
  font-size: var(--txt-s);
}
.aviso[hidden] { display: none; }

/* ── El botón flotante ────────────────────────────────────────────────
   Ancho completo y despegado del papel: es la única acción de la
   pantalla, así que no compite con nada y puede permitirse el peso. */
.flotante {
  width: 100%;
  min-height: var(--touch);
  border: 0;
  border-radius: var(--r-round);
  background: var(--cherry);
  color: #fff;
  font: 550 var(--txt-l)/1 inherit;
  cursor: pointer;
  box-shadow: var(--lift-float);
  transition: transform var(--t) var(--ease),
              background var(--t) var(--ease),
              box-shadow var(--t) var(--ease);
}
.flotante:hover  { background: var(--cherry-deep); }
.flotante:active { transform: translateY(1px); box-shadow: var(--lift-1); }
.flotante:focus-visible {
  outline: none; box-shadow: var(--lift-float), 0 0 0 3px var(--cherry-ring);
}
.flotante[disabled] { opacity: .6; cursor: default; transform: none; }

.discreto {
  display: block; margin-top: var(--sp-5); text-align: center;
  font-size: var(--txt-s); color: var(--ink-faint); text-decoration: none;
}
.discreto:hover { color: var(--ink-soft); text-decoration: underline; }

/* Para quien lee la pantalla en voz alta y no la ve. */
.sr {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
