/* Zubov Estate — главная, первый экран (шапка + hero), Evidence First.
   ТЗ: ZE/design/screens/home-01/IMPLEMENTATION-SPEC.md. Размеры — estimated по approved-original.png. */
.ef-home { --line: #E3E8EE; --ring: #087F77; }
.ef-home .topbar .container, .ef-home .header-main .container, .ef-home .nav .container, .ef-home .hero-ef .container {
  max-width: 1440px; padding-left: clamp(16px, 3vw, 44px); padding-right: clamp(16px, 3vw, 44px);
}
.ef-home :is(a, button, label[role=button]):focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 16px; top: 8px; z-index: 50; background: #fff; padding: 8px 12px; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* 1. Верхняя полоса */
.ef-home .topbar { background: #F3F6F8; color: #526579; font-size: 13px; border-bottom: 0; }
.ef-home .topbar .container { min-height: 40px; }
.ef-home .topbar .tb-group { gap: 28px; align-items: center; }
.ef-home .tb-item { display: inline-flex; align-items: center; gap: 8px; color: #526579; text-decoration: none; }
.ef-home .topbar a.tb-item { color: #172B42; }
.ef-home .tb-tz { color: #8496A8; }
.ef-home .tb-switches { gap: 22px; }
.ef-home .tb-switch { display: inline-flex; align-items: center; gap: 4px; color: #A3B1BE; }
.ef-home .tb-switch button { font: 500 13px/1 var(--font-body); color: #526579; background: none; border: 0; padding: 4px 3px; cursor: pointer; }
.ef-home .tb-switch button[aria-pressed=true] { color: #172B42; font-weight: 700; }
.ef-home .tb-switch button[aria-disabled=true] { color: #A3B1BE; cursor: default; }

/* 2. Основная строка шапки */
.ef-home .header-main { background: #fff; border-bottom: 1px solid var(--line); }
.ef-home .header-main .hm {
  display: grid; grid-template-columns: 1fr auto auto auto; grid-template-areas: "logo contacts tools acc";
  align-items: center; column-gap: 20px; min-height: 96px; padding-top: 12px; padding-bottom: 12px;
}
.hm-logo { grid-area: logo; display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.ef-home .logo-mark { width: 50px; height: 50px; border-radius: 9px; background: #087F77; color: #fff; display: grid; place-items: center;
  font: 700 22px/1 var(--font-head); letter-spacing: -.02em; flex: none; }
.logo-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ef-home .logo-name { font: 700 27px/1.05 var(--font-head); color: #172B42; letter-spacing: -.03em; white-space: nowrap; }
.ef-home .logo-desc { font-size: 12px; line-height: 1.3; color: #526579; max-width: none; }
.hm-contacts { grid-area: contacts; display: flex; align-items: center; gap: 22px; }
.hm-phone { font: 600 20px/1.2 var(--font-body); color: #172B42; text-decoration: none; white-space: nowrap; }
.hm-callback { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: #172B42; text-decoration: none; white-space: nowrap; }
.hm-callback .ic { color: #087F77; }
.hm-callback:hover { color: #087F77; }
.hm-tools { grid-area: tools; display: flex; align-items: center; gap: 12px; }
.hm-msgr { display: flex; gap: 8px; }
.hm-msgr a { width: 36px; height: 36px; border: 1px solid #C9D3DD; border-radius: 50%; display: grid; place-items: center; color: #087F77; }
.hm-msgr a:hover { border-color: #087F77; background: #EAF5F4; }
.hm-msgr svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.hm-compare { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border: 1px solid #C9D3DD; border-radius: 8px;
  color: #172B42; text-decoration: none; font-size: 16px; white-space: nowrap; background: #fff; }
.hm-compare:hover { border-color: #087F77; }
.hm-compare .cnt { min-width: 18px; height: 18px; border-radius: 9px; background: #087F77; color: #fff; font: 700 11px/18px var(--font-body); text-align: center; padding: 0 4px; }
.ef-home .btn { background: #087F77; color: #fff; border-radius: 8px; min-height: 48px; padding: 0 26px; display: inline-flex; align-items: center; justify-content: center;
  font: 600 17px/1.2 var(--font-body); text-decoration: none; border: 1px solid #087F77; }
.ef-home .btn:hover { background: #076B65; filter: none; }
.ef-home .btn-ghost { background: #fff; color: #172B42; border: 1px solid #C9D3DD; }
.ef-home .btn-ghost:hover { background: #F3F6F8; border-color: #AABFCC; }
.hm-acc { grid-area: acc; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; border: 1.5px solid #C9D3DD; border-radius: 8px; background: #fff;
  color: #172B42; font: 600 15px/1 var(--font-body); text-decoration: none; white-space: nowrap; }
.hm-acc:hover { border-color: #087F77; color: #087F77; }
.acc-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; flex: none; }
.hm-menu { grid-area: menu; display: none; align-items: center; gap: 6px; height: 44px; padding: 0 12px; border: 1px solid #C9D3DD; border-radius: 8px;
  color: #172B42; font-size: 15px; cursor: pointer; }
.hm-menu svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* 3. Меню */
.ef-home .nav { background: #fff; border-bottom: 1px solid var(--line); }
.ef-home .nav .burger { display: none; }
.ef-home .nav ul { gap: 4px 36px; }
.ef-home .nav a { display: block; padding: 14px 0 12px; font-size: 17px; font-weight: 450; color: #172B42; background: none; border-bottom: 2px solid transparent; text-decoration: none; }
.ef-home .nav a:hover { color: #087F77; background: none; }
.ef-home .nav .active a { color: #172B42; background: none; border-bottom-color: #087F77; }

/* 4. Hero */
.hero-ef { --pw: min(calc(min(100vw, 1440px) * .5 + max(0px, (100vw - 1440px) / 2)), 780px, calc((100vh - 200px) * 1.195)); position: relative; overflow: hidden; color: #172B42; background: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 55%, #F3F6F8 100%); }
.hero-ef .container { display: block; position: relative; min-height: calc(var(--pw) / 1.195); padding-top: clamp(28px, 4vh, 56px); padding-bottom: 40px; }
.hero-text { position: relative; z-index: 2; max-width: min(620px, calc(50% - 40px)); }
.hero-plaque { display: inline-block; background: #087F77; color: #fff; font: 700 13px/1 var(--font-body); text-transform: uppercase; letter-spacing: .08em;
  padding: 8px 12px; border-radius: 6px; margin-bottom: 16px; }
.hero-ef h1 { font: 700 clamp(32px, min(3vw, 5.4vh), 46px)/1.15 var(--font-head); color: #172B42; letter-spacing: -.025em; margin: 0 0 14px; max-width: none; }
.hero-ef .sub { font-size: 18px; line-height: 1.55; color: #526579; margin: 0 0 20px; }
.ef-bullets { gap: 10px; margin-bottom: 24px; }
.ef-bullets li { padding-left: 34px; font-size: 17px; color: #172B42; }
.ef-bullets li::before { content: ""; width: 22px; height: 22px; top: 1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23087F77' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.5 11.2V12a8.5 8.5 0 1 1-5-7.8'/%3E%3Cpath d='m8 11.5 3.2 3.2L21 5'/%3E%3C/svg%3E") center/contain no-repeat; }
.hero-ef .hero-actions { gap: 12px; }
.hero-ef .hero-actions .btn { min-width: 240px; font-size: 19px; }
.hero-media { position: absolute; z-index: 1; top: 0; right: min(0px, calc((1440px - 100vw) / 2)); margin: 0; width: var(--pw); }
.hero-media img { display: block; width: 100%; height: auto; }
.hero-video { position: absolute; left: 4%; bottom: 8%; display: flex; align-items: center; gap: 14px; padding: 14px 22px 14px 16px; border-radius: 12px;
  background: rgba(255,255,255,.85); backdrop-filter: blur(6px); color: #172B42; text-decoration: none; font-size: 16px; box-shadow: 0 10px 30px rgba(23,43,66,.12); }
.hero-video[hidden] { display: none; }
.hv-play { width: 48px; height: 48px; border-radius: 50%; background: #087F77; display: grid; place-items: center; }
.hv-play svg { width: 22px; height: 22px; fill: #fff; }

/* ≤1180: компактнее шапка */
@media (max-width: 1180px) {
  .ef-home .logo-desc { display: none; }
  .hm-contacts { flex-direction: column; align-items: flex-start; gap: 2px; }
  .hm-phone { font-size: 18px; }
  .hm-compare { padding: 0 12px; }
  .hm-compare-t { display: none; }
  .ef-home .nav ul { gap: 4px 26px; }
}
/* ≤1024: меню под кнопкой */
@media (max-width: 1024px) {
  .ef-home .header-main .hm { grid-template-columns: 1fr auto auto auto auto; grid-template-areas: "logo contacts tools acc menu"; column-gap: 14px; }
  .hm-menu { display: inline-flex; }
  .ef-home .nav ul { display: none; flex-direction: column; gap: 0; padding: 8px 0; }
  .ef-home .nav .nav-tgl:checked ~ ul { display: flex; }
  .ef-home .nav { border-bottom: 0; }
  .ef-home .nav:has(.nav-tgl:checked) { border-bottom: 1px solid var(--line); }
  .ef-home .nav a { padding: 12px 0; border-bottom: 0; }
  .ef-home .nav .active a { color: #087F77; }
  .hero-media { width: 52%; }
  .hero-text { max-width: calc(48% - 40px); }
}
/* ≤768: колонка */
@media (max-width: 768px) {
  .ef-home .topbar .container { justify-content: flex-start; }
  .ef-home .tb-switches { display: none; }
  .ef-home .topbar .tb-group { gap: 4px 18px; }
  .ef-home .header-main .hm { grid-template-columns: auto 1fr auto auto; grid-template-areas: "logo . acc menu" "contacts tools tools tools"; row-gap: 12px; column-gap: 10px; min-height: 0; }
  .ef-home .logo-mark { width: 38px; height: 38px; font-size: 17px; border-radius: 8px; }
  .ef-home .logo-name { font-size: 19px; }
  .hm-acc { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .hm-acc span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .hm-tools { justify-self: end; }
  .zai-fab { right: 16px; bottom: 16px; height: 52px; padding: 0 18px 0 14px; font-size: 15px; }
  .hm-menu { padding: 0 10px; }
  .hm-menu span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .hm-contacts { gap: 0; }
  .hm-phone { font-size: 17px; }
  .hm-callback { font-size: 14px; }
  .hm-msgr a { width: 40px; height: 40px; }
  .hm-compare { height: 40px; }
  .hero-ef .container { min-height: 0; padding-top: 28px; padding-bottom: 0; }
  .hero-text { max-width: none; }
  .hero-ef h1 { font-size: clamp(28px, 8vw, 32px); }
  .hero-ef .sub { font-size: 16px; }
  .ef-bullets li { font-size: 16px; }
  .hero-ef .hero-actions { flex-direction: column; }
  .hero-ef .hero-actions .btn { width: 100%; min-width: 0; font-size: 17px; }
  .hero-media { position: relative; width: auto; max-width: none; margin: 28px calc(-1 * clamp(16px, 3vw, 44px)) 0 0; }
}
@media (max-width: 400px) {
  .ef-home .header-main .hm { column-gap: 8px; }
  .hm-msgr a { width: 36px; height: 36px; }
  .hm-compare { height: 36px; padding: 0 8px; }
  .hm-tools { gap: 6px; }
}
@media (max-width: 359px) {
  .hm-phone { font-size: 15px; }
  .hm-callback { font-size: 13px; }
  .hm-tools, .hm-msgr { gap: 6px; }
  .hm-msgr a, .hm-compare { width: auto; min-width: 36px; height: 36px; }
  .hm-compare { padding: 0 8px; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { .ef-home * { transition: none !important; } }

/* Наведение в шапке и первом экране: без подчёркивания, только цвет (решение владельца 11.11) */
.ef-home :is(.topbar, .header-main, .nav, .hero-ef) a:hover { text-decoration: none; }
.ef-home .topbar a.tb-item:hover, .hm-phone:hover, .hm-logo:hover .logo-name { color: #087F77; }
.ef-home .hero-ef .btn:hover { color: #fff; }
.ef-home .hero-ef .btn-ghost:hover { color: #172B42; }

/* ZE-036 (13.11.2026): ZE-ассистент на первом экране — вариант Б, утверждён Павлом */
.zai-ico { width: 20px; height: 20px; fill: currentColor; flex: none; }
.hero-ef .hero-actions .btn-ai { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #087F77; border: 1.5px solid #087F77; }
.ef-home .hero-ef .btn-ai:hover { background: #EAF5F4; color: #076B65; }
.zai-note { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 14.5px; color: #526579; }
.zai-note b { color: #172B42; }
.zai-tag { flex: none; white-space: nowrap; display: inline-block; padding: 2px 8px; border-radius: 999px; background: #EAF5F4; color: #076B65; font: 700 12px var(--font-body); letter-spacing: .02em; }
.zai-card { position: absolute; left: 5%; bottom: 7%; width: min(420px, 80%); background: rgba(255,255,255,.97); border-radius: 16px; box-shadow: 0 18px 50px rgba(23,43,66,.22); padding: 16px 18px; z-index: 2; font-size: 14.5px; color: #172B42; }
.zai-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.zai-ava { width: 36px; height: 36px; border-radius: 10px; background: #087F77; color: #fff; display: grid; place-items: center; font: 800 13px var(--font-head); }
.zai-head small { display: block; color: #526579; font-size: 12.5px; }
.zai-msg { padding: 9px 12px; border-radius: 12px; margin: 6px 0; line-height: 1.4; }
.zai-u { background: #F3F6F8; margin-left: 18%; }
.zai-b { background: #EAF5F4; margin-right: 10%; }
.zai-cta { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.zai-cta a { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; background: #087F77; color: #fff; font-weight: 600; text-decoration: none; }
.zai-cta span { font-size: 12px; color: #526579; }
@media (max-width: 720px) { .zai-card { position: relative; left: auto; bottom: auto; width: auto; margin: -40px 16px 0; } }
/* ZE-036 (13.11.2026): вариант В — акцент только у ZE-ассистента; слева видео основателя (решение Павла) */
.hero-ef .hero-actions { align-items: center; }
.btn-video { display: inline-flex; align-items: center; gap: 14px; padding: 10px 22px 10px 10px; border: 1px solid #C9D3DD; border-radius: 14px; background: #fff; color: #172B42; text-decoration: none; }
.btn-video[hidden] { display: none; }
.ef-home .hero-ef .btn-video:hover { border-color: #087F77; background: #F3F6F8; color: #172B42; }
.bv-play { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #EAF5F4; flex: none; }
.bv-play svg { width: 20px; height: 20px; fill: #087F77; }
.btn-video b { display: block; font-size: 17px; }
.btn-video small { display: block; color: #526579; font-size: 13.5px; margin-top: 2px; }
.hero-link { color: #087F77; font-weight: 600; font-size: 17px; text-decoration: none; padding: 8px 4px; border-bottom: 2px solid transparent; }
.ef-home .hero-ef .hero-link:hover { border-bottom-color: #087F77; color: #087F77; }
/* Плавающая кнопка ZE-ассистента (ZE-036, решение Павла 13.11: в шапке — «Личный кабинет», ИИ — сюда) */
.zai-fab { position: fixed; right: 24px; bottom: 24px; z-index: 50; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 18px;
  border-radius: 28px; background: #087F77; color: #fff; font: 600 16px/1 var(--font-body); text-decoration: none; box-shadow: 0 8px 24px rgba(23,43,66,.25); }
.zai-fab:hover { background: #066A63; }
.zai-fab .zai-ico { width: 22px; height: 22px; }
.zai-ico-s { width: 17px; height: 17px; }
@media (max-width: 720px) {
  .hero-link { font-size: 16px; }
}
