/* ── Site footer (shared by every page) ──
   The page above ends in rounded corners that sit over the dark footer.
   Set --footer-cap on .site-footer to the background colour of the section above it. */
.site-footer {
  --footer-bg: #4D1722;
  --footer-fg: #D6F1FF;
  --footer-cap: #D6F1FF;
  background: var(--footer-bg);
  color: var(--footer-fg);
  font-family: 'Fustat', system-ui, -apple-system, sans-serif;
}
.site-footer-cap {
  height: clamp(40px, 5vw, 72px);
  background: var(--footer-cap);
  border-radius: 0 0 clamp(32px, 4vw, 64px) clamp(32px, 4vw, 64px);
}
.site-footer-inner {
  box-sizing: border-box;
  padding: clamp(28px, 4vw, 56px) 40px 32px;
}
.site-footer-logo {
  display: block;
  width: 100%;
  height: auto;
}
/* the original <img> stays in the page once footer.js has swapped in the animated SVG */
.site-footer-logo[hidden] { display: none; }
/* letters rise into place one after another (footer.js swaps in the inline SVG) */
.site-footer-letters {
  overflow: visible;
  /* hide letters below the baseline, but let the springy overshoot poke above the top */
  clip-path: inset(-25% -2% 0 -2%);
}
.site-footer-letters.is-armed path {
  transform-box: fill-box;
  transform: translateY(115%);
  transition: transform 900ms cubic-bezier(.3,1.35,.45,1) calc(var(--i, 0) * 55ms);
}
.site-footer-letters.is-armed.is-in path { transform: none; }

.site-footer-mid {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-top: clamp(56px, 7vw, 112px);
}
.site-footer-note {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
}
.site-footer-cta {
  appearance: none;
  background: none;
  border: 0;
  margin: 0;
  font-family: inherit;
  line-height: 1.15;
  cursor: pointer;
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 800;
  letter-spacing: -1px;
  white-space: nowrap;
}
.site-footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin-top: 56px;
  font-size: 16px;
  font-weight: 500;
}
.site-footer-time { font-weight: 700; }
.site-footer-social {
  justify-self: end;
  display: flex;
  gap: clamp(20px, 3vw, 48px);
}

/* "get in touch" slides up and "copy email" slides in from below */
.cta-swap {
  display: inline-grid;
  overflow: hidden;
  vertical-align: bottom;
}
.cta-a, .cta-b {
  grid-area: 1 / 1;
  justify-self: end;
  transition: transform 380ms cubic-bezier(.65,0,.35,1);
}
.cta-b { transform: translateY(105%); }
.site-footer-cta:hover .cta-a,
.site-footer-cta:focus-visible .cta-a,
.site-footer-cta.is-copied .cta-a { transform: translateY(-105%); }
.site-footer-cta:hover .cta-b,
.site-footer-cta:focus-visible .cta-b,
.site-footer-cta.is-copied .cta-b { transform: none; }
@media (max-width: 700px) {
  .cta-a, .cta-b { justify-self: start; }
}

/* same sweep-in underline as the nav links */
.site-footer-link {
  position: relative;
  color: var(--footer-fg);
  text-decoration: none;
  padding: 2px 0;
}
.site-footer-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--footer-fg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1);
}
.site-footer-cta.site-footer-link::after { height: 2.5px; }
.site-footer-link:hover::after,
.site-footer-link:focus-visible::after { transform: scaleX(1); }
.site-footer-link:focus-visible { outline: none; }

@media (max-width: 700px) {
  .site-footer-inner { padding: 28px 20px 28px; }
  .site-footer-mid { flex-direction: column; align-items: flex-start; gap: 20px; margin-top: 48px; }
  .site-footer-bottom { grid-template-columns: 1fr; gap: 14px; margin-top: 40px; }
  .site-footer-social { justify-self: start; }
}

/* compact footer (case study pages): no big logo, so the note row starts at the top */
.site-footer--compact .site-footer-mid { margin-top: 0; }
