.ipm-footer {
  --ipm-footer-bg: var(--footer);
  --ipm-footer-link: var(--primary);
  --ipm-footer-text: var(--white);
  --ipm-footer-border: rgba(255, 255, 255, .18);

  color: var(--ipm-footer-text);
  font-family: var(--ip-font-body);
  background: var(--ipm-footer-bg);
}

.ipm-footer__container {
  width: min(var(--ip-container), calc(100% - 60px));
  margin-inline: auto;
}

.ipm-footer-newsletter {
  position: relative;
  overflow: hidden;
  background-color: var(--ipm-footer-bg);
  background-image: var(--ipm-footer-newsletter-image);
  background-position: 125% center;
  background-repeat: no-repeat;
  background-size: min(1075px, 72vw) auto;
  border-bottom: 1px solid var(--ipm-footer-border);
}

.ipm-footer-newsletter__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(420px, 1.2fr);
  align-items: center;
  gap: 30px;
  min-height: 190px;
  padding: 50px 30px;
}

.ipm-footer-newsletter__copy {
  max-width: 570px;
}

.ipm-footer-newsletter__copy h2 {
  margin: 0;
  color: var(--ipm-footer-text);
  font-family: var(--ip-font-body);
  font-size: var(--h-2);
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1.12;
}

.ipm-footer-newsletter__copy p {
  max-width: 520px;
  margin: 10px 0 0;
  color: var(--ipm-footer-text);
  font-size: var(--text-l);
  letter-spacing: .04em;
  line-height: 1.45;
}

.ipm-footer-newsletter__form {
  display: flex;
  align-items: stretch;
  gap: 20px;
  min-width: 0;
}

.ipm-footer-newsletter__form input {
  min-width: 0;
  flex: 1 1 auto;
  min-height: 56px;
  padding: 0 20px;
  color: var(--ip-text);
  background: var(--white);
  border: 1px solid var(--white);
  border-radius: 10px;
  outline: none;
  font: inherit;
  font-size: var(--text-s);
  font-weight: 500;
  letter-spacing: .04em;
}

.ipm-footer-newsletter__form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 196, 248, .25);
}

.ipm-footer-newsletter__form button {
  flex: 0 0 auto;
  min-height: 56px;
  padding: 0 26px;
  color: var(--white);
  background: var(--primary);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: var(--text-m);
  font-weight: 700;
  letter-spacing: .04em;
  transition: background-color .18s ease, transform .18s ease;
}

.ipm-footer-newsletter__form button:hover,
.ipm-footer-newsletter__form button:focus-visible {
  background: var(--white);
  color: var(--footer);
  transform: translateY(-1px);
}

.ipm-footer-newsletter__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: 14px;
  min-height: 56px;
  padding: 0 26px;
  color: var(--footer);
  background: var(--primary);
  border-radius: 10px;
  font-size: var(--text-m);
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.ipm-footer-newsletter__link:hover,
.ipm-footer-newsletter__link:focus-visible {
  color: var(--footer);
  background: var(--white);
  transform: translateY(-1px);
}

.ipm-footer-newsletter__link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform .18s ease;
}

.ipm-footer-newsletter__link:hover svg,
.ipm-footer-newsletter__link:focus-visible svg {
  transform: translateX(3px);
}

.ipm-footer-newsletter__form button:focus-visible,
.ipm-footer a:focus-visible,
.ipm-footer summary:focus-visible {
  outline: 3px solid rgba(0, 196, 248, .55);
  outline-offset: 3px;
}

.ipm-footer-newsletter__message {
  grid-column: 2;
  margin: -14px 0 0;
  font-size: var(--text-xs);
}

.ipm-footer-newsletter__message--success {
  color: var(--primary);
}


.ipm-footer-main {
  background: var(--ipm-footer-bg);
  border-bottom: 1px solid var(--ipm-footer-border);
}

.ipm-footer-main__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 25px;
  padding: 40px 30px;
}

.ipm-footer-main__intro {
  min-width: 0;
  padding: 0 15% 0 0;
}

.ipm-footer__logo {
  display: inline-flex;
  width: 200px;
  max-width: 100%;
  text-decoration: none;
}

.ipm-footer__logo-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.ipm-footer__wordmark {
  color: var(--ipm-footer-text);
  font-family: var(--ip-font-body);
  font-size: var(--h-2);
  font-weight: 800;
  text-decoration: none;
}

.ipm-footer-main__description {
  padding: 20px 30px 20px 0;
  color: var(--ipm-footer-text);
  font-size: var(--text-s);
  line-height: 1.6;
}

.ipm-footer-main__description p {
  margin: 0 0 18px;
}

.ipm-footer-main__description p:last-child {
  margin-bottom: 0;
}

.ipm-footer-column {
  min-width: 0;
}

.ipm-footer-column h2 {
  margin: 30px 0;
  color: var(--ipm-footer-text);
  font-family: var(--ip-font-body);
  font-size: var(--text-m);
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.2;
}

