/* Modern Reset & Design System variables */
:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #131929;
  --bg-card: rgba(30, 41, 59, 0.4);
  --border-card: rgba(255, 255, 255, 0.08);
  --accent-primary: #38bdf8;
  --accent-secondary: #2563eb;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --container-max: 1200px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.15);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Base Layout & Responsive Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(11, 15, 25, 0.8);
  border-bottom: 1px solid var(--border-card);
}

.navbar-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--accent-primary);
}

.navbar-cta {
  margin-left: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.3);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-card);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Home / Hero Section */
.hero {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 6rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background-color: rgba(56, 189, 248, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.hero-badge:hover {
  background-color: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 3rem;
}

.hero-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.mockup-wrapper {
  position: relative;
  width: 100%;
  max-width: 320px;
  border-radius: 40px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5), var(--shadow-glow);
}

.mockup-inner {
  width: 100%;
  aspect-ratio: 9/19.5;
  background-color: #0c101b;
  border-radius: 32px;
  overflow: hidden;
  border: 4px solid #1e293b;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  text-align: center;
}

.mockup-app-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin-bottom: 1.5rem;
}

.mockup-app-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.mockup-app-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Features Grid */
.features-section,
.indexes-section {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

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

.feature-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 2.5rem 2rem;
  border-radius: 16px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.3);
  background-color: rgba(30, 41, 59, 0.6);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-gradient);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  font-weight: bold;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex-grow: 1;
}

/* Docs / Two-Column Responsive Layout */
.docs-layout {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 90px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1.5rem;
}

.sidebar-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 700;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.sidebar-menu a:hover, .sidebar-menu a.active {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-menu a.active {
  color: var(--accent-primary);
  border-left: 2px solid var(--accent-primary);
  border-radius: 0 6px 6px 0;
  padding-left: 0.65rem;
}

.docs-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 3rem 2.5rem;
}

/* Markdown typography inside docs */
.markdown-body h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-card);
  padding-bottom: 0.5rem;
}

.markdown-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.markdown-body p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.markdown-body ul, .markdown-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.markdown-body li {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.markdown-body strong {
  color: var(--text-primary);
}

.markdown-body a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.markdown-body a:hover {
  text-decoration: underline;
}

.markdown-body pre {
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.markdown-body code {
  font-family: monospace;
  font-size: 0.9rem;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: #f43f5e;
}

.markdown-body pre code {
  background-color: transparent;
  padding: 0;
  color: var(--text-primary);
}

.markdown-body blockquote {
  border-left: 4px solid var(--accent-primary);
  padding: 0.5rem 1rem;
  background-color: rgba(56, 189, 248, 0.05);
  margin-bottom: 1.5rem;
  border-radius: 0 8px 8px 0;
}

.markdown-body blockquote p {
  margin-bottom: 0;
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border-card);
  background-color: #080b12;
  padding: 4rem 1.5rem;
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.footer-brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

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

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

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

/* Responsive Breakpoints */
@media (max-width: 968px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 3rem 1.5rem;
    text-align: center;
  }
  
  .hero-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .hero-title {
    font-size: 2.75rem;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .docs-sidebar {
    position: static;
  }
}

@media (max-width: 576px) {
  .navbar-container {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .navbar-cta {
    margin-left: 0;
    width: 100%;
  }
  
  .navbar-cta .btn {
    width: 100%;
  }
  
  .hero-title {
    font-size: 2.25rem;
  }
  
  .hero-cta .btn {
    width: 100%;
  }
  
  .docs-content {
    padding: 2rem 1.5rem;
  }
}

/* Modern Marketing Enhancements & Keyframe Animations */

/* Background Glow Effects */
.hero {
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, rgba(37, 99, 235, 0.03) 50%, transparent 100%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

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

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
  }
  50% {
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.35);
  }
}

.hero-badge {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title {
  animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
  opacity: 0;
}

.hero-subtitle {
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
  opacity: 0;
}

.hero-cta {
  animation: fadeInUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
  opacity: 0;
}

/* Animated interactive states */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transform: skewX(-25deg);
  transition: 0.75s;
}

.btn-primary:hover::after {
  left: 125%;
}

/* Enhancing card micro-animations */
.feature-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s ease,
              background-color 0.4s ease,
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.1);
}

.feature-icon {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(3deg);
}

/* Responsive grid transitions */
.features-grid {
  animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
  opacity: 0;
}
