:root {
  --bg: #16202b;
  --field: #1e3042;
  --line: #405d7b;
  --placeholder: #405d7b;
  --caption: #405d7b;
  --brand: #008cff;
  --white: #ffffff;
  --muted: #9ba3ac;
  --text: #1e3042;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: Inter, sans-serif;
  font-weight: 400;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font-family: inherit;
}

button {
  cursor: pointer;
}

p {
  margin: 0;
}

img {
  display: block;
  max-width: none;
}

[hidden] {
  display: none !important;
}

.login {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 24px 16px;
}

.brand-card,
#login-form,
.field,
.submit {
  width: min(350px, 100%);
}

.brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px;
  border: 1px solid rgba(64, 93, 123, 0.2);
  border-radius: 30px;
}

.brand-caption {
  width: 244px;
  max-width: 100%;
  color: var(--caption);
  font-size: 16px;
  line-height: normal;
  text-align: center;
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.field {
  height: 46px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: #e2e7ed;
  font-size: 16px;
  line-height: normal;
}

.field::placeholder {
  color: var(--placeholder);
  opacity: 1;
  transition: color 150ms ease;
}

.field:focus::placeholder {
  color: transparent;
}

.pass-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-error {
  color: #e2e7ed;
  font-size: 12px;
  line-height: normal;
}

.field[aria-invalid="true"] {
  border-color: var(--brand);
}

.submit {
  height: 46px;
  padding: 10px 30px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
  transition: background-color 200ms ease, color 200ms ease;
}

.submit:hover {
  background: var(--white);
  color: var(--brand);
}

.forgot {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: normal;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 200ms ease;
}

.forgot:hover {
  color: var(--white);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(22, 32, 43, 0.72);
}

.modal[hidden] {
  display: none !important;
}

.modal-card {
  width: min(100%, 560px);
  padding: 40px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
}

.modal-title {
  margin-bottom: 16px;
  font-size: 26px;
  font-weight: 700;
  line-height: normal;
}

.modal-card p + p {
  font-size: 16px;
  line-height: 1.45;
}

.modal-actions {
  margin-top: 24px;
}

.modal-close {
  height: 46px;
  padding: 10px 30px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
}

.modal-close:hover {
  background: var(--white);
  color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.logo {
  display: block;
  overflow: visible;
}

.logo-stroke {
  fill: none;
  stroke-width: 0.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

html:not(.is-intro) .logo-strokes {
  display: none;
}

html.is-intro .login-reveal {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

html.is-intro .brand-card {
  border-color: transparent;
}

html.is-intro .logo {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 5;
  transform: translate(-50%, -50%) scale(2);
  transform-origin: center center;
}

html.is-intro .logo-fill {
  opacity: 0;
}

html.is-intro .logo-stroke {
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  opacity: 1;
}

html.is-intro.is-armed .logo-stroke {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.7s ease var(--draw-delay, 0s);
}

html.is-intro.is-fill .logo-fill {
  opacity: 1;
  transition: opacity 0.45s ease;
}

html.is-intro.is-fill .logo-stroke {
  opacity: 0;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.7s ease var(--draw-delay, 0s), opacity 0.35s ease;
}

html.is-intro.is-settling .logo {
  position: static;
  left: auto;
  top: auto;
  z-index: auto;
}

html.is-intro.is-reveal .login-reveal {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.55s ease;
}

html.is-intro.is-reveal .brand-card {
  border-color: rgba(64, 93, 123, 0.2);
  transition: border-color 0.55s ease;
}

@media (prefers-reduced-motion: reduce) {
  html.is-intro .logo,
  html.is-intro .logo-fill,
  html.is-intro .login-reveal,
  html.is-intro .brand-card {
    transition: none;
    animation: none;
    transform: none;
    position: static;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    border-color: rgba(64, 93, 123, 0.2);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
