/* ============================================
   Pylon AI — Global Styles
   Dark theme, cyan accents, Stripe-quality
   ============================================ */

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

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

:root {
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --bg-card: #161616;
  --bg-code: #0d1117;
  --border: #222222;
  --border-light: #2a2a2a;
  --text: #ffffff;
  --text-secondary: #888888;
  --text-tertiary: #555555;
  --cyan: #00d4ff;
  --cyan-dim: rgba(0, 212, 255, 0.1);
  --cyan-glow: rgba(0, 212, 255, 0.15);
  --gradient: linear-gradient(135deg, #00d4ff 0%, #0088cc 100%);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --max-width: 1200px;
  --nav-height: 64px;
}

html { scroll-behavior: smooth; }

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

a { color: var(--cyan); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

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

/* ---- NAV ---- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
nav .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.nav-logo {
  font-size: 20px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.nav-logo span { color: var(--cyan); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text); opacity: 1; }
.nav-links a.active { color: var(--text); }

.mobile-menu-btn {
  display: none; background: none; border: none; color: var(--text);
  font-size: 24px; cursor: pointer;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 8px;
  font-size: 14px; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: all 0.2s; border: none;
}
.btn-primary {
  background: var(--gradient); color: #000;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); color: #000; }
.btn-secondary {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover { border-color: var(--text-tertiary); color: var(--text); }
.btn-ghost { background: transparent; color: var(--cyan); padding: 8px 0; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ---- HERO ---- */
.hero {
  padding: 160px 0 120px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, var(--cyan-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 100px;
  background: var(--cyan-dim); border: 1px solid rgba(0,212,255,0.2);
  font-size: 13px; color: var(--cyan); font-weight: 500;
  margin-bottom: 32px;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  position: relative;
}
.hero h1 .gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 18px; color: var(--text-secondary);
  max-width: 560px; margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---- SECTION ---- */
section { padding: 100px 0; }
.section-label {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--cyan); margin-bottom: 16px;
}
.section-title {
  font-size: clamp(28px, 4vw, 40px); font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 16px;
}
.section-desc {
  font-size: 16px; color: var(--text-secondary);
  max-width: 560px; margin-bottom: 48px;
}
.section-center { text-align: center; }
.section-center .section-desc { margin-left: auto; margin-right: auto; }

/* ---- HOW IT WORKS (3-step) ---- */
.steps-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 32px; position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute; top: 40px; left: 16.66%; right: 16.66%;
  height: 1px; background: var(--border-light);
}
.step {
  text-align: center; position: relative; padding: 0 16px;
}
.step-number {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: var(--cyan);
  margin: 0 auto 24px; position: relative; z-index: 1;
}
.step h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ---- API CARDS ---- */
.api-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.api-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 32px;
  transition: border-color 0.2s, transform 0.2s;
}
.api-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.api-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.api-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--cyan-dim); display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.api-card-header h3 { font-size: 18px; font-weight: 600; }
.api-card p { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }
.api-card-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 20px; border-top: 1px solid var(--border);
}
.api-card-price { font-size: 14px; color: var(--cyan); font-weight: 600; }
.api-card-coming {
  opacity: 0.4; pointer-events: none;
}

/* ---- PRICING ---- */
.pricing-highlight {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 48px; text-align: center;
  max-width: 640px; margin: 0 auto;
}
.pricing-highlight .price-big {
  font-size: 56px; font-weight: 800; letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.pricing-highlight .price-big .gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pricing-highlight .price-label {
  font-size: 16px; color: var(--text-secondary); margin-bottom: 32px;
}
.pricing-features {
  list-style: none; text-align: left;
  display: inline-block;
}
.pricing-features li {
  font-size: 15px; color: var(--text-secondary); padding: 8px 0;
  display: flex; align-items: center; gap: 12px;
}
.pricing-features li::before {
  content: '✓'; color: var(--cyan); font-weight: 700;
}

/* ---- CODE BLOCKS ---- */
.code-block {
  background: var(--bg-code); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; margin: 24px 0;
}
.code-block-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.code-tab {
  font-size: 13px; font-weight: 500; color: var(--text-tertiary);
  padding: 4px 12px; border-radius: 6px; cursor: pointer;
  background: none; border: none; font-family: var(--font);
  transition: all 0.2s;
}
.code-tab.active { color: var(--text); background: rgba(255,255,255,0.06); }
.code-tab:hover { color: var(--text-secondary); }
.code-content { display: none; }
.code-content.active { display: block; }
pre {
  padding: 20px; overflow-x: auto; font-size: 13px; line-height: 1.7;
  font-family: var(--mono);
}
pre code { color: var(--text-secondary); }

/* syntax colors */
.kw { color: #ff7b72; }
.str { color: #a5d6ff; }
.cmt { color: #484f58; }
.fn { color: #d2a8ff; }
.num { color: #79c0ff; }
.var { color: #ffa657; }

/* ---- DOCS ---- */
.docs-layout {
  display: grid; grid-template-columns: 240px 1fr;
  gap: 48px; align-items: start;
}
.docs-sidebar {
  position: sticky; top: calc(var(--nav-height) + 32px);
}
.docs-sidebar a {
  display: block; padding: 8px 16px;
  font-size: 14px; color: var(--text-secondary);
  border-left: 2px solid var(--border);
  transition: all 0.2s;
}
.docs-sidebar a:hover, .docs-sidebar a.active {
  color: var(--text); border-left-color: var(--cyan); opacity: 1;
}
.docs-content h2 {
  font-size: 24px; font-weight: 700; margin: 48px 0 16px;
  padding-top: 24px; border-top: 1px solid var(--border);
}
.docs-content h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.docs-content p { font-size: 15px; color: var(--text-secondary); margin-bottom: 16px; }
.docs-content table {
  width: 100%; border-collapse: collapse; margin: 16px 0 32px;
}
.docs-content th, .docs-content td {
  text-align: left; padding: 12px 16px;
  font-size: 14px; border-bottom: 1px solid var(--border);
}
.docs-content th { color: var(--text); font-weight: 600; }
.docs-content td { color: var(--text-secondary); }
.docs-content code {
  font-family: var(--mono); font-size: 13px;
  background: rgba(255,255,255,0.06); padding: 2px 6px;
  border-radius: 4px;
}

.endpoint-block {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 20px; margin-bottom: 24px;
}
.endpoint-method {
  font-size: 13px; font-weight: 700; color: #3fb950;
  font-family: var(--mono);
}
.endpoint-url {
  font-size: 14px; color: var(--text); font-family: var(--mono);
}

/* ---- FOOTER ---- */
footer {
  padding: 48px 0; border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 24px;
}
.footer-left { font-size: 14px; color: var(--text-tertiary); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 14px; color: var(--text-tertiary); }
.footer-links a:hover { color: var(--text-secondary); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 24px;
  }
  .steps-grid { grid-template-columns: 1fr; }
  .steps-grid::before { display: none; }
  .api-grid { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; display: flex; gap: 0; overflow-x: auto; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
  .docs-sidebar a { border-left: none; border-bottom: 2px solid var(--border); white-space: nowrap; }
  .docs-sidebar a.active { border-bottom-color: var(--cyan); }
  .hero { padding: 120px 0 80px; }
  .pricing-highlight { padding: 32px 24px; }
}
