/* =========================================================
   Enterprise AI Data Platform — Design System
   Dark theme · tech-blue + purple gradient · glassmorphism
   ========================================================= */

:root {
  /* Color tokens */
  --bg: #0B1220;
  --bg-2: #0E1730;
  --bg-elev: rgba(255, 255, 255, 0.035);
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.07);

  --primary: #3B82F6;
  --primary-600: #2563EB;
  --purple: #8B5CF6;
  --purple-600: #7C3AED;
  --grad: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  --grad-soft: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(139,92,246,0.18));

  --text: #E8EDF6;
  --text-dim: #9AA7BD;
  --text-faint: #6B7894;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --good: #34D399;
  --warn: #FBBF24;
  --danger: #F87171;

  /* Typography */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Spacing (4px base) */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
  --s12: 48px; --s16: 64px; --s20: 80px; --s24: 96px;

  /* Radius */
  --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;

  /* Shadow */
  --sh-sm: 0 2px 8px rgba(0,0,0,0.25);
  --sh-md: 0 12px 32px rgba(0,0,0,0.35);
  --sh-lg: 0 24px 60px rgba(0,0,0,0.45);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 150ms ease;
  --t: 300ms var(--ease);
}

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

html { scroll-behavior: smooth; }

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

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

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--s6);
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,0.04); z-index: 200;
}
.scroll-progress .bar {
  height: 100%; width: 0;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(139,92,246,0.7);
  transition: width 0.1s linear;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s2);
  font-family: var(--font); font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: var(--r-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.btn--lg { padding: 14px 26px; font-size: 16px; }

.btn--primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 8px 24px rgba(59,130,246,0.35);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(139,92,246,0.5);
}
.btn--ghost {
  background: var(--surface); color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover {
  background: var(--surface-strong);
  transform: translateY(-2px);
  border-color: rgba(139,92,246,0.5);
}
.btn--block { width: 100%; }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 150;
  transition: background var(--t), backdrop-filter var(--t), border-color var(--t);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11,18,32,0.72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav__inner {
  max-width: 1180px; margin: 0 auto;
  padding: 14px var(--s6);
  display: flex; align-items: center; gap: var(--s6);
}
.brand { display: flex; align-items: center; gap: var(--s2); }
.brand__mark { display: inline-flex; filter: drop-shadow(0 0 10px rgba(99,102,241,0.5)); }
.brand__text { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.brand__text strong { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav__links { display: flex; gap: var(--s5); margin-left: auto; }
.nav__links a {
  font-size: 14.5px; color: var(--text-dim); font-weight: 500;
  position: relative; transition: color var(--t-fast); padding: 4px 0;
}
.nav__links a:hover { color: var(--text); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--grad); transition: width var(--t);
}
.nav__links a:hover::after { width: 100%; }

.nav__cta { margin-left: var(--s2); padding: 9px 18px; font-size: 14px; }

.nav__gh {
  margin-left: var(--s2);
  width: 38px; height: 38px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 50%;
  color: var(--text-dim); background: rgba(255,255,255,0.02);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.nav__gh:hover {
  color: #E6EDF3; border-color: var(--color-primary-500);
  background: rgba(59,130,246,0.10); transform: translateY(-1px);
}
.nav__gh-icon { width: 19px; height: 19px; display: block; }

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--t); }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}
.hero__network { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.55; }
.hero__glow {
  position: absolute; border-radius: 50%; filter: blur(90px); z-index: 0;
  pointer-events: none;
}
.hero__glow--1 { width: 520px; height: 520px; background: rgba(59,130,246,0.22); top: -120px; left: -100px; }
.hero__glow--2 { width: 460px; height: 460px; background: rgba(139,92,246,0.20); bottom: -140px; right: -80px; }

.hero__grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--s12);
  align-items: center;
}

.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-dim);
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); margin-bottom: var(--s5);
}

