/* Standalone styles for the static marketing homepage. The design tokens
   mirror the chat client's src/styles.css so the two surfaces read as one
   product.

   Layout: each <section> is a full-bleed three-track grid — free space, a
   min(--col, 100% - 48px) content column, free space — and its children are
   placed into the middle track. Section borders span the viewport while the
   content stays in the column, and a width cap on any element can only ever
   narrow it, never squeeze it against a viewport-scaled gutter. The header
   and footer bars stay flex rows aligned to the same column via gutter
   padding; never give those bars a max-width. */

:root {
  --bg: oklch(0.145 0.008 340);
  --ink: oklch(0.9323 0.0625 322.59);
  --muted: oklch(0.64 0.035 322);
  --faint: oklch(0.47 0.02 322);
  --line: oklch(0.25 0.012 322);
  --accent: oklch(0.6838 0.2749 6.46);
  --accent-dim: oklch(0.6838 0.2749 6.46 / 0.09);
  --code-bg: oklch(0.22 0.012 322);
  --hover: oklch(0.9323 0.0625 322.59 / 0.05);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;

  --col: 960px;

  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  letter-spacing: 0;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: oklch(0.975 0.006 340);
    --ink: oklch(0.24 0.035 322);
    --muted: oklch(0.46 0.025 322);
    --faint: oklch(0.62 0.015 322);
    --line: oklch(0.89 0.01 322);
    --accent: oklch(0.56 0.24 6.46);
    --accent-dim: oklch(0.56 0.24 6.46 / 0.07);
    --code-bg: oklch(0.92 0.01 322);
    --hover: oklch(0.24 0.035 322 / 0.05);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.6; }
a { color: inherit; }
::selection { background: oklch(0.6838 0.2749 6.46 / 0.35); }
code { font-family: var(--mono); font-size: 0.88em; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.sigil { color: var(--accent); flex: none; }
.brand-lockup { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.wordmark { font-family: var(--mono); font-weight: 700; font-size: 15px; text-transform: lowercase; }

/* ---- chrome bars ---- */
.site-head, .site-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-inline: max(24px, calc(50% - var(--col) / 2));
}
.site-head {
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
}
.site-nav { display: flex; align-items: center; gap: 22px; font-family: var(--mono); font-size: 12px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-cta { color: var(--accent); border: 1px solid var(--line); border-radius: 6px; padding: 7px 13px; }
.site-nav .nav-cta:hover { border-color: var(--accent); background: var(--accent-dim); }

/* ---- sections: full-bleed grid, children in the content column ---- */
main > section {
  display: grid;
  grid-template-columns: 1fr min(var(--col), 100% - 48px) 1fr;
}
main > section > * { grid-column: 2; min-width: 0; }
section[id] { scroll-margin-top: 80px; } /* keep anchor targets clear of the sticky header */

h2 {
  margin: 0 0 40px; font-size: clamp(22px, 3.4vw, 30px); font-weight: 700;
  letter-spacing: -0.01em; text-wrap: balance;
}
h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }

/* ---- hero ---- */
.hero { padding-block: 96px 88px; }
.eyebrow {
  font-family: var(--mono); font-size: 11px; text-transform: lowercase;
  letter-spacing: 0.04em; color: var(--accent); margin: 0 0 20px;
}
.hero h1 {
  margin: 0 0 22px; font-size: clamp(34px, 6vw, 56px); line-height: 1.04;
  font-weight: 700; letter-spacing: -0.02em; max-width: 720px; text-wrap: balance;
}
.lede {
  margin: 0 0 34px; font-size: clamp(16px, 2.2vw, 19px); color: var(--muted);
  max-width: 620px; text-wrap: pretty;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.primary, .secondary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px; border-radius: 7px;
  font-weight: 600; font-size: 14px; text-decoration: none;
  border: 1px solid transparent;
}
.primary { background: var(--accent); color: var(--bg); }
.primary:hover { filter: brightness(1.12); }
.secondary { border-color: var(--line); color: var(--ink); }
.secondary:hover { background: var(--hover); border-color: var(--faint); }

/* ---- steps / features / install ---- */
.steps, .features, .install { padding-block: 72px; border-top: 1px solid var(--line); }
.steps p, .features p { margin: 0; color: var(--muted); font-size: 14px; }
.steps code, .features code, .install code {
  background: var(--code-bg); border-radius: 3px; padding: 1.5px 5px; color: var(--ink);
}
.features a, .install a { color: var(--accent); }

.step-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); }
.step-grid li { padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--accent-dim); }
.step-no { font-family: var(--mono); font-size: 12px; color: var(--accent); display: block; margin-bottom: 16px; }

