/* WeatherWindow.AI — shared site chrome (nav + footer + launch switch).
   Loaded by the homepage and every article page (tokens.css → chrome.css →
   editorial.css → site.css / articles.css). The buttons, the focus ring and .wrap
   come from editorial.css. One source, so the article pages cannot drift from the
   homepage. Values come from tokens.css only.
*/

/* ---------- Launch switch (js/boot.js) ---------- */
html.prelaunch .launch-only { display: none !important; }
html:not(.prelaunch) .prelaunch-only { display: none !important; }

/* ---------- Footer logo: never wider than its column ---------- */
.footer-brand img { display: block; max-width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background var(--t-slow) var(--ease), border-color var(--t-slow) var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: var(--nav-solid);   /* 94%: page text no longer shows through (Jon, round 15) */
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--border-dim);
}
.nav-inner {
  max-width: var(--page-max); margin: 0 auto; height: var(--nav-h);
  padding: 0 var(--s-gutter);
  display: flex; align-items: center; gap: var(--s-6);
}
.brand { min-width: 0; }
.brand img { display: block; height: 2.75rem; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }   /* v6 lockup, light text for dark backgrounds; never squeezed on narrow phones */
.nav-links { display: flex; align-items: center; gap: var(--s-1); margin-left: auto; }
.nav-links a {
  color: var(--text-on-photo); text-decoration: none; font-size: var(--fs-sm); font-weight: 500;
  padding: var(--s-2) var(--s-3); border-radius: var(--radius-sm);
}
.nav-links a:hover { color: var(--text); background: var(--accent-wash); }
.nav-actions { display: flex; align-items: center; gap: var(--s-3); }
.nav-toggle {
  display: none; width: 2.75rem; height: 2.75rem; padding: var(--s-2);
  background: none; border: 1px solid var(--glass-border); border-radius: var(--radius); color: var(--text); cursor: pointer;
}
/* editorial.css's global :focus-visible loads after this file on every page. */
.nav-toggle:focus-visible { border-radius: var(--radius); }
.nav-toggle svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.6; fill: none; }

@media (max-width: 56rem) {
  .nav-toggle { display: inline-block; }
  .nav-actions { margin-left: auto; }   /* .nav-links no longer pushes it right once hidden */
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--s-2) var(--s-gutter) var(--s-6);
    background: var(--bg);
    border-bottom: 1px solid var(--border-dim);
    box-shadow: var(--shadow-float);
    display: none;
  }
  .nav.is-open .nav-links { display: flex; }
  .nav.is-open { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav-links a { font-size: var(--fs-md); padding: var(--s-3) 0; border-bottom: 1px solid var(--border-dim); border-radius: 0; }
  .nav-links a:hover { background: none; }
}
@media (max-width: 26rem) {
  .nav-inner { gap: var(--s-3); }
  .brand img { height: 2.125rem; }
  .nav-actions .btn-sm { padding: var(--s-2) var(--s-3); }
}

/* ---------- Footer ---------- */
.footer { background: var(--bg-deep); border-top: 1px solid var(--border-dim); padding: var(--s-12) 0 var(--s-8); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--s-8); }
.footer-brand img { height: 2.75rem; width: auto; margin-bottom: var(--s-4); }
.footer-brand p { margin: 0; color: var(--text-dim); max-width: 28ch; }
.footer-col { display: grid; gap: var(--s-2); align-content: start; }
.footer-col h3 { margin: 0 0 var(--s-2); font-family: var(--font-display); font-size: var(--fs-md); font-weight: 400; line-height: var(--lh-body); text-transform: uppercase; color: var(--text); }
.footer-col a { color: var(--text-dim); text-decoration: none; font-size: var(--fs-sm); }
.footer-col a:hover { color: var(--text); }
/* .footer scope: editorial.css (loaded after this file) has a global
   `.wrap { margin: 0 auto; padding: 0 … }` that would otherwise win on load order. */
.footer .footer-fine { margin-top: var(--s-10); padding-top: var(--s-6); border-top: 1px solid var(--border-dim); }
.footer-fine p { margin: 0 0 var(--s-3); font-size: var(--fs-sm); color: var(--text-dim); max-width: none; }
/* The cookie line sits in .footer-fine with the disclaimer (Jon, 2026-11-26): same
   size, colour and spacing as the other fine-print lines, no separate rule above it. */
.footer-fine .ww-consent-line { margin: 0 0 var(--s-3); padding-top: 0; border-top: 0; }
/* Fallback: a page without .footer-fine gets the line straight in <footer>, outside .wrap. */
.footer > .ww-consent-line { max-width: var(--page-max); margin-inline: auto; padding-inline: var(--s-gutter); }
@media (max-width: 48rem) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* Touch floor: touch-context chrome controls never render below 44px (DESIGN_SYSTEM.md). */
@media (pointer: coarse) {
  .nav .btn-sm { min-height: 2.75rem; }
  .brand, .footer-col a { display: inline-flex; align-items: center; min-height: 2.75rem; }
}
