/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #080808;
  --bg-2: #0d0d0d;
  --bg-card: #111111;
  --bg-card-hover: #161616;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.15);
  --text: #e8e8e8;
  --text-muted: #555;
  --text-dim: #999;
  --accent: #7c6af7;
  --accent-2: #a78bfa;
  --accent-3: #38bdf8;
  --green: #4ade80;
  --red: #f87171;
  --yellow: #fbbf24;
  --orange: #fb923c;
  --font: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --glow: 0 0 40px rgba(124,106,247,0.15);
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); }

/* ── Noise overlay ── */
.noise {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* ── Grid background ── */
.grid-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 0%, transparent 100%);
}

/* ── Glows ── */
.hero-glow {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
  filter: blur(80px);
}
.glow-1 {
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(124,106,247,0.22) 0%, transparent 70%);
  top: -100px; left: 50%; transform: translateX(-50%);
}
.glow-2 {
  width: 400px; height: 300px;
  background: radial-gradient(ellipse, rgba(56,189,248,0.12) 0%, transparent 70%);
  top: 200px; right: 10%;
  animation: glow-drift 8s ease-in-out infinite alternate;
}
.glow-3 {
  width: 300px; height: 200px;
  background: radial-gradient(ellipse, rgba(74,222,128,0.07) 0%, transparent 70%);
  bottom: 100px; left: 5%;
  animation: glow-drift 12s ease-in-out infinite alternate-reverse;
}
@keyframes glow-drift {
  from { transform: translate(0, 0); }
  to   { transform: translate(-40px, 20px); }
}

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 24px;
  transition: background 0.3s, border-bottom 0.3s;
}
.nav.scrolled {
  background: rgba(8,8,8,0.90);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1140px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 18px; letter-spacing: -0.5px;
}
.logo-icon { font-size: 22px; color: var(--accent); }
.nav-links {
  display: flex; align-items: center; gap: 28px;
  font-size: 14px; font-weight: 500; color: var(--text-dim);
}
.nav-links a:not(.btn):hover { color: var(--text); transition: color 0.2s; }
.nav-link-changelog {
  color: var(--accent-2) !important;
  border: 1px solid rgba(124,106,247,0.25);
  padding: 5px 12px; border-radius: 6px;
  background: rgba(124,106,247,0.06);
  transition: all 0.2s !important;
}
.nav-link-changelog:hover {
  background: rgba(124,106,247,0.14) !important;
  border-color: rgba(124,106,247,0.45) !important;
}
.nav-active { color: var(--accent-2) !important; }

/* ── Hamburger ── */
.nav-hamburger {
  display: none; flex-direction: column; justify-content: space-between;
  width: 24px; height: 18px; background: none; border: none;
  cursor: pointer; padding: 0;
}
.nav-hamburger span {
  display: block; height: 2px; background: var(--text-dim);
  border-radius: 2px; transition: all 0.2s;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all 0.2s; white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px rgba(124,106,247,0.3);
}
.btn-primary:hover {
  background: var(--accent-2);
  box-shadow: 0 0 36px rgba(124,106,247,0.5);
  transform: translateY(-1px);
}
.btn-secondary {
  background: rgba(56,189,248,0.1);
  color: var(--accent-3);
  border: 1px solid rgba(56,189,248,0.25);
}
.btn-secondary:hover {
  background: rgba(56,189,248,0.18);
  border-color: rgba(56,189,248,0.45);
  transform: translateY(-1px);
}
.btn-outline {
  border: 1px solid var(--border-hover);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); }

/* ── Gradient text ── */
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── HERO ── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 120px 24px 80px;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 800px; margin: 0 auto;
  text-align: center;
}
.hero-badges {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap; margin-bottom: 28px;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 99px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
}
.badge-version {
  border: 1px solid rgba(124,106,247,0.4);
  background: rgba(124,106,247,0.1);
  color: var(--accent-2);
}
.badge-mit {
  border: 1px solid rgba(74,222,128,0.3);
  background: rgba(74,222,128,0.07);
  color: var(--green);
}
.badge-pypi {
  border: 1px solid rgba(56,189,248,0.3);
  background: rgba(56,189,248,0.07);
  color: var(--accent-3);
}
.hero-title {
  font-size: clamp(42px, 8vw, 80px);
  font-weight: 900; line-height: 1.05; letter-spacing: -2px;
  margin-bottom: 24px;
}
.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-dim); line-height: 1.7;
  max-width: 600px; margin: 0 auto 36px;
}
.hero-sub strong { color: var(--text); font-weight: 600; }
.hero-actions {
  display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 52px;
}
.hero-actions .btn-primary { padding: 14px 28px; font-size: 15px; }
.hero-actions .btn-secondary { padding: 14px 22px; font-size: 14px; }
.hero-actions .btn-ghost { padding: 14px 20px; font-size: 15px; }

