@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0f1520;
  --sidebar: #141b28;
  --surface: #1a2332;
  --surface-hover: #1e2a3a;
  --border: rgba(56, 189, 248, 0.12);
  --text: #c8d2de;
  --text-muted: #7d8da0;
  --heading: #f0f4f8;
  --accent: #38bdf8;
  --accent-green: #34d399;
  --accent-yellow: #fbbf24;
  --accent-purple: #a78bfa;
  --code-bg: #111827;
  --font-sans: 'IBM Plex Sans', sans-serif;
  --font-heading: 'Chakra Petch', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --nav-h: 80px;
  --max: 1176px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 9999;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* —— Nav —— */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(15, 21, 32, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.08);
  transition: box-shadow 0.2s ease;
}

.site-nav.is-scrolled {
  box-shadow:
    0 2px 20px rgba(56, 189, 248, 0.06),
    0 4px 8px rgba(0, 0, 0, 0.3);
}

.site-nav__inner {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.site-nav__start {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* GitHub — custom pill (no shields.io image) */
.github-pill {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  opacity: 0.92;
  transition: opacity 0.2s ease;
}

.github-pill:hover {
  opacity: 1;
}

.github-pill__inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 11px;
  border-radius: 999px;
  background: linear-gradient(155deg, rgba(30, 42, 62, 0.92) 0%, rgba(15, 21, 32, 0.98) 100%);
  border: 1px solid rgba(56, 189, 248, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 2px 14px rgba(0, 0, 0, 0.4),
    0 0 28px rgba(56, 189, 248, 0.07);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.github-pill:hover .github-pill__inner {
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 22px rgba(0, 0, 0, 0.45),
    0 0 36px rgba(56, 189, 248, 0.14);
}

.github-pill:active .github-pill__inner {
  transform: scale(0.98);
}

.github-pill__mark {
  flex-shrink: 0;
  color: #c8d2de;
  transition: color 0.2s ease;
}

.github-pill:hover .github-pill__mark {
  color: #f0f4f8;
}

.github-pill__count {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--heading);
  letter-spacing: 0.03em;
  line-height: 1;
  min-width: 1.5em;
}

.github-pill__star {
  flex-shrink: 0;
  color: #fbbf24;
  filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.45));
}

.site-nav__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.site-nav__brand img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.site-nav__title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.site-nav__title span {
  color: var(--accent);
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.site-nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #a8b5c6;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: color 0.2s, text-shadow 0.2s;
}

.site-nav__links a:hover {
  color: var(--accent);
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #8b98a8;
}

/* —— Sections —— */
.section {
  padding: 100px 24px;
}

.section--surface {
  background: var(--surface);
}

.section__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section__eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.section__head {
  text-align: center;
  margin-bottom: 64px;
}

.section__head--left {
  text-align: left;
  max-width: 640px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--heading);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.lead {
  font-size: 1.25rem;
  color: #a8b5c6;
  line-height: 1.75;
  max-width: 640px;
}

.lead--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* —— Hero —— */
.hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.1) 0%, rgba(167, 139, 250, 0.04) 40%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(56, 189, 248, 0.3), transparent);
}

.hero__inner {
  max-width: 840px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero__accent {
  color: var(--accent);
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}

.hero__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  padding: 12px 28px;
  min-height: 48px;
  border: none;
  cursor: pointer;
  transition: background 0.25s, box-shadow 0.25s, border-color 0.25s, transform 0.15s;
}

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

.btn--primary {
  background: var(--accent);
  color: var(--bg);
}

.btn--primary:hover {
  background: #22a5e0;
  box-shadow:
    0 0 24px rgba(56, 189, 248, 0.35),
    0 8px 16px rgba(56, 189, 248, 0.25);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.btn--ghost:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.18);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn--block {
  width: 100%;
}

/* —— Cards grid —— */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.card {
  padding: 28px 28px 24px;
  background: var(--surface);
  border: 1px solid rgba(56, 189, 248, 0.1);
  border-radius: 16px;
  transition:
    box-shadow 0.3s,
    transform 0.3s,
    border-color 0.3s;
}

.card:hover {
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.1);
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.25);
}

.card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card__icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.card p {
  font-size: 0.85rem;
  color: #a8b5c6;
  line-height: 1.65;
}

/* —— Why grid —— */
.why-grid .card {
  background: rgba(56, 189, 248, 0.05);
}

.why-grid .card__icon {
  width: 48px;
  height: 48px;
  background: rgba(56, 189, 248, 0.15);
  border-radius: 12px;
}

.why-grid .card__icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
}

.why-grid h4 {
  font-size: 1.125rem;
}

