/* ===== Tokens ===== */
:root {
  --bg:        #0a0e1a;
  --bg-alt:    #0d1322;
  --surface:   #121a2e;
  --surface-2: #16203a;
  --line:      rgba(255,255,255,.08);
  --line-2:    rgba(255,255,255,.14);
  --text:      #eaf0fb;
  --muted:     #93a0bd;
  --muted-2:   #6c7896;

  /* Brand: голубой + красный (из логотипа) */
  --accent:    #2bb6f0;   /* голубой */
  --accent-2:  #3a86ff;   /* синий   */
  --accent-grad: linear-gradient(120deg, #2bb6f0, #3a86ff);
  --red:       #ff5a4d;   /* красный (дом) */
  --red-2:     #ff3b3b;
  --red-grad:  linear-gradient(120deg, #ff6a5d, #ff3b3b);

  --accent-rgb: 43,182,240;
  --red-rgb:    255,90,77;

  --shadow:    0 24px 60px -20px rgba(0,0,0,.6);
  --radius:    18px;
  --radius-sm: 12px;
  --maxw:      1160px;
  --ease:      cubic-bezier(.22,.61,.36,1);
}

/* ===== Reset ===== */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
h1,h2,h3,h4 { line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 700; font-size: 15px; line-height: 1;
  padding: 14px 24px; border-radius: 999px; cursor: pointer; border: 0;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .25s, opacity .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn--lg { padding: 17px 30px; font-size: 16px; }
.btn--block { width: 100%; }

.btn--primary {
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 10px 30px -8px rgba(var(--accent-rgb),.55);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -8px rgba(var(--accent-rgb),.7); }

.btn--ghost {
  background: rgba(255,255,255,.04); color: var(--text);
  border: 1px solid var(--line-2);
}
.btn--ghost:hover { background: rgba(255,255,255,.08); border-color: var(--accent); color: #fff; transform: translateY(-2px); }

.btn--wa { background: #1fae54; color: #fff; }
.btn--wa:hover { background: #25c463; transform: translateY(-2px); }
.btn--tg { background: #2aa3e0; color: #fff; }
.btn--tg:hover { background: #34b3f1; transform: translateY(-2px); }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10,14,26,.6);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.header.is-scrolled {
  background: rgba(10,14,26,.85);
  border-bottom-color: var(--line);
}
.header__inner { display: flex; align-items: center; gap: 28px; height: 72px; }

.logo { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; }
.logo__img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(var(--red-rgb),.3)); }
.logo__text { font-size: 19px; letter-spacing: -.02em; line-height: 1.05; }
.logo__text span { color: var(--accent); }

.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--muted); font-weight: 600; font-size: 15px; position: relative; transition: color .2s; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent-grad); transition: width .25s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 100%; }

.header__actions { display: flex; align-items: center; gap: 18px; }
.header__phone { font-weight: 700; font-size: 15px; color: var(--text); transition: color .2s; }
.header__phone:hover { color: var(--accent); }

.burger { display: none; background: none; border: 0; width: 42px; height: 42px; cursor: pointer; padding: 10px; margin-left: auto; }
.burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: .3s var(--ease); }
.burger span + span { margin-top: 5px; }
.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 ===== */
.hero { position: relative; padding: 96px 0 92px; overflow: hidden; }
.hero__glow {
  position: absolute; inset: -20% 0 auto; height: 720px; z-index: 0;
  background:
    radial-gradient(620px 420px at 18% 12%, rgba(var(--accent-rgb),.22), transparent 65%),
    radial-gradient(680px 460px at 88% 0%, rgba(var(--red-rgb),.20), transparent 60%);
  pointer-events: none;
}
.hero__grid {
  position: absolute; inset: 0; z-index: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
.hero__inner { position: relative; z-index: 1; max-width: 820px; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 26px;
}
.badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(var(--red-rgb),.18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(var(--red-rgb),0); } }

.hero__title { font-size: clamp(2.4rem, 6vw, 4.1rem); margin-bottom: 22px; }
.accent { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--muted); max-width: 620px; margin-bottom: 36px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 56px; }

