/* ============================================================
   Claw Affiliate — Main Stylesheet
   ============================================================ */

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

:root {
  --bg: #080b14;
  --bg-2: #0d1120;
  --bg-3: #111827;
  --border: rgba(255,255,255,0.07);
  --border-2: rgba(255,255,255,0.12);
  --text: #f1f5f9;
  --text-2: #94a3b8;
  --text-3: #64748b;
  --indigo: #6366f1;
  --indigo-2: #818cf8;
  --purple: #8b5cf6;
  --green: #22c55e;
  --yellow: #eab308;
  --blue: #3b82f6;
  --red: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ---- Gradient text ---- */
.gradient-text {
  background: linear-gradient(135deg, var(--indigo-2), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--indigo), var(--purple));
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  white-space: nowrap;
}
.btn-outline:hover { border-color: var(--indigo-2); background: rgba(99,102,241,0.08); transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s;
}
.btn-ghost:hover { color: var(--text); }

.btn-large { padding: 14px 28px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav-scrolled {
  background: rgba(8,11,20,0.85);
  border-bottom-color: var(--border);
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
  margin: 0;
  flex: 1;
}
.nav-links a {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: 160px 0 100px;
  overflow: hidden;
  text-align: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}
.hero-glow-1 {
  width: 600px; height: 400px;
  background: radial-gradient(circle, var(--indigo), transparent 70%);
  top: -100px; left: 50%;
  transform: translateX(-50%);
}
.hero-glow-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--purple), transparent 70%);
  top: 100px; right: 10%;
  opacity: 0.18;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--indigo-2);
  margin-bottom: 32px;
}
.badge-dot {
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.hero-badge a { color: var(--indigo-2); text-decoration: underline; text-decoration-color: rgba(129,140,248,0.4); }
.hero-title {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-2);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}
.hero-code {
  max-width: 620px;
  margin: 0 auto;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(99,102,241,0.1);
}
.code-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.code-dot { width: 12px; height: 12px; border-radius: 50%; }
.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #28c840; }
.code-label { font-size: 12px; color: var(--text-3); margin-left: 6px; font-family: 'JetBrains Mono', monospace; }
.code-block {
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
}
code { display: block; }
.code-comment { color: var(--text-3); }
.code-keyword { color: var(--indigo-2); }
.code-fn { color: var(--yellow); }
.code-str { color: var(--green); }
.code-prop { color: var(--blue); }

/* ============================================================
   Stats Bar
   ============================================================ */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  padding: 28px 0;
}
.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 40px;
}
.stat-number {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--indigo-2), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* ============================================================
   Sections
   ============================================================ */
.section { padding: 100px 0; }
.section-dark { background: var(--bg-2); }

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}
.section-tag {
  display: inline-block;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  color: var(--indigo-2);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-header h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.section-header p { font-size: 17px; color: var(--text-2); line-height: 1.65; }

/* ============================================================
   Flow Steps
   ============================================================ */
.flow-steps {
  max-width: 720px;
  margin: 0 auto;
}
.flow-step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.flow-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--indigo-2);
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  flex-shrink: 0;
  margin-top: 4px;
}
.flow-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.flow-content p { color: var(--text-2); font-size: 15px; line-height: 1.65; margin-bottom: 10px; }
.flow-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--green);
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
}
.flow-connector {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--border-2), transparent);
  margin-left: 35px;
  margin-top: 4px;
  margin-bottom: 4px;
}

/* ============================================================
   Two Column
   ============================================================ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.two-col-reverse { direction: rtl; }
.two-col-reverse > * { direction: ltr; }
.two-col-text .section-tag { margin-bottom: 12px; }
.two-col-text h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.two-col-text > p { color: var(--text-2); font-size: 16px; line-height: 1.7; margin-bottom: 32px; }
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
}
.feature-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.feature-icon {
  width: 22px; height: 22px;
  background: linear-gradient(135deg, var(--indigo), var(--purple));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 2px;
}
.feature-list strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.feature-list span { font-size: 14px; color: var(--text-2); line-height: 1.5; }

/* ============================================================
   Terminal
   ============================================================ */
