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

:root {
  --bg:         #0a0e1a;
  --bg-surface: #111827;
  --bg-card:    #1a2236;
  --border:     rgba(255,255,255,0.08);
  --border-hover: rgba(0,122,204,0.5);

  --accent:     #007ACC;
  --accent-bright: #1a8fe0;
  --teal:       #4EC9B0;
  --purple:     #a78bfa;
  --green:      #34d399;
  --yellow:     #fbbf24;
  --red:        #f87171;

  --text:       #f0f6fc;
  --text-dim:   #8b949e;
  --text-muted: #4a5568;

  --radius:     10px;
  --radius-lg:  16px;
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 48px rgba(0,0,0,0.6);

  --font:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:  "Cascadia Code", "Fira Code", "JetBrains Mono", "Courier New", monospace;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

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

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-bright); }
code { font-family: var(--font-mono); font-size: 0.875em; background: rgba(0,122,204,0.15); padding: 2px 6px; border-radius: 4px; color: var(--teal); }
kbd { font-family: var(--font-mono); font-size: 0.8em; background: var(--bg-card); border: 1px solid var(--border); padding: 2px 6px; border-radius: 4px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font); font-size: 0.95rem; font-weight: 600;
  border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; transition: all var(--transition);
  text-decoration: none;
}
.btn-sm  { padding: 6px 14px; font-size: 0.85rem; }
.btn-lg  { padding: 14px 28px; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; padding: 14px; }

.btn-primary {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-bright); border-color: var(--accent-bright); color: #fff; transform: translateY(-1px); }

.btn-outline {
  background: transparent; color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover { background: rgba(0,122,204,0.1); transform: translateY(-1px); }

.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--border-hover); color: var(--accent); }

/* ── Navigation ─────────────────────────────────────────────────── */
.nav-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,14,26,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.nav-header.scrolled { box-shadow: var(--shadow); }

.nav-container {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; height: 64px; gap: 32px;
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.1rem; color: var(--text);
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--accent); }

.nav-links {
  display: flex; list-style: none; gap: 28px; flex: 1;
}
.nav-links a { color: var(--text-dim); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all var(--transition); }

@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-surface); padding: 20px 24px; flex-direction: column; gap: 16px; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-hamburger { display: flex; }
}

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  padding: 100px 0 80px;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0,122,204,0.12), transparent);
  text-align: center;
}

.hero-badge { margin-bottom: 24px; }
.badge {
  display: inline-block; background: rgba(0,122,204,0.15);
  border: 1px solid rgba(0,122,204,0.3); border-radius: 999px;
  padding: 6px 16px; font-size: 0.85rem; color: var(--teal);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15;
  letter-spacing: -0.02em; margin-bottom: 24px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--teal));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem; color: var(--text-dim); max-width: 620px;
  margin: 0 auto 36px; line-height: 1.7;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }

.hero-stats {
  display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
  margin-bottom: 60px; padding: 24px; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  max-width: 540px; margin-left: auto; margin-right: auto;
}
.stat { text-align: center; }
.stat-number { display: block; font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.stat-label  { font-size: 0.8rem; color: var(--text-dim); }

/* Hero screenshot */
.hero-screenshot { max-width: 760px; margin: 0 auto; }
.window-chrome {
  background: #2d2d30; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 12px 16px; display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }
.window-title { font-size: 0.8rem; color: var(--text-dim); margin-left: 8px; }

.code-demo {
  background: #1e1e1e; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 24px; text-align: left; border: 1px solid var(--border); border-top: none;
}
.code-demo pre { margin-bottom: 24px; overflow-x: auto; }
.code-demo code { background: none; padding: 0; font-size: 0.88rem; line-height: 1.8; }
.kw { color: #569cd6; } .cn { color: #4ec9b0; } .fn { color: #dcdcaa; } .cm { color: #6a9955; }

.call-graph-preview {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px; background: rgba(0,122,204,0.05); border-radius: var(--radius);
  border: 1px solid rgba(0,122,204,0.2);
}
.cg-node {
  padding: 6px 16px; border-radius: 6px; font-size: 0.8rem; font-family: var(--font-mono);
  background: rgba(0,122,204,0.2); border: 1px solid var(--accent); color: var(--teal);
}
.cg-node.root { background: rgba(0,122,204,0.3); border-color: var(--accent-bright); }
.cg-arrow { color: var(--text-dim); font-size: 1.2rem; }
.cg-row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* ── Section commons ─────────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 60px; }
.section-label {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.section-header h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 16px; }
.section-header p { color: var(--text-dim); max-width: 520px; margin: 0 auto; }

/* ── Features ────────────────────────────────────────────────────── */
.features { padding: 100px 0; background: var(--bg-surface); }

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

.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  transition: border-color var(--transition), transform var(--transition);
  position: relative;
}
.feature-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }

