/* FOOTER */
.site-footer {
  background: var(--bg-footer);
  color: var(--cg-70);
  border-top: 2px solid var(--maps-orange);
}
.site-footer .container {
  /* Pull the footer in ~5% on each side for breathing room */
  padding-left: clamp(48px, 5vw, 96px);
  padding-right: clamp(48px, 5vw, 96px);
}
.footer-upper {
  padding: 72px 0 56px;
  display: grid;
  grid-template-columns: 1.9fr 1fr 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.footer-brand {
  /* gutter handled by .site-footer .container */
}
.footer-brand .wordmark {
  display: block;
  height: 26px;
  width: auto;
  margin-bottom: 24px;
  color: #fff;
}
.footer-brand p {
  font-size: 13px;
  line-height: 22px;
  color: var(--cg-50);
  max-width: 52ch;
  margin: 0;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--cg-50);
  margin: 0 0 20px;
  font-weight: 500;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col a {
  font-size: 15px;
  color: var(--cg-90);
  transition: color 0.15s ease;
}
.footer-col a:hover {
  color: var(--maps-orange);
}
.footer-mid {
  border-top: 1px solid var(--cg-20);
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--cg-50);
}

.footer-legal {
  background: #000;
  border-top: 1px solid var(--cg-20);
  padding: 32px 0 40px;
}
.footer-legal .disclosure {
  font-size: 13px;
  line-height: 22px;
  color: var(--cg-60);
  margin: 0;
}
.footer-legal .disclosure a {
  color: var(--cg-80);
  border-bottom: 1px dotted var(--cg-40);
}
.footer-legal .disclosure a:hover {
  color: var(--maps-orange);
  border-color: var(--maps-orange);
}
.footer-legal .disclosure .divider {
  color: var(--cg-30);
  margin: 0 10px;
}
.footer-legal .disclosure .placeholder {
  color: var(--cg-50);
  font-style: italic;
}

/* ---- 768px — footer ---- */
@media (max-width: 768px) {
  .footer-upper {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
    padding: 48px 0 40px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-brand .wordmark {
    height: 22px;
  }
}

/* ---- 480px — footer ---- */
@media (max-width: 480px) {
  .footer-upper {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-mid {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* Light mode: the footer matches the blue header (GTX-2761); its bottom strip is one shade darker, and the text is
   lifted for contrast on blue */
html[data-theme="light"] .site-footer {
  color: var(--cg-90);
}
html[data-theme="light"] .footer-brand p,
html[data-theme="light"] .footer-col h4,
html[data-theme="light"] .footer-mid,
html[data-theme="light"] .footer-legal .disclosure {
  color: var(--cg-80);
}
html[data-theme="light"] .footer-col a,
html[data-theme="light"] .footer-legal .disclosure a {
  color: #fff;
}
html[data-theme="light"] .footer-mid {
  border-top-color: rgba(255, 255, 255, 0.16);
}
html[data-theme="light"] .footer-legal {
  background: var(--maps-blue-hover);
  border-top-color: rgba(255, 255, 255, 0.16);
}
html[data-theme="light"] .footer-legal .disclosure a {
  border-bottom-color: rgba(255, 255, 255, 0.4);
}
html[data-theme="light"] .footer-legal .disclosure .divider {
  color: rgba(255, 255, 255, 0.32);
}
