/* Sembl site - Industrial design system
   Onyx surfaces, safety-green + cyan accents, 1px beams instead of shadows. */

:root {
  --onyx: #0a0a0b;
  --charcoal: #121213;
  --surface-1: #161617;
  --surface-2: #1c1b1c;
  --surface-3: #232224;
  --beam: #27272a;
  --beam-bright: #3a393a;

  --text: #e8e6e7;
  --text-dim: #a1a1aa;
  --text-faint: #71717a;

  --green: #ccff00;
  --green-dim: #abd600;
  --cyan: #7cd4df;
  --cyan-deep: #0e7c86;

  --font-head: "Hanken Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 4px;
  --gutter: 24px;
  --margin: 48px;
  --max: 1200px;
  --header-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--onyx);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fixed blueprint grid behind everything */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.grid-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(204, 255, 0, 0.05), transparent 70%);
}

a { color: inherit; text-decoration: none; }

/* -- Shared layout ------------------------------------------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--margin); }

.section { padding: 96px 0; position: relative; }
.section + .section { border-top: 1px solid var(--beam); }

.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kicker::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--green-dim);
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 650; letter-spacing: -0.02em; line-height: 1.08; }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin: 16px 0 12px; }
.section-head p { color: var(--text-dim); font-size: 17px; }

/* -- Header -------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--beam);
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(12px);
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 650; font-size: 18px; }
.brand svg { width: 26px; height: 26px; display: block; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  transition: color 0.18s;
}
.nav a:hover { color: var(--text); }
.nav .ghost {
  border: 1px solid var(--beam-bright);
  padding: 8px 16px;
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.18s, color 0.18s;
}
.nav .ghost:hover { border-color: var(--green); color: var(--green); }

/* Scroll progress beam */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--green);
  z-index: 60;
  box-shadow: 0 0 12px rgba(204, 255, 0, 0.6);
}

/* -- Hero ---------------------------------------------------- */
.hero { padding: 80px 0 72px; position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--beam);
  border-radius: var(--radius);
  padding: 6px 12px;
  background: var(--charcoal);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(204, 255, 0, 0.5);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(204, 255, 0, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(204, 255, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(204, 255, 0, 0); }
}
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }

.hero h1 { font-size: clamp(40px, 6vw, 68px); margin: 22px 0 20px; font-weight: 700; }
.hero h1 .accent { color: var(--green); }
.hero-lede { font-size: 19px; color: var(--text-dim); max-width: 30em; }
.hero-actions { display: flex; align-items: center; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 12px 18px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s, background 0.18s, border-color 0.18s, color 0.18s;
}
.btn-primary { background: var(--green); color: #161e00; }
.btn-primary:hover { transform: translateY(-1px); background: #d8ff33; }
.btn-ghost { border-color: var(--beam-bright); color: var(--text); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }

.copy-cmd {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  background: #000;
  border: 1px solid var(--beam);
  border-radius: var(--radius);
  padding: 11px 14px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.18s;
}
.copy-cmd:hover { border-color: var(--green-dim); }
.copy-cmd .prompt { color: var(--green); }
.copy-cmd .hint { color: var(--text-faint); font-size: 11px; }
.copy-cmd.copied .hint { color: var(--green); }

/* Terminal */
.terminal {
  position: relative;
  border: 1px solid var(--beam);
  border-radius: var(--radius);
  background: #000;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(204, 255, 0, 0.04);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--beam);
  background: var(--charcoal);
}
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--surface-3); display: block; }
.terminal-bar i:nth-child(1) { background: #3a2a2a; }
.terminal-bar i:nth-child(2) { background: #3a352a; }
.terminal-bar span { margin-left: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.terminal-body { padding: 20px; font-family: var(--font-mono); font-size: 13px; line-height: 1.9; position: relative; z-index: 1; }
.terminal::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(204, 255, 0, 0.08) 50%, transparent 100%);
  height: 34%;
  transform: translateY(-120%);
  animation: terminal-scan 5.5s linear infinite;
  opacity: 0.55;
}
@keyframes terminal-scan {
  0% { transform: translateY(-120%); }
  100% { transform: translateY(320%); }
}
@media (prefers-reduced-motion: reduce) { .terminal::after { animation: none; opacity: 0; } }
.terminal-body .line { display: block; white-space: pre-wrap; }
.terminal-body .c-prompt { color: var(--green); }
.terminal-body .c-cmd { color: var(--text); }
.terminal-body .c-dim { color: var(--text-faint); }
.terminal-body .c-ok { color: var(--green); }
.terminal-body .c-cyan { color: var(--cyan); }
.cursor { display: inline-block; width: 8px; height: 15px; background: var(--green); vertical-align: text-bottom; animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* -- Pipeline / how it works --------------------------------- */
.steps { display: grid; gap: 0; border: 1px solid var(--beam); border-radius: var(--radius); overflow: hidden; }
.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 26px 28px;
  background: var(--charcoal);
  position: relative;
  transition: background 0.2s;
}
.step + .step { border-top: 1px solid var(--beam); }
.step:hover { background: var(--surface-1); }
.step .idx { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--green); padding-top: 3px; }
.step h3 { font-size: 19px; margin-bottom: 5px; font-weight: 600; letter-spacing: -0.01em; }
.step p { color: var(--text-dim); font-size: 15px; max-width: 60ch; }
.step .tools { margin-top: 9px; display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--beam-bright);
  border-radius: 2px;
  padding: 3px 7px;
}

