:root {
  --bg-body: #1c1c1c;
  --bg-elevated: #262626;
  --bg-card: #2a2a2a;
  --bg-alt: #171717;
  --bg-nav: rgba(20, 20, 20, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text: #d0d3d6;
  --text-muted: #8c8c8c;
  --text-strong: #ffffff;

  --accent: #2080e5;
  --accent-strong: #419dff;
  --accent-dim: #0165d0;
  --accent-soft: rgba(32, 128, 229, 0.2);
  --accent-glow: rgba(32, 128, 229, 0.4);

  --success: #7bd88f;
  --warn: #ffb454;
  --no: #6b6b6b;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 20px 50px rgba(0, 0, 0, 0.45),
                 0 0 0 1px var(--border-strong);

  --max: 1180px;
  --nav-h: 68px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-body: #f4f5f7;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --bg-alt: #ebedf0;
    --bg-nav: rgba(255, 255, 255, 0.8);
    --border: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.14);

    --text: #31363c;
    --text-muted: #6b7178;
    --text-strong: #0f1216;

    --accent: #0d6ad6;
    --accent-strong: #2080e5;
    --accent-dim: #064fa8;
    --accent-soft: rgba(13, 106, 214, 0.12);
    --accent-glow: rgba(13, 106, 214, 0.24);

    --success: #2f9d5f;
    --no: #a6a6a6;

    --shadow-card: 0 10px 30px rgba(15, 18, 22, 0.08);
    --shadow-lift: 0 20px 50px rgba(15, 18, 22, 0.14),
                   0 0 0 1px var(--border-strong);
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
  transition: color 120ms ease;
}
a:hover { color: var(--accent); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  color: var(--text-strong);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4.2rem); line-height: 1.04; letter-spacing: -0.025em; font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.15; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1em; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

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

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px max(20px, 5vw);
  height: var(--nav-h);
  background: var(--bg-nav);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-strong);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}
.brand img {
  border-radius: 7px;
  box-shadow: 0 4px 12px var(--accent-glow);
}
.brand-small { gap: 8px; font-size: 0.95rem; }
.brand-small img { box-shadow: none; border-radius: 6px; }

.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text-strong); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
  white-space: nowrap;
}
.btn-sm { padding: 8px 14px; font-size: 0.88rem; }
.btn-primary {
  background: linear-gradient(180deg, var(--accent-strong), var(--accent-dim));
  color: #ffffff;
  box-shadow: 0 6px 20px var(--accent-glow),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary:hover {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px var(--accent-glow),
              inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-ghost {
  background: transparent;
  color: var(--text-strong);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(56px, 9vw, 110px) max(20px, 5vw) clamp(60px, 9vw, 120px);
  overflow: hidden;
  isolation: isolate;
}
.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 85%;
  background:
    radial-gradient(ellipse at 20% 30%, var(--accent-glow), transparent 55%),
    radial-gradient(ellipse at 80% 10%, rgba(65, 154, 255, 0.25), transparent 60%);
  filter: blur(60px);
  z-index: -1;
  animation: drift 18s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-4%, 3%, 0) scale(1.08); }
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  padding: 6px 12px;
  border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  border-radius: 999px;
  margin-bottom: 22px;
}

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--text);
  max-width: 36ch;
  margin-top: 18px;
}

.hero-meta {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.hero-meta li { display: flex; align-items: center; gap: 8px; }
.hero-meta li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.hero-shot {
  margin: 0;
  position: relative;
}
.hero-shot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  border: 1px solid var(--border-strong);
  transform: perspective(1600px) rotateY(-4deg) rotateX(2deg);
  transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hero-shot:hover img {
  transform: perspective(1600px) rotateY(-1deg) rotateX(1deg) translateY(-4px);
}

/* ---------- Section scaffolding ---------- */
.section {
  padding: clamp(64px, 9vw, 120px) max(20px, 5vw);
  max-width: var(--max);
  margin: 0 auto;
}
.section-alt {
  background: var(--bg-alt);
  max-width: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-alt > * { max-width: var(--max); margin-left: auto; margin-right: auto; }

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(40px, 5vw, 64px);
  text-align: center;
}
.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 10px;
}

