/* zcli — shared site styles. Tech/utility direction, terminal-native dark theme. */
:root {
  --bg:       #0c0d10;
  --surface:  #14161b;
  --surface2: #1a1d24;
  --fg:       #e7e9ee;
  --muted:    #9298a4;
  --faint:    #838b98;   /* lifted from #646a76 to clear 4.5:1 on --bg for small labels */
  --border:   rgba(255, 255, 255, 0.08);
  --border2:  rgba(255, 255, 255, 0.14);
  --accent:   #f7a41d;            /* Zig amber */
  --accent-d: #d4860a;
  --green:    #57c97a;
  --red:      #f06969;
  --cyan:     #5ec8d8;
  --font:  -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:  "JetBrains Mono", "SF Mono", ui-monospace, "IBM Plex Mono", Menlo, monospace;
  --maxw: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0;
  /* subtle grid texture */
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 56px 56px;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #1a1205; }

/* Visible keyboard focus on every interactive element (WCAG 2.4.7 / 2.4.13). */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }
[tabindex="-1"]:focus { outline: none; }   /* skip-link lands here; don't ring the whole region */

/* Honour reduced-motion: drop smooth scroll + neutralize transitions/animations. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Skip link — first tab stop on every page. */
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 200;
  background: var(--accent); color: #1a1205;
  font: 600 13px/1 var(--mono); padding: 10px 14px; border-radius: 8px;
  transition: top .15s;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.mono { font-family: var(--mono); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 13, 16, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand .glyph {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px;
  background: var(--accent); color: #1a1205; font-size: 14px; font-weight: 800;
}
.brand .ver { font-size: 11px; color: var(--faint); font-weight: 500; letter-spacing: 0.04em; padding-top: 2px; }
.nav nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav nav a { font-size: 14px; color: var(--muted); transition: color .15s; }
.nav nav a:hover { color: var(--fg); }
.nav .gh {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border2); border-radius: 7px; padding: 7px 12px;
  font-size: 13px; color: var(--fg); transition: border-color .15s, background .15s;
}
.nav .gh:hover { border-color: var(--accent); background: rgba(247,164,29,0.06); }
.nav .gh svg { width: 15px; height: 15px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 14px; font-weight: 600;
  padding: 12px 20px; border-radius: 8px; cursor: pointer; border: 1px solid transparent;
  transition: transform .08s ease, background .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #1a1205; }
.btn.primary:hover { background: #ffb02e; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--border2); }
.btn.ghost:hover { border-color: var(--accent); }

/* ---------- eyebrow / headings ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.08; }
.lead { color: var(--muted); font-size: 18px; max-width: 60ch; }

/* ---------- terminal window ---------- */
.term {
  background: #0a0b0e; border: 1px solid var(--border2); border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
}
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: #111318; border-bottom: 1px solid var(--border); }
.term-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.term-bar .dot.r { background: #ff5f57; } .term-bar .dot.y { background: #febc2e; } .term-bar .dot.g { background: #28c840; }
.term-bar .ttl { margin-left: 8px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.term pre, .term code { font-family: var(--mono); font-size: 13.5px; line-height: 1.7; }
.term-body { padding: 20px 22px; overflow-x: auto; }
.term-body pre { color: #cfd3da; white-space: pre; }
.c-prompt { color: var(--accent); } .c-cmd { color: #fff; } .c-flag { color: var(--cyan); }
.c-ok { color: var(--green); } .c-err { color: var(--red); } .c-mut { color: var(--faint); }
.cursor { display: inline-block; width: 8px; height: 16px; background: var(--accent); vertical-align: text-bottom; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- code block ---------- */
.code {
  background: #0a0b0e; border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; background: #111318; border-bottom: 1px solid var(--border); }
.code-head .fname { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.code-head .lang { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.code pre { margin: 0; padding: 18px 18px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.7; color: #cfd3da; }
.code .kw { color: #d98cff; } .code .str { color: #9ece6a; } .code .fn { color: var(--cyan); } .code .cm { color: var(--faint); font-style: italic; } .code .at { color: var(--accent); } .code .num { color: #ff9e64; }

/* ---------- sections ---------- */
section { padding: 92px 0; border-top: 1px solid var(--border); }
.sec-head { max-width: 62ch; margin-bottom: 48px; }
.sec-head h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; }
.sec-head p { color: var(--muted); font-size: 17px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); padding: 48px 0 64px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
footer .cols { display: flex; gap: 64px; flex-wrap: wrap; }
footer .col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
footer .col a { display: block; color: var(--muted); font-size: 14px; padding: 6px 0; transition: color .15s; }
footer .col a:hover { color: var(--accent); }
footer .meta { color: var(--faint); font-size: 13px; font-family: var(--mono); }

@media (max-width: 720px) {
  /* Keep every nav link reachable — let the nav scroll horizontally
     instead of hiding links (a phone user still needs Docs/Plugins/Install). */
  .nav .wrap { gap: 14px; }
  .nav nav { gap: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; }
  .nav nav::-webkit-scrollbar { display: none; }
  .nav nav a { white-space: nowrap; flex: none; }
  .nav .gh { padding: 7px 10px; }
  section { padding: 64px 0; }
}
