/* ===== FluxDB Landing Page — Warm White Design ===== */

:root {
  --bg:         #fdfcfb;
  --bg-alt:     #f7f5f2;
  --surface:    #ffffff;
  --border:     #ece9e4;
  --border-mid: #d8d2c8;
  --text:       #1a1714;
  --text-2:     #4a4540;
  --text-3:     #7a7268;
  --accent:     #d97c38;
  --accent-2:   #b85c20;
  --accent-glow:#f5a623;
  --blue:       #2563eb;
  --green:      #16a34a;
  --red:        #dc2626;
  --code-bg:    #1c1a17;
  --code-text:  #e8e0d4;
  --radius:     12px;
  --radius-sm:  8px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:     0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.10), 0 4px 16px rgba(0,0,0,0.06);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 252, 251, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.nav-links a:hover { background: var(--bg-alt); color: var(--text); }
.nav-links .nav-gh {
  background: var(--accent);
  color: white;
  padding: 6px 14px;
}
.nav-links .nav-gh:hover { background: var(--accent-2); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
  text-align: center;
}
.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
  pointer-events: none;
}
.hero-glow-left  { background: var(--accent-glow); top: -100px; left: -200px; }
.hero-glow-right { background: #a78bfa; top: -100px; right: -200px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(217, 124, 56, 0.08);
  border: 1px solid rgba(217, 124, 56, 0.2);
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
  letter-spacing: 0.01em;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--text);
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #e84e20 50%, #c23015 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto 48px;
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: inline-flex;
  padding: 0;
  overflow: hidden;
}
.stat {
  padding: 20px 36px;
  text-align: center;
}
.stat-divider { width: 1px; background: var(--border); height: 60px; }
.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat-num span { font-size: 1.2rem; color: var(--accent); }
.stat-label { font-size: 0.78rem; color: var(--text-3); font-weight: 500; margin-top: 4px; }

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 64px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--accent); color: white; box-shadow: 0 2px 8px rgba(217,124,56,0.35); }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border-mid); }
.btn-secondary:hover { background: var(--bg-alt); }

