:root {
  --footer-shell-max: 1440px;
  --footer-content-width: 1276px;

  --footer-bg-fallback: #1f2221;
  --footer-text-dim: rgba(255, 255, 255, 0.75);
  --footer-text-dimmer: rgba(255, 255, 255, 0.5);
  --footer-font-sans: var(--font-sans, "Inter", system-ui, -apple-system, "Segoe UI", sans-serif);
}

.site-footer {
  color: #fff;
  background-color: var(--footer-bg-fallback);
  /* Figma background gradient (radial) exported as SVG data URI for pixel-perfect match. */
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 1440 246' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><rect x='0' y='0' width='100%' height='100%' fill='url(%23grad)' opacity='1'/><defs><radialGradient id='grad' gradientUnits='userSpaceOnUse' cx='0' cy='0' r='10' gradientTransform='matrix(144 12.3 -4.2352 88.148 0 0)'><stop stop-color='rgba(61,64,63,1)' offset='0'/><stop stop-color='rgba(46,49,48,1)' offset='0.5'/><stop stop-color='rgba(31,34,33,1)' offset='1'/></radialGradient></defs></svg>");
  background-size: 100% 246px;
  background-repeat: no-repeat;
}

.site-footer__stage {
  position: relative;
  max-width: var(--footer-shell-max);
  margin-inline: auto;
  height: 246px;
  font-family: var(--footer-font-sans);
}

