/* ========================================
   tsink - Static Showcase Website (Light)
   Color palette from logo.svg:
     Primary:  #ff6b35 (warm orange)
     Secondary: #f7931e (golden orange)
     Dark text: #2c3e50 / #34495e (blue-gray)
   ======================================== */

:root {
  --bg: #ffffff;
  --bg-subtle: #f8f9fb;
  --bg-card: #ffffff;
  --bg-card-hover: #fefefe;
  --border: #e8e8ee;
  --border-light: #d4d4dd;
  --text: #2c3e50;
  --text-muted: #5a6a7a;
  --text-dim: #8895a4;
  --primary: #ff6b35;
  --primary-light: #ff8a5c;
  --primary-dark: #e55a25;
  --accent: #f7931e;
  --accent-light: #f9a94b;
  --green: #27ae60;
  --yellow: #f39c12;
  --red: #e74c3c;
  --cyan: #2980b9;
  --purple: #8e44ad;
  --navy: #2c3e50;
  --navy-light: #34495e;
  --code-bg: #1e2a38;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(44, 62, 80, 0.08);
  --shadow-md: 0 4px 24px rgba(44, 62, 80, 0.1);
  --shadow-lg: 0 8px 40px rgba(44, 62, 80, 0.12);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 8px rgba(44, 62, 80, 0.06);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: 0.2s;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: var(--bg-subtle);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(255, 107, 53, 0.04);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 160px 0 60px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 107, 53, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 107, 53, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 20%, transparent 70%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
}

.glow-1 {
  width: 600px;
  height: 600px;
  background: var(--primary);
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.07;
}

.glow-2 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  top: 100px;
  right: -100px;
  opacity: 0.05;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(255, 107, 53, 0.08);
  border: 1px solid rgba(255, 107, 53, 0.2);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.badge-release {
  color: var(--green);
  background: rgba(39, 174, 96, 0.08);
  border-color: rgba(39, 174, 96, 0.25);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--navy);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 660px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

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

.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  padding: 20px 36px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
  font-family: var(--mono);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* Hero Code Preview */
.hero-code-preview {
  margin-top: 56px;
  position: relative;
  z-index: 1;
}

/* ===== Code Window ===== */
.code-window {
  background: var(--code-bg);
  border: 1px solid #2a3a4e;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.code-window-sm pre {
  padding: 16px 20px;
}

.code-titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.code-filename {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #6a7b8e;
}

.code-window pre {
  padding: 20px 24px;
  overflow-x: auto;
  line-height: 1.65;
}

.code-window code {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: #c4cdd8;
}

/* Syntax highlighting (dark code blocks) */
.kw { color: #e07a5f; }
.fn { color: #61afef; }
.ty { color: #e5c07b; }
.str { color: #98c379; }
.num { color: #d19a66; }
.comment { color: #5c6a78; font-style: italic; }
.macro { color: #56b6c2; }

/* ===== Sections Common ===== */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
  color: var(--navy);
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-muted);
}

.section-header p code {
  font-family: var(--mono);
  font-size: 0.9rem;
  background: rgba(255, 107, 53, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--primary-dark);
}

/* ===== What's New / Changelog ===== */
.whats-new {
  padding: 80px 0;
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg) 100%);
}

.changelog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.changelog-item {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s;
}

.changelog-item:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.changelog-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.changelog-icon svg {
  width: 22px;
  height: 22px;
}

.changelog-icon-engine { background: rgba(255, 107, 53, 0.1); color: var(--primary); }
.changelog-icon-promql { background: rgba(142, 68, 173, 0.1); color: var(--purple); }
.changelog-icon-types { background: rgba(41, 128, 185, 0.1); color: var(--cyan); }
.changelog-icon-async { background: rgba(247, 147, 30, 0.1); color: var(--accent); }
.changelog-icon-limits { background: rgba(39, 174, 96, 0.1); color: var(--green); }
.changelog-icon-wal { background: rgba(44, 62, 80, 0.08); color: var(--navy); }

.changelog-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--navy);
}

.changelog-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.changelog-item code {
  font-family: var(--mono);
  font-size: 0.8rem;
  background: rgba(255, 107, 53, 0.07);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--primary-dark);
}

/* ===== Features ===== */
.features {
  padding: 100px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s;
}

.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.icon-compression { background: rgba(255, 107, 53, 0.1); color: var(--primary); }
.icon-thread { background: rgba(247, 147, 30, 0.1); color: var(--accent); }
.icon-disk { background: rgba(41, 128, 185, 0.1); color: var(--cyan); }
.icon-wal { background: rgba(39, 174, 96, 0.1); color: var(--green); }
.icon-label { background: rgba(255, 107, 53, 0.1); color: var(--primary); }
.icon-cloud { background: rgba(247, 147, 30, 0.1); color: var(--accent); }
.icon-query { background: rgba(44, 62, 80, 0.08); color: var(--navy); }
.icon-partition { background: rgba(41, 128, 185, 0.1); color: var(--cyan); }
.icon-lsm { background: rgba(142, 68, 173, 0.1); color: var(--purple); }
.icon-promql { background: rgba(142, 68, 173, 0.1); color: var(--purple); }
.icon-types { background: rgba(41, 128, 185, 0.1); color: var(--cyan); }
.icon-async { background: rgba(247, 147, 30, 0.1); color: var(--accent); }
.icon-server { background: rgba(255, 107, 53, 0.1); color: var(--primary); }
.icon-limits { background: rgba(39, 174, 96, 0.1); color: var(--green); }

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.feature-card code {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: rgba(255, 107, 53, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--primary-dark);
}

