/* ═══════════════════════════════════════════════════════════════
   SHARED CHROME · LIVING SPECTRUM
   One nav and one footer for every page. Values are verbatim from
   the approved home recipe (src/styles/living-spectrum.css); the home
   and shop pages still carry their own higher-specificity copies of
   the same recipe, so any change here must be mirrored there.
   Loaded after style.css / mobile.css / us.css so equal-specificity
   ties resolve to this file. All pages force data-theme dark.
   is-scrolled state is wired globally in js/main.js.
   ═══════════════════════════════════════════════════════════════ */

/* ── Nav: transparent at rest, one glass layer once scrolled ── */

body .site-nav {
  height: auto;
  min-height: 64px;
  padding: calc(10px + env(safe-area-inset-top)) clamp(20px, 3.4vw, 48px) 10px;
  background: transparent;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background-color 380ms cubic-bezier(0.22, 1, 0.36, 1), border-color 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

body .site-nav.is-scrolled {
  background: rgba(6, 8, 11, 0.94);
  border-bottom: 1px solid rgba(241, 242, 240, 0.06);
}

body .site-nav .logo {
  color: #f1f2f0;
}

body .site-nav .logo::before {
  display: none;
}

body .site-nav .nav-center {
  gap: clamp(26px, 3vw, 42px);
}

body .site-nav .nav-center a {
  padding: 4px 2px;
  color: rgba(235, 238, 240, 0.68);
  opacity: 1;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.02em;
  text-transform: none;
}

body .site-nav .nav-center a::after {
  bottom: 6px;
  height: 1px;
  background: rgba(241, 242, 240, 0.6);
}

body .site-nav .nav-center a:hover,
body .site-nav .nav-center a.active {
  color: #f1f2f0;
  opacity: 1;
}

body .site-nav .nav-cart-btn {
  min-height: 40px;
  padding: 0 22px;
  background: rgba(241, 242, 240, 0.05);
  border: 1px solid rgba(241, 242, 240, 0.16);
  border-radius: 999px;
  color: #f1f2f0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  transition: background-color 240ms ease, border-color 240ms ease, transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

body .site-nav .nav-cart-btn:hover {
  background: rgba(241, 242, 240, 0.09);
  border-color: rgba(241, 242, 240, 0.3);
  letter-spacing: 0.14em;
  transform: translateY(-1px);
}

body .site-nav .nav-cart-btn #cart-count:not([hidden]) {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  margin-left: 8px;
  padding: 0 5px;
  place-items: center;
  background: #f1f2f0;
  border-radius: 999px;
  color: #07090c;
  font-size: 9px;
}

body .skip-link {
  background: #f1f2f0;
  border: 0;
  color: #07090c;
}

body .site-nav :where(a, button):focus-visible {
  outline: 1px solid rgba(241, 242, 240, 0.92);
  outline-offset: 5px;
}

/* ── Footer: the quiet centered coda ── */

body > footer {
  padding: clamp(40px, 5.5vh, 56px) clamp(24px, 5vw, 80px) calc(30px + env(safe-area-inset-bottom, 0px));
  background: transparent;
  border-top: 0;
}

body > footer .footer-inner {
  display: flex;
  max-width: none;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-align: center;
}

body > footer .footer-inner .logo {
  color: rgba(241, 242, 240, 0.82);
  font-size: 11px;
  letter-spacing: 0.14em;
  opacity: 1;
}

body > footer .footer-inner .logo::before {
  display: none;
}

body > footer .footer-nav {
  justify-content: center;
  gap: 6px 28px;
  margin-top: 18px;
}

body > footer .footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: rgba(235, 238, 240, 0.52);
  opacity: 1;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 300;
  letter-spacing: 0.02em;
  text-transform: none;
  transition: color 240ms ease;
}

body > footer .footer-nav a:hover {
  color: #f1f2f0;
  opacity: 1;
}

body > footer .footer-channels {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

body > footer .footer-channel {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(241, 242, 240, 0.12);
  border-radius: 50%;
  color: rgba(241, 242, 240, 0.66);
  cursor: pointer;
  transition: color 240ms ease, border-color 240ms ease, transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

body > footer .footer-channel svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

body > footer .footer-channel:hover,
body > footer .footer-channel:focus-visible {
  border-color: rgba(241, 242, 240, 0.34);
  color: #f1f2f0;
  transform: translateY(-1px);
}

body > footer .footer-legal {
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
  opacity: 0.36;
}

body > footer .footer-compliance {
  display: block;
  max-width: 62ch;
  margin: 8px auto 0;
  font-size: 8.5px;
  line-height: 1.7;
  text-align: center;
  opacity: 0.26;
}

body > footer :where(a, button):focus-visible {
  outline: 1px solid rgba(241, 242, 240, 0.92);
  outline-offset: 5px;
}

/* Phone-only cart affordance: hidden everywhere else. */
.nav-cart-mini {
  display: none;
}

/* ── Mobile ── */

@media (max-width: 767px) {
  body .site-nav {
    height: var(--chrome-total, 64px);
    min-height: 0;
    padding: env(safe-area-inset-top, 0px) 18px 0;
    align-items: center;
    /* Double-tapping empty header space triggered Safari's smart zoom —
       the whole page (header included) visibly rescaled on tap. */
    touch-action: manipulation;
  }

  /* The cart is one tap from anywhere: cart glyph + count badge beside the
     hamburger. cart.js keeps [data-cart-mini-count] in sync. */
  body .site-nav .nav-cart-mini {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: 6px;
    padding: 0;
    border: 1px solid rgba(241, 242, 240, 0.14);
    border-radius: 12px;
    background: rgba(241, 242, 240, 0.04);
    color: #f1f2f0;
    cursor: pointer;
  }

  body .site-nav .nav-cart-mini svg {
    width: 19px;
    height: 19px;
  }

  body .site-nav .nav-cart-mini:focus-visible {
    outline: 2px solid rgba(57, 137, 255, 0.85);
    outline-offset: 2px;
  }

  body .site-nav .nav-cart-mini__count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #3989ff;
    color: #06090d;
    font-family: ui-monospace, 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }

  body .site-nav .nav-cart-mini__count[hidden] {
    display: none;
  }

  body > footer {
    padding: 36px clamp(24px, 5vw, 80px) calc(30px + env(safe-area-inset-bottom, 0px));
  }

  body > footer .footer-nav {
    gap: 2px 22px;
  }

  body > footer .footer-nav a {
    min-width: 44px;
    min-height: 44px;
  }

  body > footer .footer-channel {
    width: 44px;
    height: 44px;
  }

  /* Phone legibility floor for the legal lines: at 8.5px/opacity .26 the
     research-use disclaimer measured ~1.35:1 contrast — illegible. 11px at
     these opacities clears WCAG AA (>=4.5:1 over the near-black canvas).
     Desktop values stay untouched (desktop is pixel-frozen). */
  body > footer .footer-compliance {
    max-width: 40ch;
    font-size: 11px;
    opacity: 0.55;
  }

  body > footer .footer-legal {
    opacity: 0.6;
  }

}