/* —— Steps —— */
.steps-wrap {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.steps-line {
  position: absolute;
  top: 40px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, #00d4ff, #a855f7);
  opacity: 0.3;
  z-index: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
  z-index: 1;
}

.step {
  text-align: center;
}

.step__num {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  border: 1px solid;
}

.step h4 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.step p {
  font-size: 0.875rem;
  color: #a8b5c6;
  line-height: 1.6;
}

/* —— Architecture —— */
.arch-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 64px;
  align-items: start;
}

.arch-list {
  margin-top: 24px;
}

.arch-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}

.arch-item:last-child {
  border-bottom: none;
}

.arch-item svg {
  width: 22px;
  height: 22px;
  color: var(--accent-green);
  flex-shrink: 0;
  margin-top: 2px;
}

.arch-item h5 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 4px;
}

.arch-item p {
  font-size: 0.85rem;
  color: #a8b5c6;
  line-height: 1.5;
}

.terminal {
  background: var(--code-bg);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.12);
  box-shadow:
    0 0 30px rgba(56, 189, 248, 0.06),
    0 24px 48px rgba(0, 0, 0, 0.3);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  background: #1a2235;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}

/* Only the traffic-light dots are 12×12 circles — do not style .terminal__title here */
.terminal__bar .dot-r,
.terminal__bar .dot-y,
.terminal__bar .dot-g {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal__bar .dot-r {
  background: #ef4444;
}
.terminal__bar .dot-y {
  background: #f59e0b;
}
.terminal__bar .dot-g {
  background: #10b981;
}

.terminal__title {
  margin-left: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
  font-family: var(--font-mono);
  white-space: nowrap;
  line-height: 1.2;
}

.terminal__body {
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.9;
  min-height: 180px;
  max-height: 280px;
  overflow-y: auto;
  color: #c9d1d9;
}

.terminal__body .g {
  color: #3fb950;
}
.terminal__body .b {
  color: #58a6ff;
}
.terminal__body .gr {
  color: #484f58;
}
.terminal__body .cy {
  color: #39d2e0;
}
.terminal__body .w {
  color: #c9d1d9;
}

/* —— Video —— */
.video-box {
  max-width: 900px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.18);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.4), 0 0 30px rgba(56, 189, 248, 0.06);
}

.video-box video {
  width: 100%;
  display: block;
}

.video-fallback {
  padding: 48px;
  text-align: center;
  color: #a8b5c6;
  font-size: 0.95rem;
  background: var(--surface);
}

/* —— Download —— */
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.download-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 36px 28px 32px;
  border: 1px solid rgba(56, 189, 248, 0.1);
  text-align: center;
  transition:
    box-shadow 0.3s,
    transform 0.3s;
}

.download-card:hover {
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.1);
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.25);
}

.download-card img {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  object-fit: contain;
}

.download-card img.invert {
  filter: invert(1);
}

.download-card h4 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.download-card .btn {
  width: 100%;
  margin-top: 8px;
  font-size: 0.875rem;
}

.download-note {
  text-align: center;
  margin-top: 32px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.download-note code {
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border: 1px solid rgba(56, 189, 248, 0.18);
  color: var(--accent);
}

/* —— CTA —— */
.cta-box {
  max-width: var(--max);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 24px;
  padding: 64px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cta-box__text {
  position: relative;
  z-index: 1;
}

.cta-box__actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* —— Footer —— */
.site-footer {
  background: var(--surface);
  border-top: 1px solid rgba(56, 189, 248, 0.1);
  padding: 48px 24px 24px;
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.site-footer__top {
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}

.site-footer__brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.site-footer__brand span {
  color: var(--accent);
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.site-footer__top p {
  max-width: 280px;
  font-size: 0.8rem;
  color: #a8b5c6;
  line-height: 1.6;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* —— Fade-in —— */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* —— Solution section top line —— */
.lp-solution {
  position: relative;
}

.lp-solution::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(56, 189, 248, 0.25), transparent);
}

/* —— Responsive —— */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-line {
    display: none;
  }

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

  .download-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .cta-box {
    flex-direction: column;
    text-align: center;
    padding: 48px 32px;
  }

  .cta-box__actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-box__actions .btn {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .site-nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 16px;
    background: rgba(15, 21, 32, 0.98);
    border-bottom: 1px solid rgba(56, 189, 248, 0.08);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition:
      transform 0.25s ease,
      opacity 0.25s ease,
      visibility 0.25s;
  }

  .site-nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav__links li {
    width: 100%;
  }

  .site-nav__links a {
    display: block;
    padding: 12px 8px;
  }

  .nav-toggle {
    display: block;
  }
}

@media (max-width: 640px) {
  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
  }

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

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

  .site-footer__bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
