/* ============================================================
   Automater.ai — Homepage Styles
   Modern dark theme with glassmorphism, scroll animations,
   and particle canvas background
   ============================================================ */

:root {
  /* Colors */
  --bg-base: #06060a;
  --bg-card: #0d0d12;
  --bg-surface: #14141c;
  --bg-elevated: #1a1a26;

  --text-primary: #f0f0f5;
  --text-secondary: #9a9ab0;
  --text-muted: #55556a;

  --primary: #3b82f6;
  --primary-light: #60a5fa;
  --primary-dark: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.35);
  --primary-subtle: rgba(59, 130, 246, 0.08);

  --accent: #8b5cf6;
  --accent-glow: rgba(139, 92, 246, 0.3);

  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;

  --border: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(59, 130, 246, 0.4);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Menlo', monospace;

  /* Layout */
  --container: 1200px;
  --container-wide: 1400px;
  --nav-height: 72px;
  --section-gap: 120px;

  /* Animation */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   Reset & Base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
ul {
  list-style: none;
}

/* ============================================================
   Canvas & Background
   ============================================================ */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

/* ============================================================
   Container
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ============================================================
   Utilities
   ============================================================ */
.gradient-text {
  background: linear-gradient(
    135deg,
    var(--primary-light) 0%,
    var(--primary) 40%,
    var(--accent) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.full-width {
  width: 100%;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  border: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn:hover::after {
  opacity: 1;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 13px;
  border-radius: 10px;
}
.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 14px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow:
    0 4px 20px var(--primary-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow:
    0 8px 30px var(--primary-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-link {
  background: none;
  color: var(--text-secondary);
  padding: 12px 0;
  border: none;
  gap: 6px;
}
.btn-link:hover {
  color: var(--primary-light);
}
.btn-link svg {
  transition: transform 0.2s;
}
.btn-link:hover svg {
  transform: translateX(4px);
}

body.overlay-open {
  overflow: hidden;
}

/* ============================================================
   Download Overlay
   ============================================================ */
.download-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s var(--ease-out),
    visibility 0.25s var(--ease-out);
}

.download-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.download-overlay[hidden] {
  display: none;
}

.download-overlay-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.2), transparent 40%), rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

.download-overlay-panel {
  position: relative;
  width: min(960px, 100%);
  border-radius: 28px;
  border: 1px solid var(--border-light);
  background: linear-gradient(180deg, rgba(20, 20, 28, 0.97), rgba(10, 10, 16, 0.98));
  box-shadow:
    0 32px 120px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 36px;
  overflow: hidden;
}

.download-overlay-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 38%);
  pointer-events: none;
}

.download-overlay-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.download-overlay-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.download-overlay-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  background: rgba(59, 130, 246, 0.08);
  color: var(--primary-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.download-overlay-title {
  font-size: clamp(32px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.download-overlay-copy {
  max-width: 640px;
  color: var(--text-secondary);
  font-size: 16px;
}

.download-overlay-status {
  min-height: 24px;
  margin-top: 18px;
  color: var(--text-secondary);
  font-size: 14px;
}

.download-platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.download-platform-card {
  width: 100%;
  text-align: left;
  padding: 24px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition:
    transform 0.22s var(--ease-out),
    border-color 0.22s var(--ease-out),
    box-shadow 0.22s var(--ease-out),
    background 0.22s var(--ease-out);
}

.download-platform-card:hover:not(:disabled) {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.45);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.1), rgba(255, 255, 255, 0.04));
  box-shadow: 0 20px 48px rgba(59, 130, 246, 0.12);
}

.download-platform-card:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.download-platform-head,
.download-platform-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.download-platform-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(96, 165, 250, 0.12);
  color: var(--primary-light);
  border: 1px solid rgba(96, 165, 250, 0.16);
}

.download-platform-badge {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.download-platform-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.download-platform-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.download-platform-file,
.download-platform-size {
  color: var(--text-secondary);
  font-size: 14px;
}

.download-platform-version {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.download-platform-card.is-ready .download-platform-version {
  color: white;
}

.download-platform-card.is-unavailable .download-platform-file,
.download-platform-card.is-unavailable .download-platform-size,
.download-platform-card.is-unavailable .download-platform-version {
  color: var(--text-muted);
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 24px;
  transition: all 0.4s var(--ease-out);
}

.nav.scrolled {
  padding: 8px 24px;
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 6, 10, 0.6);
  backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 24px;
  transition: all 0.4s var(--ease-out);
}

.nav.scrolled .nav-inner {
  background: rgba(6, 6, 10, 0.85);
  border-radius: 60px;
  padding: 10px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: white;
}

.nav-logo-icon {
  display: flex;
  align-items: center;
  transition: transform 0.3s var(--spring);
}

.nav-logo:hover .nav-logo-icon {
  transform: rotate(-12deg) scale(1.1);
}

.nav-logo-dot {
  color: var(--primary-light);
}

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

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s var(--ease-out);
  border-radius: 1px;
}

