:root {
  --fb-bg: #0b0f1c;
  --fb-bg-2: #111733;
  --fb-surface: #ffffff;
  --fb-surface-dark: #0f1426;
  --fb-text: #1a1a2e;
  --fb-text-muted: #5a6076;
  --fb-accent: #ffc107;
  --fb-accent-2: #ffd454;
  --fb-border: #e6e8ef;
  --fb-border-dark: rgba(255, 193, 7, 0.18);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--fb-text);
  background-color: var(--fb-surface);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.fb-accent { color: var(--fb-accent); }

.py-6 { padding-top: 6rem; padding-bottom: 6rem; }

/* ---------- Navbar ---------- */
.fb-nav {
  background-color: rgba(11, 15, 28, 0.85);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.fb-nav .navbar-brand { color: #fff; }
.fb-nav .nav-link {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}
.fb-nav .nav-link:hover { color: var(--fb-accent); }
.fb-nav .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.2);
}
.fb-nav .navbar-toggler-icon {
  filter: invert(1) grayscale(100%) brightness(2);
}

/* ---------- Hero ---------- */
.fb-hero {
  position: relative;
  background: radial-gradient(ellipse at top, var(--fb-bg-2) 0%, var(--fb-bg) 60%);
  overflow: hidden;
  min-height: 100vh;
}

.fb-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.fb-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 85% center;
  opacity: 0.95;
  filter: brightness(0.55) saturate(0.9);
}

.fb-hero-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.18;
}

.fb-edges path {
  stroke-dasharray: 6 8;
  animation: fb-dash 24s linear infinite;
}
@keyframes fb-dash { to { stroke-dashoffset: -400; } }

.fb-nodes circle:nth-child(odd) { animation: fb-glow 4s ease-in-out infinite; }
.fb-nodes circle:nth-child(even) { animation: fb-glow 4s ease-in-out infinite; animation-delay: 2s; }
@keyframes fb-glow {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

.fb-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 15, 28, 0.88) 0%, rgba(11, 15, 28, 0.55) 45%, rgba(11, 15, 28, 0.15) 100%),
    linear-gradient(180deg, rgba(11, 15, 28, 0.05) 0%, rgba(11, 15, 28, 0.6) 100%);
}

.fb-hero-content { z-index: 2; }

.fb-badge {
  background: rgba(255, 193, 7, 0.12);
  color: var(--fb-accent);
  border: 1px solid rgba(255, 193, 7, 0.3);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.fb-hero h1 { letter-spacing: -0.02em; line-height: 1.05; }

.fb-hero-stats > div { min-width: 9rem; }

.fb-btn-primary {
  background-color: var(--fb-accent);
  color: #1a1a2e;
  border: none;
  font-weight: 600;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.fb-btn-primary:hover {
  background-color: var(--fb-accent-2);
  color: #1a1a2e;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(255, 193, 7, 0.6);
}

.fb-btn-ghost {
  background-color: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 500;
}
.fb-btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

/* ---------- Sections ---------- */
.fb-section { background-color: var(--fb-surface); }
.fb-section-dark {
  background:
    radial-gradient(ellipse at top right, rgba(255, 193, 7, 0.06), transparent 50%),
    var(--fb-bg);
  color: #fff;
}
.fb-section-tint {
  background:
    radial-gradient(ellipse at top left, rgba(255, 193, 7, 0.04), transparent 55%),
    #f8f9fc;
}

.fb-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
  color: #b78600;
  background: rgba(255, 193, 7, 0.12);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
}
.fb-eyebrow-dark {
  color: var(--fb-accent);
  background: rgba(255, 193, 7, 0.1);
}

/* ---------- Feature cards ---------- */
.fb-card {
  background: #fff;
  border: 1px solid var(--fb-border);
  border-radius: 14px;
  padding: 1.75rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  height: 100%;
}
.fb-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -22px rgba(15, 20, 38, 0.25);
  border-color: rgba(255, 193, 7, 0.45);
}
.fb-card-feature {
  border-color: rgba(255, 193, 7, 0.55);
  background:
    linear-gradient(135deg, rgba(255, 193, 7, 0.08), transparent 55%),
    #fff;
}
.fb-card-feature .fb-card-icon {
  background: rgba(255, 193, 7, 0.22);
  color: #946d00;
}
.fb-card h5 {
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.fb-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(255, 193, 7, 0.14);
  color: #b78600;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

/* ---------- Use case cards ---------- */
.fb-usecase-card {
  background: #fff;
  border: 1px solid var(--fb-border);
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.fb-usecase-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px -28px rgba(15, 20, 38, 0.3);
  border-color: rgba(255, 193, 7, 0.5);
}
.fb-usecase-thumb {
  background: #0d1224;
  line-height: 0;
  border-bottom: 1px solid rgba(255, 193, 7, 0.12);
}
.fb-usecase-thumb svg {
  width: 100%;
  height: auto;
  display: block;
}
.fb-usecase-body {
  padding: 1.5rem 1.75rem 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.fb-usecase-card h5 {
  font-weight: 700;
  margin-bottom: 0.55rem;
}
.fb-usecase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.1rem;
}
.fb-usecase-tag {
  font-size: 0.74rem;
  background: rgba(255, 193, 7, 0.13);
  color: #8a6500;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.uc-glow { animation: fb-glow 4s ease-in-out infinite; }
.uc-glow:nth-of-type(even) { animation-delay: 2s; }

/* ---------- Component chips ---------- */
.fb-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--fb-border-dark);
  color: #e6e9f2;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.fb-chip i {
  color: var(--fb-accent);
  font-size: 1.05rem;
}
.fb-chip:hover {
  background: rgba(255, 193, 7, 0.07);
  border-color: rgba(255, 193, 7, 0.4);
  transform: translateY(-1px);
}

