@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #121212;
  --bg-soft: #191919;
  --card-bg: #1e1e1e;
  --card-border: rgba(255,255,255,0.08);
  --text: #f5f5f7;
  --text-dim: #a6a6b0;
  --text-dimmer: #6c6c76;
  --red: #e6321f;
  --red-dark: #b82616;
  --red-glow: rgba(230, 50, 31, 0.35);
  --red-soft: rgba(230, 50, 31, 0.12);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-full: 999px;
  --font-display: 'Unbounded', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --container: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- шапка ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 22px 32px;
  display: flex;
  justify-content: center;
  background: rgba(10, 10, 12, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.topbar-inner {
  width: 100%;
  max-width: var(--container);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a {
  font-size: 14px; font-weight: 600; color: var(--text-dim);
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--text); }
.main-nav .nav-cta { padding: 11px 20px; font-size: 13.5px; margin-left: 4px; }

.nav-toggle {
  display: none; width: 38px; height: 38px; flex-shrink: 0;
  background: var(--bg-soft); border: 1px solid var(--card-border); border-radius: 10px;
  color: var(--text); align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
  .main-nav {
    position: fixed; top: 78px; left: 16px; right: 16px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--radius-lg); padding: 10px;
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0s linear 0.2s;
    z-index: 49;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; visibility: visible; transition: transform 0.2s ease, opacity 0.2s ease; }
  .main-nav a { padding: 13px 14px; border-radius: var(--radius-md); }
  .main-nav a:hover { background: var(--bg-soft); }
  .main-nav .nav-cta { margin: 6px 4px 4px; text-align: center; justify-content: center; }
  .nav-toggle { display: flex; }
}

.brand { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand-name span { color: var(--red); }
.brand-tag {
  font-size: 12px;
  color: var(--text-dimmer);
  margin-top: 2px;
}

/* ---- переиспользуемые атомы ---- */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 17px;
  padding: 18px 30px;
  border: 3px solid #f0ebe0;
  border-radius: 8px;
  clip-path: polygon(0 0, 100% 0, 100% 85%, 92% 100%, 0 100%);
  box-shadow: 5px 5px 0 #f0ebe0;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.btn-cta:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 #f0ebe0; }
.btn-cta:active { transform: translate(5px, 5px); box-shadow: 0 0 0 #f0ebe0; }
.btn-cta svg { width: 18px; height: 18px; flex-shrink: 0; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* заголовок секций нигде глобально не уменьшался на мобильном —
   40px на узком экране у длинных заголовков разъезжался почти по
   одному слову в строке. Так же снижаем как .hero-title (48→34 на
   720px, тот же процент). */
@media (max-width: 720px) {
  .section-title { font-size: 28px; line-height: 1.22; }
}
@media (max-width: 400px) {
  .section-title { font-size: 25px; }
}

.fineprint {
  font-size: 13px;
  color: var(--text-dimmer);
  line-height: 1.5;
}

.accent { color: var(--red); }

section { padding: 56px 32px; }
section .wrap { max-width: var(--container); margin: 0 auto; }

/* на мобильном соседние секции складывают padding-bottom+padding-top
   (56+56=112px) на каждом стыке без разделителя — читается как дыра */
@media (max-width: 720px) {
  section { padding: 40px 20px; }
}
@media (max-width: 400px) {
  section { padding: 32px 16px; }
}

/* ---- переиспользуемые стили длинного текста (страницы кейсов/статей) ---- */
.text-list { list-style: none; margin: 0 0 20px; padding: 0; }
.text-list li {
  position: relative; padding-left: 20px; margin-bottom: 10px;
  font-size: 15px; line-height: 1.65; color: var(--text-dim);
}
.text-list li:last-child { margin-bottom: 0; }
.text-list li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--red);
}

/* ---- страница кейса (детальная) ---- */
.case-page { max-width: 780px; margin: 0 auto; padding: 100px 32px 120px; }
.case-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--text-dimmer); margin-bottom: 32px;
}
.case-back:hover { color: var(--text-dim); }
.case-page-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--red); margin-bottom: 14px;
}
.case-page-title {
  font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1.25;
  color: var(--text); margin-bottom: 40px; letter-spacing: -0.01em;
}

