:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --text: #111827;
  --muted: #5b6474;
  --line: #e5e7eb;
  --brand: #4f46e5;
  --brand-hover: #4338ca;
  --brand-soft: #eef2ff;
  --error: #b91c1c;
  --ok: #047857;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d12;
    --bg-alt: #12151c;
    --text: #f3f4f6;
    --muted: #9aa3b2;
    --line: #232733;
    --brand: #818cf8;
    --brand-hover: #a5b4fc;
    --brand-soft: #1b1d3a;
    --error: #f87171;
    --ok: #34d399;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -9999px;
}
.skip:focus { left: 16px; top: 16px; background: var(--bg); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand svg { width: 28px; height: 28px; }
.nav { display: flex; gap: 28px; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  border: 0;
  background: var(--brand);
  color: #fff;
  font: inherit; font-weight: 600; font-size: 16px;
  cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--brand-hover); color: #fff; }
.btn:disabled { opacity: .6; cursor: default; }
@media (prefers-color-scheme: dark) { .btn, .btn:hover { color: #0b0d12; } }

/* Hero */
.hero { padding: 120px 0 112px; }
.hero h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
  max-width: 14ch;
}
.hero p { margin: 24px 0 36px; font-size: 20px; color: var(--muted); max-width: 36ch; }

/* Sections */
section { padding: 96px 0; }
.alt { background: var(--bg-alt); }
.eyebrow { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--brand); text-transform: uppercase; letter-spacing: .08em; }
h2 { margin: 0 0 48px; font-size: clamp(28px, 4vw, 38px); line-height: 1.15; letter-spacing: -0.025em; max-width: 22ch; }
h3 { margin: 0 0 8px; font-size: 22px; letter-spacing: -0.015em; }

.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px;
}
.alt .card { background: var(--bg); }
.card .icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  margin-bottom: 20px;
}
.card .icon svg { width: 22px; height: 22px; }
.card p { margin: 0; color: var(--muted); }

.products {
  list-style: none; margin: 0; padding: 0;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
.products li + li { border-top: 1px solid var(--line); }
.product {
  display: flex; align-items: center; gap: 24px;
  padding: 28px 32px;
  color: var(--text);
  transition: background .15s;
}
.product:hover { color: var(--text); background: var(--bg-alt); }
.product img { flex: none; width: 56px; height: 56px; border-radius: 14px; }
.product-text { flex: 1; min-width: 0; }
.product-tag { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 2px; }
.product h3 { margin: 0 0 4px; font-size: 20px; }
.product p { margin: 0; color: var(--muted); max-width: 60ch; }
.product .arrow { flex: none; font-size: 20px; color: var(--muted); transition: transform .15s, color .15s; }
.product:hover .arrow { color: var(--brand); transform: translateX(4px); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { counter-increment: step; border-top: 1px solid var(--line); padding-top: 20px; }
.steps li::before { content: "0" counter(step); display: block; font-size: 14px; font-weight: 600; color: var(--brand); margin-bottom: 12px; }
.steps p { margin: 0; color: var(--muted); }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
.contact h2 { margin-bottom: 16px; }
.contact .lead { color: var(--muted); margin: 0; }
form { display: grid; gap: 18px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
input, textarea {
  font: inherit; font-size: 16px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  width: 100%;
}
input:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.status { margin: 0; font-size: 15px; min-height: 1.5em; }
.status.ok { color: var(--ok); }
.status.err { color: var(--error); }

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

/* Legal pages */
.legal { padding: 80px 0 96px; }
.legal .wrap { max-width: 720px; }
.legal h1 { font-size: 40px; letter-spacing: -0.03em; margin: 0 0 8px; }
.legal .updated { color: var(--muted); margin: 0 0 40px; font-size: 15px; }
.legal h2 { font-size: 22px; margin: 40px 0 12px; max-width: none; }
.legal p, .legal li { color: var(--muted); }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav { gap: 18px; }
  .nav .hide-sm { display: none; }
  .hero { padding: 72px 0 72px; }
  .hero p { font-size: 18px; }
  section { padding: 64px 0; }
  h2 { margin-bottom: 32px; }
  .services, .steps, .contact { grid-template-columns: 1fr; }
  .product { align-items: flex-start; gap: 16px; padding: 22px 20px; }
  .product img { width: 48px; height: 48px; border-radius: 12px; }
  .product .arrow { display: none; }
  .steps { gap: 28px; }
  .contact { gap: 32px; }
  .card { padding: 28px; }
}