.nav-links a:hover {
  color: white;
}
.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link-signin {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.nav-link-signin:hover {
  color: white;
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
}

.nav-mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s;
  position: absolute;
  left: 0;
}

.nav-mobile-toggle span:nth-child(1) {
  top: 0;
}
.nav-mobile-toggle span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}
.nav-mobile-toggle span:nth-child(3) {
  bottom: 0;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding-top: calc(var(--nav-height) + 100px);
  padding-bottom: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, var(--primary-glow) 0%, transparent 60%);
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-subtle);
  border: 1px solid rgba(59, 130, 246, 0.15);
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 32px;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--primary);
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2.5px;
  color: white;
  margin-bottom: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

/* Hero Preview */
.hero-preview {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  perspective: 1200px;
}

.hero-preview-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.12) 0%,
    rgba(139, 92, 246, 0.06) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: -1;
}

.hero-preview-window {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 25px 80px -20px rgba(0, 0, 0, 0.7),
    0 0 60px -20px var(--primary-glow);
  transform: rotateX(8deg) scale(0.95);
  transform-origin: center bottom;
  transition: transform 1s var(--ease-out);
}

.hero-preview-window.visible {
  transform: rotateX(2deg) scale(0.98);
}

/* Window Chrome */
.window-chrome {
  background: #111118;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}

.window-dots {
  display: flex;
  gap: 8px;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red {
  background: #ff5f56;
}
.dot-yellow {
  background: #ffbd2e;
}
.dot-green {
  background: #27c93f;
}

.window-tabs {
  display: flex;
  gap: 2px;
}
.window-tab {
  padding: 6px 16px;
  font-size: 12px;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all 0.2s;
}
.window-tab.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

/* Window Body (App Mock) */
.window-body {
  display: flex;
  min-height: 400px;
}

.app-sidebar {
  width: 52px;
  background: #0a0a10;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
}

.sidebar-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--text-muted);
  transition: all 0.2s;
  cursor: pointer;
}

.sidebar-icon:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}
.sidebar-icon.active {
  color: var(--primary-light);
  background: var(--primary-subtle);
}
.sidebar-spacer {
  flex: 1;
}

.app-main {
  flex: 1;
  display: flex;
}

.app-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.panel-right {
  border-left: 1px solid var(--border);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.panel-title {
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.panel-badge {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-light);
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}

.panel-badge.live {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

/* Chat Messages */
.chat-messages {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.chat-msg.msg-user {
  justify-content: flex-end;
}

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.msg-bubble {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 80%;
  line-height: 1.5;
}

.msg-user .msg-bubble {
  background: var(--primary);
  border-color: transparent;
  color: white;
}

.typing-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  margin-bottom: 8px;
  animation: typingPulse 1.5s ease-in-out infinite;
}

.msg-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--success);
}

/* Infrastructure Grid */
.infra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  flex: 1;
}

.infra-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.infra-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.infra-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

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

.status-dot.status-success {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}
.status-dot.status-warning {
  background: var(--warning);
  box-shadow: 0 0 8px var(--warning);
}

.infra-metric {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.metric-label {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  width: 30px;
}
.metric-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}
.metric-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 1.5s var(--ease-out);
}
.metric-fill.mem {
  background: var(--accent);
}
.metric-fill.warning {
  background: var(--warning);
}
.metric-val {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  width: 28px;
  text-align: right;
}

/* ============================================================
   Proof Bar
   ============================================================ */
.proof-bar {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
}

.proof-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.proof-item {
  text-align: center;
}
.proof-number {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: white;
  letter-spacing: -1px;
}

.proof-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.proof-divider {
  width: 1px;
  height: 40px;
  background: var(--border-light);
}

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding: var(--section-gap) 0;
  position: relative;
}

.section-dark {
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 72px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-light);
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  color: white;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
  line-height: 1.15;
}

.section-header p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================================
   Capability Grid (Product Overview)
   ============================================================ */
.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cap-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-out);
}

.cap-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(59, 130, 246, 0.15),
    transparent 40%
  );
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}

.cap-card:hover::before {
  opacity: 1;
}

.cap-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.5);
}

.cap-card-tall {
  grid-row: span 2;
}
.cap-card-wide {
  grid-column: span 2;
}

