/* ==========================================================================
   chrome.css — shared public site chrome (footer)
   Created 2026-08-01, Phase 1a of docs/ui-consistency/02-phase1-shared-chrome.md

   WHY THIS FILE EXISTS
   The v2 footer is the canonical public footer (audit decision #1), but its CSS
   lived ONLY in homepage-v2.css (51 KB) scoped to `.homepage-v2`. The ~26 pages
   on the legacy footer don't load that stylesheet, so the markup alone would
   render unstyled. Loading a 51 KB homepage bundle site-wide to obtain ~18 rules
   is not acceptable, hence this extraction.

   TWO CHANGES WERE MADE TO THE EXTRACTED RULES:
     1. The `.homepage-v2` scope is dropped — the footer is now site-wide.
     2. Palette vars remapped from homepage-v2's `--*` namespace to theme-v2's
        `--t-*`, which IS loaded globally. Both namespaces hold byte-identical
        values (verified across all 10 referenced tokens); homepage-v2.css simply
        predates the `--t-*` convention.

   NAV CSS IS NOT HERE — it already lives in theme-v2.css (global). Pages with a
   hero image additionally override `.v2-nav` in homepage-v2.css so the bar starts
   transparent and solidifies on scroll. That difference is DELIBERATE.

   ROLLOUT NOTE: during Phase 1 these rules are DUPLICATED — homepage-v2.css keeps
   its copies so a partial deploy can never leave the homepage unstyled. The
   duplicates are removed in Phase 1d.
   ========================================================================== */

/* Layout container used by the footer (and by home/redesign.php's page sections).
   Defined ONLY as `.homepage-v2 .page-w` in homepage-v2.css — double-scoped, so it
   needed BOTH that stylesheet and the .homepage-v2 body class. The ~25 shared-layout
   pages had neither, leaving the footer's content unconstrained and flush to the
   viewport edge while the four v2 pages were centred at 1360px. Verified in-browser:
   /series .page-w computed width 1449px / max-width none, vs /competitors 1360px.
   Unscoped here so every page gets it. The .homepage-v2 rule is more specific and
   holds identical values, so those four pages are unaffected. */
.page-w {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 40px;
}

.v2-footer {
  background: var(--t-bg-card);
  border-top: 1px solid var(--t-border);
  padding: 64px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand-desc {
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--t-text-muted);
  line-height: 1.7;
  max-width: 320px;
  margin-top: 16px;
}

.footer-heading {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--t-text-primary);
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  margin: 0;
}

/* Scoped under .v2-footer purely to win a specificity tie. homepage-v2.css
   declares `.homepage-v2 a { color: inherit }` — also (0,1,1), one class + one
   type, exactly this rule's old specificity — and loads AFTER
   this file on the four templates that own their own <head> (/, /competitors,
   /promoters, event detail v3). A bare `.footer-links a` lost that tie, so the
   footer links on those pages inherited #e8e2d6 instead of the muted #918b7e,
   collapsing the heading/link hierarchy. `.footer-links` only ever exists inside
   this partial's <footer class="v2-footer">, so the extra scope costs nothing
   elsewhere. Measured 2026-08-02. */
.v2-footer .footer-links a {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  color: var(--t-text-muted);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.v2-footer .footer-links a:hover { color: var(--t-accent); }

/* Newsletter */
.newsletter-form {
  display: flex;
  margin-top: 16px;
}

.newsletter-input {
  flex: 1;
  background: var(--t-bg-deep);
  border: 1px solid var(--t-border);
  border-right: none;
  padding: 10px 14px;
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  color: var(--t-text-primary);
  outline: none;
  transition: border-color 0.2s;
  border-radius: 0;
}

.newsletter-input::placeholder { color: var(--t-text-muted); }
.newsletter-input:focus { border-color: var(--t-border-mid); }

.newsletter-btn {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--t-accent);
  color: var(--t-bg-abyss);
  border: 1px solid var(--t-accent);
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 0;
}

.newsletter-btn:hover { background: var(--t-accent-bright); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--t-border);
}

.footer-copy {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  color: var(--t-text-muted);
  letter-spacing: 1px;
}

.footer-socials {
  display: flex;
  gap: 16px;
}

/* Scoped for the same specificity tie as .footer-links a above — these icons
   are <a> elements and lost to `.homepage-v2 a { color: inherit }` too. Their
   SVGs are fill/stroke="currentColor", so losing the colour changed the glyphs
   themselves, not just link text. */
.v2-footer .footer-socials a {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--t-border);
  color: var(--t-text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}

.v2-footer .footer-socials a:hover {
  border-color: var(--t-accent);
  color: var(--t-accent);
}

/* ── Responsive ─────────────────────────────────────────────────────────
   These lived inside homepage-v2.css's media queries and were missed by the
   initial line-anchored extraction — leaving the footer grid non-collapsing
   on the ~25 pages that don't load homepage-v2.css. */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .page-w { padding: 0 20px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .footer-bottom  {flex-direction: column; gap: 16px; text-align: center;}
}
