@font-face {
  font-family: "TT Firs Neue";
  src: local("TT Firs Neue Regular"), local("TT-Firs-Neue-Regular"),
    url("../fonts/TT_Firs_Neue_Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TT Firs Neue";
  src: local("TT Firs Neue Medium"), local("TT-Firs-Neue-Medium"),
    url("../fonts/TT_Firs_Neue_Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --white: #ffffff;
  --black: #000000;
  --blue: #4224fd;
  --darker-blue: #341ad1;
  --dark-blue: #27149e;
  --light-blue: #dbedff;
  --red: #e42626;
  --gray: #2c2c2c;
  --dark-gray: #121212;
  --light-gray: #454545;
  --lighter-gray: #5e5e5e;
  --lightest-gray: #e5e5e5;
  --light-most-gray: #f5f5f5;
  --lily: #cdd5ff;
  --light-lily: #eff1fd;
  --light-purple: rgba(66, 36, 253, 0.05);
  --border-radius: 16px;
  --shadow: 0px 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0px 4px 24px rgba(0, 0, 0, 0.13);
}

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

html {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "TT Firs Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--gray);
  background: var(--white);
  min-height: 100%;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--darker-blue); }

img { max-width: 100%; height: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--blue);
  color: var(--white);
}
.btn--primary:hover { background: var(--darker-blue); }
.btn--primary:disabled {
  background: var(--lightest-gray);
  color: var(--lighter-gray);
  cursor: default;
  transform: none;
}

.btn--wide { width: 100%; }

.btn--outline {
  background: var(--white);
  color: var(--blue);
  border: 2px solid var(--blue);
}
.btn--outline:hover {
  background: var(--light-purple);
}

.form-input {
  width: 100%;
  height: 52px;
  padding: 14px 16px;
  border: 2px solid var(--lightest-gray);
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  color: var(--gray);
  background: var(--white);
  outline: none;
  transition: border-color .2s;
}
.form-input::placeholder {
  color: #b3b3b3;
}
.form-input:focus {
  border-color: var(--blue);
}
.form-input--error {
  border-color: var(--red) !important;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--lighter-gray);
  margin-bottom: 6px;
}

.form-group {
  margin-bottom: 20px;
}

.form-hint {
  font-size: 12px;
  color: var(--red);
  margin-top: 4px;
  display: none;
}
.form-hint.visible { display: block; }

.card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 40px 32px;
}
@media (max-width: 480px) {
  .card { padding: 28px 20px; }
}

.text-center { text-align: center; }

h1, h2, h3, h4 {
  font-weight: 500;
  color: var(--dark-gray);
}
h1 { font-size: 32px; line-height: 1.25; }
h2 { font-size: 26px; line-height: 1.3; }
h3 { font-size: 22px; line-height: 1.35; }
h4 { font-size: 18px; line-height: 1.4; }

.text-secondary { color: var(--lighter-gray); }
.text-small { font-size: 14px; }
.text-error { color: var(--red); }

.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.spinner-inline {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--lightest-gray);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
