/* ══════════════════════════════════════
   ROOT & RESET
══════════════════════════════════════ */
:root {
  --bg:          #080c18;
  --bg-card:     #0d1626;
  --bg-card-2:   #111d33;
  --bg-hover:    #131f36;
  --accent:      #4f8ef7;
  --accent-2:    #00d4ff;
  --accent-3:    #a78bfa;
  --green:       #10d97f;
  --text:        #f0f4ff;
  --muted:       #8899bb;
  --border:      #1a2840;
  --border-2:    #243552;
  --radius:      12px;
  --radius-lg:   20px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* ══════════════════════════════════════
   LAYOUT
══════════════════════════════════════ */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; }

/* ══════════════════════════════════════
   NAVBAR
══════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 14px 0;
  transition: background 0.3s, border-color 0.3s;
}

.navbar.scrolled {
  background: rgba(8,12,24,0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

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

.nav-cta {
  margin-left: auto;
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.2s;
}
.nav-cta:hover { opacity: 0.88; transform: translateY(-1px); }

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #6097f8; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(79,142,247,0.35); }

.btn-secondary {
  background: rgba(79,142,247,0.12);
  color: var(--accent);
  border: 1px solid rgba(79,142,247,0.3);
}
.btn-secondary:hover { background: rgba(79,142,247,0.2); }

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

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

.btn-full  { width: 100%; justify-content: center; }
.btn-lg    { padding: 14px 32px; font-size: 1rem; }

/* ══════════════════════════════════════
   SECTION SHARED
══════════════════════════════════════ */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.section-header p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 96px;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79,142,247,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,142,247,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 480px;
  background: radial-gradient(ellipse, rgba(79,142,247,0.1), transparent 68%);
  pointer-events: none;
}

.hero .container { text-align: center; position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(79,142,247,0.1);
  border: 1px solid rgba(79,142,247,0.28);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 28px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.hero-title {
  font-size: clamp(3rem, 6.5vw, 5.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.75;
}

/* Stats bar */
.hero-stats {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 12px;
  margin-bottom: 36px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 28px;
  gap: 3px;
}

.stat-num {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--muted);
}

.stat-divider {
  width: 1px;
  height: 38px;
  background: var(--border);
  flex-shrink: 0;
}

/* CTA row */
.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

/* Meta links row below hero CTAs */
.hero-meta-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.hero-text-link {
  color: var(--muted);
  font-size: 0.82rem;
  transition: color 0.2s;
}
.hero-text-link:hover { color: var(--accent); }

.hero-meta-sep {
  color: var(--border-2);
  font-size: 0.82rem;
}

/* ══════════════════════════════════════
   FEATURES
══════════════════════════════════════ */
.features {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 36px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.2s, transform 0.2s;
  opacity: 0;
  transform: translateY(18px);
}

.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease, border-color 0.2s;
}

.feature-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
  margin-bottom: 14px;
}

.feature-endpoint {
  display: inline-block;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  background: rgba(79,142,247,0.08);
  padding: 3px 9px;
  border-radius: 5px;
  border: 1px solid rgba(79,142,247,0.2);
}

.features-cta { text-align: center; }

/* ══════════════════════════════════════
   DEMO SECTION
══════════════════════════════════════ */
.demo-section { background: var(--bg); }

/* ── Code panels (request / response) ── */
.code-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 28px;
}

.code-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.code-panel-resp {
  border-color: rgba(16,217,127,0.2);
}

.code-panel-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.panel-hdr-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-method {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 5px;
  letter-spacing: 0.05em;
}
.badge-method.post {
  background: rgba(251,146,60,0.15);
  color: #fb923c;
  border: 1px solid rgba(251,146,60,0.3);
}
.badge-method.ok {
  background: rgba(16,217,127,0.12);
  color: var(--green);
  border: 1px solid rgba(16,217,127,0.28);
}

.panel-endpoint {
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
  font-size: 0.8rem;
  color: var(--text);
}

.panel-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.code-pre {
  margin: 0;
  padding: 18px 20px;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
  font-size: 0.76rem;
  line-height: 1.7;
  overflow: auto;
  max-height: 420px;
  color: #c8d6f0;
  flex: 1;
  white-space: pre;
}

