/* Site footer, shared by every page. Quiet, one line on desktop, stacked on phones.
   `.on-sphere` is the homepage version, set in light tones over the dark sphere. */
.site-footer {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px;
  margin-top: 96px;
  padding: 22px 0 34px;
  border-top: 1px solid rgba(51, 52, 47, 0.14);
  font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  color: #6a685f;
}
.sf-id { display: flex; align-items: baseline; gap: 12px; }
.sf-brand {
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: #111;
  text-decoration: none;
}
.sf-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.sf-links a {
  color: inherit;
  text-decoration: none;
  padding: 6px 0 1px; /* comfortable touch height */
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.sf-links a:hover, .sf-links a:focus-visible { color: #000; border-bottom-color: #817c70; }
.sf-links a[aria-current="page"] { color: #000; border-bottom-color: #000; }

/* Homepage: pinned to the bottom of the sphere screen */
.site-footer.on-sphere {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 14px clamp(16px, 4vw, 40px) max(14px, env(safe-area-inset-bottom));
  border-top: 0;
  justify-content: center; /* stays over the dark sphere at any width */
  gap: 4px 28px;
  color: #9a9084;
}
/* The footer ends the page, so the column needs no extra space below it. */
.container:has(> .site-footer) { padding-bottom: 0; }
.site-footer.on-sphere .sf-brand { color: #e6ded2; font-size: 15px; }
.site-footer.on-sphere .sf-links a:hover,
.site-footer.on-sphere .sf-links a:focus-visible { color: #ece4d6; border-bottom-color: rgba(236, 228, 214, 0.5); }

@media (max-width: 640px) {
  .site-footer { flex-direction: column; align-items: flex-start; margin-top: 72px; }
  .site-footer.on-sphere { flex-direction: row; text-align: center; gap: 4px 14px; }
  .site-footer.on-sphere .sf-id { width: 100%; justify-content: center; }
}
