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

:root {
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Ubuntu, Cantarell, Roboto, "Helvetica Neue", "Noto Sans", "Open Sans", Arial, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", "Cascadia Code", "Consolas", "Menlo", monospace;
  --bg: #070c18;
  --bg-card: #0c1525;
  --bg-card-hover: #101d35;
  --accent: #5ba3cc;
  --accent-dim: rgba(91, 163, 204, 0.12);
  --accent-glow: rgba(91, 163, 204, 0.3);
  --accent-hover: #74b8de;
  --text: #dce6f5;
  --text-muted: #7a879e;
  --text-dim: #3a4558;
  --border: rgba(91, 163, 204, 0.12);
  --border-strong: rgba(91, 163, 204, 0.28);
  --radius: 14px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 12, 24, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, box-shadow 0.3s;
}

.site-header.scrolled {
  background: rgba(7, 12, 24, 0.96);
  box-shadow: 0 1px 0 rgba(91, 163, 204, 0.08), 0 4px 24px rgba(0, 0, 0, 0.4);
}

.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.logo span { color: var(--accent); }

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

.lang-switch { display: flex; gap: 2px; margin-left: 8px; }

.lang-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.03em;
}

.lang-btn:hover, .lang-btn.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.nav-link {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.hide-mobile { display: inline; }

/* ─── Buttons ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border-strong);
}

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

.btn-lg { padding: 14px 36px; font-size: 15px; border-radius: var(--radius); }

/* ─── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(91, 163, 204, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 30% at 20% 80%, rgba(0, 80, 160, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner { max-width: 820px; position: relative; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 32px;
  background: var(--accent-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
  color: #fff;
}

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

.hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 580px;
  margin: 0 auto 44px;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-cta .nav-link { font-size: 14px; padding: 10px 16px; }

.hero-stats {
  margin-top: 72px;
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
}

.stat {
  flex: 1;
  min-width: 140px;
  text-align: center;
  padding: 28px 20px;
  border-right: 1px solid var(--border);
}

.stat:last-child { border-right: none; }

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  display: block;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ─── Divider ──────────────────────────────────────────────────────────── */

.divider {
  text-align: center;
  color: var(--text-dim);
  font-size: 16px;
  letter-spacing: 0.4em;
  padding: 16px 0;
  user-select: none;
}

/* ─── Sections ─────────────────────────────────────────────────────────── */

.section {
  padding: 80px 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.section-header { margin-bottom: 48px; }

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 12px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */

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

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  transition: border-color 0.3s, background 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.product-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, rgba(91, 163, 204, 0) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.product-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-strong);
}

.product-card:hover::after { opacity: 1; }

.product-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--accent);
}

.product-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.product-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ─── Steps ───────────────────────────────────────────────────────────────── */

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

.step {
  text-align: center;
  padding: 40px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 auto 22px;
}

.step-title { font-size: 1.1rem; font-weight: 600; color: #fff; margin-bottom: 10px; }
.step-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }

/* ─── Download ──────────────────────────────────────────────────────────── */

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

.download-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.download-item:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.download-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent);
}

.download-os { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.download-arch { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; flex: 1; }

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: var(--accent-dim);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  transition: background 0.2s, transform 0.2s;
  font-family: var(--font);
}

.btn-download:hover { background: rgba(91, 163, 204, 0.22); transform: translateY(-1px); }

/* ─── OS tabs ───────────────────────────────────────────────────────────── */

.os-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.os-tab {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
  font-family: var(--font);
}

.os-tab:hover { color: var(--text); }
.os-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.os-panel { display: none; }
.os-panel.active { display: block; }

/* ─── Install steps ─────────────────────────────────────────────────────── */

.install-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}

.install-step { display: flex; gap: 16px; align-items: flex-start; }

.install-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 2px;
}

.install-step-body { flex: 1; }

.install-step-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.install-step-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ─── Code blocks ───────────────────────────────────────────────────────── */

pre {
  background: #080f1e;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  color: #c8d8f0;
  overflow-x: auto;
  margin: 12px 0 0;
  white-space: pre;
}

code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: rgba(91, 163, 204, 0.08);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--accent);
}

pre code { background: none; border: none; padding: 0; font-size: inherit; color: inherit; }

.code-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 24px;
  margin-bottom: 4px;
}

/* ─── Info / warning boxes ───────────────────────────────────────────────── */

.note {
  padding: 14px 18px;
  background: var(--accent-dim);
  border: 1px solid rgba(91, 163, 204, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 16px 0;
}

.note strong { color: var(--accent); }

.warning {
  padding: 14px 18px;
  background: rgba(204, 150, 50, 0.07);
  border: 1px solid rgba(204, 150, 50, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 16px 0;
}

.warning strong { color: #cca05b; }

/* ─── API-specific ───────────────────────────────────────────────────────── */

.endpoint-box {
  background: #080f1e;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 20px;
  flex-wrap: wrap;
}

.endpoint-path {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
}

.method {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.method-post { background: rgba(91, 163, 204, 0.15); color: var(--accent); border: 1px solid var(--border-strong); }
.method-get  { background: rgba(91, 204, 140, 0.12); color: #5bcc8c; border: 1px solid rgba(91, 204, 140, 0.25); }

.status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.status-2 { background: rgba(91, 204, 140, 0.12); color: #5bcc8c; }
.status-4, .status-5 { background: rgba(204, 91, 91, 0.12); color: #cc6b6b; }

.api-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0;
}

.api-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.api-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
  line-height: 1.55;
}

.api-table tr:last-child td { border-bottom: none; }

.api-table td:first-child {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
}

.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 16px 0;
}

.page-sub-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 48px 0 8px;
  letter-spacing: -0.02em;
}

.page-sub-title:first-child { margin-top: 0; }

.page-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 4px;
}

/* ─── CTA section ───────────────────────────────────────────────────────── */

.cta-section { padding: 80px 24px; text-align: center; }

.cta-box {
  max-width: 680px;
  margin: 0 auto;
  padding: 72px 56px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100% 80% at 50% -20%, rgba(91, 163, 204, 0.07) 0%, transparent 65%);
  pointer-events: none;
}

.cta-box h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
  position: relative;
}

.cta-box p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.75;
  position: relative;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy { font-size: 13px; color: var(--text-dim); }
.footer-links { display: flex; gap: 24px; align-items: center; }

.footer-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ─── Animations ────────────────────────────────────────────────────────── */

.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in.visible { opacity: 1; transform: none; }

.features-grid .product-card:nth-child(2),
.steps .step:nth-child(2) { transition-delay: 0.1s; }

.features-grid .product-card:nth-child(3),
.steps .step:nth-child(3) { transition-delay: 0.2s; }

.download-grid .download-item:nth-child(2) { transition-delay: 0.07s; }
.download-grid .download-item:nth-child(3) { transition-delay: 0.14s; }
.download-grid .download-item:nth-child(4) { transition-delay: 0.21s; }

/* ─── Responsive ────────────────────────────────────────────────────────── */

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

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

@media (max-width: 700px) {
  .site-header { padding: 0 20px; }
  .hide-mobile { display: none; }

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

  .hero-stats { flex-direction: column; }

  .stat {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
  }

  .stat:last-child { border-bottom: none; }

  .cta-box { padding: 48px 28px; }

  .site-footer {
    padding: 24px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .section { padding: 60px 20px; }
  .product-card { padding: 28px 24px; }
  .download-grid { grid-template-columns: 1fr 1fr; }
  .os-tab { padding: 10px 14px; font-size: 13px; }
}

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