/* =====================================================================
   Favorit Engineering — favorit-engineering.ru
   Статичный сайт-визитка. Тёмная тема с плазменными акцентами.
   ===================================================================== */

:root {
  --bg: #0b1020;
  --bg-alt: #0e1428;
  --bg-card: #141b33;
  --bg-card-hover: #182044;
  --border: rgba(139, 148, 184, 0.16);
  --text: #e8ebf6;
  --text-muted: #9aa3c0;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --gradient: linear-gradient(96deg, #a78bfa 0%, #8b5cf6 45%, #22d3ee 100%);
  --radius: 16px;
  --shadow: 0 18px 40px rgba(4, 8, 24, 0.5);
  --header-h: 72px;
}

/* ---------- База ---------- */

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: none; }

h1, h2, h3 { line-height: 1.22; font-weight: 700; letter-spacing: -0.01em; }

::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }

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

.container {
  width: min(1160px, 100% - 48px);
  margin-inline: auto;
}

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 12px;
  font-size: 0.98rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--gradient);
  color: #0b1020;
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(139, 92, 246, 0.35);
}
.btn--outline {
  border-color: var(--border);
  color: var(--text);
  background: rgba(20, 27, 51, 0.5);
}
.btn--outline:hover { border-color: var(--accent); color: #c4b5fd; }
.btn--ghost { color: var(--text-muted); padding-inline: 18px; }
.btn--ghost:hover { color: var(--text); }
.btn--sm { padding: 9px 18px; font-size: 0.88rem; }
.btn--lg { padding: 16px 34px; font-size: 1.05rem; }

/* ---------- Шапка ---------- */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(11, 16, 32, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
}
.logo__mark { width: 34px; height: 34px; flex: none; }
.logo__accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo--footer { font-size: 1.05rem; }

.nav { display: flex; align-items: center; gap: 28px; }

.nav__list {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}

.nav__link {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav__link:hover { color: var(--text); }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}
.burger span {
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Герой ---------- */

.hero {
  position: relative;
  padding: calc(var(--header-h) + 72px) 0 64px;
  background:
    radial-gradient(900px 480px at 78% -10%, rgba(139, 92, 246, 0.16), transparent 60%),
    radial-gradient(700px 420px at 8% 12%, rgba(34, 211, 238, 0.10), transparent 60%),
    var(--bg);
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  top: -180px;
  right: -120px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.22), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.10);
  color: #c4b5fd;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero__title {
  margin-top: 22px;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 800;
}

.hero__subtitle {
  margin-top: 20px;
  max-width: 560px;
  font-size: 1.12rem;
  color: var(--text-muted);
}

.hero__actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__note {
  margin-top: 18px;
  font-size: 0.86rem;
  color: var(--text-muted);
  opacity: 0.8;
}

.hero__visual { display: flex; justify-content: center; }

.hero__visual svg {
  width: 100%;
  max-width: 500px;
  height: auto;
  filter: drop-shadow(0 24px 60px rgba(34, 211, 238, 0.10));
}

.hero__stats {
  margin-top: 72px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(20, 27, 51, 0.75), rgba(14, 20, 40, 0.55));
}

.stat__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label {
  display: block;
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ---------- Секции ---------- */

.section { padding: 88px 0; }
.section--alt {
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(139, 92, 246, 0.06), transparent 60%),
    var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section__head { max-width: 760px; margin-bottom: 48px; }

.section__eyebrow {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.section__title {
  margin-top: 12px;
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
}

.section__lead {
  margin-top: 16px;
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* ---------- О компании ---------- */

.about__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: start;
}

.about__text p { color: var(--text-muted); }
.about__text p + p { margin-top: 16px; }
.about__text strong { color: var(--text); }

.about__facts {
  display: grid;
  gap: 14px;
}

.fact {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: var(--bg-card);
}
.fact__name {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 3px;
}
.fact__value { font-weight: 600; font-size: 0.98rem; }

/* ---------- Продукт ---------- */

.product__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.card--problem { border-top: 3px solid #f87171; }
.card--solution { border-top: 3px solid var(--accent-2); background: linear-gradient(165deg, #162046, var(--bg-card)); }

.card__title { font-size: 1.25rem; margin-bottom: 18px; }

.card__list { list-style: none; display: grid; gap: 12px; }
.card__list li {
  position: relative;
  padding-left: 26px;
  color: var(--text-muted);
}
.card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
}
.card--problem .card__list li::before { background: #f87171; }

/* ---------- Шаги ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 28px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
}
.step::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.step:hover::after { transform: scaleX(1); }

.step__num {
  font-size: 0.95rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.step__title { margin-top: 10px; font-size: 1.15rem; }
.step__text { margin-top: 10px; font-size: 0.95rem; color: var(--text-muted); }

/* ---------- Преимущества ---------- */

.benefits__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.benefit {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.benefit:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: var(--shadow);
}

.benefit__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--accent-2);
  background: rgba(34, 211, 238, 0.09);
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.benefit__title { margin-top: 16px; font-size: 1.08rem; }
.benefit__text { margin-top: 8px; font-size: 0.93rem; color: var(--text-muted); }

/* ---------- Применение ---------- */

.apps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.app {
  position: relative;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(320px 160px at 100% 0%, rgba(139, 92, 246, 0.12), transparent 70%),
    var(--bg-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.app:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.app__title { font-size: 1.08rem; color: #c4b5fd; }
.app__text { margin-top: 8px; font-size: 0.93rem; color: var(--text-muted); }

/* ---------- Контакты ---------- */

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

.contact {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.contact__name {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.contact__value {
  display: inline-block;
  margin-top: 8px;
  font-size: 1.02rem;
  font-weight: 600;
  word-break: break-all;
}
.contact__value--link { color: var(--accent-2); }
.contact__value--link:hover { text-decoration: underline; }

.contacts__cta { margin-top: 36px; text-align: center; }

/* ---------- Футер ---------- */

.footer {
  background: #080d1c;
  border-top: 1px solid var(--border);
  padding-top: 56px;
}

.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 32px;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 0.92rem;
}
.footer__nav a { color: var(--text-muted); transition: color 0.15s ease; }
.footer__nav a:hover { color: var(--text); }

/* Плашка поддержки Фонда содействия инновациям — обязательна по условиям гранта */
.fsie a { display: block; border-radius: var(--radius); overflow: hidden; }
.fsie img { width: 100%; height: auto; }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
  padding: 22px 0 26px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__requisites { text-align: right; }

/* ---------- Анимации появления ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .benefit, .app, .step { transition: none; }
}

/* ---------- Адаптив ---------- */

@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 36px; }
  .hero__visual { order: -1; }
  .hero__visual svg { max-width: 380px; }
  .benefits__grid, .apps__grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .contacts__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 20px 24px 26px;
    background: #0b1020;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(4, 8, 24, 0.5);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__list { flex-direction: column; align-items: flex-start; gap: 14px; }
  .nav__cta { margin-top: 10px; }
  .burger { display: flex; }
  .about__grid, .product__grid { grid-template-columns: 1fr; }
  .hero__stats { grid-template-columns: 1fr; gap: 14px; }
  .stat { padding: 18px 20px; }
}

@media (max-width: 620px) {
  .container { width: min(1160px, 100% - 36px); }
  .section { padding: 64px 0; }
  .hero { padding-top: calc(var(--header-h) + 44px); }
  .benefits__grid, .apps__grid, .steps, .contacts__grid { grid-template-columns: 1fr; }
  .fact { grid-template-columns: 1fr; gap: 6px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .footer__requisites { text-align: left; }
}