.hero__stats { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__stats li {
  flex: 1; min-width: 150px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px;
}
.hero__stats b { display: block; font-size: 1.9rem; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__stats span { color: var(--muted); font-size: 14px; }

/* ===== Sections ===== */
.section { padding: 92px 0; position: relative; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { max-width: 700px; margin: 0 auto 52px; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.section__title { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.section__sub { color: var(--muted); margin-top: 16px; font-size: 1.08rem; }

/* ===== Cards grid ===== */
.cards { display: grid; gap: 20px; }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  background: linear-gradient(180deg, var(--surface), var(--bg-alt));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.card__ico {
  font-size: 26px; width: 54px; height: 54px; display: grid; place-items: center;
  background: rgba(var(--accent-rgb),.1); border: 1px solid rgba(var(--accent-rgb),.22);
  border-radius: 14px; margin-bottom: 18px;
}
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .98rem; }

.card--feature:hover, .card--problem:hover {
  transform: translateY(-5px);
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}
/* проблемы — красный акцент */
.card--problem .card__ico { background: rgba(var(--red-rgb),.1); border-color: rgba(var(--red-rgb),.25); }
.card--problem:hover { border-color: rgba(var(--red-rgb),.4); }
.card--feature-accent { border-color: rgba(var(--accent-rgb),.35); background: linear-gradient(180deg, rgba(var(--accent-rgb),.08), var(--bg-alt)); }

/* ===== Advantages ===== */
.adv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.adv__item { padding: 26px 0; border-top: 2px solid var(--line); }
.adv__num { font-size: .9rem; font-weight: 800; letter-spacing: .1em; color: var(--accent); }
.adv__item h3 { font-size: 1.15rem; margin: 14px 0 8px; }
.adv__item p { color: var(--muted); font-size: .98rem; }

/* ===== Tiers ===== */
.tier { display: flex; flex-direction: column; padding: 24px 24px 28px; }
.tier__media {
  margin: -4px -4px 22px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #eef3fb);
  border: 1px solid var(--line);
  height: 180px; display: grid; place-items: center; padding: 14px;
}
/* белый фон PNG «растворяется» в светлой панели */
.tier__media img { max-height: 152px; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.tier__name { font-size: 1.35rem; font-weight: 700; padding: 0 4px; }
.tier__name span { color: var(--accent); }
.tier__for { color: var(--muted); font-size: .95rem; margin: 6px 4px 22px; }
.tier__list { display: grid; gap: 12px; margin: 0 4px 28px; flex: 1; }
.tier__list li { position: relative; padding-left: 28px; color: var(--text); font-size: .98rem; }
.tier__list li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px;
  background: var(--accent-grad); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6L9 17l-5-5' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%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'%3E%3Cpath d='M20 6L9 17l-5-5' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
.tier .btn--block { margin: 0 4px; width: calc(100% - 8px); }
.tier--featured {
  border-color: rgba(var(--red-rgb),.45);
  background: linear-gradient(180deg, rgba(var(--red-rgb),.08), var(--surface));
  box-shadow: 0 24px 60px -28px rgba(var(--red-rgb),.45);
}
.tier__tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%); z-index: 2;
  background: var(--red-grad); color: #fff; font-size: 12px; font-weight: 800;
  padding: 6px 16px; border-radius: 999px; letter-spacing: .03em;
  box-shadow: 0 6px 16px -4px rgba(var(--red-rgb),.6);
}

/* ===== Steps ===== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
}
.step__n {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: var(--accent-grad); color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 16px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .96rem; }

/* ===== Reviews ===== */
.review {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px; gap: 0;
}
.review__media {
  margin: -4px -4px 22px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); aspect-ratio: 4 / 3; background: #0b1020;
}
.review__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.review__stars { color: #ffc857; letter-spacing: 3px; margin-bottom: 16px; }
.review blockquote { font-size: 1.12rem; line-height: 1.65; margin-bottom: 22px; }
.review figcaption { display: flex; flex-direction: column; margin-top: auto; }
.review__name { font-weight: 700; }
.review__meta { color: var(--muted); font-size: .9rem; }

/* ===== CTA ===== */
.cta { position: relative; padding: 96px 0; text-align: center; overflow: hidden; background: var(--bg-alt); border-top: 1px solid var(--line); }
.cta__glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(600px 320px at 50% 0%, rgba(var(--accent-rgb),.22), transparent 65%),
              radial-gradient(520px 300px at 50% 100%, rgba(var(--red-rgb),.16), transparent 70%);
}
.cta__inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.cta__title { font-size: clamp(1.8rem, 4.5vw, 2.7rem); margin-bottom: 18px; }
.cta__sub { color: var(--muted); font-size: 1.1rem; margin-bottom: 34px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.cta__note { color: var(--muted-2); font-size: .9rem; margin-top: 20px; }

/* ===== Footer ===== */
.footer { background: var(--bg); border-top: 1px solid var(--line); padding: 60px 0 30px; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer__col h4 { font-size: 1rem; margin-bottom: 16px; }
.footer__col p, .footer__col a { color: var(--muted); font-size: .95rem; display: block; }
.footer__col a:hover { color: var(--accent); }
.footer__col a + p, .footer__col p + a { margin-top: 12px; }
.logo--footer { margin-bottom: 14px; }
.footer__tag { color: var(--muted); font-size: .95rem; max-width: 260px; }
.footer__bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: .88rem; }

/* ===== Floating button ===== */
.fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%; display: none;
  align-items: center; justify-content: center; color: #fff;
  background: var(--red-grad); box-shadow: 0 12px 30px -6px rgba(var(--red-rgb),.6);
}
.fab:active { transform: scale(.94); }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
/* ——— Десктоп поменьше / большой планшет (≤1024px) ——— */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  .section, .hero, .cta { padding: 80px 0; }
  .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .adv { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .footer__inner { grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
}

/* ——— Планшет (≤860px): меню в бургер, сетки в 2 колонки ——— */
@media (max-width: 860px) {
  .nav, .header__actions { display: none; }
  .burger { display: block; }

  /* Раскрытое мобильное меню — в нормальном потоке, без магических отступов */
  .header.nav-open .header__inner { flex-wrap: wrap; height: auto; row-gap: 4px; padding-bottom: 14px; }
  .header.nav-open .logo { order: 1; }
  .header.nav-open .burger { order: 2; }
  .header.nav-open .nav,
  .header.nav-open .header__actions { display: flex; flex-direction: column; width: 100%; }
  .header.nav-open .nav { order: 3; margin: 6px 0 0; gap: 0; border-top: 1px solid var(--line); }
  .header.nav-open .nav a { padding: 13px 2px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .header.nav-open .nav a::after { display: none; }
  .header.nav-open .header__actions { order: 4; align-items: stretch; gap: 12px; padding-top: 14px; }
  .header.nav-open .header__phone { text-align: center; }
  .header.nav-open .btn--sm { padding: 14px; }

  .cards--3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }

  .fab { display: flex; }
}

/* ——— Телефон (≤640px): всё в одну колонку ——— */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section, .hero, .cta { padding: 60px 0; }
  .cards--2, .cards--3, .cards--4, .tiers { grid-template-columns: 1fr; }
  .adv, .steps { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .hero__cta .btn, .cta__actions .btn { width: 100%; }
  .hero { padding-top: 72px; }
  .review { padding: 24px; }
  .tier__media { height: 200px; }
}

/* ——— Узкий телефон (≤400px) ——— */
@media (max-width: 400px) {
  .hero__stats { flex-direction: column; }
  .hero__stats li { width: 100%; }
  .logo__text { font-size: 17px; }
  .section__title { font-size: 1.55rem; }
}

/* ===== Rich animations ===== */
/* Появление hero по очереди */
.hero .badge, .hero__title, .hero__lead, .hero__cta { opacity: 0; animation: heroIn .75s var(--ease) both; }
.hero .badge { animation-delay: .05s; }
.hero__title { animation-delay: .16s; }
.hero__lead  { animation-delay: .30s; }
.hero__cta   { animation-delay: .42s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* Медленный дрейф свечения в hero */
.hero__glow { animation: aurora 18s ease-in-out infinite alternate; will-change: transform; }
@keyframes aurora {
  0%   { transform: translate3d(-2%, 0, 0) scale(1); }
  100% { transform: translate3d(3%, 1.5%, 0) scale(1.1); }
}

/* Перелив градиента в акцентном тексте и цифрах */
.accent, .hero__stats b { background-size: 220% 100%; animation: shimmer 7s linear infinite; }
@keyframes shimmer { to { background-position: 220% 0; } }

/* Блик по главной кнопке при наведении */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after {
  content: ""; position: absolute; top: 0; left: -160%; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent);
  transform: skewX(-20deg); pointer-events: none;
}
.btn--primary:hover::after { animation: sheen .95s ease; }
@keyframes sheen { to { left: 160%; } }

/* Цветное свечение карточек при наведении */
.card--feature:hover { box-shadow: var(--shadow), 0 0 0 1px rgba(var(--accent-rgb),.22), 0 18px 50px -24px rgba(var(--accent-rgb),.45); }
.card--problem:hover { box-shadow: var(--shadow), 0 0 0 1px rgba(var(--red-rgb),.22), 0 18px 50px -24px rgba(var(--red-rgb),.45); }

/* Парящая иконка тарифа + пульс выделенного тарифа */
.tier__media img { animation: floaty 4.5s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-7px); } }
.tier--featured { animation: glowPulse 3.6s ease-in-out infinite; }
@keyframes glowPulse {
  0%,100% { box-shadow: 0 24px 60px -28px rgba(var(--red-rgb),.45); }
  50%     { box-shadow: 0 28px 72px -26px rgba(var(--red-rgb),.65); }
}

/* Активная ссылка в меню (скроллспай) */
.nav a.is-active { color: var(--text); }
.nav a.is-active::after { width: 100%; }

/* Пульс плавающей кнопки звонка */
.fab { animation: fabPulse 2.6s ease-out infinite; }
@keyframes fabPulse {
  0%       { box-shadow: 0 12px 30px -6px rgba(var(--red-rgb),.6), 0 0 0 0 rgba(var(--red-rgb),.45); }
  70%,100% { box-shadow: 0 12px 30px -6px rgba(var(--red-rgb),.6), 0 0 0 18px rgba(var(--red-rgb),0); }
}

/* Живые шаги процесса */
.step { transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.step:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow); }
.step__n { transition: transform .35s var(--ease); }
.step:hover .step__n { transform: scale(1.08) rotate(-4deg); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .hero .badge, .hero__title, .hero__lead, .hero__cta { opacity: 1 !important; }
}
