/* The login page: the deck's entry screen (THE ENTRY SCREEN block in index.html), same values.
   The content sits on a 1280x720 stage scaled to the window exactly as the deck's stage is, so the
   mark, field and type are the same size here as on the loading screen that follows. */
:root{
  --ease:cubic-bezier(.66,0,.24,1);
  --ff-body:"Figtree",system-ui,sans-serif;
  --ff-disp:"Poppins","Figtree",system-ui,sans-serif;
  --ff-num:"Poppins","Figtree",system-ui,sans-serif;
  --fit:1;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:#050b07;color:#fff;overflow:hidden;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
.gate{position:fixed;inset:0;overflow:hidden}
.gate-bg{position:absolute;inset:-3%;background:#07110b url("/_p/img/login-background.webp") 50% 58%/cover no-repeat;
  filter:brightness(.92) saturate(.94) contrast(1.05);transform-origin:38% 40%;
  animation:gate-drift 46s ease-in-out infinite alternate}
@keyframes gate-drift{from{transform:scale(1.02)}to{transform:scale(1.09) translate(-1%,-.6%)}}
.gate-scrim{position:absolute;inset:0;
  background:
    radial-gradient(32% 34% at 50% 50%,rgba(3,10,6,.52),rgba(3,10,6,.26) 60%,rgba(3,10,6,0) 100%),
    linear-gradient(180deg,rgba(3,9,6,.46) 0%,rgba(3,9,6,.12) 28%,rgba(3,9,6,.16) 58%,rgba(2,7,4,.74) 100%)}
.gate-stage{position:absolute;left:50%;top:50%;width:1280px;height:720px;
  transform:translate(-50%,-50%) scale(var(--fit));transform-origin:50% 50%}
.gate-col{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}

.gate-lock{display:flex;align-items:center;gap:14px;animation:gate-in .9s var(--ease) both}
.gate-mark{display:block;height:30px;width:auto;transform:translateY(-2px);filter:drop-shadow(0 2px 8px rgba(0,0,0,.45))}
.gate-sep{display:block;width:1px;height:28px;border-radius:1px;
  background:linear-gradient(180deg,rgba(255,255,255,0),rgba(255,255,255,.5) 22%,rgba(255,255,255,.5) 78%,rgba(255,255,255,0))}
.gate-name{margin:0;font-family:var(--ff-disp);font-size:26.5px;font-weight:600;line-height:1;
  letter-spacing:-.015em;color:#fff;filter:drop-shadow(0 2px 10px rgba(0,0,0,.5))}
.gate-name span{background:linear-gradient(180deg,#d2f8de 8%,#7bd693 92%);-webkit-background-clip:text;background-clip:text;color:transparent}
@keyframes gate-in{from{opacity:0;transform:translateY(8px)}}

.gate-login{position:relative;width:340px;margin-top:29px;animation:gate-in .9s var(--ease) .12s both;
  transition:opacity .35s ease,transform .5s var(--ease)}
.gate-field{position:relative;width:220px;margin:0 auto;height:33px;border-radius:16.5px;
  background:rgba(255,255,255,.14);
  -webkit-backdrop-filter:blur(20px) saturate(160%);backdrop-filter:blur(20px) saturate(160%);
  box-shadow:inset 0 0 0 .75px rgba(255,255,255,.26),0 6px 18px -8px rgba(0,0,0,.55);
  transition:box-shadow .25s ease,background .25s ease}
.gate-field:focus-within{background:rgba(255,255,255,.17);
  box-shadow:inset 0 0 0 .75px rgba(255,255,255,.42),0 0 0 3px rgba(140,238,176,.16),0 6px 18px -8px rgba(0,0,0,.55)}
.gate-field input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0 60px 0 15px;
  border:0;outline:0;border-radius:inherit;background:transparent;text-align:left;
  font-family:var(--ff-num);font-size:13px;font-weight:600;letter-spacing:.06em;color:#fff;caret-color:#8ceeb0}
/* hidden, the code is a row of whitish dots, half as big again as the 13px text's (measured 2.97 ->
   4.44px) and set closer (gap 7.1 -> 3.9px). The bigger font puts the dots' centre 2px below the
   field's, so the padding lifts them back onto it. */
.gate-field input[type="password"]{font-size:19.5px;letter-spacing:-.05em;color:#edf2ee;padding-bottom:4px}
/* empty, the line box is the placeholder's own size, or the placeholder sits low on the dots' baseline */
.gate-field input:placeholder-shown{font-family:var(--ff-body);font-size:12.5px;letter-spacing:.01em;padding-bottom:0}
.gate-field input::-ms-reveal,.gate-field input::-ms-clear{display:none}
.gate-field input::placeholder{font-family:var(--ff-body);font-size:12.5px;font-weight:450;letter-spacing:.01em;color:rgba(255,255,255,.66)}
/* show / hide the code, just left of the go button */
.gate-eye{position:absolute;right:31.5px;top:4.5px;width:24px;height:24px;padding:0;border:0;border-radius:50%;cursor:pointer;
  display:grid;place-items:center;color:rgba(255,255,255,.62);background:transparent;
  transition:color .2s ease,background .2s ease}
.gate-eye svg{grid-area:1/1;width:15px;height:15px;transition:opacity .18s ease}
.gate-eye .gate-eye-off,.gate-eye[aria-pressed="true"] .gate-eye-on{opacity:0}
.gate-eye[aria-pressed="true"] .gate-eye-off{opacity:1}
.gate-eye:hover{color:#fff;background:rgba(255,255,255,.12)}
.gate-eye:focus-visible{outline:1.5px solid #8ceeb0;outline-offset:1px;color:#fff}
.gate-go{position:absolute;right:4.5px;top:4.5px;width:24px;height:24px;padding:0;border:0;border-radius:50%;cursor:pointer;
  display:grid;place-items:center;color:#fff;background:linear-gradient(160deg,#3ea05f,#1f6b39);
  box-shadow:0 2px 6px -2px rgba(0,0,0,.5),inset 0 .5px 0 rgba(255,255,255,.35);
  transition:transform .25s var(--ease),filter .2s ease}
.gate-go svg{width:13px;height:13px;transition:opacity .2s ease}
.gate-go:hover{filter:brightness(1.15)}
.gate-go:active{transform:scale(.9)}
.gate-go:focus-visible{outline:1.5px solid #8ceeb0;outline-offset:2px}
/* while the code is being checked the arrow becomes a small ring */
.gate-spin{position:absolute;inset:6px;border-radius:50%;border:1.6px solid rgba(255,255,255,.35);border-top-color:#fff;opacity:0}
.gate[data-state="checking"] .gate-go svg{opacity:0}
.gate[data-state="checking"] .gate-spin{opacity:1;animation:gate-rot .7s linear infinite}
@keyframes gate-rot{to{transform:rotate(360deg)}}
.gate-msg{position:absolute;left:0;right:0;top:100%;margin:11px 0 0;text-align:center;white-space:nowrap;font-family:var(--ff-body);font-size:11.5px;
  color:rgba(255,255,255,.62);text-shadow:0 1px 6px rgba(0,0,0,.7);transition:color .2s ease}
.gate-login.gate-err .gate-field{animation:gate-shake .42s cubic-bezier(.36,.07,.19,.97);
  box-shadow:inset 0 0 0 .75px rgba(255,170,150,.8),0 0 0 3px rgba(255,120,100,.14),0 6px 18px -8px rgba(0,0,0,.55)}
.gate-login.gate-err .gate-msg{color:#ffc6b8}
@keyframes gate-shake{10%,90%{transform:translateX(-1px)}20%,80%{transform:translateX(3px)}
  30%,50%,70%{transform:translateX(-5px)}40%,60%{transform:translateX(5px)}}
.gate-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* after a good code: the field steps aside for one quiet line, then the deck takes over */
.gate-open{position:absolute;top:calc(50% + 32px);margin:0;font-family:var(--ff-body);font-size:13px;font-weight:500;
  color:rgba(255,255,255,.9);text-shadow:0 1px 8px rgba(0,0,0,.7);opacity:0;transform:translateY(6px);
  transition:opacity .4s ease .15s,transform .6s var(--ease) .15s;pointer-events:none}
.gate[data-state="opening"] .gate-login{opacity:0;transform:translateY(-6px);pointer-events:none}
.gate[data-state="opening"] .gate-open{opacity:1;transform:none}

.gate-foot{position:absolute;left:0;right:0;bottom:26px;margin:0;text-align:center;font-family:var(--ff-num);font-size:9.4px;
  font-weight:600;letter-spacing:.2em;text-transform:uppercase;color:rgba(255,255,255,.5);text-shadow:0 1px 6px rgba(0,0,0,.7)}

@media (prefers-reduced-motion:reduce){
  .gate-bg,.gate-lock,.gate-login{animation:none}
  .gate-login.gate-err .gate-field{animation:none}
}
