/*
 * The menu and footer for all of www.leanscale.team (Nov 24 2026).
 *
 * This file is used twice. The site imports it (Navbar.astro, Footer.astro),
 * and scripts/chrome.mjs publishes it verbatim in /_site/chrome/chrome.json,
 * which the knowledge hub copies into its own pages. So it must stand on its
 * own: every class is prefixed lsc-, every token is defined below rather than
 * borrowed from global.css (values match global.css; change both together),
 * and the scoped reset keeps the hub's own element styles out.
 *
 * Breakpoints match the site: full menu bar from 1280px, menu button below;
 * buttons hide below 810px.
 */
.lsc-header, .lsc-footer {
  --lsc-ink: #301934;
  --lsc-ink-deep: #24122a;
  --lsc-nav-text: #595959;
  --lsc-muted: #7a6e7d;
  --lsc-pill: #f4f4f4;
  --lsc-line: #e6e1e7;
  --lsc-card: #fffbff;
  --lsc-pink: #db84c9;
  --lsc-accent-text: #a8488f;
  --lsc-mcp: #b85634;
  --lsc-mcp-hover: #a24a2b;
  --lsc-on-ink: #e9e9e7;
  --lsc-white: #ffffff;
  --lsc-font: "Plus Jakarta Sans Variable", "Plus Jakarta Sans", system-ui, sans-serif;
  --lsc-max: 1360px;
  --lsc-gutter: 40px;
  --lsc-bar-h: 81px;
  font-family: var(--lsc-font);
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 1279px) { .lsc-header { --lsc-bar-h: 93px; } }
@media (max-width: 1199px) { .lsc-header, .lsc-footer { --lsc-gutter: 32px; } }
@media (max-width: 809px) { .lsc-header, .lsc-footer { --lsc-gutter: 20px; } .lsc-header { --lsc-bar-h: 58px; } }

/* Scoped reset, so neither site's element styles leak in. Each rule weighs one
   class (the :where() part adds nothing): enough to beat a host page's bare
   `a`, `button` or `ul` rules, and no more than the lsc- class rules below,
   which win by coming later. */
.lsc-header :where(*, *::before, *::after), .lsc-footer :where(*, *::before, *::after) { box-sizing: border-box; }
.lsc-header :where(ul), .lsc-footer :where(ul) { list-style: none; margin: 0; padding: 0; }
.lsc-header :where(li, p), .lsc-footer :where(li, p) { margin: 0; }
.lsc-header :where(a), .lsc-footer :where(a) { text-decoration: none; color: inherit; }
.lsc-header :where(button) { font: inherit; line-height: inherit; color: inherit; background: none; border: 0; margin: 0; padding: 0; cursor: pointer; }
.lsc-header :where(img), .lsc-footer :where(img) { display: block; max-width: none; }
.lsc-header :focus-visible { outline: 2px solid var(--lsc-ink); outline-offset: 3px; border-radius: 4px; }
.lsc-footer :focus-visible { outline: 2px solid var(--lsc-white); outline-offset: 3px; border-radius: 4px; }
.lsc-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.lsc-wrap { width: 100%; max-width: calc(var(--lsc-max) + 2 * var(--lsc-gutter)); margin: 0 auto; padding: 0 var(--lsc-gutter); }

/* ---------- header ---------- */
.lsc-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: var(--lsc-white); color: var(--lsc-ink);
  font-size: 16px; line-height: 1.375;
  transition: transform 0.2s ease-out;
}
.lsc-header.is-hidden { transform: translateY(-100%); }
.lsc-spacer { height: calc(var(--lsc-bar-h, 81px) + env(safe-area-inset-top)); }
@media (max-width: 1279px) { .lsc-spacer { --lsc-bar-h: 93px; } }
@media (max-width: 809px) { .lsc-spacer { --lsc-bar-h: 58px; } }

.lsc-bar { display: flex; align-items: center; gap: 4px; padding-top: 16px; padding-bottom: 16px; }
/* Framer inset the desktop logo 80px inside the page margin; kept from 1440px. */
.lsc-logo { flex: none; margin-left: 80px; margin-right: 12px; }
.lsc-logo img { width: 154px; height: auto; }

.lsc-top { display: flex; padding: 4px; background: var(--lsc-pill); border-radius: 8px; }
.lsc-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 8px; white-space: nowrap;
  font-size: 16px; font-weight: 500; line-height: 22px; letter-spacing: -0.12px;
  color: var(--lsc-nav-text);
  transition: background-color 0.15s, color 0.15s;
}
.lsc-trigger:hover, .lsc-trigger[aria-expanded="true"] { background: var(--lsc-white); color: var(--lsc-ink); }
/* The current section: the white pill alone is 1.1:1 against the grey bar,
   so a pink underline marks it too. */
