/* =====================================================================
   SITE FOOTER, the ONE shared footer used by every page.

   Rendered by assets/js/site-footer.js; styled only here. Added 2026-09-10
   (PART-D79). Like assets/css/site-header.css, this file is deliberately
   self-contained: it carries its own colour tokens (the ftr set below, the
   same maroon plate and champagne gold the home footer ships) so it renders
   identically on pages that load assets/css/styles.css and on pages that load
   styles/demo.css, which define different token sets.

   Every selector is scoped under the site-footer class, mirroring
   site-header.css's nav.site-header discipline. The retained dead footer
   blocks in styles.css and demo.css target the bare footer element and old
   class names this component does not reuse, so they cannot reach it; the
   margin and border resets on .site-footer neutralise the one box-model
   declaration demo.css sets on the bare footer element (border-top and
   margin-top). Do NOT restyle this footer from a page stylesheet.
   ===================================================================== */

:root {
  --ftr-bg: #5C1A1B;                       /* == the home footer's maroon plate, light theme */
  --ftr-fg: #E8C97A;                       /* == --gold-champagne, light theme */
  --ftr-fg-dim: rgba(232, 201, 122, 0.62);
  --ftr-border: rgba(232, 201, 122, 0.55); /* == the home footer's social-icon border */
}
[data-theme="dark"] {
  --ftr-bg: #0D0607;                       /* == the home footer's near-black plate, dark theme */
  --ftr-fg: #F5D98A;                       /* == --gold-champagne, dark theme */
  --ftr-fg-dim: rgba(245, 217, 138, 0.62);
  --ftr-border: rgba(245, 217, 138, 0.55);
}

.site-footer {
  margin: 0;                               /* neutralise demo.css footer{margin-top:3rem} on the demo pages */
  border: 0;                               /* neutralise demo.css footer{border-top:...} on the demo pages */
  background: var(--ftr-bg);
  color: var(--ftr-fg);
  padding: 1.5rem clamp(1.5rem, 4vw, 4rem);
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}
/* box-sizing reset scoped like site-header.css's own, so the 36px icon buttons
   size identically whatever a page stylesheet does globally */
.site-footer, .site-footer *, .site-footer *::before, .site-footer *::after { box-sizing: border-box; }

.site-footer-inner { max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }

/* row 1: the home page's shipped three-column arrangement, social left,
   wordmark centred, copyright right */
.site-footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}
.site-footer-social { grid-column: 1; justify-self: start; display: flex; gap: 0.75rem; margin: 0; padding: 0; }
.site-footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--ftr-border); color: var(--ftr-fg); background: transparent;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.site-footer-social a svg { display: block; }
.site-footer-social a:hover { background: var(--ftr-fg); border-color: var(--ftr-fg); color: var(--ftr-bg); }
.site-footer-social a:focus-visible { outline: 2px solid var(--ftr-fg); outline-offset: 3px; }
.site-footer-word {
  grid-column: 2; justify-self: center;
  /* the display face the home wordmark uses (--font-display, a Gotham/Montserrat
     stack, defined in assets/fonts/display.css which all eight pages load); the
     fallback restates that stack rather than a serif so the wordmark never drops
     to the wrong family if that file is ever absent */
  font-family: var(--font-display, "Gotham", "Montserrat", "Avenir Next", "Helvetica Neue", Arial, system-ui, sans-serif);
  font-size: 1.1rem; color: var(--ftr-fg); white-space: nowrap;
}
.site-footer-copyright { grid-column: 3; justify-self: end; color: var(--ftr-fg); opacity: 0.7; font-size: 0.8rem; }

/* row 2: NEW secondary bar beneath a hairline, so the synthesis neither strips
   the navigation the non-home pages carry nor drops Terms and Privacy */
.site-footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 0.75rem 1.5rem; padding-top: 0.9rem; border-top: 1px solid var(--ftr-border);
}
.site-footer-nav, .site-footer-legal { display: flex; flex-wrap: wrap; gap: 1.2rem; margin: 0; padding: 0; }
.site-footer-nav a, .site-footer-legal a {
  color: var(--ftr-fg-dim); text-decoration: none; font-size: 0.8rem; transition: color 0.25s ease;
}
.site-footer-nav a:hover, .site-footer-legal a:hover { color: var(--ftr-fg); }
.site-footer-nav a:focus-visible, .site-footer-legal a:focus-visible { outline: 2px solid var(--ftr-fg); outline-offset: 3px; }

/* the visually-hidden label the social links carry, self-contained so the
   component does not depend on either page family still defining .sr-only */
.site-footer .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* below 1024px everything column-stacks centred, the one breakpoint every
   existing footer variant already stacks at */
@media (max-width: 1024px) {
  .site-footer-top { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 0.85rem; text-align: center; }
  .site-footer-social, .site-footer-word, .site-footer-copyright { grid-column: 1; justify-self: center; }
  .site-footer-copyright { text-align: center; }
  .site-footer-bottom { flex-direction: column; text-align: center; }
  .site-footer-nav, .site-footer-legal { justify-content: center; }
}

/* PART-D91 (2026-09-12) W2 supersedes PART-D87 item 2a. The rating-stage suppression
   is removed at Avery's direction. The one shared footer now remains in normal document
   flow throughout entry, rating, repeats, loading and readout, keeping Terms and Privacy
   reachable without a second footer, an overlay or a page-wide layout change. */


/* 2026-10-04: preserve the footer plate, structure, wording and destinations. */
.site-footer-copyright { font-size:1rem; opacity:1; }
.site-footer-nav a,.site-footer-legal a { display:inline-flex; align-items:center; min-height:44px; font-size:1rem; color:var(--ftr-fg); }
.site-footer-social a { position:relative; }
.site-footer-social a::before { content:""; position:absolute; inset:-4px; border-radius:50%; }


.site-footer-social a::before { inset:-5px; }
