/* Shared public-pages header + footer.
   Used by /, /pricing, /docs, /docs/:slug, /changelog, /legal,
   /plans/:id. Branded per host (Linked.Codes or tenant) via the
   --brand-accent custom property + .brand wordmark rewriting in
   withTenantBrand. */

/* ── Header ─────────────────────────────────────────────────────── */
.lc-h {
  position: sticky;
  top: 0;
  background: var(--ink, #0a0a0b);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  z-index: 50;
}
.lc-h-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 22px;
  align-items: center;
}
.lc-h-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.lc-h-brand:hover { text-decoration: none; }
.lc-h-brand img { height: 24px; max-width: 160px; object-fit: contain; display: block; }

/* Default Linked.Codes wordmark — inline SVG with currentColor fill.
   Tinted by the surrounding `color` so it picks up the brand accent
   on the dark header (and ink on the light footer). Tenant logos
   upload as <img> and render as-is — we trust the business to pick
   a logo that works on a dark surface. */
.lc-h-brand .lc-wordmark-svg {
  height: 26px; width: auto;
  display: block;
  color: var(--brand-accent, var(--mint, #75FB90));
}
/* Inherits color from its container — header parent (.lc-h-brand)
   is white-on-black, footer parent (.lc-f-brand .brand) is ink. */
.lc-wordmark-text { font-size: 18px; color: inherit; }

.lc-h-nav {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-self: start;
  margin-left: 8px;
}
.lc-h-link {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  position: relative;
  padding: 6px 0;
  transition: color 0.12s;
}
.lc-h-link:hover { color: #fff; }
.lc-h-link.is-active { color: #fff; }
.lc-h-link.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--brand-accent, var(--mint, #75FB90));
  border-radius: 1px;
}

.lc-h-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lc-h-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color 0.12s, color 0.12s, border-color 0.12s;
}
.lc-h-action-ghost {
  color: rgba(255,255,255,0.85);
  background: transparent;
}
.lc-h-action-ghost:hover { color: #fff; background: rgba(255,255,255,0.06); }
.lc-h-action-primary {
  color: var(--ink);
  background: var(--brand-accent, var(--mint, #75FB90));
  border-color: var(--brand-accent, var(--mint, #75FB90));
}
.lc-h-action-primary:hover {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

/* Signed-in user chip — rounded card linking to /app dashboard. */
.lc-h-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 5px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  text-decoration: none;
  color: #fff;
  transition: border-color 0.12s, background-color 0.12s;
}
.lc-h-user:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
}
.lc-user-avatar {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-accent, var(--mint, #75FB90));
  color: var(--ink);
  font-weight: 700;
  font-size: 12.5px;
  object-fit: cover;
  flex-shrink: 0;
}
.lc-h-user-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}
.lc-h-user-greet {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.lc-h-user-link {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

/* Mobile burger — hidden on desktop. */
.lc-h-burger {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  margin: -8px;
  cursor: pointer;
  color: #fff;
  border-radius: 8px;
  justify-self: end;
}
.lc-h-burger svg { width: 24px; height: 24px; display: block; }
.lc-h-burger:hover { background: rgba(255,255,255,0.08); }
.lc-h-burger[aria-expanded="true"] { background: rgba(255,255,255,0.1); }

/* Mobile menu — slides down under header. */
.lc-h-menu {
  border-top: 1px solid rgba(255,255,255,0.08);
  background: var(--ink, #0a0a0b);
  padding: 6px var(--gutter) 18px;
}
.lc-h-menu[hidden] { display: none; }
.lc-h-menu-nav {
  display: flex;
  flex-direction: column;
  padding: 4px 0 12px;
}
.lc-h-mlink {
  display: block;
  padding: 14px 4px;
  font-size: 16px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.lc-h-mlink:last-of-type { border-bottom: 0; }
.lc-h-mlink:hover { color: #fff; }
.lc-h-mlink.is-active { color: var(--brand-accent, var(--mint, #75FB90)); }

.lc-h-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 4px;
}
.lc-h-menu-actions .lc-h-action {
  width: 100%;
  justify-content: center;
  padding: 14px 16px;
  font-size: 14px;
  border-radius: 12px;
}
.lc-h-menu-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px 14px;
  text-decoration: none;
  color: #fff;
}
.lc-h-menu-user .lc-user-avatar { width: 36px; height: 36px; font-size: 14px; }
.lc-h-menu-user .lc-h-menu-user-name { font-size: 15px; font-weight: 700; }
.lc-h-menu-user .lc-h-menu-user-sub { font-size: 12px; color: rgba(255,255,255,0.6); }

@media (max-width: 820px) {
  .lc-h-nav { display: none; }
  .lc-h-actions { display: none; }
  .lc-h-burger { display: inline-flex; }
  .lc-h-inner { grid-template-columns: 1fr auto; gap: 12px; }
}

body.lc-menu-open { overflow: hidden; }

/* ── Footer ─────────────────────────────────────────────────────── */
.lc-f {
  background: var(--surface);
  border-top: 1px solid var(--line);
  margin-top: 64px;
}
.lc-f-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px var(--gutter) 32px;
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) 2fr;
  gap: 48px;
}
@media (max-width: 720px) {
  .lc-f-inner { grid-template-columns: 1fr; gap: 28px; padding: 36px var(--gutter) 22px; }
}
.lc-f-brand { display: flex; flex-direction: column; gap: 12px; }
.lc-f-brand .brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.lc-f-brand .brand img { height: 24px; max-width: 160px; object-fit: contain; }
.lc-f-brand .lc-wordmark-svg {
  height: 28px; width: auto;
  display: block;
  color: var(--ink);
}
.lc-f-tagline {
  color: var(--slate);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  max-width: 36ch;
}
.lc-f-tagline a {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.lc-f-tagline a:hover { border-bottom-color: var(--ink); }
.lc-f-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 540px) {
  .lc-f-cols { grid-template-columns: 1fr 1fr; gap: 18px 24px; }
}
.lc-f-col { display: flex; flex-direction: column; gap: 10px; }
.lc-f-col h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 4px;
}
.lc-f-col a {
  color: var(--ink);
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.4;
}
.lc-f-col a:hover { text-decoration: underline; text-decoration-color: var(--brand-accent, var(--ink)); }

.lc-f-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--slate);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 8px;
}
.lc-f-poweredby { letter-spacing: 0.16em; text-transform: uppercase; }
.lc-f-poweredby a { color: var(--ink); border-bottom: 1px solid var(--line); text-decoration: none; }
.lc-f-poweredby a:hover { border-bottom-color: var(--ink); }
