/* ============================================================
   CrateBay — Official Website Stylesheet
   ============================================================ */

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

/* --- Theme Variables --------------------------------------- */
:root {
  /* Dark theme (default) */
  --bg: #0f111a;
  --surface: #1a1d2e;
  --surface2: #232640;
  --border: #2a2d45;
  --text: #e2e8f0;
  --text2: #94a3b8;
  --text3: #4b5277;
  --purple: #8b5cf6;
  --purple-hover: #6d28d9;
  --cyan: #22d3ee;
  --green: #34d399;
  --red: #f87171;
  --yellow: #facc15;
  --canvas-grid: rgba(42, 45, 69, 0.25);
  --canvas-particle: rgba(139, 92, 246, 0.5);
  --canvas-line: 139, 92, 246;
  --navbar-bg: rgba(15, 17, 26, 0.82);
  --mobile-menu-bg: rgba(15, 17, 26, 0.96);
  --card-hover-shadow: rgba(139, 92, 246, 0.08);
  --card-hover-glow: rgba(139, 92, 246, 0.1);
  --demo-bg1: rgba(139, 92, 246, 0.06);
  --demo-bg2: rgba(34, 211, 238, 0.04);
  --mock-sidebar-bg: rgba(15, 17, 26, 0.5);
  --mock-active-bg: rgba(139, 92, 246, 0.12);
  --table-row-border: rgba(42, 45, 69, 0.4);
  --highlight-bg: rgba(139, 92, 246, 0.03);
  --highlight-header-bg: rgba(139, 92, 246, 0.05);
  --badge-bg: rgba(139, 92, 246, 0.1);
  --badge-border: rgba(139, 92, 246, 0.25);
  --icon-purple-bg: rgba(139, 92, 246, 0.1);
  --icon-purple-border: rgba(139, 92, 246, 0.15);
  --icon-cyan-bg: rgba(34, 211, 238, 0.1);
  --icon-cyan-border: rgba(34, 211, 238, 0.15);
  --icon-green-bg: rgba(52, 211, 153, 0.1);
  --icon-green-border: rgba(52, 211, 153, 0.15);
  --icon-red-bg: rgba(248, 113, 113, 0.1);
  --icon-red-border: rgba(248, 113, 113, 0.15);
  --icon-yellow-bg: rgba(250, 204, 21, 0.1);
  --icon-yellow-border: rgba(250, 204, 21, 0.15);
  --demo-shadow: rgba(0, 0, 0, 0.4);
  --btn-shadow: rgba(139, 92, 246, 0.3);
  --btn-shadow-hover: rgba(139, 92, 246, 0.5);

  /* Shared constants */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code',
    'Consolas', monospace;
  --max-w: 1200px;
  --section-py: 120px;
  --transition-theme: 0.3s ease;
}

/* --- Light Theme ------------------------------------------- */
[data-theme="light"] {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface2: #f1f5f9;
  --border: #e2e8f0;
  --text: #1e293b;
  --text2: #64748b;
  --text3: #94a3b8;
  --purple: #7c3aed;
  --purple-hover: #6d28d9;
  --cyan: #0891b2;
  --green: #059669;
  --red: #dc2626;
  --yellow: #ca8a04;
  --canvas-grid: rgba(226, 232, 240, 0.5);
  --canvas-particle: rgba(124, 58, 237, 0.35);
  --canvas-line: 124, 58, 237;
  --navbar-bg: rgba(248, 250, 252, 0.85);
  --mobile-menu-bg: rgba(248, 250, 252, 0.96);
  --card-hover-shadow: rgba(124, 58, 237, 0.06);
  --card-hover-glow: rgba(124, 58, 237, 0.08);
  --demo-bg1: rgba(124, 58, 237, 0.04);
  --demo-bg2: rgba(8, 145, 178, 0.03);
  --mock-sidebar-bg: rgba(241, 245, 249, 0.8);
  --mock-active-bg: rgba(124, 58, 237, 0.08);
  --table-row-border: rgba(226, 232, 240, 0.6);
  --highlight-bg: rgba(124, 58, 237, 0.02);
  --highlight-header-bg: rgba(124, 58, 237, 0.04);
  --badge-bg: rgba(124, 58, 237, 0.08);
  --badge-border: rgba(124, 58, 237, 0.2);
  --icon-purple-bg: rgba(124, 58, 237, 0.08);
  --icon-purple-border: rgba(124, 58, 237, 0.12);
  --icon-cyan-bg: rgba(8, 145, 178, 0.08);
  --icon-cyan-border: rgba(8, 145, 178, 0.12);
  --icon-green-bg: rgba(5, 150, 105, 0.08);
  --icon-green-border: rgba(5, 150, 105, 0.12);
  --icon-red-bg: rgba(220, 38, 38, 0.08);
  --icon-red-border: rgba(220, 38, 38, 0.12);
  --icon-yellow-bg: rgba(202, 138, 4, 0.08);
  --icon-yellow-border: rgba(202, 138, 4, 0.12);
  --demo-shadow: rgba(0, 0, 0, 0.1);
  --btn-shadow: rgba(124, 58, 237, 0.2);
  --btn-shadow-hover: rgba(124, 58, 237, 0.35);
}