/* ── Code block ── */
.hero-code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden; text-align: left;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.02);
  max-width: 640px; margin: 0 auto;
}
.code-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: var(--red); }
.dot-yellow { background: var(--yellow); }
.dot-green { background: var(--green); }
.code-bar-title {
  margin-left: auto; font-size: 12px; color: var(--text-muted);
  font-family: var(--mono);
}
.code-block {
  padding: 20px 24px;
  font-family: var(--mono); font-size: 13px; line-height: 2;
  overflow-x: auto;
}
.c-comment { color: var(--text-muted); }
.c-cmd { color: var(--accent-2); }
.c-str { color: var(--green); }

/* ── Scroll hint ── */
.scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-muted);
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, transparent, var(--text-muted));
  animation: scroll-drop 2s ease-in-out infinite;
}
@keyframes scroll-drop {
  0%,100% { opacity: 0.3; transform: scaleY(1); }
  50%      { opacity: 1;   transform: scaleY(0.6); }
}

/* ── Stats bar ── */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  padding: 48px 24px;
}
.stats-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-around;
  flex-wrap: wrap; gap: 32px;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 900; letter-spacing: -2px;
  background: linear-gradient(135deg, #fff 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-suffix { font-size: 0.6em; font-weight: 700; }
.stat-label {
  display: block; font-size: 13px; color: var(--text-muted);
  margin-top: 4px; font-weight: 500;
}
.stat-divider {
  width: 1px; height: 60px;
  background: var(--border);
}

/* ── Recognition section ── */
.recognition-section {
  padding: 64px 24px;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.recognition-label {
  text-align: center;
  font-size: 11px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 28px;
}
.recognition-grid {
  max-width: 960px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.recognition-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  transition: all 0.2s; cursor: pointer;
  text-decoration: none;
}
.recognition-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.recognition-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.recognition-icon svg { width: 20px; height: 20px; }
.glama-icon  { background: rgba(124,106,247,0.12); color: var(--accent-2); }
.mcp-icon    { background: rgba(56,189,248,0.1);   color: var(--accent-3); }
.pulse-icon  { background: rgba(74,222,128,0.1);   color: var(--green); }
.policy-icon { background: rgba(251,191,36,0.1);   color: var(--yellow); }
.pypi-icon   { background: rgba(251,146,60,0.1);   color: var(--orange); }
.recognition-info { flex: 1; min-width: 0; }
.recognition-name {
  font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.recognition-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.recognition-arrow {
  font-size: 14px; color: var(--text-muted);
  transition: transform 0.2s, color 0.2s;
}
.recognition-card:hover .recognition-arrow {
  transform: translateX(4px);
  color: var(--accent-2);
}

/* ── Sections ── */
.section { padding: 100px 24px; }
.section-dark { background: var(--bg-2); }
.container { max-width: 1140px; margin: 0 auto; }
.section-label {
  font-size: 12px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800; letter-spacing: -1.5px; line-height: 1.1;
  margin-bottom: 20px;
}
.section-sub {
  font-size: 18px; color: var(--text-dim); line-height: 1.7;
  max-width: 600px; margin-bottom: 60px;
}
.section-sub code {
  background: rgba(255,255,255,0.06);
  padding: 2px 6px; border-radius: 4px; font-size: 14px;
  color: var(--accent-2);
}

/* ── Steps ── */
.steps { display: flex; flex-direction: column; gap: 0; max-width: 740px; }
.step {
  display: flex; gap: 28px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.step:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
.step-num {
  font-size: 40px; font-weight: 900; letter-spacing: -2px;
  color: rgba(124,106,247,0.2); font-family: var(--mono);
  flex-shrink: 0; line-height: 1;
}
.step-body h3 {
  font-size: 20px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.5px;
}
.step-body p { color: var(--text-dim); font-size: 15px; line-height: 1.7; margin-bottom: 14px; }
.step-body code {
  color: var(--green); background: rgba(74,222,128,0.07);
  padding: 2px 8px; border-radius: 4px; font-size: 13px;
}
.step-body strong { color: var(--text); }
.inline-code {
  display: inline-block;
  font-family: var(--mono); font-size: 13px;
  color: var(--accent-2); background: rgba(124,106,247,0.08);
  padding: 6px 14px; border-radius: 6px;
  border: 1px solid rgba(124,106,247,0.15);
}
.step-connector {
  width: 1px; height: 32px; margin-left: 72px;
  background: linear-gradient(to bottom, rgba(124,106,247,0.3), transparent);
}

/* ── Features grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative; overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute; inset: 0; border-radius: var(--radius-lg);
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(124,106,247,0.06) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.feature-card:hover::before { opacity: 1; }
.feature-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), var(--glow);
  transform: translateY(-2px);
}
.feature-icon {
  width: 48px; height: 48px; margin-bottom: 20px;
  color: var(--accent);
}
.feature-icon svg { width: 100%; height: 100%; }
.feature-card h3 {
  font-size: 18px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.3px;
}
.feature-card p {
  color: var(--text-dim); font-size: 14px; line-height: 1.7; margin-bottom: 16px;
}
.feature-card code {
  color: var(--accent-2);
  background: rgba(124,106,247,0.08);
  padding: 2px 6px; border-radius: 4px; font-size: 13px;
}
.feature-tag {
  font-size: 11px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-muted);
  font-family: var(--mono);
}

/* ── Architecture diagram ── */
.arch-diagram { margin: 0 auto; max-width: 800px; }
.arch-placeholder {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 48px 32px;
  position: relative; overflow: hidden;
}
.arch-img {
  width: 100%; border-radius: var(--radius);
  display: block;
}
.arch-placeholder.no-img .arch-img { display: none; }
.arch-placeholder:not(.no-img) .arch-placeholder-inner { display: none; }
.arch-placeholder-inner {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.arch-label-top {
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  padding: 8px 16px; border: 1px solid var(--border);
  border-radius: 6px; font-family: var(--mono);
}
.arch-label-bottom { margin-top: 0; }
.arch-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.arch-row-4 { flex-wrap: wrap; }
.arch-box {
  padding: 14px 22px; border-radius: 10px;
  font-size: 13px; font-weight: 600; font-family: var(--mono);
  text-align: center; line-height: 1.5; border: 1px solid;
}
.arch-box small { font-size: 11px; font-weight: 400; display: block; opacity: 0.7; }
.arch-mcp { background: rgba(124,106,247,0.1); border-color: rgba(124,106,247,0.3); color: var(--accent-2); }
.arch-mem { background: rgba(56,189,248,0.08); border-color: rgba(56,189,248,0.25); color: var(--accent-3); }
.arch-graph { background: rgba(74,222,128,0.08); border-color: rgba(74,222,128,0.25); color: var(--green); }
.arch-ast { background: rgba(251,191,36,0.08); border-color: rgba(251,191,36,0.25); color: var(--yellow); }
.arch-bm25 { background: rgba(251,146,60,0.08); border-color: rgba(251,146,60,0.25); color: var(--orange); }
.arch-storage {
  background: rgba(255,255,255,0.03); border-color: var(--border);
  color: var(--text-dim); font-family: var(--mono); font-size: 13px;
}
.arch-storage code { color: var(--accent-2); }
.arch-arrows { display: flex; gap: 48px; }
.arch-arrow {
  width: 1px; height: 28px;
  background: linear-gradient(to bottom, rgba(124,106,247,0.4), transparent);
  position: relative;
}
.arch-arrow::after {
  content: ''; position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(124,106,247,0.4);
}
.arch-line {
  width: 80%; height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  margin: 4px auto;
}

/* ── Formula ── */
.retrieval-formula {
  margin-top: 48px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  text-align: center;
}
.formula-label {
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 20px;
}
.formula {
  font-family: var(--mono); font-size: clamp(13px, 2.5vw, 18px);
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 10px; margin-bottom: 12px;
}
.formula-note {
  font-size: 12px; color: var(--text-muted); font-family: var(--mono);
}
.f-var { color: var(--accent-2); font-weight: 700; }
.f-eq  { color: var(--text-muted); }
.f-weight { color: var(--yellow); }
.f-op  { color: var(--text-muted); }
.f-term { color: var(--green); }

/* ── Tools list ── */
.tools-list { display: flex; flex-direction: column; gap: 32px; margin-bottom: 64px; }
.tool-group-label {
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px;
}
.tool-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 8px 16px; border-radius: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--accent-2);
  transition: all 0.2s; cursor: default; position: relative;
}
.chip:hover {
  background: rgba(124,106,247,0.1);
  border-color: rgba(124,106,247,0.3);
}
.chip-highlight {
  background: rgba(124,106,247,0.08);
  border-color: rgba(124,106,247,0.3);
  color: var(--accent-2);
}
.chip-highlight::after {
  content: '★';
  font-size: 9px; margin-left: 4px;
  vertical-align: top; margin-top: 1px;
  color: var(--yellow);
}

/* ── CTA box ── */
.cta-box {
  background: linear-gradient(135deg, rgba(124,106,247,0.08) 0%, rgba(56,189,248,0.05) 100%);
  border: 1px solid rgba(124,106,247,0.2);
  border-radius: var(--radius-lg); padding: 48px;
  text-align: center;
}
.cta-box h3 {
  font-size: clamp(22px, 3vw, 32px); font-weight: 800;
  letter-spacing: -1px; margin-bottom: 12px;
}
.cta-box p {
  color: var(--text-dim); font-size: 16px; margin-bottom: 28px; line-height: 1.7;
}
.cta-box code {
  color: var(--accent-2); background: rgba(124,106,247,0.1);
  padding: 2px 6px; border-radius: 4px; font-size: 14px;
}
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.cta-actions .btn-primary { padding: 14px 28px; font-size: 15px; }
.cta-actions .btn-ghost { padding: 14px 20px; font-size: 15px; }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
}
.footer-inner {
  max-width: 1140px; margin: 0 auto;
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 32px;
}
.footer-left {
  display: flex; flex-direction: column; gap: 8px;
}
.footer-copy {
  font-size: 13px; color: var(--text-muted);
}
.footer-copy a { color: var(--accent-2); }
.footer-copy a:hover { text-decoration: underline; }
.footer-links-group {
  display: flex; gap: 48px; flex-wrap: wrap;
}
.footer-col {
  display: flex; flex-direction: column; gap: 8px;
}
.footer-col-label {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 4px;
}
.footer-col a {
  font-size: 13px; color: var(--text-dim);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }

/* ── Scroll-reveal animations ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1),
              transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.45s; }

/* ── Number counter animation ── */
@keyframes count-up {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}
.stat-num.animated { animation: count-up 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards; }

/* ════════════════════════════════════════
   CHANGELOG PAGE
   ════════════════════════════════════════ */

/* ── Changelog hero ── */
.cl-hero {
  position: relative; overflow: hidden;
  padding: 120px 24px 60px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.cl-hero-inner { position: relative; z-index: 1; }
.cl-hero-title {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 900; letter-spacing: -2px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cl-hero-sub {
  font-size: 18px; color: var(--text-dim); margin-bottom: 32px;
}

/* ── Filter bar ── */
.cl-filter-bar {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}
.cl-filter {
  padding: 8px 18px; border-radius: 99px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  cursor: pointer; transition: all 0.2s; font-family: var(--font);
}
.cl-filter:hover { border-color: var(--border-hover); color: var(--text); }
.cl-filter.active {
  background: var(--accent); border-color: var(--accent);
  color: #fff;
}

/* ── Layout ── */
.cl-layout {
  display: flex; align-items: flex-start;
  max-width: 1100px; margin: 0 auto;
  padding: 64px 24px 120px;
  gap: 48px;
}

/* ── Sidebar ── */
.cl-sidebar {
  width: 160px; flex-shrink: 0;
  position: sticky; top: 88px;
}
.cl-sidebar-title {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 16px;
}
.cl-toc { display: flex; flex-direction: column; gap: 2px; }
.cl-toc-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: 8px;
  font-size: 13px; color: var(--text-muted);
  transition: all 0.2s; border: 1px solid transparent;
}
.cl-toc-link:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.cl-toc-link.active {
  color: var(--accent-2); background: rgba(124,106,247,0.08);
  border-color: rgba(124,106,247,0.2);
}
.cl-toc-ver { font-family: var(--mono); font-weight: 600; font-size: 12px; }
.cl-toc-date { font-size: 11px; color: var(--text-muted); }

/* ── Entries ── */
.cl-entries { flex: 1; display: flex; flex-direction: column; gap: 0; min-width: 0; }
.cl-entry {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.cl-entry:first-child { padding-top: 0; }
.cl-entry:last-of-type { border-bottom: none; }

.cl-entry-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.cl-entry-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── Version badges ── */
.cl-version-badge {
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  padding: 5px 14px; border-radius: 8px; border: 1px solid;
}
.cl-major {
  background: rgba(251,191,36,0.12); border-color: rgba(251,191,36,0.35);
  color: var(--yellow);
}
.cl-minor {
  background: rgba(124,106,247,0.12); border-color: rgba(124,106,247,0.35);
  color: var(--accent-2);
}
.cl-patch {
  background: rgba(255,255,255,0.05); border-color: var(--border-hover);
  color: var(--text-dim);
}
.cl-version-label {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px;
  background: rgba(56,189,248,0.1); color: var(--accent-3);
  border: 1px solid rgba(56,189,248,0.25);
}
.cl-highlight-label {
  background: rgba(124,106,247,0.1); color: var(--accent-2);
  border-color: rgba(124,106,247,0.3);
}
.cl-stable-label {
  background: rgba(74,222,128,0.1); color: var(--green);
  border-color: rgba(74,222,128,0.3);
}
.cl-date {
  font-size: 13px; color: var(--text-muted); font-family: var(--mono);
  margin-top: 6px;
}

/* ── Summary ── */
.cl-summary {
  background: rgba(124,106,247,0.05); border: 1px solid rgba(124,106,247,0.15);
  border-radius: var(--radius); padding: 14px 18px;
  font-size: 14px; color: var(--text-dim); line-height: 1.6;
  margin-bottom: 24px;
}
.cl-summary code {
  color: var(--accent-2); background: rgba(124,106,247,0.1);
  padding: 2px 6px; border-radius: 4px; font-size: 13px;
}

/* ── Change groups ── */
.cl-changes { display: flex; flex-direction: column; gap: 20px; }
.cl-group {}
.cl-group-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; padding: 4px 10px; border-radius: 5px;
  margin-bottom: 12px; border: 1px solid;
}
.cl-added  { background: rgba(74,222,128,0.08);  border-color: rgba(74,222,128,0.25);  color: var(--green); }
.cl-fixed  { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.25); color: var(--red); }
.cl-changed{ background: rgba(251,191,36,0.08);  border-color: rgba(251,191,36,0.25);  color: var(--yellow); }
.cl-docs   { background: rgba(56,189,248,0.08);  border-color: rgba(56,189,248,0.25);  color: var(--accent-3); }

.cl-list {
  list-style: none; display: flex; flex-direction: column; gap: 10px;
  padding-left: 8px;
}
.cl-list li {
  font-size: 14px; color: var(--text-dim); line-height: 1.6;
  padding-left: 16px; position: relative;
}
.cl-list li::before {
  content: '—';
  position: absolute; left: 0; color: var(--text-muted);
  font-size: 12px; top: 3px;
}
.cl-list strong { color: var(--text); font-weight: 600; }
.cl-list code {
  color: var(--accent-2); background: rgba(124,106,247,0.08);
  padding: 1px 5px; border-radius: 4px;
  font-size: 12px; font-family: var(--mono);
}
.cl-list a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
.cl-file {
  display: inline-block; margin-left: 8px;
  font-family: var(--mono); font-size: 11px; color: var(--text-muted);
  background: rgba(255,255,255,0.04); padding: 1px 6px; border-radius: 4px;
  border: 1px solid var(--border);
}

/* ── Bottom CTA ── */
.cl-bottom-cta {
  padding: 48px 0 0;
  text-align: center;
}
.cl-bottom-cta p {
  font-size: 15px; color: var(--text-dim); margin-bottom: 16px;
}

/* ── Mobile nav open state ── */
.nav-links.nav-open {
  display: flex; flex-direction: column;
  position: absolute; top: 64px; left: 0; right: 0;
  background: rgba(8,8,8,0.97); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px; gap: 16px; z-index: 99;
}
.nav-links.nav-open a { font-size: 15px; }

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 900px) {
  .cl-sidebar { display: none; }
  .cl-layout { padding: 40px 20px 80px; }
}

@media (max-width: 768px) {
  .nav-links a:not(.btn):not(.nav-link-changelog) { display: none; }
  .nav-hamburger { display: flex; }
  .step { flex-direction: column; gap: 16px; }
  .step-connector { margin-left: 32px; }
  .arch-arrows { gap: 20px; }
  .retrieval-formula { padding: 24px 16px; }
  .cta-box { padding: 32px 20px; }
  .footer-inner { flex-direction: column; }
  .stat-divider { display: none; }
  .recognition-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions { gap: 10px; }
}

@media (max-width: 480px) {
  .recognition-grid { grid-template-columns: 1fr; }
  .cl-filter-bar { gap: 6px; }
  .cl-filter { padding: 7px 14px; font-size: 12px; }
  .footer-links-group { gap: 28px; }
}
