:root {
  --bg: #0a0a0f;
  --bg-elevated: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --border: #222233;
  --border-light: #2a2a3d;
  --text: #e8e8f0;
  --text-muted: #8888a0;
  --text-dim: #555570;
  --accent: #3B82F6;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --accent-bright: #60a5fa;
  --ts-purple: #6366f1;
  --ts-gradient: linear-gradient(135deg, #3B82F6, #6366f1);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

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

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

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

a { color: var(--accent-bright); text-decoration: none; transition: color 0.2s; }
a:hover { color: #93bbfc; }

/* ─── NAV ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.5px;
  color: var(--text) !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  color: var(--accent);
  font-size: 20px;
}

.logo-ts {
  color: var(--accent-bright);
  font-weight: 600;
  font-size: 0.85em;
}

.logo-sep {
  color: var(--text-dim);
  font-weight: 400;
  margin: 0 1px;
}

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

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.15s !important;
}

.nav-cta:hover {
  background: #2563eb !important;
  transform: translateY(-1px);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: var(--font);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background: #2563eb;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4);
}

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

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

.btn-lg { padding: 16px 36px; font-size: 17px; }

/* ─── HERO ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-bg-mesh {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-glow);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 999px;
  padding: 6px 16px 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-bright);
  margin-bottom: 28px;
  animation: fadeUp 0.8s ease both;
}

.hero h1 {
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  animation: fadeUp 0.8s ease 0.1s both;
}

.gradient-text {
  background: var(--ts-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
  animation: fadeUp 0.8s ease 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 60px;
  animation: fadeUp 0.8s ease 0.3s both;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  animation: fadeUp 0.8s ease 0.4s both;
}

.stat { text-align: center; }

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--text);
}

.stat-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

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

/* ─── SECTION TAGS ─── */
.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ─── TAILSCALE BANNER ─── */
.tailscale-banner {
  padding: 120px 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ts-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 72px;
  align-items: start;
}

.ts-left h2 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.ts-highlight {
  background: var(--ts-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ts-left p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
}

.ts-right {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.ts-benefit {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.3s, background 0.3s;
}

.ts-benefit:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.ts-icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-glow);
  flex-shrink: 0;
}

.ts-benefit h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.ts-benefit p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── HOW IT WORKS ─── */
.how-it-works {
  padding: 120px 0;
}

.how-it-works h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 56px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.step {
  position: relative;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.3s, transform 0.2s;
}

.step:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.step-num {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.4;
  margin-bottom: 12px;
}

.step h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── FEATURES ─── */
.features {
  padding: 120px 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.features h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 56px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.3s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.feature-highlight {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 32px;
  padding: 40px;
  border-color: rgba(59, 130, 246, 0.3);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(99, 102, 241, 0.04));
}

.feature-highlight .feature-icon-lg {
  grid-row: 1 / 3;
  display: flex;
  align-items: start;
  padding-top: 4px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── COMPARISON ─── */
.comparison {
  padding: 120px 0;
}

.comparison h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 48px;
}

.compare-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.compare-header, .compare-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
}

.compare-header {
  background: var(--bg-card);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.compare-header > div, .compare-row > div {
  padding: 16px 24px;
}

.compare-us {
  color: var(--accent) !important;
}

.compare-row {
  border-top: 1px solid var(--border);
  transition: background 0.2s;
}

.compare-row:hover {
  background: var(--bg-elevated);
}

.compare-label {
  font-weight: 600;
  font-size: 14px;
}

.compare-old {
  font-size: 14px;
  color: var(--text-dim);
}

.compare-new {
  font-size: 14px;
  color: var(--success);
  font-weight: 500;
}

/* ─── USE CASES ─── */
.use-cases {
  padding: 120px 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.use-cases h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 56px;
}

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

.uc-card {
  padding: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.3s, transform 0.2s;
}

.uc-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.uc-visual {
  margin-bottom: 20px;
}

.uc-glyph {
  font-size: 36px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--accent-glow);
}

.uc-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.uc-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── ARCHITECTURE PREVIEW ─── */
.architecture-preview {
  padding: 120px 0;
}

.architecture-preview h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 56px;
}

.arch-visual {
  max-width: 700px;
  margin: 0 auto;
}

.arch-layer {
  padding: 24px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  position: relative;
  transition: border-color 0.3s;
}

.arch-layer:hover { border-color: var(--accent); }

.arch-label {
  font-weight: 800;
  font-size: 16px;
  min-width: 200px;
}

.arch-desc {
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
}

.arch-ts-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--mono);
  white-space: nowrap;
}

.arch-l3 { background: linear-gradient(90deg, rgba(59, 130, 246, 0.08), transparent); }
.arch-l2 { background: linear-gradient(90deg, rgba(99, 102, 241, 0.08), transparent); }
.arch-l1 { background: linear-gradient(90deg, rgba(59, 130, 246, 0.05), transparent); }
.arch-l0 { background: var(--bg-card); }

.arch-connector {
  width: 2px;
  height: 24px;
  background: var(--border);
  margin: 0 auto;
}

/* ─── CTA ─── */
.cta-section {
  padding: 120px 0;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
  border-top: 1px solid var(--border);
}

.cta-section h2 {
  font-size: 40px;
  font-weight: 900;
  margin-bottom: 16px;
}

.cta-section p {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 36px;
}

/* ─── FOOTER ─── */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 8px;
}

.footer-domain {
  color: var(--accent-bright) !important;
  font-family: var(--mono);
  font-size: 13px !important;
  margin-top: 4px !important;
}

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

.footer-links h5 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.footer-links a {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 8px;
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-dim);
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .ts-grid { grid-template-columns: 1fr; gap: 48px; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .feature-highlight { grid-template-columns: 1fr; }
  .compare-header, .compare-row { grid-template-columns: 1fr 1fr 1fr; }
  .uc-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; gap: 24px; }
}

@media (max-width: 600px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .steps-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  .compare-header, .compare-row { grid-template-columns: 1fr; }
  .compare-header > div:first-child, .compare-row .compare-label { display: none; }
}