/* ===== Performance ===== */
.performance {
  padding: 100px 0;
  background: var(--bg-subtle);
}

.bench-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.bench-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.3s;
}

.bench-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}

.bench-card-highlight {
  border-color: rgba(255, 107, 53, 0.3);
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.03), rgba(247, 147, 30, 0.03));
}

.bench-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.bench-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.bench-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 107, 53, 0.08);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-special {
  background: rgba(247, 147, 30, 0.1);
  color: var(--accent);
}

.bench-value {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--mono);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--navy);
}

.bench-unit {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
}

.bench-bar {
  height: 4px;
  background: rgba(44, 62, 80, 0.06);
  border-radius: 2px;
  margin-bottom: 12px;
  overflow: hidden;
}

.bench-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 2px;
  transition: width 1s ease;
}

.bench-fill-special {
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.bench-detail {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ===== Usage ===== */
.usage {
  padding: 100px 0;
}

.install-block {
  max-width: 540px;
  margin: 0 auto 48px;
}

.install-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

/* Tabs */
.examples-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 6px 6px 0;
  overflow-x: auto;
}

.tab {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab:hover {
  color: var(--primary);
  background: rgba(255, 107, 53, 0.04);
}

.tab.active {
  color: #e8e8ee;
  background: var(--code-bg);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-content .code-window {
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ===== PromQL Section ===== */
.promql-section {
  padding: 100px 0;
  background: var(--bg-subtle);
}

.promql-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.promql-category {
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s;
}

.promql-category:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow);
}

.promql-category-wide {
  grid-column: 1 / -1;
}

.promql-category h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.promql-funcs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.promql-funcs code {
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(142, 68, 173, 0.08);
  color: var(--purple);
  font-weight: 500;
}

.promql-note {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.promql-note code {
  font-family: var(--mono);
  font-size: 0.78rem;
  background: rgba(142, 68, 173, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--purple);
}

/* ===== Server Section ===== */
.server-section {
  padding: 100px 0;
}

.server-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.server-left .code-window {
  height: 100%;
}

.server-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.server-endpoints {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.server-endpoints h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.endpoint-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.endpoint-method {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 56px;
  text-align: center;
}

.endpoint-method.get {
  background: rgba(39, 174, 96, 0.1);
  color: var(--green);
}

.endpoint-method.post {
  background: rgba(41, 128, 185, 0.1);
  color: var(--cyan);
}

.endpoint-method.both {
  background: rgba(247, 147, 30, 0.1);
  color: var(--accent);
}

.endpoint code {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--navy);
  white-space: nowrap;
}

.endpoint-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-left: auto;
  white-space: nowrap;
}

.server-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.server-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.server-feature svg {
  color: var(--green);
  flex-shrink: 0;
}

.prometheus-config {
  max-width: 540px;
  margin: 0 auto;
}

.prometheus-config h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}

/* ===== Architecture ===== */
.architecture {
  padding: 100px 0;
  background: var(--bg-subtle);
}

.arch-diagram {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
}

.arch-arrow {
  color: var(--text-dim);
  padding: 8px 0;
}

.arch-layer {
  width: 100%;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.arch-layer-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.arch-layer-app { background: rgba(255, 107, 53, 0.03); border-color: rgba(255, 107, 53, 0.2); }
.arch-layer-app .arch-layer-label { color: var(--primary); }

.arch-layer-engine { background: rgba(247, 147, 30, 0.03); border-color: rgba(247, 147, 30, 0.2); }
.arch-layer-engine .arch-layer-label { color: var(--accent); }

.arch-layer-partition { background: rgba(41, 128, 185, 0.03); border-color: rgba(41, 128, 185, 0.2); }
.arch-layer-partition .arch-layer-label { color: var(--cyan); }

.arch-layer-durability { background: rgba(39, 174, 96, 0.03); border-color: rgba(39, 174, 96, 0.2); }
.arch-layer-durability .arch-layer-label { color: var(--green); }

.arch-boxes {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.arch-box {
  flex: 1;
  min-width: 120px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-muted);
  box-shadow: var(--shadow);
}

.arch-box code {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--navy);
}

.arch-box small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 400;
  margin-top: 4px;
}

.arch-box-active { border-color: rgba(39, 174, 96, 0.35); }
.arch-box-buffer { border-color: rgba(247, 147, 30, 0.35); }
.arch-box-disk { border-color: rgba(41, 128, 185, 0.35); }

