.site-footer {
  padding: clamp(64px, 7vw, 92px) 0 40px;
  background: var(--paper);
  color: var(--ink);
  border-top: 1px solid rgba(16, 42, 67, 0.08);
}

.site-footer__inner {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.site-footer__main {
  display: grid;
  grid-template-columns: minmax(340px, 1.35fr) minmax(190px, 0.75fr) minmax(260px, 1fr);
  gap: clamp(52px, 8vw, 120px);
  align-items: start;
}

.site-footer__column {
  min-width: 0;
}

.site-footer__column--brand {
  max-width: 460px;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.55rem;
}

.site-footer__logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
}

.site-footer__brand-name {
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.site-footer__heading {
  margin: 0 0 1.25rem;
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--ink);
}

/* TYPO3 footer content reset */
.site-footer .frame,
.site-footer .ce-textpic,
.site-footer .ce-bodytext,
.site-footer .frame-container,
.site-footer .frame-inner {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.site-footer .frame + .frame {
  margin-top: 1rem;
}

.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4 {
  margin: 0 0 0.8rem;
  font-family: var(--ff-sans);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.35;
  color: var(--ink);
}

.site-footer p {
  margin: 0;
  max-width: 430px;
  color: rgba(16, 42, 67, 0.64);
  font-size: 0.98rem;
  line-height: 1.75;
}

.site-footer p + p {
  margin-top: 0.75rem;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0.72rem;
}

.site-footer a {
  color: rgba(16, 42, 67, 0.66);
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--terracotta);
}

/* Contact CTA: wrapper must never look like a button */
.site-footer__contact {
  display: block;
  width: auto;
  margin-top: 1.25rem;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.site-footer__contact > * {
  display: inline-flex;
  width: auto;
  max-width: max-content;
  margin: 0;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Contact CTA: only the anchor is the button */
.site-footer__contact .button,
.site-footer__contact a.button,
.site-footer__contact a.contact-trigger {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  max-width: max-content !important;
  min-height: 48px;
  padding: 0.8rem 1.25rem !important;
  border-radius: 999px;
  border: 0 !important;
  background: var(--terracotta) !important;
  color: var(--white) !important;
  font-weight: 800;
  line-height: 1;
  text-decoration: none !important;
  box-shadow: 0 14px 30px rgba(199, 103, 69, 0.18) !important;
}

.site-footer__contact .button:hover,
.site-footer__contact a.button:hover,
.site-footer__contact a.contact-trigger:hover {
  color: var(--white) !important;
}

.site-footer__contact-row {
  margin-top: clamp(28px, 4vw, 44px);
}

.site-footer__contact-row:empty {
  display: none;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  margin-top: clamp(44px, 6vw, 68px);
  padding-top: 24px;
  border-top: 1px solid rgba(16, 42, 67, 0.1);
  color: rgba(16, 42, 67, 0.55);
  font-size: 0.92rem;
}

.site-footer__bottom p {
  max-width: none;
  font-size: 0.92rem;
  line-height: 1.5;
}

.site-footer__bottom-left,
.site-footer__bottom-right {
  min-width: 0;
}

.site-footer__bottom-right {
  text-align: right;
}

.contact-modal[hidden] {
  display: none;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 42, 67, 0.72);
}

.contact-modal__panel {
  position: relative;
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  margin: 32px auto;
  padding: 32px;
  border-radius: 24px;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.contact-modal__close {
  margin-left: auto;
  display: block;
}

@media (max-width: 920px) {
  .site-footer__main {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .site-footer__column--brand {
    max-width: none;
  }

  .site-footer__bottom {
    flex-direction: column;
  }

  .site-footer__bottom-right {
    text-align: left;
  }
}

.footer-link-ce {
  margin: 0 0 12px;
}

.footer-link-ce__link {
  display: inline-flex;
  color: #fffdfa;
  font-weight: 900;
  text-decoration: none;
}

.footer-link-ce__link:hover {
  color: #e5b092;
}

.footer-link-ce__text {
  margin: 5px 0 0;
  color: rgba(255, 253, 250, 0.72);
  font-size: 0.9rem;
  line-height: 1.45;
}


/* Messy Middle design system: footer button consistency */
.site-footer a[href*="contact"],
.site-footer .button,
.site-footer .btn,
.site-footer .cta,
.site-footer__button {
  background: var(--ek-colour-primary, #172239);
  color: var(--ek-colour-light, #fffdfa);
  border-color: var(--ek-colour-primary, #172239);
}

.site-footer a[href*="contact"]:hover,
.site-footer .button:hover,
.site-footer .btn:hover,
.site-footer .cta:hover,
.site-footer__button:hover {
  background: transparent;
  color: var(--ek-colour-primary, #172239);
}
