/* ==========================================================================
   Seacoast NHIC - shared shell (header, mobile drawer, footer, buttons)
   --------------------------------------------------------------------------
   Loaded on EVERY page: the 2 redesigned pages AND the 35 legacy WordPress
   pages that still load wp-content/themes/bmwl_theme_wp/style.css.

   ==========================================================================
   RULES FOR EDITING THIS FILE - read before changing anything
   ==========================================================================

   1. EVERY selector is `.sn-` prefixed. This is not cosmetic. Two reasons:

      a) `js/custom_js.js:3-4` runs on all 35 legacy pages and does
             $header = $(".site_header");
             $header.before($header.clone().addClass("clone"));
         If the new header used class `site_header`, jQuery would clone it on
         every legacy page and every one would render TWO headers. With `sn-`
         names, `$(".site_header")` is an empty set and `.clone()` is a
         harmless no-op - so custom_js.js stays loaded and legacy carousels,
         tabs, and galleries keep working untouched.

      b) The ~40 legacy shell rules key off .site_header, .top_bar_header,
         .middle_white_bar, .menu_bar_top, .menu_header, .scroll_menu_header,
         .menu, .footer_top, .footer_col, .parent_columns_footer,
         .footer_bottom, .copyright_txt_*, .widget, .widget-title,
         .middle_container, .large_container. Reusing ANY of those names
         inherits legacy styling. Reusing none of them inherits nothing.

      The ids #masthead and #colophon ARE kept (skip-link + anchor continuity)
      and are provably inert: both appear zero times in style.css.

   2. DO NOT wrap anything here in @layer. Unlayered CSS beats ALL layered CSS,
      so a layered shell would lose every tie to the unlayered legacy
      stylesheet on the 35 legacy pages. @layer is only safe in base.css and
      home.css, where the legacy sheet is absent - and it buys nothing there.

   3. This file must load AFTER the legacy stylesheet (it is injected as the
      last <link> before </head>), so source order wins every specificity tie.
      Only ONE `!important` is justified in this file; it is marked and
      explained at the newsletter input.

   4. All paths are root-absolute (/assets/...). Never relative. The 37 HTML
      files sit at three different directory depths and this file is byte-
      identical for all of them. STATUS.md iteration 1 fixed a real production
      404 caused by relative refs escaping the web root.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Legacy-stylesheet counters - the complete set of places style.css reaches
   the shell. Each is an ELEMENT-level selector, so scoped class selectors
   beat them on specificity without !important.
   -------------------------------------------------------------------------- */

/* style.css:17 sets `body{overflow-x:hidden}`, which makes <body> a scroll
   container and silently kills `position:sticky` on any descendant - the
   header would simply never stick on the 35 legacy pages. `clip` prevents the
   same horizontal overflow WITHOUT creating a scroll container. */
body {
  overflow-x: clip;
}
@supports not (overflow-x: clip) {
  .sn-header {
    position: relative;
  }
}

/* style.css:24 sets `*:focus{outline:0}`, stripping focus rings site-wide.
   That is a live accessibility defect on the production site; restoring it
   inside the shell is a fix, not a preference. */
.sn-header a:focus-visible,
.sn-header button:focus-visible,
.sn-drawer a:focus-visible,
.sn-drawer button:focus-visible,
.sn-footer a:focus-visible,
.sn-footer button:focus-visible,
.sn-footer input:focus-visible,
.sn-skip:focus-visible,
.sn-btn:focus-visible {
  outline: 2px solid var(--sn-focus);
  outline-offset: 2px;
  box-shadow: var(--sn-ring);
  border-radius: var(--sn-r-sm);
}

/* style.css:21 sets `a{color:#FAC74C}` (the legacy yellow). */
.sn-header a,
.sn-drawer a,
.sn-footer a {
  color: inherit;
  text-decoration: none;
}

