/* ── Design Tokens ──────────────────────────────────────────────────────────── */
:root {
  /* Palette */
  --bg-primary: #06060c;
  --bg-secondary: #0c0c18;
  --bg-card: rgba(17, 17, 34, 0.65);
  --bg-card-hover: rgba(26, 26, 52, 0.8);
  --bg-code: #0a0a16;

  --text-primary: #e8e6f0;
  --text-secondary: #8b89a6;
  --text-muted: #5a5878;
  --text-accent: #c4b5fd;

  --accent-primary: #7c3aed;
  --accent-secondary: #6d28d9;
  --accent-glow: rgba(124, 58, 237, 0.25);
  --accent-gradient: linear-gradient(135deg, #7c3aed, #a855f7);
  --accent-gradient-hover: linear-gradient(135deg, #8b5cf6, #c084fc);

  --border-color: rgba(124, 58, 237, 0.12);
  --border-card: rgba(124, 58, 237, 0.18);

  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;

  /* Sizing */
  --max-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

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

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

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

a {
  color: var(--text-accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: #e9d5ff; }

img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Background Effects ─────────────────────────────────────────────────────── */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
}

.bg-glow {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.3;
}
.bg-glow--1 {
  width: 600px; height: 600px;
  top: -200px; left: -100px;
  background: var(--accent-primary);
}
.bg-glow--2 {
  width: 500px; height: 500px;
  bottom: 10%; right: -150px;
  background: #4f46e5;
  opacity: 0.15;
}

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
}

/* ── Navigation ─────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled {
  background: rgba(6, 6, 12, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.nav__brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text-primary); }
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.88rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  padding: 180px 0 120px;
  text-align: center;
  position: relative;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  color: var(--text-accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 28px;
  animation: fadeInDown 0.7s ease;
}
.hero__badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.08;
  max-width: 900px;
  margin: 0 auto 24px;
  animation: fadeInUp 0.8s ease;
}
.hero h1 .gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__sub {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 48px;
  line-height: 1.7;
  animation: fadeInUp 0.9s ease;
}
.hero__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s;
  border: none;
}
.btn--primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--accent-glow);
  color: #fff;
}
.btn--secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(10px);
}
.btn--secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-2px);
  color: var(--text-primary);
}

/* ── Hero Code Preview ──────────────────────────────────────────────────────── */
.hero__preview {
  max-width: 780px;
  margin: 64px auto 0;
  border-radius: var(--radius-lg);
  background: var(--bg-code);
  border: 1px solid var(--border-card);
  overflow: hidden;
  animation: fadeInUp 1.1s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.preview__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: rgba(17, 17, 34, 0.6);
  border-bottom: 1px solid var(--border-color);
}
.preview__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.preview__dot--red { background: #f87171; }
.preview__dot--amber { background: #fbbf24; }
.preview__dot--green { background: #34d399; }
.preview__bar span {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.preview__code {
  padding: 24px 28px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.9;
  overflow-x: auto;
  color: var(--text-secondary);
}
.preview__code .kw { color: #c084fc; }
.preview__code .str { color: #34d399; }
.preview__code .comment { color: var(--text-muted); font-style: italic; }
.preview__code .flag { color: #fbbf24; }
.preview__code .url { color: #60a5fa; }

/* ── How It Works ───────────────────────────────────────────────────────────── */
.how-it-works {
  text-align: center;
}
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.section-sub {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 60px;
  font-size: 1.05rem;
}

.flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  max-width: 1000px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.flow__step {
  flex: 1;
  min-width: 180px;
  padding: 36px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  position: relative;
  transition: all 0.3s;
}
.flow__step:first-child { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.flow__step:last-child { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.flow__step:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  z-index: 1;
}
.flow__icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: rgba(124, 58, 237, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.5rem;
}
.flow__step h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.flow__step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.flow__arrow {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  padding: 0 4px;
}

/* ── Features ───────────────────────────────────────────────────────────────── */
.features {
  text-align: center;
}
.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 60px;
}
.feature-card {
  text-align: left;
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(12px);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s;
}
.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}
.feature-card:hover::before { opacity: 1; }

.feature-card__icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(124, 58, 237, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 20px;
}
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}
.feature-card__tag {
  display: inline-block;
  margin-top: 16px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.feature-card__tag--new {
  background: rgba(52, 211, 153, 0.12);
  color: var(--green);
}
.feature-card__tag--security {
  background: rgba(124, 58, 237, 0.12);
  color: var(--text-accent);
}

/* ── Code Demo ──────────────────────────────────────────────────────────────── */
.demo {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}
.demo__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}
.demo__text h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.demo__text p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 32px;
  line-height: 1.7;
}
.demo__steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.demo__step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.demo__step-num {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.15);
  color: var(--text-accent);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.demo__step-text h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.demo__step-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}
.demo__code {
  border-radius: var(--radius-lg);
  background: var(--bg-code);
  border: 1px solid var(--border-card);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.demo__code .preview__code {
  font-size: 0.82rem;
}

/* ── Security Section ───────────────────────────────────────────────────────── */
.security {
  text-align: center;
}
.security__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 48px;
}
.security__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  text-align: left;
  transition: all 0.25s;
}
.security__item:hover {
  border-color: rgba(52, 211, 153, 0.2);
  transform: translateY(-2px);
}
.security__check {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.12);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  margin-top: 2px;
}
.security__item h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.security__item p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── CTA ────────────────────────────────────────────────────────────────────── */
.cta {
  text-align: center;
  padding: 120px 0;
  position: relative;
}
.cta__box {
  max-width: 700px;
  margin: 0 auto;
  padding: 72px 48px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(79, 70, 229, 0.08));
  border: 1px solid rgba(124, 58, 237, 0.2);
  position: relative;
  overflow: hidden;
}
.cta__box::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--accent-gradient);
  border-radius: var(--radius-xl);
  z-index: -1;
  opacity: 0.15;
  filter: blur(40px);
}
.cta h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.cta p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 36px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.cta__code {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-code);
  border: 1px solid var(--border-card);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-accent);
  margin-top: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.cta__code:hover {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer__copy {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer__links {
  display: flex;
  gap: 24px;
}
.footer__links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--text-secondary); }

/* ── Animations ─────────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  section { padding: 72px 0; }
  .hero { padding: 140px 0 80px; }

  .nav__links { display: none; }

  .flow {
    flex-direction: column;
    align-items: stretch;
    max-width: 360px;
  }
  .flow__step:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .flow__step:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
  .flow__arrow { justify-content: center; transform: rotate(90deg); }

  .demo__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .cta__box { padding: 48px 24px; }
}
