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

:root, [data-theme="dark"] {
  --bg: #0f0c18;
  --card: #171326;
  --card2: #1d1830;
  --line: #2c2542;
  --line2: #3a3154;
  --text: #edeaf7;
  --muted: #9b93b2;
  --accent: #a678ff;
  --accent-strong: #8b5cf6;
  --accent-deep: #6d3ef0;
  --accent-soft: rgba(166,120,255,.12);
  --accent-border: rgba(166,120,255,.42);
  --link: #b9a1ff;
  --top-bg: rgba(15,12,24,.88);
  --hero-glow: rgba(141,95,246,.18);
  --badge-text: #231a3a;
  --modal-bg: rgba(8,6,15,.78);
}

[data-theme="light"] {
  --bg: #f7f5fc;
  --card: #ffffff;
  --card2: #f0edf8;
  --line: #e2dcf0;
  --line2: #cdc3e6;
  --text: #1f1a33;
  --muted: #5d5573;
  --accent: #7c4dff;
  --accent-strong: #8b5cf6;
  --accent-deep: #6d3ef0;
  --accent-soft: rgba(124,77,255,.1);
  --accent-border: rgba(124,77,255,.35);
  --link: #6d3ef0;
  --top-bg: rgba(247,245,252,.9);
  --hero-glow: rgba(124,77,255,.12);
  --badge-text: #3a2f5e;
  --modal-bg: rgba(60,50,90,.5);
  color-scheme: light;
}

html:has([data-theme="light"]) { color-scheme: light; }

html { scroll-behavior: smooth; }

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

a { color: var(--link); text-decoration: none; }

