/* The site's fat footer (scripts/site/chrome.js siteFooter). The footer links
   this file itself, so it applies on every page, the landing page included
   (which does not load site-base.css). Selectors start with footer.site.sf to
   win over the older single-row footer rules still in site-base.css and the
   landing page. The Earth's horizon runs along the bottom: a render from the
   viewer (scripts/site/capture-footer-earth.mjs), with North America's city
   lights on the night side and sunlit cloud on the day side. */

footer.site.sf {
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  margin-top: 0;
  /* The bottom padding is the room the Earth shows in, below the last row. */
  padding: clamp(4.5rem, 7vw, 6.5rem) 0 clamp(200px, 19.5vw, 460px);
  background: #000;
  border-top: 1px solid var(--rule, rgba(255, 255, 255, 0.08));
  color: var(--fg-3, rgba(245, 245, 247, 0.48));
  font-size: 0.9rem;
  line-height: 1.5;
  letter-spacing: -0.008em;
}

/* The Earth, pinned to the bottom edge at the full width; its starry sky
   fades out behind the text above. Narrow screens keep it at least 220px tall
   and crop the sides, keeping the city lights in view. */
footer.site.sf .sf-earth {
  position: absolute;
  z-index: -1;
  left: 0;
  bottom: 0;
  display: block;
  width: 100%;
  height: auto;
  min-height: 220px;
  object-fit: cover;
  object-position: 42% 100%;
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 16%, rgba(0, 0, 0, 0.35) 32%, #000 48%);
  mask-image: linear-gradient(180deg, transparent 0%, transparent 16%, rgba(0, 0, 0, 0.35) 32%, #000 48%);
}

/* site-base.css styles every p, ul and li for reading pages; none of that
   belongs here. */
footer.site.sf p,
footer.site.sf li { margin: 0; max-width: none; font-size: inherit; line-height: inherit; color: inherit; letter-spacing: inherit; }
footer.site.sf ul { padding-left: 0; max-width: none; }

footer.site.sf .sf-top {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) minmax(0, 4fr);
  gap: 3rem clamp(2rem, 4vw, 4rem);
  align-items: start;
}

footer.site.sf .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--fg, #f5f5f7);
}
footer.site.sf .brand-mark { display: inline-flex; flex: none; width: 28px; height: 28px; }
footer.site.sf .brand-mark svg { display: block; width: 100%; height: 100%; }
footer.site.sf .sf-brand p {
  margin: 1.1rem 0 1.6rem;
  max-width: 30ch;
  color: var(--fg-2, rgba(245, 245, 247, 0.72));
  font-size: 0.95rem;
  line-height: 1.6;
}
footer.site.sf .sf-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; }
footer.site.sf .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
footer.site.sf .btn.primary { background: var(--fg, #f5f5f7); color: #0a0a0a; }
footer.site.sf .btn.primary:hover { background: rgba(245, 245, 247, 0.9); color: #0a0a0a; transform: translateY(-1px); }
footer.site.sf .btn.ghost { color: var(--fg, #f5f5f7); border: 1px solid var(--rule-strong, rgba(255, 255, 255, 0.18)); background: rgba(0, 0, 0, 0.3); }
footer.site.sf .btn.ghost:hover { border-color: var(--fg, #f5f5f7); color: var(--fg, #f5f5f7); transform: translateY(-1px); }
footer.site.sf .btn .arrow { transition: transform 0.2s ease; }
footer.site.sf .btn:hover .arrow { transform: translateX(2px); }

footer.site.sf nav.sf-cols {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2.5rem 1.5rem;
}
footer.site.sf .sf-h {
  margin: 0.35rem 0 1.1rem;
  font-family: 'Space Grotesk', var(--sans, system-ui, sans-serif);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fg, #f5f5f7);
}
footer.site.sf .sf-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.72rem; }
footer.site.sf a { color: var(--fg-3, rgba(245, 245, 247, 0.48)); text-decoration: none; transition: color 0.2s ease; }
footer.site.sf a:hover { color: var(--fg, #f5f5f7); }
footer.site.sf .sf-col a { font-size: 0.9rem; }

footer.site.sf .sf-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule, rgba(255, 255, 255, 0.08));
  font-size: 0.8rem;
}
footer.site.sf .sf-bottom p { margin: 0; }
footer.site.sf .sf-sources { flex: 1 1 320px; text-align: center; }
footer.site.sf .sf-social { display: inline-flex; align-items: center; gap: 0.45rem; }
footer.site.sf .sf-social svg { width: 13px; height: 13px; }

@media (max-width: 1080px) {
  footer.site.sf .sf-top { grid-template-columns: 1fr; }
  footer.site.sf nav.sf-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  footer.site.sf { padding-top: 5rem; }
  footer.site.sf nav.sf-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 1.25rem; }
  footer.site.sf .sf-bottom { flex-direction: column; align-items: flex-start; }
  footer.site.sf .sf-sources { flex: none; text-align: left; }
}
