/* ============================================
   Stable Streaming — Promo Website Styles
   Dark theme with red/coral accents
   ============================================ */

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

:root {
  --bg-primary: #111113;
  --bg-secondary: #18181b;
  --bg-card: #1c1c20;
  --bg-card-hover: #222228;
  --bg-elevated: #232328;
  --border: #2a2a30;
  --border-subtle: #222228;

  --text-primary: #e8e8ec;
  --text-secondary: #9898a0;
  --text-muted: #8e8e96;

  --accent: #d63527;
  --accent-soft: rgba(214, 53, 39, 0.15);
  --accent-glow: rgba(214, 53, 39, 0.25);
  --accent-hover: #e04030;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

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

  --transition: 0.2s ease;
  --transition-slow: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

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

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

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(17, 17, 19, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition);
}

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

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

.nav-logo-img {
  height: 28px;
  width: auto;
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 450;
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

.nav-github {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
}

.nav-github:hover {
  border-color: var(--text-muted);
  background: var(--bg-card);
}

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all var(--transition);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(17, 17, 19, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 24px;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu-link {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.mobile-menu-link:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  padding: 160px 24px 80px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.5;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.hero-title {
  margin-bottom: 24px;
}

.hero-logo {
  height: 56px;
  width: auto;
  margin: 0 auto;
  filter: drop-shadow(0 0 30px rgba(214, 53, 39, 0.3));
}

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

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 56px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 550;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px rgba(214, 53, 39, 0.25);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 30px rgba(214, 53, 39, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
  background: var(--bg-card);
}

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-stat-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.hero-stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.hero-stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* Hero Preview */
.hero-preview {
  max-width: 1000px;
  margin: 64px auto 0;
  position: relative;
  z-index: 1;
}

.hero-preview-window {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 80px rgba(214, 53, 39, 0.08);
}

.hero-preview-img {
  width: 100%;
  display: block;
}

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

.window-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.window-bar-title {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 450;
}

/* --- Sections --- */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-title {
  font-size: 32px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 370;
}

/* --- Features --- */
.features {
  padding: 100px 24px;
}

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

.feature-card {
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--transition-slow);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border);
  transform: translateY(-2px);
}

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

.feature-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  font-weight: 370;
}

/* --- Screenshots --- */
.screenshots {
  padding: 100px 24px;
  background: var(--bg-secondary);
}

.screenshots-carousel {
  position: relative;
  overflow: hidden;
}

.screenshots-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.screenshot-slide {
  flex: 0 0 100%;
  padding: 0 40px;
}

.screenshot-window {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  max-width: 960px;
  margin: 0 auto;
}

.screenshot-window img {
  width: 100%;
  display: block;
}

.screenshot-caption {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Carousel Controls */
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.carousel-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
  background: var(--bg-card);
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

.carousel-dot.active {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(214, 53, 39, 0.4);
}

.carousel-dot:hover:not(.active) {
  background: var(--text-muted);
}

/* --- Tech Stack --- */
.tech-stack {
  padding: 80px 24px;
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.tech-pill {
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  transition: all var(--transition);
}

.tech-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* --- Get Started --- */
.get-started {
  padding: 100px 24px;
  background: var(--bg-secondary);
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 64px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.install-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.install-step-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.install-step-content {
  flex: 1;
  min-width: 0;
}

.install-step-content h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
}

.code-block {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  overflow-x: auto;
  max-width: 100%;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.copy-btn {
  flex-shrink: 0;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 4px;
  transition: all var(--transition);
}

.copy-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.copy-btn.copied {
  color: #28c840;
}

.install-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: -4px;
  margin-bottom: 64px;
}

/* --- GitHub Card --- */
.github-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-slow);
}

.github-card:hover {
  border-color: var(--text-muted);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.github-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.github-card-icon {
  color: var(--text-secondary);
}

.github-card-repo {
  font-size: 16px;
}

.github-card-owner {
  color: var(--text-muted);
  font-weight: 400;
}

.github-card-name {
  color: #4493f8;
  font-weight: 600;
}

.github-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  font-weight: 370;
}

