/* ── StreamBridge ── */

:root {
  --bg: #08080a;
  --bg-2: #0e0e11;
  --surface: #131316;
  --surface-2: #18181c;
  --surface-3: #1e1e23;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.11);
  --text: #f0f0f2;
  --text-2: #9898a6;
  --text-3: #5c5c68;
  --purple: #9b6dff;
  --purple-dim: #7c4fe0;
  --purple-soft: rgba(155, 109, 255, 0.1);
  --purple-glow: rgba(155, 109, 255, 0.18);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.1);
  --font: "Inter", system-ui, sans-serif;
  --font-display: "Plus Jakarta Sans", var(--font);
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --nav-h: 64px;
  --max: 1140px;
  --ease: 160ms ease;
  --radius: 10px;
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), transform var(--ease), box-shadow var(--ease);
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--purple);
  color: #fff;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 1px 0 rgba(255,255,255,0.1) inset, 0 4px 20px var(--purple-glow);
}

.btn-primary:hover {
  background: var(--purple-dim);
  box-shadow: 0 1px 0 rgba(255,255,255,0.1) inset, 0 6px 28px rgba(155,109,255,0.28);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: var(--surface-2);
  border-color: rgba(255,255,255,0.15);
}

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 12px 20px; font-size: 14px; }

/* ── Navbar ── */

.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  background: rgba(8, 8, 10, 0.82);
  backdrop-filter: blur(16px) saturate(1.4);
}

.navbar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 100%;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  object-fit: cover;
}

.nav-center { justify-self: center; }

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

.nav-links a {
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 7px;
  transition: color var(--ease), background var(--ease);
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  padding: 7px;
  line-height: 0;
}

/* ── Hero ── */

.hero {
  position: relative;
  padding: 80px 0 100px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -120px;
  right: -80px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--purple-glow) 0%, transparent 65%);
  pointer-events: none;
  opacity: 0.7;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 24px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(52,211,153,0.5);
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-content h1 em {
  font-style: normal;
  color: var(--purple);
}

.hero-lead {
  font-size: 17px;
  color: var(--text-2);
  max-width: 440px;
  line-height: 1.65;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-meta {
  font-size: 12.5px;
  color: var(--text-3);
  font-family: var(--font-mono);
}

.hero-meta strong {
  color: var(--text-2);
  font-weight: 500;
}

/* Hero visual stack */

.hero-visual {
  position: relative;
  min-height: 420px;
}

.hero-image-wrap {
  position: absolute;
  top: -20px;
  right: -10px;
  width: 280px;
  z-index: 2;
  pointer-events: none;
}

.hero-brand-img {
  width: 100%;
  filter: drop-shadow(0 24px 48px rgba(0,0,0,0.6));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-app {
  position: relative;
  z-index: 1;
  margin-top: 60px;
  margin-left: 0;
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
  transition: transform 400ms ease;
}

.hero-app:hover {
  transform: perspective(1200px) rotateY(-1deg) rotateX(0.5deg);
}

/* ── App window ── */

.app-window {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.4),
    0 24px 64px rgba(0,0,0,0.55),
    0 8px 24px rgba(0,0,0,0.3);
}

.win-titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.win-controls {
  display: flex;
  gap: 8px;
}

.win-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2a2a32;
  border: 1px solid rgba(255,255,255,0.06);
}

.win-btn.win-close { background: #3d2a4a; border-color: rgba(155,109,255,0.2); }

.win-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
  padding-right: 52px;
}

.app-layout {
  display: flex;
  min-height: 260px;
}

.app-nav {
  width: 130px;
  flex-shrink: 0;
  padding: 14px 10px;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
}

.app-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 14px;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.app-nav-brand img { border-radius: 5px; }

.app-nav-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-3);
  border-radius: 6px;
  margin-bottom: 2px;
  cursor: default;
}

.app-nav-item.active {
  background: var(--purple-soft);
  color: var(--purple);
  font-weight: 500;
}

.app-panel {
  flex: 1;
  padding: 18px;
}

.app-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.app-panel-title {
  font-size: 13px;
  font-weight: 600;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
}

.pill-green {
  background: var(--green-soft);
  color: var(--green);
}

.pill-purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.pill-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.form-field { margin-bottom: 10px; }

.form-field label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 5px;
}

.input-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text-2);
}

