/* ==========================================================================
   MPM public header — GENERATED, do not edit
   ==========================================================================
   Source: landing/index.html
   Written by: tools/public-shell.js

   The marketing page defines the brand inline and remains the source of truth.
   This file exists so the blog can wear the same header instead of a lookalike
   maintained by hand — the copy that drifts is the copy nobody notices.

   To change the header: edit landing/index.html, copy it to index.html, then
   run `node tools/public-shell.js`. npm test fails if this file is stale.

   Both palettes are extracted: :root for dark, html.light for light. They are
   the marketing page's own values, so the blog cannot drift from the brand in
   either theme.
   ========================================================================== */

:root {
  --bg-0: #0b0d12;
  --bg-1: #13161d;
  --bg-2: #1b1f28;
  --bg-3: #232832;
  --bg-4: #2c333f;
  --border: #1f242e;
  --border-bright: #2c333f;
  --border-soft: #181c24;
  --text: #ebe6dc;
  --text-strong: #f7f2e6;
  --text-dim: #94908a;
  --text-faint: #5b5851;
  --text-mute: #353129;
  --accent: #c8a679;
  --accent-bright: #d6b890;
  --accent-deep: #9c7e54;
  --accent-glow: rgba(200, 166, 121, 0.35);
  --accent-soft: rgba(200, 166, 121, 0.10);
  --accent-text: #c8a679;
  --info: #8ab8d8;
  --success: #8ec5b6;
  --warning: #e8b04d;
  --danger: #d88775;
  --inverse: #1a1408;
}

html.light {
  --bg-0: #f5efe2;
  --bg-1: #fff9ec;
  --bg-2: #efe7d4;
  --bg-3: #e3d8c0;
  --bg-4: #d8cbb0;
  --border: #ded2bc;
  --border-bright: #cbb999;
  --border-soft: #eadfcc;
  --text: #312b20;
  --text-strong: #14110a;
  --text-dim: #685f50;
  --text-faint: #8b806d;
  --text-mute: #b4a98f;
  --accent: #9c7e54;
  --accent-bright: #7d633f;
  --accent-deep: #6b5433;
  --accent-glow: rgba(156, 126, 84, 0.22);
  --accent-soft: rgba(156, 126, 84, 0.12);
  --accent-text: #7d633f;
  --inverse: #fff9ec;
}

a {
  color: var(--accent);
  text-decoration: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 54px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
  flex: 0 0 auto;
  padding: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: contrast(1.12) saturate(1.08);
}

.brand-text {
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 1.02;
  max-width: 190px;
  background: linear-gradient(135deg, #f0d79f 0%, #d6b890 36%, #c8a679 62%, #9c7e54 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent-bright);
}

.nav-links {
  display: flex;
  gap: 26px;
  align-items: center;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--text-strong);
}

.theme-toggle {
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 13px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.theme-toggle:hover {
  border-color: var(--accent-deep);
  color: var(--accent);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

.theme-toggle .moon {
  display: none;
}

.btn-cta {
  background: var(--accent);
  color: var(--inverse);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  transition: background 0.15s, box-shadow 0.15s, transform 0.08s, border-color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,0.16);
}

.btn-cta:hover {
  background: var(--accent-bright);
  color: var(--inverse);
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-cta:active {
  transform: translateY(1px);
}

.btn-cta svg {
  width: 14px;
  height: 14px;
}

.nav-links a.btn-cta, .nav-links a.btn-cta:hover {
  color: var(--inverse);
}

.mobile-menu-button {
  display: none;
  background: var(--bg-2);
  color: var(--text-strong);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  padding: 0;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, color .15s, background .15s;
}

.mobile-menu-button:hover {
  border-color: var(--accent-deep);
  color: var(--accent);
}

.mobile-menu-button svg {
  width: 18px;
  height: 18px;
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0,0,0,.42);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}

.mobile-menu-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 130;
  width: min(82vw, 320px);
  padding: max(18px, env(safe-area-inset-top)) 16px 22px;
  background: rgba(19,22,29,.96);
  border-left: 1px solid rgba(200,166,121,.22);
  box-shadow: -24px 0 70px rgba(0,0,0,.42);
  transform: translateX(105%);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
  overflow-y: auto;
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(200,166,121,.16);
}

.mobile-menu-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 850;
  line-height: 1.05;
}

.mobile-menu-brand img {
  width: 42px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: contrast(1.12) saturate(1.08);
}

