/* ==========================================================================
   Footer (+ pre-footer band)
   ========================================================================== */

.band {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px 40px; flex-wrap: wrap;
  padding: clamp(20px, 3.5vw, 36px);
  background: var(--panel); border-radius: var(--radius-l);
}
.band h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); max-width: 24ch; }
.band p { color: var(--muted); margin-top: 6px; max-width: 42ch; font-size: 0.95rem; }

.site-footer {
  position: relative; overflow: hidden;
  border-top: 1px solid var(--line);
  padding-top: 2.5rem; background: var(--bg); color: var(--muted);
}
.foot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3.5vw, 40px); }
.foot-col h2 { font: 600 0.95rem var(--font-text); letter-spacing: -0.01em; margin-bottom: 12px; color: var(--ink); }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-col a { color: var(--muted); text-decoration: none; font-size: 0.92rem; transition: color 0.15s; }
.foot-col a:hover { color: var(--ink); }
.foot-social { display: flex; gap: 14px; align-items: center; }
.foot-social a { color: var(--ink-soft); display: inline-flex; }
.foot-social a:hover { color: var(--accent-text); }

.foot-base {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  margin-top: 2.5rem;
}
.foot-credit { font-size: 0.92rem; }
.foot-credit a { color: var(--ink); text-decoration: none; font-weight: 600; }
.foot-mark { width: 44px; height: 44px; justify-self: center; }
.foot-mark .bg { fill: var(--accent); }
.foot-mark .stem, .foot-mark .dot { fill: #0a0a0a; }

.theme-switch {
  justify-self: end; display: inline-flex; padding: 3px; gap: 2px;
  background: var(--btn-quiet-bg); border: 1px solid var(--line); border-radius: 10px;
}
.theme-switch button {
  display: grid; place-items: center; width: 34px; height: 30px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); }

/* Amber halftone triangle */
.foot-dots {
  height: 110px; margin: -6px auto 0; width: min(560px, 90%);
  background: radial-gradient(circle, var(--accent) 0 1.7px, transparent 2.1px) 0 0 / 11px 11px;
  -webkit-mask-image: radial-gradient(ellipse 60% 100% at 50% 100%, #000 20%, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 100% at 50% 100%, #000 20%, transparent 72%);
  opacity: 0.9;
}

@media (max-width: 820px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .foot-base { grid-template-columns: 1fr; justify-items: start; margin-top: 2rem; gap: 14px; }
  .foot-mark, .theme-switch { justify-self: start; }
}
@media (max-width: 640px) {
  .site-footer { padding-top: 1.75rem; }
  .foot-base { margin-top: 1.5rem; gap: 12px; }
  .foot-dots { height: 70px; }
  .band { padding: 16px 18px; border-radius: 14px; gap: 14px; }
  .band h2 { font-size: 1.35rem; }
  .band p { margin-top: 4px; font-size: 0.88rem; }
}
@media (max-width: 480px) {
  .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}