.cap-card-icon {
  width: 52px;
  height: 52px;
  background: var(--primary-subtle);
  border: 1px solid rgba(59, 130, 246, 0.15);
  color: var(--primary-light);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

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

.cap-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cap-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.cap-card-features span {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Code block in cap card */
.cap-card-visual {
  margin-top: 20px;
}

.code-block {
  background: #0a0a12;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
}

.code-line {
  white-space: nowrap;
}
.c-kw {
  color: #c586c0;
}
.c-var {
  color: #9cdcfe;
}
.c-fn {
  color: #dcdcaa;
}
.c-prop {
  color: #9cdcfe;
}
.c-str {
  color: #ce9178;
}

/* ============================================================
   Features Marquee
   ============================================================ */
.features-marquee {
  overflow: hidden;
  margin-bottom: 64px;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
}

.marquee-track {
  display: flex;
  gap: 16px;
  animation: marquee 30s linear infinite;
  width: max-content;
}

.feature-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 10px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.3s;
}

.feature-chip:hover {
  border-color: var(--primary);
  color: var(--primary-light);
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-icon-sm {
  width: 40px;
  height: 40px;
  background: var(--primary-subtle);
  border: 1px solid rgba(59, 130, 246, 0.12);
  color: var(--primary-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-item h4 {
  font-size: 16px;
  font-weight: 700;
  color: white;
}
.feature-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   Comparison Strip (Web/Desktop)
   ============================================================ */
.comparison-strip {
  display: flex;
  gap: 40px;
  align-items: stretch;
}

.comparison-col {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  display: flex;
  flex-direction: column;
}

.comparison-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
  width: fit-content;
}

.comparison-badge.web {
  background: rgba(59, 130, 246, 0.08);
  color: var(--primary-light);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.comparison-badge.desktop {
  background: rgba(139, 92, 246, 0.08);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.comparison-col h3 {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.comparison-col > p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

.comparison-features {
  margin-bottom: 32px;
  flex: 1;
}

.comparison-features li {
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.comparison-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.comparison-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 80px;
}

.comparison-divider-line {
  width: 1px;
  flex: 1;
  background: linear-gradient(to bottom, transparent, var(--border-light), transparent);
}

.comparison-divider-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* ============================================================
   Workflow Steps
   ============================================================ */
.workflow-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.workflow-step {
  display: flex;
  gap: 32px;
  position: relative;
  padding-bottom: 48px;
}

.workflow-step:last-child {
  padding-bottom: 0;
}

.workflow-step-number {
  width: 56px;
  height: 56px;
  background: var(--primary-subtle);
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-light);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.workflow-step-line {
  position: absolute;
  left: 28px;
  top: 56px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, rgba(59, 130, 246, 0.3), transparent);
}

.workflow-step:last-child .workflow-step-line {
  display: none;
}

.workflow-step-content h3 {
  font-size: 22px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
  margin-top: 4px;
}

.workflow-step-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================================
   Ops Grid (Infrastructure)
   ============================================================ */
.ops-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ops-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-out);
}

.ops-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(59, 130, 246, 0.12),
    transparent 40%
  );
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}

.ops-card:hover::before {
  opacity: 1;
}
.ops-card:hover {
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-4px);
}

.ops-card-main {
  grid-column: span 2;
}

.ops-card-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-subtle);
  color: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.ops-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}
.ops-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Terminal Mock */
.ops-card-visual {
  margin-bottom: 24px;
}

.terminal-mock {
  background: #08080e;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2;
  overflow-x: auto;
}

.terminal-line {
  white-space: nowrap;
}
.t-prompt {
  color: var(--success);
  font-weight: 600;
}
.t-dim {
  color: var(--text-muted);
}
.t-success {
  color: var(--success);
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--primary-light);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ============================================================
   Split Section (Security/Admin)
   ============================================================ */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.split-content .section-tag {
  margin-bottom: 12px;
}

.split-content h2 {
  font-size: clamp(28px, 3.5vw, 38px);
  font-weight: 800;
  color: white;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.split-content > p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
}

.security-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.security-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.security-check {
  width: 32px;
  height: 32px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  flex-shrink: 0;
}

.security-feature strong {
  display: block;
  font-size: 15px;
  color: white;
  margin-bottom: 2px;
}

.security-feature span {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Security Visual Card */
.security-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.security-card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.security-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}

.security-stat {
  background: var(--bg-card);
  padding: 20px;
  text-align: center;
}

.security-stat-value {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.security-stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.security-activity {
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-line {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.activity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

.activity-time {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-mono);
}

/* ============================================================
   Use Cases
   ============================================================ */
.use-case-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.use-case-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-out);
}

