/* ===========================================================
   BakeBetter Apps — Explainer Hub Brand Theme
   Wraps every explainer with consistent typography, header,
   and footer that match explain.bakebetterapps.com homepage.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bb-primary: #6D2E46;
  --bb-bg: #FFFFFF;
  --bb-text: #1A1A1A;
  --bb-text-mid: #666;
  --bb-text-light: #999;
  --bb-border: #E8E8E8;
  --bb-surface: #F5F5F5;
}

/* ----- Brand-consistent typography across every explainer ----- */
body,
body p, body li, body td, body th,
body span, body div, body button,
body input, body textarea, body select {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

body h1, body h2,
body .hero h1, body .hero h2,
body .hero-title, body .page-title {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif !important;
  letter-spacing: -0.015em !important;
}

/* ----- Sticky brand top bar — visible on every page ----- */
.bb-topbar {
  position: sticky;
  top: 0;
  z-index: 99999;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--bb-border);
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 0.78rem;
  color: var(--bb-text-mid);
  box-sizing: border-box;
  width: 100%;
}

.bb-topbar * {
  box-sizing: border-box;
}

.bb-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bb-topbar-brand {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-weight: 700;
  color: var(--bb-text) !important;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.bb-topbar-brand em {
  color: var(--bb-primary) !important;
  font-style: normal;
}

.bb-topbar-divider {
  color: var(--bb-text-light) !important;
  flex-shrink: 0;
}

.bb-topbar-label {
  font-size: 0.62rem;
  color: var(--bb-text-light) !important;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  white-space: nowrap;
}

.bb-topbar-back {
  color: var(--bb-text-mid) !important;
  text-decoration: none !important;
  font-size: 0.72rem;
  padding: 6px 14px;
  border: 1px solid var(--bb-border);
  border-radius: 20px;
  background: var(--bb-bg);
  transition: all 0.18s ease;
  font-weight: 500;
  white-space: nowrap;
  font-family: 'Inter', sans-serif !important;
  flex-shrink: 0;
}

.bb-topbar-back:hover {
  border-color: var(--bb-primary);
  color: var(--bb-primary) !important;
  background: var(--bb-bg);
}

/* ----- Brand footer strip ----- */
.bb-footer {
  margin-top: 60px;
  padding: 32px 22px 28px;
  border-top: 1px solid var(--bb-border);
  background: var(--bb-bg);
  text-align: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  color: var(--bb-text-light);
}

.bb-footer-line {
  font-size: 0.72rem;
  color: var(--bb-text-light) !important;
  letter-spacing: 0.04em;
}

.bb-footer-link {
  color: var(--bb-text-mid) !important;
  text-decoration: none !important;
  font-weight: 600;
  border-bottom: 1px solid var(--bb-border);
  padding-bottom: 1px;
  transition: all 0.18s ease;
}

.bb-footer-link:hover {
  color: var(--bb-primary) !important;
  border-color: var(--bb-primary) !important;
}

.bb-footer-meta {
  margin-top: 6px;
  font-size: 0.62rem;
  color: var(--bb-text-light) !important;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

/* ----- Mobile ----- */
@media (max-width: 640px) {
  .bb-topbar { padding: 9px 14px; font-size: 0.72rem; }
  .bb-topbar-brand { font-size: 0.85rem; }
  .bb-topbar-label, .bb-topbar-divider { display: none; }
  .bb-topbar-back { font-size: 0.68rem; padding: 5px 11px; }
  .bb-footer { padding: 26px 16px 22px; margin-top: 40px; }
}

/* ----- Print ----- */
@media print {
  .bb-topbar, .bb-footer { display: none; }
}
