/* ============================================
   Reddit AI Digest - Website Styles
   Design: Dark tech aesthetic with Reddit orange
   ============================================ */

/* CSS Variables */
:root {
  /* Colors */
  --bg-primary: #0a0a0b;
  --bg-secondary: #121214;
  --bg-tertiary: #1a1a1d;
  --bg-card: #1e1e21;

  --reddit-orange: #ff4500;
  --reddit-orange-light: #ff6b35;
  --reddit-orange-glow: rgba(255, 69, 0, 0.3);

  --text-primary: #f0f0f2;
  --text-secondary: #a0a0a5;
  --text-muted: #6a6a70;

  --border-color: #2a2a2e;
  --border-hover: #3a3a3e;

  /* Typography */
  --font-display: 'Cabinet Grotesk', 'SF Pro Display', system-ui, sans-serif;
  --font-body: 'Inter', 'SF Pro Text', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 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;

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

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

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
  color: var(--text-secondary);
  max-width: 65ch;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-narrow {
  max-width: 800px;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-base);
}

.nav.scrolled {
  border-bottom-color: var(--border-color);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--reddit-orange), var(--reddit-orange-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo-icon svg {
  width: 20px;
  height: 20px;
  fill: white;
}

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

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

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--reddit-orange);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.nav-cta:hover {
  background: var(--reddit-orange-light);
  transform: translateY(-1px);
}

.nav-cta svg {
  width: 16px;
  height: 16px;
}

/* Mobile Menu */
.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: var(--space-sm);
}

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

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

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
  }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--space-4xl) 0;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    ellipse at 30% 20%,
    var(--reddit-orange-glow) 0%,
    transparent 50%
  );
  animation: pulse 8s ease-in-out infinite;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
}

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

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

@media (max-width: 968px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.hero-text {
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}

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

.hero-title {
  margin-bottom: var(--space-lg);
}

.hero-title span {
  color: var(--reddit-orange);
}

.hero-description {
  font-size: 1.15rem;
  margin-bottom: var(--space-xl);
}

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

@media (max-width: 968px) {
  .hero-actions {
    justify-content: center;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--reddit-orange);
  color: white;
}

.btn-primary:hover {
  background: var(--reddit-orange-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 40px var(--reddit-orange-glow);
}

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

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

.btn svg {
  width: 20px;
  height: 20px;
}

/* Hero Visual */
.hero-visual {
  position: relative;
}

.hero-mockup {
  position: relative;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 20px 50px -20px rgba(0, 0, 0, 0.5);
}

.hero-mockup-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.mockup-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-color);
}

.mockup-dot:nth-child(1) { background: #ff5f57; }
.mockup-dot:nth-child(2) { background: #ffbd2e; }
.mockup-dot:nth-child(3) { background: #28c840; }

.hero-mockup-content {
  padding: var(--space-lg);
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: var(--space-md);
  min-height: 300px;
}

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

.mockup-comments {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.mockup-comment {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  opacity: 0.6;
  animation: fadeSlide 0.5s ease forwards;
}

.mockup-comment:nth-child(2) { animation-delay: 0.1s; }
.mockup-comment:nth-child(3) { animation-delay: 0.2s; }
.mockup-comment:nth-child(4) { animation-delay: 0.3s; }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 0.6; transform: translateX(0); }
}

.comment-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border-color);
  flex-shrink: 0;
}

.comment-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comment-line {
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
}

.comment-line:last-child {
  width: 70%;
}

.mockup-panel {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--reddit-orange);
  padding: var(--space-md);
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px var(--reddit-orange-glow); }
  50% { box-shadow: 0 0 40px var(--reddit-orange-glow); }
}

.panel-header {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--reddit-orange);
  margin-bottom: var(--space-md);
}

.panel-insight {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.panel-insight:last-child {
  border-bottom: none;
}

.insight-bullet {
  width: 4px;
  height: 4px;
  background: var(--reddit-orange);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============================================
   Features Section
   ============================================ */
.features {
  padding: var(--space-4xl) 0;
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--reddit-orange);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-description {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

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

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

.feature-card {
  padding: var(--space-xl);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.feature-card:hover {
  border-color: var(--reddit-orange);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--reddit-orange-glow);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  color: var(--reddit-orange);
}

.feature-title {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

.feature-description {
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-3xl);
}

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

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

.step {
  position: relative;
  text-align: center;
}

.step-number {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 2px solid var(--reddit-orange);
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--reddit-orange);
  margin: 0 auto var(--space-lg);
}

.step-title {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}

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

/* ============================================
   Pricing Section
   ============================================ */
.pricing {
  padding: var(--space-4xl) 0;
  background: var(--bg-secondary);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  max-width: 800px;
  margin: 0 auto;
}

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

.pricing-card {
  padding: var(--space-xl);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
}

.pricing-card.featured {
  border-color: var(--reddit-orange);
  position: relative;
}

.pricing-card.featured::before {
  content: 'Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-xs) var(--space-md);
  background: var(--reddit-orange);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.pricing-name {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.pricing-price {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  margin-bottom: var(--space-xl);
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.pricing-features li svg {
  width: 16px;
  height: 16px;
  color: #22c55e;
  flex-shrink: 0;
}

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

/* ============================================
   CTA Section
   ============================================ */
.cta {
  padding: var(--space-4xl) 0;
  text-align: center;
}

.cta-box {
  padding: var(--space-3xl);
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: radial-gradient(circle, var(--reddit-orange-glow) 0%, transparent 50%);
  opacity: 0.3;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-title {
  margin-bottom: var(--space-md);
}

.cta-description {
  max-width: 500px;
  margin: 0 auto var(--space-xl);
  font-size: 1.1rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: var(--space-3xl) 0 var(--space-xl);
  border-top: 1px solid var(--border-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

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

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

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
}

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

.footer-column h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

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

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

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

@media (max-width: 600px) {
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-social a:hover {
  color: var(--reddit-orange);
}

/* ============================================
   Legal Pages
   ============================================ */
.legal-page {
  padding: calc(80px + var(--space-3xl)) 0 var(--space-4xl);
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h1 {
  margin-bottom: var(--space-md);
}

.legal-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--space-2xl);
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.legal-content h3 {
  font-size: 1.2rem;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.legal-content p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.legal-content ul, .legal-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
  color: var(--text-secondary);
}

.legal-content li {
  margin-bottom: var(--space-sm);
}

.legal-content a {
  color: var(--reddit-orange);
  text-decoration: underline;
}

.legal-content a:hover {
  color: var(--reddit-orange-light);
}

/* ============================================
   Support Page
   ============================================ */
.support-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

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

.support-card {
  padding: var(--space-xl);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.support-card h3 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
}

.support-card svg {
  width: 20px;
  height: 20px;
  color: var(--reddit-orange);
}

.faq-item {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.faq-answer {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.text-orange { color: var(--reddit-orange); }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