.hero__title {
  font-size: clamp(40px, 5.2vw, 68px); line-height: 1.05; font-weight: 800;
  letter-spacing: -0.02em; margin-bottom: var(--s6);
}
.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub {
  font-size: 17px; color: var(--text-dim); max-width: 540px; margin-bottom: var(--s8);
}
.hero__cta { display: flex; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s6); }
.hero__zh { font-size: 14.5px; color: var(--text-faint); margin-bottom: var(--s3); }
.hero__value {
  font-family: var(--mono); font-size: 14px; color: var(--text-dim);
  letter-spacing: 0.02em;
}
.hero__value::before { content: "› "; color: var(--purple); }

.hero__scroll {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 3;
  width: 24px; height: 38px; border: 2px solid var(--border-strong); border-radius: 14px;
}
.hero__scroll span {
  position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; border-radius: 2px; background: var(--primary);
  animation: scrollDot 1.8s var(--ease) infinite;
}
@keyframes scrollDot { 0% { opacity: 0; top: 7px; } 30% { opacity: 1; } 60% { opacity: 1; top: 20px; } 100% { opacity: 0; top: 22px; } }

/* ---------- Hero diagram ---------- */
.hero__diagram {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: var(--s8);
  backdrop-filter: blur(8px);
  box-shadow: var(--sh-md);
}
.flow-stack { display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.flow-tier { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: center; max-width: 320px; }
.node {
  font-size: 13px; font-weight: 600; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface-strong);
}
.node--blue { color: #93C5FD; border-color: rgba(59,130,246,0.4); box-shadow: 0 0 18px rgba(59,130,246,0.15) inset; }
.node--purple { color: #C4B5FD; border-color: rgba(139,92,246,0.4); box-shadow: 0 0 18px rgba(139,92,246,0.15) inset; }

.flow-arrow { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; }
.flow-arrow__line {
  width: 2px; height: 34px;
  background: linear-gradient(180deg, rgba(59,130,246,0.6), rgba(139,92,246,0.6));
  position: relative; overflow: hidden;
}
.flow-arrow__line::after {
  content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%;
  background: linear-gradient(180deg, transparent, #fff);
  animation: flowDown 1.8s linear infinite;
}
@keyframes flowDown { 0% { top: -50%; } 100% { top: 100%; } }
.flow-arrow__label { font-size: 11.5px; color: var(--text-faint); letter-spacing: 0.04em; }

.flow-core {
  position: relative; width: 180px; height: 180px;
  display: flex; align-items: center; justify-content: center; margin: 6px 0;
}
.flow-core__ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring { fill: none; stroke: rgba(139,92,246,0.35); stroke-width: 1.5; }
.ring--outer { stroke: rgba(59,130,246,0.4); animation: spin 18s linear infinite; }
.ring--mid { stroke: rgba(139,92,246,0.5); animation: spin 12s linear infinite reverse; }
.ring--inner { stroke: rgba(99,102,241,0.6); animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); transform-origin: center; } }
.flow-core__pulse {
  position: absolute; width: 96px; height: 96px; border-radius: 50%;
  background: var(--grad); filter: blur(26px); opacity: 0.55;
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(0.9); opacity: 0.45; } 50% { transform: scale(1.1); opacity: 0.65; } }
.flow-core__label { position: relative; z-index: 2; text-align: center; }
.flow-core__label strong { display: block; font-size: 17px; font-weight: 700; }
.flow-core__label span { font-size: 13px; color: var(--text-dim); }

