/* ===========================================================================
   THE BODY — sticky header (js/header.js lifts .h-logo / .h-pill / .h-book into
   this fixed bar). Same Figma geometry as base.css; --u is set in px by the
   script so the size matches the hero exactly. Scrolled: a frosted rounded
   backdrop (inset like the hero card) fades in and the row slides up into it.
   =========================================================================== */
.hdr-probe { position: absolute; left: 0; top: 0; width: calc(1000 * var(--u)); height: 0; visibility: hidden; pointer-events: none; }

.site-hdr {
  position: fixed; left: 0; right: 0; top: 0; height: 0;
  z-index: 900; pointer-events: none;
}
.site-hdr > a, .site-hdr > nav { pointer-events: auto; }
.site-hdr .h-logo, .site-hdr .h-pill, .site-hdr .h-book {
  transition: opacity 1.1s ease, translate .55s cubic-bezier(.2,.7,.2,1);
}
.site-hdr.is-scrolled .h-logo,
.site-hdr.is-scrolled .h-pill,
.site-hdr.is-scrolled .h-book { translate: 0 calc(-31 * var(--u)); }

.site-hdr-bg {
  position: absolute; left: calc(24 * var(--u)); right: calc(24 * var(--u));
  top: calc(12 * var(--u)); height: calc(76 * var(--u));
  border-radius: calc(30 * var(--u));
  background: rgba(28, 23, 19, .52);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  border: 1px solid rgba(242, 238, 230, .12);
  box-shadow: 0 calc(10 * var(--u)) calc(30 * var(--u)) rgba(20, 16, 12, .18);
  opacity: 0; translate: 0 calc(-12 * var(--u));
  transition: opacity .45s ease, translate .55s cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}
.site-hdr.is-scrolled .site-hdr-bg { opacity: 1; translate: 0 0; }
/* pages whose header is dark-on-paper (Gift, Book, Visit) */
.site-hdr--paper .site-hdr-bg {
  background: rgba(242, 238, 230, .8);
  border-color: rgba(23, 20, 17, .08);
  box-shadow: 0 calc(10 * var(--u)) calc(30 * var(--u)) rgba(20, 16, 12, .08);
}

@media (prefers-reduced-motion: reduce) {
  .site-hdr .h-logo, .site-hdr .h-pill, .site-hdr .h-book, .site-hdr-bg { transition: none; }
}

/* in-page and cross-page anchors land below the sticky bar, not under it */
[id] { scroll-margin-top: clamp(72px, 7.6vw, 112px); }

/* phone menu pieces (js/header.js builds them on every page; css/mobile.css shows
   them at <= 1079px). Never part of the desktop layout. */
.hdr-burger, .m-menu, .m-book-fab { display: none; }