/* The rule above is a THIRD instance of the specificity trap this codebase has
   now hit three times, and the only one that survived to here.
   `.sn-header a` scores (0,1,1); `.sn-btn--primary` scores (0,1,0). So the
   reset won, `color: inherit` resolved to .sn-header's --sn-ink, and the
   header and drawer CTAs rendered near-black on the accent green:
   #16241F on #2F5D4A is 2.1:1, against the 4.5:1 that 16px semibold text
   needs. Measured in the browser, not inferred - the pill looked plausibly
   "dark green" until the computed value was read.

   This CANNOT be fixed the way base.css fixed its twin, by wrapping the reset
   in :where(). That would drop it to (0,0,0), where it would lose to the legacy
   sheet's own `a { color: #FAC74C }` (0,0,1) and turn every header link on the
   36 legacy pages yellow. The reset has to keep outranking a bare element
   selector, so the button has to outrank the reset instead: (0,2,0) does it.

   Hover is already safe - `.sn-btn--primary:hover` is (0,2,0) - which is why
   the bug was invisible to anyone who moused over the button. */
.sn-header .sn-btn--primary,
.sn-drawer .sn-btn--primary {
  color: var(--sn-on-dark);
}
.sn-header .sn-btn--ghost,
.sn-drawer .sn-btn--ghost {
  color: var(--sn-accent);
}

/* Same trap, third victim, cosmetic rather than an a11y failure: the phone
   link's own `color: var(--sn-text)` (0,1,0) also lost to the reset, so it
   rendered at full --sn-ink. Both pass contrast on cream, but the phone is
   specified as the deliberately SECONDARY element in the bar - rendering it at
   heading weight worked against the one thing its styling is for. `.sn-header
   .sn-header__tel` is (0,2,0).

   The nav links escape this by accident, not by design: `.sn-nav__list a` is
   also (0,1,1), and it only wins the tie because it appears LATER in this file
   than the reset. Worth knowing before anyone reorders this stylesheet. */
.sn-header .sn-header__tel {
  color: var(--sn-text);
}

/* style.css sets `p{margin-bottom:20px}` and `h1..h6{font-weight:normal}`. */
.sn-header p,
.sn-drawer p,
.sn-footer p {
  margin: 0;
}
.sn-footer h2,
.sn-footer h3 {
  margin: 0;
  font-weight: 600;
}
.sn-header ul,
.sn-drawer ul,
.sn-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sn-header img,
.sn-drawer img,
.sn-footer img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* --------------------------------------------------------------------------
   Primitives
   -------------------------------------------------------------------------- */

.sn-sr {
  position: absolute !important; /* visually-hidden util; !important is inert
                                    here because nothing competes, but keeps
                                    the utility reliable if reused inside a
                                    legacy widget. */
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sn-skip {
  position: absolute;
  top: -100%;
  left: var(--sn-space-4);
  z-index: calc(var(--sn-z-drawer) + 10);
  padding: var(--sn-space-3) var(--sn-space-5);
  background: var(--sn-surface);
  color: var(--sn-accent);
  font-family: var(--sn-font-sans);
  font-size: var(--sn-fs-sm);
  font-weight: 600;
  border-radius: var(--sn-r-md);
  box-shadow: var(--sn-shadow-lg);
}
.sn-skip:focus {
  top: var(--sn-space-3);
}

.sn-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  display: block;
  color: var(--sn-icon);
}
.sn-icon--sm {
  width: 1.125rem;
  height: 1.125rem;
}
.sn-icon--lg {
  width: 1.75rem;
  height: 1.75rem;
}

/* Buttons. Shared by the shell, the homepage, and the assessment page so
   there is exactly ONE button system on the site. */