/* ---------- Sections ---------- */
.section { padding: var(--s24) 0; position: relative; }
.section--alt { background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(255,255,255,0)); }
.section__head { max-width: 720px; margin: 0 auto var(--s16); text-align: center; }
.section__title { font-size: clamp(28px, 3.4vw, 44px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.section__lead { margin-top: var(--s4); font-size: 16.5px; color: var(--text-dim); }
.section__closer {
  text-align: center; font-size: clamp(22px, 2.6vw, 34px); font-weight: 800;
  margin-top: var(--s12); letter-spacing: -0.01em;
}

/* ---------- Grids ---------- */
.grid { display: grid; gap: var(--s5); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s6);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t), background var(--t);
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--grad-soft); opacity: 0; transition: opacity var(--t); pointer-events: none;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--sh-md);
}
.card:hover::before { opacity: 1; }
.card__icon {
  width: 52px; height: 52px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: var(--surface-strong); border: 1px solid var(--border);
  margin-bottom: var(--s4); color: var(--text);
}
.card__icon svg { width: 26px; height: 26px; flex-shrink: 0; }
.card__icon--grad { background: var(--grad); border: none; box-shadow: 0 6px 18px rgba(139,92,246,0.35); }
.card__title { font-size: 18px; font-weight: 700; margin-bottom: var(--s2); }
.card__text { font-size: 14.5px; color: var(--text-dim); margin-bottom: var(--s4); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: var(--surface-strong); border: 1px solid var(--border); color: var(--text-dim);
}
.chip.danger { color: #FCA5A5; border-color: rgba(248,113,113,0.35); background: rgba(248,113,113,0.08); }

.checks { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 10px; }
.checks li {
  font-size: 13px; color: var(--text-dim); position: relative; padding-left: 20px;
  flex: 0 0 calc(50% - 10px);
}
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: var(--good); font-weight: 700;
}
.checks--plain li { flex: 0 0 100%; }

/* ---------- Architecture ---------- */
.arch {
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--border); border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
  padding: var(--s8); box-shadow: var(--sh-md);
}
.arch__layer { padding: var(--s5) 0; }
.arch__label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: var(--s4); text-align: center;
}
.arch__row { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: center; }
.arch__chip {
  font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.arch__chip:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--sh-sm); }
