:root {
  --bg: #070b14;
  --bg-elevated: #0e1524;
  --bg-card: #121a2b;
  --bg-card-hover: #162033;
  --line: rgba(148, 163, 184, 0.14);
  --text: #e8eef9;
  --muted: #9aa8c0;
  --faint: #6b7a94;
  --accent: #5b8cff;
  --accent-strong: #3d74ff;
  --accent-soft: rgba(91, 140, 255, 0.14);
  --good: #3dd68c;
  --good-soft: rgba(61, 214, 140, 0.12);
  --danger: #ff6b8a;
  --security: #ffd93d;
  --security-soft: rgba(255, 217, 61, 0.12);
  --radius: 16px;
  --radius-lg: 20px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 32px 80px rgba(0, 0, 0, 0.45);
  --max: 1120px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "SF Mono", Consolas, "Courier New", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1em 0.4em;
  border-radius: 6px;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(1000px 500px at 15% -10%, rgba(61, 116, 255, 0.32), transparent 65%),
    radial-gradient(800px 450px at 90% 8%, rgba(61, 214, 140, 0.15), transparent 60%),
    radial-gradient(700px 450px at 50% 100%, rgba(91, 140, 255, 0.1), transparent 55%);
  animation: glow-pulse 8s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.container {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid var(--line);
}

.nav {
  /* Brand and main navigation are arranged as a group starting from the left */
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 68px;
  /* Wider gap between brand and nav links for visual separation; overall stays left-aligned */
  gap: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-name {
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  background-image: linear-gradient(135deg, #fff 0%, #b7ccff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-footer .brand-name {
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

/* Download button: plain text style that stands apart from text links without
   overpowering them; fills with the accent color on hover for clear feedback */
.nav-links a.nav-cta {
  color: var(--accent);
  font-weight: 600;
  background: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a.nav-cta:hover {
  color: #fff;
  background: var(--accent);
}

.hero {
  padding: 5.5rem 0 4rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  color: var(--good);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 4px var(--good-soft), 0 0 12px rgba(61, 214, 140, 0.4);
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0px var(--good-soft), 0 0 0 0px rgba(61, 214, 140, 0.4); }
  50% { box-shadow: 0 0 0 4px var(--good-soft), 0 0 16px rgba(61, 214, 140, 0.6); }
  100% { box-shadow: 0 0 0 4px var(--good-soft), 0 0 12px rgba(61, 214, 140, 0.4); }
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  max-width: 100%;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 750;
  line-height: 1.15;
  white-space: nowrap;
  text-shadow: 0 12px 36px rgba(91, 140, 255, 0.16);
}

.hero-accent {
  background-image: linear-gradient(105deg, #d7e4ff 0%, var(--accent) 46%, #62e0b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 700;
}

h3 {
  font-size: 1.15rem;
  font-weight: 650;
  margin-bottom: 0.55rem;
}

.hero-lead,
.section-desc {
  max-width: 46rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-lead {
  margin: 1.25rem 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-weight: 650;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: white;
  box-shadow: 0 12px 28px rgba(61, 116, 255, 0.4), 0 4px 12px rgba(61, 116, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover {
  box-shadow: 0 16px 36px rgba(61, 116, 255, 0.5), 0 6px 16px rgba(61, 116, 255, 0.3);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(148, 163, 184, 0.28);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 2.2rem 0 0;
  padding: 0;
  list-style: none;
}

.trust-row li {
  position: relative;
  padding: 0.5rem 1rem 0.5rem 2.2rem;
  border-radius: 999px;
  border: 1px solid rgba(61, 214, 140, 0.3);
  background: linear-gradient(135deg, var(--good-soft) 0%, rgba(61, 214, 140, 0.08) 100%);
  color: #b7f0d1;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(61, 214, 140, 0.12);
  transition: all 0.2s ease;
}

.trust-row li:hover {
  border-color: rgba(61, 214, 140, 0.45);
  box-shadow: 0 6px 16px rgba(61, 214, 140, 0.18);
  transform: translateY(-1px);
}

.trust-row li::before {
  content: "✓";
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--good);
  font-weight: 700;
  font-size: 0.95rem;
}

.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 40%),
    rgba(10, 15, 26, 0.65);
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 2rem;
}

.section-head h2 {
  margin-bottom: 0.85rem;
}

.grid-3,
.grid-2 {
  display: grid;
  gap: 1rem;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.3rem 1.4rem;
  box-shadow: var(--shadow);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(91, 140, 255, 0.08), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(91, 140, 255, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(91, 140, 255, 0.1);
}

.card:hover::before {
  opacity: 1;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, rgba(91, 140, 255, 0.06) 100%);
  border: 1px solid rgba(91, 140, 255, 0.2);
  color: #b7ccff;
  font-size: 0.9rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 12px rgba(91, 140, 255, 0.15);
}

.card-lg {
  padding: 1.6rem 1.5rem 1.7rem;
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.2rem;
  margin-top: 1.4rem;
  align-items: stretch;
}

.demo-panel > div:first-child {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.check-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
  color: var(--muted);
}

.check-list li {
  position: relative;
  padding-left: 1.55rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 4px var(--good-soft);
}

.check-list.compact {
  gap: 0.7rem;
  margin-top: 1.1rem;
}

.check-list strong {
  color: var(--text);
}

.code-window {
  background: #0a101c;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.code-window-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.code-window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a455c;
}

.code-window-bar span:nth-child(1) { background: #ff5f57; }
.code-window-bar span:nth-child(2) { background: #febc2e; }
.code-window-bar span:nth-child(3) { background: #28c840; }

.code-window-bar em {
  margin-left: auto;
  font-style: normal;
  color: var(--faint);
  font-size: 0.82rem;
}

.code-window pre {
  margin: 0;
  padding: 1.2rem 1.25rem 1.4rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.7;
  color: #d7e0f0;
}

.tok-key { color: #9ec1ff; }
.tok-redacted {
  color: var(--danger);
  background: rgba(255, 107, 138, 0.12);
  padding: 0.05em 0.35em;
  border-radius: 6px;
}

.cta-section {
  padding-bottom: 5rem;
}

.cta-box {
  text-align: center;
  padding: 3.5rem 2rem;
  border-radius: 28px;
  border: 1px solid rgba(91, 140, 255, 0.3);
  background:
    radial-gradient(700px 250px at 50% 0%, rgba(61, 116, 255, 0.28), transparent 65%),
    var(--bg-card);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(91, 140, 255, 0.15) 90deg, transparent 180deg);
  animation: rotate-glow 8s linear infinite;
  opacity: 0.5;
}

@keyframes rotate-glow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.cta-box > * {
  position: relative;
  z-index: 1;
}

.cta-box .section-desc,
.cta-box p {
  margin: 0.9rem auto 0;
  max-width: 40rem;
  color: var(--muted);
}

.cta-box .hero-actions {
  justify-content: center;
  margin-top: 1.6rem;
}

.fineprint {
  margin-top: 1.4rem !important;
  font-size: 0.85rem;
  color: var(--faint) !important;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem 0 2.8rem;
  color: var(--muted);
}

.footer-inner {
  display: grid;
  gap: 0.7rem;
}

.brand-footer {
  margin-bottom: 0.2rem;
}

.footer-meta {
  color: var(--faint);
  font-size: 0.9rem;
  margin: 0;
}

.site-footer p {
  margin: 0;
}

/* Footer peer links: low-key, muted navigation only */
.footer-peers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.2rem;
  font-size: 0.82rem;
}

.footer-peers a {
  color: var(--faint);
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.85;
}

.footer-peers a:hover {
  color: var(--muted);
  text-decoration: underline;
}

.footer-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
}

.footer-meta-row a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.footer-meta-row a:hover {
  color: var(--text);
  text-decoration: underline;
}

@media (max-width: 920px) {
  .grid-3,
  .grid-2,
  .split {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 4rem;
  }
}

@media (max-width: 720px) {
  /* On mobile keep only the Download button and the language switch link visible */
  .nav-links a:not(.nav-cta):not(.nav-lang) {
    display: none;
  }

  .container {
    width: min(var(--max), calc(100% - 1.5rem));
  }

  .hero-actions,
  .trust-row {
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  h1 {
    font-size: clamp(1.15rem, 6.5vw, 2.4rem);
  }
}