.input-box.mono {
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.input-box.masked {
  letter-spacing: 2px;
  color: var(--text-3);
}

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.metric {
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.metric-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  margin-bottom: 3px;
}

.metric-val {
  font-size: 12.5px;
  font-weight: 600;
}

.metric-val.green { color: var(--green); }

/* ── Sections ── */

section { padding: 96px 0; }

.section-head { margin-bottom: 52px; }

.section-head-center { text-align: center; }

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.section-desc {
  color: var(--text-2);
  margin-top: 10px;
  font-size: 15px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple);
  margin-bottom: 12px;
}

/* ── Features ── */

.features {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature {
  padding: 28px 24px;
  background: var(--surface);
  transition: background var(--ease);
}

.feature:hover { background: var(--surface-2); }

.feature-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--purple);
  background: var(--purple-soft);
  border-radius: 8px;
}

.feature h3 {
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feature p {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
}

/* ── Steps ── */

.step-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}

.step-list::before {
  content: "";
  position: absolute;
  top: 22px;
  left: calc(16.66% + 20px);
  right: calc(16.66% + 20px);
  height: 1px;
  background: var(--border-strong);
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 24px;
  position: relative;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--purple);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.step-body h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.step-body p {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
  max-width: 260px;
}

/* ── Download ── */

.download { padding: 72px 0; }

.download-card {
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  position: relative;
}

.download-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 120%, var(--purple-glow), transparent);
  pointer-events: none;
}

.download-card-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 32px;
}

.download-icon {
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.download-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.download-text p {
  color: var(--text-2);
  margin-bottom: 28px;
  font-size: 15px;
}

.btn-download { min-width: 260px; }

.download-note {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}

/* ── Preview ── */

.preview { padding-bottom: 96px; }

.preview-shell {
  max-width: 920px;
  margin: 0 auto;
}

.app-window-lg .app-layout-lg { min-height: 340px; }

.app-nav-lg { width: 168px; padding: 18px 12px; }

.app-nav-lg .app-nav-item { font-size: 13px; padding: 9px 12px; }

.app-panel-lg { padding: 24px 28px; }

.app-panel-lg .app-panel-title { font-size: 15px; }

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

.info-card {
  padding: 16px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.info-card h4 {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 12px;
}

.info-card dl div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.info-card dl div:last-child { border-bottom: none; }

.info-card dt { color: var(--text-3); }

.info-card dd {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

.info-card dd.green { color: var(--green); }

.info-card dd.masked { letter-spacing: 1.5px; color: var(--text-3); }

/* ── Docs ── */

.docs {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.doc-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--ease);
}

.doc-card:hover { border-color: var(--border-strong); }

.doc-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--purple);
  margin-bottom: 12px;
}

.doc-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.doc-card p {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
}

/* ── Footer ── */

.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--text-3);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-nav a {
  font-size: 13.5px;
  color: var(--text-2);
  transition: color var(--ease);
}

.footer-nav a:hover { color: var(--text); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-3);
}

/* ── Responsive ── */

@media (max-width: 960px) {
  .navbar-inner {
    grid-template-columns: 1fr auto;
  }

  .nav-center { display: none; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 20px 16px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    padding: 11px 12px;
    border-radius: 8px;
  }

  .navbar-inner { position: relative; }

  .menu-toggle { display: block; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual {
    min-height: auto;
    order: -1;
  }

  .hero-image-wrap {
    position: relative;
    top: 0;
    right: 0;
    width: 180px;
    margin: 0 auto 20px;
  }

  .hero-app {
    margin-top: 0;
    transform: none;
  }

  .hero-app:hover { transform: none; }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .step-list {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .step-list::before { display: none; }

  .step-item { padding: 0; }

  .docs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .container { padding: 0 20px; }

  section { padding: 72px 0; }

  .hero { padding: 56px 0 72px; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }

  .btn-nav { display: none; }

  .feature-grid { grid-template-columns: 1fr; }

  .preview-grid { grid-template-columns: 1fr; }

  .app-layout { flex-direction: column; }

  .app-nav {
    width: 100%;
    display: flex;
    gap: 4px;
    padding: 10px;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .app-nav-brand { display: none; }

  .app-nav-item { white-space: nowrap; margin-bottom: 0; }

  .footer-top {
    flex-direction: column;
    gap: 28px;
  }

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

  .btn-download { min-width: unset; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-brand-img { animation: none; }
  .hero-app { transform: none; }
  .hero-app:hover { transform: none; }
}