.feature-grid {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 1px;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--line);
}
.feature-grid li { padding: 24px; background: var(--bg); }

.install-lede { margin: 0 0 22px; color: var(--muted); max-width: 620px; font-size: 15px; }
.code-block { position: relative; max-width: 720px; }
/* Undo the inline-code treatment inside command blocks: inline padding lands
   only on the first line of a wrapped inline box, indenting it. */
.code-block pre code { background: none; padding: 0; font-size: inherit; }
.code-block pre {
  margin: 0; padding: 18px 74px 18px 20px;
  background: var(--code-bg); border: 1px solid var(--line); border-radius: 8px;
  overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--ink);
}
.copy-button {
  position: absolute; top: 12px; right: 12px;
  border: 1px solid var(--line); background: var(--bg); color: var(--muted);
  font-family: var(--mono); font-size: 11px; text-transform: lowercase;
  padding: 5px 10px; border-radius: 5px; cursor: pointer;
}
.copy-button:hover { color: var(--ink); border-color: var(--faint); }
.copy-button.copied { color: var(--accent); border-color: var(--accent); }
.install-note { margin: 22px 0 0; color: var(--muted); font-size: 14px; max-width: 620px; text-wrap: pretty; }

/* ---- declarative (Nix) install ---- */
/* The nested <section>s inside .nix-methods are untouched by the content-column
   grid (it binds via main > section), so they lay out as plain blocks here. */
.nix-install { margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--line); }
.nix-install > summary { display: flex; align-items: baseline; gap: 14px; cursor: pointer; list-style: none; }
.nix-install > summary::-webkit-details-marker { display: none; }
.nix-install > summary h3 { margin: 0; font-size: 21px; }
.nix-install > summary:hover h3 { color: var(--accent); }
.nix-toggle { margin-left: auto; font-family: var(--mono); font-size: 17px; color: var(--faint); }
.nix-toggle::before { content: "+"; }
.nix-install[open] .nix-toggle::before { content: "−"; }
.nix-install > summary:hover .nix-toggle { color: var(--accent); }
.nix-lead, .nix-input p, .nix-methods p { color: var(--muted); font-size: 14px; }
.nix-lead { margin: 20px 0 0; max-width: 620px; }
.nix-input { margin-top: 28px; }
.nix-install h4 { margin: 0 0 9px; font-size: 13px; font-family: var(--mono); font-weight: 600; }
.nix-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; margin-top: 36px; }
.nix-methods section { min-width: 0; }
.nix-methods section > p { margin: 0 0 12px; }
.nix-methods section > .code-block + p { margin-top: 22px; }
.code-block.compact { max-width: none; }
.code-block.compact pre { padding-top: 14px; padding-bottom: 14px; font-size: 12px; }

/* ---- footer ---- */
.site-foot { padding-block: 26px; border-top: 1px solid var(--line); }
.foot-nav { display: flex; gap: 20px; font-family: var(--mono); font-size: 12px; }
.foot-nav a { color: var(--faint); text-decoration: none; }
.foot-nav a:hover { color: var(--ink); }

@media (max-width: 760px) {
  .hero { padding-block: 64px; }
  .step-grid, .feature-grid, .nix-methods { grid-template-columns: 1fr; }
  .nix-methods { gap: 34px; }
  .site-nav { gap: 14px; }
  .site-nav a:not(.nav-cta) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
