/* AgentAuth Landing Page — Dark Developer Theme */

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

:root {
  --bg:        #0d1117;
  --surface:   #161b22;
  --surface2:  #1c2333;
  --border:    #30363d;
  --text:      #e6edf3;
  --muted:     #8b949e;
  --accent:    #7c3aed;
  --accent-lt: #a78bfa;
  --accent-glow: rgba(124, 58, 237, 0.25);
  --green:     #3fb950;
  --code-bg:   #161b22;
  --radius:    8px;
  --radius-lg: 16px;
  --max-w:     1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

section { padding: 96px 0; }
section + section { border-top: 1px solid var(--border); }

/* ── Typography ─────────────────────────────── */
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; font-weight: 600; }

.label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-lt);
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.25);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.section-header { text-align: center; margin-bottom: 64px; }
.section-header p { color: var(--muted); font-size: 1.1rem; margin-top: 16px; max-width: 560px; margin-left: auto; margin-right: auto; }

.gradient-text {
  background: linear-gradient(135deg, #a78bfa 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Nav ────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(13, 17, 23, 0.85);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo .logo-icon {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; transition: color .2s; }
.nav-links a:hover { color: var(--text); }

/* ── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all .2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover {
  background: #6d28d9;
  box-shadow: 0 0 20px 4px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent-lt);
  color: var(--accent-lt);
}

.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 10px; }

/* ── Hero ───────────────────────────────────── */
#hero {
  padding: 120px 0 96px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 500px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px 6px 10px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 32px;
}

.hero-badge .badge-new {
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#hero h1 { margin-bottom: 24px; }
#hero .subline {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 40px;
}

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

.hero-stat-bar {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.hero-stat { text-align: center; }
.hero-stat .num { font-size: 1.8rem; font-weight: 800; color: var(--text); }
.hero-stat .desc { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }

/* ── Problem ─────────────────────────────────── */
#problem { background: var(--bg); }

.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.pain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.pain-icon {
  font-size: 1.5rem;
  margin-bottom: 14px;
  display: block;
}

.pain-card h3 { margin-bottom: 10px; color: var(--text); }
.pain-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }

/* ── Before / After ─────────────────────────── */
#solution { background: var(--bg); }

.ba-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 48px;
}

@media (max-width: 720px) { .ba-grid { grid-template-columns: 1fr; } }

.code-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.code-panel.after { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 32px var(--accent-glow); }

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.panel-header .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.panel-header .dot.red { background: #ff5f57; }
.panel-header .dot.yellow { background: #febc2e; }
.panel-header .dot.green { background: #28c840; }
.panel-header .filename { margin-left: 4px; font-family: var(--mono); }

.after .panel-header { color: var(--accent-lt); }

pre {
  padding: 20px;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.65;
  overflow-x: auto;
  color: var(--text);
}

.line-count {
  color: var(--muted);
  font-size: 0.78rem;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
}

/* Syntax highlighting */
.kw { color: #ff7b72; }
.fn { color: #d2a8ff; }
.st { color: #a5d6ff; }
.cm { color: #8b949e; font-style: italic; }
.nb { color: #f0883e; }
.cl { color: #ffa657; }

/* ── Features ───────────────────────────────── */
#features { background: var(--bg); }

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color .2s, transform .2s;
}

.feature-card:hover {
  border-color: rgba(167, 139, 250, 0.4);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 18px;
}

.fi-purple { background: rgba(124,58,237,0.15); }
.fi-blue   { background: rgba(56,189,248,0.12); }
.fi-green  { background: rgba(63,185,80,0.12); }
.fi-orange { background: rgba(255,166,87,0.12); }
.fi-red    { background: rgba(255,123,114,0.12); }
.fi-yellow { background: rgba(254,188,46,0.12); }

.feature-card h3 { margin-bottom: 10px; font-size: 1rem; }
.feature-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }

/* ── Pricing ────────────────────────────────── */
#pricing { background: var(--bg); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  position: relative;
}

.pricing-card.popular {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 48px rgba(124,58,237,0.15);
}

.popular-badge {
  position: absolute;
  top: -13px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 100px;
  white-space: nowrap;
}

.plan-name { font-size: 0.85rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.plan-price { margin-bottom: 6px; }
.plan-price .amount { font-size: 2.8rem; font-weight: 800; color: var(--text); }
.plan-price .period { font-size: 1rem; color: var(--muted); }
.plan-desc { color: var(--muted); font-size: 0.88rem; margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }

.plan-features { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.plan-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; color: var(--muted); }
.plan-features li::before { content: "✓"; color: var(--green); font-weight: 700; flex-shrink: 0; margin-top: 1px; }

.btn-plan { width: 100%; justify-content: center; padding: 12px; }

/* ── CTA Banner ─────────────────────────────── */
#cta {
  background: linear-gradient(135deg, rgba(124,58,237,0.12) 0%, rgba(56,189,248,0.08) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 96px 0;
}

#cta h2 { margin-bottom: 16px; }
#cta p { color: var(--muted); font-size: 1.1rem; margin-bottom: 40px; max-width: 480px; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Install block ──────────────────────────── */
.install-block {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s;
}
.install-block:hover { border-color: var(--accent-lt); }
.install-block .prompt { color: var(--accent-lt); user-select: none; }
.install-block .copy-icon { color: var(--muted); font-size: 0.8rem; transition: color .2s; }
.install-block:hover .copy-icon { color: var(--text); }

/* ── Footer ─────────────────────────────────── */
footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

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

.footer-left { color: var(--muted); font-size: 0.88rem; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.88rem; transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 640px) {
  section { padding: 64px 0; }
  #hero { padding: 80px 0 64px; }
  .nav-links { display: none; }
  .hero-stat-bar { gap: 32px; }
}

/* ── Smooth scroll offset for sticky nav ─────── */
[id] { scroll-margin-top: 80px; }

/* ── Toast ──────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  opacity: 0;
  transform: translateY(8px);
  transition: all .25s;
  pointer-events: none;
  z-index: 999;
}
.toast.show { opacity: 1; transform: translateY(0); }
