/* ===================================================================
   Все ИИ решения — style.css
   Никаких внешних CDN: шрифты системные, иконки — инлайн-спрайт.
   =================================================================== */

/* ---------- Токены ---------- */
:root {
  --paper:      #FBFAF8;
  --paper-2:    #F2F1ED;
  --card:       #FFFFFF;
  --ink:        #14161A;
  --ink-2:      #4A4F58;
  --ink-3:      #7C828C;
  --line:       #E2E0DA;
  --accent:     #2F5BFF;
  --accent-ink: #FFFFFF;
  --accent-soft:#EBF0FF;
  --warm:       #FF6B35;
  --ok:         #0F9D58;

  --r:   10px;
  --r-lg: 16px;
  --shadow:    0 1px 2px rgba(20,22,26,.05), 0 4px 16px rgba(20,22,26,.05);
  --shadow-lg: 0 2px 4px rgba(20,22,26,.06), 0 16px 48px rgba(20,22,26,.10);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1140px;
  --pad: 24px;
}

:root[data-theme="dark"],
html.dark {
  --paper:      #0E0F12;
  --paper-2:    #15171C;
  --card:       #181A20;
  --ink:        #F4F4F2;
  --ink-2:      #A9AEB8;
  --ink-3:      #737985;
  --line:       #272A32;
  --accent:     #6E8CFF;
  --accent-ink: #0E0F12;
  --accent-soft:#1B2140;
  --warm:       #FF8355;
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.5), 0 16px 48px rgba(0,0,0,.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #0E0F12;
    --paper-2:    #15171C;
    --card:       #181A20;
    --ink:        #F4F4F2;
    --ink-2:      #A9AEB8;
    --ink-3:      #737985;
    --line:       #272A32;
    --accent:     #6E8CFF;
    --accent-ink: #0E0F12;
    --accent-soft:#1B2140;
    --warm:       #FF8355;
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.5), 0 16px 48px rgba(0,0,0,.45);
  }
}

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* hidden обязан побеждать любой display из правил ниже */
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 200;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: var(--r);
}
.skip-link:focus { left: 8px; }

/* ---------- Иконки ---------- */
.ic {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Раскладка ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.wrap--narrow { max-width: 780px; }

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--alt { background: var(--paper-2); }

.section__head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section__head h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12; letter-spacing: -.02em; font-weight: 700;
  margin-bottom: 12px;
}
.section__lead { color: var(--ink-2); font-size: 17px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 14px;
}

.u-accent { color: var(--accent); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--r);
  font-size: 15px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn .ic { width: 18px; height: 18px; }

.btn--solid { background: var(--accent); color: var(--accent-ink); }
.btn--solid:hover { filter: brightness(1.08); }

.btn--ghost { border-color: var(--line); background: transparent; color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--sm { padding: 8px 14px; font-size: 14px; }
.btn--lg { padding: 14px 26px; font-size: 16px; }
.btn--block { width: 100%; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--r);
  background: transparent; border: 1px solid var(--line);
  cursor: pointer; transition: border-color .18s ease, color .18s ease;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Бренд ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.brand__mark {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.5px;
  width: 22px; height: 22px; flex: none;
}
.brand__dot { border-radius: 2px; background: var(--accent); }
.brand__dot:nth-child(2) { background: var(--ink-3); }
.brand__dot:nth-child(3) { background: var(--ink-3); }
.brand__dot:nth-child(4) { background: var(--warm); }
.brand__text { font-size: 16px; letter-spacing: -.01em; }
.brand__text b { color: var(--accent); }

/* ---------- Навигация ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 20px; height: 64px; }

.nav__links { display: flex; gap: 26px; margin-inline: auto; }
.nav__links a {
  text-decoration: none; font-size: 15px; color: var(--ink-2);
  transition: color .18s ease;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }

.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__burger { display: none; }

.ic--sun { display: none; }
:root[data-theme="dark"] .ic--sun { display: block; }
:root[data-theme="dark"] .ic--moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ic--sun { display: block; }
  :root:not([data-theme="light"]) .ic--moon { display: none; }
}

/* ---------- Мобильное меню ---------- */
.drawer {
  position: fixed; inset: 64px 0 auto; z-index: 55;
  background: var(--paper); border-bottom: 1px solid var(--line);
  padding: 16px var(--pad) 24px; box-shadow: var(--shadow-lg);
}
.drawer nav { display: flex; flex-direction: column; gap: 4px; }
.drawer a {
  text-decoration: none; padding: 12px 4px; font-size: 17px;
  border-bottom: 1px solid var(--line);
}
.drawer a.btn { border: 1px solid transparent; margin-top: 12px; justify-content: center; }

/* ---------- Герой ---------- */
.hero { position: relative; padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 6vw, 72px); overflow: hidden; }
.hero__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 5%, transparent 70%);
          mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 5%, transparent 70%);
  opacity: .6;
}
.hero .wrap { position: relative; }

