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

:root {
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f4f4f5;
  --bg-hover: #e4e4e7;
  --bg-deep: #f0f0f2;

  --surface: rgba(0, 0, 0, 0.02);
  --surface-hover: rgba(0, 0, 0, 0.04);
  --surface-elevated: rgba(255, 255, 255, 0.9);

  --text-primary: #18181b;
  --text-secondary: #52525b;
  --text-muted: #a1a1aa;
  --text-subtle: rgba(0, 0, 0, 0.5);

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: rgba(37, 99, 235, 0.1);
  --accent-glow: rgba(37, 99, 235, 0.15);
  --accent-border: rgba(37, 99, 235, 0.3);

  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.1);
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.08);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.1);

  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.12);
  --border-accent: rgba(37, 99, 235, 0.3);

  --shadow:
    0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-lg:
    0 0 0 1px rgba(0, 0, 0, 0.03), 0 4px 12px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-accent: 0 0 0 1px rgba(37, 99, 235, 0.2), 0 2px 8px rgba(37, 99, 235, 0.12);
  --shadow-xl:
    0 0 0 1px rgba(0, 0, 0, 0.03), 0 8px 32px rgba(0, 0, 0, 0.1), 0 16px 48px rgba(0, 0, 0, 0.08);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 300ms cubic-bezier(0.16, 1, 0.3, 1);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

[data-theme='dark'] {
  --bg-primary: #050506;
  --bg-secondary: #0a0a0c;
  --bg-tertiary: #0f0f12;
  --bg-hover: #18181b;
  --bg-deep: #020203;

  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --surface-elevated: rgba(255, 255, 255, 0.03);

  --text-primary: #ededef;
  --text-secondary: #8a8f98;
  --text-muted: #5c5f66;
  --text-subtle: rgba(255, 255, 255, 0.5);

  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-light: rgba(59, 130, 246, 0.15);
  --accent-glow: rgba(59, 130, 246, 0.3);
  --accent-border: rgba(59, 130, 246, 0.4);

  --success: #34d399;
  --success-light: rgba(52, 211, 153, 0.12);
  --danger: #f87171;
  --danger-light: rgba(248, 113, 113, 0.12);
  --warning: #fbbf24;
  --warning-light: rgba(251, 191, 36, 0.12);

  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(59, 130, 246, 0.4);

  --shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 8px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg:
    0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.4),
    0 16px 48px rgba(0, 0, 0, 0.3);
  --shadow-accent:
    0 0 0 1px rgba(59, 130, 246, 0.5), 0 4px 12px rgba(59, 130, 246, 0.25),
    0 0 32px rgba(59, 130, 246, 0.15);
  --shadow-xl:
    0 0 0 1px rgba(255, 255, 255, 0.06), 0 8px 32px rgba(0, 0, 0, 0.4),
    0 16px 48px rgba(0, 0, 0, 0.3);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

.download-anchor {
  position: relative;
  top: -80px;
  visibility: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent-light);
  color: var(--accent);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

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

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

[data-theme='dark'] .nav {
  background: rgba(5, 5, 6, 0.8);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.nav-logo span {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

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

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.nav-link-icon svg {
  width: 20px;
  height: 20px;
}

.nav-link-icon:hover {
  color: var(--text-primary);
}

.nav-cta {
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow);
}

.nav-cta:hover {
  background: var(--text-secondary);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-icon-dark {
  display: none;
}

[data-theme='dark'] .theme-icon-light {
  display: none;
}

[data-theme='dark'] .theme-icon-dark {
  display: block;
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-primary);
}

.nav-mobile-toggle svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
  }

  .nav-links-open {
    display: flex;
  }

  .nav-links .nav-link {
    padding: 8px 0;
  }

  .nav-links .nav-cta {
    width: 100%;
    text-align: center;
  }

  .nav-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.hero {
  position: relative;
  padding: 160px 0 80px;
  overflow: hidden;
  text-align: center;
}

.hero-glow {
  position: absolute;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 32px;
}

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

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 24px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.hero-features {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 32px;
  letter-spacing: 0.05em;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(94, 106, 210, 0.3),
    0 4px 16px rgba(94, 106, 210, 0.3);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-hover);
}

@media (max-width: 480px) {
  .btn {
    width: 100%;
  }
}

.screenshot-wrapper {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.screenshot {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}

.screenshot-dark {
  display: none;
}

[data-theme='dark'] .screenshot-light {
  display: none;
}

[data-theme='dark'] .screenshot-dark {
  display: block;
}

.mockup-version {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.features {
  padding: 120px 0;
  background: var(--bg-tertiary);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

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

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

@media (max-width: 600px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--bg-secondary);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: all var(--transition-base);
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon.indigo {
  background: var(--accent-light);
  color: var(--accent);
}

.feature-icon.purple {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
}

.feature-icon.blue {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.feature-description {
  color: var(--text-secondary);
  line-height: 1.6;
}

.opensource {
  padding: 120px 0;
  background: #0a0a0c;
  color: #ededef;
  position: relative;
  overflow: hidden;
}

.opensource-glow {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: rgba(94, 106, 210, 0.08);
  transform: skewX(-12deg);
  transform-origin: top;
}

.opensource-inner {
  display: flex;
  align-items: center;
  gap: 64px;
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .opensource-inner {
    flex-direction: column;
    gap: 48px;
  }
}

.opensource-content {
  flex: 1;
}

.opensource-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.opensource-text {
  font-size: 1.125rem;
  color: #8a8f98;
  line-height: 1.7;
  margin-bottom: 32px;
}

.opensource-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-white {
  background: white;
  color: #0a0a0c;
}

.btn-white:hover {
  background: #f4f4f5;
}

.btn-dark {
  background: #18181b;
  color: #ededef;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-dark:hover {
  background: #27272a;
}

.opensource-terminal {
  flex: 1;
  max-width: 500px;
  background: #0f0f12;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
}

.terminal-title {
  margin-left: 8px;
  color: #5c5f66;
  font-size: 0.875rem;
}

.terminal-line {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: #5c5f66;
  margin-bottom: 8px;
}

.terminal-line.success {
  color: #34d399;
}

.terminal-cursor {
  color: #ededef;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.footer {
  background: var(--bg-secondary);
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.footer-logo span {
  font-weight: 700;
  color: var(--text-primary);
}

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

.footer-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent);
}

.footer-copyright {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hidden-mobile {
  display: block;
}

@media (max-width: 768px) {
  .hidden-mobile {
    display: none;
  }
}
