/* Login gate: a slow-drifting blue field behind a plain white card. */

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body.gate {
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 28px 20px;
  background: #06203c;
  color: #0d1b2a;
  font-family: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* ----------------------------------------------------------- moving blue field */

.aurora {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 18% -6%, #2a76c9 0%, rgba(42, 118, 201, 0) 62%),
    radial-gradient(80% 80% at 88% 96%, #041a2f 0%, rgba(4, 26, 47, 0) 68%),
    linear-gradient(155deg, #0d4a8c 0%, #0a3a6d 46%, #051d34 100%);
  z-index: 0;
}

.aurora .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.85;
  will-change: transform;
}

.aurora .b1 {
  width: 58vmax;
  height: 58vmax;
  left: -16vmax;
  top: -26vmax;
  background: radial-gradient(circle at 40% 40%, rgba(86, 160, 245, 0.95), rgba(21, 92, 178, 0) 68%);
  animation: drift-a 34s ease-in-out infinite alternate;
}

.aurora .b2 {
  width: 46vmax;
  height: 46vmax;
  right: -12vmax;
  top: 2vmax;
  background: radial-gradient(circle at 55% 45%, rgba(64, 197, 226, 0.55), rgba(9, 63, 122, 0) 70%);
  animation: drift-b 41s ease-in-out infinite alternate;
}

.aurora .b3 {
  width: 62vmax;
  height: 40vmax;
  left: 4vmax;
  bottom: -30vmax;
  background: radial-gradient(circle at 50% 50%, rgba(120, 184, 255, 0.55), rgba(5, 40, 78, 0) 72%);
  animation: drift-c 47s ease-in-out infinite alternate;
}

.aurora .sheen {
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 120deg at 50% 50%, rgba(255, 255, 255, 0) 0deg, rgba(160, 210, 255, 0.16) 90deg, rgba(255, 255, 255, 0) 190deg, rgba(120, 190, 255, 0.12) 300deg, rgba(255, 255, 255, 0) 360deg);
  mix-blend-mode: screen;
  animation: spin 90s linear infinite;
  opacity: 0.75;
}

.aurora .grain {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

@keyframes drift-a {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(9vmax, 5vmax, 0) scale(1.12); }
  100% { transform: translate3d(4vmax, 11vmax, 0) scale(1.04); }
}

@keyframes drift-b {
  0%   { transform: translate3d(0, 0, 0) scale(1.05); }
  50%  { transform: translate3d(-8vmax, 8vmax, 0) scale(0.95); }
  100% { transform: translate3d(-13vmax, 2vmax, 0) scale(1.1); }
}

@keyframes drift-c {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(7vmax, -6vmax, 0) scale(1.08); }
  100% { transform: translate3d(-6vmax, -2vmax, 0) scale(1.02); }
}

@keyframes spin {
  to { transform: rotate(1turn); }
}

/* ----------------------------------------------------------- card */

.gate-main {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  place-items: center;
}

.card {
  width: min(100%, 396px);
  background: #ffffff;
  border-radius: 16px;
  padding: 34px 32px 28px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 30px 70px -24px rgba(2, 14, 32, 0.72),
    0 8px 24px -12px rgba(2, 14, 32, 0.45);
  animation: rise 620ms cubic-bezier(0.22, 0.68, 0.24, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #5d7c9e;
}

.card h1 {
  margin: 0;
  font-size: 23px;
  line-height: 1.22;
  font-weight: 600;
  letter-spacing: -0.017em;
  color: #0b1a2b;
}

.lede {
  margin: 9px 0 22px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #5b6b7d;
  max-width: 34ch;
}

.field-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: #42586f;
  margin-bottom: 7px;
}

.field {
  position: relative;
  display: flex;
  align-items: center;
}

.field input {
  width: 100%;
  height: 48px;
  padding: 0 62px 0 14px;
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: #0d1b2a;
  background: #fbfcfe;
  border: 1px solid #ccd7e3;
  border-radius: 10px;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.field input:hover { border-color: #b3c2d2; }

.field input:focus {
  outline: none;
  background: #ffffff;
  border-color: #0b57a4;
  box-shadow: 0 0 0 3.5px rgba(11, 87, 164, 0.14);
}

.reveal {
  position: absolute;
  right: 6px;
  height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #52677d;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.reveal:hover { background: #eef2f7; color: #16406b; }

.hint {
  margin: 8px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: #7b8b9d;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 18px 0 20px;
  font-size: 13px;
  color: #35485c;
  cursor: pointer;
  user-select: none;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: #0b57a4;
  margin: 0;
  cursor: pointer;
}

.submit {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: #0b57a4;
  color: #ffffff;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
  cursor: pointer;
  transition: background 140ms ease, transform 90ms ease, box-shadow 140ms ease;
  box-shadow: 0 10px 22px -14px rgba(11, 87, 164, 0.95);
}

.submit:hover { background: #094a8c; }
.submit:active { transform: translateY(1px); }
.submit:focus-visible { outline: 3px solid rgba(11, 87, 164, 0.35); outline-offset: 2px; }

.alert {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid #f2c9c5;
  border-radius: 9px;
  background: #fdf0ee;
  color: #8d2f26;
  font-size: 13px;
  line-height: 1.45;
}

.foot {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid #edf1f6;
  font-size: 11.5px;
  line-height: 1.55;
  color: #7b8b9d;
}

/* ----------------------------------------------------------- accessibility */

::selection { background: rgba(11, 87, 164, 0.16); }

@media (prefers-reduced-motion: reduce) {
  .aurora .blob,
  .aurora .sheen,
  .card { animation: none !important; }
  .aurora .blob { filter: blur(64px); }
}

@media (max-width: 440px) {
  .card { padding: 28px 22px 24px; border-radius: 14px; }
  .card h1 { font-size: 21px; }
}
