/* MeshHold marketing site — Crystalline Network direction.
   Palette mirrors the in-app web UI (web/src/styles.css) so the marketing
   surface and the product feel like the same thing. */

:root {
  --bg:           #0e1218;
  --bg-elev:      #131822;
  --panel:        #1b222c;
  --panel-2:      #232a36;
  --border:       #2a3140;
  --border-soft:  #1f2632;
  --text:         #e7eaed;
  --muted:        #8a94a3;
  --muted-dim:    #6b7785;
  --accent:       #2dd4bf;
  --accent-hover: #5eead4;
  --accent-fg:    #0e1218;
  --accent-glow:  rgba(45, 212, 191, 0.35);
  --danger:       #f43f5e;

  --maxw: 1180px;
  --maxw-narrow: 880px;
  --radius:    14px;
  --radius-sm: 8px;

  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

/* Octagon avatar mask — matches the MeshVault logo silhouette
   (regular 8-gon, corner cut = 1/(2+√2) ≈ 29.29%). Used for forum
   post avatars, mention-popup rows, profile headers etc. so every
   identity surface across the marketing site picks up the brand
   shape, not a generic circle. */
.avatar-octagon {
  clip-path: polygon(
    29.29% 0%, 70.71% 0%,
    100% 29.29%, 100% 70.71%,
    70.71% 100%, 29.29% 100%,
    0% 70.71%, 0% 29.29%
  );
  -webkit-clip-path: polygon(
    29.29% 0%, 70.71% 0%,
    100% 29.29%, 100% 70.71%,
    70.71% 100%, 29.29% 100%,
    0% 70.71%, 0% 29.29%
  );
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Atmospheric topographic backdrop, faintly behind the whole page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("img/topo_bg.0ed34c460d0d.png") center/cover no-repeat;
  opacity: 0.35;
  pointer-events: none;
  z-index: -2;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(45,212,191,0.08), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(45,212,191,0.06), transparent 55%);
  pointer-events: none;
  z-index: -1;
}

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

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
}
h1 { font-size: clamp(2.4rem, 4.4vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em 0; color: #c9d0d9; }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
}
code {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  color: #d6dbe3;
}
pre {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  overflow-x: auto;
  margin: 1em 0;
}
pre code { background: transparent; border: 0; padding: 0; }

/* ============ LAYOUT ============ */

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: var(--maxw-narrow); }

section { padding: 80px 0; }
section.tight { padding: 48px 0; }

/* ============ HEADER ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(14, 18, 24, 0.72);
  border-bottom: 1px solid var(--border-soft);
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}
.brand:hover { color: var(--text); }
.nav-links {
  display: flex;
  gap: 22px;
  margin-left: 16px;
  flex-wrap: nowrap;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-spacer { flex: 1; }
.nav-cta {
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-github {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-github:hover { color: var(--text); }

/* ============ LANGUAGE SWITCHER ============ */

.lang-switcher {
  position: relative;
  font-size: 0.85rem;
}
.lang-switcher > summary {
  list-style: none;             /* hide native marker */
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  user-select: none;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}
.lang-switcher > summary::-webkit-details-marker { display: none; }
.lang-switcher > summary:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.lang-switcher[open] > summary {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--panel-2);
}
.lang-switcher .lang-globe { color: var(--accent); flex-shrink: 0; }
.lang-switcher .lang-current-name {
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
/* .lang-current-code is the 2-letter fallback. Hidden by default;
 * the narrow-viewport @media block below swaps the two. */
.lang-switcher .lang-current-code {
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  display: none;
}
.lang-switcher .lang-caret { opacity: 0.7; transition: transform 0.15s ease; flex-shrink: 0; }
.lang-switcher[open] .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 180px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 50;
}
.lang-menu li { margin: 0; }
.lang-menu form { margin: 0; }
.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
}
.lang-option:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.lang-option.is-current { color: var(--accent); font-weight: 600; }
.lang-option .lang-flag { font-size: 1.05rem; line-height: 1; flex-shrink: 0; }
.lang-option .lang-name { flex: 1; }

@media (max-width: 720px) {
  /* Mobile: shrink the trigger but keep it discoverable. The native
     language name stays at this breakpoint — still readable. */
  .lang-switcher > summary { padding: 6px 10px; gap: 5px; }
  .lang-switcher .lang-current-name { max-width: 8ch; overflow: hidden; text-overflow: ellipsis; }
  .lang-menu { right: 0; }
}
@media (max-width: 480px) {
  /* Very narrow phones (iPhone SE ~320px, mid-range Android ~360-400px):
   * the full native name plus globe + caret + the Download CTA + the
   * hamburger overflows the viewport. Drop the native name in favour of
   * the bare 2-letter code so the trigger collapses to ~50-60px total. */
  .lang-switcher .lang-current-name { display: none; }
  .lang-switcher .lang-current-code { display: inline; }
  .lang-switcher > summary { padding: 6px 8px; }
}

