/* ===== Токены ===== */
:root {
  --bg: #e6eaf0;
  --surface: #e6eaf0;
  --shadow-dark: #c2c8d2;
  --shadow-light: #ffffff;
  --text: #2b313b;
  --muted: #6b7482;
  --accent: #3d6ef5;
  --accent-2: #5b86ff;
  --accent-text: #ffffff;
  --line: rgba(0, 0, 0, .06);

  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --shadow: 8px 8px 18px var(--shadow-dark), -8px -8px 18px var(--shadow-light);
  --shadow-sm: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
  --shadow-in: inset 5px 5px 10px var(--shadow-dark), inset -5px -5px 10px var(--shadow-light);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #262a31;
    --surface: #262a31;
    --shadow-dark: #1b1e23;
    --shadow-light: #31363f;
    --text: #e4e7ec;
    --muted: #9aa3b0;
    --accent: #5b86ff;
    --accent-2: #7a9dff;
    --line: rgba(255, 255, 255, .06);
  }
}
:root[data-theme="dark"] {
  --bg: #262a31;
  --surface: #262a31;
  --shadow-dark: #1b1e23;
  --shadow-light: #31363f;
  --text: #e4e7ec;
  --muted: #9aa3b0;
  --accent: #5b86ff;
  --accent-2: #7a9dff;
  --line: rgba(255, 255, 255, .06);
}

/* ===== База ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 820px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

/* ===== Неоморфные примитивы ===== */
.neu { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); }
.neu-inset { background: var(--surface); border-radius: var(--r-sm); box-shadow: var(--shadow-in); }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px;
  border: 0; border-radius: var(--r-sm);
  font: 700 15px/1 var(--font); color: var(--text);
  cursor: pointer;
  transition: box-shadow .2s, transform .2s;
}
.btn.neu:hover { box-shadow: var(--shadow-sm); }
.btn.neu:active { box-shadow: var(--shadow-in); }
.btn--accent {
  color: var(--accent-text);
  background: linear-gradient(145deg, var(--accent-2), var(--accent));
  box-shadow: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
}
.btn--accent:hover { transform: translateY(-1px); }
.btn--accent:active { transform: translateY(1px); box-shadow: inset 3px 3px 8px rgba(0,0,0,.2); }

.icon-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: var(--r-sm);
  color: var(--text); cursor: pointer;
  transition: box-shadow .2s;
}
.icon-btn:active { box-shadow: var(--shadow-in); }
.icon-btn svg { width: 20px; height: 20px; }

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

/* ===== Шапка ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  transition: box-shadow .3s, background .3s;
}
.header.is-scrolled { box-shadow: 0 6px 16px -8px var(--shadow-dark); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }

.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 19px; }
.logo__mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: var(--accent); }
.logo__mark svg { width: 20px; height: 20px; }

.nav { display: flex; gap: 6px; }
.nav a {
  padding: 10px 16px; border-radius: 12px;
  font-weight: 600; font-size: 15px; color: var(--muted);
  transition: color .2s, box-shadow .2s;
}
.nav a:hover { color: var(--text); box-shadow: var(--shadow-in); }

.header__actions { display: flex; align-items: center; gap: 12px; }
.header__phone { font-weight: 700; white-space: nowrap; margin-right: 8px; }
.burger { display: none; }

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

@media (max-width: 1020px) {
  .header__phone { display: none; }
}
@media (max-width: 860px) {
  .burger { display: grid; }
  .nav {
    position: absolute; top: 76px; left: 16px; right: 16px;
    flex-direction: column; gap: 4px; padding: 12px;
    background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 14px 16px; }
}

/* ===== Первый экран ===== */
.hero { padding: 56px 0 40px; }
.hero__inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.badge {
  display: inline-block; padding: 8px 16px; margin-bottom: 24px;
  border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--accent);
}
.hero h1 { font-size: clamp(32px, 5vw, 54px); margin-bottom: 20px; }
.lead { font-size: 18px; color: var(--muted); max-width: 540px; margin-bottom: 36px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 16px; }

.hero__visual { position: relative; display: grid; place-items: center; min-height: 380px; }
.device { width: min(100%, 360px); padding: 18px; border-radius: var(--r-lg); }
.device__screen { aspect-ratio: 16 / 10; border-radius: 16px; display: grid; place-items: center; }
.device__screen svg { width: 70%; height: auto; stroke: var(--accent); stroke-width: 2.5; }
.pulse { stroke-dasharray: 200; stroke-dashoffset: 200; animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 50% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -200; } }
.device__stand { width: 18%; height: 34px; margin: 0 auto; background: var(--surface); box-shadow: inset 0 6px 8px -4px var(--shadow-dark); }
.device__base { width: 45%; height: 12px; margin: 0 auto; border-radius: 8px; }

.floating { position: absolute; display: flex; flex-direction: column; padding: 14px 18px; border-radius: 18px; animation: float 6s ease-in-out infinite; }
.floating strong { font-size: 20px; color: var(--accent); }
.floating span { font-size: 12px; color: var(--muted); }
.floating--a { top: 10px; left: 0; }
.floating--b { bottom: 20px; right: 0; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-10px); } }

