@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700;800&display=swap");

:root {
  --font-family-base: "Source Sans 3", "Segoe UI", "Trebuchet MS", sans-serif;
  --text: #3f42bf;
  --text-soft: rgba(26, 16, 34, 0.9);
  --title: #504aad;
  --accent: #8583e8;
  --button-bg: rgba(255, 255, 255, 0.24);
  --button-border: rgba(255, 255, 255, 0.58);
  --button-text: #2e2438;
  --footer-line: rgba(255, 255, 255, 0.56);
  --footer-text: rgba(255, 255, 255, 0.92);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-family-base);
  color: var(--text);
  background: #c9bce6;
}

body.modal-open {
  overflow: hidden;
}

a,
button {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  padding: 0;
}

.background-orb {
  display: none;
}

.app-root {
  width: 100%;
}

.landing {
  position: relative;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.95) 22%, rgba(255, 255, 255, 0.76) 40%, rgba(255, 255, 255, 0.3) 58%, rgba(37, 19, 52, 0.1) 100%),
    url("./assets/bg_index.png") center bottom / cover no-repeat;
}

.landing__overlay {
  position: relative;
  z-index: 1;
  width: min(100%, 1480px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 12px 24px 28px;
}

.landing__brand {
  width: 190px;
  aspect-ratio: 850 / 400;
  border-radius: 0;
  background: url("./assets/logo-smotrix.png") center / contain no-repeat;
  filter: drop-shadow(0 10px 18px rgba(80, 50, 138, 0.16));
}

.hero {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  padding: clamp(72px, 11vh, 132px) 16px 40px;
}

.hero-card {
  width: min(100%, 860px);
}

.hero-card__title {
  margin: 0 0 20px;
  color: var(--title);
  font-size: clamp(2.25rem, 4vw, 4.2rem);
  font-weight: 700;
  line-height: 1.04;
  text-shadow: 0 14px 34px rgba(55, 35, 79, 0.24);
}

.hero-card__description {
  margin: 0 auto;
  max-width: 720px;
  color: var(--text-soft);
  line-height: 1.6;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
}

.hero-card__actions {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  gap: 16px;
  margin-top: 28px;
}

.button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1px solid var(--button-border);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.16)),
    var(--button-bg);
  color: var(--button-text);
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -18px 34px rgba(133, 131, 232, 0.1),
    0 18px 42px rgba(69, 45, 112, 0.18);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.button::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  height: 48%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -18px 34px rgba(133, 131, 232, 0.14),
    0 22px 48px rgba(69, 45, 112, 0.24);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(47, 31, 73, 0.3), rgba(24, 15, 35, 0.48)),
    rgba(21, 16, 30, 0.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.auth-modal__dialog {
  position: relative;
  width: min(100%, 430px);
  padding: 34px 32px 28px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78)),
    rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 28px 70px rgba(35, 22, 56, 0.32);
  color: #2f2938;
}

.auth-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(80, 74, 173, 0.09);
  color: #443f92;
  cursor: pointer;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.auth-modal__close span,
.auth-modal__close span::before {
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.auth-modal__close span {
  position: relative;
  display: block;
  transform: rotate(45deg);
}

.auth-modal__close span::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: rotate(90deg);
}

.auth-modal__close:hover,
.auth-modal__close:focus-visible {
  background: rgba(80, 74, 173, 0.16);
  transform: translateY(-1px);
}

.auth-modal__header {
  padding-right: 28px;
}

.auth-modal__title {
  margin: 0;
  color: var(--title);
  font-size: 2rem;
  line-height: 1.15;
}

.auth-modal__description {
  margin: 10px 0 0;
  color: rgba(38, 28, 48, 0.78);
  font-size: 1rem;
  line-height: 1.5;
}

