/* ==========================================================================
   Слово CRM — слой вёрстки поверх Tailwind. Цвета/шрифты только через tokens.css.
   ========================================================================== */

/* --- типографика ----------------------------------------------------------- */
body { font-family: var(--font-sans); color: var(--ink); background: var(--bg); }
h1, h2, h3, h4 { font-family: var(--font-heading); text-wrap: balance; }
h1 { font-size: 28px !important; line-height: 1.15 !important; letter-spacing: -0.025em; font-weight: 800; }
@media (min-width: 640px)  { h1 { font-size: 34px !important; } }
@media (min-width: 1280px) {
  h1 { font-size: 40px !important; }
  .hero h1 { width: 720px; }
}
h1 svg { width: 0.8em !important; height: 0.8em !important; margin-left: 0.25em !important; }
.section-title, .simple-section h2 { max-width: 26ch; font-size: clamp(28px, 3vw, 42px); font-weight: 800; line-height: 1.15; letter-spacing: -0.025em; color: var(--ink); text-wrap: balance; }
.section-intro { max-width: 60ch; color: var(--muted); line-height: 1.6; margin: 16px 0 32px; font-size: 17px; text-wrap: pretty; }
.simple-section h3 { font-size: 22px; font-weight: 700; line-height: 1.3; margin-bottom: 12px; }
.card-kicker { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; text-transform: none; }

/* --- секции и контейнер ---------------------------------------------------- */
.legacy-section { display: none !important; }
.simple-section { padding: 64px 24px; scroll-margin-top: 100px; background: var(--bg); color: var(--ink); }
.simple-container { max-width: 1216px; margin: auto; }
#why-switch { background: var(--bg-soft) !important; }
#solar-cta { background: var(--accent) !important; }
.cta-title { font-family: var(--font-heading); font-size: clamp(28px, 3.4vw, 48px); font-weight: 800; line-height: 1.15; letter-spacing: -0.025em; color: var(--ink); }

/* --- кнопки: одна primary, одна secondary, чёрная только в акцентной секции -- */
.btn-hero-dark { font-family: var(--font-sans); }
.btn-primary, .simple-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--ink);
  font-family: var(--font-sans); font-weight: 600; font-size: 16px; line-height: 1.2;
  box-shadow: none; transition: background var(--ease);
}
.btn-primary:hover, .simple-cta:hover { background: var(--accent-hover); color: var(--ink); }
.btn-primary--sm { padding: 12px 22px; font-size: 15px; }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 27px; border-radius: var(--r-pill);
  background: var(--bg); color: var(--ink); border: 1px solid var(--line);
  font-family: var(--font-sans); font-weight: 600; font-size: 16px; line-height: 1.2;
  transition: border-color var(--ease), background var(--ease);
}
.btn-secondary:hover { border-color: var(--ink); background: var(--bg); }
.btn-dark {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 18px 36px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--on-ink);
  font-family: var(--font-sans); font-weight: 600; font-size: 17px; line-height: 1.2;
  transition: background var(--ease);
}
.btn-dark:hover { background: #000; color: var(--on-ink); }
.tg-cta-btn svg, .btn-primary svg { transition: none; transform: none; }
#why-switch a.tg-cta-btn { padding: 10px 0; }

/* --- шапка и навигация ----------------------------------------------------- */
.site-header { padding-top: 12px; padding-bottom: 12px; }
.site-header .logo-scroll-plaque { inset: 0; border-radius: 0; }
.desktop-nav { display: none; }
#mobile-menu { background: var(--bg); border-color: var(--line); }
#mobile-menu { padding-bottom: 20px; }
#mobile-menu a { font-size: 15px; padding: 10px 12px; }

/* --- hero ------------------------------------------------------------------ */
.hero { padding-top: calc(var(--header-h) + 40px); }
@media (min-width: 1024px) { .hero { padding-top: var(--header-h); } }
.integration-chip { background: var(--bg); border: 1px solid var(--line); color: var(--ink); }
.integration-chip svg { color: var(--muted); }
.olive-slider-card { color: var(--ink); }
.slider-dots { gap: 0; padding-left: 8px; }
.slider-dot { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; background: transparent; border: 0; cursor: pointer; }
.slider-dot::before { content: ""; display: block; width: 6px; height: 6px; border-radius: 999px; background: rgba(23,21,14,0.3); transition: width var(--ease), background var(--ease); }
.slider-dot.is-active::before { width: 16px; background: var(--ink); }
.hero-video { display: block; }
.telegram-wallpaper-glass { height: 350px !important; }
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .hero-media { background: url("/assets/main-poster.jpg") center / cover no-repeat; }
}
@media (max-width: 639px) {
  .telegram-wallpaper-glass { height: 350px !important; }
  .hero-secondary { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 6px 0; font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); }
  .hero-secondary svg { display: none; }
}