.sn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sn-space-2);
  min-height: 48px;
  padding: var(--sn-space-3) var(--sn-space-6);
  border: 1px solid transparent;
  border-radius: var(--sn-r-pill);
  background: none;
  font-family: var(--sn-font-sans);
  font-size: var(--sn-fs-sm);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--sn-dur) var(--sn-ease),
    border-color var(--sn-dur) var(--sn-ease), color var(--sn-dur) var(--sn-ease),
    transform var(--sn-dur) var(--sn-ease);
}
.sn-btn--primary {
  background: var(--sn-accent);
  border-color: var(--sn-accent);
  color: var(--sn-on-dark);
  box-shadow: var(--sn-shadow-cta);
}
.sn-btn--primary:hover {
  background: var(--sn-accent-hover);
  border-color: var(--sn-accent-hover);
  color: var(--sn-on-dark);
}
.sn-btn--ghost {
  background: transparent;
  border-color: var(--sn-accent);
  color: var(--sn-accent);
}
.sn-btn--ghost:hover {
  background: var(--sn-green-50);
  color: var(--sn-accent-hover);
}
.sn-btn--ghost .sn-icon,
.sn-btn--primary .sn-icon {
  color: currentColor;
}
.sn-btn--lg {
  min-height: 56px;
  padding: var(--sn-space-4) var(--sn-space-7);
  font-size: var(--sn-fs-lead);
}
.sn-btn:active {
  transform: translateY(1px);
}
.sn-btn[disabled],
.sn-btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

/* A 1px probe above the header. An IntersectionObserver on this toggles
   .is-scrolled - no scroll event handler, so no scroll-linked jank. */
.sn-header__sentinel {
  height: 1px;
  margin-bottom: -1px;
  pointer-events: none;
}

.sn-header {
  position: sticky;
  top: 0;
  z-index: var(--sn-z-header);
  background: rgba(251, 250, 247, 0.92);
  border-bottom: 1px solid transparent;
  font-family: var(--sn-font-sans);
  color: var(--sn-ink);
  transition: box-shadow var(--sn-dur) var(--sn-ease),
    border-color var(--sn-dur) var(--sn-ease);
}
@supports (backdrop-filter: blur(10px)) {
  .sn-header {
    backdrop-filter: blur(10px);
  }
}
.sn-header.is-scrolled {
  border-bottom-color: var(--sn-line);
  box-shadow: var(--sn-shadow-sm);
}

/* THREE ZONES: lead (logo + phone) | nav | actions (patients + CTA + burger).

   Mobile is flex with the actions pushed right. At lg it becomes a 3-column
   grid so the nav can be centred - see the note at the lg breakpoint for why
   `auto 1fr auto` and not `1fr auto 1fr`.

   min-width: 0 on the zones is load-bearing: grid and flex items default to
   min-width:auto, which refuses to shrink below their content and pushes the
   bar wider than the viewport instead. The bar has no wrap, so that overflow
   is invisible (body sets overflow-x: clip) - the CTA just silently leaves the
   screen. Letting the zones shrink is what keeps that from happening. */
.sn-header__bar {
  max-width: var(--sn-container-header);
  margin-inline: auto;
  padding-inline: var(--sn-gutter);
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: var(--sn-space-3);
}

.sn-header__lead {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--sn-space-4);
}

.sn-header__logo {
  flex: none;
  display: block;
  line-height: 0;
}
.sn-header__logo img {
  width: 150px;
}

.sn-header__actions {
  min-width: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sn-space-3);
}

/* Phone: deliberately secondary per the brief - a small text link, never a
   button, so it never competes with Start Assessment. It moved to the LEFT
   zone (beside the logo) in this pass; it is hidden from the bar below md and
   lives in the drawer and footer there instead. See the md breakpoint. */
.sn-header__tel {
  display: none;
  align-items: center;
  gap: var(--sn-space-2);
  min-height: 44px;
  font-size: var(--sn-fs-sm);
  font-weight: 500;
  color: var(--sn-text);
  white-space: nowrap;
}
.sn-header__tel:hover {
  color: var(--sn-accent);
}
.sn-header__tel .sn-icon {
  color: var(--sn-icon);
}

