/* NeuroDevel — базовый стиль: переменные, типографика, шапка, hero, секции, формы, модальные окна, подвал */

:root {
  --bg: #070A13;
  --bg-2: #0B1020;
  --bg-3: #101830;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --line: rgba(120, 160, 255, .16);
  --line-strong: rgba(0, 229, 255, .38);
  --text: #E8ECF8;
  --muted: #98A2C0;
  --cyan: #00E5FF;
  --violet: #8A2BE2;
  --pink: #E040FB;
  --ok: #3DDC97;
  --err: #FF5C7A;
  --grad: linear-gradient(120deg, #00E5FF 0%, #5B6CFF 48%, #8A2BE2 100%);
  --grad-hot: linear-gradient(120deg, #8A2BE2 0%, #E040FB 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 72px;
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
html { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(138, 43, 226, .55); }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 900px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }

/* ---------- Логотипы (кадрирование без создания новых файлов) ---------- */
.logo-wide {
  --w: 190px;
  position: relative; display: block; overflow: hidden;
  width: var(--w); height: calc(var(--w) * .2192);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent), linear-gradient(0deg, transparent, #000 18%, #000 82%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent), linear-gradient(0deg, transparent, #000 18%, #000 82%, transparent);
  mask-composite: intersect;
}
.logo-wide img {
  position: absolute; max-width: none;
  width: calc(var(--w) * 1.1452);
  left: calc(var(--w) * -.0822);
  top: calc(var(--w) * -.2055);
}
.logo-mark {
  --w: 44px;
  position: relative; display: block; overflow: hidden;
  width: var(--w); height: var(--w); border-radius: 22%;
  box-shadow: 0 0 0 1px var(--line), 0 0 18px rgba(138, 43, 226, .35);
}
.logo-mark img {
  position: absolute; max-width: none;
  width: calc(var(--w) * 1.1247);
  left: calc(var(--w) * -.0538);
  top: calc(var(--w) * -.0197);
}

/* ---------- Прелоадер ---------- */
.preloader { display: none; }
.js .preloader {
  position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center;
  background: var(--bg); transition: opacity .45s ease, visibility .45s ease;
}
.js .preloader.is-hidden { opacity: 0; visibility: hidden; }
.preloader .logo-mark { --w: 104px; animation: ndPulse 1.4s ease-in-out infinite; }
@keyframes ndPulse {
  0%, 100% { transform: scale(.94); box-shadow: 0 0 0 1px var(--line), 0 0 24px rgba(138, 43, 226, .35); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 1px var(--line-strong), 0 0 56px rgba(0, 229, 255, .55); }
}

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000; height: var(--header-h);
  background: rgba(7, 10, 19, .85);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; flex: none; }
.brand:hover { text-decoration: none; }
.brand .logo-mark { display: none; }

.main-nav { flex: 1; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; }
.main-nav a, .dd-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 12px; border-radius: 8px; border: 0; background: none; cursor: pointer;
  color: var(--text); font-size: .94rem; font-weight: 500; white-space: nowrap;
}
.main-nav a:hover, .dd-toggle:hover, .has-dd.open > .dd-toggle { background: var(--surface-2); text-decoration: none; color: #fff; }
.nav-accent { color: var(--cyan) !important; }
.dd-toggle::after {
  content: ""; width: 6px; height: 6px; margin-left: 2px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px); opacity: .7; transition: transform .2s;
}
.has-dd.open > .dd-toggle::after { transform: rotate(225deg); }
.has-dd { position: relative; }
.dd {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 330px; padding: 8px;
  background: rgba(11, 16, 32, .98); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease;
}
.has-dd:hover > .dd, .has-dd.open > .dd, .has-dd:focus-within > .dd { opacity: 1; visibility: visible; transform: none; }
.dd a { display: flex; width: 100%; white-space: normal; border-radius: 10px; padding: 10px 12px; font-weight: 450; }
.dd a small { display: block; color: var(--muted); font-size: .78rem; font-weight: 400; line-height: 1.35; }
.dd a span.dd-title { display: block; }

