/* Ollagraph — premium AI infrastructure design system */

:root {
  --bg: #050507;
  --bg-1: #0a0a0d;
  --surface: #0c0c11;
  --surface-2: #11111a;
  --card: #14141d;
  --card-2: #181822;
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.18);

  --text: #f3f3f5;
  --text-muted: #9a9aa3;
  --text-dim: #56565f;
  --text-faint: #36363c;

  --accent: #c7f751;
  --accent-glow: rgba(199, 247, 81, 0.18);
  --accent-ink: #0b0e02;

  --cyan: #5eead4;
  --violet: #a78bfa;
  --blue: #60a5fa;
  --amber: #fbbf24;
  --rose: #fb7185;
  --green: #34d399;
  --red: #f87171;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --font-display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body { min-height: 100vh; overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }

/* ─── Background grain + grid ─── */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  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: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}
.bg-noise {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.4;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ─── Typography ─── */
.h-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  font-weight: 500;
}
.h-display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.h-1 { font-size: clamp(44px, 6.4vw, 88px); }
.h-2 { font-size: clamp(36px, 4.6vw, 60px); }
.h-3 { font-size: clamp(24px, 2.6vw, 36px); }
.text-mono { font-family: var(--font-mono); font-feature-settings: "zero", "ss01"; }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }

/* ─── Layout ─── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}
.container-wide { max-width: 1440px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }

/* ─── Nav ─── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  background: rgba(5, 5, 7, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  height: 64px;
  display: flex; align-items: center; gap: 32px;
}
.nav-logo {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.nav-logo svg { width: 22px; height: 22px; }
.nav-links {
  display: flex; align-items: center; gap: 4px;
  font-size: 13.5px;
  color: var(--text-muted);
  flex: 1;
}
.nav-link {
  padding: 7px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-link.active { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 8px; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
  position: relative;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 0 0 1px rgba(199,247,81,0.5), 0 8px 24px -8px var(--accent-glow);
}
.btn-primary:hover { background: #d6ff61; transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 0 0 1px rgba(199,247,81,0.6), 0 12px 28px -8px var(--accent-glow); }
.btn-secondary {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); border-color: var(--border-strong); }
.btn-ghost { color: var(--text-muted); padding: 0 12px; }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.btn-lg { height: 44px; padding: 0 22px; font-size: 14.5px; border-radius: 9px; }

/* ─── Pills / Badges ─── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-2);
  font-size: 12px;
  color: var(--text-muted);
}
.pill-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.pill-accent { background: var(--accent-glow); border-color: rgba(199,247,81,0.32); color: #e7ffa6; }

.badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 5px;
  display: inline-flex; align-items: center; gap: 5px;
}
.badge-green { background: rgba(52,211,153,0.1); color: var(--green); border: 1px solid rgba(52,211,153,0.22); }
.badge-amber { background: rgba(251,191,36,0.1); color: var(--amber); border: 1px solid rgba(251,191,36,0.22); }
.badge-red { background: rgba(248,113,113,0.1); color: var(--red); border: 1px solid rgba(248,113,113,0.22); }
.badge-violet { background: rgba(167,139,250,0.1); color: var(--violet); border: 1px solid rgba(167,139,250,0.22); }
.badge-cyan { background: rgba(94,234,212,0.1); color: var(--cyan); border: 1px solid rgba(94,234,212,0.22); }
.badge-mute { background: rgba(255,255,255,0.04); color: var(--text-muted); border: 1px solid var(--border-2); }

/* ─── Cards / Surfaces ─── */
.card {
  background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.surface { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  margin-top: 96px;
  position: relative;
  z-index: 1;
}
.footer-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 48px; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin: 0 0 18px; font-weight: 500; }
.footer-col a { display: block; color: var(--text-muted); font-size: 13.5px; padding: 5px 0; transition: color 0.15s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-dim); }

/* ─── Animation primitives ─── */
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: 0; } }
@keyframes scan { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }

.fade-up { animation: fade-up 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

/* ─── Hero / glow ─── */
.hero-glow {
  position: absolute;
  width: 900px; height: 600px;
  background: radial-gradient(ellipse at center, rgba(199,247,81,0.18) 0%, rgba(199,247,81,0.04) 35%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  top: -200px; left: 50%; transform: translateX(-50%);
  z-index: 0;
}

/* ─── Code block ─── */
.code-block {
  background: #08080c;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  overflow: hidden;
}
.code-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  font-size: 12px;
  color: var(--text-muted);
}
.code-body { padding: 18px 20px; overflow-x: auto; }
.tok-key { color: #e879f9; }
.tok-str { color: #c7f751; }
.tok-fn { color: #5eead4; }
.tok-num { color: #fbbf24; }
.tok-com { color: #56565f; font-style: italic; }
.tok-kw { color: #a78bfa; }
.tok-prop { color: #93c5fd; }
.tok-flag { color: #fb7185; }

/* ─── Section helpers ─── */
.section { padding: 96px 0; position: relative; }
.section-tight { padding: 64px 0; position: relative; }
.divider-x { height: 1px; background: var(--border); margin: 0; }

/* mini chart helpers */
.spark-bar { width: 3px; background: var(--text-faint); border-radius: 1px; }

/* shimmer animation for live data */
.live-shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(199,247,81,0.4) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2.4s infinite;
}

/* utility */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; } .gap-8 { gap: 32px; }
.grid { display: grid; }
.w-full { width: 100%; }
.text-sm { font-size: 13px; } .text-xs { font-size: 12px; }
.font-mono { font-family: var(--font-mono); }
.tabular { font-variant-numeric: tabular-nums; }
.ml-auto { margin-left: auto; }