.ipm-footer__menu {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ipm-footer__menu li {
  margin: 0;
  padding: 0;
}

.ipm-footer__menu a {
  color: var(--ipm-footer-link);
  font-size: var(--text-s);
  line-height: 1.4;
  text-decoration: none;
  transition: color .18s ease;
}

.ipm-footer__menu a:hover,
.ipm-footer__menu a:focus-visible {
  color: var(--white);
}

.ipm-footer__mobile-nav {
  display: none;
}

.ipm-footer__mobile-nav summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  color: var(--ipm-footer-text);
  cursor: pointer;
  font-size: var(--text-l);
  font-weight: 700;
  letter-spacing: .05em;
  list-style: none;
}

.ipm-footer__mobile-nav summary::-webkit-details-marker {
  display: none;
}

.ipm-footer__mobile-nav summary span {
  position: relative;
  width: 18px;
  height: 18px;
}

.ipm-footer__mobile-nav summary span::before,
.ipm-footer__mobile-nav summary span::after {
  position: absolute;
  top: 8px;
  left: 1px;
  width: 16px;
  height: 2px;
  background: currentColor;
  content: "";
  transition: transform .18s ease;
}

.ipm-footer__mobile-nav summary span::after {
  transform: rotate(90deg);
}

.ipm-footer__mobile-nav[open] summary span::after {
  transform: rotate(0);
}

.ipm-footer__mobile-nav nav {
  padding: 0 0 10px;
}

.ipm-footer-contact {
  display: grid;
  gap: 15px;
}

.ipm-footer-contact a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ipm-footer-link);
  font-size: var(--text-xs);
  line-height: 1.45;
  text-decoration: none;
  transition: color .18s ease;
}

.ipm-footer-contact a:hover,
.ipm-footer-contact a:focus-visible {
  color: var(--white);
}

.ipm-footer-contact svg {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.ipm-footer-social {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 0;
}

.ipm-footer-social a {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--ipm-footer-link);
  text-decoration: none;
  transition: color .18s ease, transform .18s ease;
}

.ipm-footer-social a:hover,
.ipm-footer-social a:focus-visible {
  color: var(--white);
  transform: translateY(-1px);
}

.ipm-footer-social svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.ipm-footer-legal {
  background: var(--ipm-footer-bg);
}

.ipm-footer-legal .ipm-footer__container {
  padding: 20px 0;
}

.ipm-footer-legal p {
  margin: 0;
  color: var(--ipm-footer-text);
  font-size: var(--text-2xs);
  letter-spacing: .06em;
  line-height: 1.4;
  text-align: left;
}

.ipm-footer__screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1020px) {
  .ipm-footer-newsletter {
    background-position: 100% center;
    background-size: 500px auto;
  }

  .ipm-footer-newsletter__inner {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-inline: 30px;
  }

  .ipm-footer-newsletter__message {
    grid-column: auto;
    margin: -6px 0 0;
  }

  .ipm-footer-main__grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding-inline: 30px;
  }

  .ipm-footer-main__intro {
    padding-right: 0;
  }

  .ipm-footer-column h2 {
    display: none;
  }

  .ipm-footer__desktop-nav {
    display: none;
  }

  .ipm-footer__mobile-nav {
    display: block;
    border-bottom: 1px solid var(--ipm-footer-border);
  }

  .ipm-footer-column--contact h2 {
    display: block;
    margin: 20px 0 15px;
  }

  .ipm-footer-main__description {
    padding: 20px 0 5px;
  }
}

@media (max-width: 650px) {
  .ipm-footer__container {
    width: min(var(--ip-container, 1540px), calc(100% - 28px));
  }

  .ipm-footer-newsletter {
    background-position: 100% 100%;
    background-size: 300px auto;
  }

  .ipm-footer-newsletter__inner {
    min-height: 0;
    padding: 25px 0 32px;
  }

  .ipm-footer-newsletter__copy h2 {
    font-size: var(--text-2xl);
  }

  .ipm-footer-newsletter__copy p {
    font-size: var(--text-m);
  }

  .ipm-footer-newsletter__form {
    flex-direction: column;
    gap: 12px;
  }

  .ipm-footer-newsletter__form input,
  .ipm-footer-newsletter__form button {
    width: 100%;
  }

  .ipm-footer-main__grid {
    padding: 30px 0 10px;
  }

  .ipm-footer__logo {
    width: 150px;
  }

  .ipm-footer-column--contact h2 {
    margin-top: 15px;
    margin-bottom: 25px;
    font-size: var(--text-l);
  }

  .ipm-footer-contact a {
    font-size: var(--text-s);
  }

  .ipm-footer-social {
    justify-content: center;
    margin-top: 5px;
  }

  .ipm-footer-legal .ipm-footer__container {
    padding: 20px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ipm-footer-newsletter__form button,
  .ipm-footer-social a,
  .ipm-footer__menu a {
    transition: none;
  }
}
