/* ============================================================
   LYNKR — Precision Instrument Design System
   Syne (display) · IBM Plex Sans (body) · IBM Plex Mono (code)
   Accent: electric amber  Background: near-black cool
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,700;12..96,800&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* === TOKENS ================================================ */
:root {
  --bg:            oklch(0.08 0.008 250);
  --bg-surface:    oklch(0.12 0.008 250);
  --bg-raised:     oklch(0.16 0.009 250);
  --text:          oklch(0.96 0.003 250);
  --text-sec:      oklch(0.64 0.007 250);
  --text-muted:    oklch(0.46 0.005 250);
  --accent:        oklch(0.78 0.17 78);
  --accent-dim:    oklch(0.78 0.17 78 / 0.12);
  --border:        oklch(0.22 0.008 250);
  --border-sub:    oklch(0.16 0.006 250);

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', 'Fira Code', monospace;

  --r:   4px;
  --r-lg: 8px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* === RESET ================================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  background-image: radial-gradient(oklch(0.28 0.01 250 / 0.5) 1px, transparent 1px);
  background-size: 28px 28px;
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { cursor: pointer; font: inherit; border: none; background: none; }

/* === NAV ================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  height: 60px;
  background: oklch(0.08 0.008 250 / 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-sub);
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  color: var(--text);
  flex-shrink: 0;
}
.nav-brand .dot { color: var(--accent); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.15rem;
  margin-left: 0.75rem;
}
.nav-links a {
  font-size: 0.84rem;
  color: var(--text-sec);
  padding: 0.35rem 0.7rem;
  border-radius: var(--r);
  transition: color 150ms, background 150ms;
}
.nav-links a:hover { color: var(--text); background: var(--bg-surface); }

.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }

.nav-gh {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.84rem; color: var(--text-sec);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: color 150ms, border-color 150ms;
}
.nav-gh:hover { color: var(--text); border-color: oklch(0.35 0.01 250); }

.nav-start {
  font-size: 0.84rem; font-weight: 600;
  color: oklch(0.08 0.008 250);
  background: var(--accent);
  padding: 0.38rem 1rem;
  border-radius: var(--r);
  transition: opacity 150ms;
}
.nav-start:hover { opacity: 0.88; }

/* === LAYOUT =============================================== */
.container { max-width: 1080px; margin: 0 auto; padding: 0 clamp(1.5rem, 5vw, 3rem); }

section { padding: clamp(4rem, 8vw, 7rem) 0; }
section + section { border-top: 1px solid var(--border-sub); }

h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  line-height: 1.15;
  color: var(--text);
  text-wrap: balance;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
  display: block;
}

/* === HERO ================================================= */
.hero {
  padding-top: calc(60px + clamp(4rem, 8vw, 6rem));
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: clamp(3rem, 5vw, 5rem);
  align-items: start;
}

.hero-version {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.74rem;
  color: var(--text-muted); margin-bottom: 1.75rem;
}
.hero-version::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
  box-shadow: 0 0 8px var(--accent);
}

h1.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text);
  text-wrap: balance;
  margin-bottom: 1.4rem;
}

.hero-body {
  font-size: 1rem; color: var(--text-sec);
  max-width: 50ch; line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-install {
  display: inline-flex; align-items: center; gap: 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 0.7rem 1rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono); font-size: 0.88rem;
  transition: border-color 200ms;
  position: relative;
  width: fit-content;
}
.hero-install:hover { border-color: oklch(0.35 0.01 250); }

.install-prompt { color: var(--accent); font-weight: 600; user-select: none; }
.install-cmd { color: var(--text); }
.install-cursor {
  display: inline-block; width: 2px; height: 0.95em;
  background: var(--accent); vertical-align: text-bottom;
  animation: blink 1.1s step-end infinite;
}
.install-copy-hint {
  font-family: var(--font-mono); font-size: 0.68rem;
  color: var(--text-muted); margin-left: 0.5rem;
  transition: color 150ms;
}
.hero-install:hover .install-copy-hint { color: var(--accent); }
.install-copy-hint.copied { color: var(--accent); }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-links {
  display: flex; gap: 1.5rem; font-size: 0.88rem;
}
.hero-links a {
  color: var(--text-muted);
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: color 150ms, border-color 150ms;
}
.hero-links a:hover { color: var(--text); border-bottom-color: var(--border); }

