/*
 * lsd-docs-shell.css — shared chrome for LSD framework doc pages.
 *
 * Topbar + hero + section shell + demo-card grid + footer.
 *
 * Depends on the token vars from lsd-tokens.css (or any compatible
 * inline override). Link this file AFTER lsd-tokens.css.
 *
 * Page-specific narrative styles stay inline on each page; this sheet
 * only carries the boilerplate that was duplicated across every doc.
 */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
code, pre { font-family: var(--font-mono); }

/* ─── Framework topbar ─── */
.fw-topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.fw-topbar__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 10px 28px; max-width: 1280px; margin: 0 auto;
}
.fw-topbar__brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; letter-spacing: 0.02em;
}
.fw-topbar__brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px var(--accent);
}
.fw-topbar__primary {
  display: flex; gap: 18px; color: var(--ink-dim); font-size: 13px;
  flex-wrap: wrap;
}
.fw-topbar__primary a { transition: color 160ms; }
.fw-topbar__primary a:hover { color: var(--ink); }
.fw-topbar__primary a.is-current { color: var(--accent); position: relative; }
.fw-topbar__primary a.is-current::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -12px;
  height: 2px; background: var(--accent);
}

/* ─── Components/sections sub-nav (auto-injected) ─── */
.fw-subnav {
  position: sticky; top: 41px; z-index: 49;
  background: color-mix(in oklch, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.fw-subnav__row {
  display: flex; gap: 14px; padding: 8px 28px;
  max-width: 1280px; margin: 0 auto; overflow-x: auto;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint); scrollbar-width: thin;
}
.fw-subnav__row a {
  white-space: nowrap; padding: 4px 8px; border-radius: 6px;
  transition: background 160ms, color 160ms;
}
.fw-subnav__row a:hover { background: var(--bg-elev); color: var(--ink); }
.fw-subnav__row a.is-current {
  background: color-mix(in oklch, var(--accent) 18%, transparent);
  color: var(--accent);
}

/* ─── Hero ─── */
.hero {
  max-width: 1200px; margin: 0 auto; padding: 80px 28px 56px;
}
.hero__eyebrow {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--accent); margin-bottom: 16px;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 200; letter-spacing: -0.03em; line-height: 1.0;
  margin: 0 0 18px; max-width: 20ch;
  background: linear-gradient(120deg, var(--ink), var(--accent) 60%, var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub {
  color: var(--ink-dim); max-width: 62ch; font-size: 17px; margin: 0;
}
.hero__sub code {
  background: var(--bg-elev); padding: 1px 6px; border-radius: 4px;
  color: var(--accent-2); font-size: 14px;
}

/* ─── Section shell ─── */
section.demo {
  max-width: 1200px; margin: 0 auto; padding: 56px 28px;
  border-top: 1px solid var(--line);
}
.demo__head {
  display: flex; align-items: baseline; gap: 18px; margin-bottom: 8px;
}
.demo__num {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-faint);
}
.demo__title {
  font-family: var(--font-display); font-size: clamp(28px, 4vw, 44px);
  font-weight: 300; letter-spacing: -0.02em; margin: 0;
}
.demo__desc {
  color: var(--ink-dim); max-width: 64ch; margin: 0 0 28px;
}
.demo__desc code {
  background: var(--bg-elev); padding: 1px 6px; border-radius: 4px;
  color: var(--accent-2); font-size: 13px;
}
.demo__subhead {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent-2);
  margin: 36px 0 14px; padding-top: 24px;
  border-top: 1px dashed var(--line);
}
.demo__subhead:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }

/* ─── Demo card grid ─── */
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.card__head {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 8px;
}
.card__kind {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-faint);
}
.card__name {
  font-family: var(--font-display); font-size: 18px; font-weight: 500;
  margin: 0;
}
.card__desc {
  color: var(--ink-dim); font-size: 13px; margin: 0; line-height: 1.55;
}
.card__stage {
  min-height: 110px; background: var(--bg-elev-2);
  border: 1px solid var(--line); border-radius: var(--r-md);
  display: grid; place-items: center;
  padding: 18px; position: relative;
}
.card__code {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 14px; margin: 0;
  font-size: 12px; color: var(--ink-dim);
  overflow-x: auto; line-height: 1.5;
}

/* ─── Footer ─── */
.foot {
  max-width: 1200px; margin: 64px auto 0; padding: 32px 28px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint); font-size: 13px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
