:root {
  color-scheme: light dark;
  --bg: #fafaf9;
  --bg-alt: #f1f1ef;
  --surface: #ffffff;
  --text: #18181b;
  --muted: #55555e;
  --line: #e2e2de;
  --accent: #3b5bdb;
  --accent-text: #ffffff;
  --accent-soft: #e7ecff;
  --stage-a: #c7d2fe;
  --stage-b: #fbcfe8;
  --ok: #1f7a4d;
  --err: #b42318;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(20, 20, 40, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f12;
    --bg-alt: #16161a;
    --surface: #1b1b20;
    --text: #f3f3f5;
    --muted: #a6a6b0;
    --line: #2a2a31;
    --accent: #7c93ff;
    --accent-text: #0b0b12;
    --accent-soft: #232845;
    --stage-a: #26307a;
    --stage-b: #5b2a58;
    --ok: #55d198;
    --err: #ff8a80;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* header */
header.site { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; font-size: 1.1rem; }
.brand img { width: 28px; height: 28px; }
nav.main { margin-left: auto; display: flex; align-items: center; gap: 4px; }
nav.main a.link { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: 0.95rem; }
nav.main a.link:hover { color: var(--text); }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button { border: 0; background: transparent; color: var(--muted); padding: 5px 10px; font: inherit; font-size: 0.8rem; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
@media (max-width: 640px) { nav.main a.link { display: none; } nav.main { margin-left: auto; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 13px 22px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform 0.12s, background 0.12s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.secondary:hover { background: var(--bg-alt); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn.small { padding: 8px 14px; font-size: 0.9rem; border-radius: 10px; }

/* hero */
.hero { padding: 64px 0 32px; text-align: center; }
.hero p.lead { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--muted); max-width: 40em; margin-inline: auto; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 28px 0 10px; }
.fine { font-size: 0.88rem; color: var(--muted); }
.stage { margin: 40px auto 0; padding: clamp(16px, 4vw, 40px); border-radius: 24px; background: linear-gradient(135deg, var(--stage-a), var(--stage-b)); box-shadow: var(--shadow); }
.shot-scroll { overflow-x: auto; border-radius: 16px; -webkit-overflow-scrolling: touch; }
.shot-scroll img { min-width: 760px; width: 100%; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.stage .shot-scroll + .shot-scroll { margin-top: 14px; }
.stage-note { margin: 10px 0 0; font-size: 0.8rem; color: var(--text); opacity: 0.7; text-align: center; }

/* sections */
section { padding: 72px 0; }
section.alt { background: var(--bg-alt); }
.section-head { max-width: 40em; margin-bottom: 36px; }
.section-head p { color: var(--muted); }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.card .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; font-size: 1.2rem; }
.feature-hero { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 860px) { .feature-hero { grid-template-columns: 1.1fr 1fr; } }
.feature-hero .badge { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 4px 12px; margin-bottom: 14px; }
.diagram { width: 100%; }
.cats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.cat { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.cat b { font-variant-numeric: tabular-nums; color: var(--accent); }
.cat small { display: block; color: var(--muted); font-size: 0.8rem; }

/* pricing */
.price-card { max-width: 460px; margin-inline: auto; background: var(--surface); border: 2px solid var(--accent); border-radius: 20px; padding: 32px; text-align: center; box-shadow: var(--shadow); }
.price { font-size: 3.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price-card ul { list-style: none; padding: 0; margin: 22px 0; text-align: left; }
.price-card li { padding: 7px 0 7px 28px; position: relative; }
.price-card li::before { content: "✓"; position: absolute; left: 4px; color: var(--ok); font-weight: 700; }
.price-card .btn { width: 100%; }
.price-card .btn + .btn { margin-top: 10px; }
.err-msg { color: var(--err); font-size: 0.9rem; min-height: 1.3em; margin: 10px 0 0; }

/* faq */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
summary { cursor: pointer; padding: 16px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "−"; }
details > div { padding: 0 18px 16px; color: var(--muted); }
details > div p:last-child { margin-bottom: 0; }

/* footer */
footer.site { border-top: 1px solid var(--line); padding: 36px 0; color: var(--muted); font-size: 0.92rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer.site a { color: var(--muted); }

/* utility pages */
.page { padding: 56px 0 80px; min-height: 60vh; }
.page h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.prose h2 { font-size: 1.3rem; margin-top: 2em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 24px 0; }
.keybox { font: 0.9rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 10px; padding: 14px; word-break: break-all; user-select: all; }
.steps { padding-left: 1.3em; }
.steps li { margin-bottom: 0.5em; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
input[type="email"] { width: 100%; font: inherit; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.ok { color: var(--ok); }
.err { color: var(--err); }
[hidden] { display: none !important; }
.center { text-align: center; }