.use-case-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: radial-gradient(
    400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(59, 130, 246, 0.12),
    transparent 40%
  );
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}

.use-case-card:hover::before {
  opacity: 1;
}
.use-case-card:hover {
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-4px);
}

.use-case-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-subtle);
  border: 1px solid rgba(59, 130, 246, 0.12);
  color: var(--primary-light);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.use-case-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: white;
  margin-bottom: 10px;
}
.use-case-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   Pricing
   ============================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  transition: all 0.4s var(--ease-out);
}

.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-popular {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.06) 0%, var(--bg-card) 50%);
  position: relative;
  box-shadow: 0 0 40px -10px var(--primary-glow);
  transform: scale(1.03);
}

.pricing-popular:hover {
  transform: scale(1.03) translateY(-4px);
}

.pricing-popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 6px 20px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pricing-header {
  text-align: center;
  margin-bottom: 32px;
}

.pricing-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.pricing-amount {
  font-size: 48px;
  font-weight: 800;
  color: white;
  letter-spacing: -2px;
}

.pricing-amount span {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
}

.pricing-header > p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.pricing-features {
  margin-bottom: 32px;
  flex: 1;
}

.pricing-features li {
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.pricing-features li::before {
  content: '';
  width: 18px;
  height: 18px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 50%;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12' stroke='%2322c55e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

/* ============================================================
   CTA Section
   ============================================================ */
.cta-section {
  padding: var(--section-gap) 0;
  position: relative;
}

.cta-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 32px;
  padding: 80px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, var(--primary-glow) 0%, transparent 60%);
  opacity: 0.3;
  pointer-events: none;
}

.cta-card h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: white;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
  position: relative;
}

.cta-card p {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

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

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

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 64px;
  margin-bottom: 60px;
}

.footer-brand {
  max-width: 280px;
}
.footer-tagline {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 16px;
  line-height: 1.6;
}

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

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
  transition: color 0.2s;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}
.footer-bottom-links a {
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-bottom-links a:hover {
  color: var(--text-secondary);
}

/* ============================================================
   Animations
   ============================================================ */
@keyframes pulse {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes typingPulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scaleX(0.6);
    transform-origin: left;
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

/* Scroll-triggered animations */
.anim-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

.anim-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.anim-delay-1 {
  transition-delay: 0.1s;
}
.anim-delay-2 {
  transition-delay: 0.2s;
}
.anim-delay-3 {
  transition-delay: 0.3s;
}
.anim-delay-4 {
  transition-delay: 0.4s;
}

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

  .cap-card-tall {
    grid-row: auto;
  }
  .cap-card-wide {
    grid-column: span 2;
  }

  .ops-grid {
    grid-template-columns: 1fr;
  }
  .ops-card-main {
    grid-column: auto;
  }

  .use-case-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .split-section {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .comparison-strip {
    flex-direction: column;
  }
  .comparison-divider {
    flex-direction: row;
    padding-top: 0;
  }
}

@media (max-width: 768px) {
  :root {
    --section-gap: 80px;
  }

  .nav-links,
  .nav-actions {
    display: none;
  }
  .nav-mobile-toggle {
    display: block;
  }

  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 8px);
    left: 12px;
    right: 12px;
    background: rgba(13, 13, 18, 0.95);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    gap: 16px;
    z-index: 200;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 60px);
  }
  .hero-title {
    letter-spacing: -1.5px;
  }
  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .capability-grid {
    grid-template-columns: 1fr;
  }
  .cap-card-wide {
    grid-column: auto;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .use-case-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .pricing-popular {
    transform: none;
  }
  .pricing-popular:hover {
    transform: translateY(-4px);
  }

  .proof-grid {
    gap: 24px;
  }
  .proof-divider {
    display: none;
  }

  .download-platform-grid {
    grid-template-columns: 1fr;
  }
  .download-overlay-panel {
    padding: 28px 20px 20px;
    border-radius: 24px;
  }
  .download-overlay-title {
    font-size: 30px;
  }

  .footer-grid {
    flex-direction: column;
    gap: 40px;
  }
  .footer-links-group {
    flex-wrap: wrap;
    gap: 32px;
  }

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

  .cta-card {
    padding: 48px 24px;
    border-radius: 24px;
  }

  .window-body {
    min-height: 300px;
  }
  .panel-right {
    display: none;
  }
  .app-sidebar {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-preview-window {
    border-radius: 12px;
  }
  .comparison-col {
    padding: 24px;
  }
  .download-overlay {
    padding: 12px;
  }
  .download-platform-card {
    padding: 20px;
  }
  .download-platform-title {
    font-size: 22px;
  }
}