.sn-header__cta {
  flex: none;
  white-space: nowrap;
}

/* THREE labels, exactly one shown at a time by the breakpoints below:

     < 30rem   "Assessment"                               ~102px of pill
     30-90rem  "Start Assessment"                         ~138px
     >= 90rem  "Start My Healing & Longevity Assessment"   ~390px

   "Assessment" buying back 36px from "Start Assessment" is what lets the logo
   stay at a legible 150px on a 360px phone instead of being squeezed to ~114px
   to make room.

   The full wording exists so the header CTA matches the hero CTA on the
   redesigned home page. It is gated at 90rem rather than shown everywhere
   because it is ~390px of pill against ~138px - see the budget worked through
   at the 90rem block below, where 1280px comes up 114px short. Below 90rem the
   shorter labels are not a compromise, they are the only thing that fits.

   Swapped with `display`, deliberately NOT with aria-hidden: the accessible
   name is computed from what is visible, so it reads "Assessment" on a phone
   and the full wording on a wide desktop - all three accurate. aria-hidden on
   the hidden spans would leave the link with an empty name at some widths. */
.sn-header__cta-short,
.sn-header__cta-full {
  display: none;
}

/* --------------------------------------------------------------------------
   Existing-patient prompt.

   Two stacked lines rather than one, for a width reason worth recording: as a
   single line ("Existing patients? Book & Portal") it measures ~185px, and at
   1024px the three zones then total ~1066px against ~972px of available width -
   the bar overflows and the CTA is clipped off-screen. Stacked, it measures the
   width of its longer line (~105px) and the whole bar fits with room to spare,
   using vertical space the 80px-tall bar already has.

   Rendered by patientsLink() in apply-shell.mjs, which emits an <a> with NO
   href while EMR_URL is empty. An href-less <a> is inert and out of the tab
   order, so the prompt reads as a label until a real portal URL exists - which
   is the intended state, not an oversight. :any-link matches only when the
   href is actually present, so the interactive affordances below switch on by
   themselves the moment it is set.
   -------------------------------------------------------------------------- */
.sn-patients {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  line-height: 1.25;
  white-space: nowrap;
}
.sn-patients__label {
  font-size: var(--sn-fs-xs);
  color: var(--sn-text-muted);
}
.sn-patients__action {
  font-size: var(--sn-fs-sm);
  font-weight: 600;
  color: var(--sn-accent);
}
.sn-patients:any-link:hover .sn-patients__action {
  color: var(--sn-accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Desktop nav - hidden until 64rem, where the burger disappears. */
.sn-nav {
  display: none;
}
.sn-nav__list {
  display: flex;
  align-items: center;
  gap: var(--sn-space-6);
}
.sn-nav__list li {
  flex: none;
}
.sn-nav__list a {
  display: inline-block;
  padding-block: var(--sn-space-2);
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--sn-text);
  position: relative;
  /* Guard, not decoration. The nav sits in a shrinkable grid track, so if it is
     ever squeezed the failure mode is "Meet Our Team" silently wrapping to
     three lines rather than anything overflowing. nowrap + flex:none above turn
     that invisible reflow into visible overflow, which is far easier to catch.
     This exact wrap shipped once at 1024px before the breakpoint moved. */
  white-space: nowrap;
}
.sn-nav__list a:hover {
  color: var(--sn-accent);
}
/* Active state is a 2px underline, not a colour change alone - colour alone
   fails WCAG 1.4.1 (use of colour). */
.sn-nav__list a.is-current {
  color: var(--sn-ink);
  font-weight: 600;
}
.sn-nav__list a.is-current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--sn-accent);
}