/* ============ BUTTONS ============ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 140ms ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-fg);
  box-shadow: 0 0 24px 0 var(--accent-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}
.btn-lg { padding: 14px 24px; font-size: 1rem; }

/* .is-disabled — a <span> that wears the .btn shape but is not
 * actionable. Used on /downloads/ for platforms whose artifact row
 * hasn't been published yet (e.g. ARM64 RPM, x86_64 APK, F-Droid).
 * Picks up the .btn box-model from above; this rule just dims the
 * colour, removes the hover affordance, and blocks pointer events
 * so the cursor doesn't flicker to a pointer on hover. */
.btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============ CHANNEL TABS (/downloads/ top strip) ============ */

/* Three-pill row at the top of /downloads/ that surfaces Nightly +
 * Archive alongside the currently-shown Stable channel. Used to live
 * as a one-line footnote at the very bottom of the page, which made
 * the other two channels effectively invisible. */
.channel-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 28px;
  font-size: 0.92rem;
}
.channel-tab {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}
.channel-tab.is-active {
  background: var(--panel);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
  cursor: default;
}
a.channel-tab:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ============ COOKIE NOTICE ============ */

/* Fixed-bottom one-time notice. Was inline-styled — moved to a CSS
 * class so the narrow-viewport breakpoint can override min-widths
 * without an !important war. The old min-width: 280px on the text
 * caused the OK button to overflow on iPhone SE-class viewports
 * (320px wide minus 16px*2 outer + 18px*2 inner = 252px usable).
 */
.cookie-notice {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  font-size: 0.88rem;
  line-height: 1.5;
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--text);
  box-sizing: border-box;
}
.cookie-notice-text {
  flex: 1 1 320px;
  min-width: 0;             /* let it shrink below 320px on narrow phones */
}
.cookie-notice-link { color: var(--accent); }
.cookie-notice-ok {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.88rem;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  /* On phone-sized viewports the OK button gets its own row so it
   * never collides with the trailing edge. align-items:stretch makes
   * the wrapped button span the full notice width — a chunky tap
   * target instead of a 50px stub clinging to the bottom-right. */
  .cookie-notice { align-items: stretch; }
  .cookie-notice-ok { width: 100%; }
}

/* ============ HERO ============ */

.hero {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.hero h1 .accent { color: var(--accent); }
.hero p.lead {
  font-size: 1.18rem;
  color: #b9c0cb;
  max-width: 56ch;
  margin: 18px 0 28px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art {
  position: relative;
}
.hero-art img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  /* The hero PNG already has its own glow; just let it shine. */
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: -10% -10% -10% -10%;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 70%);
  filter: blur(40px);
  z-index: -1;
}

/* small "supported on" strip under hero */
.platforms {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted-dim);
  font-size: 0.85rem;
}
.platforms .dot { color: var(--accent); }

/* ============ FEATURE CARDS ============ */

.section-head {
  text-align: center;
  margin-bottom: 48px;
}
.section-head .eyebrow { justify-content: center; }
.section-head p {
  color: var(--muted);
  max-width: 60ch;
  margin: 12px auto 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.card {
  background: linear-gradient(180deg, rgba(35, 42, 54, 0.55), rgba(27, 34, 44, 0.55));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 160ms ease, transform 160ms ease;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.card .icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(45, 212, 191, 0.12);
  color: var(--accent);
  margin-bottom: 14px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* Bigger split-feature row, two cols of richer content w/ illustration */
.feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin: 64px 0;
}
.feature-split.reverse { direction: rtl; }
.feature-split.reverse > * { direction: ltr; }
.feature-split img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
}
.feature-split h2 { margin-bottom: 14px; }
.feature-split p { color: var(--muted); font-size: 1.02rem; }

/* ============ SCENARIO CARDS (docs landing) ============ */

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.scenario {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 160ms ease;
  color: var(--text);
}
.scenario:hover {
  border-color: var(--accent);
  background: var(--panel-2);
  color: var(--text);
  transform: translateY(-2px);
}
.scenario .scenario-icon {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--accent);
}
.scenario h3 {
  margin-bottom: 6px;
  font-size: 1.1rem;
}
.scenario .scenario-goal {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.scenario .scenario-covers {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
}
.scenario .scenario-covers li {
  font-size: 0.85rem;
  color: var(--muted-dim);
  padding: 3px 0;
}
.scenario .scenario-arrow {
  color: var(--accent);
  font-size: 0.9rem;
  margin-top: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ============ DOWNLOAD CARDS ============ */

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.dl-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.dl-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(45, 212, 191, 0.12);
}
.dl-card .platform-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(45, 212, 191, 0.12);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
}
.dl-card h3 { margin-bottom: 4px; }
.dl-card .platform-sub {
  color: var(--muted-dim);
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.dl-card .dl-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.dl-card .dl-buttons .btn {
  font-size: 0.85rem;
  padding: 8px 12px;
}
.dl-card .dl-meta {
  margin-top: auto;
  font-size: 0.78rem;
  color: var(--muted-dim);
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
}
.dl-card .dl-meta code {
  font-size: 0.72rem;
  word-break: break-all;
}

/* ============ DOCS LAYOUT ============ */

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  padding: 56px 0;
}
.docs-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
  font-size: 0.92rem;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.docs-sidebar h4 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin: 22px 0 8px;
  font-weight: 600;
}
.docs-sidebar h4:first-child { margin-top: 0; }
.docs-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.docs-sidebar li a {
  display: block;
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--muted);
  border-left: 2px solid transparent;
}
.docs-sidebar li a:hover { color: var(--text); }
.docs-sidebar li a.active {
  color: var(--accent);
  background: rgba(45, 212, 191, 0.08);
  border-left-color: var(--accent);
}
.docs-content { min-width: 0; }
.docs-content h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}
.docs-content .docs-lede {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
}
.docs-content h2 {
  margin: 40px 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
}
.docs-content h3 { margin: 26px 0 10px; }
.docs-content ul, .docs-content ol { padding-left: 22px; color: #c9d0d9; }
.docs-content li { margin: 4px 0; }

.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: rgba(45, 212, 191, 0.05);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 18px 0;
}
.callout strong { color: var(--accent); }