/* --- три шага -------------------------------------------------------------- */
.setup-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 32px; }
.setup-steps article { padding: 28px; background: var(--bg-soft); border-radius: var(--r-card); }
.step-number { display: inline-block; padding: 8px 12px; border-radius: var(--r-chip); background: var(--accent); font-weight: 700; margin-bottom: 24px; }
.setup-steps p, .direction-card p { color: var(--muted); line-height: 1.7; }

/* --- направления ----------------------------------------------------------- */
.directions-scroller { max-height: 500px; overflow-y: auto; scroll-snap-type: y proximity; border-radius: var(--r-card); scrollbar-width: thin; scrollbar-color: var(--accent) var(--bg-soft); }
.direction-card { min-height: 500px; padding: 32px; display: grid; grid-template-columns: 1fr 1.3fr; align-items: start; gap: 32px; background: var(--bg-soft); scroll-snap-align: start; }
.direction-card > div:first-child { padding-top: 8px; }
.direction-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.direction-images img { width: 100%; height: 436px; object-fit: cover; border-radius: var(--r-photo); }
.directions-hint { margin-top: 12px; color: var(--muted); font-size: 13px; }

/* --- окупаемость ----------------------------------------------------------- */
.compact-roi { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.compact-roi h2 { font-size: clamp(26px, 3vw, 36px); }
.compact-roi label { display: block; margin-bottom: 20px; }
.roi-assumptions { margin-top: 20px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.roi-result { background: var(--bg-soft); padding: 32px; border-radius: var(--r-card); }
.roi-result strong { display: block; font: 800 clamp(32px, 4vw, 48px)/1.3 var(--font-heading); margin: 20px 0; font-variant-numeric: tabular-nums; }
.roi-result p { font-size: 14px; line-height: 1.6; margin-bottom: 24px; color: var(--muted); }

/* --- «вот как напоминания…» ------------------------------------------------ */
.switch-photo { border-radius: var(--r-photo); background: var(--bg-soft); }
.demo-card { border-radius: var(--r-card); }
.banner-frame { margin-top: 40px; border-radius: var(--r-card); border: 1px solid var(--line); }
@media (min-width: 640px) { .banner-frame { margin-top: 56px; } }
#why-switch button:hover { background: var(--accent-hover) !important; }
.footer-icon { transition: background var(--ease), color var(--ease); }
.footer-icon:hover { background: var(--accent); color: var(--ink); }
.dark-section { background: var(--ink) !important; color: var(--on-ink); }
.footer { padding-bottom: 80px; }
.reviews-section .simple-container { position: relative; }
.cta-section { padding-top: 96px; padding-bottom: 96px; }
#why-switch .why-switch-card { border: 0; border-radius: var(--r-card) !important; box-shadow: none; }
#why-switch button { background: var(--accent) !important; color: var(--ink) !important; }
#why-switch .gloss-ios-toggle:not(.is-active) { background: var(--line) !important; }
#why-switch .text-\[\#8B7EF8\] { color: var(--accent-ink) !important; }
.photo-toggles-overlay > div { max-width: 100%; }
.photo-toggles-overlay > div > div { min-width: 0; }
.photo-toggles-overlay > div > div > span { min-width: 0; overflow-wrap: break-word; }

/* --- тарифы ---------------------------------------------------------------- */
.clean-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.clean-plans article { padding: 64px 32px 32px; border-radius: var(--r-card); background: var(--bg-soft); display: flex; flex-direction: column; position: relative; border: 1px solid transparent; transition: border-color var(--ease); }
.clean-plans article:hover, .clean-plans article:focus-within { border-color: var(--accent-ink); }
.clean-plans article > p { color: var(--muted); font-size: 14px; min-height: 24px; }
.clean-price { font-size: 32px; font-weight: 800; margin: 24px 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.clean-price span { font-size: 14px; font-weight: 400; margin-left: 6px; color: var(--muted); }
.clean-plans ul { margin-bottom: 32px; flex: 1; display: grid; gap: 14px; list-style: none; }
.clean-plans li { font-size: 14px; line-height: 1.5; }
.clean-plans li::before { content: '✓'; margin-right: 8px; color: var(--accent-ink); }
.clean-plans .recommended-plan { background: var(--accent-tint); }
.plan-label { position: absolute; top: 24px; left: 32px; display: inline-block; background: var(--accent); padding: 6px 12px; border-radius: var(--r-chip); font-size: 12px; font-weight: 600; }
.pricing-footnote { margin-top: 24px; font-size: 14px; color: var(--muted); line-height: 1.6; }

/* --- примеры ситуаций ------------------------------------------------------ */
.review-tag { font-family: var(--font-sans); font-size: 12px; font-weight: 500; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .marquee-track-row { animation: none !important; } }

/* --- адаптив --------------------------------------------------------------- */
.animate-ping, .animate-pulse, .animate-float, .animate-beam-left, .animate-beam-right { animation: none !important; }
@media (min-width: 768px) and (max-width: 1023px) {
  .setup-steps { grid-template-columns: 1fr; }
  .clean-plans { grid-template-columns: 1fr; }
  .clean-plans article { padding: 64px 28px 28px; }
  .direction-images img { height: 300px; }
}
@media (max-width: 767px) {
  .simple-section { padding: 48px 16px; }
  .setup-steps, .compact-roi { grid-template-columns: 1fr; gap: 16px; }
  .clean-plans { grid-template-columns: 1fr; }
  .clean-plans article { padding: 64px 24px 24px; }
  .plan-label { left: 24px; }
  .setup-steps article { padding: 24px; }
  .directions-scroller { max-height: 520px; }
  .direction-card { min-height: 520px; grid-template-columns: 1fr; gap: 16px; padding: 20px; }
  .direction-images { grid-template-columns: 1fr 1fr; gap: 10px; }
  .direction-images img { height: 120px; border-radius: 12px; }
  .direction-images img:first-child { grid-column: 1 / -1; height: 200px; }
  .simple-cta, .btn-primary:not(.btn-primary--sm) { width: 100%; }
  #mobile-menu { max-height: calc(100dvh - 110px); overflow-y: auto; top: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .directions-scroller { scroll-snap-type: none; }
}

/* --- тёмные секции и CTA: цвет и выравнивание заголовков --------------------- */
.dark-section h2, .dark-section h3 { color: var(--on-ink); }
.cta-section h2 { max-width: 22ch; margin-left: auto; margin-right: auto; font-size: clamp(28px, 3.4vw, 48px); }
.why-switch-card h3 { font-size: clamp(24px, 2.3vw, 32px); line-height: 1.15; }

/* Preserve the approved composition while removing ornamental motion/caps. */
.why-switch-card .uppercase { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; }
.why-switch-card:hover img, .why-switch-card .transition-transform,
.tg-cta-btn:hover svg { transform: none !important; }
.why-switch-card .transition-transform { transition: none; }
/* Шапка при скролле: непрозрачная подложка и уменьшенный логотип */
.site-header .logo-scroll-plaque { background: rgba(255,255,255,0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.site-header.header-scrolled { padding-top: 8px; padding-bottom: 8px; }
.site-header > a > img { transition: width 220ms ease, height 220ms ease; }
.site-header.header-scrolled > a > img { width: 2.75rem; height: 2.25rem; }
@media (min-width: 640px) { .site-header.header-scrolled > a > img { width: 3.5rem; height: 2.75rem; } }
:where(a, button, input):focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 4px; }
.hero .integration-chip-yclients { background: var(--yclients); color: var(--ink); }
.hero .integration-chip-dikidi { background: var(--dikidi); color: var(--ink); }
.hero .integration-chip-altegio { background: var(--altegio); color: var(--bg); }
.tg-demo-avatar { background: var(--telegram-avatar); }
footer .text-white\/30 { color: var(--on-ink); opacity: .65; }
