:root {
  --bg: #0b0d17;
  --bg-elev: #11142100;
  --ink: #0e1024;
  --ink-soft: #2a2f4a;
  --muted: #6b7290;
  --muted-2: #8f96b3;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.14);
  --accent: #4f5bff;
  --accent-2: #7a52ff;
  --accent-3: #22d3ee;
  --accent-soft: rgba(79, 91, 255, 0.12);
  --paper: #ffffff;
  --paper-2: #f7f8fc;
  --paper-3: #eef0f8;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px -12px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 30px 80px -20px rgba(35, 31, 100, 0.35), 0 8px 20px -10px rgba(15, 23, 42, 0.15);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
code { font-family: var(--font-mono); font-size: 0.92em; }

/* ----- Nav ----- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 30%, #c2c8ff 0%, transparent 60%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4), 0 6px 16px -6px var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand-mark img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}
.brand-name { font-size: 18px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 14.5px;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--accent) 0%, #3a44e8 100%);
  color: white !important;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 6px 16px -8px rgba(79, 91, 255, 0.6);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(79, 91, 255, 0.7); }
@media (max-width: 640px) { .nav-links a:not(.nav-cta) { display: none; } }

/* ----- Hero ----- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 90px 28px 110px;
  background:
    radial-gradient(1100px 600px at 80% -10%, rgba(122, 82, 255, 0.10), transparent 60%),
    radial-gradient(900px 500px at 10% 10%, rgba(79, 91, 255, 0.10), transparent 60%),
    linear-gradient(180deg, #fbfcff 0%, #f3f4fb 100%);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg .grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(15,23,42,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,23,42,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 75%);
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
}
.orb-1 { width: 380px; height: 380px; background: #6e7bff; top: -100px; left: -80px; }
.orb-2 { width: 340px; height: 340px; background: #b487ff; top: 60px; right: -70px; }
.orb-3 { width: 260px; height: 260px; background: #67e8f9; bottom: -120px; left: 40%; }

.hero-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 960px) { .hero-inner { grid-template-columns: 1fr; gap: 56px; } }

.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 22px;
  background: linear-gradient(180deg, #0e1024 0%, #2c2f6b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede {
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 0 32px;
}
.hero .lede strong { color: var(--ink); font-weight: 700; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(180deg, var(--accent) 0%, #3a44e8 100%);
  color: white;
  box-shadow: 0 10px 24px -10px rgba(79, 91, 255, 0.6), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(79, 91, 255, 0.7); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: white; border-color: rgba(15,23,42,0.22); }

.hero-stats {
  margin-top: 40px;
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.hero-stats > div {
  display: flex; flex-direction: column;
}
.hero-stats strong {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero-stats span {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.hero-art {
  position: relative;
  perspective: 1500px;
}
.screenshot-frame {
  background: linear-gradient(180deg, #f6f7fb 0%, #e9ecf6 100%);
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotate(-1.5deg);
  transition: transform 0.4s ease;
}
.screenshot-frame:hover { transform: rotate(0) translateY(-4px); }
.window-chrome {
  display: flex;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: #f1f3fa;
}
.window-chrome .dot {
  width: 11px; height: 11px; border-radius: 50%;
}
.window-chrome .dot.red { background: #ff5f57; }
.window-chrome .dot.yellow { background: #febc2e; }
.window-chrome .dot.green { background: #28c840; }
.screenshot-frame img { width: 100%; display: block; }

.floating-chip {
  position: absolute;
  padding: 8px 14px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--ink);
  white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}
.chip-1 { top: 6%; left: -4%; animation-delay: 0s; color: var(--accent); }
.chip-2 { top: 32%; right: -8%; animation-delay: 1.5s; color: #b455ff; }
.chip-3 { bottom: 28%; left: -10%; animation-delay: 3s; color: #0ea5e9; }
.chip-4 { bottom: 6%; right: -2%; animation-delay: 4.5s; color: #f43f5e; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 960px) {
  .floating-chip { display: none; }
}

/* ----- Section heads ----- */
.section-head {
  max-width: 760px;
  margin: 0 auto 64px;
  text-align: center;
}
.kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  line-height: 1.1;
}
.section-head p {
  color: var(--ink-soft);
  font-size: 17px;
  margin: 0;
}

/* ----- Features ----- */
.features {
  padding: 110px 28px;
  background: var(--paper);
}
.feature-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(79, 91, 255, 0.22);
}
.feature h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 20px 0 8px;
}
.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}
.feature code {
  background: var(--paper-3);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 12.5px;
}
.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.icon-rust   { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.icon-offline{ background: linear-gradient(135deg, #10b981, #06b6d4); }
.icon-fast   { background: linear-gradient(135deg, #f43f5e, #f97316); }
.icon-cross  { background: linear-gradient(135deg, #0e1024, #2c2f6b); }
.icon-format { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.icon-foss   { background: linear-gradient(135deg, #0ea5e9, #6366f1); }

/* ----- Formats ----- */
.formats {
  padding: 110px 28px;
  background:
    radial-gradient(800px 400px at 20% 0%, rgba(79, 91, 255, 0.06), transparent 60%),
    linear-gradient(180deg, var(--paper-2) 0%, var(--paper) 100%);
}
.format-columns {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}
@media (max-width: 900px) { .format-columns { grid-template-columns: 1fr; } }
.format-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 30px 22px;
  box-shadow: var(--shadow-sm);
}
.format-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line-strong);
}
.format-card h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}
.badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 999px;
}
.badge-rust  { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.badge-shell { background: rgba(99, 102, 241, 0.12); color: #4f46e5; }

.format-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.format-card li {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.format-card li:last-child { border-bottom: none; }
.format-card li > span {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
}
.format-card li > code {
  font-size: 12.8px;
  color: var(--ink-soft);
  word-break: break-word;
}
.format-card li > em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  font-family: var(--font-mono);
}
@media (max-width: 540px) {
  .format-card li { grid-template-columns: 1fr; gap: 4px; }
}

/* ----- CTA ----- */
.cta {
  padding: 60px 28px 110px;
}
.cta-card {
  max-width: 1180px;
  margin: 0 auto;
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(255,255,255,0.18), transparent 60%),
    radial-gradient(600px 300px at 80% 100%, rgba(34, 211, 238, 0.2), transparent 60%),
    linear-gradient(135deg, #0e1024 0%, #1f234b 50%, #4f5bff 100%);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
}
.cta-card h2 {
  position: relative;
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -0.025em;
}
.cta-card p {
  position: relative;
  margin: 0 0 28px;
  color: rgba(255,255,255,0.78);
  font-size: 17px;
}
.cta-card .cta-row {
  position: relative;
  justify-content: center;
}
.cta-card .btn-primary {
  background: white;
  color: var(--ink);
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.4);
}
.cta-card .btn-primary:hover { background: #f0f1ff; }
.cta-card .btn-ghost {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.3);
}
.cta-card .btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.6); }

/* ----- Footer ----- */
.footer {
  padding: 32px 28px 48px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--ink-soft);
}
.footer .muted { color: var(--muted); margin-left: 4px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--accent); }
