/* =========================================
   ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ
   ========================================= */
:root {
  /* Цвета светлой темы */
  --bg: #f7f8fb;             /* общий фон */
  --panel: #ffffff;          /* карточки/панели */
  --text: #111827;           /* основной текст */
  --muted: #6b7280;          /* вторичный текст */
  --primary: #2563eb;        /* акцент (синий) */
  --primary-weak: #e7efff;   /* слабый акцент */
  --line: #e5e7eb;           /* разделители */
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);

  /* Радиусы/отступы */
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1180px;

  /* Скорости */
  --tr: 240ms ease;
}

/* =========================================
   БАЗА
   ========================================= */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Roboto", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% 5%, #ffffff 40%, #f2f6ff 100%),
    radial-gradient(1200px 700px at 90% 0%, #ffffff 30%, #f3fbff 100%),
    var(--bg);
  line-height: 1.5;
}

/* Контейнер */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--tr), background var(--tr), color var(--tr), border-color var(--tr), box-shadow var(--tr);
  cursor: pointer;
  user-select: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn--primary:hover { filter: brightness(1.03); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: #fff; }

/* Заголовки/текст */
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
p { margin: 0 0 14px; }
.section__lead { color: var(--muted); }

/* =========================================
   HEADER
   ========================================= */
/* ====== БАЗОВАЯ СЕТКА ХЕДЕРА ====== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #0d1224;           /* подгони под свой фон */
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}

/* Бренд */
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; }
.brand__logo {
  width: 36px; height: 36px; border-radius: 10px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(255,255,255,.1);
  font-weight: 700;
}
.brand__text { font-weight: 600; }

