/* =========================================================================
 * BM Starter: Site header
 * Minimal sticky nav with mobile drawer.
 * ========================================================================= */

.bms-nav-wrap {
  --bms-bg:      var(--wp--preset--color--bg, #F1F2F3);
  --bms-bg-card: var(--wp--preset--color--bg-card, #FFFFFF);
  --bms-ink:     var(--wp--preset--color--ink, #1A1915);
  --bms-ink-2:   var(--wp--preset--color--ink-2, #4A4740);
  --bms-ink-3:   var(--wp--preset--color--ink-3, #8B867C);
  --bms-rule:    var(--wp--preset--color--rule, #DCDFE2);
  --bms-accent:  var(--wp--preset--color--accent, #B8694A);

  position: relative;
  z-index: 100;
  background: var(--bms-bg);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease, box-shadow .3s ease;
}

/* Sticky variant — marker class only. The actual position:sticky lives on
   the outer <header> via .bms-scrolled-header (forwarded by JS on scroll).
   In FSE block themes the inner div is wrapped by <header class="wp-block-template-part">,
   so applying position:sticky to the inner div is unreliable — the outer
   element handles it cleanly. */
.bms-nav-wrap--sticky {
  /* sticky behaviour lives on outer <header>; this class is a marker */
}

/* Scrolled state — JS adds .bms-scrolled to .bms-nav-wrap once scrollY > 8px,
   AND forwards .bms-scrolled-header to the outer <header>. When sticky toggle
   is on, JS only forwards on scroll, so the position:sticky engages mid-scroll. */
.bms-nav-wrap.bms-scrolled {
  box-shadow: 0 4px 20px -16px rgba(26, 25, 21, 0.25);
  background: var(--bms-bg);
}
header.wp-block-template-part.bms-scrolled-header,
.wp-site-blocks > header.bms-scrolled-header {
  position: sticky;
  top: 0;
  z-index: 50;
  overflow: visible;
  box-shadow: 0 4px 20px -16px rgba(26, 25, 21, 0.25);
}

.bms-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1240px;
  max-width: initial;
  margin: 0 auto;
  padding: 14px 40px;
}

@media (max-width: 720px) {
  .bms-nav { padding: 12px 24px; }
}

/* ---- Wordmark ---- */

.bms-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bms-ink);
  text-decoration: none;
  white-space: nowrap;
}

/* Logo variant */
.bms-wordmark-logo {
  display: block;
  height: 32px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

/* Text variant — italic serif treatment matching matt aesthetic */
.bms-wordmark-text {
  font-family: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.018em;
  line-height: 1;
}

.bms-wordmark-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--bms-accent);
  margin: 0 2px;
  position: relative;
  bottom: 4px;
}

.bms-wordmark-cred {
  font-family: ui-monospace, Menlo, monospace;
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bms-ink-3);
}

/* ---- Nav links ---- */

.bms-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  justify-content: center;
}

.bms-nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--bms-ink-2);
  text-decoration: none;
  transition: color .2s ease;
}

.bms-nav-links a:hover {
  color: var(--bms-accent);
}

@media (max-width: 960px) {
  .bms-nav-links { display: none; }
  .bms-nav-cta{ display:none !important; }
}

/* ---- CTA ---- */

.bms-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--bms-ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, transform .2s ease;
}

.bms-nav-cta:hover {
  background: var(--bms-accent);
  transform: translateY(-1px);
}

.bms-nav-cta .bms-arrow { width: 13px; height: 13px; }

@media (max-width: 720px) {
  .bms-nav-cta { display: none; }
}

/* ---- Burger button ---- */

.bms-nav-burger {
  display: none;
  background: none;
  border: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.bms-nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--bms-ink);
  margin: 4px auto;
  transition: transform .2s ease, opacity .2s ease;
}

@media (max-width: 960px) {
  .bms-nav-burger { display: block; }
}

/* ---- Drawer ---- */

.bms-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bms-bg);
  display: flex;
  flex-direction: column;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

.bms-nav-drawer:not([hidden]) {
  opacity: 1;
  visibility: visible;
}

.bms-nav-drawer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--bms-rule);
}

.bms-nav-drawer__close {
  background: none;
  border: 0;
  font-size: 32px;
  color: var(--bms-ink);
  cursor: pointer;
  width: 44px;
  height: 44px;
  line-height: 1;
}

.bms-nav-drawer__links {
  list-style: none;
  padding: 0;
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bms-nav-drawer__links a {
  display: block;
  padding: 14px 0;
  font-family: 'Inter Tight', sans-serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--bms-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--bms-rule);
}

.bms-nav-drawer__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--bms-ink);
  color: #fff;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
}

.bms-nav-drawer__cta .bms-arrow { width: 14px; height: 14px; }

/* =========================================================================
 * Announcement banner — sits above the header, scrolls away normally.
 * Rendered by inc/nav-banner.php on wp_body_open.
 * ========================================================================= */

#bms-nav-banner {
  /* Token fallbacks mirror .bms-nav-wrap so the banner works standalone. */
  --bms-bg:     var(--wp--preset--color--bg, #F1F2F3);
  --bms-ink:    var(--wp--preset--color--ink, #1A1915);
  --bms-accent: var(--wp--preset--color--accent, #B8694A);

  position: relative;
  z-index: 2;
  background: var(--bms-ink);
  color:  var(--bms-bg);
  text-align: center;
}

.bms-nav-banner-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 11px 40px;
  font-size: 13.5px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  display: flex;
  justify-content: safe center;
  gap:12px;
  flex-direction: row;
}


.bms-nav-banner-inner > :first-child { margin-top: 0; }
.bms-nav-banner-inner > :last-child  { margin-bottom: 0; }
.bms-nav-banner-inner p { margin: 0; }

.bms-nav-banner-inner a {
  color: var(--bms-accent);
  text-decoration: none;
  transition: color .2s ease;
}

.bms-nav-banner-inner a:hover,
.bms-nav-banner-inner a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

@media (max-width: 720px) {
  .bms-nav-banner-inner {
    padding: 10px 24px;
    font-size: 12.5px;

    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;

    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .bms-nav-banner-inner::-webkit-scrollbar { display: none; }

  .bms-nav-banner-inner > * {
    white-space: nowrap;
    flex: 0 0 auto;   /* stop flex from shrinking the line to fit */
  }
}
