/* Hospital San Intento · la puerta: entrar, crear cuenta y la ficha (ADR 0166).
   Viene del esbozo de landing-nueva/puerta.html. Va después de san-intento.css: a la
   izquierda la fachada con las puertas de cristal (decorado, aria-hidden), a la derecha
   la tarjeta de siempre con los mismos campos e ids que usa app.js. */

#screen-auth.door, #screen-profile.door {
  --door-grid: rgba(29, 255, 158, 0.05);
  background:
    linear-gradient(var(--door-grid) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, var(--door-grid) 1px, transparent 1px) 0 0 / 44px 44px,
    radial-gradient(60% 50% at 25% 30%, rgba(29, 255, 158, 0.08), transparent 70%),
    var(--bg);
}
/* La escena antigua del box se sustituye por la fachada. */
.door .auth-stage { display: none; }

#screen-auth.door { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); padding: 2rem clamp(16px, 4vw, 48px) 3rem; }
#screen-auth.door .auth-card { justify-self: start; }

/* ---------- Fachada ---------- */
.door-facade {
  --wall: #0f1915; --wall-2: #0b1310; --glass: #0a1a14; --glass-in: rgba(160, 255, 215, 0.10);
  position: relative; z-index: 1; width: 100%; display: grid; justify-items: center; align-content: center; justify-self: end;
}
.fa-sign {
  display: inline-flex; align-items: center; gap: 14px; padding: 12px 20px 12px 14px; border-radius: 16px;
  background: #050a08; border: 1px solid #1c3329; box-shadow: 0 0 30px rgba(29, 255, 158, 0.15);
}
.fa-cross { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: #1dff9e; }
.fa-cross svg { width: 26px; height: 26px; fill: #01140a; }
.fa-name { display: grid; line-height: 1; font-family: var(--display); font-weight: 800; color: #1dff9e; letter-spacing: 0.04em; }
.fa-name b:first-child { font-size: 13px; letter-spacing: 0.4em; color: #a9c2b7; }
.fa-name b:last-child { font-size: clamp(24px, 3vw, 34px); text-shadow: 0 0 18px rgba(29, 255, 158, 0.45); }
.fa-motto { margin: 10px 0 22px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }

.fa-front {
  width: min(100%, 520px); display: grid; justify-items: center;
  padding: 22px 22px 0; border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, var(--wall), var(--wall-2)); border: 1px solid var(--line-2); border-bottom: 0;
}
.fa-windows { width: 100%; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 20px; }
.fa-windows i { height: 34px; border-radius: 6px; background: var(--glass); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05); }
.fa-windows i:nth-child(2), .fa-windows i:nth-child(5) { background: linear-gradient(180deg, #2b5a45, var(--glass)); }
.fa-canopy {
  width: 100%; padding: 10px; border-radius: 10px 10px 4px 4px; text-align: center;
  background: #050a08; border-bottom: 3px solid #1dff9e;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; color: #1dff9e;
}
.fa-entry { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; padding: 0 6px; }
.fa-doors {
  position: relative; overflow: hidden; height: clamp(220px, 32vh, 300px);
  display: grid; grid-template-columns: 1fr 1fr;
  border: 8px solid #1b2a24; border-bottom: 0; border-radius: 6px 6px 0 0; background: #e8fff4;
}
.fa-light { position: absolute; inset: 0; background: radial-gradient(60% 80% at 50% 70%, #ffffff, #bff5dc 55%, #5fd9a3); opacity: 0.85; }
.fa-door {
  position: relative; z-index: 1; display: block; background: linear-gradient(115deg, var(--glass) 0%, #12322a 45%, var(--glass) 70%);
  box-shadow: inset 0 0 0 1px rgba(160, 255, 215, 0.12); transition: transform 1s var(--ease);
}
.fa-door::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, var(--glass-in) 42%, transparent 52%); }
.fa-door.l { border-right: 2px solid #1b2a24; }
.fa-handle { position: absolute; top: 46%; width: 4px; height: 46px; border-radius: 2px; background: #8fa79b; }
.fa-door.l .fa-handle { right: 10px; }
.fa-door.r .fa-handle { left: 10px; }
.fa-sticker {
  position: absolute; top: 30%; left: 50%; transform: translateX(-50%); font-style: normal;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: rgba(29, 255, 158, 0.55);
}
.fa-doors.open .fa-door.l { transform: translateX(-100%); }
.fa-doors.open .fa-door.r { transform: translateX(100%); }
.fa-reader {
  display: grid; gap: 8px; justify-items: center; width: 86px; padding: 12px 8px 14px; margin-bottom: 70px; border-radius: 14px;
  background: linear-gradient(170deg, #1a2420, #0b110e 70%); border: 1px solid #22332c; font-family: var(--mono);
}
.fa-led { width: 10px; height: 10px; border-radius: 50%; background: #ff8a1f; box-shadow: 0 0 10px rgba(255, 138, 31, 0.7); transition: background 0.3s, box-shadow 0.3s; }
.fa-led.ok { background: #1dff9e; box-shadow: 0 0 12px rgba(29, 255, 158, 0.8); }
.fa-screen {
  width: 100%; min-height: 44px; display: grid; place-items: center; padding: 4px; border-radius: 6px;
  background: #020403; color: #1dff9e; font-size: 9.5px; line-height: 1.3; letter-spacing: 0.08em; text-align: center;
}
.fa-slot { width: 60%; height: 6px; border-radius: 3px; background: #000; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9); }
.fa-step { width: calc(100% + 44px); height: 18px; background: linear-gradient(180deg, #2a3a33, #17221d); border-radius: 4px; }

/* ---------- Móvil: la fachada arriba, más baja; el formulario debajo ---------- */
@media (max-width: 900px) {
  #screen-auth.door { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 18px; padding-top: 1.2rem; }
  #screen-auth.door .auth-card { justify-self: center; }
  .door-facade { justify-self: center; }
  .fa-sign { padding: 8px 14px 8px 10px; gap: 10px; }
  .fa-cross { width: 36px; height: 36px; border-radius: 10px; }
  .fa-cross svg { width: 20px; height: 20px; }
  .fa-name b:first-child { font-size: 10px; }
  .fa-name b:last-child { font-size: 22px; }
  .fa-motto { margin: 8px 0 12px; font-size: 10.5px; }
  .fa-front { width: min(100%, 420px); padding: 12px 14px 0; }
  .fa-windows { display: none; }
  .fa-canopy { padding: 6px; font-size: 10px; letter-spacing: 0.14em; }
  .fa-doors { height: 110px; border-width: 6px; }
  .fa-handle { height: 30px; }
  .fa-reader { margin-bottom: 14px; width: 70px; padding: 8px 6px 10px; gap: 6px; }
  .fa-screen { min-height: 34px; font-size: 8.5px; }
  .fa-step { height: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .fa-door { transition: none; }
}

/* Las casillas de consentimiento: el texto con sus enlaces corre seguido, no en trozos. */
.door .consent .check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; }
.door .consent .check input { margin: 3px 0 0; }
.door .consent .check-text { display: block; }