/* ============ FORUM / COMMUNITY ============ */

.forum-cats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.forum-cat {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}
.forum-cat:last-child { border-bottom: 0; }
.forum-cat:hover { background: var(--panel-2); }
.forum-cat .cat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(45, 212, 191, 0.12);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.forum-cat .cat-meta h3 {
  font-size: 1.02rem;
  margin-bottom: 2px;
}
.forum-cat .cat-meta p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.forum-cat .cat-stat {
  text-align: right;
  font-size: 0.82rem;
  color: var(--muted-dim);
  min-width: 70px;
}
.forum-cat .cat-stat strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

.thread-list {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.thread-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}
.thread-row:last-child { border-bottom: 0; }
.thread-row:hover { background: var(--panel-2); }
.thread-row .thread-title {
  font-weight: 500;
  margin-bottom: 2px;
}
.thread-row .thread-sub {
  color: var(--muted-dim);
  font-size: 0.82rem;
}
.thread-row .thread-sub .tag {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  padding: 1px 8px;
  border-radius: 999px;
  margin-right: 6px;
}
.thread-row .replies {
  text-align: right;
  font-size: 0.85rem;
  color: var(--muted);
}
.thread-row .replies strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

/* ============ BLOG ============ */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.post-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 160ms ease;
  color: var(--text);
}
.post-card:hover { border-color: var(--accent); color: var(--text); }
.post-card .post-meta {
  font-size: 0.8rem;
  color: var(--muted-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.post-card h3 { margin-bottom: 8px; }
.post-card p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ============ CTA BAND ============ */

.cta-band {
  background:
    radial-gradient(circle at 30% 30%, rgba(45,212,191,0.18), transparent 60%),
    linear-gradient(180deg, var(--panel), var(--bg-elev));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 56px 48px;
  text-align: center;
}
.cta-band h2 { margin-bottom: 10px; }
.cta-band p { color: var(--muted); max-width: 50ch; margin: 0 auto 24px; }
.cta-band .cta-actions { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ============ FOOTER ============ */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 56px 0 32px;
  margin-top: 80px;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 32px;
}
.footer-grid h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-dim);
  margin-bottom: 12px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--muted-dim);
}

/* ============ MOBILE NAV TOGGLE ============ */

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  transition: border-color 140ms ease, color 140ms ease;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle svg { display: block; }
.nav-toggle .icon-close { display: none; }
.nav-toggle.open .icon-open  { display: none; }
.nav-toggle.open .icon-close { display: block; }

/* ============ RESPONSIVE ============ */

@media (max-width: 880px) {
  .hero-grid,
  .feature-split,
  .docs-layout,
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .docs-sidebar { position: static; max-height: none; }
  .hero-art { order: -1; }
  section { padding: 56px 0; }

  /* Hamburger appears on narrow screens */
  .nav-toggle { display: inline-flex; }

  /* GitHub link tucks away on mobile (it's in footer) */
  .nav-github { display: none; }

  /* Nav-links collapse into a dropdown menu that opens below the header */
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    margin: 0;
    padding: 8px 24px 18px;
    gap: 0;
    background: rgba(14, 18, 24, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
    z-index: 49;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 14px 4px;
    font-size: 1.02rem;
    font-weight: 500;
    color: var(--text);
    border-bottom: 1px solid var(--border-soft);
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a.active { color: var(--accent); }
  .nav-links a:hover { color: var(--accent); }

  /* Trim header padding slightly */
  .nav-cta { font-size: 0.85rem; padding: 8px 14px; }
}

@media (max-width: 480px) {
  /* Very narrow phones: drop the brand wordmark (logo stays), shrink
   * the row gap, and pull the CTA in close. Each ~80px of saved width
   * is the difference between a single-line header and a clipped one
   * on a 320px iPhone SE. */
  .nav { gap: 10px; }
  .brand span { display: none; }
  .nav-cta { font-size: 0.85rem; padding: 6px 10px; }
  .container { padding: 0 16px; }
}
