:root {
  --canvas: #000000;
  --surface-card: #0a0a0c;
  --surface-elevated: #101012;
  --surface-deep: #06060a;
  --hairline: rgba(255, 255, 255, 0.06);
  --hairline-strong: rgba(255, 255, 255, 0.14);
  --ink: #fcfdff;
  --body: rgba(252, 253, 255, 0.86);
  --charcoal: rgba(252, 253, 255, 0.7);
  --mute: #a1a4a5;
  --ash: #888e90;
  --accent: #3b5bdb;
  --accent-bright: #5b7cff;
  --accent-ink: #ffffff;
  --accent-glow: rgba(91, 124, 255, 0.28);
  --accent-green: #11ff99;
  --accent-red: #ff2047;
  --accent-yellow: #ffc53d;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  --section-y: 96px;
  --max-w: 1200px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --canvas: #fafbff;
    --surface-card: #ffffff;
    --surface-elevated: #f1f3fb;
    --surface-deep: #eef0fa;
    --hairline: rgba(10, 14, 30, 0.08);
    --hairline-strong: rgba(10, 14, 30, 0.14);
    --ink: #0b0f1a;
    --body: rgba(11, 15, 26, 0.82);
    --charcoal: rgba(11, 15, 26, 0.65);
    --mute: #5b6472;
    --ash: #7b8392;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 16px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .nav { background: rgba(250, 251, 255, 0.82); }
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; color: var(--ink); }
.brand i {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, #5b7cff, #8a5bff);
  display: inline-block;
}
.navlinks { display: flex; align-items: center; gap: 20px; font-size: 14px; font-weight: 500; letter-spacing: 0.2px; }
.navlinks a.ghost { color: var(--charcoal); }
.navlinks a.ghost:hover { color: var(--ink); text-decoration: none; }
.lang-switch {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.03em;
  padding: 5px 10px; border-radius: var(--radius-full);
  border: 1px solid var(--hairline-strong);
}
.lang-switch:hover { background: var(--surface-card); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: var(--radius-md);
  font-weight: 600; font-size: 14px;
  cursor: pointer; border: 0;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); text-decoration: none; }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--hairline-strong); }
.btn-outline:hover { background: var(--surface-card); text-decoration: none; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }

/* ---------- Hero ---------- */
.hero {
  padding: 120px 0 var(--section-y);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  top: -120px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: var(--radius-full);
  background: var(--surface-elevated); border: 1px solid var(--hairline-strong);
  font-size: 12.5px; font-weight: 600; color: var(--charcoal);
  margin-bottom: 28px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-green); }
h1.display {
  font-family: "Fraunces", "Iowan Old Style", Georgia, serif;
  font-size: clamp(40px, 7vw, 84px);
  font-weight: 480;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  color: var(--ink);
}
.hero p.lead {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--body);
  max-width: 640px;
  margin: 0 auto 36px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--ash); }

/* ---------- Sections ---------- */
section { padding: var(--section-y) 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 56px; }
.section-head .tag { font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-bright); margin-bottom: 14px; display: block; }
.section-head h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 480;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.section-head p { color: var(--charcoal); font-size: 16px; margin: 0; }

/* ---------- Feature grid ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.card .icon {
  width: 36px; height: 36px; border-radius: var(--radius-md);
  background: var(--surface-elevated); border: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; color: var(--accent-bright);
}
.card .icon svg { width: 18px; height: 18px; }
.card h3 { font-size: 17px; font-weight: 600; margin: 0 0 8px; color: var(--ink); }
.card p { font-size: 14.5px; color: var(--charcoal); margin: 0; line-height: 1.55; }

/* ---------- How it works ---------- */
.steps { display: grid; gap: 24px; grid-template-columns: repeat(4, 1fr); }
.step { padding: 0 4px; }
.step .num {
  width: 32px; height: 32px; border-radius: var(--radius-full);
  background: var(--surface-elevated); border: 1px solid var(--hairline-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--accent-bright);
  margin-bottom: 16px;
}
.step h3 { font-size: 15.5px; font-weight: 600; margin: 0 0 6px; }
.step p { font-size: 13.5px; color: var(--charcoal); margin: 0; line-height: 1.5; }

/* ---------- Code window ---------- */
.code-window {
  background: var(--surface-deep);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 720px;
  margin: 0 auto;
}
.code-tabs {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--hairline);
}
.code-tabs .dots { display: flex; gap: 6px; margin-right: 10px; }
.code-tabs .dots span { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.code-tabs .dots span:nth-child(1) { background: var(--accent-red); }
.code-tabs .dots span:nth-child(2) { background: var(--accent-yellow); }
.code-tabs .dots span:nth-child(3) { background: var(--accent-green); }
.code-tabs .tab { font-size: 12.5px; color: var(--charcoal); font-family: "JetBrains Mono", ui-monospace, monospace; }
.code-window pre {
  margin: 0; padding: 22px 20px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; line-height: 1.65; color: var(--body);
  overflow-x: auto; white-space: pre;
}
.code-window pre .k { color: var(--accent-bright); }
.code-window pre .s { color: var(--accent-green); }
.code-window pre .c { color: var(--ash); }

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
  padding: 100px 24px;
  border-top: 1px solid var(--hairline);
}
.cta-band h2 { font-family: "Fraunces", Georgia, serif; font-size: clamp(28px, 4vw, 40px); font-weight: 480; margin: 0 0 14px; }
.cta-band p { color: var(--charcoal); margin: 0 0 30px; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--hairline);
  padding: 56px 0 40px;
  color: var(--ash);
  font-size: 13px;
}
footer .wrap { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 24px; }
footer .cols { display: flex; gap: 48px; flex-wrap: wrap; }
footer .col h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mute); margin: 0 0 12px; }
footer .col a { display: block; color: var(--ash); margin-bottom: 8px; font-size: 13.5px; }
footer .col a:hover { color: var(--ink); }
footer .bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--hairline); font-size: 12.5px; color: var(--ash); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}
@media (max-width: 768px) {
  .navlinks { gap: 12px; }
  .navlinks .btn { height: 34px; padding: 0 12px; font-size: 13px; }
  .hero { padding: 88px 0 64px; }
  section { padding: 64px 0; }
  .section-head { margin-bottom: 40px; }
}
@media (max-width: 640px) {
  .navlinks a.only-wide { display: none; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  footer .wrap { flex-direction: column; }
}
@media (max-width: 420px) {
  .navlinks a.ghost:not(.only-wide):not(.lang-switch) { display: none; }
  .wrap { padding: 0 16px; }
}
