/* ================================================================
   LynkMesh Opt — Premium Static Landing Page
   Dark Theme · Glassmorphism · Neon Glow · Particle Background
   ================================================================ */

:root {
  --bg: #0b1220;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e2e8f0;
  --muted: #64748b;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --violet: #8b5cf6;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #eab308;
  --radius: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(59,130,246,0.3); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 3px; }

/* ================================================================
   UTILITIES
   ================================================================ */

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-gradient {
  background: linear-gradient(135deg, var(--blue), var(--cyan), var(--violet));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.glass {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
}
.section { padding: 120px 0; position: relative; }

/* ================================================================
   PARTICLES CANVAS
   ================================================================ */

#particles {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

/* ================================================================
   NAVBAR
   ================================================================ */

.nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  padding: 0 24px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background var(--transition), border-color var(--transition);
}
.nav.scrolled {
  background: rgba(11,18,32,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.nav-logo-text { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color var(--transition); }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: 8px 18px; border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: var(--text); text-decoration: none;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  transition: all var(--transition);
  border: 1px solid rgba(255,255,255,0.1);
}
.nav-cta:hover { background: rgba(255,255,255,0.15); }
@media (max-width: 768px) { .nav-links { display: none; } }

/* ================================================================
   HERO
   ================================================================ */

.hero {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; text-align: center;
  position: relative; z-index: 1; padding-top: 64px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 100px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  color: var(--blue); font-size: 13px; font-weight: 500;
  margin-bottom: 28px;
}
.hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:0.4} }

.hero h1 {
  font-size: clamp(42px, 8vw, 88px); font-weight: 800;
  line-height: 1.04; letter-spacing: -0.03em; margin-bottom: 20px;
}
.hero p {
  font-size: 18px; color: var(--muted); max-width: 560px;
  margin: 0 auto 40px; line-height: 1.7;
}
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 14px;
  font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: all var(--transition);
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff; box-shadow: 0 8px 32px rgba(59,130,246,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(59,130,246,0.4); }
.btn-ghost {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.hero-stats {
  display: flex; gap: 48px; justify-content: center;
  margin-top: 64px; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .val { font-size: 32px; font-weight: 800; color: var(--text); }
.hero-stat .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-top: 4px; }

/* ================================================================
   DEMO SECTION
   ================================================================ */

#demo { position: relative; z-index: 1; }
.demo-container {
  max-width: 960px; margin: 0 auto;
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px; padding: 48px;
  box-shadow: 0 0 60px rgba(59,130,246,0.08);
}
.demo-tabs { display: flex; gap: 8px; margin-bottom: 32px; justify-content: center; flex-wrap: wrap; }
.demo-tab {
  padding: 8px 18px; border-radius: 100px;
  font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--muted); cursor: pointer;
  transition: all var(--transition);
}
.demo-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.demo-tab:hover:not(.active) { background: rgba(255,255,255,0.08); color: var(--text); }