.lsc-item.is-current > .lsc-trigger { background: var(--lsc-white); color: var(--lsc-ink); text-decoration: underline; text-decoration-color: var(--lsc-pink); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.lsc-caret { width: 10px; height: 10px; flex: none; transition: transform 0.15s; }
.lsc-trigger[aria-expanded="true"] .lsc-caret { transform: rotate(180deg); }

.lsc-actions { display: flex; gap: 12px; margin-left: auto; }

/* Buttons: the site's Button.astro "mcp" and "primary with arrow". */
.lsc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: 46px; white-space: nowrap;
  font-size: 16px; line-height: 16px; letter-spacing: -0.32px; font-weight: 400;
  transition: transform 0.15s ease-out, background-color 0.15s ease-out;
}
.lsc-btn:hover { transform: translateY(-1px); }
.lsc-btn:active { transform: translateY(0) scale(0.98); }
.lsc-btn-primary { background: var(--lsc-ink); color: var(--lsc-white); }
.lsc-btn-primary:hover { background: var(--lsc-ink-deep); }
.lsc-btn-primary.has-arrow { padding: 0 6px 0 16px; gap: 16px; }
.lsc-disc { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--lsc-white); color: var(--lsc-ink); transition: transform 0.15s ease-out; }
.lsc-btn:hover .lsc-disc { transform: translateX(2px); }
.lsc-btn-mcp { background: var(--lsc-mcp); color: var(--lsc-white); font-size: 15px; letter-spacing: -0.3px; padding: 0 22px 0 16px; height: 49px; }
.lsc-btn-mcp:hover { background: var(--lsc-mcp-hover); }
.lsc-spark { width: 19px; height: 18px; filter: brightness(0) invert(1); }
.lsc-block { display: flex; width: 100%; }

/* Dropdown panels: full width under the bar. */
.lsc-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--lsc-card); border-top: 1px solid var(--lsc-line);
  box-shadow: 0 18px 32px -18px rgba(48, 25, 52, 0.22);
}
.lsc-panel[hidden] { display: none; }
.lsc-panel-grid { display: grid; gap: 32px; padding-top: 28px; padding-bottom: 32px; grid-template-columns: repeat(var(--lsc-cols, 3), minmax(0, 1fr)) minmax(240px, 1.1fr); }
.lsc-col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.lsc-group-title { font-size: 13px; font-weight: 600; line-height: 1; letter-spacing: 0; color: var(--lsc-muted); margin-bottom: 10px; }
.lsc-group ul { display: grid; gap: 2px; }
.lsc-link { display: block; padding: 5px 0; color: var(--lsc-ink); font-size: 15px; font-weight: 500; line-height: 20px; }
.lsc-link:hover { color: var(--lsc-accent-text); }
.lsc-link[aria-current="page"] { color: var(--lsc-accent-text); }
.lsc-desc { display: block; font-size: 13px; font-weight: 400; line-height: 18px; color: var(--lsc-muted); margin-top: 1px; }
.lsc-all { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--lsc-ink); }
.lsc-all:hover { color: var(--lsc-accent-text); }
.lsc-feature {
  align-self: start; display: flex; flex-direction: column; gap: 10px;
  padding: 22px; border-radius: 12px; background: var(--lsc-ink); color: var(--lsc-white);
}
.lsc-feature-tag { font-size: 13px; font-weight: 600; color: var(--lsc-pink); }
.lsc-feature-title { font-size: 20px; font-weight: 600; line-height: 1.25; color: var(--lsc-white); }
.lsc-feature-text { font-size: 14px; line-height: 1.45; color: var(--lsc-on-ink); }
.lsc-feature-link { margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--lsc-white); }
.lsc-feature-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.lsc-feature :focus-visible { outline-color: var(--lsc-white); }

/* Menu button and the phone/tablet menu. */
.lsc-menu-btn { display: none; margin-left: 24px; width: 32px; height: 32px; position: relative; }
.lsc-menu-bar { position: absolute; left: 2px; right: 2px; height: 3px; border-radius: 2px; background: var(--lsc-ink); transition: transform 0.2s, top 0.2s; }
.lsc-menu-bar-1 { top: 10px; }
.lsc-menu-bar-2 { top: 19px; }
.lsc-header.is-open .lsc-menu-bar-1 { top: 15px; transform: rotate(45deg); }
.lsc-header.is-open .lsc-menu-bar-2 { top: 15px; transform: rotate(-45deg); }

/* No bottom padding on the scroller itself: the buttons stick to its bottom
   edge, and padding there would let links show through beneath them. */
