:root {
  --yellow: #FFD600;
  --yellow-soft: #FFE770;
  --dark: #1a1a1a;
  --dark-2: #2a2a2a;
  --gray-1: #f5f5f5;
  --gray-2: #e8e8e8;
  --text-muted: #555;
  --radius-lg: 24px;
  --radius-md: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 84px 20px 0;
}

/* ============================================
   ШАПКА — HEADER
   ============================================ */
.header {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 1340px;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--gray-2);
  border-radius: 18px;
  will-change: max-width;
  transition: box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.header.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  max-width: 700px;
}
.header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0 24px;
  height: 60px;
}
.header__logo            { grid-column: 1; grid-row: 1; justify-self: start;  }
.header__center          { grid-column: 2; grid-row: 1; justify-self: center; display: flex; align-items: center; gap: 8px; }
.header__right           { grid-column: 3; grid-row: 1; justify-self: end;    }
.header__contact-compact { grid-column: 3; grid-row: 1; justify-self: end;    }
.header__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}
.header__logo:hover {
  transform: translateY(-3px);
}
.header__logo img {
  height: 23px;
  width: auto;
}

.header__home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--dark-2);
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, transform 0.15s, width 0.5s cubic-bezier(0.4, 0, 0.2, 1), height 0.5s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.header.scrolled .header__home { width: 42px; height: 42px; border-radius: 12px; }
.header__home:hover { background: var(--yellow); color: var(--dark); transform: translateY(-1px); }
.header__home svg { width: 18px; height: 18px; display: block; }

/* Навигация — 3 кнопки */
.header__nav {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  max-width: 800px;
  opacity: 1;
  overflow: hidden;
  transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease 0.1s;
}
.header.scrolled .header__nav {
  max-width: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease;
}
.header__nav-btn {
  background: var(--dark-2);
  border: none;
  border-radius: 10px;
  padding: 8px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.header__nav-btn:hover {
  background: var(--yellow);
  color: var(--dark);
}

/* Выпадашка "Кто ты, воин?" — появляется при скролле */
.header__dropdown-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease;
}
.header__dropdown-wrap.visible {
  max-width: 220px;
  opacity: 1;
  pointer-events: auto;
  transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease 0.15s;
}
.header__dropdown-wrap.open {
  overflow: visible;
}
.header__dropdown-toggle {
  background: var(--dark-2);
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.header__dropdown-toggle:hover {
  background: var(--dark);
}
.header__dropdown-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s;
}
.header__dropdown-wrap.open .header__dropdown-toggle svg {
  transform: rotate(180deg);
}
.header__dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  padding: 8px;
  min-width: 230px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}
.header__dropdown-wrap.open .header__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.header__dropdown-menu a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s;
}
.header__dropdown-menu a:hover {
  background: var(--gray-1);
}

/* Правая часть — телефон + кнопка */
.header__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  max-width: 500px;
  opacity: 1;
  overflow: hidden;
  transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease 0.1s;
}
.header.scrolled .header__right {
  max-width: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease;
}
.header__right > * {
  flex-shrink: 0;
}
.header__right:has(.header__contact-wrap.open) {
  overflow: visible;
}
.header__phone {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.header__phone:hover {
  color: var(--dark-2);
}
.header__cta {
  background: var(--yellow);
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.header__cta:hover {
  background: var(--yellow-soft);
  transform: translateY(-1px);
}

/* Компактная "Связаться" — появляется при скролле */
.header__contact-compact {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease;
}
.header.scrolled .header__contact-compact {
  max-width: 260px;
  opacity: 1;
  pointer-events: auto;
  transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease 0.15s;
}
.header__contact-compact > .header__contact-wrap {
  flex-shrink: 0;
}
.header__contact-compact .header__contact-toggle {
  flex-shrink: 0;
  white-space: nowrap;
}
.header__contact-compact:has(.header__contact-wrap.open) {
  overflow: visible;
}

/* Выпадашка "Связаться с нами" */
.header__contact-wrap {
  position: relative;
}
.header__contact-toggle {
  display: flex;
  align-items: center;
}
.header__contact-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  padding: 8px 0;
  min-width: 260px;
  z-index: 1000;
  flex-direction: column;
}
.header__contact-wrap.open .header__contact-menu {
  display: flex;
}
.header__contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: background 0.15s;
  width: 100%;
}
.header__contact-item:hover {
  background: #f5f5f5;
}

/* Обёртка формы */
.anketa-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  width: 100%;
}

/* Карточка */
.anketa {
  background: #25292d;
  border-radius: 24px;
  padding: 60px 48px;
  max-width: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  animation: anketa-appear 0.5s ease;
}

@keyframes anketa-appear {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Крестик */
.anketa__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}
.anketa__close:hover {
  background: rgba(255,255,255,0.2);
  transform: rotate(90deg);
}
.anketa__close svg {
  width: 16px;
  height: 16px;
}

/* Заголовок */
.anketa__title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: 28px;
  line-height: 1.2;
  text-transform: uppercase;
  background: linear-gradient(to right, #fdd300, #ffe770);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin: 0 0 12px;
}

/* Подзаголовок */
.anketa__subtitle {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
  margin: 0 0 36px;
}

/* Форма */
.anketa__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

/* Инпуты */
.anketa__input {
  width: 100%;
  height: 58px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #25292d;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.anketa__input::placeholder {
  color: #999;
}
.anketa__input:focus {
  border-color: #fdd300;
  box-shadow: 0 0 0 4px rgba(253,211,0,0.15);
}
.anketa__input--error {
  border-color: #e74c3c !important;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* Радио-группа */
.anketa__group {
  width: 100%;
  text-align: left;
}
.anketa__label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  margin-bottom: 10px;
}
.anketa__options {
  display: flex;
  gap: 10px;
}
.anketa__option {
  flex: 1;
}
.anketa__option input {
  display: none;
}
.anketa__option span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  border: 2px solid transparent;
  color: rgba(255,255,255,0.7);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
}
.anketa__option span:hover {
  background: rgba(255,255,255,0.12);
}
.anketa__option input:checked + span {
  border-color: #fdd300;
  color: #fff;
  background: rgba(253,211,0,0.12);
}

/* Кнопка */
.anketa__btn {
  width: 100%;
  height: 58px;
  margin-top: 6px;
  background: #fdd300;
  border: none;
  border-radius: 16px;
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #25292d;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.anketa__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(253,211,0,0.35);
}
.anketa__btn:active {
  transform: translateY(0);
}

/* Успех */
.anketa__success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: success-appear 0.4s ease;
}

@keyframes success-appear {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

.anketa__success-icon {
  width: 64px;
  height: 64px;
  background: rgba(253,211,0,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.anketa__success-icon svg {
  width: 32px;
  height: 32px;
}
.anketa__success-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: #fff;
}
.anketa__success-text {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
}

/* Адаптив */
@media (max-width: 520px) {
  body {
    padding: 44px 10px 0;
  }
  .anketa {
    padding: 40px 24px;
  }
  .anketa__title {
    font-size: 22px;
  }
}