/* Burger - 44px minimum target, CSS-drawn bars (no icon font, no symbols).

   `flex: none` is not decoration. As a plain flex item it shrinks under
   pressure, and at 390px it was measured rendering 40px wide - silently below
   the 44px minimum tap target, with nothing in the CSS to suggest it. A fixed
   `width` does NOT protect a flex item from shrinking; only flex-shrink: 0
   does. */
.sn-burger {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--sn-line);
  border-radius: var(--sn-r-md);
  background: var(--sn-surface);
  cursor: pointer;
}
.sn-burger__bars,
.sn-burger__bars::before,
.sn-burger__bars::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--sn-ink);
  transition: transform var(--sn-dur) var(--sn-ease),
    opacity var(--sn-dur) var(--sn-ease);
}
.sn-burger__bars {
  position: relative;
}
.sn-burger__bars::before,
.sn-burger__bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.sn-burger__bars::before {
  top: -6px;
}
.sn-burger__bars::after {
  top: 6px;
}
.sn-burger[aria-expanded="true"] .sn-burger__bars {
  background: transparent;
}
.sn-burger[aria-expanded="true"] .sn-burger__bars::before {
  transform: translateY(6px) rotate(45deg);
}
.sn-burger[aria-expanded="true"] .sn-burger__bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ==========================================================================
   MOBILE DRAWER

   Replaces the legacy off-canvas panel, which style.css:190 styles as
   `position:fixed; left:-75%; width:75%; height:100vh; background:#FAC74C`.
   That full-bleed yellow slab is one of the things that dates the site.

   IMPORTANT CONTEXT: the legacy `<div class="menu_header">` was the ONLY
   mobile menu on all 37 pages. The shell swap removes it, so this drawer must
   ship to every page or the entire site loses mobile navigation.
   ========================================================================== */

.sn-drawer {
  position: fixed;
  inset: 0;
  z-index: var(--sn-z-drawer);
}
.sn-drawer[hidden] {
  display: none; /* removes it from the a11y tree AND the tab order */
}
.sn-drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(22, 36, 31, 0.45);
  opacity: 0;
  transition: opacity var(--sn-dur) var(--sn-ease);
}
.sn-drawer.is-open .sn-drawer__scrim {
  opacity: 1;
}
.sn-drawer__panel {
  position: absolute;
  inset-block: 0;
  right: 0;
  width: min(88vw, 22rem);
  display: flex;
  flex-direction: column;
  gap: var(--sn-space-2);
  padding: var(--sn-space-4) var(--sn-space-5) var(--sn-space-7);
  background: var(--sn-surface);
  box-shadow: var(--sn-shadow-lg);
  font-family: var(--sn-font-sans);
  color: var(--sn-ink);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  transition: transform var(--sn-dur) var(--sn-ease);
}
.sn-drawer.is-open .sn-drawer__panel {
  transform: translateX(0);
}

.sn-drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sn-space-4);
  padding-block-end: var(--sn-space-3);
}
.sn-drawer__logo img {
  width: 150px;
}
.sn-drawer__close {
  position: relative;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  border: 1px solid var(--sn-line);
  border-radius: var(--sn-r-md);
  background: var(--sn-surface);
  cursor: pointer;
}
.sn-drawer__close::before,
.sn-drawer__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--sn-ink);
}
.sn-drawer__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.sn-drawer__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.sn-drawer__list a {
  display: flex;
  align-items: center;
  min-height: 56px;
  border-bottom: 1px solid var(--sn-line);
  font-size: var(--sn-fs-h4);
  font-weight: 500;
  color: var(--sn-ink);
}
.sn-drawer__list a.is-current {
  color: var(--sn-accent);
  font-weight: 600;
}
.sn-drawer__cta {
  width: 100%;
  margin-block-start: var(--sn-space-4);
}
.sn-drawer__tel,
.sn-drawer__mail {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-size: var(--sn-fs-sm);
  color: var(--sn-text);
}
.sn-drawer__tel {
  font-weight: 600;
  color: var(--sn-ink);
}

