/* =========================================================
   lexeliseev.ru — общие стили сайта
   Правила стиля (кратко, подробно — в AGENTS.md):
   - фон тёмный, акцент ОДИН — зелёный (--accent);
   - сине-бирюзовые свечения только на первом экране (.hero);
   - ниже первого экрана: нейтральные серые карточки без цветных рамок.
   ========================================================= */

/* ---------- Шрифты (лежат в assets/fonts, без Google Fonts) ---------- */
@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap; src: url("../fonts/manrope-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap; src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+20BD,U+2122,U+2190-21FF,U+2212,U+2215; }
@font-face { font-family: "Manrope"; font-weight: 500; font-display: swap; src: url("../fonts/manrope-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Manrope"; font-weight: 500; font-display: swap; src: url("../fonts/manrope-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+20BD,U+2122,U+2190-21FF,U+2212,U+2215; }
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url("../fonts/manrope-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url("../fonts/manrope-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+20BD,U+2122,U+2190-21FF,U+2212,U+2215; }
@font-face { font-family: "Manrope"; font-weight: 800; font-display: swap; src: url("../fonts/manrope-cyrillic-800-normal.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Manrope"; font-weight: 800; font-display: swap; src: url("../fonts/manrope-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+20BD,U+2122,U+2190-21FF,U+2212,U+2215; }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("../fonts/jetbrains-mono-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+20BD,U+2122,U+2190-21FF,U+2212,U+2215; }

/* ---------- Цвета и размеры (меняйте только здесь) ---------- */
:root {
  --bg: #18191B;          /* основной фон */
  --bg-deep: #121315;     /* фон подвала */
  --card: #1F2124;        /* карточки */
  --line: #2E3236;        /* разделители и рамки */
  --text: #F2F5F7;        /* основной текст */
  --text-2: #C9D2DA;      /* второстепенный текст */
  --text-3: #A9B3BD;      /* подписи */
  --accent: #04D98B;      /* единственный акцент — зелёный */
  --on-accent: #0E0F10;   /* текст на зелёной кнопке */
  /* фирменные цвета свечений — ТОЛЬКО для первого экрана */
  --glow-teal: 4, 217, 178;   /* #04D9B2 */
  --glow-blue: 3, 120, 166;   /* #0378A6 */
  --glow-green: 4, 217, 139;  /* #04D98B */

  --pad: clamp(20px, 5vw, 64px);  /* боковые поля страницы */
  --radius: 18px;
  --maxw: 1280px;
  color-scheme: dark;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
h2 { font-size: clamp(32px, 4.2vw, 48px); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding-top: clamp(64px, 8vw, 96px); padding-bottom: clamp(48px, 6vw, 80px); }
.section--line { border-top: 1px solid var(--line); }
.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent);
}
.muted { color: var(--text-2); }
.small { font-size: 15px; color: var(--text-3); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.accent { color: var(--accent); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 18px 30px; border-radius: 14px;
  font-weight: 800; font-size: 18px; text-decoration: none; line-height: 1.2;
  background: var(--accent); color: var(--on-accent);
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn--ghost {
  background: transparent; color: var(--text);
  border: 1px solid rgba(242, 245, 247, .35);
  min-height: 46px; padding: 11px 18px; font-size: 15px; font-weight: 700; border-radius: 12px;
}
.link { color: var(--accent); font-weight: 700; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ---------- Шапка ---------- */
.header { position: relative; z-index: 2; }
.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 24px; padding-bottom: 24px; }
.logo { font-weight: 800; font-size: 19px; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.nav { display: flex; gap: 32px; font-size: 15px; font-weight: 500; }
.nav a { color: var(--text-3); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

/* ---------- Первый экран: здесь и только здесь фирменные свечения ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(560px 560px at 0% 55%, rgba(var(--glow-teal), .5), transparent 70%),
    radial-gradient(700px 700px at 100% 0%, rgba(var(--glow-blue), .75), transparent 70%),
    radial-gradient(480px 480px at 72% 60%, rgba(var(--glow-green), .4), transparent 70%);
}
.hero::after { /* лёгкое «зерно», как на обложках */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("../img/grain.png"); background-size: 200px 200px;
}
.hero__body { position: relative; z-index: 1; display: grid; grid-template-columns: 7fr 5fr; gap: 24px; align-items: end; }
.hero__text { display: flex; flex-direction: column; gap: 28px; padding: 32px 0 80px; align-self: center; }
.hero h1 { font-size: clamp(38px, 5.2vw, 66px); line-height: 1.02; letter-spacing: -0.035em; }
.hero__lead { font-size: 20px; color: var(--text-2); max-width: 580px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }
.hero__photo { display: flex; justify-content: center; align-items: flex-end; height: 100%; }
.hero__photo img { height: min(700px, 62vw); width: auto; }
.hero__price { font-size: 16px; color: var(--text-2); }
.hero__price b { font-size: 22px; color: var(--text); font-weight: 800; }

/* ---------- Цифры ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 32px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__num { font-weight: 800; font-size: clamp(36px, 4vw, 48px); letter-spacing: -0.03em; line-height: 1.1; }
.stat__label { font-size: 15px; color: var(--text-3); padding-top: 4px; }

/* ---------- Видео ---------- */
.video {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden; background: #0E0F10;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video--vertical { aspect-ratio: 9 / 16; max-height: 560px; margin-left: auto; margin-right: auto; }
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 24px 48px; align-items: center; }
.split--rev { grid-template-columns: 7fr 5fr; }

/* ---------- Карточки ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.card { background: var(--card); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.card--outline { background: transparent; border: 1px solid var(--line); }
.card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.card__title { font-weight: 800; font-size: 26px; letter-spacing: -0.02em; line-height: 1.15; }
.card__tag { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 14px; color: var(--text-3); }
.card__tag--accent { color: var(--accent); }
.card p { font-size: 17px; color: var(--text-2); }
.card .link { margin-top: auto; padding-top: 8px; }
.label { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }

/* ---------- Обо мне ---------- */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: 24px 48px; }
.about__text { display: flex; flex-direction: column; gap: 20px; color: var(--text-2); padding-top: 44px; }
.carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3);
  gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-top: 48px;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel img { width: 100%; height: 300px; object-fit: cover; border-radius: var(--radius); scroll-snap-align: start; }
.facts { display: flex; flex-wrap: wrap; gap: 16px 48px; align-items: baseline; margin-top: 28px; }
.facts b { font-weight: 800; font-size: 40px; letter-spacing: -0.03em; }
.facts span { color: var(--text-3); padding-left: 10px; }
.certs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 20px; }
.cert { background: var(--card); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; font-size: 15px; line-height: 1.4; }
.cert img { height: 190px; width: 100%; object-fit: contain; border-radius: 10px; background: #fff; padding: 6px; }

/* ---------- Кейсы ---------- */
.case { background: var(--card); border-radius: var(--radius); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: transform .15s ease; }
.case:hover { transform: translateY(-2px); }
.case img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.case__body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 8px; }
.case__title { font-weight: 800; font-size: 22px; letter-spacing: -0.01em; }
.case__text { font-size: 16px; color: var(--text-2); }

/* ---------- Списки с галочкой ---------- */
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; font-size: 19px; }
.checks li { display: flex; gap: 14px; align-items: flex-start; }
.checks li::before {
  content: ""; flex: 0 0 22px; height: 22px; margin-top: 3px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.plain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; font-size: 17px; color: var(--text-2); }

/* ---------- Шаги цикла ---------- */
.step { background: var(--card); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.step__num { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 14px; color: var(--accent); }
.step__title { font-weight: 800; font-size: 20px; line-height: 1.2; }
.step p { font-size: 15px; color: var(--text-2); }

/* ---------- Цена ---------- */
.price { font-weight: 800; font-size: clamp(44px, 6vw, 64px); letter-spacing: -0.04em; line-height: 1.1; }
.price span { font-size: 28px; color: var(--text-3); letter-spacing: -0.01em; }

/* ---------- Подвал ---------- */
.footer { background: var(--bg-deep); border-top: 1px solid var(--line); padding: 80px 0 40px; }
.footer__cta { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-bottom: 48px; }
.social { text-decoration: none; background: var(--card); border-radius: 16px; padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; transition: transform .15s ease; }
.social:hover { transform: translateY(-2px); }
.social b { display: block; font-weight: 800; font-size: 20px; }
.social span { font-size: 14px; color: var(--text-3); }
.social i { font-style: normal; color: var(--accent); font-size: 22px; font-weight: 800; }
.legal { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; font-size: 14px; color: var(--text-3); border-top: 1px solid var(--line); padding-top: 24px; margin-top: 48px; }
.legal a { color: var(--text-3); }
.legal--solo { margin-top: 0; padding-top: 24px; padding-bottom: 32px; }

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 1024px) {
  .nav { display: none; }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .certs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  body { font-size: 17px; }
  .hero__body { grid-template-columns: 1fr; }
  .hero__text { padding-bottom: 24px; }
  .hero__lead { font-size: 18px; }
  .hero__photo img { height: 380px; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 24px 16px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .split, .split--rev, .about { grid-template-columns: 1fr; }
  .about__text { padding-top: 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: 1fr 1fr; }
  .carousel { grid-auto-columns: 82%; }
  .card { padding: 24px; }
  .card__title { font-size: 22px; }
  .checks { font-size: 17px; }
  .facts b { font-size: 32px; }
}
@media (max-width: 480px) {
  .header .btn--ghost { padding: 10px 14px; font-size: 14px; }
  .logo { font-size: 17px; }
  .btn { width: 100%; }
  .hero__actions .link { width: 100%; text-align: center; }
  .grid-5 { grid-template-columns: 1fr; }
  .certs { grid-template-columns: 1fr; }
  .price span { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Кнопки карусели ---------- */
.carousel-nav { margin-left: auto; display: flex; gap: 8px; }
.carousel-nav button {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-size: 20px; cursor: pointer;
}
.carousel-nav button:hover { border-color: var(--accent); color: var(--accent); }

/* На телефоне в блоке диагностики видео-отзыв идёт первым, а страница заканчивается кнопкой */
@media (max-width: 860px) {
  #start .split--rev > .stack:last-child { order: -1; }
}

/* ---------- Уведомление о cookie (создаётся в assets/js/metrika.js) ---------- */
.cookie {
  position: fixed; z-index: 50; left: 16px; right: 16px; bottom: 16px;
  max-width: 560px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 20px; display: flex; align-items: center; gap: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.cookie p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.cookie a { color: var(--accent); }
.cookie button {
  flex: 0 0 auto; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 12px;
  background: var(--accent); color: var(--on-accent); font: inherit; font-size: 15px; font-weight: 800; cursor: pointer;
}
@media (max-width: 480px) { .cookie { flex-direction: column; align-items: stretch; } }

/* ---------- Текстовые страницы (политика конфиденциальности) ---------- */
.doc { max-width: 760px; }
.doc h1 { font-size: clamp(32px, 4.2vw, 44px); margin-bottom: 24px; }
.doc h2 { font-size: 24px; margin: 36px 0 12px; }
.doc p, .doc li { color: var(--text-2); font-size: 17px; }
.doc ul { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.doc a { color: var(--accent); }