/* Metrics panel */
.hero-metrics {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.hero-metric {
  padding: 1.4rem 1.6rem;
  border-bottom: 1px solid var(--border-sub);
  transition: background 200ms;
}
.hero-metric:last-child { border-bottom: none; }
.hero-metric:hover { background: var(--bg-surface); }

.metric-value {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}
.metric-label  { display: block; font-weight: 600; font-size: 0.88rem; color: var(--text); margin-bottom: 0.2rem; }
.metric-detail { display: block; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }

/* === FEATURES (spec sheet) ================================ */
.features-intro { color: var(--text-sec); max-width: 58ch; margin-top: 0.75rem; font-size: 0.95rem; }

.features-table { margin-top: 2.5rem; }

.feature-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 2rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border-sub);
  align-items: start;
  transition: background 150ms;
}
.feature-row:first-child { border-top: 1px solid var(--border-sub); }

.feature-stat {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}
.feature-unit { font-size: 0.68rem; display: block; color: var(--text-muted); margin-top: 0.2rem; }

.feature-name  { font-weight: 600; font-size: 0.95rem; color: var(--text); margin-bottom: 0.35rem; }
.feature-desc  { font-size: 0.88rem; color: var(--text-sec); line-height: 1.65; max-width: 64ch; }

/* === BENCHMARK (bar charts) ================================ */
.benchmark-intro { color: var(--text-sec); max-width: 58ch; margin-top: 0.75rem; font-size: 0.95rem; }

.benchmark-list { display: flex; flex-direction: column; gap: 2.25rem; margin-top: 2.5rem; }

.bm-label { font-weight: 600; font-size: 0.88rem; color: var(--text); margin-bottom: 0.85rem; }

.bm-bars { display: flex; flex-direction: column; gap: 0.45rem; }

.bm-row {
  display: grid;
  grid-template-columns: 52px 1fr 110px;
  align-items: center;
  gap: 0.75rem;
}

.bm-tag {
  font-family: var(--font-mono); font-size: 0.67rem;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-muted); text-align: right;
}
.bm-tag.after-tag { color: var(--accent); }

.bm-track {
  height: 7px; background: var(--bg-surface);
  border-radius: 2px; overflow: hidden;
  border: 1px solid var(--border-sub);
}
.bm-fill {
  height: 100%; border-radius: 2px;
  width: 0; transition: width 1.1s var(--ease-out);
}
.bm-fill.before-fill { background: oklch(0.38 0.006 250); }
.bm-fill.after-fill  { background: var(--accent); }

.bm-val {
  font-family: var(--font-mono); font-size: 0.76rem;
  color: var(--text-sec); white-space: nowrap;
}
.bm-val.accent-val { color: var(--accent); }
.bm-val em { font-style: normal; font-weight: 600; margin-left: 0.3rem; }

.bm-footnote {
  margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border-sub);
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--text-muted);
}
.bm-footnote a { color: var(--text-sec); text-decoration: underline; text-underline-offset: 3px; }

/* === PROVIDERS ============================================= */
.providers-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2.5rem 4rem; margin-top: 2.5rem;
}

.prov-group-label {
  font-family: var(--font-mono); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); margin-bottom: 0.65rem;
}

.prov-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.prov-chip {
  font-size: 0.8rem; color: var(--text-sec);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: border-color 150ms, color 150ms;
}
.prov-chip:hover { border-color: oklch(0.34 0.008 250); color: var(--text); }
.prov-chip.free-chip {
  color: var(--accent);
  border-color: oklch(0.78 0.17 78 / 0.3);
  background: oklch(0.78 0.17 78 / 0.06);
}

/* === QUICK START =========================================== */
.steps {
  margin-top: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.step {
  display: grid; grid-template-columns: 2.5rem 1fr;
  gap: 1.25rem; align-items: start;
  padding: 2rem 2.25rem;
  border-bottom: 1px solid var(--border-sub);
}
.step:last-child { border-bottom: none; }

.step-num {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--accent); font-weight: 600;
  padding-top: 0.15rem;
}

