@font-face {
  font-family: "Gehaks";
  src: url("../assets/fonts/Gehaks-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("../assets/fonts/Manrope-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/Inter-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../assets/fonts/CormorantGaramond-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --color-brand: #0834c5;
  --color-brand-alt: #0c35bf;
  --color-page: #fafafa;
  --color-white: #ffffff;
  --color-field-border: rgba(12, 53, 191, 0.5);
  --font-display: "Gehaks", "Times New Roman", serif;
  --font-body: "Manrope", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--color-brand);
  font-family: var(--font-body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

main[class] {
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.login-page {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  background: var(--color-brand);
}

.login-page::before,
.login-page::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.login-page::before {
  background: url("../assets/images/login-background.png") center / cover no-repeat;
  opacity: 0.15;
}

.login-page::after {
  background: #f6f6f6;
  opacity: 0.08;
}

.login-page__logo {
  position: absolute;
  top: 24px;
  left: 50%;
  display: block;
  width: 140px;
  height: 57px;
  transform: translateX(-50%);
}

.login-panel {
  position: absolute;
  top: calc(50% + 40px);
  left: 50%;
  display: flex;
  width: min(440px, calc(100% - 32px));
  flex-direction: column;
  align-items: center;
  gap: 24px;
  transform: translate(-50%, -50%);
}

.login-card {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  margin: 0;
  padding: 24px;
  overflow: hidden;
  border: 3px solid var(--color-page);
  background: var(--color-page);
}

.login-card__title {
  margin: 0;
  color: var(--color-brand);
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.login-card__fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field__error {
  display: none;
  margin-top: -4px;
  color: #a31313;
  font-size: 11px;
  line-height: 1.2;
}

.field__error:not(:empty) {
  display: block;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.remember-me {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-brand);
  cursor: pointer;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.1;
  opacity: 0.8;
}

.remember-me__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.remember-me__box {
  position: relative;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border: 1px solid var(--color-brand-alt);
}

.remember-me__input:checked + .remember-me__box {
  background: var(--color-brand);
}

.remember-me__input:checked + .remember-me__box::after {
  position: absolute;
  top: 1px;
  left: 3px;
  width: 3px;
  height: 6px;
  border: solid var(--color-white);
  border-width: 0 1px 1px 0;
  content: "";
  transform: rotate(45deg);
}

.remember-me__input:focus-visible + .remember-me__box {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.login-options__link {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.1;
  text-decoration: none;
}

.login-options__link:hover,
.login-options__link:focus-visible {
  text-decoration: underline;
}

.login-card__message {
  display: none;
  margin: -8px 0 0;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
}

.login-card__message:not(:empty) {
  display: block;
}

.register-link {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  margin: 0;
  color: var(--color-white);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
}

.register-link a {
  font-weight: 600;
  text-underline-position: from-font;
}

@media (max-width: 520px) {
  .login-page__logo {
    top: 20px;
  }

  .login-panel {
    top: calc(50% + 34px);
  }

  .login-card {
    padding: 22px 18px;
  }
}

@media (max-height: 620px) {
  .login-page {
    min-height: 620px;
  }

  .login-panel {
    top: 112px;
    transform: translateX(-50%);
  }

  .login-page__logo {
    top: 18px;
  }
}
