/* MDA landing page — single stylesheet, no external assets. */
:root {
  color-scheme: dark;
  --bg: #0a0c10;
  --bg-soft: #0e1116;
  --surface: #141820;
  --surface-2: #191e28;
  --border: #262c38;
  --border-soft: #1d222c;
  --text: #e9ecf3;
  --muted: #9aa4b6;
  --muted-2: #6f7a8d;
  --accent: #6f9bff;
  --accent-strong: #4f7cff;
  --accent-soft: rgba(111, 155, 255, .12);
  --green: #3ddc97;
  --amber: #f2b544;
  --red: #ff6b6b;
  --radius: 14px;
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Code", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code {
  font-family: var(--mono);
  font-size: .875em;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: .1em .35em;
}
h1, h2, h3 { line-height: 1.18; letter-spacing: -.02em; margin: 0; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 620; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent-strong); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 12, 16, .78);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 700; letter-spacing: .02em; font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; }
.brand-mark rect { fill: var(--accent-strong); }
.brand-mark path { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: .92rem; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang {
  color: var(--muted); font-size: .82rem; font-weight: 600; letter-spacing: .06em;
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px;
}
.lang:hover { color: var(--text); border-color: var(--muted-2); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 10px;
  font-size: .95rem; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, color .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent-strong); color: #fff; box-shadow: 0 8px 24px rgba(79, 124, 255, .28); }
.btn-primary:hover { background: #6b91ff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--muted-2); background: rgba(255, 255, 255, .03); }
.btn-sm { height: 34px; padding: 0 14px; font-size: .85rem; border-radius: 8px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 88px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto; height: 720px; pointer-events: none;
  background:
    radial-gradient(600px 320px at 22% 18%, rgba(79, 124, 255, .20), transparent 70%),
    radial-gradient(520px 300px at 78% 8%, rgba(61, 220, 151, .10), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(60% 50% at 50% 10%, #000 30%, transparent 100%);
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--border); background: rgba(20, 24, 32, .6);
  border-radius: 999px; padding: 6px 14px; margin-bottom: 26px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(61, 220, 151, .15); }
.hero h1 {
  font-size: clamp(2.9rem, 7vw, 5rem); font-weight: 700; letter-spacing: -.035em;
  background: linear-gradient(180deg, #fff 25%, #b9c4d8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede {
  max-width: 720px; margin: 22px auto 0; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.2rem);
}
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.cta-row.center { justify-content: center; }
.meta-row {
  display: flex; gap: 10px 22px; justify-content: center; flex-wrap: wrap;
  list-style: none; padding: 0; margin: 22px 0 0; color: var(--muted-2); font-size: .82rem;
}
.meta-row li { display: inline-flex; align-items: center; gap: 8px; }
.meta-row li + li::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); margin-right: 14px; }

.shot {
  margin: 56px auto 0; max-width: 1040px;
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  background: var(--surface); box-shadow: 0 40px 120px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .02) inset;
}
.shot-bar {
  display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px;
  background: #10141b; border-bottom: 1px solid var(--border-soft);
  color: var(--muted-2); font-size: .72rem; font-family: var(--mono);
}
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2a3140; }
.shot-bar span { margin-left: 10px; }
.shot img { display: block; width: 100%; }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.kicker {
  color: var(--accent); font-size: .78rem; font-weight: 650; letter-spacing: .16em;
  text-transform: uppercase; margin-bottom: 14px;
}
.section h2 + .prose, .section h2 + .grid, .section h2 + .steps { margin-top: 34px; }
.prose { color: var(--muted); max-width: 640px; margin-top: 18px; }

.grid { display: grid; gap: 16px; margin-top: 38px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: linear-gradient(180deg, var(--surface), #11151c);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: #35405a; transform: translateY(-2px); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .92rem; }
.card .icon {
  display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 16px;
  border-radius: 10px; background: var(--accent-soft); border: 1px solid rgba(111, 155, 255, .22);
  color: var(--accent); font-size: 1.05rem;
}
.card-sm { padding: 22px; }

/* Split + annotation code */
.split { display: grid; grid-template-columns: 1.05fr 1.15fr; gap: 56px; align-items: center; }
.split .prose { margin-top: 20px; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; color: var(--muted); font-size: .92rem; }
.checks li { position: relative; padding-left: 26px; }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 700;
}
.code-card {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: #0b0e13; box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}
.code-card-head, .terminal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--border-soft);
  font-family: var(--mono); font-size: .72rem; color: var(--muted-2);
}
.pill { border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.code-card pre, .terminal pre { margin: 0; padding: 18px 16px; overflow-x: auto; }
.code-card code, .terminal code {
  background: none; border: 0; padding: 0; font-size: .8rem; line-height: 1.75; color: #c8d1e2; white-space: pre;
}
.code-card .c { color: #7f8ba3; }
.code-card-foot {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-top: 1px solid var(--border-soft); color: var(--muted); font-size: .78rem;
}
.code-card-foot .ok { color: var(--green); font-weight: 700; }
.terminal { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #0b0e13; }
.terminal-head { justify-content: flex-start; }
.terminal-head i { width: 9px; height: 9px; border-radius: 50%; background: #2a3140; }
.terminal-head i:first-child { background: #ff6b6b66; }
.terminal-head span { margin-left: 8px; }
.terminal .p { color: var(--green); }

/* Steps */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.steps li { border-top: 1px solid var(--border); padding-top: 18px; }
.steps span { font-family: var(--mono); font-size: .78rem; color: var(--accent); letter-spacing: .08em; }
.steps h3 { margin: 8px 0 6px; }
.steps p { color: var(--muted); font-size: .9rem; }

/* Download */
.download { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.download .cta-row { justify-content: flex-start; }
.terminal pre { font-size: .78rem; }

/* FAQ */
details {
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  padding: 0 20px; margin-top: 12px;
}
details + details { margin-top: 10px; }
summary {
  cursor: pointer; list-style: none; padding: 17px 0; font-weight: 600; font-size: .98rem;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted-2); font-weight: 400; font-size: 1.2rem; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); font-size: .92rem; padding: 0 0 18px; margin: 0; max-width: 660px; }

/* Final CTA + footer */
.cta-final { text-align: center; }
.cta-final h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
.cta-final .prose { margin: 18px auto 0; }
.footer { border-top: 1px solid var(--border-soft); padding: 48px 0 40px; color: var(--muted); font-size: .86rem; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
.footer p { margin-top: 10px; color: var(--muted-2); }
.footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: flex-end; }
.footer nav a { color: var(--muted); }
.brand-sm { font-size: .95rem; }
.copy { grid-column: 1 / -1; border-top: 1px solid var(--border-soft); padding-top: 20px; font-size: .78rem; }

@media (max-width: 940px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split, .download { grid-template-columns: 1fr; gap: 36px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer nav { justify-content: flex-start; }
}
@media (max-width: 620px) {
  .section { padding: 68px 0; }
  .hero { padding-top: 60px; }
  .grid-4, .grid-3, .steps { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .nav-actions .btn { width: auto; }
  .shot { margin-top: 40px; border-radius: 12px; }
  .meta-row li + li::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