.terminal {
  background: #0a0e1a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(99,102,241,0.08);
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.terminal-title { font-size: 12px; color: var(--text-3); margin-left: 8px; font-family: 'JetBrains Mono', monospace; }
.terminal-body {
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.85;
}
.terminal-body p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-dim { color: var(--text-3); }
.t-green { color: var(--green); }
.t-blue { color: var(--blue); }
.t-yellow { color: var(--yellow); }
.t-purple { color: #c084fc; }
.t-cursor { animation: blink 1s step-end infinite; color: var(--indigo-2); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ============================================================
   Advertiser Cards
   ============================================================ */
.advertiser-card-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.adv-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}
.adv-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.adv-icon { font-size: 24px; }
.adv-title { font-size: 15px; font-weight: 600; }
.adv-sub { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.adv-status {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}
.adv-status.active { background: rgba(99,102,241,0.15); color: var(--indigo-2); }
.adv-status.green { background: rgba(34,197,94,0.12); color: var(--green); }
.adv-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.adv-metric {
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}
.adv-metric span { display: block; font-size: 16px; font-weight: 700; }
.adv-metric small { font-size: 11px; color: var(--text-3); }
.adv-shield-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.shield-item {
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.15);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 12px;
  color: var(--green);
}

/* ============================================================
   API Grid
   ============================================================ */
.api-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.api-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s, transform 0.2s;
}
.api-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.api-method {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.api-method.post { background: rgba(99,102,241,0.15); color: var(--indigo-2); }
.api-method.get { background: rgba(34,197,94,0.12); color: var(--green); }
.api-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 10px;
}
.api-desc { font-size: 13px; color: var(--text-2); line-height: 1.55; }
.api-cta { text-align: center; }

/* ============================================================
   Pricing
   ============================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}
.pricing-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
}
.pricing-featured {
  border-color: rgba(99,102,241,0.4);
  background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(139,92,246,0.06));
  box-shadow: 0 0 40px rgba(99,102,241,0.1);
}
.pricing-badge {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--indigo), var(--purple));
  color: #fff;
  border-radius: 100px;
  padding: 3px 14px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pricing-name { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.pricing-price {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--indigo-2), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pricing-price span { font-size: 14px; font-weight: 400; color: var(--text-3); -webkit-text-fill-color: var(--text-3); }
.pricing-desc { font-size: 14px; color: var(--text-2); margin-bottom: 24px; line-height: 1.55; }
.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.pricing-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-2);
}
.pricing-features li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

/* ============================================================
   CTA Section
   ============================================================ */
.section-cta {
  padding: 100px 0;
  background: var(--bg-2);
}
.cta-box {
  position: relative;
  text-align: center;
  padding: 80px 40px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg-3);
  overflow: hidden;
}
.cta-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(99,102,241,0.1), transparent);
  pointer-events: none;
}
.cta-box h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  position: relative;
}
.cta-box p {
  font-size: 18px;
  color: var(--text-2);
  margin-bottom: 40px;
  position: relative;
}
.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
}
.footer-top {
  display: flex;
  gap: 60px;
  margin-bottom: 48px;
}
.footer-brand {
  flex: 1;
  max-width: 280px;
}
.footer-brand .nav-logo { margin-bottom: 14px; font-size: 15px; }
.footer-brand p { font-size: 14px; color: var(--text-3); line-height: 1.6; }
.footer-links {
  display: flex;
  gap: 60px;
  flex: 2;
  justify-content: flex-end;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-col a { font-size: 14px; color: var(--text-3); transition: color 0.2s; }
.footer-col a:hover { color: var(--text-2); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom p { font-size: 13px; color: var(--text-3); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: rgba(8,11,20,0.97);
    backdrop-filter: blur(12px);
    padding: 24px;
    border-bottom: 1px solid var(--border);
    gap: 20px;
  }
  .nav-hamburger { display: flex; }
  .two-col { grid-template-columns: 1fr; gap: 48px; }
  .two-col-reverse { direction: ltr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .stats-grid { gap: 0; }
  .stat { padding: 12px 20px; }
  .stat-divider { display: none; }
  .footer-top { flex-direction: column; gap: 40px; }
  .footer-brand { max-width: 100%; }
  .footer-links { flex-wrap: wrap; justify-content: flex-start; gap: 40px; }
}

@media (max-width: 600px) {
  .hero { padding: 120px 0 60px; }
  .section { padding: 64px 0; }
  .adv-metrics { grid-template-columns: repeat(2, 1fr); }
  .api-grid { grid-template-columns: 1fr; }
  .cta-box { padding: 48px 24px; }
  .footer-links { gap: 32px; }
}
