/* =============================================================================
   Quasar Landing Page — Cosmic Dark Theme
   ============================================================================= */

:root {
  /* Colors: Deep space with electric accents */
  --bg-deep: #050508;
  --bg-surface: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-hover: #1a1a24;

  --text-primary: #f0f0f5;
  --text-secondary: #8888a0;
  --text-muted: #555566;

  --accent-primary: #7c5cff;
  --accent-secondary: #5c9cff;
  --accent-glow: rgba(124, 92, 255, 0.4);
  --accent-gradient: linear-gradient(135deg, #7c5cff 0%, #5c9cff 50%, #5cffb8 100%);

  --success: #5cffb8;
  --error: #ff5c8a;
  --warning: #ffb85c;

  /* Typography */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* 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-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-deep);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background Effects */
.bg-gradient {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 92, 255, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(92, 156, 255, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse 50% 30% at 20% 80%, rgba(92, 255, 184, 0.05) 0%, transparent 30%);
  pointer-events: none;
  z-index: 0;
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  opacity: 0;
  animation: twinkle var(--duration) ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: var(--opacity); transform: scale(1); }
}

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

/* Navigation */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  font-size: 1.5rem;
  color: var(--text-primary);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: var(--space-xl);
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  transition: color var(--transition-fast);
}

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

/* Hero */
.hero {
  text-align: center;
  padding: var(--space-4xl) 0 var(--space-3xl);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid rgba(124, 92, 255, 0.2);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-primary);
  margin-bottom: var(--space-xl);
}

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

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

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
}

.hero-title em {
  font-style: italic;
  color: var(--accent-primary);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero-note {
  margin-top: var(--space-md);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-vercel {
  border-color: rgba(255, 255, 255, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-large {
  padding: var(--space-lg) var(--space-2xl);
  font-size: 1.05rem;
}

/* Demo Window */
.demo {
  padding: var(--space-3xl) 0;
}

.demo-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.demo-tab {
  padding: var(--space-sm) var(--space-lg);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.demo-tab:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.demo-tab.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: white;
}

.demo-window.hidden {
  display: none;
}

.demo-window {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 20px 50px -20px rgba(0, 0, 0, 0.5),
    0 0 100px -50px var(--accent-glow);
}

.demo-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-elevated);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.demo-dots {
  display: flex;
  gap: 6px;
}

.demo-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-hover);
}

.demo-dots span:first-child { background: #ff5f57; }
.demo-dots span:nth-child(2) { background: #febc2e; }
.demo-dots span:last-child { background: #28c840; }

.demo-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.demo-content {
  padding: var(--space-xl);
}

/* Comment */
.comment {
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-avatar {
  width: 32px;
  height: 32px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}

.comment-author {
  font-weight: 600;
  font-size: 0.9rem;
}

.comment-time {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.comment-body {
  padding: var(--space-lg);
}

.comment-body h3 {
  font-size: 1rem;
  margin-bottom: var(--space-md);
}

.info-table {
  width: 100%;
  margin-bottom: var(--space-lg);
  border-collapse: collapse;
}

.info-table td {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-table td:first-child {
  color: var(--text-secondary);
  font-size: 0.85rem;
  width: 120px;
}

.info-table code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg-hover);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--accent-secondary);
}

/* Suggestion */
.suggestion {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.suggestion-header {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: rgba(0, 0, 0, 0.3);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.suggestion-diff {
  padding: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
}

.diff-remove {
  color: var(--error);
  background: rgba(255, 92, 138, 0.1);
  margin: 0 calc(var(--space-md) * -1);
  padding: 2px var(--space-md);
}

.diff-add {
  color: var(--success);
  background: rgba(92, 255, 184, 0.1);
  margin: 0 calc(var(--space-md) * -1);
  padding: 2px var(--space-md);
}

.suggestion-btn {
  width: 100%;
  padding: var(--space-md);
  background: linear-gradient(135deg, rgba(92, 255, 184, 0.15) 0%, rgba(92, 255, 184, 0.05) 100%);
  border: none;
  border-top: 1px solid rgba(92, 255, 184, 0.2);
  color: var(--success);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.suggestion-btn:hover {
  background: linear-gradient(135deg, rgba(92, 255, 184, 0.25) 0%, rgba(92, 255, 184, 0.1) 100%);
}

/* Features */
.features {
  padding: var(--space-4xl) 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: var(--space-3xl);
  letter-spacing: -0.02em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.feature {
  padding: var(--space-xl);
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.feature:hover {
  background: var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.feature h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.feature p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* How it works */
.how-it-works {
  padding: var(--space-4xl) 0;
}

.steps {
  max-width: 600px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: var(--space-xl);
  padding: var(--space-xl) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.step:last-child {
  border-bottom: none;
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
}

.step-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.step-content code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--accent-secondary);
}

/* Vercel Section */
.vercel-section {
  padding: var(--space-4xl) 0;
}

.vercel-card {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-2xl);
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  text-align: center;
}

.vercel-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
}

.vercel-icon svg {
  fill: var(--text-primary);
}

.vercel-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: var(--space-sm);
}

.vercel-card > p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

.vercel-note {
  margin-top: var(--space-md);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* CTA */
.cta {
  text-align: center;
  padding: var(--space-4xl) 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(124, 92, 255, 0.08) 0%, transparent 60%);
  margin: var(--space-3xl) calc(var(--space-lg) * -1);
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.cta h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.cta p {
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Footer */
.footer {
  padding: var(--space-3xl) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

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

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

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
    max-width: 300px;
  }

  .step {
    flex-direction: column;
    gap: var(--space-md);
  }

  .footer-links {
    flex-direction: column;
    gap: var(--space-md);
  }
}
