:root {
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #526077;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --brand-soft: #e8f0fe;
  --hero-bg: #0b1220;
  --hero-text: #e6edf7;
  --hero-muted: #9fb0c9;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --bg-alt: #0f1a2e;
    --surface: #121e33;
    --text: #e6edf7;
    --muted: #9fb0c9;
    --line: #22314a;
    --brand: #60a5fa;
    --brand-strong: #3b82f6;
    --brand-soft: #142a4d;
    --hero-bg: #070d18;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--text); background: var(--bg); }
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.center { text-align: center; margin-top: 2rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .85em 1.4em; border-radius: 10px; background: var(--brand-strong); color: #fff; font-weight: 650; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-size: 1rem; font-family: inherit; transition: transform .15s, background .15s; }
.btn:hover { background: #1e40af; transform: translateY(-1px); }
.btn-sm { padding: .55em 1em; font-size: .92rem; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; opacity: .9; }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-light { background: #fff; color: #1d4ed8; }
.btn-light:hover { background: #eef4ff; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; }
.brand b { color: var(--brand); }
.logo-mark { width: 34px; height: 34px; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 550; font-size: .97rem; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current] { color: var(--brand); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: .2s; }
@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 20px; display: none; }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: 16px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Hero */
.hero, .page-hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(59, 130, 246, .35), transparent 60%), radial-gradient(800px 400px at -10% 110%, rgba(29, 78, 216, .25), transparent 60%), var(--hero-bg); color: var(--hero-text); }
.hero { padding: 90px 0 100px; }
.page-hero { padding: 70px 0 70px; }
.hero a:not(.btn), .page-hero a:not(.btn) { color: #93c5fd; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: #93c5fd; margin-bottom: 1rem; }
.section .eyebrow { color: var(--brand); }
.lead { font-size: 1.18rem; color: var(--hero-muted); max-width: 720px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-trust { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 10px 26px; color: var(--hero-muted); font-size: .95rem; }
.hero-trust li { display: flex; align-items: center; gap: 8px; }
.hero-trust svg { width: 18px; height: 18px; fill: none; stroke: #93c5fd; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.crumbs { font-size: .9rem; color: var(--hero-muted); margin-bottom: 1.4rem; }
.crumbs a { text-decoration: none; }

.chat { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; padding: 18px; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); font-size: .95rem; }
.chat-head { display: flex; align-items: center; gap: 6px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.chat-head span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.chat-head b { margin-left: 8px; font-weight: 600; color: var(--hero-muted); font-size: .85rem; }
.msg { padding: 11px 14px; border-radius: 14px; margin-bottom: 10px; max-width: 90%; }
.msg-user { background: #1d4ed8; color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.msg-ai { background: rgba(255, 255, 255, .08); border-bottom-left-radius: 4px; }
.msg-ai small { display: block; margin-top: 8px; color: var(--hero-muted); font-size: .78rem; }
.typing { display: flex; gap: 5px; padding: 12px 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--hero-muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .typing i { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding: 60px 0 70px; } }

/* Sections */
.section { padding: 84px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.cards { display: grid; gap: 20px; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1020px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards-4, .cards-3, .cards-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card p { color: var(--muted); margin-bottom: 0; }
.card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .15s, border-color .15s; }
.card-link:hover { transform: translateY(-3px); border-color: var(--brand); }
.card-link p { flex: 1; margin-bottom: 1rem; }
.card-icon { display: inline-flex; width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); align-items: center; justify-content: center; margin-bottom: 16px; }
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.more, .link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 650; text-decoration: none; }
.more svg, .link-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; }

.project dl { margin: 0; }
.project dt { font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin-top: 14px; }
.project dd { margin: 4px 0 0; color: var(--muted); }

.usecases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 36px; }
.usecases > div { border-left: 3px solid var(--brand); padding-left: 18px; }
.usecases p { color: var(--muted); margin: 0; }
@media (max-width: 900px) { .usecases { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .usecases { grid-template-columns: 1fr; } }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; }
.steps li::before { content: counter(s); display: inline-flex; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-strong); color: #fff; font-weight: 800; align-items: center; justify-content: center; margin-bottom: 14px; }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 1020px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }

.mini-steps { padding-left: 1.2em; margin: 0; }
.mini-steps li { margin-bottom: .6em; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 40px; } }

.checklist { list-style: none; padding: 0; margin: 0 0 1.4em; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.checklist svg { flex: 0 0 22px; width: 22px; height: 22px; margin-top: 2px; padding: 3px; border-radius: 50%; background: var(--brand-soft); fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.courses .checklist { margin: 0; }
.courses .checklist li { font-size: .97rem; }

.callout { display: flex; gap: 40px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); }
.callout p { color: var(--muted); max-width: 760px; margin: 0; }
.callout .btn { flex-shrink: 0; }
@media (max-width: 800px) { .callout { flex-direction: column; align-items: flex-start; padding: 28px; } }
.notice { background: var(--brand-soft); border-left: 4px solid var(--brand); border-radius: 10px; padding: 18px 22px; margin-bottom: 48px; }

.tech { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tech li { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: .95rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 650; font-size: 1.05rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--brand); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq-a p { color: var(--muted); padding-bottom: 8px; }

/* CTA */
.cta { background: linear-gradient(120deg, #1d4ed8, #2563eb 50%, #3b82f6); color: #fff; padding: 64px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.cta h2 { margin-bottom: .4em; }
.cta p { opacity: .92; max-width: 640px; margin: 0; }
.cta-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; flex-shrink: 0; }
.cta-phone { color: #fff; opacity: .9; font-size: .95rem; }
@media (max-width: 800px) { .cta-inner { flex-direction: column; align-items: flex-start; } .cta-actions { align-items: flex-start; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.form { display: grid; gap: 18px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.form input:not([type=checkbox]), .form select, .form textarea { width: 100%; font: inherit; font-weight: 400; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .row2 { grid-template-columns: 1fr; } }
.consent { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; color: var(--muted); }
.consent input { margin-top: 5px; width: 18px; height: 18px; flex-shrink: 0; }
.hp { position: absolute; left: -9999px; }
.form .btn { justify-self: start; }
.form-status { margin: 0; font-weight: 600; }
.form-status.ok { color: #15803d; }
.form-status.err { color: #b91c1c; }
.contact-card { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.contact-card hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.contact-name { font-weight: 700; font-size: 1.1rem; }
.big { font-size: 1.2rem; font-weight: 700; text-decoration: none; word-break: break-word; }

.prose h2 { font-size: 1.3rem; margin-top: 2em; }

/* Footer */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 60px 0 24px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-grid .muted { margin-top: 14px; max-width: 340px; }
.footer-h { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 14px; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: 8px; }
.footer-list a { color: var(--text); text-decoration: none; }
.footer-list a:hover { color: var(--brand); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.footer-bottom a { color: var(--muted); }