.chip--accent { border-color: rgba(139,92,246,0.4); background: rgba(139,92,246,0.10); color: #C4B5FD; }
.chip--good { border-color: rgba(52,211,153,0.35); background: rgba(52,211,153,0.08); color: #6EE7B7; }
.chip--muted { color: var(--text-dim); }

.arch__connector { display: flex; justify-content: center; padding: 2px 0; }
.arch__connector .dash {
  width: 2px; height: 30px;
  background: repeating-linear-gradient(180deg, rgba(139,92,246,0.7) 0 6px, transparent 6px 12px);
  background-size: 2px 12px;
  animation: dashFlow 1s linear infinite;
}
@keyframes dashFlow { to { background-position: 0 12px; } }

/* ---------- Tool Builder ---------- */
.builder {
  display: grid; grid-template-columns: 1fr 60px 1fr; gap: var(--s4);
  align-items: center;
}
.builder__panel {
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface); padding: var(--s5); min-height: 300px;
}
.builder__panel--out { background: linear-gradient(160deg, rgba(139,92,246,0.10), rgba(59,130,246,0.05)); }
.builder__tag {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: var(--s4); display: inline-block;
}
.builder__tag--accent { color: #C4B5FD; }
.code {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.7;
  background: rgba(0,0,0,0.35); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: var(--s4); color: #CBD5E1; overflow-x: auto;
}
.code .kw { color: #818CF8; font-weight: 600; }
.builder__drop { margin-top: var(--s4); font-size: 12.5px; color: var(--text-faint); text-align: center; }

.builder__arrow { display: flex; justify-content: center; }
.builder__arrow .flowline { stroke: rgba(139,92,246,0.6); stroke-width: 2; stroke-dasharray: 5 5; animation: dashFlow2 1s linear infinite; }
.builder__arrow .flowhead { stroke: #C4B5FD; stroke-width: 2; fill: none; }
@keyframes dashFlow2 { to { stroke-dashoffset: -10; } }

.toolgen { display: flex; flex-direction: column; gap: var(--s3); }
.toolgen__row { display: flex; align-items: center; gap: var(--s3); padding-bottom: var(--s3); border-bottom: 1px solid var(--border); }
.toolgen__row:last-child { border-bottom: none; }
.toolgen__k { font-size: 12.5px; color: var(--text-faint); font-weight: 600; min-width: 92px; }
.toolgen__v { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.toolgen__v:not(:has(.pill)) { font-size: 14px; font-weight: 600; color: var(--text); }
.pill {
  font-size: 12.5px; padding: 4px 11px; border-radius: 999px;
  background: var(--surface-strong); border: 1px solid var(--border-strong); color: var(--text);
}
.pill--good { color: #6EE7B7; border-color: rgba(52,211,153,0.3); background: rgba(52,211,153,0.08); }

/* ---------- Semantic ---------- */
.semantic {
  border: 1px solid var(--border); border-radius: var(--r-xl);
  background: var(--surface); padding: var(--s10) var(--s8);
  display: flex; flex-direction: column; align-items: center; gap: var(--s10);
}
.semantic__flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s2); }
.sem-step {
  font-size: 13.5px; font-weight: 600; padding: 10px 16px; border-radius: var(--r-md);
  background: var(--surface-strong); border: 1px solid var(--border); color: var(--text);
}
.sem-step--engine { background: var(--grad); border: none; color: #fff; box-shadow: 0 6px 20px rgba(139,92,246,0.4); }
.sem-step--out { color: #C4B5FD; border-color: rgba(139,92,246,0.4); }
.sem-arrow { width: 30px; height: 2px; background: linear-gradient(90deg, rgba(59,130,246,0.7), rgba(139,92,246,0.7)); position: relative; }
.sem-arrow::after { content: ""; position: absolute; right: -1px; top: -3px; border-left: 6px solid rgba(139,92,246,0.9); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }

.semantic__example { text-align: center; }
.sem-ex { display: flex; align-items: center; justify-content: center; gap: var(--s3); flex-wrap: wrap; }
.sem-ex__code { font-family: var(--mono); font-size: 15px; color: #93C5FD; background: rgba(59,130,246,0.10); border: 1px solid rgba(59,130,246,0.35); padding: 6px 14px; border-radius: var(--r-sm); }
.sem-ex__op { color: var(--text-faint); }
.sem-ex__tag { font-size: 13px; padding: 6px 12px; border-radius: 999px; background: var(--surface-strong); border: 1px solid var(--border-strong); color: var(--text); }
.sem-ex__fn { font-family: var(--mono); font-size: 14px; color: #6EE7B7; background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.3); padding: 6px 12px; border-radius: var(--r-sm); }
.sem-ex__derived { margin-top: var(--s4); display: flex; gap: 8px; justify-content: center; }
.sem-ex__note { margin-top: var(--s4); font-size: 14px; color: var(--text-dim); }

/* ---------- App icons (AI applications) ---------- */
.appicon { width: 16px; height: 16px; flex-shrink: 0; display: inline-block; transition: transform var(--t-fast); }
.node, .arch__chip, .logo { display: inline-flex; align-items: center; gap: 7px; }
.arch__chip:hover .appicon,
.logo:hover .appicon,
.node--purple:hover .appicon { transform: scale(1.18); }

/* ---------- Data-source icons (brand colored) ---------- */
.dsicon { width: 18px; height: 18px; flex-shrink: 0; display: inline-block; transition: transform var(--t-fast); }
.arch__chip:hover .dsicon,
.logo:hover .dsicon,
.node:hover .dsicon { transform: scale(1.18); }

/* Per-product brand colors (applied to the <svg>, text stays neutral) */
.c-mysql      { color: #1FB6D8; }
.c-oracle     { color: #FF5C5C; }
.c-sap        { color: #3B9EFF; }
.c-doris      { color: #4D9BFF; }
.c-hive       { color: #FFC83D; }
.c-redis      { color: #FF5A52; }
.c-api        { color: #9AA7BD; }
.c-csv        { color: #34C98A; }
.c-excel      { color: #34C759; }
.c-sqlserver  { color: #FF6B6B; }
.c-postgres   { color: #5FA8E8; }
.c-clickhouse { color: #FFD23D; }
.c-elastic    { color: #FFD23D; }

/* AI application brand colors */
.c-codex     { color: #14B8A6; }
.c-cursor    { color: #38BDF8; }
.c-claude    { color: #E0703C; }
.c-workbuddy { color: #8B5CF6; }
.c-chatgpt   { color: #10A37F; }
.c-copilot   { color: #6366F1; }
.c-openai    { color: #10A37F; }
.c-gemini    { color: #4285F4; }

/* ---------- Integrations ---------- */
.integrations { display: flex; flex-direction: column; gap: var(--s8); }
.integrations__group { text-align: center; }
.integrations__title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); font-weight: 700; margin-bottom: var(--s4); }
.logo-cloud { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: center; }
.logo {
  font-size: 14.5px; font-weight: 600; padding: 11px 20px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
  transition: transform var(--t-fast), color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.logo:hover { transform: translateY(-3px); color: var(--text); border-color: var(--border-strong); background: var(--surface-strong); }
.logo--accent { color: #C4B5FD; border-color: rgba(139,92,246,0.35); background: rgba(139,92,246,0.07); }
.logo--accent:hover { background: rgba(139,92,246,0.14); }

/* ---------- Footer ---------- */
.footer { position: relative; padding: var(--s24) 0 var(--s10); border-top: 1px solid var(--border); overflow: hidden; }
.footer__glow {
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 700px; height: 400px; background: radial-gradient(ellipse, rgba(139,92,246,0.18), transparent 70%);
  filter: blur(40px); pointer-events: none;
}
.footer__inner { position: relative; z-index: 2; text-align: center; }
.footer__brandline { font-size: clamp(26px, 3vw, 40px); font-weight: 800; letter-spacing: -0.02em; }
.footer__title { font-size: clamp(30px, 4vw, 52px); font-weight: 800; letter-spacing: -0.02em; margin-top: var(--s3); }
.footer__sub { color: var(--text-dim); margin-top: var(--s3); font-size: 16px; }
.footer__cta { display: flex; gap: var(--s4); justify-content: center; margin-top: var(--s8); flex-wrap: wrap; }
.footer__meta {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s4);
  margin-top: var(--s16); padding-top: var(--s6); border-top: 1px solid var(--border);
  font-size: 13.5px; color: var(--text-faint);
}
.footer__nav { display: flex; gap: var(--s5); }
.footer__nav a:hover { color: var(--text); }

/* ---------- Reveal animation (scroll-reveal) ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
.reveal.d5 { transition-delay: 0.40s; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .hero__grid { grid-template-columns: 1fr; gap: var(--s10); }
  .hero__diagram { max-width: 500px; }
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__gh { display: none; }
  .nav__burger { display: flex; margin-left: auto; }
  .nav.open .nav__links {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(11,18,32,0.96); backdrop-filter: blur(14px); padding: var(--s5) var(--s6);
    margin: 0; border-bottom: 1px solid var(--border); gap: var(--s4);
  }
  .nav.open .nav__cta { display: inline-flex; position: absolute; top: calc(100% + 180px); right: var(--s6); }
  .nav.open .nav__gh { display: inline-flex; position: absolute; top: calc(100% + 180px); right: calc(var(--s6) + 110px); }
}
@media (max-width: 640px) {
  .container { padding: 0 var(--s4); }
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .builder { grid-template-columns: 1fr; }
  .builder__arrow { transform: rotate(90deg); }
  .section { padding: var(--s16) 0; }
  .section__head { margin-bottom: var(--s10); }
  .arch { padding: var(--s5); }
  .footer__meta { flex-direction: column; text-align: center; }
  .sem-step { font-size: 12px; padding: 8px 12px; }
}

/* ---------- Demo modal ---------- */
.modal {
  border: none; padding: 0; background: transparent;
  width: 100%; height: 100dvh; max-width: none;
  color: var(--text);
  display: none;
}
.modal[open] {
  display: grid; place-items: center;
}
.modal::backdrop {
  background: rgba(4,8,16,0.66);
  backdrop-filter: blur(6px);
}
.modal__card {
  position: relative;
  overflow: hidden;
  width: min(460px, 100%);
  margin: 16px;
  background: linear-gradient(180deg, rgba(23,32,52,0.94), rgba(13,20,34,0.97));
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(139,92,246,0.12);
  padding: var(--s8);
  backdrop-filter: blur(18px);
  animation: modalIn var(--t) ease;
}
.modal__card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6);
  background-size: 200% 100%;
  animation: gradShift 4s linear infinite;
}
@keyframes gradShift { to { background-position: 200% 0; } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal__close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  color: var(--text-dim); font-size: 22px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
}
.modal__close:hover {
  color: var(--text); border-color: rgba(139,92,246,0.5);
  background: rgba(139,92,246,0.12);
}
.modal__brand {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.3);
  margin-bottom: 14px;
  box-shadow: 0 6px 20px rgba(139,92,246,0.18);
}
.modal__brand-icon { width: 24px; height: 24px; }
.modal__head { margin-bottom: var(--s6); }
.modal__title { font-size: 22px; font-weight: 700; margin: 8px 0 6px; letter-spacing: -0.01em; }
.modal__sub { color: var(--text-dim); font-size: 14px; line-height: 1.6; }

.modal__form { display: flex; flex-direction: column; gap: var(--s4); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13.5px; font-weight: 500; color: var(--text); }
.form-input {
  width: 100%; padding: 11px 13px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  color: var(--text); font-size: 15px; font-family: var(--font);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-input::placeholder { color: rgba(148,163,184,0.55); }
.form-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.18);
}
.field--invalid .form-input {
  border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.16);
}
.field__err { font-size: 12px; color: #f87171; min-height: 14px; line-height: 1.3; }
.modal__hint { font-size: 12px; color: var(--text-dim); text-align: center; margin-top: 2px; }

/* submit button loading state */
.modal__form .btn--block { gap: 8px; }
.btn__spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  display: none;
  animation: spin 0.7s linear infinite;
}
.btn--loading .btn__spinner { display: inline-block; }
.btn--loading .btn__label { opacity: 0.75; }
.btn--loading { pointer-events: none; filter: saturate(0.9); }
@keyframes spin { to { transform: rotate(360deg); } }

.modal__success { text-align: center; padding: var(--s4) 0 var(--s1); }
.modal__success-icon {
  width: 56px; height: 56px; margin: 0 auto var(--s4);
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px; color: #fff;
  background: linear-gradient(135deg, #10b981, #3b82f6);
  box-shadow: 0 10px 30px rgba(16,185,129,0.35);
}
.modal__success .btn--block { margin-top: var(--s5); }

/* entrance animations */
.modal__success:not([hidden]) { animation: successIn var(--t) ease both; }
@keyframes successIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal__success-icon { animation: iconPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes iconPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.field--shake { animation: shake 0.4s ease; }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

/* ---------- Trust / Open Source screen ---------- */
.trust__title { letter-spacing: -0.02em; }
.trust__desc {
  max-width: 720px; margin: var(--s4) auto 0; text-align: center;
  font-size: 15.5px; color: var(--text-dim); line-height: 1.7;
}

/* Signal cards */
.trust__grid { margin-top: var(--s8); }
.trust__card-icon {
  background: var(--grad-soft, rgba(139,92,246,0.12));
  border-color: rgba(139,92,246,0.3); color: #c4b5fd;
}
.trust__card-icon svg { width: 26px; height: 26px; }
.trust__list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: var(--s2); }
.trust__list li {
  position: relative; padding-left: 20px; font-size: 13.5px; color: var(--text-dim);
}
.trust__list li::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 10px; height: 6px; border-left: 2px solid #6EE7B7;
  border-bottom: 2px solid #6EE7B7; transform: rotate(-45deg);
}

/* Bottom statement + CTA */
.trust__statement {
  margin-top: var(--s16); text-align: center;
  font-size: clamp(28px, 5vw, 48px); font-weight: 800; letter-spacing: -0.02em;
}
.trust__cta {
  display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: center;
  margin-top: var(--s8);
}
.trust__cta .btn__icon { width: 18px; height: 18px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
avior: auto; }
}