.lsc-mobile::after { content: ""; display: block; height: 16px; }
.lsc-mobile { max-height: calc(100dvh - var(--lsc-bar-h) - env(safe-area-inset-top)); overflow-y: auto; overscroll-behavior: contain; }
.lsc-mobile[hidden] { display: none; }
.lsc-mobile-list { display: grid; gap: 2px; padding: 4px; background: var(--lsc-pill); border-radius: 12px 12px 0 0; }
.lsc-acc { background: var(--lsc-white); border-radius: 8px; }
.lsc-acc > summary, .lsc-mobile-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 12px; color: var(--lsc-nav-text); font-weight: 500; cursor: pointer; list-style: none;
}
.lsc-acc > summary::-webkit-details-marker { display: none; }
.lsc-acc[open] > summary { color: var(--lsc-ink); }
.lsc-acc[open] > summary .lsc-caret { transform: rotate(180deg); }
.lsc-mobile-top { background: var(--lsc-white); border-radius: 8px; }
.lsc-acc-body { padding: 0 12px 14px; display: grid; gap: 14px; }
.lsc-acc-body .lsc-feature { padding: 16px; }
.lsc-mobile-actions { display: grid; gap: 8px; padding: 8px 4px 4px; background: var(--lsc-pill); border-radius: 0 0 12px 12px; position: sticky; bottom: 0; }

/* 1280 to 1439: full bar without the logo inset. */
@media (max-width: 1439px) {
  .lsc-logo { margin-left: 0; }
  .lsc-trigger { padding: 9px 12px; }
}
@media (max-width: 1279px) {
  .lsc-bar { padding-top: 22px; padding-bottom: 22px; }
  .lsc-logo { margin-left: 28px; }
  .lsc-top, .lsc-panel { display: none !important; }
  .lsc-menu-btn { display: block; }
}
@media (min-width: 1280px) {
  .lsc-mobile { display: none !important; }
}
@media (max-width: 809px) {
  .lsc-bar { padding: 16px 30px; }
  .lsc-logo { margin-left: 0; }
  .lsc-actions { display: none; }
  .lsc-menu-btn { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .lsc-header, .lsc-btn, .lsc-disc, .lsc-caret, .lsc-menu-bar { transition: none; }
  .lsc-btn:hover, .lsc-btn:active, .lsc-btn:hover .lsc-disc { transform: none; }
}

/* ---------- footer ---------- */
.lsc-footer { margin-top: var(--section-gap, clamp(72px, 6vw + 36px, 112px)); }
.lsc-f-panel { background: var(--lsc-ink); color: var(--lsc-on-ink); padding: 64px; display: grid; gap: 56px; }
.lsc-f-top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.lsc-f-brand img { width: 220px; height: auto; }
.lsc-f-tagline { margin-top: 24px; font-size: 18px; line-height: 23.4px; letter-spacing: -0.4px; color: var(--lsc-white); }
.lsc-f-tools { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 22px; }
.lsc-f-tools li { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; background: rgba(255, 255, 255, 0.09); border-radius: 100px; font-size: 13px; color: var(--lsc-white); }
.lsc-f-tools img { width: 16px; height: 16px; object-fit: contain; }
.lsc-f-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.lsc-f-title { font-size: 16px; font-weight: 500; line-height: 22.4px; letter-spacing: -0.12px; color: var(--lsc-white); margin-bottom: 12px; }
.lsc-f-col li + li { margin-top: 4px; }
.lsc-f-col a { font-size: 16px; font-weight: 500; line-height: 22.4px; letter-spacing: -0.12px; color: rgba(233, 233, 231, 0.7); }
.lsc-f-col a:hover { color: var(--lsc-white); }
.lsc-f-socials { display: flex; align-items: flex-start; gap: 8px; }
.lsc-f-socials li + li { margin-top: 0; }
.lsc-f-socials a { display: grid; place-items: center; width: 40px; height: 40px; line-height: 0; background: var(--lsc-card); color: var(--lsc-ink); border-radius: 2px; }
.lsc-f-ai { justify-self: end; }
.lsc-f-ai ul { display: flex; gap: 8px; }
.lsc-f-ai a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 4px; background: rgba(255, 255, 255, 0.11); transition: background-color 0.2s; }
.lsc-f-ai a:hover { background: rgba(255, 255, 255, 0.2); }
.lsc-f-ai img { width: 22px; height: 22px; object-fit: contain; filter: brightness(0) invert(1); }
.lsc-f-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--lsc-white); }
.lsc-f-legal { display: flex; gap: 30px; }
.lsc-f-legal a { font-size: 11px; color: var(--lsc-white); }
@media (max-width: 1199px) {
  .lsc-f-panel { padding: 56px 32px; }
  .lsc-f-top { flex-direction: column; }
  .lsc-f-ai { justify-self: start; }
}
@media (max-width: 809px) {
  .lsc-footer.lsc-wrap { padding: 0; }
  .lsc-f-panel { padding: 48px 30px; }
  .lsc-f-cols { gap: 32px 48px; }
}
