/* ДомофонУчет - одностраничный лендинг.
   Дизайн: строго-дружелюбный, светлый. Продаем функционалом, а не оберткой:
   сдержанные цвета, чистая типографика, плотные, но читаемые блоки. */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f5f9;     /* фон чередующихся секций (slate-100) */
  --text: #0f172a;          /* заголовки */
  --body: #334155;          /* текст */
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-ink: #1d4ed8;
  --accent-soft: #eff6ff;
  --ok: #047857;
  --soon: #b45309;
  --soon-soft: #fffbeb;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 10px 26px rgba(15,23,42,.06);
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1140px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; font-family: var(--font); font-size: 16.5px; line-height: 1.7;
  color: var(--body); background: var(--bg); overflow-x: hidden;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }

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

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100; }
.skip-link:focus { left: 0; }

/* ── Верхняя навигация ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9); backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 34px; height: 34px; }
.brand-name { font-weight: 700; color: var(--text); font-size: 18px; letter-spacing: -.01em; }
.brand-name span { color: var(--accent); }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-sub { font-size: 11px; font-weight: 500; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a { color: var(--body); font-size: 14.5px; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.nav-links a:hover { background: var(--surface-2); color: var(--text); }
.nav-links a.active { color: var(--accent-ink); }
.nav-cta { display: inline-flex; align-items: center; gap: 7px; background: var(--accent); color: #fff !important; font-weight: 600; font-size: 14.5px; padding: 9px 16px; border-radius: 9px; margin-left: 6px; }
.nav-cta:hover { background: var(--accent-ink); }
.menu-toggle { display: none; margin-left: auto; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; width: 42px; height: 38px; align-items: center; justify-content: center; cursor: pointer; color: var(--text); }
.menu-toggle svg { width: 22px; height: 22px; }

/* ── Кнопки ── */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15.5px; padding: 12px 22px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); border-color: #cbd5e1; }
/* брендированные мессенджер-кнопки */
.btn-tg { background: #229ED9; color: #fff; }
.btn-tg:hover { background: #1b8cc2; color: #fff; }
.btn-max { background: linear-gradient(135deg, #4a8cf0, #9b59d6); color: #fff; }
.btn-max:hover { filter: brightness(1.07); color: #fff; }
.btn-tg svg, .btn-max svg { width: 20px; height: 20px; flex: 0 0 auto; }

/* ── Hero (две колонки: текст+чек-лист | скриншот) ── */
.hero { padding: 56px 0 32px; }
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 5px 13px; border-radius: 999px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: 56px; align-items: center; }
.hero-copy h1 { font-size: 42px; line-height: 1.12; letter-spacing: -.02em; color: var(--text); font-weight: 800; margin: 16px 0 14px; }
.hero-copy .lead { font-size: 18px; color: var(--body); margin: 0 0 4px; max-width: 46ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* чек-лист в hero */
.checklist { list-style: none; margin: 22px 0 0; padding: 0; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--border); font-size: 15.5px; color: var(--body); line-height: 1.45; }
.checklist li:first-child { border-top: none; padding-top: 0; }
.check { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; background: #ecfdf5; color: #10b981; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.check svg { width: 14px; height: 14px; }
.hero-media { min-width: 0; }

/* банеры ключевых фишек под hero - сдержанные, без лишнего декора */
.hero-points { padding: 10px 0 22px; }
.feature-banners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fb { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; }
.fb-ico { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 9px; background: var(--surface-2); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.fb-ico svg { width: 20px; height: 20px; }
.fb-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.fb-txt b { font-size: 14.5px; font-weight: 600; color: var(--text); }
.fb-txt span { font-size: 12.5px; color: var(--accent-ink); font-weight: 500; margin-top: 2px; }
@media (max-width: 900px) { .feature-banners { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .feature-banners { grid-template-columns: 1fr; } }

/* ── Секции ── */
.section { padding: 56px 0; }
.section.alt { background: var(--surface-2); }
.section-head { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2 { font-size: 30px; line-height: 1.2; letter-spacing: -.02em; color: var(--text); font-weight: 800; margin: 0 0 12px; }
.section-head p { font-size: 17px; color: var(--muted); margin: 0; }

/* ── Сетки карточек ── */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-extra { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.card:hover { transform: translateY(-2px); border-color: #cdd9ea; box-shadow: 0 2px 4px rgba(15,23,42,.05), 0 16px 32px rgba(15,23,42,.09); }
.card-ico { width: 44px; height: 44px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 15px; }
.card-ico svg { width: 23px; height: 23px; }
.card h3 { margin: 0 0 8px; font-size: 18px; color: var(--text); font-weight: 700; }
.card > p { margin: 0 0 12px; color: var(--body); font-size: 15px; }
.card ul { margin: 0; padding-left: 0; list-style: none; }
.card ul li { position: relative; padding-left: 24px; margin: 9px 0; font-size: 14.5px; color: var(--body); line-height: 1.5; }
.card ul li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 9px; height: 9px; border-radius: 3px; background: var(--accent); opacity: .55; }

/* акцентный мини-факт внутри карточки */
.hl { margin-top: 12px; background: var(--accent-soft); border-radius: var(--radius-sm); padding: 11px 14px; font-size: 14px; color: var(--accent-ink); }
.hl b { color: var(--accent-ink); }

/* «дополнительно» - компактные карточки */
.mini { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.mini .card-ico { width: 38px; height: 38px; border-radius: 10px; margin-bottom: 12px; }
.mini .card-ico svg { width: 20px; height: 20px; }
.mini h3 { font-size: 16px; margin: 0 0 5px; color: var(--text); font-weight: 700; }
.mini p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ── Полоса условий ── */
.bar { background: var(--text); color: #e2e8f0; }
.bar .container { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 44px; padding-top: 26px; padding-bottom: 26px; }
.bar-item { display: inline-flex; align-items: center; gap: 11px; font-size: 15.5px; font-weight: 500; color: #f1f5f9; }
.bar-item svg { width: 22px; height: 22px; color: #93c5fd; flex: 0 0 22px; }

/* ── Опции под заказ ── */
.opt { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.opt .badge-soon { position: absolute; top: 16px; right: 16px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--soon); background: var(--soon-soft); border: 1px solid #fde68a; padding: 2px 9px; border-radius: 999px; }
.opt .card-ico { background: var(--soon-soft); color: var(--soon); }
.opt h3 { margin: 0 0 6px; font-size: 17px; color: var(--text); font-weight: 700; }
.opt .badge-soon { z-index: 1; }
.opt p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* ── CTA-блок ── */
.cta { text-align: center; }
.cta-box { background: linear-gradient(180deg, #1e293b, #0f172a); color: #fff; border-radius: 20px; padding: 50px 32px; }
.cta-box h2 { font-size: 28px; letter-spacing: -.01em; margin: 0 0 10px; color: #fff; }
.cta-box p { color: #cbd5e1; font-size: 17px; max-width: 52ch; margin: 0 auto 24px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-box .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.cta-box .btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cta-box .btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ── Подвал ── */
.footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: 14px; }
.footer .container { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }

/* ── Скриншоты программы (темная браузерная рамка) ── */
.shotfig { margin: 0; }
.shot { position: relative; cursor: zoom-in; border-radius: 14px; overflow: hidden; background: #0f172a; border: 1px solid #cbd5e1; box-shadow: 0 18px 44px rgba(2, 6, 23, .22); }
.shot-bar { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 14px; background: #1e293b; }
.dots { display: inline-flex; gap: 7px; flex: 0 0 auto; }
.dots i { width: 11px; height: 11px; border-radius: 50%; }
.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.url { flex: 1 1 auto; min-width: 0; background: #0f172a; color: #94a3b8; font-size: 12.5px; line-height: 1; padding: 7px 12px; border-radius: 7px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.shot img { display: block; width: 100%; height: auto; }
.shotfig figcaption { margin-top: 12px; text-align: center; font-size: 13.5px; color: var(--muted); }

/* лупа при наведении на скриншот */
.shot-zoom { position: absolute; left: 0; right: 0; top: 42px; bottom: 0; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, .16); opacity: 0; transition: opacity .15s ease; pointer-events: none; }
.shot:hover .shot-zoom { opacity: 1; }
.shot-zoom-badge { width: 86px; height: 86px; border-radius: 50%; background: rgba(255, 255, 255, .32); border: 2px solid rgba(255, 255, 255, .85); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); color: #fff; display: flex; align-items: center; justify-content: center; transform: scale(.86); transition: transform .15s ease; }
.shot:hover .shot-zoom-badge { transform: scale(1); }
.shot-zoom-badge svg { width: 40px; height: 40px; }

/* полноэкранный просмотр (lightbox) */
.lightbox { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(2, 6, 23, .88); cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox-inner { display: flex; flex-direction: column; align-items: center; max-width: 96vw; }
.lightbox .shot { display: inline-flex; flex-direction: column; width: auto; max-width: 96vw; cursor: default; box-shadow: 0 24px 70px rgba(0, 0, 0, .5); }
.lightbox .shot img { width: auto; height: auto; max-width: 96vw; max-height: calc(92vh - 104px); }
.lightbox-caption { margin: 14px 0 0; color: #cbd5e1; font-size: 14.5px; line-height: 1.5; text-align: center; max-width: 70ch; }
.lightbox-close { position: absolute; top: 18px; right: 22px; width: 44px; height: 44px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .28); background: rgba(2, 6, 23, .55); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox-close:hover { background: rgba(2, 6, 23, .8); }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .28); background: rgba(2, 6, 23, .55); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; }
.lightbox-nav:hover { background: rgba(2, 6, 23, .8); }
.lightbox-nav svg { width: 26px; height: 26px; }
.lightbox-prev { left: 22px; }
.lightbox-next { right: 22px; }
@media (max-width: 860px) {
  .lightbox-nav { width: 42px; height: 42px; }
  .lightbox-nav svg { width: 22px; height: 22px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ── Feature-блоки: текст + скриншот ── */
.feature-row { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: center; }
.feature-row + .feature-row { margin-top: 44px; }
.feature-row.reverse .feature-text { order: 2; }
.feature-row.reverse .feature-media { order: 1; }
.feature-text h3 { font-size: 22px; margin: 0 0 12px; color: var(--text); font-weight: 700; letter-spacing: -.01em; }
.feature-text ul { margin: 0; padding-left: 0; list-style: none; }
.feature-text li { position: relative; padding-left: 26px; margin: 10px 0; color: var(--body); font-size: 15.5px; line-height: 1.55; }
.feature-text li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 9px; height: 9px; border-radius: 3px; background: var(--accent); opacity: .55; }
.feature-text .hl { margin-top: 14px; }
.feature-media .shotfig + .shotfig { margin-top: 18px; }

/* два скриншота рядом (отчеты) */
.shots-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 24px; }

/* мобильная рамка (приложение мастера) */
.phones { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; }
.phonefig { margin: 0; text-align: center; }
.phone { position: relative; width: 280px; max-width: 78vw; margin: 0 auto; border-radius: 40px; background: #0f172a; padding: 30px 12px; box-shadow: 0 24px 50px rgba(2, 6, 23, .22); }
.phone::before { content: ""; position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 58px; height: 6px; border-radius: 999px; background: #475569; }
.phone::after { content: ""; position: absolute; bottom: 11px; left: 50%; transform: translateX(-50%); width: 108px; height: 5px; border-radius: 999px; background: #334155; }
.phone img { display: block; width: 100%; height: auto; border-radius: 20px; }
.phonefig figcaption { margin-top: 14px; font-size: 13.5px; color: var(--muted); }

/* демо-видео */
.video { position: relative; max-width: 880px; margin: 0 auto; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: #0f172a; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; object-fit: contain; background: #0f172a; }
.video-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: linear-gradient(160deg, #1e293b, #0f172a); color: #cbd5e1; }
.video-play { width: 78px; height: 78px; border-radius: 50%; background: rgba(255, 255, 255, .12); border: 2px solid rgba(255, 255, 255, .55); display: flex; align-items: center; justify-content: center; color: #fff; }
.video-play svg { width: 30px; height: 30px; margin-left: 5px; }
.video-ph-text { font-size: 14.5px; letter-spacing: .02em; }

/* красная кнопка play на hero-скрине */
.hero-media .shot { cursor: pointer; }
.play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; border-radius: 50%; border: none; background: #dc2626; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 28px rgba(220, 38, 38, .5); transition: transform .12s ease, background .12s ease; z-index: 3; }
.play-btn:hover { background: #b91c1c; transform: translate(-50%, -50%) scale(1.07); }
.play-btn svg { width: 30px; height: 30px; margin-left: 4px; }

/* плеер демо поверх сайта */
.videobox { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 0; background: rgba(2, 6, 23, .9); }
.videobox.open { display: flex; }
/* плеер подогнан под пропорцию демо-видео (1920x1194); при замене видео обновить соотношение */
.videobox-inner { width: min(94vw, 1920px, calc(92vh * 1920 / 1194)); }
.videobox .video { max-width: none; margin: 0; aspect-ratio: 1920 / 1194; background: transparent; border: none; box-shadow: none; }
.videobox .video video { background: transparent; }

/* защита от переполнения: дочерние элементы грида/флекса должны уметь сжиматься */
.hero-media, .feature-media, .feature-text, .shotfig, .shots-2 > * { min-width: 0; }

/* ── Вкладки (показ возможностей) ── */
.tablist-wrap { text-align: center; margin-bottom: 30px; }
.tablist { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 5px; max-width: 100%; }
.tab { display: inline-flex; align-items: center; gap: 8px; appearance: none; border: none; background: transparent; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 14.5px; color: var(--accent); padding: 9px 16px; border-radius: 8px; transition: background .12s ease, color .12s ease; }
.tab svg { width: 17px; height: 17px; flex: 0 0 auto; }
.tab:hover { color: var(--accent-ink); }
.tab.is-active { background: var(--surface); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.tabpanel { display: none; }
.tabpanel.is-active { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 44px; align-items: center; }

/* ── Адаптив ── */
/* меню сворачивается в гамбургер раньше контента — 9 пунктов не влезают на узких десктопах */
@media (max-width: 980px) {
  .nav-links { position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 16px 16px; box-shadow: var(--shadow);
    display: none; }
  body.nav-open .nav-links { display: flex; }
  .nav-links a { padding: 11px 12px; }
  .nav-cta { margin: 6px 0 0; justify-content: center; }
  .menu-toggle { display: flex; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .feature-row { grid-template-columns: 1fr; gap: 22px; }
  .feature-row.reverse .feature-text { order: 1; }
  .feature-row.reverse .feature-media { order: 2; }
  .feature-row + .feature-row { margin-top: 40px; }
  .feature-text h3 { font-size: 20px; }
  .tabpanel.is-active { grid-template-columns: 1fr; gap: 22px; }
  .tab { font-size: 14px; padding: 8px 13px; }
  .hero { padding: 40px 0 44px; }
  .hero-copy h1 { font-size: 31px; }
  .hero-copy .lead { font-size: 16.5px; }
  .section { padding: 48px 0; }
  .section-head h2 { font-size: 25px; }
}

@media (max-width: 600px) {
  /* плашка-условия: аккуратный левый столбик с выровненными иконками */
  .bar .container { flex-direction: column; align-items: flex-start; gap: 14px; max-width: 22rem; padding-top: 24px; padding-bottom: 24px; }
  .bar-item { align-items: flex-start; font-size: 15px; }
  /* кнопки-мессенджеры (hero и contact): колонка во всю ширину */
  .cta-actions, .hero-cta { flex-direction: column; align-items: stretch; }
  .cta-actions .btn, .hero-cta .btn { width: 100%; justify-content: center; }
}