.demo-stage {
  min-height: 360px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.demo-panel { display: none; width: 100%; }
.demo-panel.active { display: block; }

/* Demo step 1 — YAML */
.yaml-block {
  background: rgba(0,0,0,0.4); border: 1px solid rgba(6,182,212,0.2);
  border-radius: 14px; padding: 28px; overflow-x: auto;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13px; line-height: 1.7; color: #67e8f9;
  max-width: 520px; margin: 0 auto;
}
.yaml-block .key { color: #93c5fd; }
.yaml-block .val { color: #67e8f9; }
.yaml-block .comment { color: #475569; }

/* Compiler pipeline */
.pipeline {
  display: flex; align-items: center; justify-content: center;
  gap: 0; flex-wrap: wrap; padding: 20px 0;
}
.pipe-node {
  width: 100px; height: 80px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  gap: 6px; transition: all 0.5s;
  font-size: 11px; font-weight: 600; color: var(--muted);
}
.pipe-node.active {
  border-color: var(--blue);
  box-shadow: 0 0 30px rgba(59,130,246,0.3);
  color: #fff; background: rgba(59,130,246,0.1);
}
.pipe-arrow {
  width: 36px; height: 2px;
  background: linear-gradient(90deg, rgba(59,130,246,0.4), rgba(6,182,212,0.4));
  margin: 0 4px; border-radius: 1px;
}
.pipe-arrow .flow {
  width: 8px; height: 100%; background: var(--cyan);
  border-radius: 1px; animation: flow 1.5s infinite;
}
@keyframes flow {
  0% { transform: translateX(-100%); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateX(500%); opacity: 0; }
}

/* Optimization cards grid */
.opt-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; max-width: 700px; margin: 0 auto;
}
.opt-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 16px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500;
  opacity: 0; transform: translateY(10px);
  transition: all 0.4s;
}
.opt-card.visible { opacity: 1; transform: translateY(0); }
.opt-card .check {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(34,197,94,0.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--green); font-size: 14px;
}

/* Before vs After */
.compare-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  max-width: 700px; margin: 0 auto;
}
@media (max-width: 600px) { .compare-grid { grid-template-columns: 1fr; } }
.compare-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 24px;
}
.compare-card h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.compare-card.before h4 { color: var(--muted); }
.compare-card.after { border-color: rgba(34,197,94,0.2); box-shadow: 0 0 30px rgba(34,197,94,0.08); }
.compare-card.after h4 { color: var(--green); }
.metric-row { margin-bottom: 14px; }
.metric-row .mr-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: flex; justify-content: space-between; }
.metric-row .mr-val { font-size: 14px; font-weight: 700; font-family: 'SF Mono', monospace; }
.bar-track { height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; transition: width 1.5s ease; }
.bar-fill.before-bar { background: #475569; }
.bar-fill.after-bar { background: linear-gradient(90deg, var(--green), #4ade80); }

/* ================================================================
   FEATURES
   ================================================================ */

.section-title { text-align: center; margin-bottom: 64px; }
.section-title h2 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.section-title p { color: var(--muted); font-size: 16px; max-width: 500px; margin: 0 auto; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.feature-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius); padding: 28px;
  transition: all var(--transition); cursor: default;
}
.feature-card:hover {
  background: rgba(255,255,255,0.06);
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.12);
}
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; font-size: 20px;
}
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ================================================================
   ARCHITECTURE
   ================================================================ */

.arch-flow { max-width: 500px; margin: 0 auto; }
.arch-layer {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; margin-bottom: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; transition: all var(--transition);
}
.arch-layer:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }
.arch-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.arch-info h4 { font-size: 14px; font-weight: 600; }
.arch-info span { font-size: 11px; color: var(--muted); }
.arch-connector {
  width: 2px; height: 16px; background: rgba(59,130,246,0.3);
  margin-left: 36px; border-radius: 1px;
}

/* ================================================================
   CLI
   ================================================================ */

.terminal {
  max-width: 620px; margin: 0 auto;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; overflow: hidden;
}
.terminal-header {
  padding: 12px 16px; background: rgba(255,255,255,0.03);
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-body { padding: 20px; }
.terminal-line {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px; margin-bottom: 10px; display: flex; gap: 8px;
}
.terminal-prompt { color: var(--green); flex-shrink: 0; }
.terminal-cmd { color: var(--text); }
.terminal-out { color: var(--muted); font-size: 12px; margin-left: 20px; margin-bottom: 10px; }
.terminal-cursor {
  display: inline-block; width: 8px; height: 16px; background: var(--blue);
  animation: blink 1s infinite; vertical-align: text-bottom;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ================================================================
   PROVIDERS
   ================================================================ */

.providers-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.provider-badge {
  padding: 12px 24px; border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 13px; font-weight: 600;
  transition: all var(--transition);
}
.provider-badge:hover { transform: translateY(-2px); }
.provider-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; }

/* ================================================================
   METRICS
   ================================================================ */

.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.metric-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius); padding: 36px 24px; text-align: center;
  transition: all var(--transition);
}
.metric-card:hover { background: rgba(255,255,255,0.06); }
.metric-val { font-size: 48px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.metric-lbl { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

/* ================================================================
   OPEN SOURCE
   ================================================================ */

.oss-card {
  max-width: 500px; margin: 0 auto; text-align: center;
  padding: 56px 40px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 0 60px rgba(59,130,246,0.06);
}
.oss-card .gh-icon { font-size: 48px; margin-bottom: 20px; }

/* ================================================================
   FOOTER
   ================================================================ */

.footer {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 32px 0; text-align: center;
  font-size: 13px; color: var(--muted);
}

/* ================================================================
   SCROLL REVEAL
   ================================================================ */

.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.4,0,0.2,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 768px) {
  .section { padding: 80px 0; }
  .demo-container { padding: 24px; border-radius: 16px; }
  .hero h1 { font-size: 36px; }
  .hero-stats { gap: 24px; }
  .pipeline { gap: 0; }
  .pipe-node { width: 70px; height: 60px; font-size: 10px; }
  .pipe-arrow { width: 20px; }
}