/* ---------- Features ---------- */
.features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-card);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.feature:hover {
  transform: translateY(-3px);
  border-color: var(--accent-soft);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4),
              inset 0 0 0 1px var(--accent-soft);
}
@media (prefers-color-scheme: light) {
  .feature:hover {
    box-shadow: 0 16px 40px rgba(15, 18, 22, 0.1),
                inset 0 0 0 1px var(--accent-soft);
  }
}
.feature-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 18px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { margin-bottom: 6px; color: var(--text-strong); }
.feature p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Compare table ---------- */
.compare-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 640px;
}
.compare th, .compare td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare thead th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-elevated);
}
.compare thead th.is-us {
  color: var(--accent);
}
.compare tbody th {
  font-weight: 500;
  color: var(--text);
}
.compare tbody tr:last-child th,
.compare tbody tr:last-child td { border-bottom: none; }
.compare td.is-us { color: var(--text-strong); font-weight: 600; background: var(--accent-soft); }
.compare td.yes::before,
.compare td.no::before,
.compare td.partial::before {
  display: inline-block;
  margin-right: 8px;
  font-weight: 700;
  width: 16px;
}
.compare td.yes::before     { content: "✓"; color: var(--success); }
.compare td.no              { color: var(--no); }
.compare td.no::before      { content: "–"; color: var(--no); }
.compare td.partial         { color: var(--text-muted); }
.compare td.partial::before { content: "~"; color: var(--warn); }

/* ---------- Quick start ---------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  counter-reset: step;
}
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent-dim));
  box-shadow: 0 4px 14px var(--accent-glow);
  margin-bottom: 14px;
}
.step h3 { margin-bottom: 14px; }
.step-hint { margin-top: 14px; color: var(--text-muted); font-size: 0.88rem; }

.code-block {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  padding-right: 70px;
  overflow-x: auto;
  font-size: 0.88rem;
}
@media (prefers-color-scheme: light) {
  .code-block { background: #0f1216; color: #d0d3d6; border-color: transparent; }
  .code-block .copy-btn { color: #d0d3d6; border-color: rgba(255,255,255,0.15); }
}
.code-block pre {
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.code-block code { color: var(--text-strong); }
@media (prefers-color-scheme: light) {
  .code-block code { color: #ffffff; }
}
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn.is-copied { color: var(--success); border-color: var(--success); background: rgba(123, 216, 143, 0.1); }

/* ---------- FAQ ---------- */
.faq {
  max-width: 780px;
  margin: 0 auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq details:last-child { border-bottom: none; }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-weight: 600;
  color: var(--text-strong);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color 120ms ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--accent);
  transition: transform 160ms ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq details p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--text-muted);
}

/* ---------- Community ---------- */
.community {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(32px, 5vw, 60px) clamp(24px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at top, var(--accent-soft), transparent 70%),
    var(--bg-card);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
}
.community .cta-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 36px max(20px, 5vw);
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms ease, transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-shot img { transform: none; }
  .hero-shot:hover img { transform: translateY(-2px); }
}

@media (max-width: 720px) {
  .site-nav { padding: 12px 16px; gap: 12px; flex-wrap: wrap; height: auto; }
  .nav-links { gap: 14px; order: 3; width: 100%; margin-left: 0; }
  .nav-links a { font-size: 0.88rem; }
  html { scroll-padding-top: 120px; }
  .hero { padding-top: 40px; }
  h1 { font-size: 2.4rem; }
  .section-head p { font-size: 0.98rem; }
  .hero-meta { gap: 8px 16px; }
}

@media (max-width: 480px) {
  .btn { padding: 11px 16px; font-size: 0.9rem; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { justify-content: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .hero-glow { animation: none; }
  .reveal { opacity: 1; transform: none; }
  .hero-shot img { transform: none; }
}
