@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg-base: #070f1b;
  --bg-surface: #0a1425;
  --bg-elevated: #0f1d33;
  --bg-card: rgba(15, 29, 51, 0.6);
  --border-subtle: #1a2a45;
  --border-accent: #2a3a55;
  --accent: #1d9b69;
  --accent-light: #2aae79;
  --accent-glow: rgba(29, 155, 105, 0.15);
  --accent-glow-strong: rgba(29, 155, 105, 0.3);
  --blue: #2563eb;
  --text-primary: rgba(255, 255, 255, 0.9);
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-tertiary: rgba(255, 255, 255, 0.4);
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
}

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

html {
  scroll-behavior: smooth;
}

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

/* ── Ambient background glow ── */
.bg-glow {
  position: fixed;
  top: -30%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.bg-glow-2 {
  position: fixed;
  bottom: -20%;
  right: -15%;
  width: 50%;
  height: 50%;
  background: radial-gradient(ellipse, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ── */
.wrapper {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Navigation ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4rem;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand .brand-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--accent-glow-strong);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.2s ease;
}

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

/* ── Hero Section ── */
.hero {
  padding: 2rem 0 4rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: var(--accent-glow);
  border: 1px solid rgba(29, 155, 105, 0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-light);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-glow-strong); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px transparent; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent-light) 0%, #4ade80 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-lg);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 0 30px var(--accent-glow-strong);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

/* ── Code blocks ── */
.code-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1rem 0 1.5rem;
  overflow-x: auto;
  position: relative;
}

.code-block code {
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.code-block .code-label {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-elevated);
  border-bottom-left-radius: var(--radius-sm);
  border-top-right-radius: var(--radius-md);
  border-left: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.code-block .code-comment {
  color: var(--text-tertiary);
}

.code-block .code-string {
  color: var(--accent-light);
}

/* ── Section headings ── */
.section {
  padding: 3rem 0;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.section > p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 600px;
  margin-bottom: 2rem;
}

/* ── Feature cards grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.feature-card:hover {
  border-color: var(--border-accent);
  background: rgba(15, 29, 51, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

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

/* ── Setup tabs ── */
.setup-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-subtle);
}

.setup-tab {
  padding: 0.625rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.setup-tab.active {
  color: var(--accent-light);
}

.setup-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.setup-content {
  display: none;
}

.setup-content.active {
  display: block;
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 1rem 0;
}

/* ── Open Source banner ── */
.oss-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-top: 2rem;
  backdrop-filter: blur(8px);
}

.oss-banner .oss-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.oss-banner p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.oss-banner a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.oss-banner a:hover {
  color: #4ade80;
}

/* ── Footer ── */
footer {
  margin-top: 5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.825rem;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

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

/* ── Legal pages ── */
.legal-content {
  padding: 1rem 0 3rem;
}

.legal-content .last-updated {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-content h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2.5rem 0 0.75rem;
  letter-spacing: -0.01em;
}

.legal-content p {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.legal-content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1rem;
}

.legal-content ul li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.7;
}

.legal-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

.legal-content strong {
  color: var(--text-primary);
  font-weight: 500;
}

.legal-content a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-content a:hover {
  color: #4ade80;
}

.legal-content code {
  font-family: 'SF Mono', 'Cascadia Code', monospace;
  font-size: 0.85em;
  background: var(--bg-elevated);
  padding: 0.15em 0.45em;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  color: var(--accent-light);
}

/* ── Animations ── */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fade-in-up 0.5s ease-out forwards;
  opacity: 0;
}

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

/* ── Responsive ── */
@media (max-width: 640px) {
  nav {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .oss-banner {
    flex-direction: column;
    gap: 1rem;
  }
}