.case-detail-content { margin-top: 48px; }
.case-detail-content h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--text);
  margin: 40px 0 16px;
}
.case-detail-content h3:first-child { margin-top: 0; }
.case-detail-content p { font-size: 15.5px; line-height: 1.7; color: var(--text-dim); margin: 0 0 16px; }

.case-page-cta { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--card-border); text-align: center; }
.case-page-cta p { font-size: 15px; color: var(--text-dim); margin-bottom: 20px; }

/* ---- скриншоты-доказательства внутри детального кейса ---- */
.case-proof-wrap { margin: 28px 0 36px; }
.case-proof {
  padding: 10px;
  background: #fdfdfd; border-radius: var(--radius-md); border: 1px solid var(--card-border);
}
.case-proof img { width: 100%; display: block; border-radius: 6px; }
.case-proof-caption {
  margin-top: 10px; font-size: 12.5px; color: var(--text-dimmer); text-align: center;
}

/* ---- слайдер из нескольких скриншотов-доказательств подряд ---- */
.case-slider { margin: 28px 0 36px; }
.case-slider-viewport {
  position: relative; padding: 10px;
  background: #fdfdfd; border-radius: var(--radius-md); border: 1px solid var(--card-border);
}
.case-slider-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none; border-radius: 6px;
}
.case-slider-track::-webkit-scrollbar { display: none; }
.case-slide {
  flex: 0 0 100%; scroll-snap-align: start;
  height: 440px; display: flex; align-items: center; justify-content: center;
}
.case-slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.case-slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; z-index: 2;
  background: rgba(10,8,8,0.7); border: 1px solid var(--card-border); backdrop-filter: blur(4px);
  color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.case-slider-arrow:hover { background: var(--red); border-color: var(--red); }
.case-slider-arrow[disabled] { opacity: 0.25; cursor: default; pointer-events: none; }
.case-slider-arrow.prev { left: 16px; }
.case-slider-arrow.next { right: 16px; }
.case-slider-counter {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  background: rgba(10,8,8,0.7); color: #fff; font-size: 11.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 100px; border: 1px solid var(--card-border);
}
.case-slider .case-proof-caption { margin-top: 10px; min-height: 1.4em; }

@media (max-width: 600px) {
  .case-slide { height: 280px; }
  .case-slider-arrow { width: 32px; height: 32px; }
  .case-slider-arrow.prev { left: 10px; }
  .case-slider-arrow.next { right: 10px; }
}

@media (max-width: 600px) {
  .case-page { padding: 88px 20px 80px; }
  .case-page-title { font-size: 25px; }
}