.stats { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { padding: 24px; display: flex; flex-direction: column; gap: 4px; }
.stat strong { font-size: 26px; font-weight: 800; }
.stat span { font-size: 14px; color: var(--muted); }

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 32px; }
  .hero__visual { min-height: 300px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 480px) {
  .hero { padding-top: 32px; }
  .lead { font-size: 16px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .stat { padding: 18px; }
  .stat strong { font-size: 20px; }
  .floating { padding: 10px 14px; }
  .floating strong { font-size: 16px; }
}

/* ===== Секции ===== */
.section { padding: 72px 0; }
.section__head { text-align: center; max-width: 620px; margin: 0 auto 48px; }
.section__head h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 12px; }
.section__head p { color: var(--muted); }
@media (max-width: 600px) { .section { padding: 48px 0; } .section__head { margin-bottom: 32px; } }

.grid { display: grid; gap: 28px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid--3, .grid--4 { grid-template-columns: 1fr; gap: 20px; } }

/* Карточки услуг */
.card { padding: 32px; transition: transform .25s; }
.card:hover, .card.reveal.is-visible:hover { transform: translateY(-4px); }
.card__icon { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 22px; border-radius: 18px; color: var(--accent); }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }

/* Шаги */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: none; }
.step { padding: 28px; }
.step__num { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 20px; border-radius: 50%; font-weight: 800; font-size: 18px; color: var(--accent); }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; gap: 20px; } }

/* Цены */
.tabs { display: flex; gap: 6px; width: fit-content; max-width: 100%; margin: 0 auto 32px; padding: 6px; border-radius: 18px; overflow-x: auto; }
.tab {
  flex-shrink: 0; padding: 12px 22px; border: 0; border-radius: 13px;
  background: transparent; color: var(--muted);
  font: 700 14px/1 var(--font); cursor: pointer;
  transition: color .2s, box-shadow .2s, background .2s;
}
.tab.is-active { color: var(--accent); background: var(--surface); box-shadow: var(--shadow-sm); }
.price-panel { max-width: 820px; margin: 0 auto; padding: 12px 32px; }
.price-list { list-style: none; margin: 0; padding: 0; }
.price-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.price-list li:last-child { border-bottom: 0; }
.price-list b { white-space: nowrap; font-weight: 700; color: var(--accent); }
@media (max-width: 480px) {
  .price-panel { padding: 8px 20px; }
  .price-list li { flex-direction: column; gap: 2px; }
}

/* Преимущества */
.feature { text-align: center; padding: 8px; }
.feature__icon { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 50%; color: var(--accent); }
.feature__icon svg { width: 28px; height: 28px; }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 14px; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 18px; }
.faq__item { padding: 0 28px; border-radius: var(--r-md); }
.faq__item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0; font-weight: 700; cursor: pointer; list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; flex-shrink: 0; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  box-shadow: var(--shadow-in); color: var(--accent); font-size: 20px; font-weight: 500;
  transition: transform .25s;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { padding: 0 0 22px; color: var(--muted); }
@media (max-width: 480px) { .faq__item { padding: 0 20px; } }

/* Заявка */
.contact { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; padding: 48px; border-radius: var(--r-lg); }
.contact__info h2 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 12px; }
.contact__info > p { color: var(--muted); margin-bottom: 32px; }
.contact__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.contact__list li { display: flex; align-items: center; gap: 14px; font-weight: 600; }
.contact__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--accent); flex-shrink: 0; }
.contact__icon svg { width: 20px; height: 20px; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-content: start; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 700; color: var(--muted); padding-left: 4px; }
.field--full { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  width: 100%; padding: 15px 18px; border: 0; border-radius: var(--r-sm);
  font: 500 15px/1.4 var(--font); color: var(--text);
  outline: none; transition: box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a8494' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 18px;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .6; }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: var(--shadow-in), 0 0 0 2px var(--accent); }
.field.is-invalid input { box-shadow: var(--shadow-in), 0 0 0 2px #e5534b; }
.form__note { font-size: 12px; color: var(--muted); text-align: center; }
.form__status { text-align: center; font-weight: 700; color: var(--accent); min-height: 1em; }
.form__status:empty { display: none; }

@media (max-width: 900px) { .contact { grid-template-columns: 1fr; gap: 36px; padding: 32px; } }
@media (max-width: 520px) {
  .contact { padding: 24px 20px; }
  .form { grid-template-columns: 1fr; }
}

/* Подвал */
.footer { padding: 32px 0 40px; color: var(--muted); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); padding-top: 28px; }
.footer a { font-weight: 700; color: var(--text); }

/* Плавающая кнопка звонка (мобильные) */
.call-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  display: none; place-items: center; width: 58px; height: 58px; border-radius: 50%;
}
.call-fab svg { width: 24px; height: 24px; }
@media (max-width: 860px) { .call-fab { display: grid; } }

/* Появление при скролле */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
