html,
body {
  height: 100%;
  margin: 0 auto;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.index__header {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.index__menu {
  font-size: 20px;
  font-weight: 400;
  display: flex;
  gap: 35px;
  align-items: center;
}

.index__menu--responive {
  display: none;
}

.login {
  width: 550px;
  height: 450px;
  margin: 50px auto 0px auto;
  background-color: var(--color-background-input);
  border-radius: 30px;
  box-shadow: 0px 0px 14px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login__title {
  margin: 28px auto 0px auto;
  font-size: 60px;
  font-weight: 700;
}

.login__title::after {
  content: "";
  position: absolute;
  margin: 87px auto 0px auto;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 3px;
  background-color: var(--color-text-tertiary);
}

.login__form--inputs {
  margin-top: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  position: relative;
}

.login__input {
  width: 420px;
  height: 45px;
  font-size: 20px;
  border: 1px solid var(--color-input-placeholder);
  border-radius: 10px;
  padding-left: 20px;
  background-repeat: no-repeat;
  background-position: 380px;
  box-sizing: border-box;
  display: block;
}

.login__input--error {
  border-color: var(--color-danger) !important;
}

.login__error--text {
  position: absolute;
  top: 124px;
  left: 0;
  width: 100%;
  font-size: 16px;
  text-align: center;
  color: var(--color-danger);
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
}

.login__error--text.show {
  opacity: 1;
}

.login__form--buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.login__input::placeholder {
  font-size: 20px;
  color: var(--color-input-placeholder);
}

.login__input--email {
  background-image: url('../../assets/icons/mail-icon.svg');
}

.login__input--password {
  background-image: url('../../assets/icons/lock-icon.svg');
}

.logo-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: var(--color-background-primary);
  pointer-events: none;
  animation: splashFadeOut 0.4s ease-in-out 1.6s forwards;
}

.logo-splash__img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 250px;
  transform: translate(-50%, -50%);
  animation: logoToCorner 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
}

@keyframes logoToCorner {
  0% {
    top: 50%;
    left: 50%;
    width: 250px;
    transform: translate(-50%, -50%);
  }

  100% {
    top: var(--logo-target-top);
    left: var(--logo-target-left);
    width: var(--logo-target-width);
    transform: translate(0, 0);
  }
}

@keyframes splashFadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

:root {
  --logo-target-top: 80px;
  --logo-target-left: 76px;
  --logo-target-width: 100px;
}

/* ==========
RESPONSIVE
   ==========
*/
@media (max-width:601px) {
  .login {
    width: calc(100% - 32px);
  }

  .login__form {
    width: calc(100% - 32px);
  }

  .login__field {
    width: 100%;
  }

  .login__input {
    width: 100%;
  }
}

@media (max-width: 580px) {
  .index__menu {
    display: none;
  }

  .index__menu--responive {
    font-size: 20px;
    font-weight: 400;
    margin: 24px 0;
    display: flex;
    justify-content: center;
    gap: 35px;
    align-items: center;
  }

  form {
    gap: 32px;
  }

  .login__form--buttons {
    flex-direction: column;
    margin: 10px auto 0 auto;
  }

  .login__input {
    width: calc(100% - 32px);
  }
}

@media (max-width: 440px) {
  .login__error--text {
    font-size: 14px;
  }
}