.site-footer__brand {
  position: absolute;
  left: 82px;
  top: 40px;
  width: 196px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.site-footer__logo {
  width: 196px;
  height: 42px;
}

.site-footer__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-footer__contacts {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-style: normal;
}

.site-footer__phone {
  margin: 0;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  color: #ffffff;
}

.site-footer__email {
  margin: 0;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.2;
  color: var(--footer-text-dim);
}

.site-footer__contacts a {
  color: inherit;
  text-decoration: none;
  outline-offset: 2px;
}

.site-footer__contacts a:focus-visible {
  outline: 2px solid #de6814;
}

.site-footer__nav {
  position: absolute;
  left: 406px;
  top: 40px;
  width: 618px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: flex-start;
}

.site-footer__nav-columns {
  display: flex;
  gap: 20px;
  width: 100%;
}

.site-footer__nav-col {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer__nav-link {
  font-weight: 400;
  font-size: 18px;
  line-height: normal;
  color: var(--footer-text-dim);
  text-decoration: none;
  outline-offset: 2px;
}

.site-footer__nav-link:hover {
  color: #ffffff;
}

.site-footer__nav-link:focus-visible {
  outline: 2px solid #de6814;
}

.site-footer__cta {
  position: absolute;
  left: 1162px;
  top: 40px;
  width: 196px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-footer__cta-button {
  width: 196px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  background: #ffffff;
  color: #0e0f0f;
  font-weight: 600;
  font-size: 16px;
  line-height: normal;
  text-decoration: none;
  outline-offset: 2px;
  border: 0;
  cursor: pointer;
}

.site-footer__cta-button:focus-visible {
  outline: 2px solid #0e0f0f;
}

.site-footer__bottom {
  position: absolute;
  left: 50%;
  top: 203px;
  transform: translateX(-50%);
  width: var(--footer-content-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 0;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.2;
  color: var(--footer-text-dimmer);
}

.site-footer__legal {
  margin: 0;
}

.site-footer__inn {
  margin: 0;
  white-space: nowrap;
}

.site-footer__privacy {
  color: var(--footer-text-dimmer);
  text-decoration: underline;
  text-underline-offset: 2px;
  outline-offset: 2px;
}

.site-footer__privacy:focus-visible {
  outline: 2px solid #de6814;
}

/* Responsive: switch from pixel-perfect absolute layout to flow layout. */
@media (max-width: 1360px) {
  .site-footer__stage {
    height: auto;
    padding: 32px clamp(16px, 5.69vw, 82px) 27px;
  }

  .site-footer__brand,
  .site-footer__nav,
  .site-footer__cta,
  .site-footer__bottom {
    position: static;
    left: auto;
    top: auto;
    width: auto;
    transform: none;
  }

  .site-footer__nav {
    width: 100%;
    margin-top: 8px;
  }

  .site-footer__nav-columns {
    justify-content: flex-start;
  }

  .site-footer__cta {
    width: 100%;
    justify-content: flex-start;
  }

  .site-footer__cta-button {
    width: 196px;
    max-width: 100%;
  }

  .site-footer__bottom {
    margin-top: 18px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .site-footer__inn {
    margin-left: auto;
  }
}

@media (max-width: 720px) {
  .site-footer__stage {
    padding-top: 28px;
  }

  .site-footer__brand {
    gap: 18px;
  }

  .site-footer__logo {
    width: 196px;
    height: 42px;
  }

  .site-footer__nav-columns {
    flex-direction: column;
    gap: 18px;
  }

  .site-footer__nav-col {
    gap: 12px;
  }

  .site-footer__bottom {
    gap: 12px;
  }

  .site-footer__inn {
    margin-left: 0;
  }
}

.callback-popup[hidden] {
  display: none !important;
}

.callback-popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.callback-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.callback-popup__dialog {
  position: relative;
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  margin: 12px auto;
  padding: 24px;
  border-radius: 20px;
  background: #fff;
  color: #333;
  overflow: auto;
  box-sizing: border-box;
}

.callback-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: #f2f2f2;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.callback-popup__title {
  margin: 0;
  font-size: 24px;
}

.callback-popup__subtitle {
  margin: 10px 0 16px;
  color: #666;
}

.callback-popup__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.callback-popup__contacts a {
  color: #de6814;
  text-decoration: none;
  font-weight: 600;
}

.callback-popup__messengers-hint {
  margin: 0 0 8px;
  font-size: 13px;
  color: #888;
}

.popup-messengers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: 0;
}

.callback-popup .popup-messengers {
  justify-content: flex-start;
  margin-bottom: 4px;
}

.popup-messengers__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: #f0f0f0;
  box-sizing: border-box;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.popup-messengers__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.popup-messengers__link:focus-visible {
  outline: 2px solid #de6814;
  outline-offset: 2px;
}

.popup-messengers__link--vk {
  background: #fff;
}

.popup-messengers__link img,
.popup-messengers__link svg {
  display: block;
  width: 28px;
  height: 28px;
}

.popup-messengers__link--vk img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  clip-path: inset(6.5% round 21%);
}

.callback-popup__form {
  display: grid;
  gap: 12px;
}

.callback-popup__field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #666;
}

.callback-popup__field input,
.callback-popup__field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d7d7d7;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

.callback-popup__field textarea {
  resize: vertical;
}

.callback-popup__submit {
  height: 48px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #dc6613 0%, #cc4c0a 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.callback-popup__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.callback-popup__status {
  margin-top: 12px;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.callback-popup__status--success {
  background: #e8f5e9;
  color: #2e7d32;
}

.callback-popup__status--error {
  background: #ffebee;
  color: #c62828;
}

.request-success-popup[hidden] {
  display: none !important;
}

.request-success-popup {
  position: fixed;
  inset: 0;
  z-index: 1100;
}

.request-success-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.request-success-popup__dialog {
  position: relative;
  width: min(480px, calc(100vw - 24px));
  margin: 12vh auto 0;
  padding: 24px;
  border-radius: 20px;
  background: #fff;
  color: #333;
  text-align: center;
  box-sizing: border-box;
}

.request-success-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: #f2f2f2;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.request-success-popup__title {
  margin: 0;
  font-size: 24px;
}

.request-success-popup__text {
  margin: 12px 0 0;
  color: #666;
}

.request-success-popup__messengers-hint {
  margin: 16px 0 0;
  font-size: 14px;
  color: #666;
}

.request-success-popup__messengers-wrap {
  margin-top: 8px;
}

.request-success-popup__messengers-wrap:empty {
  display: none;
}

.request-success-popup__button {
  margin-top: 20px;
  min-width: 140px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #dc6613 0%, #cc4c0a 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

