:root {
  --bg: #0b1220;
  --bg-alt: #0f182b;
  --card: #121c33;
  --line: #1f2b47;
  --text: #e8edf7;
  --muted: #9aa8c4;
  --blue: #2b6bff;
  --teal: #14d1b0;
  --grad: linear-gradient(135deg, var(--blue), var(--teal));
  --radius: 16px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font: 16px/1.65 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.muted { color: var(--muted); max-width: 640px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 600;
  color: var(--teal); margin-bottom: 1rem;
}

/* Buttons */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  font: inherit; font-weight: 600; color: #fff;
  background: var(--grad); padding: .85em 1.6em; border-radius: 999px;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 8px 24px -8px rgba(43, 107, 255, .6);
}
.btn:hover { transform: translateY(-2px); }
.btn--small { padding: .5em 1.1em; font-size: .9rem; }
.btn--ghost { background: transparent; border: 1px solid var(--line); box-shadow: none; }
.btn--ghost:hover { border-color: var(--teal); }

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 32, .8); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand b { font-weight: 500; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.btn) { text-decoration: none; color: var(--muted); font-size: .95rem; transition: color .15s; }
.nav a:not(.btn):hover { color: var(--text); }
.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.burger span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .2s; }

/* Hero */
.hero { padding: 88px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(43,107,255,.28), transparent 65%); pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: auto auto -30% -10%; width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(20,209,176,.16), transparent 65%); pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 2rem 0 2.5rem; }
.hero__facts { display: flex; gap: 2.2rem; flex-wrap: wrap; }
.hero__facts li { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); max-width: 150px; }
.hero__facts b { font-size: 1.5rem; color: var(--text); }

.code-card {
  background: #0a101e; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
  transform: rotate(1.5deg);
}
.code-card__bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.code-card__bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3654; }
.code-card__bar span { margin-left: 10px; font-size: .8rem; color: var(--muted); }
.code-card pre { margin: 0; padding: 20px; overflow-x: auto; font: .88rem/1.7 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.code-card .c { color: #5d6b8a; }
.code-card .k { color: #7aa2ff; }
.code-card .s { color: var(--teal); }

/* Sections */
.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section h2 + .muted { margin-bottom: 2.5rem; }
.section > .container > h2 { margin-bottom: 2rem; }
.section > .container > h2:has(+ .muted) { margin-bottom: .6rem; }

.grid { display: grid; gap: 20px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(20,209,176,.5); }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }
.icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(43,107,255,.14); margin-bottom: 1.2rem;
}
.icon svg { width: 24px; height: 24px; fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.split > div > p { color: var(--muted); }
.split .btn { margin-top: .8rem; }

.checklist li { padding: 16px 0 16px 38px; border-bottom: 1px solid var(--line); position: relative; }
.checklist li:first-child { padding-top: 0; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 22px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--grad);
}
.checklist li:first-child::before { top: 6px; }
.checklist li::after {
  content: "✓"; position: absolute; left: 0; top: 22px; width: 20px; height: 20px; display: grid; place-items: center;
  font-size: .7rem; font-weight: 700; color: #fff;
}
.checklist li:first-child::after { top: 6px; }
.checklist b { display: block; }
.checklist span { color: var(--muted); font-size: .92rem; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.steps li { border-top: 2px solid var(--line); padding-top: 20px; }
.steps li:hover { border-top-color: var(--teal); }
.steps__n { font-size: .85rem; font-weight: 700; color: var(--teal); letter-spacing: .1em; }
.steps h3 { margin: .4rem 0 .5rem; }
.steps p { color: var(--muted); font-size: .95rem; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tags li { padding: .5em 1.1em; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: .92rem; }

/* Team */
.person { display: flex; gap: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.person p:last-child { margin: 0; color: var(--muted); font-size: .95rem; }
.person h3 { margin-bottom: .2rem; }
.role { color: var(--teal); font-size: .85rem; margin-bottom: .8rem; }
.avatar {
  flex: none; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  font-size: 1.6rem; font-weight: 700; background: var(--grad);
}
.avatar--b { background: linear-gradient(135deg, var(--teal), var(--blue)); }

/* Contact */
.section--cta { background: linear-gradient(180deg, var(--bg), #0d1730); border-top: 1px solid var(--line); }
.contacts { margin-top: 1.5rem; }
.contacts li { display: flex; flex-direction: column; margin-bottom: 1rem; }
.contacts span { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.contacts a { font-size: 1.15rem; text-decoration: none; font-weight: 600; }
.contacts a:hover { color: var(--teal); }

.form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: .88rem; color: var(--muted); }
.form input[type="text"], .form textarea {
  font: inherit; color: var(--text); background: #0a101e; border: 1px solid var(--line);
  border-radius: 10px; padding: .75em 1em; resize: vertical;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
.form .invalid { border-color: #ff6b6b !important; }
.check { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px !important; }
.check input { margin-top: 4px; accent-color: var(--teal); }
.form .btn { justify-self: start; }
.form__note { margin: 0; font-size: .9rem; min-height: 1.4em; color: var(--teal); }
.form__note.error { color: #ff8a8a; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 32px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer__legal { margin: 0; color: var(--muted); font-size: .82rem; text-align: right; }
.footer__staff { color: var(--muted); opacity: .7; text-decoration: underline; text-underline-offset: 3px; }
.footer__staff:hover { opacity: 1; color: var(--teal); }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .6s; }
.reveal.visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 960px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hero__inner, .split { grid-template-columns: 1fr; gap: 40px; }
  .code-card { transform: none; }
}
@media (max-width: 760px) {
  .burger { display: block; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; padding: 12px 20px 20px; background: var(--bg); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 12px 0; }
  .nav .btn { text-align: center; margin-top: 8px; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero { padding: 56px 0 48px; }
  .section { padding: 64px 0; }
  .grid--4, .grid--2, .steps { grid-template-columns: 1fr; }
  .footer__legal { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}