.mobile-menu-brand span {
  background: linear-gradient(135deg, #f0d79f 0%, #d6b890 36%, #c8a679 62%, #9c7e54 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent-bright);
}

.mobile-menu-close {
  background: rgba(255,255,255,.035);
  color: var(--text);
  border: 1px solid rgba(200,166,121,.22);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-links {
  display: grid;
  gap: 7px;
  padding-top: 14px;
}

.mobile-menu-links a {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border: 1px solid rgba(200,166,121,.12);
  border-radius: 8px;
  color: var(--text);
  background: rgba(11,13,18,.48);
  font-size: 14px;
  font-weight: 720;
}

.mobile-menu-links a:hover {
  border-color: var(--accent-deep);
  color: var(--text-strong);
}

.mobile-menu-links a::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  opacity: .9;
}

.mobile-menu-links .mobile-menu-cta {
  min-height: 46px;
  margin-top: 9px;
  background: linear-gradient(135deg, #d6b890, #c8a679 55%, #9c7e54);
  border-color: rgba(240,215,159,.5);
  color: #16100a;
  justify-content: center;
  font-weight: 850;
}

.mobile-menu-links .mobile-menu-cta::after {
  color: currentColor;
  margin-left: 10px;
}

/* --- light-theme overrides ------------------------------------------------
   The drawer panel and its items carry literal dark colours in their base
   rules, so light mode is not a token swap for them — it needs these. Without
   them the labels resolve light while the surface stays dark. */
html.light .theme-toggle .sun {
  display: none;
}

html.light .theme-toggle .moon {
  display: block;
}

html.light .btn-cta {
  color: #fff9ec;
  background: #7d633f;
  border-color: rgba(20,17,10,0.10);
  box-shadow: 0 8px 20px rgba(125,99,63,0.24);
}

html.light .btn-cta:hover {
  color: #fff9ec;
  background: #6f5938;
  border-color: rgba(20,17,10,0.14);
  box-shadow: 0 10px 26px rgba(111,89,56,0.28);
}

html.light .nav-links a.btn-cta, html.light .nav-links a.btn-cta:hover {
  color: #fff9ec;
}

html.light .mobile-menu {
  background: rgba(255,249,236,.97);
  box-shadow: -24px 0 60px rgba(50,38,20,.18);
}

html.light .mobile-menu-links a {
  background: rgba(255,255,255,.42);
  border-color: rgba(156,126,84,.18);
}

html.light .mobile-menu-links .mobile-menu-cta {
  color: #fff9ec;
  background: linear-gradient(135deg, #9c7e54, #7d633f);
  border-color: #7d633f;
}

@media(max-width: 900px) {
  .nav-links a:not(.btn-cta) { display: none; }
  .mobile-menu-button { display: inline-flex; }
}

@media(max-width: 600px) {
  .nav-links { gap: 8px; }
  .brand-mark { width: 42px; height: 35px; padding: 0; }
  .brand-text { font-size: 12px; max-width: 120px; white-space: normal; }
  .nav-links .btn-cta { display: none; }
  .nav-links .btn-cta svg { width: 15px; height: 15px; }
  .btn-cta { white-space: nowrap; padding: 9px 12px; font-size: 13px; }
  .theme-toggle { width: 36px; height: 36px; }
  .btn-cta svg { width: 13px; height: 13px; }
  .hero-cta-row .btn-cta-large, .hero-cta-row .btn-secondary-large { width: 100%; justify-content: center; }
  .dashboard-demo-actions .btn-secondary-large, .dashboard-demo-actions .btn-cta { width: 100%; justify-content: center; }
}

@media(max-width: 700px) {
  .brand-mark { width: 38px; height: 31px; flex-basis: 38px; }
  .brand-text { font-size: 11px; max-width: 112px; line-height: 1.05; }
  .nav-links { flex: 0 0 auto; gap: 7px; }
  .theme-toggle, .mobile-menu-button { width: 36px; height: 36px; flex: 0 0 36px; }
  .hero-cta-row .btn-cta-large, .hero-cta-row .btn-secondary-large { min-height: 52px; width: 100%; justify-content: center; text-align: center; padding-left: 14px; padding-right: 14px; }
  .dashboard-demo-actions .btn-secondary-large, .dashboard-demo-actions .btn-cta { width: 100%; justify-content: center; min-height: 48px; }
}

@media(max-width: 380px) {
  .brand-text { display: none; }
}

/* --- shell chrome the marketing page gets from its own layout ------------- */
.mpm-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg-0) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.mpm-nav-inner {
  max-width: 1200px;
  min-height: 78px;
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mpm-nav a { text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--accent); }
@media (max-width: 720px) {
  .mpm-nav-inner { padding: 10px 16px; min-height: 64px; }
}