/* ===== Terminal ===== */
.hero-visual { display: flex; justify-content: center; }
.terminal {
  width: 100%;
  max-width: 660px;
  background: var(--code-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(217,124,56,0.08);
  overflow: hidden;
  text-align: left;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #2a2723;
  border-bottom: 1px solid #3a3530;
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }
.terminal-title {
  flex: 1;
  text-align: center;
  color: #7a7268;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
}
.terminal-body {
  padding: 20px 24px 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--code-text);
}
.line { display: block; }
.mt { margin-top: 12px; }
.prompt { color: #febc2e; margin-right: 8px; }
.cmd { color: #a8d8ea; }
.ok { color: #28c840; margin-right: 8px; }
.out { color: #e8e0d4; }
.out-block { color: #e8e0d4; margin-top: 4px; padding: 8px 0; display: block; }
.col { display: inline-block; min-width: 220px; color: #7a7268; }
.val { color: #a8e6cf; }
.dim { color: #5a5248; font-size: 0.8rem; }

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.tag {
  display: inline-block;
  background: rgba(217, 124, 56, 0.08);
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--text);
}
.section-head p {
  font-size: 1.05rem;
  color: var(--text-2);
  max-width: 540px;
  margin: 0 auto;
}

/* ===== Features Grid ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.2s;
}
.feature-card:hover {
  border-color: rgba(217,124,56,0.3);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.feature-icon { font-size: 1.8rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.feature-card p { font-size: 0.88rem; color: var(--text-2); line-height: 1.65; }

/* ===== Architecture ===== */
.arch-diagram {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.arch-arrow { font-size: 1.5rem; color: var(--text-3); margin: 8px 0; }
.arch-layer {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.arch-layer-1 { border-top: 3px solid #2563eb; }
.arch-layer-2 { border-top: 3px solid var(--accent); }
.arch-layer-3 { border-top: 3px solid var(--green); }
.arch-layer-4 { border-top: 3px solid #7c3aed; }
.arch-label { font-size: 0.78rem; font-weight: 700; color: var(--text-3); letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 12px; }
.arch-boxes { display: flex; gap: 12px; flex-wrap: wrap; }
.arch-box {
  flex: 1;
  min-width: 130px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}
.arch-box small { display: block; font-weight: 400; color: var(--text-3); font-size: 0.76rem; margin-top: 2px; font-family: 'JetBrains Mono', monospace; }

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: -1px;
  position: relative;
  z-index: 1;
}
.tab {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--bg-alt);
  color: var(--text-2);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.tab.active {
  background: var(--code-bg);
  color: var(--code-text);
  border-color: var(--code-bg);
}
.tab-panels { border-radius: 0 var(--radius) var(--radius) var(--radius); overflow: hidden; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 28px 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
}
.tab-panel code .c { color: #5a5248; }
.tab-panel code .cmd { color: #a8d8ea; }

/* ===== Benchmarks ===== */
.bench-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.bench-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.bench-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 20px; color: var(--text); }

.bench-bar-wrap { margin-bottom: 14px; }
.bench-name { font-size: 0.8rem; color: var(--text-2); margin-bottom: 4px; font-weight: 500; }
.bench-bar-outer {
  height: 28px;
  background: var(--bg-alt);
  border-radius: 6px;
  overflow: hidden;
}
.bench-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #e84e20 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding-right: 10px;
  justify-content: flex-end;
}
.bench-bar span { font-size: 0.75rem; font-weight: 700; color: white; white-space: nowrap; }
.bench-bar-alt { background: linear-gradient(90deg, #9ca3af 0%, #6b7280 100%); }

.compression-table { font-size: 0.85rem; }
.comp-row { display: grid; grid-template-columns: 1fr 1fr 60px; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.comp-header { font-weight: 700; color: var(--text-3); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; }
.comp-ratio { font-weight: 700; color: var(--green); font-family: 'JetBrains Mono', monospace; }

.latency-list { font-size: 0.88rem; }
.lat-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.lat-row:last-child { border: none; }
.lat-val { font-weight: 700; color: var(--accent); font-family: 'JetBrains Mono', monospace; }

/* ===== FluxQL Examples ===== */
.fluxql-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.fluxql-example {
  background: var(--code-bg);
  border-radius: var(--radius);
  overflow: hidden;
}
.example-label {
  background: #2a2723;
  padding: 10px 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #7a7268;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid #3a3530;
}
.fluxql-example pre {
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--code-text);
  line-height: 1.7;
  overflow-x: auto;
}

/* ===== API Table ===== */
.api-table { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.api-row { display: grid; grid-template-columns: 80px 180px 1fr; padding: 14px 20px; border-bottom: 1px solid var(--border); align-items: center; font-size: 0.88rem; }
.api-row:last-child { border-bottom: none; }
.api-header { background: var(--bg-alt); font-weight: 700; font-size: 0.76rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.method { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; display: inline-block; }
.post { background: rgba(37,99,235,0.08); color: var(--blue); }
.get  { background: rgba(22,163,74,0.08); color: var(--green); }
.endpoint { font-family: 'JetBrains Mono', monospace; color: var(--accent-2); font-size: 0.85rem; }

/* ===== Comparison Table ===== */
.compare-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.compare-table th, .compare-table td { padding: 12px 16px; text-align: center; border-bottom: 1px solid var(--border); }
.compare-table th { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); background: var(--surface); padding: 16px; }
.compare-table th:first-child, .compare-table td:first-child { text-align: left; }
.compare-table tr:last-child td { border-bottom: none; }
.highlight-col { background: rgba(217,124,56,0.04) !important; font-weight: 600; }
.compare-table th.highlight-col { color: var(--accent-2); }

/* ===== Author ===== */
.author-section { background: var(--bg); }
.author-card {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}
.author-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 800; color: white;
  flex-shrink: 0;
}
.author-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.author-bio { font-size: 0.92rem; color: var(--text-2); line-height: 1.7; margin-bottom: 16px; }
.author-links { display: flex; gap: 12px; }
.author-links a {
  color: var(--accent-2);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(217,124,56,0.3);
  padding-bottom: 1px;
}
.author-links a:hover { border-color: var(--accent); }

/* ===== Footer ===== */
.footer {
  background: var(--code-bg);
  color: #7a7268;
  padding: 32px 0;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--code-text); font-size: 0.95rem; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: #7a7268; text-decoration: none; font-size: 0.88rem; transition: color 0.15s; }
.footer-links a:hover { color: var(--code-text); }
.footer-copy { font-size: 0.82rem; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .features-grid  { grid-template-columns: repeat(2, 1fr); }
  .bench-grid     { grid-template-columns: 1fr; }
  .fluxql-grid    { grid-template-columns: 1fr; }
  .hero-stats     { flex-wrap: wrap; }
  .nav-links      { display: none; }
}

@media (max-width: 600px) {
  .features-grid  { grid-template-columns: 1fr; }
  .hero-title     { font-size: 2rem; }
  .hero-sub       { font-size: 1rem; }
  .author-card    { flex-direction: column; padding: 24px; }
  .footer-inner   { flex-direction: column; gap: 16px; text-align: center; }
  .arch-boxes     { flex-direction: column; }
}