/* --- Global Theme Transition ------------------------------- */
*:not(#grid-canvas) {
  transition: background-color var(--transition-theme),
              color var(--transition-theme),
              border-color var(--transition-theme);
}

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

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

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--purple);
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* --- Utility ----------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 16px;
}
.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--purple);
  border-radius: 1px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text2);
  max-width: 600px;
  margin-bottom: 48px;
}

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

/* --- Grid Background (canvas) ------------------------------ */
#grid-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}
[data-theme="light"] #grid-canvas {
  opacity: 0.2;
}

/* --- Navbar ------------------------------------------------ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0 24px;
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
.navbar.scrolled {
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}
.navbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.nav-logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  filter: brightness(0.95) drop-shadow(0 0 4px rgba(139, 92, 246, 0.15));
  transition: filter 0.3s ease;
}
[data-theme="light"] .nav-logo img {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1));
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--text2);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text);
}

/* Language toggle */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.lang-toggle button {
  padding: 5px 12px;
  border: none;
  background: transparent;
  color: var(--text3);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  font-family: var(--font);
  transition: background 0.2s, color 0.2s;
}
.lang-toggle button.active {
  background: var(--purple);
  color: #fff;
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.theme-toggle:hover {
  border-color: var(--purple);
  color: var(--text);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}

/* Show/hide sun/moon icons based on theme */
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* Mobile theme toggle (visible only on mobile) */
.theme-toggle-mobile {
  display: none;
}

/* GitHub nav button */
.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text2);
  transition: border-color 0.2s, color 0.2s;
}
.nav-github:hover {
  border-color: var(--purple);
  color: var(--text);
}
.nav-github svg {
  width: 18px;
  height: 18px;
}

/* Mobile menu + right controls */
.nav-right-mobile {
  display: none;
  align-items: center;
  gap: 8px;
}
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}
.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

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

/* Animated gradient orbs */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.4;
}
[data-theme="light"] .hero-glow {
  opacity: 0.15;
}
.hero-glow-1 {
  width: 600px;
  height: 600px;
  background: var(--purple);
  top: -200px;
  left: -100px;
  animation: floatOrb1 12s ease-in-out infinite;
}
.hero-glow-2 {
  width: 500px;
  height: 500px;
  background: var(--cyan);
  bottom: -150px;
  right: -100px;
  animation: floatOrb2 15s ease-in-out infinite;
}
.hero-glow-3 {
  width: 300px;
  height: 300px;
  background: var(--green);
  top: 40%;
  right: 20%;
  animation: floatOrb3 10s ease-in-out infinite;
  opacity: 0.15;
}

