/* LocalAgents site: dark, developer-first. Docs pages and the landing page share this file. */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #070912;
  --bg-2: #0b0f1d;
  --panel: #0f1428;
  --panel-2: #131a33;
  --border: #1f2743;
  --border-strong: #2d3760;
  --text: #eef1ff;
  --muted: #9aa5c8;
  --primary: #7c83ff;
  --accent: #22d3ee;
  --warm: #ffb454;
  --ok: #34d399;
  --grad: linear-gradient(120deg, #7c83ff 0%, #22d3ee 100%);
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;
  --radius: 14px;
  --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(124, 131, 255, 0.16), transparent 60%),
    radial-gradient(900px 500px at 95% 0%, rgba(34, 211, 238, 0.1), transparent 60%),
    var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 12px; }
p { margin: 0 0 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--font-mono); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- nav ---------- */

.navbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(7, 9, 18, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo svg { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; font-size: 14px; font-weight: 500; }
.nav-links a { color: var(--muted); }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 22px; cursor: pointer; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--border-strong); color: var(--text); background: var(--panel);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); border-color: var(--primary); }
.btn-primary { background: var(--grad); color: #06122b; border-color: transparent; box-shadow: 0 10px 34px rgba(124, 131, 255, 0.35); }
.btn-primary:hover { box-shadow: 0 14px 44px rgba(34, 211, 238, 0.4); border-color: transparent; }

/* ---------- landing: hero ---------- */

.hero { padding: 84px 0 56px; }
.hero-copy { max-width: 780px; margin: 0 auto 44px; text-align: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(124, 131, 255, 0.12); border: 1px solid rgba(124, 131, 255, 0.4); color: #c6caff;
  margin-bottom: 22px;
}
.badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.hero h1 { font-size: clamp(38px, 6vw, 68px); margin-bottom: 18px; }
.hero .lede { font-size: 19px; color: var(--muted); max-width: 660px; margin: 0 auto 30px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-meta { margin-top: 18px; font-size: 13.5px; color: var(--muted); }

.demo-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 20px; align-items: stretch; }

.window {
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(124, 131, 255, 0.12);
  display: flex; flex-direction: column;
}
.window-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: #0a0e1d; border-bottom: 1px solid var(--border); }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.window-title { margin-left: 8px; font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.window-body { padding: 18px; flex: 1; }

.term { font-family: var(--font-mono); font-size: 13px; line-height: 1.75; min-height: 330px; white-space: pre-wrap; word-break: break-word; }
.term .prompt { color: var(--accent); }
.term .cmd { color: var(--text); }
.term .out { color: var(--muted); display: block; animation: fade-in 0.4s ease both; }
.term .ok { color: var(--ok); }
.term .tip { color: var(--warm); }
.term .cursor { display: inline-block; width: 8px; height: 15px; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(2) infinite; }

/* Loonie mock */
.lm { display: flex; flex-direction: column; gap: 12px; font-size: 13.5px; min-height: 330px; }
.lm-idle { color: var(--muted); text-align: center; margin: auto; font-size: 13px; }
.lm-user { align-self: flex-end; max-width: 88%; padding: 9px 13px; border-radius: 14px 14px 4px 14px; background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.35); animation: fade-in 0.35s ease both; }
.lm-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.lm-step { display: flex; gap: 9px; color: var(--muted); animation: fade-in 0.35s ease both; }
.lm-step b { color: var(--text); font-weight: 600; }
.lm-step .dot { width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--warm); border-right-color: transparent; animation: spin 0.8s linear infinite; flex-shrink: 0; }
.lm-step.done .dot { animation: none; border: 0; background: var(--ok); }
.lm-card { padding: 11px 13px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border-strong); animation: fade-in 0.4s ease both; }
.lm-card small { display: block; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; font-weight: 700; }
.lm-card ul { margin: 0; padding-left: 18px; color: var(--muted); }
.lm-btn { align-self: flex-start; padding: 7px 14px; border-radius: 999px; background: var(--grad); color: #06122b; font-weight: 700; font-size: 12.5px; animation: fade-in 0.35s ease both; }
.lm-note { font-size: 11.5px; color: var(--muted); }

/* ---------- landing: sections ---------- */

.section { padding: 80px 0; }
.section-alt { background: linear-gradient(180deg, rgba(15, 20, 40, 0.6), rgba(7, 9, 18, 0)); }
.kicker { font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.section-title { font-size: clamp(28px, 4vw, 42px); margin-bottom: 14px; }
.section-lede { color: var(--muted); font-size: 17px; max-width: 680px; }
.center { text-align: center; }
.center .section-lede { margin-left: auto; margin-right: auto; }

.strip { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; padding: 22px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.strip span::before { content: '•'; color: var(--primary); margin-right: 10px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; counter-reset: step; }
.step { position: relative; padding: 22px 20px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color 0.2s ease, transform 0.2s ease; }
.step:hover { border-color: var(--primary); transform: translateY(-3px); }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; margin-bottom: 14px;
  background: var(--grad); color: #06122b; font-family: var(--font-display); font-weight: 700;
}
.step h3 { font-size: 18px; }
.step p { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.step pre { margin: 0; padding: 10px 12px; border-radius: 10px; background: #080b18; border: 1px solid var(--border); font-size: 12px; overflow-x: auto; color: #c9d1f5; }

.anatomy { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px; margin-top: 36px; align-items: start; }
.code-panel { background: #080b18; border: 1px solid var(--border-strong); border-radius: 16px; overflow: hidden; }
.code-panel .window-bar { background: #0a0e1d; }
.code-panel pre { margin: 0; padding: 18px 20px; font-size: 13px; line-height: 1.8; overflow-x: auto; color: #d6dcff; }
.code-panel .hl { display: inline-block; width: 100%; border-radius: 4px; padding: 0 6px; margin: 0 -6px; transition: background 0.2s ease; }
.code-panel .hl.on { background: rgba(124, 131, 255, 0.18); }
.tok-k { color: #7c83ff; }
.tok-s { color: #86efac; }
.tok-c { color: #6b769c; }
.notes { display: flex; flex-direction: column; gap: 10px; }
.note { text-align: left; width: 100%; padding: 14px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); color: var(--text); font: inherit; cursor: pointer; transition: border-color 0.2s ease; }
.note strong { display: block; font-family: var(--font-display); }
.note span { color: var(--muted); font-size: 14px; }
.note:hover, .note.on { border-color: var(--primary); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.feature { padding: 24px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.feature .ico { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; background: rgba(124, 131, 255, 0.14); color: var(--primary); }
.feature .ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 18px; }
.feature p { color: var(--muted); font-size: 14.5px; margin: 0; }

.targets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.target { padding: 22px; border-radius: var(--radius); background: var(--panel); border: 1px dashed var(--border-strong); }
.target.live { border: 1px solid var(--accent); background: linear-gradient(180deg, rgba(34, 211, 238, 0.09), var(--panel)); box-shadow: 0 0 40px rgba(34, 211, 238, 0.1); }
.target .tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--border); color: var(--muted); margin-bottom: 10px; }
.target.live .tag { background: var(--accent); color: #032a33; }
.target h3 { font-size: 19px; }
.target p { color: var(--muted); font-size: 14.5px; margin: 0; }

.cta { text-align: center; padding: 90px 0; }
.cta .install { display: inline-flex; align-items: center; gap: 12px; margin-top: 8px; padding: 12px 18px; border-radius: 12px; background: #080b18; border: 1px solid var(--border-strong); font-family: var(--font-mono); font-size: 14px; color: var(--accent); max-width: 100%; overflow-x: auto; }
.copy-btn { background: transparent; border: 1px solid var(--border-strong); color: var(--muted); border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.copy-btn:hover { color: var(--text); border-color: var(--primary); }

/* ---------- footer ---------- */

footer { border-top: 1px solid var(--border); padding: 34px 0; color: var(--muted); font-size: 14px; }
footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); }

/* ---------- docs pages ---------- */

.page-content { padding: 48px 24px 72px; max-width: 820px; }
.page-content h1 { font-size: 38px; margin-bottom: 18px; }
.page-content h2 { font-size: 26px; margin: 40px 0 12px; }
.page-content h3 { font-size: 19px; margin: 28px 0 8px; }
.page-content p, .page-content li { color: #c9d1f5; }
.page-content pre { background: #080b18; border: 1px solid var(--border-strong); border-radius: 12px; padding: 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.7; color: #d6dcff; }
.page-content :not(pre) > code { background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: 0.9em; color: #c6caff; }
.page-content table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 16px 0; }
.page-content th, .page-content td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.page-content th { color: var(--muted); font-weight: 600; }
.callout { padding: 14px 16px; border-radius: 12px; background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.3); margin: 18px 0; }
.callout p { margin: 0; }

/* ---------- motion + responsive ---------- */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes blink { to { visibility: hidden; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .term .out, .lm-user, .lm-step, .lm-card, .lm-btn { animation: none; }
  .term .cursor { animation: none; }
}

@media (max-width: 900px) {
  .demo-grid, .anatomy { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .features, .targets { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 16px; padding: 18px 24px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .steps { grid-template-columns: 1fr; }
  .hero { padding-top: 56px; }
}