.step-title { font-weight: 600; font-size: 0.95rem; color: var(--text); margin-bottom: 0.3rem; }
.step-desc  { font-size: 0.87rem; color: var(--text-sec); margin-bottom: 1rem; max-width: 62ch; }

.terminal {
  background: var(--bg-surface);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 0.75rem;
}
.terminal + .terminal { margin-top: 0.6rem; }

.terminal-bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid var(--border-sub);
  background: var(--bg-raised);
}
.terminal-title {
  font-family: var(--font-mono); font-size: 0.67rem;
  color: var(--text-muted);
}

.terminal-body { padding: 0.9rem 1.1rem; }
.terminal-body pre {
  font-family: var(--font-mono); font-size: 0.8rem;
  line-height: 1.75; color: var(--text-sec);
  white-space: pre-wrap; word-break: break-all;
}

.t-prompt  { color: var(--accent); user-select: none; }
.t-cmd     { color: var(--text); }
.t-comment { color: var(--text-muted); }
.t-var     { color: oklch(0.72 0.11 200); }
.t-str     { color: oklch(0.78 0.10 140); }

/* === ARCHITECTURE ========================================= */
.arch-wrap {
  margin-top: 2.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  overflow-x: auto;
}

.arch-diagram {
  font-family: var(--font-mono);
  font-size: clamp(0.69rem, 1.4vw, 0.8rem);
  line-height: 1.65;
  color: var(--text-muted);
  white-space: pre;
}
.arch-hi   { color: var(--accent); font-weight: 600; }
.arch-node { color: var(--text-sec); }

/* === CTA ================================================== */
.cta-inner {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}
.cta-inner h2 { margin-bottom: 0.9rem; }
.cta-inner p  { font-size: 0.95rem; color: var(--text-sec); margin-bottom: 2rem; line-height: 1.65; }

.cta-actions { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }

/* === BUTTONS ============================================== */
.btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--r); font-size: 0.88rem; font-weight: 500;
  transition: opacity 150ms, border-color 150ms, color 150ms;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: oklch(0.08 0.008 250); font-weight: 600;
}
.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: oklch(0.34 0.01 250); }

.btn-ghost { background: transparent; color: var(--text-sec); }
.btn-ghost:hover { color: var(--text); }

/* === FOOTER =============================================== */
footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-sub);
}
.footer-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}
.footer-brand {
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.88rem; letter-spacing: 0.08em; color: var(--text-muted);
}
.footer-brand .dot { color: var(--accent); }

.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a {
  font-size: 0.8rem; color: var(--text-muted);
  transition: color 150ms;
}
.footer-links a:hover { color: var(--text); }

.footer-meta { font-size: 0.77rem; color: var(--text-muted); }
.footer-meta a { color: var(--text-sec); text-decoration: underline; text-underline-offset: 3px; }

/* === SCROLL REVEAL ======================================== */
.reveal {
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: 0.07s; }
.delay-2 { transition-delay: 0.14s; }
.delay-3 { transition-delay: 0.21s; }
.delay-4 { transition-delay: 0.28s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.visible { opacity: 1; transform: none; transition: none; }
  .bm-fill { transition: none; }
  .install-cursor { animation: none; opacity: 1; }
}

/* === RESPONSIVE =========================================== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-metrics { max-width: 480px; }
}

@media (max-width: 640px) {
  .feature-row { grid-template-columns: 1fr; gap: 0.6rem; }
  .feature-stat { font-size: 1.4rem; }
  .providers-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .bm-row { grid-template-columns: 44px 1fr 90px; }
  .step { grid-template-columns: 1fr; }
  .step-num { margin-bottom: -0.5rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .nav-links { display: none; }
}

@media (max-width: 440px) {
  .cta-actions { flex-direction: column; align-items: stretch; }
  .cta-actions .btn { justify-content: center; }
  .hero-links { flex-direction: column; gap: 0.6rem; }
}