/* ---- блок "бесплатный разбор" (лид-магнит на страницах кейсов) ---- */
.case-audit {
  margin-top: 56px; padding: 36px 34px;
  background: linear-gradient(150deg, rgba(230,50,31,0.14), rgba(230,50,31,0.03));
  border: 1px solid rgba(230,50,31,0.35); border-radius: var(--radius-lg);
}
.case-audit-badge {
  display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: #ff8f7f; margin-bottom: 14px;
}
.case-audit h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--text);
  margin: 0 0 14px; line-height: 1.3;
}
.case-audit > p { font-size: 15.5px; line-height: 1.6; color: var(--text-dim); margin: 0 0 18px; }
.case-audit .text-list { margin-bottom: 24px; }
.case-audit .text-list li { color: var(--text); }
.case-audit-contacts { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.case-audit-contacts .btn-cta.secondary-contact {
  background: var(--bg-soft); border: 1.5px solid var(--card-border); color: var(--text);
  box-shadow: none;
}
.case-audit-contacts .btn-cta.secondary-contact:hover { border-color: var(--red); }
.case-audit-contacts .btn-cta svg { width: 18px; height: 18px; margin-right: 4px; }
.case-audit-note { width: 100%; font-size: 12px; color: var(--text-dimmer); margin-top: 4px; }

.case-secondary-cta { margin-top: 20px; text-align: center; }
.case-secondary-cta a { font-size: 13.5px; color: var(--text-dimmer); }
.case-secondary-cta a:hover { color: var(--text-dim); }

@media (max-width: 600px) {
  .case-audit { padding: 26px 22px; }
  .case-audit h3 { font-size: 20px; }
}

/* ============ ЗАКРЫВАЮЩАЯ ФРАЗА СТРАНИЦЫ ============
   Последнее, что видит гость перед футером — единственный на всей
   странице момент с градиентным "светящимся" текстом, специально
   больше нигде не повторяется, чтобы остаться настоящим финальным
   акцентом, а не ещё одним приёмом. */
.closing-statement { padding: 44px 32px 12px; text-align: center; }
.closing-statement-lead {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.closing-statement-punch {
  max-width: 720px;
  margin: 0 auto;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, #ff8f7f 0%, var(--red) 50%, #ff6a4d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--red);
  filter: drop-shadow(0 0 26px var(--red-glow));
}
@media (max-width: 720px) {
  .closing-statement-lead { font-size: 15px; }
  .closing-statement-punch { font-size: 23px; }
}

/* ============ FOOTER ============ */
.site-footer { border-top: 1px solid var(--card-border); padding: 44px 32px; margin-top: 40px; }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
.footer-brand { display: flex; flex-direction: column; line-height: 1.15; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 13.5px; color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }
.footer-copy { width: 100%; font-size: 12px; color: var(--text-dimmer); border-top: 1px solid var(--card-border); padding-top: 20px; margin-top: 4px; }

@media (max-width: 700px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ============ ПЛАВАЮЩАЯ КНОПКА СВЯЗИ ============
   Круглый триггер внизу справа, всегда на месте при скролле (и на
   десктопе, и на мобилке). По клику — меню из 3 способов связаться:
   MAX/Telegram — прямые ссылки, "Отправить заявку" — открывает
   тот же .contact-popup, что и остальные CTA-кнопки сайта (см.
   window.openContactPopup в js/main.js). z-index ниже cookie-banner
   (90) и модалок (100/200) — если баннер/попап открыты, кнопка
   спокойно уходит под них, а не спорит за место на экране. */
.float-cta-wrap {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
  transition: bottom 0.25s ease;
}
.float-cta-wrap.above-cookie-banner { bottom: 145px; }
.float-cta-menu {
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
}
.float-cta-wrap.open .float-cta-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.float-cta-option {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  color: var(--text); font-family: var(--font-body); font-weight: 600; font-size: 14px;
  padding: 11px 18px 11px 14px;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.5);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.float-cta-option:hover { border-color: var(--red); transform: translateX(-2px); }
.float-cta-option svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--red); }

.float-cta-toggle {
  width: 58px; height: 58px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  border: 2px solid #f0ebe0; color: #fff; cursor: pointer;
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.float-cta-toggle:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -8px rgba(0, 0, 0, 0.6); }
.float-cta-toggle svg { width: 25px; height: 25px; }
.float-cta-icon-close { display: none; }
.float-cta-wrap.open .float-cta-icon-chat { display: none; }
.float-cta-wrap.open .float-cta-icon-close { display: block; }

@media (max-width: 480px) {
  .float-cta-wrap { right: 14px; bottom: 14px; gap: 10px; }
  .float-cta-wrap.above-cookie-banner { bottom: 260px; }
  .float-cta-toggle { width: 52px; height: 52px; }
  .float-cta-toggle svg { width: 22px; height: 22px; }
  .float-cta-option { font-size: 13px; padding: 10px 16px 10px 12px; }
  .float-cta-option svg { width: 16px; height: 16px; }
}

/* ============ COOKIE BANNER ============ */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90;
  max-width: 720px; margin: 0 auto;
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 20px 24px; box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  transform: translateY(140%); transition: transform 0.3s ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner p { flex: 1 1 320px; font-size: 13px; line-height: 1.55; color: var(--text-dim); margin: 0; }
.cookie-banner a { color: var(--text); text-decoration: underline; }
.cookie-banner button {
  flex-shrink: 0; background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff;
  border: none; border-radius: var(--radius-full); padding: 11px 24px; font-size: 13.5px; font-weight: 700;
  cursor: pointer; font-family: var(--font-body);
}

@media (max-width: 560px) {
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; }
  /* flex: 1 1 320px на .cookie-banner p задавал 320px как preferred-height
     (не width!), как только баннер переключался в column — отсюда
     гигантская пустота между текстом и кнопкой. */
  .cookie-banner p { flex: none; }
  .cookie-banner button { width: 100%; }
}
