:root {
  --bg: #0a0c10;
  --surface: #13161d;
  --surface-elev: #191d26;
  --pitch: #07080b;
  --border: #232834;
  --border-strong: #313849;
  --accent: #d4ff00;
  --accent-soft: rgba(212, 255, 0, 0.12);
  --cyan: #38bdf8;
  --cyan-soft: rgba(56, 189, 248, 0.12);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.14);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.12);
  --text: #f2f5fa;
  --muted: #8e98ac;
  --on-accent: #0a0c10;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max-w: 1140px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 75% 45% at 20% -5%, rgba(212, 255, 0, 0.08), transparent 60%),
    radial-gradient(ellipse 65% 40% at 85% 5%, rgba(56, 189, 248, 0.08), transparent 60%);
  color: var(--text);
  line-height: 1.58;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Header */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 12, 16, 0.78);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
}

.brand-title {
  font-size: 1.15rem;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

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

.lang-switch {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.lang-btn.active {
  background: var(--accent);
  color: var(--on-accent);
}

/* Hero */
.hero {
  padding: 64px 0 42px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(212, 255, 0, 0.35);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.8vw, 3.6rem);
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 820px;
  margin: 0 auto 18px;
}

.hero h1 .lime {
  color: var(--accent);
}

.hero-lead {
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  max-width: 680px;
  margin: 0 auto 28px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.btn:hover:not(.disabled) {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 8px 28px rgba(212, 255, 0, 0.16);
}

.btn-primary:hover:not(.disabled) {
  box-shadow: 0 10px 32px rgba(212, 255, 0, 0.28);
}

.btn-cyan {
  background: var(--cyan-soft);
  color: var(--cyan);
  border-color: rgba(56, 189, 248, 0.4);
}

.btn-green {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(52, 211, 153, 0.45);
}

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

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

.btn.disabled {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
}

.hero-meta {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.meta-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}

/* Section headings */
.section {
  padding: 34px 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-head p {
  color: var(--muted);
  font-size: 0.94rem;
}

/* Download Bento Grid */
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.duo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.twingate-list {
  list-style: none;
  display: grid;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.twingate-list li {
  background: var(--pitch);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
}

.twingate-list li strong {
  color: var(--text);
}

.dl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.16s ease;
}

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

.dl-card.featured {
  border-color: rgba(212, 255, 0, 0.35);
  background: linear-gradient(180deg, rgba(212, 255, 0, 0.04) 0%, var(--surface) 45%);
}

.dl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.os-title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.os-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface-elev);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.os-name {
  font-size: 1.15rem;
  font-weight: 800;
}

.os-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.ver-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-elev);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  white-space: nowrap;
}

.ver-pill.cyan {
  color: var(--cyan);
}

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

.ver-pill.amber {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: rgba(251, 191, 36, 0.35);
}

.dl-desc {
  color: var(--muted);
  font-size: 0.9rem;
}

.dl-specs {
  background: var(--pitch);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
}

.spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.spec-k {
  color: var(--muted);
}

.spec-v {
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-mini {
  background: var(--surface-elev);
  border: 1px solid var(--border-strong);
  color: var(--muted);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.copy-mini:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.terminal-box {
  background: var(--pitch);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  color: var(--cyan);
}

.terminal-box code {
  overflow-x: auto;
  white-space: nowrap;
}

.dl-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.dl-actions .btn {
  width: 100%;
}

/* Changelog banner */
.changelog-card {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
}

.changelog-label {
  color: var(--accent);
  font-weight: 700;
  margin-right: 8px;
}

/* Feature Bento Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
}

.feat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-elev);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  margin-bottom: 13px;
}

.feat-card h3 {
  font-size: 1.02rem;
  font-weight: 750;
  margin-bottom: 6px;
}

.feat-card p {
  font-size: 0.88rem;
  color: var(--muted);
}

/* Architecture Banner */
.sync-banner {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(212, 255, 0, 0.06));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: center;
}

.sync-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--muted);
}

.sync-list li strong {
  color: var(--text);
}

.sync-visual {
  background: var(--pitch);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: grid;
  gap: 10px;
  font-size: 0.84rem;
}

.node-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.node-tag {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--green);
}

/* Privacy Page */
.prose-card {
  max-width: 860px;
  margin: 34px auto 64px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
}

.prose-card h1 {
  font-size: 1.9rem;
  margin-bottom: 8px;
}

.prose-card .updated {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.prose-card h2 {
  font-size: 1.15rem;
  color: var(--accent);
  margin: 22px 0 8px;
}

.prose-card p,
.prose-card li {
  color: var(--muted);
  font-size: 0.94rem;
  margin-bottom: 8px;
}

.prose-card ul {
  padding-left: 20px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 26px 0 38px;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--accent);
}

@media (max-width: 960px) {
  .download-grid,
  .duo-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .sync-banner {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}