/* -- Work Order module card ---------------------------------- */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.module {
  border: 1px solid var(--beam);
  border-radius: var(--radius);
  background: var(--charcoal);
  overflow: hidden;
}
.module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--beam);
  background: var(--surface-1);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.module-head .risk { color: #161e00; background: var(--green); padding: 2px 8px; border-radius: 2px; font-weight: 700; }
.module-body { padding: 20px; display: grid; gap: 18px; }
.lock .lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  display: block;
  margin-bottom: 6px;
}
.lock p { font-size: 14px; color: var(--text); }
.lock ul { list-style: none; display: grid; gap: 5px; }
.lock li { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); display: flex; gap: 9px; align-items: baseline; }
.lock li::before { content: attr(data-mark); color: var(--green); font-weight: 700; }
.lock li.ro::before { color: var(--text-faint); }

.locks-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 24px; }
.lock-cell {
  border: 1px solid var(--beam);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--charcoal);
  transition: border-color 0.2s, transform 0.2s;
}
.lock-cell:hover { border-color: var(--beam-bright); transform: translateY(-2px); }
.lock-cell .n { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.lock-cell .t { font-family: var(--font-head); font-weight: 600; font-size: 16px; margin: 4px 0 3px; }
.lock-cell .d { font-size: 13px; color: var(--text-dim); }

/* -- Comparison ---------------------------------------------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cmp-card {
  border: 1px solid var(--beam);
  border-radius: var(--radius);
  background: var(--charcoal);
  padding: 24px;
}
.cmp-card.win { border-color: rgba(204, 255, 0, 0.4); box-shadow: 0 0 40px rgba(204, 255, 0, 0.05); }
.cmp-card .cmp-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.cmp-card h3 { font-size: 18px; }
.badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 2px;
}
.badge.lo { color: var(--text-dim); border: 1px solid var(--beam-bright); }
.badge.hi { color: #161e00; background: var(--green); }
.metric { margin-top: 16px; }
.metric .row { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 12px; margin-bottom: 7px; color: var(--text-dim); }
.metric .row b { color: var(--text); font-weight: 600; }
.bar { height: 7px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; border-radius: 2px; }
.bar.green > span { background: var(--green); }
.bar.grey > span { background: var(--text-faint); }
.cmp-note { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-top: 28px; text-align: center; }

/* -- Install ------------------------------------------------- */
.install-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cmd-block {
  border: 1px solid var(--beam);
  border-radius: var(--radius);
  background: var(--charcoal);
  padding: 20px;
  min-width: 0;
}
.cmd-block.muted { opacity: 0.78; }
.cmd-block .cmd-lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-dim);
  margin-bottom: 12px;
}
.cmd-block pre { overflow-x: visible; max-width: 100%; }
.cmd-block code {
  display: block;
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.7;
}
.cmd-block code .p { color: var(--cyan); }

