:root {
  --navy: #1c2e51;
  --gray: #4d4d4d;
  --muted: #757575;
  --border: #8c8c8c;
  --beige: #e3d7ce;
  --error: #e53935;
  --white: #ffffff;
  --shadow: 0 2px 5px rgba(0, 0, 0, 0.16), 0 0 10px rgba(0, 0, 0, 0.12);
  --font: "Public Sans", Arial, sans-serif;
  --title: "Titillium Web", "Public Sans", Arial, sans-serif;
}

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

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  color: var(--gray);
  background-color: #ebeff2;
  background-image: url("../assets/bg.jpg");
  background-size: cover;
  background-position: 50% 0;
  background-repeat: no-repeat;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font-family: inherit;
}

.hero {
  height: calc(100vh - 48px);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 5vw;
}

.login-column {
  width: 338px;
}

.login-card {
  width: 338px;
  background: var(--white);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.login-card__form {
  padding: 20px 20px 0;
}

.login-card__avatar {
  display: flex;
  justify-content: center;
  padding: 15px 0 0;
}

.login-card__icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: contain;
}

.login-card__title {
  font-family: var(--title);
  font-size: 22px;
  font-weight: 700;
  line-height: 26.4px;
  color: var(--navy);
  text-align: center;
  margin: 12px 0 40px;
}

.steps {
  position: relative;
}

.step {
  animation: step-in 0.28s ease;
}

.step[hidden] {
  display: none;
}

.step__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 10px 4px;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-size: 13px;
  line-height: 16px;
  cursor: pointer;
  padding: 0;
}

.step__back::before {
  content: "‹";
  font-size: 18px;
  line-height: 1;
}

.step__back:hover {
  text-decoration: underline;
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.field {
  padding: 4px;
  margin-bottom: 6px;
}

.field__label {
  display: inline-block;
  font-size: 16px;
  line-height: 19.2px;
  color: var(--navy);
  margin-bottom: 10px;
}

.field.is-invalid .field__label {
  color: var(--error);
}

.field__control {
  position: relative;
}

.field__input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 40px 0 10px;
  font-size: 14px;
  line-height: 16.8px;
  color: var(--gray);
  background: var(--white);
  outline: none;
}

.field__input::placeholder {
  color: var(--muted);
}

.field__input:focus {
  border-color: var(--navy);
}

.field.is-invalid .field__input {
  border-color: var(--error);
}

.field__toggle {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 24px;
  height: 24px;
  border: 0;
  background: url("../assets/icn-ver-clave.png") center / 24px 24px no-repeat;
  cursor: pointer;
}

.field__toggle.is-open {
  background-image: url("../assets/icn-ocultar-clave.png");
}

.field__error {
  margin-top: 6px;
  font-size: 12px;
  line-height: 14px;
  color: var(--error);
}

.login-btn {
  display: block;
  width: 100%;
  height: 35px;
  margin: 10px 0;
  border: 0;
  border-radius: 26px;
  background: var(--navy);
  color: var(--white);
  font-size: 13px;
  font-weight: 400;
  line-height: 35px;
  text-align: center;
  cursor: pointer;
}

.login-btn:hover {
  filter: brightness(1.08);
}

.virtual-keyboard {
  display: inline-block;
  margin: 5px 0 16px;
  padding: 4px 0 4px 42px;
  min-height: 30px;
  line-height: 22px;
  font-size: 13px;
  color: var(--gray);
  background: url("../assets/teclado-virtual.png") left center / 30px 30px no-repeat;
}

.virtual-keyboard:hover {
  text-decoration: underline;
}

.login-card__footer {
  background: var(--beige);
  padding: 15px;
  border-radius: 0 0 22px 22px;
  text-align: center;
}

.login-card__help {
  display: block;
  font-size: 13px;
  line-height: 16px;
  color: var(--navy);
  white-space: nowrap;
}

.login-card__help:hover {
  text-decoration: underline;
}

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  background: var(--white);
  color: var(--navy);
  z-index: 10;
}

.footer__nav {
  display: table;
  width: 86%;
  height: 48px;
  margin-left: 7%;
}

.footer__list {
  display: table-cell;
  vertical-align: middle;
  list-style: none;
  text-align: center;
  white-space: nowrap;
}

.footer__item {
  display: inline-block;
  white-space: nowrap;
}

.footer__item a {
  font-size: 16px;
  line-height: 19.2px;
  color: var(--navy);
}

.footer__item a:hover {
  text-decoration: underline;
}

.footer__item--home {
  width: 10%;
}
.footer__item--contact {
  width: 15%;
}
.footer__item--phones {
  width: 18%;
}
.footer__item--faq {
  width: 20%;
}
.footer__item--security {
  width: 13%;
}
.footer__item--terms {
  width: 20%;
}

.vk {
  position: absolute;
  width: 420px;
  background: #f4f4f4;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  z-index: 20;
  padding: 8px;
}

.vk__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--navy);
  margin-bottom: 6px;
  padding: 0 4px;
}

.vk__close,
.modal__close {
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--navy);
}

.vk__keys {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 4px;
}

.vk__key {
  height: 32px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  background: var(--white);
  font-size: 13px;
  color: var(--navy);
  cursor: pointer;
}

.vk__key:hover {
  background: #eee;
}

.vk__key--wide {
  grid-column: span 2;
}

.vk__key--space {
  grid-column: span 5;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

.modal[hidden],
.vk[hidden] {
  display: none;
}

.modal__card {
  position: relative;
  width: min(420px, 90vw);
  background: var(--white);
  border-radius: 10px;
  padding: 32px 28px 24px;
  color: var(--navy);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.modal__card h2 {
  font-family: var(--title);
  font-size: 22px;
  margin-bottom: 12px;
}

.modal__card p {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 6px;
}

.modal__phone {
  font-size: 20px;
  font-weight: 600;
}

.modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
}

@media (max-width: 900px) {
  html,
  body {
    overflow: auto;
  }

  .hero {
    height: auto;
    min-height: calc(100vh - 48px);
    justify-content: center;
    padding: 24px 16px 72px;
  }

  .login-column {
    padding-top: 0;
  }

  .footer {
    position: relative;
    height: auto;
    min-height: 48px;
    padding: 10px 0;
  }

  .footer__nav,
  .footer__list {
    display: block;
    width: 100%;
    margin: 0;
  }

  .footer__item {
    width: 50% !important;
    margin: 6px 0;
  }
}
