/* StackSignal Premium Dark Mode Design System */
:root {
  --bg-main: #07090e;
  --bg-card: rgba(18, 24, 38, 0.7);
  --bg-card-hover: rgba(26, 34, 52, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.35);
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

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

/* Background Ambient Glows */
.ambient-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}

.glow-1 {
  top: -100px;
  left: 20%;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.glow-2 {
  top: 500px;
  right: 10%;
  background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(7, 9, 14, 0.8);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
  object-fit: cover;
}

.footer-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 1.4rem;
  color: var(--primary);
}

.accent-dot {
  color: var(--accent-cyan);
}

.badge-tag {
  font-size: 0.7rem;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  margin-left: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7174f7 0%, var(--primary) 100%);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Hero */
.hero {
  position: relative;
  z-index: 10;
  padding: 4.5rem 1.5rem 2rem;
  text-align: center;
}

.hero-container {
  max-width: 980px;
  margin: 0 auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 20px;
  font-size: 0.85rem;
  color: #c7d2fe;
  margin-bottom: 1.5rem;
}

.pill-pulse {
  width: 8px;
  height: 8px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-cyan);
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

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

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

/* Inspector Card */
.inspector-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-align: left;
  margin-top: 1.5rem;
}

.inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.tab-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.api-endpoint-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.inspect-form {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(10, 14, 22, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0 1rem;
  transition: border-color 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.input-prefix {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-right: 4px;
}

.input-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1rem;
  padding: 0.85rem 0;
}

.quick-samples {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.sample-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.sample-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  border-radius: 14px;
  padding: 2px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.sample-pill:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  color: #fff;
}

/* Spinner */
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.hidden {
  display: none;
}

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

/* Results Display */
.results-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.metric-card {
  background: rgba(10, 14, 22, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.gradient-num {
  background: linear-gradient(135deg, #a5b4fc 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-velocity {
  color: var(--accent-green);
}

.tech-breakdown-card, .intent-card, .json-viewer-card {
  background: rgba(10, 14, 22, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.25rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.85rem;
}

.tech-categories-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.category-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.category-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #94a3b8;
  width: 140px;
  font-weight: 600;
}

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

.tech-pill {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: rgba(99, 102, 241, 0.12);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 6px;
  padding: 3px 8px;
}

.intent-signals-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.signal-item {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  padding: 0.75rem;
}

.signal-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fbbf24;
  margin-bottom: 2px;
}

.signal-desc {
  font-size: 0.8rem;
  color: #cbd5e1;
}

/* JSON Viewer */
.json-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-copy {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #fff;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.75rem;
  cursor: pointer;
}

.btn-copy:hover {
  background: rgba(255, 255, 255, 0.12);
}

.json-pre {
  background: #040609;
  border-radius: 8px;
  padding: 1rem;
  max-height: 250px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #38bdf8;
  line-height: 1.4;
}

/* Sections */
.section {
  padding: 5rem 1.5rem;
  position: relative;
  z-index: 10;
}

.section-container {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.section-badge {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* Comparison Table */
.table-wrapper {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  backdrop-filter: blur(16px);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.comparison-table th, .comparison-table td {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.comparison-table th {
  background: rgba(10, 14, 22, 0.8);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.highlight-col {
  background: rgba(99, 102, 241, 0.08);
  border-left: 1px solid var(--border-highlight);
  border-right: 1px solid var(--border-highlight);
}

.price-green {
  color: var(--accent-green);
  font-weight: 700;
  font-size: 1.1rem;
}

.check-icon {
  color: var(--accent-green);
  font-weight: bold;
}

.cross-icon {
  color: #ef4444;
}

/* Code Snippet Box */
.code-box {
  background: #040609;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  text-align: left;
  max-width: 720px;
  margin: 0 auto;
  overflow: hidden;
}

.code-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
}

.code-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
  border-right: 1px solid var(--border-subtle);
}

.code-tab.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.15);
  border-bottom: 2px solid var(--primary);
}

.code-content {
  padding: 1.25rem;
}

.code-content pre {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #a5b4fc;
  line-height: 1.5;
  overflow-x: auto;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  text-align: left;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
}

.pricing-card.featured {
  background: rgba(26, 34, 52, 0.9);
  border: 2px solid var(--primary);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
}

.popular-tag {
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
}

.plan-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.plan-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.plan-price {
  font-size: 2.7rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1.5rem;
}

.plan-price .period {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #cbd5e1;
  margin-bottom: 2rem;
  flex: 1;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 1.5rem 2rem;
  background: #040609;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 1.5rem;
}

@media (max-width: 768px) {
  .hero-title { font-size: 2.2rem; }
  .inspect-form { flex-direction: column; }
  .navbar .nav-links { display: none; }
}