@keyframes floatOrb1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(80px, 40px) scale(1.1); }
  66% { transform: translate(-40px, 80px) scale(0.95); }
}
@keyframes floatOrb2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-60px, -30px) scale(1.05); }
  66% { transform: translate(40px, -60px) scale(0.9); }
}
@keyframes floatOrb3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 30px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 32px;
  animation: fadeInUp 0.8s ease-out;
}
.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text2);
  max-width: 600px;
  margin: 0 auto 48px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  text-decoration: none;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 0 24px var(--btn-shadow);
}
.btn-primary:hover {
  background: var(--purple-hover);
  box-shadow: 0 0 32px var(--btn-shadow-hover);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--purple);
  color: var(--purple);
}
.btn svg {
  width: 18px;
  height: 18px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-top: 64px;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}
.hero-stat {
  text-align: center;
}
.hero-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text3);
  margin-top: 2px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Features ---------------------------------------------- */
.features {
  position: relative;
  z-index: 1;
  padding: var(--section-py) 0;
}

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  opacity: 0;
  transition: opacity 0.3s;
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 12px 48px var(--card-hover-shadow),
    0 0 0 1px var(--card-hover-glow);
}
.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: var(--icon-purple-bg);
  border: 1px solid var(--icon-purple-border);
}
.feature-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--purple);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Alternate icon colors per card */
.feature-card:nth-child(2) .feature-icon {
  background: var(--icon-cyan-bg);
  border-color: var(--icon-cyan-border);
}
.feature-card:nth-child(2) .feature-icon svg { stroke: var(--cyan); }

.feature-card:nth-child(3) .feature-icon {
  background: var(--icon-green-bg);
  border-color: var(--icon-green-border);
}
.feature-card:nth-child(3) .feature-icon svg { stroke: var(--green); }

.feature-card:nth-child(4) .feature-icon {
  background: var(--icon-red-bg);
  border-color: var(--icon-red-border);
}
.feature-card:nth-child(4) .feature-icon svg { stroke: var(--red); }

.feature-card:nth-child(5) .feature-icon {
  background: var(--icon-cyan-bg);
  border-color: var(--icon-cyan-border);
}
.feature-card:nth-child(5) .feature-icon svg { stroke: var(--cyan); }

.feature-card:nth-child(6) .feature-icon {
  background: var(--icon-yellow-bg);
  border-color: var(--icon-yellow-border);
}
.feature-card:nth-child(6) .feature-icon svg { stroke: var(--yellow); }

.feature-card:nth-child(7) .feature-icon {
  background: var(--icon-purple-bg);
  border-color: var(--icon-purple-border);
}
.feature-card:nth-child(7) .feature-icon svg { stroke: var(--purple); }

.feature-card:nth-child(8) .feature-icon {
  background: var(--icon-green-bg);
  border-color: var(--icon-green-border);
}
.feature-card:nth-child(8) .feature-icon svg { stroke: var(--green); }

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.6;
}

/* --- Screenshots / Demo ------------------------------------ */
.demo {
  position: relative;
  z-index: 1;
  padding: var(--section-py) 0;
}

.demo-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 80px var(--demo-shadow),
    0 0 0 1px var(--card-hover-glow);
  position: relative;
}

.demo-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.demo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.demo-dot:nth-child(1) { background: var(--red); }
.demo-dot:nth-child(2) { background: var(--yellow); }
.demo-dot:nth-child(3) { background: var(--green); }
.demo-titlebar-text {
  flex: 1;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text3);
  font-weight: 500;
}

.demo-body {
  padding: 40px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background:
    radial-gradient(circle at 30% 40%, var(--demo-bg1), transparent 60%),
    radial-gradient(circle at 70% 60%, var(--demo-bg2), transparent 60%);
}

/* Mock container dashboard inside the demo */
.mock-dashboard {
  width: 100%;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  min-height: 360px;
}
.mock-sidebar {
  background: var(--mock-sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mock-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text2);
  font-weight: 500;
}
.mock-sidebar-item.active {
  background: var(--mock-active-bg);
  color: var(--purple);
}
.mock-sidebar-item svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.mock-sidebar-item.active svg {
  stroke: var(--purple);
}

.mock-main {
  padding: 20px 24px;
}
.mock-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.mock-main-header h4 {
  font-size: 0.95rem;
  font-weight: 600;
}
.mock-btn {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--purple);
  color: #fff;
  border: none;
}

