@font-face {
  font-family: Montserrat;
  src: url("/login-assets/montserrat-regular.woff2") format("woff2");
  font-weight: 400 699;
  font-display: swap;
}

@font-face {
  font-family: Montserrat;
  src: url("/login-assets/montserrat-bold.woff2") format("woff2");
  font-weight: 700 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: Montserrat, "Segoe UI", Arial, sans-serif;
  background: #00141d;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body { overflow: hidden; }

button { font: inherit; }

.login-gate {
  position: relative;
  display: grid;
  width: 100vw;
  height: 100dvh;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background: #00141d;
}

.login-world,
.login-shade {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
}

.login-world {
  object-fit: cover;
  filter: brightness(0.48) saturate(0.86) contrast(1.08);
  transform: scale(1.035);
  animation: world-drift 18s ease-in-out infinite alternate;
}

.login-shade {
  z-index: -1;
  background:
    radial-gradient(circle at 50% 42%, rgba(0, 178, 137, 0.16), transparent 30%),
    linear-gradient(90deg, rgba(0, 15, 23, 0.92), rgba(0, 31, 43, 0.4) 50%, rgba(0, 15, 23, 0.92)),
    linear-gradient(180deg, rgba(0, 13, 20, 0.68), transparent 30%, rgba(0, 13, 20, 0.82));
}

.login-brand {
  position: absolute;
  top: clamp(28px, 4vh, 66px);
  left: clamp(32px, 4vw, 84px);
  width: clamp(180px, 15.5vw, 330px);
}

.login-card {
  display: grid;
  width: min(88vw, 760px);
  justify-items: center;
  padding: clamp(30px, 3.5vw, 62px);
  border: 1px solid rgba(177, 221, 226, 0.44);
  border-radius: clamp(24px, 2vw, 40px);
  background: linear-gradient(145deg, rgba(5, 63, 78, 0.94), rgba(0, 24, 35, 0.98));
  box-shadow: 0 35px 120px rgba(0, 8, 14, 0.68), inset 0 1px rgba(255, 255, 255, 0.08);
  color: #f3f8f8;
  text-align: center;
  backdrop-filter: blur(24px);
  animation: enter 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.login-icon {
  display: grid;
  width: clamp(68px, 5.4vw, 104px);
  aspect-ratio: 1;
  place-items: center;
  margin-bottom: clamp(18px, 2vh, 30px);
  border: 1px solid rgba(35, 214, 165, 0.68);
  border-radius: 28%;
  background: rgba(0, 178, 137, 0.12);
  color: #23d6a5;
}

.login-icon svg { width: 58%; height: 58%; }

.login-eyebrow {
  color: #23d6a5;
  font-size: clamp(10px, 0.78vw, 16px);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0.2em 0 0;
  color: #fff;
  font-size: clamp(36px, 3.4vw, 68px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-wrap: balance;
}

.login-card > p {
  max-width: 650px;
  margin: clamp(16px, 2vh, 28px) 0 0;
  color: #c8dcdf;
  font-size: clamp(14px, 1.05vw, 21px);
  font-weight: 500;
  line-height: 1.55;
}

.login-error {
  width: 100%;
  padding: 0.9em 1.1em;
  border: 1px solid rgba(255, 104, 95, 0.55);
  border-radius: 14px;
  background: rgba(137, 37, 35, 0.24);
  color: #ffc3bf !important;
  font-weight: 700 !important;
}

.login-button {
  display: inline-flex;
  width: 100%;
  min-height: clamp(68px, 7.4vh, 94px);
  align-items: center;
  justify-content: center;
  gap: 0.8em;
  margin-top: clamp(24px, 3vh, 42px);
  padding: 0 1.4em;
  border: 2px solid rgba(151, 255, 220, 0.86);
  border-radius: 18px;
  background: linear-gradient(135deg, #00a67e, #23c990);
  box-shadow: 0 0 0 6px rgba(35, 214, 165, 0.1), 0 18px 48px rgba(0, 178, 137, 0.25);
  color: #fff;
  cursor: pointer;
  font-size: clamp(17px, 1.15vw, 24px);
  font-weight: 800;
}

.login-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.login-button:focus-visible {
  outline: 4px solid #fff;
  outline-offset: 5px;
}

.login-button svg { width: 1.25em; height: 1.25em; }

footer {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-top: clamp(22px, 2.6vh, 38px);
  color: #afc3c8;
  font-size: clamp(10px, 0.72vw, 14px);
  font-weight: 700;
}

footer span {
  color: #23d6a5;
  text-shadow: 0 0 12px rgba(35, 214, 165, 0.8);
}

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

@keyframes world-drift {
  from { transform: scale(1.025) translate3d(-0.4%, 0, 0); }
  to { transform: scale(1.055) translate3d(0.6%, -0.5%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