/* Syntax highlight */
.hl-k { color: #7dd3fc; }   /* keys   — sky blue  */
.hl-s { color: #86efac; }   /* strings — green    */
.hl-n { color: #fcd34d; }   /* numbers — amber    */
.hl-b { color: #c4b5fd; }   /* bool   — violet    */
.hl-null { color: #fb7185; } /* null  — rose      */

/* ── Run bar below request JSON ── */
.run-bar {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.run-btn {
  width: 100%;
  justify-content: center;
  gap: 8px;
  font-size: 0.875rem;
  padding: 10px;
}

.run-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* ── Response placeholder ── */
.resp-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex: 1;
  padding: 40px 20px;
  color: var(--muted);
  text-align: center;
}

.resp-placeholder p {
  font-size: 0.82rem;
  line-height: 1.6;
}

/* ── Shimmer loading for response ── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

.resp-loading .code-pre {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite;
  min-height: 300px;
}

/* ── Doc CTA below panels ── */
.doc-cta {
  text-align: center;
}

.doc-cta p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.doc-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Legacy wrapper (kept for safety, no longer used) */
.demo-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}

/* Controls */
.demo-controls {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.demo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.demo-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-input-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.label-badge {
  background: rgba(16,217,127,0.1);
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid rgba(16,217,127,0.28);
}

.demo-input-group input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 13px;
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}
.demo-input-group input:focus { border-color: var(--accent); }
.demo-input-group input::placeholder { color: var(--muted); }

.demo-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.endpoint-pill {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 12px;
  font-family: 'SF Mono', 'Monaco', monospace;
  font-size: 0.73rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  flex: 1;
  white-space: nowrap;
  min-width: 0;
}

.method-get {
  background: rgba(16,217,127,0.14);
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Results area */
.demo-results {
  padding: 24px;
  min-height: 180px;
  overflow: auto;
}

.results-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 130px;
  color: var(--muted);
  text-align: center;
  gap: 12px;
}

.placeholder-icon {
  font-size: 1.8rem;
  opacity: 0.45;
}

.results-placeholder p {
  font-size: 0.84rem;
  line-height: 1.7;
}

/* Player result layout */
.player-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.result-card {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.result-card h4 {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.info-item .key {
  font-size: 0.7rem;
  color: var(--muted);
  display: block;
}

.info-item .val {
  font-size: 0.875rem;
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Rating display */
.rating-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.rating-num {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.rating-lbl {
  font-size: 0.72rem;
  color: var(--muted);
}

/* Cluster info */
.cluster-info { display: flex; flex-direction: column; gap: 8px; }

/* JSON block */
.json-pre {
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  overflow: auto;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
  font-size: 0.75rem;
  line-height: 1.65;
  max-height: 260px;
  color: #c8d6f0;
  white-space: pre;
}

/* Demo note banner */
.demo-note {
  background: rgba(16,217,127,0.07);
  border: 1px solid rgba(16,217,127,0.2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.78rem;
  color: #64d4a0;
  margin-bottom: 14px;
}

.demo-note a { color: var(--green); font-weight: 600; }

/* Demo upsell nudge – shown after first run */
.demo-upsell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(79,142,247,0.07);
  border: 1px solid rgba(79,142,247,0.22);
  border-radius: 10px;
  padding: 12px 20px;
  margin-bottom: 24px;
  font-size: 0.84rem;
  color: var(--muted);
  text-align: center;
}

.demo-upsell-link {
  color: var(--accent);
  font-weight: 600;
  transition: color 0.2s;
  white-space: nowrap;
}
.demo-upsell-link:hover { color: #6097f8; }

/* Loading */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--muted);
  font-size: 0.875rem;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Error */
.error-state {
  text-align: center;
  padding: 30px 20px;
}

.error-state .err-icon { font-size: 1.8rem; margin-bottom: 10px; }
.error-state h4       { font-size: 0.95rem; margin-bottom: 8px; }
.error-state p        { color: var(--muted); font-size: 0.84rem; margin-bottom: 18px; line-height: 1.6; }

/* Success badge */
.success-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 14px;
}

/* ── Chart demo card ── */
.chart-demo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 1fr auto;
  overflow: hidden;
}

.chart-demo-left {
  padding: 32px 36px;
  border-right: 1px solid var(--border);
}

.chart-demo-left h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.chart-demo-left p {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 20px;
  line-height: 1.65;
}

.chart-endpoints {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.format-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.format-pills span {
  background: rgba(167,139,250,0.1);
  color: var(--accent-3);
  border: 1px solid rgba(167,139,250,0.25);
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
}

.chart-demo-right {
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-mock-wrapper { text-align: center; }

.radar-caption {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 10px;
}

/* ══════════════════════════════════════
   EXPLORER SECTION
══════════════════════════════════════ */
.explorer-section {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.explorer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 40px;
}

.explorer-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  transform: translateY(18px);
  transition: border-color 0.25s, transform 0.25s;
}

.explorer-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease, border-color 0.25s;
}

.explorer-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}

.explorer-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.explorer-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(79,142,247,0.1);
  color: var(--accent);
  flex-shrink: 0;
}

.explorer-icon-amber  { background: rgba(252,211,77,0.1);  color: #fcd34d; }
.explorer-icon-green  { background: rgba(16,217,127,0.1);  color: var(--green); }
.explorer-icon-violet { background: rgba(167,139,250,0.1); color: var(--accent-3); }
.explorer-icon-cyan   { background: rgba(0,212,255,0.1);   color: var(--accent-2); }
.explorer-icon-rose   { background: rgba(251,113,133,0.1); color: #fb7185; }

.explorer-card h3 {
  font-size: 1rem;
  font-weight: 700;
}

.explorer-card > p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
  margin: 0;
}

.explorer-endpoints {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.endpoint-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  width: fit-content;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.method-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.method-badge.get {
  background: rgba(16,217,127,0.14);
  color: var(--green);
}

.method-badge.post-sm {
  background: rgba(251,146,60,0.15);
  color: #fb923c;
}

/* Explorer code blocks */
.explorer-code {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.explorer-code-header {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--border);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.explorer-pre {
  margin: 0;
  padding: 14px 16px;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
  font-size: 0.72rem;
  line-height: 1.65;
  overflow-x: auto;
  color: #c8d6f0;
  background: transparent;
  white-space: pre;
}

.explorer-pre-sm {
  font-size: 0.7rem;
  max-height: 160px;
}

/* Sample response blocks */
.explorer-sample {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.sample-label {
  display: block;
  padding: 6px 12px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--border);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Format pills in card */
.explorer-formats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.explorer-formats .format-pill {
  background: rgba(167,139,250,0.1);
  color: var(--accent-3);
  border: 1px solid rgba(167,139,250,0.25);
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 600;
}

/* Full code example block */
.explorer-full-example {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.explorer-full-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--border);
}

.explorer-full-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}

.explorer-full-title svg {
  color: var(--accent);
}

.explorer-full-tabs {
  display: flex;
  gap: 4px;
}

.explorer-tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.explorer-tab:hover {
  border-color: var(--border-2);
  color: var(--text);
}

.explorer-tab.active {
  background: rgba(79,142,247,0.12);
  border-color: rgba(79,142,247,0.3);
  color: var(--accent);
}

.explorer-full-pre {
  padding: 20px 24px;
  max-height: 420px;
  overflow: auto;
}

/* ══════════════════════════════════════
   ACCESS OPTIONS (SECONDARY)
══════════════════════════════════════ */
.access-options {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.access-note {
  max-width: 820px;
  margin: 0 auto 24px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(79,142,247,0.08);
  border: 1px solid rgba(79,142,247,0.2);
  font-size: 0.84rem;
  color: var(--muted);
  text-align: center;
}

.access-note strong {
  color: var(--text);
  margin-right: 6px;
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.access-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
}

.access-card-rapid {
  border-color: var(--border-2);
}

.access-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
  background: rgba(16,217,127,0.1);
  border: 1px solid rgba(16,217,127,0.28);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 14px;
}

.access-badge-rapid {
  color: var(--accent-2);
  background: rgba(0,212,255,0.1);
  border-color: rgba(0,212,255,0.28);
}

.access-card h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.access-card p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 14px;
}

.access-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.access-points li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.access-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════
   PRICING
══════════════════════════════════════ */
.pricing {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  max-width: 100%;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  opacity: 0;
  transform: translateY(18px);
}

.pricing-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.pricing-card-pro {
  border-color: var(--border-2);
}

.plan-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 11px;
  border-radius: 100px;
  margin-bottom: 18px;
}

.badge-free {
  background: rgba(16,217,127,0.1);
  color: var(--green);
  border: 1px solid rgba(16,217,127,0.28);
}

.badge-pro {
  background: rgba(167,139,250,0.1);
  color: var(--accent-3);
  border: 1px solid rgba(167,139,250,0.28);
}

.plan-price {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}
.plan-price span {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted);
}

.plan-tagline {
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 22px;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 26px;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--muted);
}

.check { color: var(--green); font-weight: 700; }

.pricing-card .btn-full {
  margin-top: auto;
  justify-content: center;
  min-height: 54px;
  border-radius: 14px;
  font-size: 0.98rem;
  font-weight: 700;
}

.pricing-card .btn-outline.btn-full {
  border-color: rgba(79,142,247,0.28);
  background: linear-gradient(180deg, rgba(79,142,247,0.06), rgba(79,142,247,0.02));
}

.pricing-card .btn-outline.btn-full:hover {
  border-color: rgba(79,142,247,0.52);
  background: linear-gradient(180deg, rgba(79,142,247,0.14), rgba(79,142,247,0.06));
  box-shadow: 0 10px 28px rgba(79,142,247,0.14);
}

/* ══════════════════════════════════════
   CTA SECTION
══════════════════════════════════════ */
.cta-section { background: var(--bg); }

.cta-card {
  background: linear-gradient(135deg,
    rgba(79,142,247,0.08) 0%,
    rgba(0,212,255,0.05) 100%);
  border: 1px solid rgba(79,142,247,0.28);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
  opacity: 0;
  transform: translateY(18px);
}

.cta-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.cta-icon { font-size: 2.8rem; margin-bottom: 20px; }

.cta-card h2 {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.cta-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 26px;
}

.cta-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
  font-size: 0.84rem;
  color: var(--muted);
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 56px;
  margin-bottom: 44px;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 10px;
  max-width: 240px;
  line-height: 1.65;
}

.footer-nav {
  display: flex;
  gap: 44px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 4px;
}

.footer-col a {
  color: var(--muted);
  font-size: 0.84rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-bottom a { color: var(--accent); }
.footer-bottom a:hover { text-decoration: underline; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 860px) {
  .features-grid  { grid-template-columns: repeat(2, 1fr); }
  .explorer-grid  { grid-template-columns: repeat(2, 1fr); }
  .code-panels    { grid-template-columns: 1fr; }
  .chart-demo-card { grid-template-columns: 1fr; }
  .chart-demo-left { border-right: none; border-bottom: 1px solid var(--border); }
  .access-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explorer-full-header { flex-direction: column; gap: 10px; align-items: flex-start; }
}

@media (max-width: 640px) {

  .hero-stats {
    flex-wrap: wrap;
    justify-content: center;
    padding: 16px 8px;
    gap: 4px;
  }
  .stat-divider  { display: none; }
  .stat-item     { padding: 8px 18px; }
  .hero-ctas     { flex-direction: column; align-items: stretch; width: 100%; max-width: 300px; margin: 0 auto 18px; }
  .hero-ctas .btn { justify-content: center; }

  .features-grid  { grid-template-columns: 1fr; }
  .explorer-grid  { grid-template-columns: 1fr; }

  .demo-row      { grid-template-columns: 1fr; }
  .demo-actions  { flex-direction: column; align-items: stretch; }
  .endpoint-pill { flex: none; width: 100%; }
  .player-result { grid-template-columns: 1fr; }

  .pricing-grid  { grid-template-columns: 1fr; max-width: 380px; }
  .cta-card      { padding: 36px 20px; }
  .footer-top    { grid-template-columns: 1fr; gap: 36px; }
  .footer-nav    { flex-wrap: wrap; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}
