:root {
  --bg: #0c0e14;
  --bg-alt: #11141d;
  --surface: #161a24;
  --surface-border: #262c3a;
  --text: #eef0f6;
  --text-muted: #9aa3b6;
  --accent: #34c77b;
  --accent-strong: #5fe0a0;
  --accent-soft: rgba(52, 199, 123, 0.14);
  --success: #5fe0a0;
  --radius: 14px;
  --max-width: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

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

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

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  padding: 0.1em 0.4em;
  border-radius: 6px;
  font-size: 0.9em;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
  background: var(--accent);
  color: #0a0c12;
}

.btn--primary:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.btn--outline {
  border-color: var(--surface-border);
  color: var(--text);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.btn--ghost {
  border-color: var(--surface-border);
  color: var(--text);
  padding: 10px 18px;
  font-size: 0.9rem;
}

.btn--ghost:hover {
  border-color: var(--accent);
}

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(12, 14, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--surface-border);
}

.nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.nav__logo {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  object-fit: cover;
}

.nav__links {
  display: flex;
  gap: 28px;
}

.nav__links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

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

@media (max-width: 760px) {
  .nav__links {
    display: none;
  }
}

/* Hero */

.hero {
  padding: 88px 0 96px;
  overflow: hidden;
}

.hero__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__copy {
  max-width: 720px;
}

.eyebrow {
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

.hero__lead {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 46ch;
  margin: 0 auto 32px;
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 44px;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: 36px;
  list-style: none;
  padding: 0;
  margin: 0 auto;
}

.hero__stats li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero__stats strong {
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.hero__stats span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* Hero media */

.hero__media {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(240px, 420px);
  align-items: center;
  justify-content: center;
  column-gap: 32px;
  row-gap: 18px;
  width: 100%;
  margin-bottom: 28px;
}

.hero__logo {
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  object-fit: cover;
  border: 1px solid var(--surface-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

/* Keeps .hero__image and .hero__download as direct grid items of .hero__media
   so the image aligns with the logo on row 1 without the button's height
   throwing off the vertical centering. */
.hero__image-group {
  display: contents;
}

.hero__image {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius);
  border: 1px solid var(--surface-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.hero__download {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
  min-width: 160px;
}

@media (max-width: 700px) {
  .hero__media {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .hero__logo {
    grid-column: 1;
    grid-row: 1;
  }

  .hero__image {
    grid-column: 1;
    grid-row: 2;
  }

  .hero__download {
    grid-column: 1;
    grid-row: 3;
  }
}

.hero__download:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hero__eyebrow {
  margin: 0 0 20px;
}

.hero__download:disabled:hover {
  border-color: var(--surface-border);
  color: var(--text);
}

/* Sections */

.section {
  padding: 88px 0;
  border-top: 1px solid var(--surface-border);
}

.section--alt {
  background: var(--bg-alt);
}

.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}

.section__lead {
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0 0 48px;
}

/* Steps */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

@media (max-width: 860px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.step__num {
  display: inline-block;
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.step h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.step p {
  color: var(--text-muted);
  margin: 0;
}

/* Cards */

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

@media (max-width: 900px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Architecture */

.arch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

@media (max-width: 900px) {
  .arch {
    grid-template-columns: 1fr;
  }
}

.specs {
  margin: 32px 0 0;
  border-top: 1px solid var(--surface-border);
}

.specs__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--surface-border);
}

.specs__row dt {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.specs__row dd {
  margin: 0;
  font-size: 0.95rem;
}

.diagram {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 32px 24px;
}

.diagram__box {
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.85rem;
  text-align: center;
}

.diagram__box--signal {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
  margin-bottom: 28px;
}

.diagram__box--signal small {
  color: var(--text-muted);
  font-weight: 400;
}

.diagram__peers {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.diagram__box--peer {
  flex: 1;
  background: var(--bg-alt);
  color: var(--text-muted);
}

.diagram__caption {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
}

/* Support / Pix */

.support {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 900px) {
  .support {
    grid-template-columns: 1fr;
  }
}

.support__copy h2 {
  margin-top: 0;
}

.support__copy .section__lead {
  margin-bottom: 0;
}

.support__frame {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.support__frame img {
  width: 100%;
  border-radius: calc(var(--radius) - 1px);
}

.support__frame:hover,
.support__frame:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 24px 60px var(--accent-soft);
  transform: translateY(-2px);
  outline: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(6, 8, 12, 0.9);
  cursor: zoom-out;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(90vw, 480px);
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px var(--accent-soft);
}

/* CTA */

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

.cta {
  max-width: 620px;
}

.cta p {
  color: var(--text-muted);
  margin: 0 0 32px;
}

.cta__form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta__form input {
  flex: 1;
  min-width: 220px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
}

.cta__form input:focus {
  outline: none;
  border-color: var(--accent);
}

.cta__note {
  min-height: 1.2em;
  margin: 16px 0 0;
  font-size: 0.9rem;
  color: var(--success);
}

/* Footer */

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

.footer__row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
