.footer {
  position: relative;
  margin-top: 40px; /* Reduced from 120px to bring content closer to reviews */
  overflow: hidden;
}

/* Aurora - grows from bottom up, flipped vertically */
.aurora-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 500px;
  z-index: 0;
  pointer-events: none;
  transform: scaleY(-1);
}

@media (max-width: 1024px) {
  .aurora-wrap {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .aurora-wrap {
    height: 350px;
  }
}

@media (max-width: 640px) {
  .aurora-wrap {
    height: 300px;
  }
}

.aurora-wrap > * {
  position: absolute !important;
  inset: 0 !important;
  height: 100% !important;
  width: 100% !important;
}

/* Dots - full footer coverage */
.footer-dots {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none; /* document listener handles it */
  /* Плавный переход прозрачности по верхней и нижней границе */
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 5%,
    black 95%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 5%,
    black 95%,
    transparent 100%
  );
}

/* Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* ===== TOP ===== */
.footer-top {
  padding: 20px 0 60px; /* Reduced top padding from 80px to bring content closer */
}

.footer-top-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cta-title {
  font-family: 'Benzin', 'Arial Black', sans-serif;
  font-weight: 400;
  font-size: 36px;
  line-height: 110%;
  letter-spacing: 0%;
  color: rgba(255, 255, 255, 0.9);
}

.arrow-icon {
  width: auto;
  height: 0.8em;
  margin-left: 0.2em;
  display: inline;
  vertical-align: baseline;
  white-space: nowrap;
}

.social-links {
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 0;
}

.social-link:hover {
  opacity: 0.8;
}

.social-link img,
.social-link svg {
  width: 20px;
  height: 20px;
}
.social-link--phone .phone-icon-svg {
  flex-shrink: 0;
  display: block;
  width: 24px;
  height: 24px;
}

.social-link--tg {
  transform: translateY(1px);
}

.footer-address {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

@media (max-width: 640px) {
  .footer-address {
    align-items: flex-start;
    gap: 8px;
  }
  
  .footer-address p {
    font-size: 11px;
    line-height: 1.4;
    display: block;
  }
}

.pin-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  align-self: flex-start;
  margin-top: 2px;
}

@media (max-width: 640px) {
  .pin-icon {
    width: 24px;
    height: 24px;
    margin-top: 0;
  }
}

.footer-address p {
  font-family: 'PP Mori', sans-serif;
  font-weight: 500;
  font-size: 13px;
  line-height: 150%;
  color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 640px) {
  .pin-icon {
    width: 24px;
    height: 24px;
  }

  .footer-address p {
    font-size: 11px;
    line-height: 140%;
  }
}

.skolkovo-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 156px;
  height: 74px;
  border-radius: 8px;
  padding: 8px 16px 8px 8px;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
  border: none;
  box-sizing: border-box;
  flex-direction: row;
}

.skolkovo-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  padding: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

.skolkovo-logo {
  width: 57px;
  height: 57px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  object-fit: contain;
  display: block;
}

.skolkovo-badge span {
  font-family: 'PP Mori', sans-serif;
  font-weight: 500;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.2;
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
  display: block;
  text-align: left;
}

/* Form */
.footer-right {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  row-gap: 20px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.9);
  font-family: 'PP Mori', sans-serif;
  font-weight: 500;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
  box-sizing: border-box;
  position: relative;
  overflow: visible; /* нужно чтобы ::after card-glow-border был виден */
  resize: vertical;
}

/* Обёртка для <input> — т.к. ::after не работает на input-элементах */
.input-glow-wrap {
  position: relative;
  border-radius: 14px;
}

.textarea-wrap {
  display: block; /* растягивается по высоте textarea */
}

.textarea-wrap .form-textarea {
  display: block;
  width: 100%;
}

.input-glow-wrap .form-input {
  border-radius: inherit;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: rgba(255, 213, 138, 0.35);
}

.form-input.error {
  border-color: rgba(255, 77, 77, 0.6);
}

.form-input.error:focus {
  border-color: rgba(255, 77, 77, 0.8);
}

.form-select-wrapper {
  position: relative;
}

.form-select {
  width: 100%;
  padding: 16px 20px;
  padding-right: 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.9);
  font-family: 'PP Mori', sans-serif;
  font-weight: 500;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  position: relative;
}

.form-select span {
  flex: 1;
  color: rgba(255, 255, 255, 0.9);
}

