/* ══════════════════════════════════════════════════
   FOOTER
   4-col grid: brand / quick links / legal / contact
   Socket bar: copyright left, social icons right.
   Depends on: tokens.css
   ══════════════════════════════════════════════════ */

.site-footer {
  background: var(--c0);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

/* ── WATERMARK (test — drop this block + its markup in layout/footer.html
   and scripts/footer.js if it doesn't work out) ────
   Oversized background wordmark pinned flush to the footer's bottom edge,
   edge-to-edge — deliberately ignores the content-inset/container-max the
   rest of the footer respects. Font-size alone can't guarantee an exact
   full-width fill (the word's natural width varies with viewport in a way
   a fixed clamp() can't track 1:1), so scripts/footer.js measures the
   text's natural width and stretches it to the footer's exact width via
   transform:scaleX() — left edge stays pinned (transform-origin:left),
   so it always spans precisely edge-to-edge with zero drift. */
.site-footer__watermark {
  position: absolute;
  left: 0;
  bottom: 0;
  width: fit-content;
  margin: 0;
  padding: 0;
  font-family: var(--fd);
  font-size: 16rem;
  font-weight: 900;
  line-height: normal;
  color: var(--txt);
  opacity: 0.05;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  transform-origin: left bottom;
}

/* ── GRID ────────────────────────────────────────── */

.site-footer__grid {
  width: min(calc(100% - 2 * var(--content-inset)), var(--container-max));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: var(--space-7);
  padding: 8rem 0 6rem;
  position: relative;
  z-index: 1;
}

/* ── BRAND COLUMN ────────────────────────────────── */

.site-footer__logo-link {
  display: inline-block;
  line-height: 0;
  margin-bottom: var(--space-4);
}

.site-footer__logo-img {
  width: 15rem;
  height: auto;
  display: block;
  opacity: 0.9;
}

.site-footer__tagline {
  font-family: var(--fm);
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--t3);
  margin: 0;
}

/* ── COLUMNS ─────────────────────────────────────── */

.site-footer__col-label {
  font-family: var(--fm);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--txt);
  margin: 0 0 var(--space-4);
}

.site-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.site-footer__list a {
  font-family: var(--fm);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--t2);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__list a:hover {
  color: var(--txt);
}

/* ── CONTACT ─────────────────────────────────────── */

.site-footer__address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.site-footer__address p,
.site-footer__address a {
  font-family: var(--fm);
  font-size: 1.4rem;
  color: var(--t2);
  text-decoration: none;
  margin: 0;
  transition: color 0.2s ease;
}

.site-footer__address a:hover {
  color: var(--txt);
}

/* ── SOCKET BAR ──────────────────────────────────── */

.site-footer__socket {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
  position: relative;
  z-index: 1;
}

.site-footer__socket-inner {
  width: min(calc(100% - 2 * var(--content-inset)), var(--container-max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-5) 0;
}

.site-footer__copy {
  font-family: var(--fm);
  font-size: 1.2rem;
  color: var(--t3);
  margin: 0;
}

/* ── SOCIAL ICONS ────────────────────────────────── */

.site-footer__socials {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.site-footer__social {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t3);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__social:hover {
  color: var(--txt);
}

.site-footer__social svg {
  width: 1.7rem;
  height: 1.7rem;
  display: block;
}

/* ── RESPONSIVE ──────────────────────────────────── */

@media (max-width: 960px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    padding: 6rem 0 5rem;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
    padding: 5rem 0 4rem;
  }

  .site-footer__socket-inner {
    /* DOM order is copy, then socials — column-reverse flips the visual
       stack to socials-on-top/copy-on-bottom without touching the DOM
       (copy should still read first for screen readers/source order). */
    flex-direction: column-reverse;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5) 0;
  }
}

/* ── REDUCED MOTION ──────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .site-footer__list a,
  .site-footer__address a,
  .site-footer__social { transition: none; }
}
