/* Sign-in: one dark card in the middle of the two lights, in the manner of a modal sign-in sheet. */
:root {
  color-scheme: dark;
  --night: #15101E;
  --dusk: #201A2C;
  --seam: #3A3149;
  --moon: #EFEAF7;
  --haze: #A89EBC;
  --dim: #7D7392;
  --sea: #6CCFB5;
  --alert: #F2A3A3;
  --ui: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --read: "Literata", Georgia, serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: #1B1127; color: var(--moon); font: 400 16px/1.5 var(--ui); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.art { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; animation: glow-in 1.6s ease-out both; }
body::after {   /* keep the middle calm and the edges deep so the card always reads */
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 46% 60% at 50% 50%, rgba(21, 16, 30, 0.55), rgba(21, 16, 30, 0) 70%),
              linear-gradient(180deg, rgba(21, 16, 30, 0.25), rgba(21, 16, 30, 0.6));
}

/* centred when it fits; on a short screen the page scrolls instead of cutting the card off */
.stage { position: relative; z-index: 2; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); }
.stage > .card { margin-top: auto; }
.stage > .foot { margin-bottom: auto; }
.card {
  width: min(420px, calc(100vw - 32px)); padding: 36px 32px 30px; border-radius: 28px; text-align: center;
  background: rgba(32, 26, 44, 0.74); border: 1px solid rgba(239, 234, 247, 0.09);
  box-shadow: 0 30px 80px rgba(6, 3, 12, 0.6), inset 0 1px 0 rgba(239, 234, 247, 0.05);
  -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2);
  animation: rise 0.7s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.mark { display: block; width: 68px; height: 68px; margin: 0 auto 14px; }
h1 { font: 500 30px/1.2 var(--read); letter-spacing: -0.005em; margin: 0 0 8px; }
.lede { color: var(--haze); margin: 0 0 26px; }

.field { position: relative; }
.field input {
  width: 100%; height: 56px; padding: 0 56px 0 22px; border-radius: 999px; font: 400 16px var(--ui); color: var(--moon);
  background: #0F0B16; border: 1px solid var(--seam); outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.field input::placeholder { color: var(--dim); }
.field input:focus { border-color: var(--sea); box-shadow: 0 0 0 4px rgba(108, 207, 181, 0.16); }
.field.bad input { border-color: var(--alert); }
.eye { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--haze); cursor: pointer; display: grid; place-items: center; }
.eye:hover { color: var(--moon); background: rgba(239, 234, 247, 0.06); }
.eye:focus-visible, .go:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }
.eye svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.eye .shut { display: none; }
.eye[aria-pressed="true"] .shut { display: inline; }

.err { min-height: 22px; margin: 10px 4px 6px; color: var(--alert); font-size: 14.5px; text-align: left; }
.err:empty { margin: 6px 0 2px; min-height: 0; }
.go {
  width: 100%; height: 56px; border: 0; border-radius: 999px; cursor: pointer; margin-top: 8px;
  background: var(--moon); color: var(--night); font: 600 17px var(--ui); transition: background 0.15s, transform 0.1s;
}
.go:hover { background: #FFFFFF; }
.go:active { transform: scale(0.99); }
.go:disabled { cursor: progress; opacity: 0.75; }
.foot { margin: 0; color: var(--dim); font-size: 13.5px; text-shadow: 0 1px 8px rgba(6, 3, 12, 0.8); animation: rise 0.7s 0.3s both; }

.shake { animation: shake 0.36s ease-in-out; }
@keyframes shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes glow-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .art, .card, .foot, .shake { animation: none; } }
@media (max-width: 480px) {
  .card { padding: 30px 22px 24px; border-radius: 24px; }
  h1 { font-size: 26px; }
}
@media (max-height: 560px) {   /* phones in landscape */
  .stage { gap: 10px; padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .card { padding: 20px 26px 18px; }
  .mark { width: 44px; height: 44px; margin-bottom: 8px; }
  h1 { font-size: 23px; margin-bottom: 4px; }
  .lede { margin-bottom: 14px; font-size: 14.5px; }
  .field input, .go { height: 48px; }
  .eye { top: 4px; }
  .foot { display: none; }
}
