:root {
  --bg: #F7F8FA; --surface: #FFFFFF; --alt: #EEF2F8; --text: #14171C; --muted: #5B6472; --line: #E1E5EC;
  --accent: #2F6BFF; --accent-ink: #FFFFFF; --code: #0F1623; --code-text: #E6EAF2;
  --radius: 16px; --wrap: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1116; --surface: #161A21; --alt: #12161C; --text: #F2F4F7; --muted: #9AA3AF; --line: #262C36;
    --accent: #5B8BFF; --code: #0A0D12; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1116; --surface: #161A21; --alt: #12161C; --text: #F2F4F7; --muted: #9AA3AF; --line: #262C36;
  --accent: #5B8BFF; --code: #0A0D12; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
code, pre { font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
:not(pre) > code { background: var(--alt); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .88em; }
pre { background: var(--code); color: var(--code-text); border-radius: 12px; padding: 14px 16px; overflow-x: auto; margin: 0 0 14px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--text); text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a[aria-current] { color: var(--text); }

/* Hero */
.hero { padding: 72px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 12px; }
h1 { font-size: clamp(36px, 5.4vw, 58px); line-height: 1.06; letter-spacing: -.025em; margin: 0 0 18px; }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 12px; font-weight: 600;
  font-size: 16px; text-decoration: none; border: 1px solid transparent; }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.note { color: var(--muted); font-size: 14px; margin: 14px 0 0; }

.phones { position: relative; height: 560px; }
.phone { position: absolute; width: 250px; border-radius: 30px; overflow: hidden; border: 8px solid #10131A;
  box-shadow: 0 30px 60px -20px rgba(16, 24, 40, .35); background: #10131A; }
.phone.back { right: 0; top: 0; transform: rotate(4deg); }
.phone.front { left: 10px; top: 60px; transform: rotate(-3deg); }

/* Sections */
section { padding: 72px 0; }
section.alt { background: var(--alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 640px; margin: 0 0 40px; }
h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 12px; }
h3 { font-size: 19px; margin: 0 0 8px; }
.sec-head p { color: var(--muted); margin: 0; font-size: 18px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card p, .card ul { color: var(--muted); margin: 0; }
.card ul { padding-left: 18px; }
.card li { margin: 4px 0; }
.ico { width: 40px; height: 40px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps .card { counter-increment: s; }
.steps .card::before { content: counter(s); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px; margin-bottom: 12px; }

.shots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.shots figure { margin: 0; }
.shots img { border-radius: 16px; border: 1px solid var(--line); }
.shots figcaption { color: var(--muted); font-size: 14px; text-align: center; margin-top: 8px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.split p { color: var(--muted); }

/* Prose pages */
.prose { max-width: 720px; padding: 56px 20px 72px; margin: 0 auto; }
.prose h1 { font-size: clamp(32px, 4.6vw, 44px); }
.prose h2 { font-size: 24px; margin: 40px 0 10px; }
.prose p, .prose li { color: var(--text); }
.prose .meta { color: var(--muted); margin-top: -6px; }
.prose ul { padding-left: 22px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 8px; }
details p:last-child { margin-bottom: 0; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
footer nav { display: flex; gap: 20px; }
footer a { color: var(--muted); }
footer p { margin: 0; }

@media (max-width: 880px) {
  .hero { padding: 44px 0 40px; }
  .hero .wrap, .split { grid-template-columns: 1fr; }
  .phones { height: 440px; max-width: 380px; margin: 0 auto; width: 100%; }
  .phone { width: 200px; border-width: 6px; border-radius: 24px; }
  .grid, .steps { grid-template-columns: 1fr; }
  .shots { grid-template-columns: repeat(5, 72%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .shots figure { scroll-snap-align: start; }
  section { padding: 52px 0; }
}
@media (max-width: 420px) {
  .wrap { padding: 0 16px; }
  .nav { gap: 16px; }
  .hide-sm { display: none; }
  .phones { height: 380px; }
  .phone { width: 172px; }
}

/* Grid children may shrink below their content (long <pre> lines scroll instead of widening the page). */
.hero .wrap > *, .split > *, .grid > *, .steps > * { min-width: 0; }
