/* ── Marketing-site chrome ──────────────────────────────────────────
   Shared by every public sales page (home, features, journal, recipes,
   docs, calculator, legal, error pages). Owns the utility strip, the
   fixed nav + dropdowns + mobile burger, the footer, and the display
   typeface. Page-specific styles live in each template; anything two
   pages need belongs here.

   Tokens match landing.html: cream #f7efe9, plum #43334C, red var(--accent),
   muted #5a4d63, hairline #ede7dc. */

:root {
  --bb-gutter: 28px;
  --bb-measure: 1000px;
  /* Height of utility strip + nav — pages pad their first block by this. */
  --bb-chrome: calc(92px + env(safe-area-inset-top, 0px));
}
@media (max-width: 700px) { :root { --bb-gutter: 20px; } }

/* Subtle Curves — the caps display face used for every page and section
   title across the sales site. Loaded once here rather than per page. */
@font-face {
  font-family: 'Subtle Curves';
  src: url("/static/fonts/subtle-curves.otf") format('opentype'),
       url("/static/fonts/subtle-curves.ttf") format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Subtle Curves';
  src: url("/static/fonts/subtle-curves-italic.otf") format('opentype'),
       url("/static/fonts/subtle-curves-italic.ttf") format('truetype');
  font-weight: 400; font-style: italic; font-display: swap;
}
.bb-display {
  font-family: 'Subtle Curves', Georgia, serif;
  font-weight: 400; letter-spacing: 0;
  text-wrap: balance;
}
.bb-display em, .bb-display i { font-style: italic; }
.bb-display span, .bb-display .accent { color: var(--accent-ink); }
/* Article/card titles keep the warm serif the homepage journal cards use. */
.bb-serif { font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif; font-weight: 700; letter-spacing: -.02em; }

