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

:root {
  --bg-primary: #06060c;
  --bg-secondary: #0b0b14;
  --bg-card: rgba(255, 255, 255, 0.03);
  --accent-start: #3b82f6;
  --accent-end: #8b5cf6;
  --accent-glow: rgba(59, 130, 246, 0.2);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.15);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nav-height: 70px;
}

html, body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  max-width: 100vw;
}

/* Scroll Snap Container */
.scroll-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
}

.scroll-container section,
.scroll-container footer {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 24px 40px;
  overflow: hidden;
}

/* Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* Sticky/Fixed Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(6, 6, 12, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  transition: all 0.3s ease;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-brand img {
  border-radius: 8px;
  box-shadow: 0 0 12px var(--accent-glow);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
  padding: 6px 0;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Mobile Nav Open State */
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero Section */
#hero {
  background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.08), transparent 60%), var(--bg-primary);
  text-align: center;
  min-height: 100vh;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-icon-lg {
  border-radius: 24px;
  box-shadow: 0 0 40px var(--accent-glow);
  margin-bottom: 2rem;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

#hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-start) 70%, var(--accent-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 650px;
}

.badges {
  display: flex;
  gap: 12px;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.badges img {
  height: 20px;
}

.cta-group {
  display: flex;
  gap: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

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

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

/* Advantages Section */
#advantages {
  background: var(--bg-secondary);
  width: 100%;
}

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

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 50%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.grid-advantages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 40px 30px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.card h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

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

/* Features Section */
#features {
  background: var(--bg-primary);
  width: 100%;
  min-height: 100vh;
}

.features-container {
  display: flex;
  gap: 40px;
  width: 100%;
  max-width: 1200px;
  height: 550px;
  margin-top: 2rem;
  padding: 0 20px;
}

.features-sidebar {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 16px 24px;
  border-radius: 12px;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.tab-btn.active {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.features-content {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.tab-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.98);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tab-panel.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.tab-panel h3 {
  font-size: 1.8rem;
  font-weight: 700;
}

.tab-panel p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Accordion for detail items inside feature */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.accordion-item {
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.accordion-header {
  width: 100%;
  border: 0;
  color: var(--text-primary);
  font-family: inherit;
  text-align: left;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.01);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.3s;
}

.accordion-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.accordion-icon {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.accordion-item.open .accordion-content {
  padding: 16px 20px;
}

/* Custom Syntax Highlight Mock */
.code-preview {
  background: #030307;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  overflow-x: auto;
  position: relative;
  max-height: 250px;
}

.code-keyword { color: #f43f5e; }
.code-string { color: #10b981; }
.code-comment { color: #64748b; font-style: italic; }
.code-number { color: #f59e0b; }
.code-func { color: #3b82f6; }

/* Quickstart Section */
#quickstart {
  background: var(--bg-secondary);
  width: 100%;
}

.steps-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
  max-width: 800px;
  padding: 0 20px;
}

.step {
  display: flex;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 30px;
  position: relative;
}

.step-num {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.step-content {
  flex: 1;
}

.step-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.step-content p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.terminal-cmd {
  background: #030307;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  font-size: 0.9rem;
}

.terminal-cmd code {
  color: #10b981;
}

.btn-copy {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Footer */
footer {
  background: #030306;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 60px 24px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
  text-decoration: none;
}

.footer-logo img {
  border-radius: 6px;
}

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

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

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

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

/* Scroll Indicators */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  padding: 6px;
  border: 0;
  background: transparent;
  transform: translateX(-50%);
  color: var(--text-secondary);
  animation: bounce 2s infinite;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s;
  z-index: 5;
}

.scroll-indicator:hover {
  opacity: 1;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

/* Hide indicator on last sections if needed */
section:last-of-type .scroll-indicator {
  display: none;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .grid-advantages {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features-container {
    height: auto;
    flex-direction: column;
  }
  
  .features-sidebar {
    flex: none;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  
  .tab-btn {
    white-space: nowrap;
  }
  
  .features-content {
    min-height: 450px;
  }
}

@media (max-width: 768px) {
  .scroll-container {
    scroll-snap-type: y proximity;
  }

  .scroll-container section {
    justify-content: flex-start;
    overflow: visible;
    padding-top: 110px;
    padding-bottom: 90px;
  }

  nav {
    padding: 0 20px;
  }
  
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(6, 6, 12, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
  }
  
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  
  .hamburger {
    display: block;
  }
  
  #hero h1 {
    font-size: 2.5rem;
  }
  
  .grid-advantages {
    grid-template-columns: 1fr;
  }
  
  .step {
    flex-direction: column;
    gap: 16px;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .features-content {
    min-height: 580px;
  }

  .tab-panel {
    padding: 26px 20px;
  }

  .terminal-cmd {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .nav-brand span {
    display: none;
  }

  #hero h1 {
    font-size: 2.15rem;
  }

  #hero p {
    font-size: 1.05rem;
  }

  .cta-group {
    width: 100%;
    flex-direction: column;
    gap: 12px;
  }

  .btn {
    width: 100%;
  }

  .grid-advantages,
  .features-container,
  .steps-container {
    padding-inline: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