.feature-icon { width: 44px; height: 44px; margin-bottom: 16px; display: flex; align-items: center; justify-content: center; background: rgba(0,122,204,0.1); border-radius: 10px; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 0.875rem; color: var(--text-dim); line-height: 1.6; }
.feature-badge {
  position: absolute; top: 16px; right: 16px;
  font-size: 0.7rem; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.feature-badge.pro { background: rgba(0,122,204,0.2); color: var(--accent); border: 1px solid rgba(0,122,204,0.3); }
.feature-badge.free { background: rgba(52,211,153,0.15); color: var(--green); border: 1px solid rgba(52,211,153,0.3); }

/* ── How It Works ────────────────────────────────────────────────── */
.how-it-works { padding: 100px 0; }
.steps { display: flex; align-items: flex-start; gap: 0; flex-wrap: wrap; justify-content: center; }
.step { display: flex; gap: 20px; max-width: 280px; padding: 20px; }
.step-number {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
}
.step-content h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.step-content p { font-size: 0.875rem; color: var(--text-dim); }
.step-connector {
  width: 60px; height: 2px; background: var(--border);
  margin-top: 40px; flex-shrink: 0;
}
@media (max-width: 768px) { .step-connector { display: none; } }

/* ── Pricing ─────────────────────────────────────────────────────── */
.pricing { padding: 100px 0; background: var(--bg-surface); }
.pricing-toggle { display: flex; align-items: center; gap: 12px; justify-content: center; margin-top: 24px; }
.toggle-label { font-size: 0.9rem; color: var(--text-dim); }
.toggle-switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--bg-card);
  border-radius: 999px; cursor: pointer; border: 1px solid var(--border);
  transition: background var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute; height: 18px; width: 18px; border-radius: 50%;
  left: 3px; top: 3px; background: var(--text-dim); transition: transform var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); background: #fff; }
.save-badge { background: var(--green); color: #022c22; padding: 2px 6px; border-radius: 4px; font-size: 0.72rem; font-weight: 700; margin-left: 4px; }

.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px;
  align-items: start;
}
.pricing-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; position: relative;
  transition: border-color var(--transition), transform var(--transition);
}
.pricing-card:hover { transform: translateY(-2px); }
.pricing-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 32px rgba(0,122,204,0.2); }

.plan-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 700;
  padding: 4px 14px; border-radius: 999px; white-space: nowrap;
}
.plan-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.plan-price { margin-bottom: 12px; line-height: 1; }
.price-amount { font-size: 2.5rem; font-weight: 800; }
.price-period { font-size: 0.9rem; color: var(--text-dim); }
.plan-desc { font-size: 0.875rem; color: var(--text-dim); margin-bottom: 24px; min-height: 40px; }
.plan-features { list-style: none; margin-bottom: 28px; display: flex; flex-direction: column; gap: 10px; }
.plan-features li { font-size: 0.875rem; padding-left: 24px; position: relative; }
.plan-features .included::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.plan-features .excluded { color: var(--text-muted); }
.plan-features .excluded::before { content: '–'; position: absolute; left: 0; color: var(--text-muted); }

/* ── Buy Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 200; padding: 24px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px; max-width: 440px; width: 100%;
  position: relative; box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; color: var(--text-dim); font-size: 1.5rem;
  cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal h2 { margin-bottom: 8px; }
.modal > p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 28px; }
.checkout-form { display: flex; flex-direction: column; gap: 16px; }
.checkout-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.875rem; font-weight: 600; }
.checkout-form input {
  padding: 10px 14px; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius); color: var(--text);
  font-family: var(--font); font-size: 0.9rem; transition: border-color var(--transition);
}
.checkout-form input:focus { outline: none; border-color: var(--accent); }
.plan-summary {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: rgba(0,122,204,0.1);
  border-radius: var(--radius); border: 1px solid rgba(0,122,204,0.2);
  font-size: 0.875rem;
}
.checkout-note { font-size: 0.8rem; color: var(--text-dim); text-align: center; margin-top: -8px; }

/* ── FAQ ─────────────────────────────────────────────────────────── */
.faq { padding: 100px 0; }
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item:hover { border-color: var(--border-hover); }
.faq-item summary {
  padding: 18px 24px; font-weight: 600; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::after { content: '↓'; color: var(--text-dim); font-size: 0.9rem; flex-shrink: 0; transition: transform var(--transition); }
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item p { padding: 0 24px 20px; font-size: 0.9rem; color: var(--text-dim); line-height: 1.7; }

/* ── CTA section ─────────────────────────────────────────────────── */
.cta-section { padding: 80px 0; }
.cta-card {
  background: linear-gradient(135deg, rgba(0,122,204,0.15), rgba(78,201,176,0.1));
  border: 1px solid rgba(0,122,204,0.3); border-radius: var(--radius-lg);
  padding: 60px 40px; text-align: center;
}
.cta-card h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; margin-bottom: 12px; }
.cta-card p { color: var(--text-dim); margin-bottom: 32px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Footer ──────────────────────────────────────────────────────── */
.footer { padding: 60px 0 32px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand .nav-logo { font-size: 1rem; margin-bottom: 12px; display: flex; }
.footer-brand p { font-size: 0.875rem; color: var(--text-dim); max-width: 220px; }
.footer-links h4 { font-size: 0.85rem; font-weight: 700; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.875rem; color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; font-size: 0.8rem; color: var(--text-muted); }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 24px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; align-items: center; }
}
