/* ═══════════════════════════════════════════════════════════════════════════
   Conduit — Premium Design System
   Stacks Brand: #5546FF (purple) · #FC6432 (orange)
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg-0: #060710;
  --bg-1: #0b0c14;
  --bg-2: #111220;
  --bg-3: #191a2c;
  --bg-card: rgba(16, 17, 30, 0.7);
  --bg-card-hover: rgba(24, 26, 42, 0.9);
  --bg-glass: rgba(12, 13, 20, 0.55);

  --text-0: #f8fafc;
  --text-1: #e2e8f0;
  --text-2: #94a3b8;
  --text-3: #64748b;
  --text-4: #475569;

  /* Stacks Brand */
  --stx-purple: #5546FF;
  --stx-orange: #FC6432;
  --stx-purple-light: #7B6FFF;
  --stx-orange-light: #FF8A5C;
  --stx-purple-glow: rgba(85, 70, 255, 0.4);
  --stx-orange-glow: rgba(252, 100, 50, 0.35);

  --cyan: #22d3ee;
  --green: #10b981;
  --red: #ef4444;

  --gradient: linear-gradient(135deg, #5546FF 0%, #7B6FFF 40%, #FC6432 100%);
  --gradient-orange: linear-gradient(135deg, #FC6432 0%, #FF8A5C 50%, #FFAB76 100%);
  --gradient-purple: linear-gradient(135deg, #5546FF 0%, #7B6FFF 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(85, 70, 255, 0.1) 0%, rgba(252, 100, 50, 0.08) 100%);
  --gradient-bg: linear-gradient(180deg, #060710 0%, #0d0a1a 30%, #120a12 60%, #060710 100%);

  --border: rgba(148, 163, 184, 0.06);
  --border-light: rgba(148, 163, 184, 0.1);
  --border-accent: rgba(85, 70, 255, 0.3);
  --border-orange: rgba(252, 100, 50, 0.25);

  --shadow-glow: 0 0 60px rgba(85, 70, 255, 0.08), 0 0 120px rgba(252, 100, 50, 0.04);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-btn-primary: 0 4px 20px rgba(85, 70, 255, 0.35), 0 8px 40px rgba(252, 100, 50, 0.12);
  --shadow-btn-primary-hover: 0 8px 32px rgba(85, 70, 255, 0.5), 0 16px 60px rgba(252, 100, 50, 0.2);
  --shadow-btn-secondary: 0 4px 20px rgba(252, 100, 50, 0.2);
  --shadow-btn-secondary-hover: 0 8px 32px rgba(252, 100, 50, 0.35);

  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 100px;

  --container: 1140px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

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

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

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82em;
  background: rgba(85, 70, 255, 0.12);
  color: var(--stx-purple-light);
  padding: 2px 7px;
  border-radius: 5px;
}

button {
  font-family: inherit;
}

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

/* ── Background Effects ────────────────────────────────────────────────── */
.bg-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.02;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.gradient-orb-1 {
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--stx-purple) 0%, transparent 70%);
  top: -350px;
  right: -250px;
  opacity: 0.22;
  animation: orb1 25s ease-in-out infinite;
}

.gradient-orb-2 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--stx-orange) 0%, transparent 70%);
  bottom: -300px;
  left: -200px;
  opacity: 0.18;
  animation: orb2 30s ease-in-out infinite;
}

.gradient-orb-3 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--stx-orange) 0%, transparent 70%);
  top: 50%;
  right: 10%;
  opacity: 0.08;
  animation: orb3 20s ease-in-out infinite;
}

.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(85, 70, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 70, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 20%, transparent 70%);
}

@keyframes orb1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-80px, 50px); }
}

@keyframes orb2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(60px, -60px); }
}

@keyframes orb3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, 40px) scale(1.3); }
}

/* ── Navigation ────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 12px 0;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: rgba(6, 7, 16, 0.6);
  border-bottom: 1px solid var(--border);
  transition: 0.3s var(--ease);
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-logo {
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(85, 70, 255, 0.4));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-3);
  transition: 0.25s;
}

.nav-link:hover {
  color: var(--text-0);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius);
  color: var(--text-0);
  transition: 0.3s var(--ease);
  background: var(--gradient-subtle);
  border: 1px solid var(--border-accent);
  cursor: pointer;
}

.nav-cta:hover {
  background: rgba(85, 70, 255, 0.18);
  border-color: var(--stx-purple-light);
}

/* ── Sections ──────────────────────────────────────────────────────────── */
.section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.section--dark {
  background: rgba(0, 0, 0, 0.2);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(85, 70, 255, 0.1);
  color: var(--stx-purple-light);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 6px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-2);
  margin-bottom: 24px;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
}

.event-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(85, 70, 255, 0.1);
  border: 1px solid var(--border-accent);
  color: var(--stx-purple-light);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 100px;
  margin-bottom: 24px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--stx-purple-light);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--stx-purple);
}

.hero-title {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-2);
  max-width: 650px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
}

.btn {
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-btn-primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn-primary-hover);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-accent);
}

.hero-metrics {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
}

.metric {
  padding: 0 30px;
  text-align: center;
}

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

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

.metric-sep {
  width: 1px;
  height: 30px;
  background: var(--border-light);
}

/* ── Cards & API Grid ────────────────────────────────────────────────── */
.api-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.api-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: 0.3s;
  display: flex;
  flex-direction: column;
}

.api-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-5px);
}

.api-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.api-card-icon {
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.api-card-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  color: var(--text-2);
}

.api-card-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.api-card-desc {
  font-size: 0.9rem;
  color: var(--text-2);
  margin-bottom: 20px;
  flex-grow: 1;
}

.api-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.api-price-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--stx-orange-light);
}

.api-price-unit {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-left: 4px;
}

.api-card-method {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--green);
}

.api-card-method.post { color: var(--stx-purple-light); }

.api-card-stats {
  display: flex;
  gap: 16px;
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
  font-size: 0.75rem;
  color: var(--text-3);
}

/* ── Playground ────────────────────────────────────────────────────────── */
.playground {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 350px 1fr;
  overflow: hidden;
}

.pg-panel {
  padding: 30px;
}

.pg-request {
  border-right: 1px solid var(--border-light);
}

.pg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.pg-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-3);
}

.pg-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.pg-code {
  background: #0d0e1a;
  border-radius: 12px;
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  overflow-x: auto;
}

/* ── Signaling Card ───────────────────────────────────────────────────── */
.checkpoint-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.ci-info h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.ci-info p {
  color: var(--text-2);
}

.ci-status {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-3);
}

.ci-status.success { color: var(--green); }

/* ── Footer ───────────────────────────────────────────────────────────── */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-light);
  color: var(--text-4);
  font-size: 0.85rem;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
}