html, body { overflow-x: hidden; overflow-x: clip; }
body.bb-marketing {
  background: #f7efe9; color: #43334C; margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
/* Subpages start right under the fixed chrome; the homepage hero pads itself. */
.bb-marketing main.bb-page { padding-top: var(--bb-chrome); min-height: 60vh; }
/* Anchor targets clear the fixed nav when scrolled to. */
.bb-marketing :target, .bb-marketing [id] { scroll-margin-top: calc(100px + env(safe-area-inset-top, 0px)); }

/* Brand-red band behind the iOS status bar (see landing.html for why this is
   a real element rather than a body::before). */
.bb-safearea {
  position: fixed; top: 0; left: 0; right: 0;
  height: env(safe-area-inset-top, 0px);
  background: var(--accent); z-index: 300; pointer-events: none;
}

/* ── Utility strip ─────────────────────────────────────────────── */
.bb-utility {
  position: fixed; top: 0; left: 0; right: 0; z-index: 101;
  background: var(--accent);
  height: calc(36px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  display: flex; align-items: center;
  padding: 0 40px;
  font-size: 12px;
  border-bottom: 1px solid rgba(67,51,76,0.08);
  transition: transform .25s ease, opacity .25s ease;
}
body.bb-scrolled .bb-utility { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.bb-utility-inner { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.bb-utility-tag { color: var(--on-accent); }
.bb-utility-offer {
  display: flex; align-items: center; justify-content: center;
  gap: 9px; width: 100%; height: 100%;
  color: var(--on-accent); text-decoration: none;
  white-space: nowrap; overflow: hidden;
}
.bb-utility-offer-tag {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 800; letter-spacing: .8px;
  text-transform: uppercase; color: var(--on-accent);
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 3px 10px; border-radius: 100px; line-height: 1.4;
}
.bb-utility-offer-text { color: var(--on-accent); font-size: 12.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bb-utility-offer-text strong { font-weight: 800; }
.bb-utility-offer-sep { color: rgba(67,51,76,0.45); flex-shrink: 0; }
.bb-utility-offer-cta {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px;
  background: #fff; color: var(--accent-ink);
  font-size: 11.5px; font-weight: 800; letter-spacing: .2px;
  padding: 4px 12px; border-radius: 100px; line-height: 1.5;
  transition: background .15s, transform .15s;
}
.bb-utility-offer:hover .bb-utility-offer-cta { background: #fff0f1; transform: translateX(2px); }
.bb-utility-right { display: flex; align-items: center; gap: 14px; }
.bb-utility-right > a:first-child { color: var(--on-accent); font-weight: 600; transition: opacity .15s; }
.bb-utility-right > a:first-child:hover { opacity: 0.8; }
.bb-utility-soc {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.18); color: var(--on-accent);
  transition: background .15s, color .15s, transform .15s;
}
.bb-utility-soc:hover { background: #fff; color: var(--accent-ink); transform: translateY(-1px); }
@media (max-width: 720px) {
  .bb-utility-offer-tag, .bb-utility-offer-sep { display: none; }
  .bb-utility-offer { gap: 8px; }
  .bb-utility-offer-text { font-size: 12px; }
  .bb-utility-offer-cta { font-size: 11px; padding: 4px 10px; }
}
@media (max-width: 600px) {
  .bb-utility { padding: 0 16px; }
  .bb-utility-tag { display: none; }
}

/* ── Nav ───────────────────────────────────────────────────────── */
.bb-nav {
  background: #fff; border-bottom: 1px solid #ede7dc;
  position: fixed; top: calc(36px + env(safe-area-inset-top, 0px)); left: 0; right: 0; z-index: 100;
  padding: 0 40px; display: flex; align-items: center; justify-content: space-between; height: 56px;
  
  transition: top .25s ease, height .25s ease, box-shadow .25s ease;
}
body.bb-scrolled .bb-nav { top: env(safe-area-inset-top, 0px); height: 48px;  }
.bb-nav .logo { font-size: 17px; font-weight: 700; color: #43334C; display: flex; align-items: center; }
.bb-nav .logo span { color: var(--accent-ink); }
.bb-nav-links { display: flex; align-items: center; gap: 28px; }
.bb-nav-links a { font-size: 13px; color: #5a4d63; transition: color .2s; padding: 12px 4px; text-decoration: none; }
.bb-nav-links a:hover { color: var(--accent-ink); }
.bb-nav-links a.bb-nav-signin { font-size: 13px; color: #5a4d63; }
.bb-nav-links a.bb-nav-signin:hover { color: var(--accent-ink); }
.bb-nav-links a.bb-nav-cta { background: var(--accent); color: var(--on-accent); padding: 8px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; transition: background .2s; }
.bb-nav-links a.bb-nav-cta:hover { background: var(--accent-hover); color: var(--on-accent); }
/* Current section is tinted red so visitors can place themselves. */
.bb-dropdown.is-current > summary { color: var(--accent-ink); }
.bb-dropdown-menu a.is-current { background: var(--accent-tint); color: var(--accent-ink); }

.bb-dropdown { position: relative; }
.bb-dropdown summary {
  list-style: none; cursor: pointer;
  padding: 12px 4px;
  font-size: 13px; color: #5a4d63;
  display: inline-flex; align-items: center; gap: 5px;
  transition: color .2s;
}
.bb-dropdown summary::-webkit-details-marker,
.bb-dropdown summary::marker { display: none; content: ""; }
.bb-dropdown summary:hover { color: var(--accent-ink); }
.bb-dropdown[open] > summary { color: var(--accent-ink); }
.bb-dropdown summary svg { transition: transform .15s; }
.bb-dropdown[open] > summary svg { transform: rotate(180deg); }
.bb-dropdown-menu {
  position: absolute; top: 100%; left: -16px;
  min-width: 240px;
  background: #fff; border: 1px solid #ede7dc; border-radius: 12px;
  
  padding: 8px; margin-top: 6px; z-index: 200;
}
.bb-dropdown-menu a {
  display: block; padding: 10px 14px; font-size: 13px; color: #43334C;
  border-radius: 8px; text-decoration: none; transition: background .15s, color .15s;
}
.bb-dropdown-menu a strong { display: block; font-weight: 600; }
.bb-dropdown-menu a small { display: block; font-size: 11px; color: #7a6d7e; font-weight: 400; margin-top: 2px; }
.bb-dropdown-menu a:hover { background: var(--accent-tint); color: var(--accent-ink); }
.bb-dropdown-menu a:hover small { color: #b93378; }

/* Mobile burger — replaces the dropdowns below 760px. CSS-only disclosure. */
.bb-burger { display: none; }
@media (max-width: 860px) {
  .bb-nav { padding: 0 20px; }
  .bb-nav-links { gap: 16px; }
}
@media (max-width: 760px) {
  .bb-nav-links a.bb-nav-signin { display: none; }
  .bb-nav { padding: 0 14px; gap: 10px; }
  .bb-nav .logo .bb-logo-img { height: 30px; }
  .bb-nav-links > .bb-dropdown { display: none; }
  .bb-nav-links { gap: 8px; }
  .bb-nav-links a.bb-nav-cta { padding: 8px 14px; font-size: 12px; white-space: nowrap; }

  .bb-burger { display: block; position: relative; }
  .bb-burger > summary {
    list-style: none; cursor: pointer; padding: 8px; margin: 0;
    display: flex; align-items: center; border-radius: 8px;
    border: 1px solid #ede7dc; background: #fff; color: #43334C;
  }
  .bb-burger > summary::-webkit-details-marker { display: none; }
  .bb-burger[open] > summary { background: #f7efe9; border-color: #e3d9cd; }
  .bb-burger-panel {
    position: absolute; top: calc(100% + 10px); right: 0;
    width: min(76vw, 290px);
    background: #fff; border: 1px solid #ede7dc; border-radius: 14px;
    
    padding: 8px; z-index: 200;
    max-height: min(70vh, 460px); overflow-y: auto;
  }
  .bb-burger-panel a { display: block; padding: 11px 12px; border-radius: 9px; font-size: 14px; color: #43334C; text-decoration: none; }
  .bb-burger-panel a:hover, .bb-burger-panel a:focus, .bb-burger-panel a.is-current { background: #f7efe9; }
  .bb-burger-panel a.is-current { color: var(--accent-ink); }
  .bb-burger-panel small { display: block; font-size: 11.5px; color: #7a6d7e; margin-top: 1px; }
  .bb-burger-sep { font-size: 10.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: #9b8fa0; padding: 12px 12px 5px; margin: 0; }
}

/* ── Footer ────────────────────────────────────────────────────── */
.bb-footer { border-top: 1px solid #ede7dc; padding: 40px var(--bb-gutter) 24px; background: #fff; }
.bb-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 32px; max-width: var(--bb-measure); margin: 0 auto 32px; }
.bb-footer-brand { font-size: 16px; font-weight: 700; color: #43334C; margin-bottom: 8px; }
.bb-footer-brand span { color: var(--accent-ink); }
.bb-footer-sub { font-size: 13px; color: #5a4d63; line-height: 1.6; }
.bb-footer-made { font-size: 12.5px; color: #7a6d7e; line-height: 1.6; margin-top: 14px; }
.bb-footer-made a { color: #5a4d63; }
.bb-footer-made a:hover { color: var(--accent-ink); }
.bb-footer-col h3 { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #5a4d63; margin: 0 0 12px; font-weight: 700; }
.bb-footer-col a { display: block; font-size: 13px; color: #5a4d63; padding: 8px 0; transition: color .2s; text-decoration: none; }
.bb-footer-col a:hover { color: var(--accent-ink); }
.bb-footer-bottom { text-align: center; font-size: 12px; color: #7a6d7e; padding-top: 20px; border-top: 1px solid #f5f0e8; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.bb-footer-bottom a { color: #7a6d7e; text-decoration: none; }
.bb-footer-bottom a:hover { color: var(--accent-ink); }
@media (max-width: 860px) { .bb-footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; } .bb-footer-grid > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 480px) { .bb-footer-grid { grid-template-columns: 1fr; } }

/* ── Shared page primitives for subpages ───────────────────────── */
/* Centred page intro: eyebrow pill, display title, one-line sub. */
.bb-pagehead { text-align: center; padding: 56px var(--bb-gutter) 32px; max-width: 760px; margin: 0 auto; }
.bb-pagehead .bb-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent-tint); border: 1px solid #f6d5d9;
  padding: 5px 12px; border-radius: 100px; margin-bottom: 18px;
}
.bb-pagehead h1 { font-size: 44px; line-height: 1.12; color: #43334C; margin: 0 0 14px; }
.bb-pagehead p { font-size: 16px; color: #5a4d63; line-height: 1.6; margin: 0 auto; max-width: 560px; }
@media (max-width: 600px) {
  .bb-pagehead { padding: 36px var(--bb-gutter) 24px; }
  .bb-pagehead h1 { font-size: 30px; }
  .bb-pagehead p { font-size: 15px; }
}

/* Closing offer band — same red as the beta page, used on subpages. */
.bb-offer-band { background: var(--accent); color: var(--on-accent); text-align: center; padding: 64px var(--bb-gutter); }
.bb-offer-band h2 { font-size: 36px; line-height: 1.1; margin: 0 0 12px; color: var(--on-accent); }
.bb-offer-band h2 span { color: #fff; }
.bb-offer-band p { font-size: 15.5px; opacity: .92; max-width: 520px; margin: 0 auto 26px; line-height: 1.6; }
.bb-offer-band .bb-offer-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.bb-offer-band .bb-offer-btn { display: inline-block; background: #fff; color: var(--accent-ink); font-weight: 700; padding: 13px 24px; border-radius: 10px; text-decoration: none; font-size: 15px; }
.bb-offer-band .bb-offer-btn:hover { background: #fff0f1; }
.bb-offer-band .bb-offer-btn.ghost { background: transparent; color: var(--on-accent); border: 1.5px solid rgba(255,255,255,.6); }
.bb-offer-band .bb-offer-btn.ghost:hover { background: rgba(255,255,255,.12); }
.bb-offer-band .bb-offer-fine { font-size: 12.5px; opacity: .8; margin: 18px 0 0; }
@media (max-width: 600px) { .bb-offer-band h2 { font-size: 28px; } .bb-offer-band { padding: 48px var(--bb-gutter); } }

@media (prefers-reduced-motion: reduce) {
  .bb-nav, .bb-utility, .bb-utility-offer-cta, .bb-dropdown summary svg { transition: none; }
}

/* ── Product mega menu ─────────────────────────────────────────── */
/* The panel hangs from the fixed nav, centred, rather than from its button. */
.bb-dropdown.bb-mega { position: static; }
.bb-mega-menu {
  left: 50%; top: 100%; margin-top: 0; transform: translateX(-50%);
  width: min(860px, calc(100vw - 32px)); padding: 0;
  display: grid; grid-template-columns: 1fr 280px; overflow: hidden;
}
.bb-mega-main { padding: 18px 18px 20px; }
.bb-mega-side { padding: 18px 16px 20px; background: #fbf8f4; border-left: 1px solid #ede7dc; }
.bb-mega-head { font-size: 10.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: #9b8fa0; margin: 0 0 8px 10px; }
.bb-mega-side .bb-mega-head + * { margin-top: 0; }
.bb-mega-side .bb-mega-head:not(:first-child) { margin-top: 16px; }
.bb-mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 6px; }
.bb-dropdown-menu a.bb-mega-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px; }
.bb-mega-ic {
  flex: none; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-tint); color: var(--accent-ink); box-shadow: inset 0 0 0 1px #f6d5d9;
}
.bb-mega-side .bb-mega-ic { background: #fff; }
.bb-dropdown-menu a.bb-mega-item:hover .bb-mega-ic, .bb-dropdown-menu a.bb-mega-item.is-current .bb-mega-ic { background: #fff; }
.bb-dropdown-menu a.bb-mega-link { padding: 8px 10px; font-weight: 600; }
.bb-dropdown-menu a.bb-mega-link span { display: block; font-size: 11px; color: #7a6d7e; font-weight: 400; margin-top: 2px; }
@media (max-width: 960px) { .bb-mega-menu { grid-template-columns: 1fr 240px; } }
@media (max-width: 760px) {
  .bb-burger-panel a.bb-burger-ic { display: flex; gap: 12px; align-items: center; }
  .bb-burger-panel .bb-mega-ic { width: 32px; height: 32px; border-radius: 9px; }
}
.bb-mega-main { display: flex; flex-direction: column; }
.bb-dropdown-menu a.bb-mega-promo {
  margin-top: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 10px; background: #2f2433; color: #fbe7ec; font-size: 13px;
}
.bb-dropdown-menu a.bb-mega-promo strong { display: inline; color: #fff; margin-right: 4px; }
.bb-dropdown-menu a.bb-mega-promo span { margin-left: auto; font-weight: 600; color: #fff; }
.bb-dropdown-menu a.bb-mega-promo:hover { background: #43334C; color: #fff; }
.bb-mega-grid { margin-bottom: 14px; }