.github-card-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.github-card-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.github-card-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
}

.github-card-link {
  display: inline-flex;
  font-size: 14px;
  font-weight: 550;
  color: #4493f8;
  transition: color var(--transition);
}

.github-card-link:hover {
  color: #6aabff;
}

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

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  height: 20px;
  width: auto;
  opacity: 0.5;
}

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

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

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

.footer-inspired {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.footer-inspired a {
  color: #a364ff;
  font-weight: 500;
  transition: color var(--transition);
}

.footer-inspired a:hover {
  color: #b585ff;
}

.footer-uninspired {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

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

.hero-badge,
.hero-title,
.hero-subtitle,
.hero-actions,
.hero-stats {
  animation: fadeInUp 0.7s ease forwards;
}

.hero-badge { animation-delay: 0.1s; opacity: 0; }
.hero-title { animation-delay: 0.2s; opacity: 0; }
.hero-subtitle { animation-delay: 0.3s; opacity: 0; }
.hero-actions { animation-delay: 0.4s; opacity: 0; }
.hero-stats { animation-delay: 0.5s; opacity: 0; }

.hero-preview {
  animation: fadeInUp 0.8s ease 0.6s forwards;
  opacity: 0;
}

/* --- Scroll Animations --- */
.feature-card,
.screenshot-slide,
.install-step,
.github-card,
.tech-pill {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.feature-card.visible,
.screenshot-slide.visible,
.install-step.visible,
.github-card.visible,
.tech-pill.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:nth-child(1) { transition-delay: 0.05s; }
.feature-card:nth-child(2) { transition-delay: 0.1s; }
.feature-card:nth-child(3) { transition-delay: 0.15s; }
.feature-card:nth-child(4) { transition-delay: 0.2s; }
.feature-card:nth-child(5) { transition-delay: 0.25s; }
.feature-card:nth-child(6) { transition-delay: 0.3s; }

.tech-pill:nth-child(1) { transition-delay: 0.02s; }
.tech-pill:nth-child(2) { transition-delay: 0.04s; }
.tech-pill:nth-child(3) { transition-delay: 0.06s; }
.tech-pill:nth-child(4) { transition-delay: 0.08s; }
.tech-pill:nth-child(5) { transition-delay: 0.1s; }
.tech-pill:nth-child(6) { transition-delay: 0.12s; }
.tech-pill:nth-child(7) { transition-delay: 0.14s; }
.tech-pill:nth-child(8) { transition-delay: 0.16s; }
.tech-pill:nth-child(9) { transition-delay: 0.18s; }
.tech-pill:nth-child(10) { transition-delay: 0.2s; }

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

  .nav-mobile-toggle {
    display: flex;
  }

  .hero {
    padding: 120px 20px 60px;
  }

  .hero-logo {
    height: 36px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
  }

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

  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }

  .hero-stat-divider {
    width: 40px;
    height: 1px;
  }

  .hero-preview {
    margin-top: 40px;
  }

  .screenshot-slide {
    padding: 0 8px;
  }

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

  .section-title {
    font-size: 26px;
  }

  .features, .screenshots, .get-started, .tech-stack {
    padding: 64px 20px;
  }

  .install-steps {
    flex-direction: column;
    gap: 20px;
    margin-bottom: 48px;
    max-width: 100%;
  }

  .install-step {
    max-width: 100%;
    overflow: hidden;
  }

  .install-step-content {
    overflow: hidden;
    max-width: 100%;
  }

  .code-block code {
    font-size: 11px;
    white-space: pre-wrap;
    word-break: break-all;
  }

  .github-card {
    padding: 20px;
  }

  .github-card-meta {
    gap: 12px;
  }

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

  .footer-left {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .hero-logo {
    height: 28px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .install-step {
    flex-direction: column;
    gap: 8px;
  }
}