/* The existing-patient prompt is hidden from the bar below lg, so the drawer is
   where mobile users find it. Overrides .sn-patients' `display: none` - and is
   never itself hidden, because the drawer only exists below lg. */
.sn-drawer__patients {
  display: flex;
  min-height: 48px;
  margin-block-start: var(--sn-space-3);
  padding-block-start: var(--sn-space-4);
  border-top: 1px solid var(--sn-line);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.sn-footer {
  background: var(--sn-ink);
  color: var(--sn-on-dark-mut);
  font-family: var(--sn-font-sans);
  font-size: var(--sn-fs-sm);
  line-height: 1.6;
}
.sn-footer a {
  color: var(--sn-on-dark-mut);
}
.sn-footer a:hover {
  color: var(--sn-on-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sn-footer__top {
  max-width: var(--sn-container);
  margin-inline: auto;
  padding: var(--sn-space-8) var(--sn-gutter) var(--sn-space-7);
  display: grid;
  gap: var(--sn-space-7);
}
.sn-footer__h {
  font-family: var(--sn-font-sans);
  font-size: var(--sn-fs-xs);
  font-weight: 600;
  letter-spacing: var(--sn-ls-caps);
  text-transform: uppercase;
  color: var(--sn-on-dark);
  margin-block-end: var(--sn-space-4);
}
.sn-footer__brand img {
  width: 220px;
  /* The logo is dark indigo artwork on transparency; on the dark footer it
     needs a light plate to stay legible. */
  padding: var(--sn-space-3);
  background: var(--sn-surface);
  border-radius: var(--sn-r-md);
}
.sn-footer__blurb {
  margin-block: var(--sn-space-4) var(--sn-space-5) !important;
  max-width: 34ch;
}
.sn-footer ul li + li {
  margin-block-start: var(--sn-space-1);
}
.sn-footer__nav a,
.sn-footer__visit a {
  display: inline-block;
  padding-block: var(--sn-space-2);
}
.sn-footer__visit p + p {
  margin-block-start: var(--sn-space-4) !important;
}
.sn-footer__visit strong {
  color: var(--sn-on-dark);
  font-weight: 600;
}

/* Lives in the footer's bottom bar, beside the copyright. */
.sn-social {
  display: flex;
  gap: var(--sn-space-2);
}
.sn-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--sn-r-pill);
}
.sn-social a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}
.sn-social .sn-icon {
  color: var(--sn-on-dark);
}

/* The footer newsletter signup was REMOVED at the client's request, and its
   CSS deleted rather than left behind as dead rules. If it is ever restored,
   two hard-won notes from the original implementation are worth recovering
   from git history (commit 51ebf74):

   1. The email input needed `border: 1px solid var(--sn-line) !important` -
      the only justified !important in this file. style.css:298 sets
      `input,select,textarea{ border:1px solid #707070 !important }`, and an
      !important declaration cannot be beaten on selector weight, only matched.
   2. The Subscribe button was `<button class="sn-btn sn-btn--primary">` with NO
      type attribute. Its implicit type is still "submit", but
      style.css:302 `[type="submit"]{…!important}` (legacy dark-red, uppercase,
      box-shadow) does not match an absent attribute. Sidestepping that rule is
      far cheaper than fighting five !important declarations.

   assets/js/newsletter.js was deleted with it. */

.sn-footer .sn-microcopy {
  font-size: var(--sn-fs-xs);
  color: var(--sn-warm-400);
}

.sn-footer__bottom {
  max-width: var(--sn-container);
  margin-inline: auto;
  padding: var(--sn-space-5) var(--sn-gutter);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: var(--sn-fs-xs);
  color: var(--sn-warm-400);
  /* Stacked and centred on phones, copyright-left / socials-right from md. */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sn-space-4);
  text-align: center;
}
.sn-footer__bottom b {
  color: var(--sn-on-dark-mut);
  font-weight: 600;
}

