/* ─── Faultline CLI site — shared styles ─────────────────────
   faultline-cli.pages.dev
   ────────────────────────────────────────────────────────── */

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  background: #fff;
  color: #18181b;
  font-family: 'Geist Variable', Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

/* ─── Design tokens ──────────────────────────────────────── */
:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --ink: #18181b;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --primary: #2563eb;
  --primary-soft: #eff6ff;
  --primary-line: #bfdbfe;
  --success: #16a34a;
  --success-soft: #f0fdf4;
  --radius: 8px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow: 0 12px 44px rgba(15, 23, 42, 0.11);
  --max: 1080px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* ─── Shell ──────────────────────────────────────────────── */
.shell { min-height: 100vh; }

/* ─── Container ──────────────────────────────────────────── */
.container {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
}

/* ─── Navigation ─────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 160ms;
}
.nav.scrolled { border-bottom-color: var(--line); }

.nav-inner {
  height: 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}

.brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--ink); text-decoration: none;
  font-weight: 700; white-space: nowrap;
}
.brand-mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-line);
  flex-shrink: 0;
}
.brand-mark svg { width: 15px; height: 15px; stroke-width: 2; }
.brand-mark img { width: 100%; height: 100%; display: block; }

.nav-links {
  display: flex; align-items: center; gap: 1px;
  margin-left: auto;
}
.nav-links a {
  color: var(--muted); text-decoration: none;
  font-size: 14px; font-weight: 550;
  padding: 6px 10px; border-radius: var(--radius);
  transition: background 120ms, color 120ms;
}
.nav-links a:hover { background: #f1f5f9; color: var(--ink); }
.nav-links a.active { color: var(--ink); font-weight: 600; }
.nav-links a.nav-teams { color: var(--primary); font-weight: 600; }
.nav-links a.nav-teams:hover { background: var(--primary-soft); }
.nav-links a.nav-teams.active { background: var(--primary-soft); }

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

.burger {
  display: none;
  width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--muted);
  align-items: center; justify-content: center;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 10px 20px 18px;
  background: rgba(255, 255, 255, 0.97);
}
.mobile-nav.open { display: grid; gap: 3px; }
.mobile-nav a {
  color: var(--muted); text-decoration: none;
  font-size: 14px; font-weight: 550;
  padding: 7px 10px; border-radius: var(--radius);
  transition: background 120ms, color 120ms;
}
.mobile-nav a:hover { background: #f1f5f9; color: var(--ink); }
.mobile-actions {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; padding-top: 10px; margin-top: 8px;
  border-top: 1px solid var(--line);
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 36px; padding: 0 14px;
  border-radius: var(--radius); border: 1px solid transparent;
  text-decoration: none; font-size: 14px; font-weight: 600;
  white-space: nowrap; cursor: pointer;
  transition: background 150ms, border-color 150ms, box-shadow 150ms, transform 150ms;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: #2563eb; color: #fff;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.28);
}
.btn-primary:hover { background: #1d4ed8; box-shadow: 0 8px 28px rgba(37, 99, 235, 0.38); }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--line-strong); background: #f8fafc; }
.btn-ghost { color: var(--muted); background: transparent; }
.btn-ghost:hover { color: var(--ink); background: #f1f5f9; transform: none; }
.btn-lg { min-height: 42px; padding: 0 20px; font-size: 15px; }

/* ─── Typography ─────────────────────────────────────────── */
h1 {
  font-size: clamp(34px, 5.5vw, 58px);
  line-height: 1.06; font-weight: 700; letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(24px, 3.5vw, 38px);
  line-height: 1.12; font-weight: 700; letter-spacing: -0.01em;
}
h3 { font-size: 15px; line-height: 1.35; font-weight: 700; }

code {
  font-family: var(--mono); font-size: 0.875em;
  background: #f1f5f9; padding: 2px 5px; border-radius: 4px; color: var(--ink);
}

/* ─── Sections ───────────────────────────────────────────── */
.section { padding: 80px 0; }
.section.alt { background: var(--bg-soft); border-block: 1px solid var(--line); }