.form-select:not(.has-selection) span {
  color: rgba(255, 255, 255, 0.3);
}

.form-select:focus,
.form-select.active {
  border-color: rgba(255, 213, 138, 0.35);
}

.select-chevron {
  width: 12px;
  height: 8px;
  flex-shrink: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.select-chevron.rotated {
  transform: translateY(-50%) rotate(180deg);
}

.select-chevron.rotated {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(25, 25, 25, 0.95);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-family: 'PP Mori', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 140%;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.2s;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 1);
}

/* Vue transition для плавной анимации */
.dropdown-enter-active {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-leave-active {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-enter-from {
  opacity: 0;
  transform: translateY(-12px);
}

.dropdown-leave-to {
  opacity: 0;
  transform: translateY(-8px);
}

.dropdown-enter-to,
.dropdown-leave-from {
  opacity: 1;
  transform: translateY(0);
}

.form-textarea {
  resize: none;
  min-height: 80px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin-top: 0;
  margin-bottom: 0;
}

.checkbox-input { display: none; }

.checkbox-custom {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 6px;
  border: 2px solid rgba(255, 213, 138, 0.35);
  background: transparent;
  margin: 0;
  margin-top: -2px;
  transition: all 0.2s;
  position: relative;
  flex-shrink: 0;
}

.checkbox-input:checked + .checkbox-custom {
  background: linear-gradient(90deg, #FFD58A 0%, #FFA92C 100%);
  border-color: rgba(255, 213, 138, 0.85);
}

.checkbox-input:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: 2px solid #191919;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.consent-text {
  font-family: 'PP Mori', sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 150%;
  color: rgba(255, 255, 255, 0.38);
}

.consent-text a {
  color: rgba(255, 213, 138, 0.65);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Honeypot — visually hidden from humans, visible to dumb bots */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.btn-submit-wrapper {
  position: relative;
  display: inline-block;
}

@media (max-width: 1024px) {
  .btn-submit-wrapper {
    display: flex;
    justify-content: flex-start;
    width: 100%;
  }
}

.btn-submit {
  width: 301px;
  height: 56px;
  padding: 0 110px;
  border-radius: 48px;
  background: linear-gradient(90deg, #FFD58A 0%, #FFA92C 50%, #FFD58A 100%);
  background-size: 200% 100%; /* ← Для анимации */
  border: 2px solid #FFD58A;
  box-shadow: 0px 0px 74px 0px rgba(255, 169, 44, 0.5), 0px 0px 38px 0px rgba(0, 0, 0, 0.25);
  font-family: 'PP Mori', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: rgba(0, 0, 0, 0.85);
  cursor: pointer;
  transition: all 0.3s;
  margin-top: -6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.submit-hint {
  position: absolute;
  bottom: calc(100% + 12px);
  left: -20px;
  background: rgba(25, 25, 25, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 20px;
  font-family: 'PP Mori', sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 120%;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.85);
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  text-align: center;
  width: max-content;
  max-width: 350px;
  white-space: normal;
}

/* Vue transition для плавной анимации подсказки */
.hint-fade-enter-active {
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hint-fade-leave-active {
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hint-fade-enter-from {
  opacity: 0;
  margin-bottom: -6px;
}

.hint-fade-enter-to {
  opacity: 1;
  margin-bottom: 0px;
}

.hint-fade-leave-from {
  opacity: 1;
  margin-bottom: 0px;
}

.hint-fade-leave-to {
  opacity: 0;
  margin-bottom: 4px;
}

.submit-hint::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(25, 25, 25, 0.95);
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 169, 44, 0.4);
  animation: gradientShift 3s ease infinite; /* ← Анимация градиента */
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.btn-submit {
  background: linear-gradient(90deg, #FFD58A 0%, #FFA92C 50%, #FFD58A 100%);
  background-size: 200% 100%; /* ← Для анимации */
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ===== BOTTOM ===== */
.footer-bottom {
  padding: 28px 0 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 60px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  width: 244px;
  height: 37px;
}

.footer-tagline {
  font-family: 'PP Mori', sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 160%;
  color: rgba(255, 255, 255, 0.3);
  max-width: 280px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}

.footer-links a {
  font-family: 'PP Mori', sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 120%;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s;
}

.footer-copyright {
  font-family: 'PP Mori', sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 120%;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.5);
}

.footer-links a:hover {
  color: rgba(255, 213, 138, 1);
}

/* Responsive */
@media (max-width: 1024px) {
  /* На мобильных показываем dots */
  .footer-dots { 
    display: block;
    /* Плавный переход прозрачности по верхней и нижней границе */
    mask-image: linear-gradient(
      to bottom,
      transparent 0%,
      black 5%,
      black 95%,
      transparent 100%
    );
    -webkit-mask-image: linear-gradient(
      to bottom,
      transparent 0%,
      black 5%,
      black 95%,
      transparent 100%
    );
  }

  /* Одна колонка только когда НЕ планшет landscape (ниже 768 или portrait) */
  .footer-top-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  /* Скрываем desktop элементы на мобильных */
  .desktop-social,
  .desktop-address,
  .desktop-skolkovo {
    display: none;
  }

  /* Показываем mobile элементы */
  .footer-mobile-extra {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .mobile-social.social-links {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 12px;
    justify-content: flex-start;
    align-items: center;
  }

  .mobile-social .social-link {
    display: flex;
    flex-shrink: 0;
  }

  .mobile-address,
  .mobile-skolkovo {
    display: block;
  }

  .mobile-address {
    display: flex;
    align-items: flex-start;
    gap: 8px;
  }

  .mobile-address p {
    font-size: 11px;
    line-height: 1.4;
    flex: 1;
  }

  .mobile-skolkovo {
    width: 156px;
    height: 74px;
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .mobile-skolkovo span {
    white-space: normal;
    word-wrap: break-word;
    display: block;
  }

  .footer-bottom-inner {
    flex-direction: column;
    gap: 28px;
  }

  .footer-links { align-items: flex-start; }
}

/* Планшет (iPad Mini и др.) в landscape: две колонки — слева адрес (3 строки), соц.кнопки, Сколково; справа форма. Не пересекается с мобильным (там по высоте/ширине <768). */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .footer-top-inner {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 48px;
    align-items: start;
  }

  .desktop-social,
  .desktop-address,
  .desktop-skolkovo {
    display: flex !important;
  }

  .footer-mobile-extra {
    display: none !important;
  }

  .footer-address.desktop-address p {
    line-height: 1.45;
    font-size: 13px;
  }

  /* Низ футера как на планшетах: лого и текст слева, ссылки справа */
  .footer-bottom-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
  }

  .footer-links {
    align-items: flex-end;
    text-align: right;
  }
}

@media (min-width: 1025px) {
  /* Скрываем mobile элементы на десктопе */
  .footer-mobile-extra {
    display: none;
  }
}

@media (max-width: 640px) {
  .footer { margin-top: 80px; }
  .cta-title { font-size: 22px; word-break: normal; overflow-wrap: break-word; }
  .footer-right,
  .form-grid,
  .form-select-wrapper,
  .textarea-wrap,
  .input-glow-wrap {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .form-grid { grid-template-columns: 1fr; }
  .form-input,
  .form-select,
  .form-textarea {
    width: 100%;
    max-width: 100%;
    padding: 14px 16px;
    box-sizing: border-box;
  }
  .checkbox-label { max-width: 100%; }
  
  /* Tooltip на мобильных — поверх всего, по центру кнопки */
  .submit-hint {
    left: 50%;
    transform: translateX(-50%);
    max-width: 280px;
    z-index: 9999;
    bottom: calc(100% + 16px);
  }

  /* Стрелочка тоже центруется автоматически через left:50% выше */
  
  /* Порядок на мобильных: Заголовок → Форма → Соц.кнопки → Адрес → Сколково */
  .footer-top-inner {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }
  
  .footer-left {
    order: 1;
  }
  
  .footer-right {
    order: 2;
  }
  
  .footer-mobile-extra {
    order: 3;
    gap: 20px;
  }
}

/* footer-static append: restore flex+gap inside the <form> wrapper */
.footer-static-form {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
}
.footer-static-form__status {
  margin: -10px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
}
.footer-static-form__status.success {
  background: rgba(255, 213, 138, 0.08);
  border: 1px solid rgba(255, 213, 138, 0.3);
  color: #FFD58A;
}
.footer-static-form__status.error {
  background: rgba(255, 80, 80, 0.08);
  border: 1px solid rgba(255, 80, 80, 0.4);
  color: #ff8080;
}