/* ==========================================================================
   BREAKPOINTS
   These line up with the legacy stylesheet's 479/639/768/1023 so the shared
   shell never reflows at a different width than the legacy body beneath it.
   ========================================================================== */

/* --- The mobile bar's width budget -------------------------------------------
   Worth writing down, because this is what the header's mobile rules are
   solving and the numbers are not obvious from the declarations alone.

   At 390px (iPhone 12/13/14/15) the gutter is 20px a side, leaving 350px. The
   bar has three fixed costs: the logo, the CTA, and the 44px burger. Before
   this pass it also carried the phone, and the sum was
     logo 184 + tel 44 + CTA ~137 + burger 44 + 3 gaps x 16 = 457px
   against 350px available. The bar does not wrap and body sets
   `overflow-x: clip`, so that 107px did not produce a scrollbar - it silently
   pushed the CTA off the right edge, i.e. the single most important control on
   the site was invisible on the most common phone size in use.

   The fix is subtractive: the phone number and the existing-patient prompt both
   leave the bar below their breakpoints (both remain in the drawer, and the
   phone is also in the footer), leaving
     logo 150 + CTA ~130 + burger 44 + 2 gaps x 12 = 348px  <=  350px
   with the CTA and the burger, the two things a thumb needs, both intact.
   360px is handled by the next block down. */

/* --- sm 30rem / 480px --------------------------------------------------- */
@media (max-width: 29.99rem) {
  /* The bar tightens its own inline padding below the page gutter here. 8px a
     side is 24px recovered, which is the difference between fitting at 360px
     and not. The content below keeps the full --sn-gutter, so this is a header
     concession, not a site-wide one. */
  .sn-header__bar {
    padding-inline: var(--sn-space-3);
    gap: var(--sn-space-3);
  }
  .sn-header__cta {
    padding-inline: var(--sn-space-3);
    font-size: var(--sn-fs-xs);
  }
  .sn-header__cta-long {
    display: none;
  }
  .sn-header__cta-short {
    display: inline;
  }
}

/* Below 360px the budget is tightest of all: at 320px it is
     padding 24 + logo 132 + CTA ~94 + burger 44 + gaps 24 = 318px.
   Everything still clears the 44px minimum tap target - the CTA keeps
   `min-height: 48px` from .sn-btn and the burger is now flex: none. */
@media (max-width: 22.49rem) {
  .sn-header__logo img {
    width: 132px;
  }
  .sn-header__cta {
    padding-inline: var(--sn-space-2);
  }
}

@media (min-width: 30rem) {
  .sn-footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- md 48rem / 768px --------------------------------------------------- */
@media (min-width: 48rem) {
  /* From 768px there is room for the phone number beside the logo, which is
     where the brief wants it. Budget at 768: 736px available against
     logo 184 + tel ~114 + CTA ~160 + burger 44 + gaps ~40 = 542px. */
  .sn-header__bar {
    min-height: 72px;
  }
  .sn-header__logo img {
    width: 184px;
  }
  .sn-header__tel {
    display: inline-flex;
  }
  .sn-footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }
}

/* --- lg 64rem / 1024px -------------------------------------------------- */
@media (min-width: 64rem) {
  /* Three columns since the newsletter block was removed. */
  .sn-footer__top {
    grid-template-columns: 1.5fr 0.9fr 1.2fr;
    gap: var(--sn-space-7);
    padding-block: var(--sn-space-8) var(--sn-space-7);
  }
}