/* ====== ГОРИЗОНТАЛЬНОЕ МЕНЮ (десктоп) ====== */
.main-nav { justify-self: center; }
.main-nav__list { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.main-nav__list a {
  color: #cfd5ff; text-decoration: none; font-weight: 500;
  padding: 8px 4px; border-radius: 8px;
}
.main-nav__list a:hover { background: rgba(255,255,255,.06); }

/* Контакты + CTA */
.header-contacts { display: inline-flex; align-items: center; gap: 12px; }
.header-contacts .phone { color: #fff; text-decoration: none; opacity: .9; }
.header-contacts .cta-btn { padding: 10px 14px; border-radius: 12px; background: #4b6bff; color:#fff; text-decoration:none; }

/* ====== БУРГЕР (видим только на мобиле) ====== */
.burger {
  display: none; /* по умолчанию скрыт на десктопе */
  position: relative; width: 42px; height: 38px;
  border: 1px solid rgba(255,255,255,.15);
  background: transparent; border-radius: 10px; cursor: pointer;
}
.burger__bar {
  position: absolute; left: 8px; right: 8px; height: 2px; background: #fff; border-radius: 1px;
  transition: transform .25s ease, opacity .2s ease;
}
.burger__bar:nth-child(1){ top: 11px; }
.burger__bar:nth-child(2){ top: 18px; }
.burger__bar:nth-child(3){ top: 25px; }
.burger[aria-expanded="true"] .burger__bar:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__bar:nth-child(2){ opacity: 0; }
.burger[aria-expanded="true"] .burger__bar:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ====== МОБИЛЬНОЕ OFF-CANVAS МЕНЮ ====== */
.mobile-menu { position: fixed; inset: 0; z-index: 1000; }
.mobile-menu[hidden] { display: none; }

/* затемнение */
.mobile-menu__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0; transition: opacity .28s ease;
}

/* панель */
.mobile-menu__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(86vw, 360px);
  background: #0f1630;
  box-shadow: -12px 0 32px rgba(0,0,0,.35);
  transform: translateX(100%);              /* скрыта справа */
  transition: transform .32s cubic-bezier(.22,.61,.36,1); /* плавный выезд */
  padding: 18px 18px 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.mobile-menu__close {
  align-self: flex-end;
  background: transparent; border: none; color: #fff;
  font-size: 28px; line-height: 1; cursor: pointer;
}
.mobile-menu__link {
  display:block; padding: 12px 10px; border-radius: 12px;
  color:#e6e9ff; text-decoration: none; font-weight: 500;
}
.mobile-menu__link:hover { background: rgba(255,255,255,.06); }

/* активное состояние — добавляется классом .menu-open на body */
body.menu-open { overflow: hidden; }
body.menu-open .mobile-menu__panel { transform: translateX(0); }
body.menu-open .mobile-menu__backdrop { opacity: 1; }

/* ====== АДАПТИВ ====== */
@media (max-width: 992px){
  .main-nav { display: none; }           /* на мобильных скрываем горизонтальное меню */
  .burger { display: inline-block; }     /* показываем бургер */
}

@media (min-width: 993px){
  /* на десктопе мобильное меню всегда скрыто перестраховочно */
  .mobile-menu { display: none !important; }
}

/* =========================================
   HERO
   ========================================= */
.hero {
  padding: 80px 0;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 40px;
  align-items: center;
}
.hero__subtitle { color: var(--muted); max-width: 56ch; }
.hero__actions { display: flex; gap: 12px; margin: 16px 0 10px; }
.hero__bullets { color: var(--muted); padding-left: 18px; }
.hero__mockup .mockup-card {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* =========================================
   СЕКЦИИ (общие)
   ========================================= */
.section { padding: 70px 0; }
.section__head { margin-bottom: 22px; }
.section__head h2 { font-size: clamp(24px, 3.4vw, 36px); }

/* =========================================
   КАРТОЧКИ УСЛУГ
   ========================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.10);
  border-color: #dbe3ff;
}
.product__icon { font-size: 28px; }
.product__title { margin-top: 6px; margin-bottom: 8px; font-size: 20px; }
.product__desc { color: var(--muted); }
.product__bullets { margin: 12px 0 16px; padding-left: 18px; color: var(--muted); }
.product__cta { display: flex; gap: 10px; }

/* =========================================
   КЕЙСЫ
   ========================================= */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.case-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--tr), box-shadow var(--tr);
}
.case-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(17,24,39,0.10); }
.case-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #eef4ff, #fdfdfd);
  border-bottom: 1px solid var(--line);
}
.case-meta { padding: 14px; }
.case-title { margin: 0 0 6px; font-size: 18px; }
.case-desc { margin: 0; color: var(--muted); }
.cases-cta { margin-top: 18px; }

/* =========================================
   CTA-ПОЛОСА
   ========================================= */
.cta-strip {
  padding: 54px 0;
  background: linear-gradient(90deg, #eef4ff, #f7fbff);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cta-strip__grid {
  display: grid;
  gap: 10px;
  text-align: center;
}

/* =========================================
   КОНТАКТЫ/ФОРМА
   ========================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
.contact-list { color: var(--muted); padding-left: 0; list-style: none; }
.contact-form {
  display: grid;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.contact-form label { display: grid; gap: 6px; font-weight: 600; }
.contact-form input, .contact-form textarea {
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color var(--tr), box-shadow var(--tr);
  font: inherit;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: #c7d7ff;
  box-shadow: 0 0 0 4px #e8f0ff;
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 24px 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.footer-nav { display: inline-flex; gap: 14px; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); }

/* =========================================
   REVEAL-АНИМАЦИИ (IntersectionObserver)
   ========================================= */
.reveal { 
  opacity: 0;
  transform: translateY(20px);
  will-change: transform, opacity;
  transition: opacity 500ms ease, transform 500ms ease;
}
.reveal.is-visible { 
  opacity: 1;
  transform: translateY(0);
}

/* Учитываем предпочтения пользователя по анимациям */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn { transition: none !important; }
}

/* =========================================
   АДАПТИВ
   ========================================= */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; }
  .cards, .cases-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .header-grid { grid-template-columns: 1fr; gap: 8px; padding: 10px 0; }
  .header-contacts { justify-content: space-between; }
  .hero { padding: 56px 0; }
  .cards, .cases-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
