/*
  cta.css and footer share this file so the closing band stays one module.
  Footer logo follows the same lockup rules as the header: supplied PNG,
  correct colour for the surface, width at or above 120px, height auto.
*/

.final-cta,
.site-footer {
  border-top: 1px solid var(--border);
}

.site-footer {
  background: var(--bg);
}

.final-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--header-offset) 0 2rem;
}

.cta-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.cta-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.final-cta h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
}

.final-cta .lede {
  max-width: none;
}

@media (max-width: 860px) {
  .cta-layout {
    grid-template-columns: 1fr;
  }
}

/*
  The footer is the last band, not a full-screen section. It runs edge to edge
  and ends at the bottom of the page, so nothing sits underneath it.
  The giant wordmark is decorative and clipped by overflow.
*/
.site-footer {
  position: relative;
  z-index: 2;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  scroll-snap-align: none;
}

.footer-shell {
  width: 100%;
  padding: 4rem var(--shell-inset) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  max-width: 24rem;
}

.footer-lockup {
  display: flex;
  align-items: center;
}

.footer-lockup img {
  width: 160px;
  height: auto;
}

.footer-brand > p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5rem;
  white-space: pre-line;
}

.footer-subscribe {
  display: flex;
  width: 100%;
  gap: 0.5rem;
}

.footer-subscribe input {
  flex: 1;
  min-width: 0;
  height: 2.75rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
}

.footer-subscribe input::placeholder {
  color: var(--text-muted);
}

.footer-subscribe button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--on-accent);
}

.footer-subscribe button:hover {
  background: var(--orange-minus-600);
}

.footer-subscribe button svg {
  width: 1rem;
  height: 1rem;
}

.footer-form-status {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

.footer-form-status:empty {
  display: none;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
}

.footer-socials a:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.footer-socials svg {
  width: 1.5rem;
  height: 1.5rem;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.footer-nav h2 {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  letter-spacing: 0;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.25rem;
  transition: color 0.15s ease;
}

.footer-nav a:hover {
  color: var(--text);
}

.acknowledgement {
  margin: 2.5rem 0 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-bottom a:hover {
  color: var(--text);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.25rem;
  margin: 0;
}

.footer-credit {
  margin: 0;
}

.footer-credit a {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.footer-mark-wrap {
  container-type: inline-size;
  pointer-events: none;
  user-select: none;
}

.footer-mark {
  margin-bottom: -0.22em;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(2rem, 8vw, 12rem);
  font-size: clamp(1.85rem, 11.2cqi, 18rem);
  line-height: 0.82;
  letter-spacing: -0.05em;
  text-align: center;
  white-space: nowrap;
  background-image: linear-gradient(to bottom, color-mix(in srgb, var(--text) 15%, transparent), transparent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 639px) {
  .footer-nav {
    display: none;
  }
}

@media (min-width: 640px) {
  .footer-shell {
    padding-top: 5rem;
  }

  .footer-nav {
    justify-self: end;
    width: max-content;
    max-width: 100%;
    grid-template-columns: repeat(3, max-content);
    column-gap: 2.5rem;
    text-align: right;
  }

  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
    align-items: start;
  }
}
