/* =========================================================================
   AyBee — shared design system
   Extracted from aybee-landing.html so feature pages stay consistent.
   ========================================================================= */

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

/* ── tokens ── */
:root {
  --bg:        #0B0E14;
  --surface:   #111620;
  --border:    #1E2535;
  --muted:     #3A4358;
  --subtle:    #6B7A99;
  --body:      #A8B4CC;
  --heading:   #E8EDF7;
  --accent:    #4DFFA0;
  --accent-dim:#1A5C3A;
  --warn:      #FF6B6B;
  --blue:      #79C0FF;

  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', system-ui, sans-serif;

  --max: 860px;
  --pad: clamp(1.5rem, 5vw, 3rem);
}

/* ── reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── layout ── */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

.section {
  border-top: 1px solid var(--border);
  padding: clamp(3rem, 8vw, 5rem) var(--pad);
  max-width: var(--max);
  margin: 0 auto;
}
.section.no-rule { border-top: none; }

/* ── nav ── */
nav {
  padding: 1.25rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(11,14,20,0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
}
.logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}
.logo span { color: var(--subtle); font-weight: 400; }
nav a.nav-cta {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent-dim);
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  transition: background 0.15s;
  white-space: nowrap;
}
nav a.nav-cta:hover { background: var(--accent-dim); }

/* ── feature pill nav (cross-links between feature pages) ── */
.feature-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.9rem var(--pad);
  border-bottom: 1px solid var(--border);
  max-width: var(--max);
  margin: 0 auto;
}
.feature-nav a {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--subtle);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  transition: color 0.15s, border-color 0.15s;
}
.feature-nav a:hover { color: var(--body); border-color: var(--muted); }
.feature-nav a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: rgba(77,255,160,0.06);
}

/* ── hero ── */
.hero {
  padding: clamp(3.5rem, 9vw, 6rem) var(--pad) clamp(2.5rem, 7vw, 4rem);
  max-width: var(--max);
  margin: 0 auto;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 1.5rem;
  height: 1px;
  background: var(--accent);
}
h1 {
  font-family: var(--mono);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--heading);
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}
h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  font-size: 1.1rem;
  color: var(--body);
  max-width: 580px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* ── headings ── */
.section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 2rem;
}
h2 {
  font-family: var(--mono);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  line-height: 1.25;
  text-wrap: balance;
}
.prose { max-width: 600px; color: var(--body); line-height: 1.75; }
.prose p + p { margin-top: 1rem; }
.prose strong { color: var(--heading); font-weight: 600; }

/* ── buttons / links ── */
.btn-primary {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 700;
  background: var(--accent);
  color: #0B0E14;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { opacity: 0.88; }
.btn-ghost {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent-dim);
  padding: 0.7rem 1.4rem;
  border-radius: 4px;
  display: inline-block;
  transition: background 0.15s;
}
.btn-ghost:hover { background: var(--accent-dim); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }

/* ── code block ── */
.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.9;
  overflow-x: auto;
  margin-top: 1.5rem;
}
.cb-comment { color: var(--muted); }
.cb-keyword { color: #FF7B72; }
.cb-fn { color: #D2A8FF; }
.cb-string { color: #A5D6FF; }
.cb-var { color: var(--heading); }
.cb-accent { color: var(--accent); }
.cb-num { color: #F0A070; }

/* ── tabbed code blocks ── */
.code-tabs { margin-top: 1.5rem; }
.code-tabs-bar { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.code-tab {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--subtle);
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  padding: 0.45rem 0.9rem;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.code-tab:hover { color: var(--body); }
.code-tab[aria-selected="true"] {
  color: var(--accent);
  background: var(--surface);
  border-color: var(--border);
}
.code-tabs .code-block { margin-top: 0; border-top-left-radius: 0; }
.code-panel[hidden] { display: none; }

/* ── header preview ── */
.header-preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.8;
  margin-top: 1.5rem;
  overflow-x: auto;
}
.hp-comment { color: var(--muted); }
.hp-key { color: var(--subtle); }
.hp-value { color: var(--accent); }
.hp-string { color: var(--blue); }
.hp-dim { color: var(--muted); }

/* ── feature grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 2rem;
}
.feature-card { background: var(--surface); padding: 1.5rem; }
.feature-icon {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.feature-title {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.5rem;
}
.feature-desc { font-size: 0.875rem; color: var(--subtle); line-height: 1.6; }

/* ── stat row ── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 2rem;
}
.stat { background: var(--surface); padding: 1.5rem; text-align: center; }
.stat-num {
  font-family: var(--mono);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.stat-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--subtle);
  margin-top: 0.4rem;
}

/* ── steps timeline ── */
.steps { margin-top: 2rem; display: flex; flex-direction: column; gap: 1px; }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
}
.step-num {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #0B0E14;
  background: var(--accent);
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-title {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.35rem;
}
.step-desc { font-size: 0.875rem; color: var(--subtle); line-height: 1.6; }

/* ── split / diagram bar ── */
.split-bar {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: 0.78rem;
}
.split-seg {
  padding: 1rem 0.75rem;
  text-align: center;
  color: var(--heading);
  border-right: 1px solid var(--bg);
}
.split-seg:last-child { border-right: none; }
.split-seg small { display: block; color: rgba(11,14,20,0.7); font-size: 0.68rem; margin-top: 0.2rem; }

/* ── callout box ── */
.callout {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  background: var(--surface);
  margin-top: 2rem;
}
.callout h3 {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.5rem;
}
.callout p { font-size: 0.875rem; color: var(--subtle); line-height: 1.6; }

.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--subtle);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.15rem 0.5rem;
}

/* ── final cta ── */
.cta-section {
  border-top: 1px solid var(--border);
  padding: clamp(4rem, 10vw, 7rem) var(--pad);
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}
.cta-section h2 { margin-bottom: 1rem; }
.cta-section p { color: var(--subtle); margin-bottom: 2rem; font-size: 0.95rem; }
.cta-section .btn-row { justify-content: center; }

/* ── footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem var(--pad);
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
footer p { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
footer a { color: var(--subtle); text-decoration: none; }
footer a:hover { color: var(--body); }

/* ── responsive ── */
@media (max-width: 600px) {
  .step { grid-template-columns: 1fr; gap: 0.6rem; }
  .split-bar { flex-direction: column; }
  .split-seg { border-right: none; border-bottom: 1px solid var(--bg); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