.hero__title {
  font-size: clamp(36px, 6.2vw, 68px);
  line-height: 1.05; letter-spacing: -.035em; font-weight: 800;
  margin-bottom: 20px; max-width: 15ch;
}
.hero__lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-2); max-width: 56ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin-top: clamp(48px, 6vw, 72px);
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden;
}
.fact { background: var(--paper); padding: 20px 22px; }
.fact dt { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.fact dd {
  font-family: var(--mono); font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 600; letter-spacing: -.02em;
}

/* ---------- Проекты ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.proj {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.proj:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.proj--wide { grid-column: 1 / -1; }

.proj__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.proj__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--r);
  background: var(--accent-soft); color: var(--accent);
}
.proj__icon .ic { width: 22px; height: 22px; }

.tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-3);
}
.tag--live {
  color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent);
  display: inline-flex; align-items: center; gap: 6px;
}
.tag--live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.proj__title { font-size: 24px; letter-spacing: -.02em; font-weight: 700; margin-bottom: 8px; }
.proj--wide .proj__title { font-size: 30px; }
.proj__desc { color: var(--ink-2); margin-bottom: 18px; max-width: 62ch; }

.proj__points { display: grid; gap: 9px; margin-bottom: 20px; }
.proj__points li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--ink-2); }
.proj__points .ic { width: 17px; height: 17px; margin-top: 4px; color: var(--accent); stroke-width: 2.25; }

.proj__meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }
.chip {
  font-family: var(--mono); font-size: 12px;
  padding: 4px 9px; border-radius: 6px;
  background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2);
}
.chip--ver { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }

.proj__link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 20px; font-weight: 600; font-size: 15px;
  color: var(--accent); text-decoration: none; align-self: flex-start;
}
.proj__link:hover { gap: 12px; }
.proj__link .ic { width: 16px; height: 16px; transition: transform .18s ease; }

.projects__note { margin-top: 28px; color: var(--ink-3); font-size: 15px; }
.projects__note a { color: var(--accent); }

/* ---------- Услуги ---------- */
.svcs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.svc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; transition: border-color .2s ease, transform .2s ease;
}
.svc:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-3px); }
.svc__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r);
  background: var(--accent-soft); color: var(--accent); margin-bottom: 16px;
}
.svc h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; }
.svc p { color: var(--ink-2); font-size: 15px; margin-bottom: 14px; }
.svc ul { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.svc li { font-size: 14px; color: var(--ink-3); padding-left: 14px; position: relative; }
.svc li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}

/* ---------- Тарифы ---------- */
.switch {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 32px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
}
.switch__btn {
  padding: 9px 22px; border-radius: 999px; border: none; background: transparent;
  font-size: 15px; font-weight: 600; color: var(--ink-3); cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.switch__btn.is-active { background: var(--accent); color: var(--accent-ink); }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plans.is-hidden { display: none; }

.plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px;
}
.plan--hot { border-color: var(--accent); box-shadow: var(--shadow); }
.plan__badge {
  position: absolute; top: -11px; left: 28px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-ink);
  padding: 4px 12px; border-radius: 999px;
}
.plan__name { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.plan__desc { font-size: 14px; color: var(--ink-3); margin-bottom: 20px; }
.plan__price {
  font-family: var(--mono); font-size: 36px; font-weight: 700; letter-spacing: -.03em;
  padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line);
}
.plan__from, .plan__cur { font-size: 16px; font-weight: 500; color: var(--ink-3); }

.plan__list { display: grid; gap: 10px; margin-bottom: 24px; }
.plan__list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; }
.plan__list .ic { width: 17px; height: 17px; margin-top: 4px; stroke-width: 2.25; }
.plan__list .ok { color: var(--ink-2); }
.plan__list .ok .ic { color: var(--accent); }
.plan__list .no { color: var(--ink-3); }
.plan__list .no .ic { color: var(--ink-3); }

