:root {
  --container-padding: 30px;
  --radius-lg: 60px;
  --radius-md: 12px;
  --radius-sm: 6px;
  --color-bg: #f7f8fc;
  --color-soft: #f3f4fb;
  --color-white: #ffffff;
  --color-primary: #041b4e;
  --color-text: #1c1c1c;
  --color-muted: #33456e;
  --color-input: #edf3fc;
}

.header .container,
.footer .container {
  width: 100%;
  max-width: 1920px;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  margin: 0 auto;
}

.header {
  font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  position: sticky;
  top: 0;
  z-index: 50;
  background: url("../img/header-bg.png") center top / 1920px 85px no-repeat, var(--color-white);
  border-bottom: 0.5px solid rgba(4, 27, 78, 0.12);
}

.header__inner {
  height: 85px;
  display: flex;
  align-items: center;
  gap: 32px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.brand__logo {
  width: 96px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--color-primary);
  color: #fff;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: 10px;
}

.brand__divider {
  width: 2px;
  height: 40px;
  object-fit: contain;
}

.brand__tagline {
  width: 117px;
  font-weight: 800;
  font-size: 10px;
  line-height: 1.1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 50px;
}

.nav__link {
  font-weight: 600;
  font-size: 20px;
  color: var(--color-primary);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.nav__caret {
  display: inline-block;
  width: 9.596px;
  height: 4.798px;
  margin-left: 15px;
  object-fit: contain;
  flex: 0 0 auto;
}

.header__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.header__phone {
  font-weight: 600;
  font-size: 20px;
  color: var(--color-primary);
  white-space: nowrap;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.burger {
  display: none;
}

.mobile-menu {
  display: none;
}

.icon-btn {
  width: 51px;
  height: 51px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn__img {
  width: 51.19px;
  height: 51.19px;
  object-fit: contain;
}

.btn__arrow {
  width: 18.385px;
  height: 7.364px;
  object-fit: contain;
  max-width: none;
}

.btn--header {
  width: 312px;
  height: 45px;
}

.btn__label {
  display: inline-block;
}

.btn {
  height: 45px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 500;
  font-size: 14px;
  line-height: 21.7px;
  border: 1px solid transparent;
  transition: filter 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

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

.btn:hover {
  filter: brightness(0.98);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible,
.nav__link:focus-visible,
.footer__link:focus-visible,
.icon-btn:focus-visible {
  outline: 2px solid #4081fd;
  outline-offset: 2px;
}

.nav__link,
.footer__link {
  transition: opacity 150ms ease, border-color 150ms ease;
}

.nav__link:hover,
.footer__link:hover {
  opacity: 0.85;
}

.footer {
  font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  padding: 60px 0;
}

.footer__inner {
  display: grid;
  gap: 30px;
}

.footer__top {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 60px;
}

.footer__contacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 60px;
  grid-column: span 2;
  min-width: 0;
}

.footer__brand {
  align-items: center;
}

.footer__services {
  padding-top: 8px;
}

.footer__contact {
  padding-top: 8px;
}

.footer__contact-card {
  width: 100%;
  height: 209.59px;
  border-radius: 16px;
  background: #ebedff;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer__contact-label {
  font-size: 10px;
  line-height: 16px;
  color: var(--color-text);
  margin: 0 0 8px;
  padding: 0;
}

.footer__pill {
  display: block;
  background: transparent;
  color: var(--color-text);
  font-size: 16px;
  line-height: 24.8px;
  margin: 0;
  padding: 0;
  width: 344px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer__icon {
  position: static;
  width: 51.19px;
  height: 51.19px;
  margin: 0 0 54px;
}

.footer__icon .icon-btn__img {
  width: 51.19px;
  height: 51.19px;
  max-width: none;
}

.footer__title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 14px;
}

.footer__link {
  display: block;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.1;
  margin-top: 12px;
  color: #111;
}

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

.footer__small {
  font-size: 10px;
  font-weight: 400;
  color: var(--color-primary);
}

@media (max-width: 1280px) {
  .header .container,
  .footer .container {
    max-width: 1280px;
  }

  .footer__inner {
    grid-template-columns: 1fr;
  }

  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer__contacts {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

@media (max-width: 1200px) {
  .header__inner {
    gap: 18px;
  }

  .brand__tagline {
    display: none;
  }

  .nav {
    gap: 24px;
  }

  .nav__link {
    font-size: 18px;
  }

  .header__phone {
    display: none;
  }

  .header__right {
    gap: 12px;
  }

  .icon-btn {
    width: 44px;
    height: 44px;
  }

  .icon-btn__img {
    width: 44px;
    height: 44px;
  }

  .btn--header {
    width: auto;
    padding: 0 16px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: 20px;
    --radius-lg: 30px;
  }

  .header__inner {
    gap: 14px;
  }

  .burger {
    margin-left: auto;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(4, 27, 78, 0.18);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-direction: column;
    flex: 0 0 auto;
  }

  .burger span {
    width: 18px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
    display: block;
  }

  .nav,
  .header__right {
    display: none;
  }

  .mobile-menu {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 120;
    opacity: 0;
    visibility: hidden;
    transition: opacity 150ms ease, visibility 150ms ease;
  }

  .mobile-menu__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 27, 78, 0.25);
  }

  .mobile-menu__panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(360px, 100%);
    background: #fff;
    padding: 20px;
    transform: translateX(100%);
    max-width: 100vw;
    box-sizing: border-box;
    transition: transform 150ms ease;
    display: grid;
    align-content: start;
    gap: 16px;
  }

  .mobile-menu__close {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(4, 27, 78, 0.18);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    font-size: 22px;
    line-height: 1;
    color: var(--color-primary);
  }

  .mobile-menu__nav {
    display: grid;
    gap: 14px;
  }

  .mobile-menu__link {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-primary);
  }

  .mobile-menu__actions {
    display: grid;
    gap: 12px;
  }

  .mobile-menu__phone {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary);
  }

  .menu-toggle:checked ~ .mobile-menu {
    opacity: 1;
    visibility: visible;
  }

  .menu-toggle:checked ~ .mobile-menu .mobile-menu__panel {
    transform: translateX(0);
  }

  .footer__bottom a.footer__small {
    display: none;
  }

  .footer__copyright-year {
    display: block;
  }

  .footer__top {
    grid-template-columns: 150px 1fr;
    gap: 20px;
    grid-template-areas:
      "brand services"
      "contacts contacts";
    justify-items: stretch;
    align-items: stretch;
  }

  .footer {
    padding: 40px 0;
  }

  .footer__top > .footer__col {
    min-width: 0;
  }

  .footer__col--brand {
    grid-area: brand;
  }

  .footer__services {
    grid-area: services;
  }

  .footer__contacts {
    grid-area: contacts;
    grid-column: 1 / -1;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(10px, 3vw, 12px);
    justify-items: stretch;
    justify-self: stretch;
    align-self: stretch;
  }

  .footer__contact-card {
    width: 100%;
    height: auto;
    min-width: 0;
    padding: clamp(12px, 3.5vw, 18px);
    justify-self: stretch;
  }

  .footer__link {
    white-space: normal;
    overflow: visible;
    font-size: 12px;
    line-height: 1.2;
    word-break: break-word;
  }

  .footer__icon {
    width: clamp(36px, 10vw, 44px);
    height: clamp(36px, 10vw, 44px);
    margin: 0 0 12px;
  }

  .footer__pill {
    width: 100%;
    font-size: clamp(10px, 3.2vw, 12px);
    line-height: 1.25;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .brand__tagline {
    display: none;
  }

  .header__inner {
    gap: 14px;
  }

  .header__right {
    gap: 10px;
  }

  .btn--header {
    width: auto;
    padding: 0 14px;
    font-size: 12px;
    white-space: nowrap;
  }

  .icon-btn {
    width: 44px;
    height: 44px;
  }

  .icon-btn__img {
    width: 44px;
    height: 44px;
  }
}