/* -- Footer -------------------------------------------------- */
.footer { border-top: 1px solid var(--beam); padding: 48px 0 60px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer .f-brand { max-width: 320px; }
.footer .f-brand .brand { margin-bottom: 12px; }
.footer .f-brand p { color: var(--text-faint); font-size: 14px; }
.footer .f-links { display: flex; gap: 56px; flex-wrap: wrap; }
.footer .f-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px; font-weight: 700; }
.footer .f-col a { display: block; font-size: 14px; color: var(--text-dim); margin-bottom: 9px; transition: color 0.18s; }
.footer .f-col a:hover { color: var(--green); }
.copyright { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--beam); }

/* -- Reveal animation initial states (only when JS-driven) --- */
.has-anim [data-reveal] { opacity: 1; transform: none; }
.has-anim [data-reveal-stagger] > * { opacity: 1; transform: none; }

/* -- GitHub mark in buttons ---------------------------------- */
.gh-ico { width: 15px; height: 15px; display: block; flex-shrink: 0; }
.nav .ghost { display: inline-flex; align-items: center; gap: 8px; }

/* -- Metrics row --------------------------------------------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--beam);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 64px;
}
.metric-big { padding: 26px 24px; background: var(--charcoal); }
.metric-big + .metric-big { border-left: 1px solid var(--beam); }
.metric-big .num { font-family: var(--font-head); font-weight: 700; font-size: 38px; color: var(--green); letter-spacing: -0.02em; line-height: 1; }
.metric-big .lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-dim); margin-top: 10px; }

/* -- Resources cards ----------------------------------------- */
.resources { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.res-card {
  display: block;
  border: 1px solid var(--beam);
  border-radius: var(--radius);
  background: var(--charcoal);
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.res-card:hover { border-color: var(--green); transform: translateY(-2px); }
.res-card .r-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.res-card .r-ico { width: 22px; height: 22px; color: var(--cyan); }
.res-card .r-arrow { font-family: var(--font-mono); color: var(--text-faint); transition: color 0.2s, transform 0.2s; }
.res-card:hover .r-arrow { color: var(--green); transform: translateX(3px); }
.res-card h3 { font-size: 18px; margin-bottom: 5px; }
.res-card p { color: var(--text-dim); font-size: 14px; }

/* -- Docs / content pages ------------------------------------ */
.page-hero { padding: 56px 0 40px; border-bottom: 1px solid var(--beam); }
.page-hero h1 { font-size: clamp(32px, 5vw, 46px); margin-top: 14px; }
.page-hero p { color: var(--text-dim); font-size: 18px; margin-top: 14px; max-width: 62ch; }

.docs-shell { display: grid; grid-template-columns: 224px 1fr; gap: 56px; align-items: start; padding: 48px 0 96px; }
.docs-nav { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.docs-nav .grp { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin: 20px 0 8px; }
.docs-nav .grp:first-child { margin-top: 0; }
.docs-nav a { display: block; font-size: 14px; color: var(--text-dim); padding: 5px 0 5px 14px; border-left: 1px solid var(--beam); transition: color 0.18s, border-color 0.18s; }
.docs-nav a:hover { color: var(--text); }
.docs-nav a.active { color: var(--green); border-left-color: var(--green); }

.doc-content { max-width: 760px; min-width: 0; }
.doc-section { margin-bottom: 56px; scroll-margin-top: calc(var(--header-h) + 24px); }
.doc-content h2 { font-size: 28px; margin-bottom: 16px; }
.doc-content h3 { font-size: 17px; margin: 30px 0 10px; font-weight: 600; }
.doc-content p { color: var(--text-dim); margin-bottom: 14px; }
.doc-content ul, .doc-content ol { color: var(--text-dim); margin: 0 0 16px 20px; }
.doc-content li { margin-bottom: 7px; }
.doc-content strong { color: var(--text); font-weight: 600; }
.doc-content a.inline { color: var(--cyan); border-bottom: 1px solid rgba(124, 212, 223, 0.3); }
.doc-content a.inline:hover { border-bottom-color: var(--cyan); }

.callout code.inl { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }

.codeblock { background: #000; border: 1px solid var(--beam); border-radius: var(--radius); padding: 16px 18px; overflow-x: auto; margin: 0 0 8px; }
.codeblock + .cb-label, .cb-label { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin: 0 0 8px; display: block; }
.codeblock code { font-family: var(--font-mono); font-size: 13px; line-height: 1.8; color: var(--text); white-space: pre; display: block; }
.codeblock .c { color: var(--text-faint); }
.codeblock .g { color: var(--green); }
.codeblock .y { color: var(--cyan); }

.callout { border: 1px solid var(--beam); border-left: 2px solid var(--cyan); border-radius: var(--radius); background: var(--charcoal); padding: 14px 18px; margin: 4px 0 18px; font-size: 14px; color: var(--text-dim); }
.callout.warn { border-left-color: #f3cf5c; }
.callout b { color: var(--text); }

.dtable { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 13.5px; }
.dtable th, .dtable td { text-align: left; padding: 9px 12px; border: 1px solid var(--beam); vertical-align: top; }
.dtable th { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-faint); background: var(--charcoal); }
.dtable td { color: var(--text-dim); }
.dtable td code { font-family: var(--font-mono); font-size: 12.5px; color: var(--green); }

/* Changelog */
.release { border-left: 1px solid var(--beam); padding: 0 0 8px 28px; margin-left: 8px; position: relative; }
.release::before { content: ""; position: absolute; left: -5px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.release.past::before { background: var(--text-faint); }
.release { padding-bottom: 36px; }
.release .ver { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.release .ver h2 { font-size: 22px; }
.release .ver .when { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.release .pill { font-family: var(--font-mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 2px; }
.release .pill.live { background: var(--green); color: #161e00; }
.release .pill.dev { border: 1px solid var(--beam-bright); color: var(--text-dim); }
.release ul { list-style: none; margin: 0; }
.release li { color: var(--text-dim); font-size: 14.5px; margin-bottom: 8px; padding-left: 18px; position: relative; }
.release li::before { content: "+"; position: absolute; left: 0; color: var(--green); font-family: var(--font-mono); }

/* -- Responsive ---------------------------------------------- */
@media (max-width: 900px) {
  :root { --margin: 20px; }
  .hero-grid, .split, .compare, .install-cols, .locks-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 40px; }
  .split { gap: 32px; }
  .nav .nav-link { display: none; }
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 48px; }
  .footer .wrap { flex-direction: column; }
  .footer .f-links { gap: 36px; }
  .metrics, .resources { grid-template-columns: repeat(2, 1fr); }
  .docs-shell { grid-template-columns: 1fr; gap: 0; }
  .docs-nav { display: none; }
}
@media (max-width: 520px) {
  .hero h1 { font-size: 38px; }
  .step { grid-template-columns: 1fr; gap: 8px; }
  .step .idx { padding-top: 0; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric-big:nth-child(odd) { border-left: none; }
  .metric-big:nth-child(n+3) { border-top: 1px solid var(--beam); }
  .resources { grid-template-columns: 1fr; }
}
