/* The staff front door: signing in, the second factor, a forgotten password.
 *
 * Loaded after console.css, whose fonts and form controls it keeps. Dark,
 * because the first person through it most nights is an operator starting a
 * shift in a dim room. The form sits in a camera's viewfinder: corner marks,
 * a faint calibration grid, a slow sweep behind it. The sweep stops for
 * anybody who asked for less motion. Nothing here needs a script: the
 * policy allows no inline one and this page must not need one.
 *
 * Built 2 Oct 2026 (John: the sign-in pages were "very bland").
 */

:root {
  --door-bg: #07090c;
  --door-grid: rgba(154, 164, 175, .055);
  --door-mark: #4a9eff;
  --door-surface: #ff5a52;
}
.door.configure { --door-mark: #3fc1b5; --door-surface: #3fc1b5; }

body.door, body.centred {
  background-color: var(--door-bg);
  background-image:
    radial-gradient(900px 560px at 70% 50%, rgba(74, 158, 255, .10), transparent 70%),
    linear-gradient(var(--door-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--door-grid) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
  background-position: center, -1px -1px, -1px -1px;
  min-height: 100vh; min-height: 100dvh;
  overflow-x: hidden;
}
.door.configure { background-image:
    radial-gradient(900px 560px at 70% 50%, rgba(63, 193, 181, .09), transparent 70%),
    linear-gradient(var(--door-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--door-grid) 1px, transparent 1px); }

/* The sweep: one slow turn of light from behind the form. */
body.door::before {
  content: ""; position: fixed; z-index: 0; pointer-events: none;
  width: 1400px; height: 1400px; left: calc(72% - 700px); top: calc(50% - 700px);
  background: conic-gradient(from 0deg, transparent 0deg, color-mix(in srgb, var(--door-mark) 16%, transparent) 38deg, transparent 40deg 360deg);
  border-radius: 50%;
  mask-image: radial-gradient(circle, #000 0 30%, transparent 68%);
  animation: door-sweep 14s linear infinite;
}
@keyframes door-sweep { to { transform: rotate(360deg); } }

/* ---------- the two sign-in pages ---------- */

.door-wrap {
  position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 420px);
  align-items: center; gap: clamp(32px, 7vw, 110px);
  max-width: 1180px; margin: 0 auto; padding: 40px clamp(20px, 5vw, 56px);
}
.door-brand { display: flex; flex-direction: column; gap: 18px; min-width: 0; animation: door-rise .6s ease-out both; }
.door-tag {
  display: inline-flex; align-items: center; gap: 10px; width: max-content; max-width: 100%;
  font: 700 11.5px var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--dim);
}
.door-tag::before { content: ""; width: 26px; height: 2px; background: var(--door-mark); }
.door-word {
  margin: 0; font: 800 clamp(64px, 10vw, 132px)/.86 var(--display); letter-spacing: -.005em; color: var(--text);
}
.door-word span { display: block; font-size: .36em; line-height: 1.1; letter-spacing: .14em; text-transform: uppercase; color: var(--door-surface); font-weight: 700; margin-top: 10px; }
.door-lede { max-width: 44ch; font-size: 15.5px; line-height: 1.55; color: var(--dim); }
.door-osd {
  display: flex; gap: 18px; flex-wrap: wrap; font: 600 12px var(--mono); color: var(--faint); letter-spacing: .04em;
  padding-top: 16px; border-top: 1px solid var(--line); max-width: 44ch;
}
.door-osd b { color: var(--dim); font-weight: 600; }

/* The viewfinder: four corner marks drawn as backgrounds, around the card. */
.viewfinder {
  --len: 22px; --w: 2px; --c: var(--door-mark);
  position: relative; padding: 12px; min-width: 0;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--len) var(--w),
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--len),
    linear-gradient(var(--c), var(--c)) top right / var(--len) var(--w),
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--len),
    linear-gradient(var(--c), var(--c)) bottom left / var(--len) var(--w),
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--len),
    linear-gradient(var(--c), var(--c)) bottom right / var(--len) var(--w),
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--len);
  background-repeat: no-repeat;
  animation: door-rise .6s .08s ease-out both;
}
.door-card {
  display: flex; flex-direction: column; gap: 4px; margin: 0;
  padding: 28px 28px 24px; border-radius: 4px;
  background: rgba(18, 22, 27, .82); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
}
.door-card h2 { margin: 0 0 6px; font: 700 26px/1.1 var(--display); letter-spacing: .02em; text-transform: none; color: var(--text); }
.door-card .sub { color: var(--dim); font-size: 13.5px; margin: 0 0 8px; }
.door-card label { margin: 14px 0 6px; font-size: 11px; color: var(--dim); }
.door-card input[type=text], .door-card input[type=password], .door-card input[type=email] {
  height: 46px; padding: 0 14px; font-size: 15px; border-radius: 4px; background: #0b0e12; border-color: var(--line-2);
}
.door-card input:focus { outline-color: var(--door-mark); border-color: var(--door-mark); }
.door-card .go {
  margin-top: 22px; height: 48px; width: 100%; justify-content: center; font-size: 15px; letter-spacing: .02em;
  background: var(--door-mark); border-color: var(--door-mark); color: #04121f;
}
.door-card .go:hover { filter: brightness(1.08); background: var(--door-mark); }
.door-card .go::after { content: "\2192"; font-size: 17px; transition: transform .15s; }
.door-card .go:hover::after { transform: translateX(3px); }
.door-card .notice, .door-card .error { padding: 10px 12px; border-radius: 4px; font-size: 13.5px; margin: 4px 0 0; }
.door-card .notice { background: var(--warn-bg); color: var(--warn); }
.door-card .error { background: var(--urgent-bg); color: var(--urgent); }
.door-links { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; }
.door-links a { color: var(--dim); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.door-links a:hover { color: var(--text); border-color: var(--dim); }

@keyframes door-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .door-wrap { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 28px; padding-top: 28px; }
  .door-brand { gap: 12px; }
  .door-word { font-size: clamp(48px, 15vw, 76px); }
  .door-lede, .door-osd { display: none; }
  body.door::before { left: calc(50% - 700px); top: calc(62% - 700px); }
}

/* ---------- every other door page: the second factor, a lost password ---------- */

body.centred > .card, body.centred > form.card {
  position: relative; z-index: 1;
  background: rgba(18, 22, 27, .86); border-radius: 4px; padding: 26px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px var(--line);
  border: 0; border-top: 2px solid var(--door-mark);
}
body.centred .card input[type=text], body.centred .card input[type=password], body.centred .card input[type=email] { height: 44px; font-size: 15px; }
body.centred .card button.primary { height: 44px; }

@media (prefers-reduced-motion: reduce) {
  body.door::before, .door-brand, .viewfinder { animation: none; }
  .door-card .go::after { transition: none; }
}

/* The button after a code box: breathing room above it, not flush to the box. */
body.centred .card p:has(> button.full, > .btn.full) { margin-top: 20px; }
/* The small forms under the card (email me codes, send another, sign out):
   as wide as the card, centered, the button clear of the words above it. */
body.centred > form.aside { position: relative; z-index: 1; width: 440px; max-width: 100%; text-align: center; }
body.centred > form.aside p { margin: 0 0 10px; line-height: 1.5; }