.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--cyan);
}
.icon-btn:hover { border-color: var(--line-strong); text-decoration: none; background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.burger { display: none; cursor: pointer; }
.burger span, .burger span::before, .burger span::after {
  display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; position: relative; transition: .2s;
}
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.nav-open .burger span { background: transparent; }
.nav-open .burger span::before { top: 0; transform: rotate(45deg); }
.nav-open .burger span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  font-weight: 650; font-size: .96rem; line-height: 1.2; text-align: center; white-space: nowrap;
  transition: transform .15s, box-shadow .2s, border-color .2s, background .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-primary { background: var(--grad); color: #04101c; box-shadow: 0 8px 28px rgba(0, 229, 255, .22); }
.btn-primary:hover { box-shadow: 0 10px 34px rgba(138, 43, 226, .45); color: #04101c; }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); color: #fff; }
.btn-sm { padding: 9px 16px; font-size: .88rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------- Секции ---------- */
.section { padding: 96px 0; position: relative; }
.section--alt { background: linear-gradient(180deg, transparent, rgba(16, 24, 48, .55) 12%, rgba(16, 24, 48, .55) 88%, transparent); }
.eyebrow {
  display: inline-block; margin-bottom: 14px; font: 600 .78rem/1 var(--mono);
  letter-spacing: .16em; text-transform: uppercase; color: var(--cyan);
}
.section-head { max-width: 820px; margin-bottom: 48px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-head--center { margin-inline: auto; text-align: center; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 88px; overflow: hidden; isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.hero::before { width: 560px; height: 560px; top: -180px; right: -120px; background: rgba(138, 43, 226, .38); }
.hero::after { width: 480px; height: 480px; bottom: -220px; left: -160px; background: rgba(0, 229, 255, .2); }
.hero-grid-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 20%, transparent 75%);
  opacity: .5;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero-lead { font-size: 1.15rem; color: #C3CBE4; max-width: 640px; margin-bottom: 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.tag {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font: 500 .78rem/1.4 var(--mono); color: var(--muted);
}
.hero-panel {
  position: relative; padding: 28px; border-radius: 22px; border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, rgba(16, 24, 48, .9), rgba(11, 16, 32, .75));
  box-shadow: 0 0 0 1px rgba(138, 43, 226, .12), 0 30px 80px rgba(0, 0, 0, .5), 0 0 80px rgba(138, 43, 226, .18);
}
.hero-panel .logo-wide { --w: min(100%, 420px); margin: 0 auto 22px; }
.pipeline { display: grid; gap: 0; font-family: var(--mono); font-size: .84rem; }
.pipeline li { position: relative; display: flex; gap: 12px; align-items: baseline; padding: 11px 0 11px 30px; border-top: 1px dashed var(--line); color: #C3CBE4; }
.pipeline li::before {
  content: attr(data-n); position: absolute; left: 0; top: 11px; width: 20px; height: 20px;
  display: grid; place-items: center; border-radius: 50%; background: var(--grad); color: #04101c; font-weight: 700; font-size: .68rem;
}
.pipeline b { color: var(--cyan); font-weight: 600; }

/* ---------- Принципы / подход ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  position: relative; padding: 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .25s, transform .25s, background .25s;
}
.card:hover { border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-2px); }
.card h3 { margin-bottom: 10px; }
.card p { margin: 0; color: var(--muted); font-size: .96rem; }
.card-num { font: 700 .8rem/1 var(--mono); color: var(--violet); letter-spacing: .1em; margin-bottom: 14px; display: block; }
.card-ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: linear-gradient(140deg, rgba(0, 229, 255, .16), rgba(138, 43, 226, .22)); border: 1px solid var(--line-strong);
  font-size: 1.25rem;
}

/* ---------- Формы ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label, .field .label { font-size: .86rem; font-weight: 600; color: #C3CBE4; }
.input, .select, .textarea {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(7, 10, 19, .75); color: var(--text); font: inherit; transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 130px; resize: vertical; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.select option { background: #0B1020; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 229, 255, .16); }
.input::placeholder, .textarea::placeholder { color: #5E6985; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .86rem; color: var(--muted); line-height: 1.5; cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--cyan); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { min-height: 1.4em; font-size: .92rem; }
.form-status.is-ok { color: var(--ok); }
.form-status.is-err { color: var(--err); }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: rgba(7, 10, 19, .75); gap: 4px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 8px 18px; border-radius: 9px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.seg input:checked + span { background: var(--grad); color: #04101c; }
.seg input:focus-visible + span { outline: 2px solid var(--cyan); }

.contact-wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: start; }
.contact-form { padding: 32px; border-radius: 20px; border: 1px solid var(--line-strong); background: linear-gradient(160deg, rgba(16, 24, 48, .85), rgba(11, 16, 32, .7)); }
.contact-aside { display: grid; gap: 16px; }
.contact-line { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.contact-line:hover { border-color: var(--line-strong); text-decoration: none; }
.contact-line .icon-btn { flex: none; }
.contact-line small { display: block; color: var(--muted); font-size: .8rem; }

/* ---------- Модальные окна ---------- */
.modal { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.is-open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 5, 12, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal-dialog {
  position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow: auto;
  padding: 32px; border-radius: 20px; border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, #101830, #0B1020); box-shadow: 0 40px 100px rgba(0, 0, 0, .7), 0 0 80px rgba(138, 43, 226, .2);
  animation: ndModal .22s ease;
}
.modal-dialog--wide { max-width: 860px; }
@keyframes ndModal { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 1.3rem; line-height: 1;
}
.modal-close:hover { background: var(--surface-2); border-color: var(--line-strong); }
.modal-title { padding-right: 40px; margin-bottom: 6px; }
.order-summary { margin: 18px 0 22px; padding: 16px 18px; border-radius: 14px; border: 1px dashed var(--line-strong); background: rgba(0, 229, 255, .04); display: grid; gap: 6px; font-size: .94rem; }
.order-summary div { display: flex; justify-content: space-between; gap: 16px; }
.order-summary .total { font: 700 1.25rem/1.2 var(--mono); color: var(--cyan); padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
.modal-ok { text-align: center; padding: 12px 0; }
.modal-ok .tick { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; font-size: 1.8rem; background: rgba(61, 220, 151, .14); border: 1px solid var(--ok); color: var(--ok); }

/* ---------- Юридические страницы ---------- */
.legal { padding: 64px 0 96px; }
.legal h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.legal h2 { font-size: 1.3rem; margin: 2em 0 .6em; color: #fff; }
.legal h3 { font-size: 1.05rem; margin: 1.4em 0 .4em; }
.legal p, .legal li { color: #C3CBE4; font-size: .98rem; }
.legal ul, .legal ol { padding-left: 1.4em; margin: 0 0 1em; }
.legal ul { list-style: disc; }
.legal li { margin-bottom: .4em; }
.legal .doc-meta { color: var(--muted); font-size: .9rem; margin-bottom: 28px; }
.legal .notice { padding: 16px 18px; border-radius: 12px; border: 1px solid rgba(255, 190, 70, .4); background: rgba(255, 190, 70, .07); color: #FFD890; font-size: .92rem; }
.legal .todo { background: rgba(255, 190, 70, .16); color: #FFD890; padding: 0 5px; border-radius: 4px; }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .92rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; color: #C3CBE4; }
.legal th { background: var(--surface-2); color: #fff; }
.legal-modal-body .legal { padding: 0; }
.legal-modal-body h1 { font-size: 1.5rem; padding-right: 40px; }
.legal-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }

/* ---------- Подвал ---------- */
.site-footer { margin-top: 40px; padding: 64px 0 28px; border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, rgba(11, 16, 32, .9)); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .logo-wide { --w: 230px; margin-bottom: 14px; margin-left: -6px; }
.footer-desc { font: 600 .8rem/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); margin-bottom: 14px; }
.footer-col h4 { font: 600 .78rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text); font-size: .94rem; }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; color: var(--muted); font-size: .85rem; }
.risk-note { margin-top: 36px; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .86rem; }
.risk-note strong { color: #C3CBE4; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-panel { max-width: 560px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .burger { display: inline-grid; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100vh - var(--header-h)); overflow: auto;
    padding: 12px 20px 22px; background: rgba(7, 10, 19, .97); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .2s ease;
  }
  .nav-open .main-nav { transform: none; opacity: 1; visibility: visible; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a, .dd-toggle { width: 100%; justify-content: space-between; padding: 13px 12px; }
  .dd { position: static; min-width: 0; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 6px 12px; }
  .has-dd:hover > .dd, .has-dd:focus-within > .dd { display: none; }
  .has-dd.open > .dd { display: block; }
  .header-inner { gap: 12px; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 768px) {
  .logo-wide { --w: 160px; }
  .scrolled .brand .logo-wide { display: none; }
  .scrolled .brand .logo-mark { display: block; }
  .section { padding: 68px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
  .contact-form { padding: 22px; }
  .modal-dialog { padding: 24px 20px; }
}
@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .header-actions .btn { display: none; }
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding-top: 44px; }
  .hero-cta .btn { width: 100%; white-space: normal; }
  .legal table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