/* ===== Header ===== */
.top {
  position: sticky; top: 0; z-index: 50;
  background: var(--top-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar {
  max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: center;
  gap: 14px; padding: 9px 5%; font-size: 13px; flex-wrap: wrap;
}
.topbar__text { color: var(--muted); }
.topbar__link {
  color: var(--accent); font-weight: 700;
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  padding: 3px 12px; border-radius: 999px; transition: .2s;
}
.topbar__link:hover { background: var(--accent); color: #fff; }

.topbar-inner {
  max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px;
  padding: 13px 5% 12px;
}

.brand-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; }
.brand__name { line-height: 1.1; white-space: nowrap; }
.logo {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  border-radius: 10px; color: #fff; font-weight: 800; box-shadow: 0 2px 10px rgba(141,95,246,.35);
}
.header__phone { color: var(--text) !important; font-weight: 800; white-space: nowrap; text-decoration: none; font-size: 18px; }
.header__phone:hover { color: var(--accent) !important; }

nav { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
nav a:not(.btn) { color: var(--muted); transition: color .2s; }
nav a:not(.btn):hover { color: var(--text); }
.nav__phone { color: var(--text) !important; font-weight: 700; }

.theme-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid var(--line2); color: var(--text);
  border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: .2s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .theme-toggle__icon { font-size: 15px; line-height: 1; }
@media (max-width: 1050px) {
  .theme-toggle { padding: 7px 11px; }
  .theme-toggle .theme-toggle__label { display: none; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-block; padding: 11px 22px; border-radius: 12px;
  font-weight: 600; border: 1px solid transparent; cursor: pointer; transition: .2s;
  font-family: inherit; font-size: 15px;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; box-shadow: 0 4px 14px rgba(141,95,246,.35);
}
.btn--primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn--ghost { border-color: var(--line2); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--full { width: 100%; font-size: 16px; padding: 14px; }
.only-mobile { display: none; }

/* ===== Hero ===== */
.hero {
  position: relative; max-width: 1100px; margin: 0 auto; padding: 90px 5% 64px; text-align: center;
}
.hero::before {
  content: ""; position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: 720px; height: 380px; background: radial-gradient(closest-side, var(--hero-glow), transparent);
  pointer-events: none;
}
.hero h1 { position: relative; font-size: clamp(30px, 5vw, 52px); line-height: 1.12; }
.hero h1 span { color: var(--accent); }
.hero__badges { position: relative; margin-bottom: 22px; display: flex; gap: 10px; justify-content: center; }
.badge-partner {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid rgba(255,255,255,.9);
  color: var(--badge-text); padding: 6px 16px 6px 8px; border-radius: 999px; font-size: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  cursor: pointer;
}
.badge-partner:hover { box-shadow: 0 6px 22px rgba(166,120,255,.35); transform: translateY(-1px); }
.badge-partner img { height: 22px; width: auto; }
.badge-partner b { font-weight: 800; letter-spacing: .2px; }
.hero__sub { position: relative; max-width: 640px; margin: 22px auto 0; color: var(--muted); font-size: 18px; }
.hero__cta { position: relative; margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__facts {
  position: relative; margin-top: 42px; list-style: none; display: flex; gap: 14px 26px;
  justify-content: center; flex-wrap: wrap; color: var(--muted); font-size: 14px;
}
.hero__facts li { display: flex; align-items: center; gap: 7px; }
.hero__facts li::before {
  content: "✓"; width: 18px; height: 18px; flex: none; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  color: var(--accent); border-radius: 50%; font-size: 12px; font-weight: 800;
}

/* ===== Sections ===== */
.section { max-width: 1100px; margin: 0 auto; padding: 72px 5%; }
.section h2 { font-size: 30px; margin-bottom: 30px; line-height: 1.2; }
.section--alt { max-width: none; padding: 72px 0; background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 5%; }

/* ===== Cards (услуги) ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 16px; }
.card {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  transition: .2s;
}
.card:hover { transform: translateY(-2px); border-color: var(--line2); }
.card--hot { border-color: var(--accent-border); box-shadow: 0 0 0 1px var(--accent-soft); }
.card h3 { margin-bottom: 10px; font-size: 18px; }
.card p { color: var(--muted); font-size: 14px; min-height: 60px; }
.card__tag {
  display: inline-block; margin-top: 16px; padding: 5px 12px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  color: var(--accent); font-weight: 700; font-size: 13px;
}

/* ===== Реестры ===== */
.registry { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.registry-card {
  display: flex; gap: 16px; align-items: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  color: var(--text); transition: .2s;
}
.registry-card:hover { border-color: var(--accent-border); transform: translateY(-2px); }
.registry-card__img {
  width: 64px; height: 64px; flex: none; display: grid; place-items: center;
  background: #fff; border-radius: 14px; padding: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.registry-card__img img { width: 100%; height: 100%; object-fit: contain; }
.registry-card__body { min-width: 0; }
.registry-card__body b { font-size: 17px; display: block; }
.registry-card__body p { color: var(--muted); font-size: 14px; margin: 7px 0 12px; }
.registry-card__go {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent); font-style: normal; font-weight: 700; font-size: 14px;
}
.registry-card__go::after { content: "→"; transition: transform .2s; }
.registry-card:hover .registry-card__go::after { transform: translateX(4px); }

/* ===== Цены ===== */
.pricegrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 18px; margin-bottom: 34px;
}
.pricecard {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line); border-radius: 16px; padding: 24px; text-align: center;
  transition: .2s;
}
.pricecard:hover { border-color: var(--line2); transform: translateY(-2px); }
.pricecard--hot { border-color: var(--accent-border); box-shadow: 0 0 0 1px var(--accent-soft); }
.pricecard h3 { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 12px; }
.pricecard__price {
  font-size: 30px; font-weight: 800; color: var(--accent); line-height: 1.1;
}
.pricecard__price small { font-size: 16px; color: var(--muted); font-weight: 600; }
.pricecard__note { margin-top: 10px; color: var(--muted); font-size: 14px; }

.pricetable { width: 100%; border-collapse: collapse; }
.pricetable th, .pricetable td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.pricetable th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.pricetable td { font-size: 15px; }
.pricetable td:last-child { color: var(--muted); }
.hint { margin-top: 18px; color: var(--muted); font-size: 14px; }

/* ===== Бренды ===== */
.brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.brand-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 10px 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; transition: .2s;
}
.brand-tile img { width: 64px; height: 44px; object-fit: contain; }
.brand-tile span { color: var(--text); font-size: 15px; font-weight: 600; }
.brand-tile:hover { border-color: var(--accent-border); transform: translateY(-2px); }
.brand-tile:hover span { color: var(--accent); }

/* ===== FAQ ===== */
.faq { max-width: 760px; margin: 0 auto; }
.faq__item {
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  margin-bottom: 12px; overflow: hidden; transition: border-color .2s;
}
.faq__item[open] { border-color: var(--accent-border); }
.faq__item summary {
  cursor: pointer; padding: 17px 22px; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: 16px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; width: 26px; height: 26px; flex: none; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  color: var(--accent); border-radius: 50%; font-size: 18px; line-height: 1; transition: .2s;
}
.faq__item[open] summary::after { content: "–"; background: var(--accent); color: #fff; }
.faq__item p { padding: 0 22px 18px; color: var(--muted); font-size: 15px; }

/* ===== Шаги ===== */
.steps { max-width: 640px; margin: 0 auto; counter-reset: step; }
.steps li { list-style: none; counter-increment: step; padding: 13px 0 13px 54px; position: relative; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 13px;
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; font-weight: 800; box-shadow: 0 2px 8px rgba(141,95,246,.3);
}

/* ===== Telegram-промо ===== */
.tg-promo {
  position: relative; display: inline-flex; align-items: center; gap: 11px;
  margin-top: 26px; padding: 14px 22px; border-radius: 14px;
  background: linear-gradient(135deg, #2AABEE, #229ED9);
  color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; line-height: 1.3;
  box-shadow: 0 6px 20px rgba(34,158,217,.4); transition: .2s; text-align: left;
}
.tg-promo:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(34,158,217,.5); filter: brightness(1.06); }
.tg-promo svg { width: 26px; height: 26px; flex: none; fill: #fff; }
.tg-promo span { max-width: 380px; }

/* ===== Модалка аттестата ===== */
.attestmodal {
  position: fixed; inset: 0; z-index: 100; background: var(--modal-bg);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.attestmodal[aria-hidden="false"] { opacity: 1; pointer-events: auto; }
.attestmodal__box {
  position: relative; max-width: 600px; width: 100%; max-height: 90vh; overflow: auto;
  background: var(--card); border: 1px solid var(--line2); border-radius: 18px; padding: 26px;
}
.attestmodal__photo {
  width: 100%; max-height: 56vh; object-fit: contain; display: block;
  background: #fff; border-radius: 12px; padding: 8px; margin-bottom: 16px;
}
.attestmodal__box p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.attestmodal__close {
  position: absolute; top: 12px; right: 16px; z-index: 2;
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  color: var(--accent); width: 34px; height: 34px; border-radius: 50%;
  font-size: 20px; cursor: pointer; line-height: 1; transition: .2s;
}
.attestmodal__close:hover { background: var(--accent); color: #fff; }

/* ===== Футер ===== */
.footer { text-align: center; color: var(--muted); padding: 34px 5% 50px; border-top: 1px solid var(--line); }
.footer__small { font-size: 13px; margin-top: 6px; }

/* ===== Адаптив ===== */
@media (max-width: 1020px) {
  nav { justify-content: center; }
}
@media (max-width: 820px) {
  nav { gap: 14px; }
  nav a:not(.btn) { display: none; }
  .only-mobile { display: inline-block; }
  .brand-row { justify-content: center; }
  .hero { padding-top: 56px; }
  .section { padding-top: 52px; padding-bottom: 52px; }
  .section--alt { padding-top: 52px; padding-bottom: 52px; }
  .step { font-size: 15px; }
  .btn { min-height: 44px; display: inline-flex; align-items: center; }
  .theme-toggle { min-height: 44px; min-width: 44px; justify-content: center; }
}
/* Таблица цен в карточки на узких экранах */
@media (max-width: 640px) {
  .pricetable, .pricetable tbody, .pricetable tr, .pricetable td { display: block; width: 100%; }
  .pricetable thead { display: none; }
  .pricetable tr {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 10px;
  }
  .pricetable td { border-bottom: none; padding: 2px 0; font-size: 14px; }
  .pricetable td:first-child { font-weight: 700; font-size: 15px; }
  .pricetable td:nth-child(2) { color: var(--accent); font-weight: 700; }
}