/* ---------- Self-host list ---------- */
.fb-list li {
  padding: 0.5rem 0;
  font-size: 1rem;
  color: var(--fb-text);
}
.fb-list i {
  color: var(--fb-accent);
  margin-right: 0.6rem;
  font-size: 1.1rem;
}

/* ---------- Terminal ---------- */
.fb-terminal {
  background: #0d1224;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
}
.fb-terminal-bar {
  background: #181d33;
  padding: 0.6rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.fb-terminal-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.fb-dot-red    { background: #ff5f56; }
.fb-dot-yellow { background: #ffbd2e; }
.fb-dot-green  { background: #27c93f; }
.fb-terminal-title {
  margin-left: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.fb-terminal-body {
  margin: 0;
  padding: 1.3rem 1.4rem;
  color: #e6e9f2;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  background: #0d1224;
  overflow-x: auto;
  white-space: pre;
}
.fb-prompt  { color: var(--fb-accent); margin-right: 0.4rem; }
.fb-cmd     { color: #e6e9f2; }
.fb-comment { color: #6c7693; }

/* ---------- Footer ---------- */
.fb-footer {
  background: #07091a;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 991.98px) {
  .py-6 { padding-top: 4rem; padding-bottom: 4rem; }
  .fb-hero h1 { font-size: 2.6rem; }
  .fb-hero { min-height: 100svh; }
  .fb-hero-content .row {
    min-height: 100svh;
    padding-top: 6.25rem !important;
  }

  .fb-hero-bg::before {
    content: "";
    position: absolute;
    inset: -1.5rem;
    background: url("videos/hero-poster.jpg") center / cover no-repeat;
    filter: blur(18px) brightness(0.55) saturate(0.9);
    transform: scale(1.08);
    opacity: 0.9;
  }

  .fb-hero-video {
    inset: auto auto clamp(30rem, 10vh, 6rem) 50%;
    width: min(132vw, 980px);
    height: auto;
    aspect-ratio: 1664 / 879;
    transform: translateX(-50%);
    object-fit: contain;
    object-position: center;
    opacity: 0.92;
    filter: brightness(0.95) saturate(1);
  }

  .fb-hero-svg { display: none; }

  .fb-hero-overlay {
    background:
      linear-gradient(180deg, rgba(11, 15, 28, 0.92) 0%, rgba(11, 15, 28, 0.7) 36%, rgba(11, 15, 28, 0.28) 62%, rgba(11, 15, 28, 0.76) 100%),
      linear-gradient(90deg, rgba(11, 15, 28, 0.74) 0%, rgba(11, 15, 28, 0.24) 100%);
  }
}

@media (max-width: 767.98px) {
  .fb-hero-content .d-flex.flex-wrap.gap-3 {
    align-items: stretch;
  }

  .fb-hero-content .d-flex.flex-wrap.gap-3 .btn {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

@media (max-width: 575.98px) {
  .fb-hero h1 { font-size: 2.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  .fb-edges path,
  .fb-nodes circle,
  .fb-pulses circle,
  .uc-glow { animation: none; }
}