.section-head { max-width: 680px; margin-bottom: 32px; }
.section-kicker {
  color: var(--primary); font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px;
}
.section-copy { margin-top: 12px; color: var(--muted); font-size: 17px; line-height: 1.7; }

/* ─── Terminal block ─────────────────────────────────────── */
.terminal {
  border: 1px solid #1e293b; border-radius: 10px; overflow: hidden;
  background: #0f172a; color: #e2e8f0; box-shadow: var(--shadow);
}
.terminal-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--mono); font-size: 12px; color: #475569;
}
.terminal-dots { display: flex; gap: 6px; align-items: center; }
.terminal-dots span { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.d-red { background: #ef4444; }
.d-yellow { background: #f59e0b; }
.d-green { background: #22c55e; }
.terminal-body {
  padding: 16px 20px;
  font-family: var(--mono); font-size: 13px; line-height: 1.9;
  overflow-x: auto;
}
.terminal-body pre { font: inherit; white-space: pre-wrap; word-break: break-all; }
.t-prompt { color: #4ade80; }
.t-cmd { color: #e2e8f0; }
.t-key { color: #93c5fd; }
.t-val { color: #86efac; }
.t-num { color: #fcd34d; }
.t-str { color: #fca5a5; }
.t-dim { color: #64748b; }
.t-blank { display: block; height: 0.5em; }

/* ─── Cards ──────────────────────────────────────────────── */
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; padding: 22px;
  transition: border-color 150ms, box-shadow 150ms;
}
.card:hover { border-color: var(--primary-line); box-shadow: var(--shadow-sm); }
.card-icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 8px; margin-bottom: 14px;
  background: var(--primary-soft); color: var(--primary);
}
.card-icon svg { width: 16px; height: 16px; stroke-width: 2; }
.card h3 { font-size: 15px; }
.card p { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ─── Check list ─────────────────────────────────────────── */
.check-list {
  display: grid; gap: 12px; margin-top: 20px; list-style: none; padding: 0;
}
.check-list li { display: flex; gap: 10px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.check {
  width: 20px; height: 20px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--success-soft); color: var(--success); margin-top: 2px;
}
.check svg { width: 11px; height: 11px; stroke-width: 3; }

/* ─── Split layout ───────────────────────────────────────── */
.split {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 44px; align-items: center;
}

/* ─── Footer ─────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner {
  min-height: 76px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 13px;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

/* ─── Form ───────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.form-hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.form-control {
  width: 100%;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 9px 12px; font-size: 14px; background: #fff; color: var(--ink);
  transition: border-color 150ms, box-shadow 150ms;
  -webkit-appearance: none; appearance: none;
}
.form-control:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.form-control::placeholder { color: var(--faint); }
textarea.form-control { resize: vertical; min-height: 88px; }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px;
}
.radio-group { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.radio-opt {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; font-size: 14px; color: var(--muted);
  transition: border-color 150ms, color 150ms, background 150ms;
  user-select: none; position: relative;
}
.radio-opt:hover { border-color: var(--primary-line); color: var(--primary); }
.radio-opt input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.radio-opt.selected { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* ─── Announce bar ───────────────────────────────────────── */
.announce {
  background: #18181b; color: #e2e8f0;
  text-align: center; padding: 9px 20px;
  font-size: 13px; font-weight: 500;
}
.announce a {
  display: inline-flex; align-items: center; gap: 7px;
  color: #e2e8f0; text-decoration: none; transition: opacity 130ms;
}
.announce a:hover { opacity: 0.78; }
.announce-tag {
  display: inline-flex; align-items: center;
  height: 18px; padding: 0 7px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  flex: 0 0 auto;
}

/* ─── Reveal animation ───────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.4s ease, transform 0.4s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ─── Example block (examples page) ─────────────────────── */
.example-card {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: #fff; margin-bottom: 32px;
}
.example-header {
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap;
}
.example-class {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: var(--primary); background: var(--primary-soft);
  border: 1px solid var(--primary-line); border-radius: 6px; padding: 3px 9px;
}
.example-conf {
  font-family: var(--mono); font-size: 13px;
  color: var(--success); background: var(--success-soft);
  border: 1px solid #bbf7d0; border-radius: 6px; padding: 3px 9px; font-weight: 600;
}
.example-body { padding: 22px; }
.example-section { margin-bottom: 20px; }
.example-section:last-child { margin-bottom: 0; }
.example-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 8px;
}
.example-section ul { list-style: none; padding: 0; display: grid; gap: 6px; }
.example-section li {
  font-size: 14px; color: var(--muted); line-height: 1.55;
  padding-left: 14px; position: relative;
}
.example-section li::before { content: "—"; position: absolute; left: 0; color: var(--faint); }
.example-body p { font-size: 14px; color: var(--muted); line-height: 1.65; }
.team-signal {
  margin-top: 14px; padding: 12px 14px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 13px; color: var(--muted); line-height: 1.55;
}
.team-signal strong { color: var(--ink); font-weight: 600; }

/* ─── Product proof blocks ──────────────────────────────── */
.proof-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 24px;
}
.proof-pill {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 12px 14px;
}
.proof-pill b { display: block; color: var(--ink); font-size: 18px; line-height: 1.2; }
.proof-pill span { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 3px; }

.trust-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.trust-item {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; padding: 14px 16px;
}
.trust-item b { display: block; font-size: 13px; margin-bottom: 4px; }
.trust-item span { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; }

.mini-dashboard {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: #fff; box-shadow: var(--shadow);
}
.mini-dashboard-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--bg-soft);
}
.mini-dashboard-title { font-size: 13px; font-weight: 700; }
.mini-dashboard-period { color: var(--muted); font-size: 12px; }
.mini-dashboard-body { padding: 16px; display: grid; gap: 12px; }
.mini-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.mini-row-main { min-width: 0; }
.mini-row-title {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; color: var(--ink);
}
.mini-row-meta { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.mini-count {
  color: var(--primary); font-weight: 700; font-size: 18px; font-family: var(--mono);
}
.mini-tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border-radius: 999px; background: var(--primary-soft); color: var(--primary);
  font-size: 11px; font-family: inherit; font-weight: 700;
}
.mini-playbook {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 14px; border-radius: var(--radius);
  background: #ecfdf5; border: 1px solid #bbf7d0; color: #166534;
  font-size: 13px; line-height: 1.4;
}
.mini-playbook strong { color: #14532d; }

.asset-shot {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: #0f172a; box-shadow: var(--shadow);
}
.asset-shot img { display: block; width: 100%; height: auto; }

/* ─── Docs page ──────────────────────────────────────────── */
.docs-layout {
  display: grid; grid-template-columns: 200px 1fr; gap: 48px; align-items: start;
}
.docs-nav { position: sticky; top: 80px; }
.docs-nav-list { list-style: none; padding: 0; display: grid; gap: 2px; }
.docs-nav-list a {
  display: block; color: var(--muted); text-decoration: none;
  font-size: 14px; padding: 6px 10px; border-radius: var(--radius);
  transition: background 120ms, color 120ms;
}
.docs-nav-list a:hover { background: #f1f5f9; color: var(--ink); }
.docs-nav-list a.active { color: var(--primary); font-weight: 600; }
.docs-content h2 { margin-bottom: 16px; }
.docs-content h3 { margin-bottom: 10px; }
.docs-content p { color: var(--muted); font-size: 15px; line-height: 1.7; margin-bottom: 16px; }
.docs-content .terminal { margin: 16px 0 24px; }
.docs-step {
  padding: 28px 0; border-bottom: 1px solid var(--line);
}
.docs-step:last-child { border-bottom: none; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .burger { display: inline-flex; }
  .nav-actions .btn-ghost { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .proof-row,
  .trust-strip { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 28px, var(--max)); }
  .section { padding: 56px 0; }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  .cards { grid-template-columns: 1fr; }
  .footer-inner { padding: 20px 0; flex-direction: column; align-items: flex-start; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
}

/* ─── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
