/* Landing page header and footer on selected inner pages
   (wn-site-chrome-20261201.js sets html[data-wn-chrome] on those pages and
   adds the header and footer around the app root). The markup and most of the
   styling come straight from the landing page (.hb-site .hb-header /
   .hb-footer in the main stylesheet); this file pins the header with the same
   glass bar as the landing page and hides each page's own header and footer. */

/* ---------- Hide the page's own header and footer ---------- */
html[data-wn-chrome] #root .cp-nav,
html[data-wn-chrome] #root .cp-footer,
html[data-wn-chrome] #root .gp-nav,
html[data-wn-chrome] #root .gp-footer,
html[data-wn-chrome] #root footer.hb-footer {
  display: none !important;
}
/* The demo and pricing pages' own headers sit in the flow on a dark band: keep their
   space (so the hero doesn't move) but hide it. The landing header is the
   same height. */
html[data-wn-chrome] #root .wd-demo > .hb-header,
html[data-wn-chrome] #root .wd-demo .wd-header,
html[data-wn-chrome] #root .wp-pricing .wp-header {
  visibility: hidden;
}

/* ---------- Header, pinned with the landing page's glass bar ---------- */
.wn-chrome-head.hb-site {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  background: transparent;
  overflow: visible;
  isolation: auto;
  color: #f6fbf4;
}
.wn-chrome-head .hb-header { position: relative; z-index: 1; }
.wn-chrome-head .hb-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(8, 30, 27, 0.62);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid rgba(221, 247, 227, 0.1);
  box-shadow: 0 12px 32px -20px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.wn-chrome-head[data-wn-glass] .hb-header::before { opacity: 1; }
/* Pages with a light top get the dark bar from the start. */
html[data-wn-chrome="light"] .wn-chrome-head .hb-header::before {
  opacity: 1;
  background: #081e1b;
}
html[data-wn-chrome="light"] .wn-chrome-head[data-wn-glass] .hb-header::before { background: rgba(8, 30, 27, 0.62); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .wn-chrome-head .hb-header::before { background: rgba(8, 30, 27, 0.94); }
}
@media (prefers-reduced-motion: reduce) {
  .wn-chrome-head .hb-header::before { transition: none; }
}
/* As on the landing page after its tidy-up: squarer button, no arrow. */
.wn-chrome-head .hb-nav-cta { border-radius: 10px; }
.wn-chrome-head .hb-nav-cta:hover { transform: none; }

/* ---------- Footer: the landing page's, full width ---------- */
.wn-chrome-foot.hb-site { overflow: visible; }

/* ---------- Room for the taller header ---------- */
/* Condition pages: the "Back to home" pill sits just under the header. */
html[data-wn-chrome] .cp-page .cp-back { top: 112px; }
@media (max-width: 900px) {
  html[data-wn-chrome] .cp-page .cp-back { top: 94px; }
  html[data-wn-chrome] .cp-page .cp-back + .cp-hero { padding-top: 160px; }
  html[data-wn-chrome] .cp-page .cp-hero { padding-top: 120px; }
}
/* Guide page: hero starts below the header. */
html[data-wn-chrome] .gp-page .gp-hero { padding-top: 170px; }
@media (max-width: 900px) {
  html[data-wn-chrome] .gp-page .gp-hero { padding-top: 130px; }
}

/* Header without the page links: logo, Sign in and Sign up only. On phones
   Sign in shows beside Sign up instead of the menu button. */
.wn-chrome-head .hb-nav-links,
.wn-chrome-head .hb-menu-toggle { display: none !important; }
.wn-chrome-head .hb-nav-signin { display: inline-flex; }

/* Awareness ribbon to the right of the wellnest wordmark in the header and
   footer, after a space. Decorative only, so screen readers skip it. */
#homebeta .hb-brand::after,
.wn-chrome-head .hb-brand::after,
.wn-chrome-foot .hb-brand::after {
  content: "🎗️" / "";
  margin-left: 0.25em;
  font-size: 0.8em;
  line-height: 1;
  letter-spacing: normal;
}

/* Footer: the logo mark sits level with the wellnest wordmark and ribbon. */
.hb-site .hb-footer .hb-brand .hb-brand-mark { transform: translateY(-1px); }

/* Ribbon a little closer to the wordmark: a small gap between them. The brand
   is a flex row, so its own gap (9px in the header, 3px in the footer) is
   part of the space. */
.wn-chrome-head .hb-header .hb-brand::after { margin-left: 1px; transform: translateY(2px); }
.wn-chrome-foot .hb-footer .hb-brand::after { margin-left: 7px; transform: translateY(2px); }

/* Header and footer logo mark level with the wellnest wordmark and ribbon.
   The server lifts every logo 2px for the app's own headers; that is
   replaced here. Safari (Mac and iPhone) sets this font about 2px lower
   than Chrome, so it gets its own offsets. */
.hb-site .hb-header .hb-brand-mark { translate: 0 -6px; }
.hb-site .hb-footer .hb-brand-mark { translate: 0 -4px; }
@supports (font: -apple-system-body) {
  .hb-site .hb-header .hb-brand-mark { translate: 0 -2px; }
  .hb-site .hb-footer .hb-brand-mark { translate: none; }
}

/* Sign in / sign up page: its own header (logo and Back to home) gives way
   to the landing header; its space is kept at the landing header's height
   so the page below sits clear of it. */
html[data-wn-chrome] #root .si-page > .si-nav {
  visibility: hidden;
  height: var(--wn-chrome-h, 98px);
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* Pricing and chronic pain diary pages only: header logo mark 2px lower than elsewhere. */
html:has(link[rel="canonical"]:is([href$="/pricing"], [href$="/chronic-pain-diary"])) .wn-chrome-head .hb-header .hb-brand-mark { translate: 0 -4px; }
@supports (font: -apple-system-body) {
  html:has(link[rel="canonical"]:is([href$="/pricing"], [href$="/chronic-pain-diary"])) .wn-chrome-head .hb-header .hb-brand-mark { translate: none; }
}

/* Free tools and similar pages carry their own copy of the landing header in the
   page flow: keep its space so the content doesn't move, but hide it. */
html[data-wn-chrome] #root .wn-public-navigation { visibility: hidden; }

/* Phones: match the homepage header exactly (its rules in
   wellnest-landing-mobile.css and the #root button height don't reach this
   header, which sits outside #homebeta and #root). */
@media (max-width: 700px) {
  .wn-chrome-head .hb-container { width: calc(100% - 2 * clamp(16px, 4vw, 24px)); }
  .wn-chrome-head .hb-nav { min-height: 68px; }
}
@media (width <= 768px) {
  .wn-chrome-head .hb-nav-cta { min-height: 46px; }
}

/* Chronic pain diary: no small labels above headings, and less space where
   they were. */
html:has(link[rel="canonical"][href$="/chronic-pain-diary"]) :is(.wd-eyebrow, .wd-workspace-intro .hb-kicker, .demo-kicker) { display: none !important; }
html:has(link[rel="canonical"][href$="/chronic-pain-diary"]) .wd-workspace-intro { padding-top: 56px !important; }
@media (max-width: 760px) {
  html:has(link[rel="canonical"][href$="/chronic-pain-diary"]) .wd-workspace-intro { padding-top: 40px !important; }
}
