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

:root {
  --bg-primary: #0A0E1A;
  --bg-secondary: #111627;
  --bg-card: #151B2E;
  --bg-card-hover: #1A2140;
  --border-color: #1E2745;
  --border-hover: #2E3A6A;
  --text-primary: #E8ECF4;
  --text-secondary: #8B95B8;
  --text-muted: #5A6488;
  --accent: #3050FF;
  --accent-hover: #4A6CFF;
  --accent-glow: rgba(48, 80, 255, 0.15);
  --accent-subtle: rgba(48, 80, 255, 0.08);
  --success: #34D399;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --max-width: 1100px;
}

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

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

/* ---- Noise overlay ---- */
#noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.03;
  mix-blend-mode: overlay;
}

/* ---- Nav ---- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--border-color);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
}

.nav-logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: color .2s;
}

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

.nav-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff !important;
  padding: 6px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  transition: background .2s, transform .15s;
}

.nav-download:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 6px;
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-subtle);
  border: 1px solid var(--border-color);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.3px;
  margin-bottom: 28px;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  max-width: 750px;
}

.hero h1 span {
  background: linear-gradient(135deg, #6B8CFF, #3050FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(48, 80, 255, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  border: 1px solid var(--border-color);
  transition: background .2s, border-color .2s, transform .15s;
}

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

.hero-platforms {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 50px;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.platform-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.platform-badge svg {
  width: 16px;
  height: 16px;
}

.platform-divider {
  width: 1px;
  height: 20px;
  background: var(--border-color);
}

/* ---- Specs section (like hermes-agent desktop page) ---- */
.specs {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2px;
  background: var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.spec-item {
  background: var(--bg-card);
  padding: 24px 28px;
  transition: background .2s;
}

.spec-item:hover {
  background: var(--bg-card-hover);
}

.spec-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.spec-value {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- Features section ---- */
.features {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  max-width: 650px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 500px;
  margin-bottom: 48px;
  line-height: 1.7;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: all .25s;
  position: relative;
}

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

.feature-number {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ---- Deep Dive section ---- */
.deep-dive {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.deep-dive-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.deep-dive-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

.deep-dive-content p {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.75;
  margin-bottom: 16px;
  max-width: 650px;
}

.deep-dive-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.deep-dive-meta span {
  font-size: 13px;
  color: var(--text-muted);
}

.read-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color .2s;
}

.read-link:hover {
  color: var(--accent-hover);
}

/* ---- Quick Start ---- */
.quickstart {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.quickstart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  counter-reset: step;
}

.quickstart-step {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all .25s;
}

.quickstart-step:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.quickstart-step .step-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.quickstart-step h4 {
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 8px;
}

.quickstart-step p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.quickstart-step code {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-primary);
  margin-top: 8px;
}

/* ---- FAQ ---- */
.faq-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color .2s;
}

.faq-item:hover {
  border-color: var(--border-hover);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  transition: background .2s;
}

.faq-question:hover {
  background: var(--bg-card-hover);
}

.faq-question svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform .2s;
  flex-shrink: 0;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  padding: 0 24px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 24px 18px;
}

/* ---- Primary Sources ---- */
.sources {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.source-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: all .25s;
  display: flex;
  flex-direction: column;
}

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

.source-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.source-card p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.source-card .source-link {
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 500;
  margin-top: 12px;
}

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border-color);
  padding: 24px;
  text-align: center;
}

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

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

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

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

.animate-in {
  animation: fadeUp .6s ease forwards;
  opacity: 0;
}

.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 16px 24px;
    gap: 12px;
  }
  .nav-links.open {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
  .hero-platforms {
    flex-wrap: wrap;
    justify-content: center;
  }
  .platform-divider {
    display: none;
  }
  .specs {
    grid-template-columns: 1fr;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .quickstart-grid {
    grid-template-columns: 1fr;
  }
}
