/* ===== Variables ===== */
:root {
  --bg: #0a0a0f;
  --bg-card: rgba(255, 255, 255, 0.05);
  --border-card: rgba(255, 255, 255, 0.1);
  --accent: #7c5cfc;
  --accent-glow: rgba(124, 92, 252, 0.4);
  --text: #ffffff;
  --text-secondary: #a0a0b0;
  --radius: 16px;
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* ===== Background Orbs ===== */
.bg-orbs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-orbs .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
}

.bg-orbs .orb:nth-child(1) {
  width: 600px;
  height: 600px;
  background: var(--accent);
  top: -200px;
  left: -100px;
  animation-delay: 0s;
}

.bg-orbs .orb:nth-child(2) {
  width: 400px;
  height: 400px;
  background: #4c3ccc;
  bottom: -100px;
  right: -100px;
  animation-delay: -7s;
}

.bg-orbs .orb:nth-child(3) {
  width: 300px;
  height: 300px;
  background: #3c8cfc;
  top: 50%;
  left: 60%;
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

@media (prefers-reduced-motion: reduce) {
  .bg-orbs .orb {
    animation: none;
  }
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ===== Section spacing ===== */
section {
  padding: 80px 0;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-card);
  z-index: 100;
  display: flex;
  align-items: center;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.navbar-brand img {
  width: 32px;
  height: 32px;
}

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

.navbar-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color 0.2s;
  position: relative;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--text);
  text-decoration: none;
}

.navbar-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

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

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 6px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* Mobile nav */
@media (max-width: 767px) {
  .hamburger {
    display: block;
  }

  .navbar-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-card);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .navbar-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .hamburger.open span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }
}

/* ===== Glass Card ===== */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--accent-glow);
  border-color: rgba(124, 92, 252, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  .glass-card {
    transition: none;
  }
  .glass-card:hover {
    transform: none;
  }
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border-card);
  padding: 32px 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.footer a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

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

.btn-primary:hover {
  box-shadow: 0 4px 24px var(--accent-glow);
  color: #fff;
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover {
    transform: none;
  }
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== Main ===== */
main {
  padding-top: var(--nav-height);
}

/* ===== Hero ===== */
.hero {
  padding: 120px 0 80px;
  text-align: center;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: 24px;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Highlights grid ===== */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.highlights-grid .glass-card {
  color: var(--text);
  text-decoration: none;
  display: block;
}

.highlights-grid .glass-card:hover {
  text-decoration: none;
}

.highlight-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

/* ===== CTA Section ===== */
.cta-section {
  text-align: center;
}

.cta-content h2 {
  margin-bottom: 16px;
}

.cta-content p {
  margin-bottom: 32px;
  font-size: 1.1rem;
}

/* ===== Page Header ===== */
.page-header {
  padding: 80px 0 40px;
  text-align: center;
}

.page-header p {
  margin-top: 12px;
  font-size: 1.15rem;
}

/* ===== Features Grid ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

/* ===== Docs Layout ===== */
.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.docs-nav {
  padding: 20px;
}

.docs-nav h4 {
  margin-bottom: 12px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.docs-nav ul {
  list-style: none;
}

.docs-nav li {
  margin-bottom: 8px;
}

.docs-nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.docs-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

.docs-block {
  margin-bottom: 48px;
}

.docs-block h2 {
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-card);
}

.docs-block h3 {
  margin: 24px 0 12px;
}

.docs-block p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.docs-block ul {
  margin-bottom: 16px;
  padding-left: 24px;
}

.docs-block li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* ===== Code Blocks ===== */
pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 16px;
}

code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

:not(pre) > code {
  background: rgba(124, 92, 252, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* Docs responsive */
@media (max-width: 767px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
  }
}

/* ===== Downloads ===== */
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.download-card {
  text-align: center;
}

.download-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.download-card h3 {
  margin-bottom: 8px;
}

.download-card p {
  margin-bottom: 20px;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(124, 92, 252, 0.15);
  color: var(--accent);
  border: 1px solid rgba(124, 92, 252, 0.3);
}