/* --- 75rem / 1200px - the nav uncollapses -------------------------------
   NOT at 64rem/1024px, which is where a "desktop nav" breakpoint would
   normally go, and where this one was first written. The five-element bar does
   not fit there. Measured at 1024px:

     available (1024 - 2x29 gutter)                        966px
     lead     logo 200 + gap 16 + phone 114                330px
     nav      Services 63 + Meet Our Team 110 + Events 52
              + Shop 40, plus 3 x 24 gaps                  337px
     actions  patients 105 + gap 24 + CTA 201              330px
     two zone gaps                                          48px
     ------------------------------------------------------------
     required                                             1045px   (79px over)

   With `auto minmax(0,1fr) auto` the nav is the track that gives, so nothing
   overflowed and no scrollbar appeared - "Meet Our Team" simply wrapped onto
   three lines and the zones visually collided. That is why the numeric check
   passed and only a screenshot caught it: a squeezed grid track is not
   overflow.

   1200px is the first width where all five elements fit with real margin
   (1045 required against 1136 available). Between 1024 and 1199 the header
   keeps the burger and the drawer, and the nav lives in the drawer - the phone
   and the CTA are still both in the bar from 768px up. */
@media (min-width: 75rem) {
  /* `auto 1fr auto`, NOT `1fr auto 1fr`: the latter caps each side zone at half
     the leftover width, and the lead zone (~330px) needs more than that at the
     narrow end of this range. `auto` sizes both side zones to their content and
     centres the nav in what remains. Because the lead is wider than the actions
     the nav sits ~20px right of true centre - under 2% of the bar's width. */
  .sn-header__bar {
    min-height: 80px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: var(--sn-space-5);
  }
  .sn-header__logo img {
    width: 200px;
  }
  .sn-nav {
    display: block;
  }
  .sn-nav__list {
    /* 24px gaps here where the budget is tightest; 32px at xl. */
    justify-content: center;
    gap: var(--sn-space-5);
  }
  .sn-burger {
    display: none;
  }
  .sn-drawer {
    display: none; /* belt and braces: shell.js also closes it on resize */
  }
  .sn-header__actions {
    /* margin-left:auto is a flex idiom and does nothing useful in the grid;
       the track is already sized to content and sits hard right. */
    margin-left: 0;
    justify-self: end;
    gap: var(--sn-space-5);
  }
  .sn-header__patients {
    display: flex;
  }
}

/* --- xl 80rem / 1280px - the header reaches its full proportions -------- */
@media (min-width: 80rem) {
  .sn-header__logo img {
    width: 232px;
  }
  .sn-nav__list {
    gap: var(--sn-space-6);
  }
  .sn-header__bar {
    gap: var(--sn-space-6);
  }
}

/* --- 90rem / 1440px - the CTA states the full offer ---------------------
   The header CTA switches to the hero's exact wording, "Start My Healing &
   Longevity Assessment", so the two agree on what the visitor is starting.

   90rem and not 80rem, worked the same way as the 75rem budget above.
   At 1280px (gutter has reached its 32px cap, so available = 1216):

     lead     logo 232 + gap 32 + phone 114                378px
     nav      Services 63 + Meet Our Team 110 + Events 52
              + Shop 40, plus 3 x 32 gaps                  361px
     actions  patients 105 + gap 32 + CTA 390              527px
     two zone gaps                                          64px
     ------------------------------------------------------------
     required                                             1330px   (114px over)

   The nav is the flexible track here, so going over does not overflow - it
   squeezes "Meet Our Team" onto extra lines and the zones collide, which is the
   failure the 75rem note above records catching only by screenshot. 1440px is
   the first standard width that clears it (1376 available against 1330), and
   the slack is thin enough that widening the label again means re-measuring. */
@media (min-width: 90rem) {
  .sn-header__cta-full {
    display: inline;
  }
  .sn-header__cta-long {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion. --sn-dur is already 0ms from tokens.css; these are the
   transform-based animations that need to be neutralised outright rather
   than merely sped up.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .sn-drawer__panel,
  .sn-drawer__scrim,
  .sn-burger__bars,
  .sn-burger__bars::before,
  .sn-burger__bars::after,
  .sn-btn {
    transition: none;
  }
  .sn-btn:active {
    transform: none;
  }
}
