/* =========================================================
   ПАЛИТРА И НАСТРОЙКИ  — меняйте значения здесь, чтобы
   перекрасить весь сайт. Цвета заданы один раз.
   Тема: тёмная «инженерная». Чтобы вернуться к светлой —
   поменяйте значения фонов/текста ниже (логика не зависит от темы).
   ========================================================= */
:root {
  --accent:        #5b8cff;   /* основной фирменный цвет (электрик-синий) */
  --accent-dark:   #3f6fe6;   /* он же темнее — для наведения */
  --accent-2:      #2ee6c7;   /* вторичный акцент (циан) — для градиентов */
  --accent-soft:   rgba(91, 140, 255, .14);  /* полупрозрачная подложка акцента */

  --gold:          #e7c873;   /* золотой акцент (бренд, метки, логотип) */
  --gold-deep:     #c79a3a;   /* золото темнее — для градиентов */
  --gold-soft:     rgba(231, 200, 115, .12); /* полупрозрачная подложка золота */

  --bg:            #070b15;   /* фон страницы (глубокий «чернильный») */
  --bg-alt:        #0b1120;   /* фон чередующихся секций */
  --surface:       #0e1626;   /* поверхность карточек/формы */
  --surface-2:     #131e33;   /* приподнятая поверхность */
  --text:          #eef2fb;   /* основной текст */
  --text-muted:    #93a0bd;   /* приглушённый текст */
  --border:        rgba(255, 255, 255, .09);  /* линии и рамки */
  --border-strong: rgba(255, 255, 255, .16);

  --radius:        16px;      /* скругление карточек */
  --radius-sm:     11px;      /* скругление инпутов/кнопок */
  --maxw:          1140px;    /* максимальная ширина контента */
  --shadow:        0 24px 60px rgba(0, 0, 0, .45);
  --shadow-sm:     0 8px 24px rgba(0, 0, 0, .28);
  --glow:          0 0 0 1px var(--accent-soft), 0 12px 40px rgba(91, 140, 255, .25);

  --font:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono:'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* =========================================================
   БАЗА
   ========================================================= */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: #8fb0ff; }

code, .mono {
  font-family: var(--font-mono);
  background: var(--accent-soft);
  color: #b9ccff;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: .9em;
}

::selection { background: var(--accent); color: #fff; }

.container {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

/* =========================================================
   ДЕКОРАТИВНЫЙ ФОН (сетка + свечение)
   ========================================================= */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 35%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 35%, transparent 80%);
  pointer-events: none;
}
.bg-glow {
  position: fixed;
  top: -260px; left: 50%;
  width: 900px; height: 600px;
  transform: translateX(-50%);
  z-index: -1;
  background:
    radial-gradient(circle at 30% 40%, rgba(91,140,255,.30), transparent 55%),
    radial-gradient(circle at 70% 50%, rgba(46,230,199,.18), transparent 55%);
  filter: blur(20px);
  pointer-events: none;
}

/* =========================================================
   ТИПОВЫЕ ЭЛЕМЕНТЫ
   ========================================================= */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.h2 {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}

.accent {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head { text-align: center; margin-bottom: 48px; }
.section-head .eyebrow { justify-content: center; }
.section-head .eyebrow::after {
  content: "";
  width: 22px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

/* =========================================================
   КНОПКИ
   ========================================================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 15.5px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(91, 140, 255, .35);
  transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
  white-space: nowrap;
}
.btn:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.07); box-shadow: 0 14px 34px rgba(91, 140, 255, .45); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn--ghost {
  background: rgba(255,255,255,.03);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: none;
  backdrop-filter: blur(4px);
}
.btn--ghost:hover { background: var(--accent-soft); color: #fff; border-color: var(--accent); box-shadow: none; }

.btn--sm { padding: 10px 18px; font-size: 14px; }

/* =========================================================
   ШАПКА
   ========================================================= */
.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 21, .72);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.hdr__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.hdr__logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.hdr__logo:hover { color: var(--text); }
.hdr__logo-mark { display: inline-flex; color: var(--gold); }

.hdr__nav {
  display: flex;
  gap: 30px;
  margin-left: auto;
}
.hdr__nav a {
  position: relative;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 15px;
}
.hdr__nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
  transition: width .2s ease;
}
.hdr__nav a:hover { color: var(--text); }
.hdr__nav a:hover::after { width: 100%; }

.hdr__cta { margin-left: 4px; }

/* переключатель языков */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.lang__btn {
  padding: 6px 9px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.lang__btn:hover { color: var(--text); }
.lang__btn.is-active {
  background: var(--accent);
  color: #fff;
}
.lang--mobile {
  margin-top: 14px;
  align-self: flex-start;
}

/* бургер (скрыт на десктопе) */
.hdr__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 11px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.hdr__burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.hdr__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hdr__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hdr__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hdr__mobile {
  display: none;
  flex-direction: column;
  padding: 8px 22px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 17, 32, .96);
  backdrop-filter: blur(14px);
}
.hdr__mobile a {
  padding: 13px 4px;
  color: var(--text);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.hdr__mobile a:last-child { border-bottom: none; }
.hdr__mobile.is-open { display: flex; }

/* =========================================================
   ГЕРОЙ
   ========================================================= */
.hero {
  padding: clamp(56px, 9vw, 110px) 0 clamp(48px, 7vw, 92px);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 56px;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 6px 12px;
  border: 1px solid rgba(231, 200, 115, .30);
  border-radius: 999px;
  background: var(--gold-soft);
}
.hero__title {
  margin: 0 0 20px;
  font-size: clamp(33px, 5.4vw, 60px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.hero__lead {
  margin: 0 0 32px;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-muted);
  max-width: 540px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}
.hero__tags li {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.02);
}

/* визуал-чип справа */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 340px;
}
.chip {
  position: relative;
  width: min(100%, 400px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.chip::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 28px;
  background: radial-gradient(circle at 50% 45%, rgba(91,140,255,.22), transparent 65%);
  filter: blur(8px);
}
.chip__svg {
  position: relative;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.5));
}
.chip__label {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: .12em;
  fill: var(--gold);
}
.chip__pads circle { animation: blink 2.6s ease-in-out infinite; }
.chip__pads circle:nth-child(even) { animation-delay: 1.3s; }
.chip__pulse {
  position: absolute;
  width: 44%; height: 44%;
  border-radius: 14px;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: pulse 2.8s ease-out infinite;
}
@keyframes blink { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes pulse {
  0%   { opacity: .55; transform: scale(.82); }
  100% { opacity: 0;   transform: scale(1.35); }
}

/* =========================================================
   ПОЛОСА «О НАС»
   ========================================================= */
.band {
  background: var(--bg-alt);
  padding: clamp(60px, 9vw, 96px) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.band__inner {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 48px;
  align-items: start;
}
.band__text {
  margin: 0;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
  color: var(--text);
  font-weight: 400;
}

/* =========================================================
   ВОЗМОЖНОСТИ
   ========================================================= */
.features { padding: clamp(64px, 9vw, 104px) 0; }
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  position: relative;
  padding: 32px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-alt));
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity .2s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}
.card:hover::before { opacity: 1; }
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  margin-bottom: 18px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border-strong);
}
.card__title { margin: 0 0 9px; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.card__text { margin: 0; color: var(--text-muted); }

/* =========================================================
   КОНТАКТЫ / ФОРМА
   ========================================================= */
.contact {
  padding: clamp(64px, 9vw, 104px) 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.contact__lead {
  margin: 16px 0 0;
  font-size: 17px;
  color: var(--text-muted);
  max-width: 420px;
}

.form {
  background: linear-gradient(180deg, var(--surface), var(--bg-alt));
  padding: 32px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form__field {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}
.form__label {
  margin-bottom: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.form input,
.form textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--text);
  background: rgba(0,0,0,.25);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.form input::placeholder,
.form textarea::placeholder { color: #5d6a86; }
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0,0,0,.35);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form textarea { resize: vertical; min-height: 124px; }

.form__field.is-invalid input,
.form__field.is-invalid textarea { border-color: #f0526a; }
.form__error {
  min-height: 16px;
  margin-top: 6px;
  font-size: 13px;
  color: #ff7a8c;
}

/* honeypot — невидимое поле-ловушка для ботов */
.form__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
}

.form__footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.form__status { margin: 0; font-size: 14px; font-weight: 500; }
.form__status.is-ok { color: #43e3a5; }
.form__status.is-err { color: #ff7a8c; }

/* =========================================================
   ПОДВАЛ
   ========================================================= */
.ftr {
  padding: 32px 0;
  background: #05080f;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}
.ftr__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ftr__copy { margin: 0; font-size: 14px; }
.ftr__mail {
  color: var(--text);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 14px;
}
.ftr__mail:hover { color: var(--accent); }

/* =========================================================
   SCROLL-REVEAL (включается из main.js классом reveal-on)
   ========================================================= */
.reveal-on .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal-on .reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* лёгкая ступенчатость карточек */
.reveal-on .features__grid .card:nth-child(2) { transition-delay: .08s; }
.reveal-on .features__grid .card:nth-child(3) { transition-delay: .16s; }

/* =========================================================
   АДАПТИВ — планшеты
   ========================================================= */
@media (max-width: 920px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { order: -1; min-height: 0; }
  .chip { width: min(78%, 320px); }
  .band__inner { grid-template-columns: 1fr; gap: 18px; }
  .contact__inner { grid-template-columns: 1fr; gap: 36px; }
  .features__grid { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   АДАПТИВ — смартфоны
   ========================================================= */
@media (max-width: 640px) {
  .hdr__nav, .hdr__cta, #langDesktop { display: none; } /* прячем десктоп-меню */
  .hdr__burger { display: flex; }            /* показываем бургер */
  .features__grid { grid-template-columns: 1fr; }
  .form { padding: 24px; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .hero__actions .btn { flex: 1 1 auto; }
  .bg-grid { background-size: 40px 40px; }
}

/* уважение к настройке «меньше движения» */
@media (prefers-reduced-motion: reduce) {
  .chip__pads circle, .chip__pulse { animation: none; }
  .chip__e { display: none; }   /* выключаем бегущие электроны */
  .reveal-on .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