.mock-table {
  width: 100%;
  border-collapse: collapse;
}
.mock-table th {
  text-align: left;
  font-size: 0.7rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.mock-table td {
  padding: 10px 12px;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--table-row-border);
  color: var(--text2);
}
.mock-name {
  color: var(--text);
  font-weight: 500;
}
.mock-image {
  color: var(--cyan);
  font-size: 0.75rem;
}
.mock-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}
.mock-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.mock-status.running .dot { background: var(--green); }
.mock-status.running { color: var(--green); }
.mock-status.stopped .dot { background: var(--red); }
.mock-status.stopped { color: var(--red); }
.mock-status.paused .dot { background: var(--yellow); }
.mock-status.paused { color: var(--yellow); }

/* --- Tech Stack -------------------------------------------- */
.techstack {
  position: relative;
  z-index: 1;
  padding: var(--section-py) 0;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.tech-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 4px 20px var(--card-hover-shadow);
}
.tech-badge svg {
  width: 24px;
  height: 24px;
}

.tech-arch {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  overflow-x: auto;
  text-align: center;
}
.tech-arch .arch-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* --- Comparison Table -------------------------------------- */
.comparison {
  position: relative;
  z-index: 1;
  padding: var(--section-py) 0;
}

.comparison-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}
.comparison-table thead {
  background: var(--surface2);
}
.comparison-table th {
  padding: 16px 24px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
}
.comparison-table th:first-child {
  color: var(--text3);
}
.comparison-table th.highlight {
  color: var(--purple);
  background: var(--highlight-header-bg);
}
.comparison-table td {
  padding: 14px 24px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
}
.comparison-table td.highlight {
  color: var(--text);
  font-weight: 600;
  background: var(--highlight-bg);
}
.comparison-table tbody tr:last-child td {
  border-bottom: none;
}
.comparison-table .check {
  color: var(--green);
  font-weight: 700;
}
.comparison-table .cross {
  color: var(--red);
  font-weight: 700;
}
.comp-note {
  font-weight: 400;
  font-size: 0.8rem;
  opacity: 0.8;
}

/* --- Getting Started --------------------------------------- */
.getting-started {
  position: relative;
  z-index: 1;
  padding: var(--section-py) 0;
}

.install-methods {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 680px;
  margin: 0 auto;
}

.install-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  transition: border-color 0.3s;
}
.install-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
}
.install-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.install-card .install-desc {
  font-size: 0.82rem;
  color: var(--text3);
  margin-bottom: 16px;
}

.code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--cyan);
  position: relative;
  overflow-x: auto;
}
.code-block code {
  white-space: pre;
  display: block;
}
.code-block .prompt {
  color: var(--text3);
  user-select: none;
}
.code-block .comment {
  color: var(--text3);
}
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text3);
  cursor: pointer;
  font-family: var(--font);
  transition: color 0.2s, border-color 0.2s;
}
.copy-btn:hover {
  color: var(--text);
  border-color: var(--purple);
}

/* --- Footer ------------------------------------------------ */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 48px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}
.footer-logo img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  filter: brightness(0.95) drop-shadow(0 0 4px rgba(139, 92, 246, 0.15));
  transition: filter 0.3s ease;
}
[data-theme="light"] .footer-logo img {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1));
}
.footer-copy {
  font-size: 0.82rem;
  color: var(--text3);
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--text2);
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--text);
}

/* --- Scroll animations ------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 1100px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero-stats {
    gap: 24px;
  }
  .mock-dashboard {
    grid-template-columns: 1fr;
  }
  .mock-sidebar {
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    padding: 12px;
  }
}

@media (max-width: 640px) {
  :root {
    --section-py: 80px;
  }
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--mobile-menu-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    z-index: 999;
  }
  .nav-links.open {
    display: flex;
  }
  /* Hide the theme toggle inside nav-links on mobile */
  .nav-links .theme-toggle {
    display: none;
  }
  .nav-right-mobile {
    display: flex;
  }
  .mobile-menu-btn {
    display: block;
  }
  .theme-toggle-mobile {
    display: inline-flex;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .footer-left {
    flex-direction: column;
  }
}