.arch-details {
  max-width: 760px;
  margin: 32px auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.arch-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.arch-detail-item strong {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
}

.arch-detail-item span {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.45;
}

/* ===== Compression Section ===== */
.compression-section {
  padding: 100px 0;
}

.codec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
}

.codec-group {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.codec-group h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.codec-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.codec-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.codec-item:hover {
  background: var(--bg-subtle);
}

.codec-item code {
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 107, 53, 0.07);
  color: var(--primary-dark);
  white-space: nowrap;
  font-weight: 500;
}

.codec-item span {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ===== API Reference ===== */
.api-reference {
  padding: 100px 0;
  background: var(--bg-subtle);
}

.api-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.api-category {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  border-left: 3px solid var(--border);
  transition: all 0.3s;
}

.api-category:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}

.api-category:first-child {
  grid-column: 1 / -1;
}

.api-category-primary { border-left-color: var(--primary); }
.api-category-primary:hover { border-left-color: var(--primary); }
.api-category-accent { border-left-color: var(--accent); }
.api-category-accent:hover { border-left-color: var(--accent); }
.api-category-cyan { border-left-color: var(--cyan); }
.api-category-cyan:hover { border-left-color: var(--cyan); }
.api-category-green { border-left-color: var(--green); }
.api-category-green:hover { border-left-color: var(--green); }
.api-category-navy { border-left-color: var(--navy-light); }
.api-category-navy:hover { border-left-color: var(--navy-light); }
.api-category-purple { border-left-color: var(--purple); }
.api-category-purple:hover { border-left-color: var(--purple); }

.api-category-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.api-category-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.api-category-icon svg {
  width: 20px;
  height: 20px;
}

.api-category-primary .api-category-icon { background: rgba(255, 107, 53, 0.1); color: var(--primary); }
.api-category-accent .api-category-icon { background: rgba(247, 147, 30, 0.1); color: var(--accent); }
.api-category-cyan .api-category-icon { background: rgba(41, 128, 185, 0.1); color: var(--cyan); }
.api-category-green .api-category-icon { background: rgba(39, 174, 96, 0.1); color: var(--green); }
.api-category-navy .api-category-icon { background: rgba(44, 62, 80, 0.08); color: var(--navy); }
.api-category-purple .api-category-icon { background: rgba(142, 68, 173, 0.1); color: var(--purple); }

.api-category-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.api-category-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-dim);
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.api-category-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.api-category-desc code {
  font-family: var(--mono);
  font-size: 0.8rem;
  background: rgba(255, 107, 53, 0.07);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--primary-dark);
}

.api-items {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.api-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.api-item:hover {
  background: var(--bg-subtle);
}

.api-sig {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--navy);
  line-height: 1.5;
  word-break: break-word;
}

.api-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Full-width Storage trait: items in grid when wide */
.api-category:first-child .api-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

@media (max-width: 768px) {
  .api-grid {
    grid-template-columns: 1fr;
  }

  .api-category:first-child .api-items {
    grid-template-columns: 1fr;
  }

  .api-sig {
    font-size: 0.75rem;
  }
}

/* ===== Config Table ===== */
.config {
  padding: 100px 0;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
}

thead {
  background: var(--bg-subtle);
}

th {
  text-align: left;
  padding: 14px 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 14px 20px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--bg-subtle);
}

td code {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: rgba(255, 107, 53, 0.07);
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--primary-dark);
  white-space: nowrap;
}

.default-val {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ===== CTA ===== */
.cta {
  padding: 80px 0;
  background: var(--bg-subtle);
}

.cta-card {
  text-align: center;
  padding: 64px 40px;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.04), rgba(247, 147, 30, 0.04));
  border: 1px solid rgba(255, 107, 53, 0.15);
  border-radius: var(--radius-lg);
}

.cta-card h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--navy);
}

.cta-card p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 28px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Footer ===== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 0;
  }

  .mobile-toggle {
    display: flex;
  }

  .hero {
    padding: 120px 0 40px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
    padding: 20px 24px;
  }

  .stat-divider {
    width: 60px;
    height: 1px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .features-grid,
  .bench-grid {
    grid-template-columns: 1fr;
  }

  .changelog-grid {
    grid-template-columns: 1fr;
  }

  .server-content {
    grid-template-columns: 1fr;
  }

  .promql-grid {
    grid-template-columns: 1fr;
  }

  .codec-grid {
    grid-template-columns: 1fr;
  }

  .arch-boxes {
    flex-direction: column;
  }

  .arch-box {
    min-width: 0;
  }

  .arch-details {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-left {
    flex-direction: column;
    gap: 8px;
  }

  .examples-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    font-size: 0.85rem;
  }

  th, td {
    padding: 10px 14px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .section-header h2 {
    font-size: 1.6rem;
  }

  .bench-value {
    font-size: 1.6rem;
  }

  .code-window code {
    font-size: 0.75rem;
  }

  .endpoint-desc {
    display: none;
  }
}


/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* Selection */
::selection {
  background: rgba(255, 107, 53, 0.2);
  color: var(--navy);
}