.auth-modal__form {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.auth-modal__field {
  display: grid;
  gap: 8px;
  text-align: left;
}

.auth-modal__field--checkbox {
  gap: 6px;
  margin-top: 2px;
}

.auth-modal__label {
  color: #332b42;
  font-size: 0.95rem;
}

.auth-modal__input {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid rgba(80, 74, 173, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: #241f2e;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.auth-modal__input::placeholder {
  color: rgba(45, 37, 56, 0.45);
}

.auth-modal__input:focus {
  border-color: rgba(80, 74, 173, 0.58);
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 0 0 3px rgba(133, 131, 232, 0.18);
}

.auth-modal__input--invalid,
.auth-modal__input--invalid:focus {
  border-color: rgba(190, 56, 82, 0.78);
  background: rgba(255, 246, 248, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 3px rgba(190, 56, 82, 0.14);
}

.auth-modal__field--invalid .auth-modal__label {
  color: #9d2740;
}

.auth-modal__checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.auth-modal__checkbox-input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #5a4bcc;
  flex-shrink: 0;
}

.auth-modal__checkbox-input:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(133, 131, 232, 0.24);
  border-radius: 5px;
}

.auth-modal__checkbox-label {
  color: #332b42;
  font-size: 0.95rem;
  line-height: 1.5;
}

.auth-modal__field--invalid .auth-modal__checkbox-label {
  color: #9d2740;
}

.auth-modal__link {
  color: #4d46a7;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 160ms ease;
}

.auth-modal__link:hover,
.auth-modal__link:focus-visible {
  color: #372f92;
}

.auth-modal__error {
  min-height: 15px;
  color: #9d2740;
  font-size: 0.84rem;
  line-height: 1.3;
}

.auth-modal__error:empty {
  visibility: hidden;
}

.auth-modal__form-error {
  min-height: 18px;
  margin: -2px 0 0;
  color: #9d2740;
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: left;
}

.auth-modal__form-error:empty {
  display: none;
}

.auth-modal__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  margin-top: 4px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: #504aad;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(80, 74, 173, 0.25);
  transition:
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.auth-modal__submit:hover,
.auth-modal__submit:focus-visible {
  background: #423d97;
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(80, 74, 173, 0.31);
}

.auth-modal__submit:disabled {
  transform: none;
}

.auth-modal__submit[data-submit-state="inactive"] {
  background: linear-gradient(180deg, rgba(80, 74, 173, 0.32), rgba(80, 74, 173, 0.22));
  color: rgba(255, 255, 255, 0.82);
  cursor: not-allowed;
  opacity: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  filter: saturate(0.72);
}

.auth-modal__submit[data-submit-state="submitting"] {
  background: #625cbc;
  cursor: wait;
  opacity: 0.88;
  box-shadow: 0 12px 24px rgba(80, 74, 173, 0.18);
}

.auth-modal__switch {
  margin: 18px 0 0;
  color: rgba(38, 28, 48, 0.78);
  font-size: 0.95rem;
  text-align: center;
}

.auth-modal__switch-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--title);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-modal__switch-button:hover,
.auth-modal__switch-button:focus-visible {
  color: #332c8d;
}

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 24px 10px;
  color: var(--footer-text);
}

.footer__line {
  width: 100%;
  height: 1px;
  background: var(--footer-line);
}

.footer__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer__link,
.footer__year {
  margin: 0;
  color: var(--footer-text);
  text-decoration: none;
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  .footer__links {
    display: none;
  }

  .landing {
    background-position: center center, center bottom;
  }

  .landing__overlay {
    padding: 18px 16px 22px;
  }

  .landing__brand {
    width: 160px;
  }

  .hero {
    padding: 62px 10px 26px;
  }

  .hero-card__actions {
    grid-template-columns: 1fr;
    width: min(100%, 280px);
  }

  .button {
    width: 100%;
  }

  .auth-modal {
    padding: 18px;
  }

  .auth-modal__dialog {
    padding: 30px 22px 24px;
  }

  .auth-modal__title {
    font-size: 1.65rem;
  }
}