.plan .btn { margin-top: auto; }
.plan__foot {
  display: flex; align-items: center; gap: 7px;
  margin-top: 16px; font-size: 13px; color: var(--ink-3);
}
.plan__foot .ic { width: 15px; height: 15px; }

/* ---------- Процесс ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.step { background: var(--paper); padding: 28px 24px; }
.step__num {
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  color: var(--accent); display: block; margin-bottom: 16px;
}
.step h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 15px; color: var(--ink-2); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.q { border-bottom: 1px solid var(--line); }
.q summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 4px; cursor: pointer; list-style: none;
  font-size: 17px; font-weight: 600;
}
.q summary::-webkit-details-marker { display: none; }
.q summary .ic { color: var(--ink-3); transition: transform .2s ease; }
.q[open] summary .ic { transform: rotate(180deg); color: var(--accent); }
.q p { padding: 0 4px 22px; color: var(--ink-2); max-width: 68ch; }

/* ---------- Заявка ---------- */
.section--order { background: var(--paper-2); }
.order { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.order__info h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -.025em; font-weight: 700; margin-bottom: 12px; }

.contacts { display: grid; gap: 14px; margin-top: 32px; }
.contacts li { display: flex; align-items: center; gap: 14px; }
.contacts__ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: none; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line); color: var(--accent);
}
.contacts li > span:last-child { display: flex; flex-direction: column; }
.contacts b { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.contacts a { color: var(--ink); text-decoration: none; font-weight: 600; }
.contacts a:hover { color: var(--accent); }

.form {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(22px, 3vw, 30px); box-shadow: var(--shadow);
}
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.field label i { color: var(--warm); font-style: normal; }
.field .opt { font-weight: 400; color: var(--ink-3); font-size: 13px; }

.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  font-size: 15px; transition: border-color .18s ease, box-shadow .18s ease;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field input.is-bad, .field select.is-bad, .field textarea.is-bad { border-color: var(--warm); }
.field select { appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  padding-right: 36px;
}

.check { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--accent); flex: none; cursor: pointer; }
.check a { color: var(--accent); }

.form__err {
  background: color-mix(in srgb, var(--warm) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warm) 40%, transparent);
  color: var(--warm);
  padding: 10px 13px; border-radius: var(--r); font-size: 14px; margin-bottom: 14px;
}
.form__note { text-align: center; font-size: 13px; color: var(--ink-3); margin-top: 14px; }

/* ---------- Футер ---------- */
.foot { background: var(--paper); border-top: 1px solid var(--line); padding-top: 56px; }
.foot__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.foot__brand p { color: var(--ink-3); font-size: 14px; margin-top: 14px; max-width: 34ch; }
.foot__col h4 { font-size: 13px; font-weight: 700; margin-bottom: 14px; letter-spacing: .01em; }
.foot__col ul { display: grid; gap: 9px; }
.foot__col li, .foot__col a { font-size: 14px; color: var(--ink-3); text-decoration: none; }
.foot__col a:hover { color: var(--accent); }

.foot__bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 20px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-3);
}
.foot__legal { display: flex; gap: 20px; }
.foot__legal a { text-decoration: none; }
.foot__legal a:hover { color: var(--accent); }

/* ---------- Модалка ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: var(--pad);
  background: color-mix(in srgb, var(--ink) 45%, transparent);
  backdrop-filter: blur(4px);
}
.modal__card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 36px 32px; text-align: center; max-width: 400px; width: 100%;
  box-shadow: var(--shadow-lg);
}
.modal__ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%; margin-bottom: 18px;
  background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok);
}
.modal__ic .ic { width: 28px; height: 28px; stroke-width: 2.5; }
.modal__card h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.modal__card > p { color: var(--ink-2); }
.modal__num { font-family: var(--mono); font-size: 14px; color: var(--ink-3); margin: 16px 0 24px; }
.modal__num b { color: var(--ink); }

/* ---------- Адаптив ---------- */
@media (max-width: 980px) {
  .nav__links { display: none; }
  .nav__burger { display: inline-flex; }
  .nav__cta { display: none; }
  .nav__actions { margin-left: auto; }

  .projects, .plans { grid-template-columns: 1fr; }
  .svcs { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .order { grid-template-columns: 1fr; }
  .foot__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  :root { --pad: 18px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .svcs { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .foot__inner { grid-template-columns: 1fr; gap: 28px; }
  .foot__bottom { flex-direction: column; align-items: flex-start; }
  .hero__cta .btn { width: 100%; }
  .switch { width: 100%; }
  .switch__btn { flex: 1; }
}
