/* home.css – главная v2 (только body.home-v2) */
/* Заливка: типовые блоки (экспертиза, кейсы, о компании, FAQ, контакты) – как на audit v2, правила v2.css не переопределяются.
   Новые блоки главной встроены в чередование: услуги – светлая, подход – белая, решения – светлая. */
html body.home-v2 main section#directions,html body.home-v2 main section#solution{background:var(--v3-soft)!important}
html body.home-v2 main section#results{background:#fff!important}

/* 01 услуги */
.h-dir-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-top:44px}
.h-dir,.h-sol{display:flex;flex-direction:column;gap:12px;padding:30px 30px 26px;background:#fff;border:1px solid var(--v3-line);border-radius:16px;color:inherit;text-decoration:none;transition:border-color .2s,box-shadow .2s,transform .2s}
.h-dir:hover,.h-sol:hover{border-color:#a9cdf3;box-shadow:0 18px 40px rgba(20,64,101,.09);transform:translateY(-2px)}
.h-dir:focus-visible,.h-sol:focus-visible{outline:3px solid var(--v3-sky);outline-offset:3px}
.h-dir-label{display:flex;align-items:center;gap:10px;color:var(--v3-action);font-size:13px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.h-dir-label b{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:8px;background:var(--v3-sky-soft);color:var(--v3-action);font-size:13px}
.h-dir h3,.h-sol h3{margin:4px 0 0;color:var(--v3-navy);font-size:clamp(20px,1.7vw,24px);font-weight:700;line-height:1.24;letter-spacing:-.02em;text-wrap:balance}
.h-dir p,.h-sol p{margin:0;color:var(--v3-muted);font-size:16px;line-height:1.5}
.h-dir-tags{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 0;padding:0;list-style:none}
.h-dir-tags li{padding:5px 11px;border-radius:999px;background:var(--v3-soft);color:var(--v3-ink);font-size:13px;font-weight:600;line-height:1.3}
.h-dir-go{margin-top:auto;padding-top:8px;color:var(--v3-action);font-size:15px;font-weight:700}
.h-dir:hover .h-dir-go,.h-sol:hover .h-dir-go{color:var(--v3-action-hover)}
.h-dir-banner{justify-content:space-between;margin-top:20px}

/* выравнивание строк карточек: ярлык, заголовок, текст, теги, ссылка на одной высоте */
.h-dir-grid{grid-auto-rows:auto}
.h-dir{display:grid;grid-template-rows:subgrid;grid-row:span 5;row-gap:12px;align-content:start}
.h-sol{display:grid;grid-template-rows:subgrid;grid-row:span 6;row-gap:12px;align-content:start}
.h-dir p,.h-sol p{min-height:3em;align-self:start}
.h-dir-label{align-self:center}
.h-dir h3{align-self:start}
.h-dir-tags{align-self:start}
.h-dir-go{align-self:end;margin-top:0}
@media (max-width:1240px){.h-dir-label{font-size:12px;letter-spacing:.04em;gap:8px}.h-dir-label b{width:28px;height:28px;font-size:12px}}

/* 03 решения */
.h-sol-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-top:44px}
.h-sol-top{display:flex;justify-content:space-between;align-items:center;gap:16px;height:40px}
.h-sol-top img{display:block;width:auto;height:auto;max-height:34px;max-width:200px}
.h-sol-badge{padding:5px 12px;border-radius:999px;background:var(--v3-navy);color:#fff;font-size:12px;font-weight:700;letter-spacing:.04em}
.h-sol small{color:var(--v3-muted);font-size:12px;font-weight:800;letter-spacing:.08em}
.h-sol h3{margin-top:0}

/* 05 кейсы – карусель */
.h-cases-nav{display:flex;align-items:center;gap:10px;flex:none;padding-bottom:4px}
.h-cases-count{min-width:76px;margin-right:6px;color:var(--v3-muted);font-size:15px;font-weight:600;font-variant-numeric:tabular-nums;text-align:right}
.h-cases-count b{color:var(--v3-navy);font-weight:800}
.h-cases-btn{display:grid;place-items:center;width:48px;height:48px;padding:0;border:1px solid var(--v3-line);border-radius:50%;background:#fff;color:var(--v3-navy);font:inherit;font-size:20px;cursor:pointer;transition:background .2s,color .2s,border-color .2s}
.h-cases-btn:hover:not(:disabled){background:var(--v3-navy);border-color:var(--v3-navy);color:#fff}
.h-cases-btn:disabled{opacity:.35;cursor:default}
.h-cases-btn:focus-visible,.h-cases-grid:focus-visible{outline:3px solid var(--v3-sky);outline-offset:3px}
.h-cases-grid{display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 40px)/3);gap:20px;margin-top:40px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain}
.h-cases-grid::-webkit-scrollbar{display:none}
.h-case{display:grid;grid-template-rows:subgrid;grid-row:span 6;row-gap:0;padding:22px 24px 0;background:#fff;border:1px solid var(--v3-line);border-radius:16px;cursor:pointer;scroll-snap-align:start;transition:border-color .2s,box-shadow .2s}
.h-case:hover{border-color:#a9cdf3;box-shadow:0 18px 40px rgba(20,64,101,.09)}
.h-case:focus-visible{outline:3px solid var(--v3-sky);outline-offset:3px}
.h-cases-grid{grid-template-rows:repeat(6,auto)}
.h-case-top{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:40px}
.h-case-logo{display:flex;align-items:center;height:34px}
.h-case-logo img{display:block;width:auto;height:auto;max-width:140px;max-height:34px;object-fit:contain}
.h-case-top small{color:var(--v3-muted);font-size:10.5px;font-weight:800;letter-spacing:.08em;text-align:right;line-height:1.35}
.h-case h3{margin:14px 0 0;color:var(--v3-navy);font-size:20px;font-weight:700;line-height:1.22;letter-spacing:-.02em;text-wrap:balance}
.h-case-desc{margin:10px 0 0;color:var(--v3-muted);font-size:14.5px;line-height:1.5}
.h-case-val{margin-top:14px;padding-top:14px;border-top:1px solid var(--v3-line)}
.h-case-val small{display:block;color:var(--v3-action);font-size:10.5px;font-weight:800;letter-spacing:.08em}
.h-case-val b{display:block;margin-top:5px;color:var(--v3-navy);font-size:16px;font-weight:700;line-height:1.3}
.h-case-vp{margin:6px 0 0;color:var(--v3-ink);font-size:14.5px;line-height:1.5}
.h-case-go{display:flex;justify-content:space-between;align-items:center;margin-top:16px;padding:14px 0 16px;border-top:1px solid var(--v3-line);color:var(--v3-action);font-size:15px;font-weight:700}
.h-case-go span{font-size:18px}
@media (max-width:1100px){.h-cases-grid{grid-auto-columns:calc((100% - 16px)/2)}}
@media (max-width:900px){.h-dir-grid,.h-sol-grid{grid-template-columns:1fr}}
@media (max-width:640px){
  .h-dir-grid,.h-sol-grid{margin-top:28px;gap:14px}
  .h-dir,.h-sol{padding:22px 20px 20px}
  .h-cases-grid{grid-auto-columns:86%;gap:12px;margin-top:24px}
  .h-cases-nav{align-self:stretch;justify-content:flex-start;padding-top:12px}
  .h-cases-count{min-width:0;text-align:left;margin-right:auto}
  .h-dir-banner{flex-direction:column;align-items:flex-start}
}

/* переносы длинных заголовков: 2 строки на десктопе, на телефоне – естественный перенос */
body.home-v2 .v3-h2 .h-br{display:inline}
body.home-v2 .v3-exp-top .v3-h2 br{display:inline}
@media (max-width:640px){body.home-v2 .v3-h2 .h-br,body.home-v2 .v3-exp-top .v3-h2 br{display:none}}

/* 01 Услуги – блок ровно на высоту экрана под шапкой (как блок 04 на аудите) */
@media (min-width:1101px) and (min-height:640px){
html body.home-v2 main section#directions.v3-section.v3-section{display:flex!important;flex-direction:column;justify-content:center;min-height:calc(100svh - var(--v3-hdr,88px))!important;padding-top:clamp(18px,3vh,48px)!important;padding-bottom:clamp(18px,3vh,48px)!important}
body.home-v2 #directions>.v3-wrap{width:100%}
body.home-v2 .h-dir-grid{margin-top:clamp(16px,2.6vh,32px);gap:14px}
body.home-v2 .h-dir{padding:clamp(16px,2.2vh,24px) 26px clamp(14px,2vh,20px);row-gap:clamp(5px,.8vh,9px)}
body.home-v2 .h-dir h3{margin-top:0}
body.home-v2 .h-dir p{min-height:0}
body.home-v2 .h-dir-tags{margin-top:0}
body.home-v2 .h-dir-go{padding-top:2px}
body.home-v2 .h-dir-banner{margin-top:14px;padding-top:clamp(12px,1.8vh,20px);padding-bottom:clamp(12px,1.8vh,20px)}
}



/* 01 Услуги: крупная пиктограмма слева в карточке */
.h-dir{grid-template-columns:76px minmax(0,1fr);column-gap:24px}
.h-dir>*{grid-column:2}
.h-dir>.h-dir-ico{grid-column:1;grid-row:1/-1;align-self:start;display:grid;place-items:center;width:76px;height:76px;border-radius:18px;background:var(--v3-sky-soft)}
.h-dir-ico svg{width:46px;height:46px;fill:none;stroke:var(--v3-action);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.h-dir-ico .f{fill:#fff}
.h-dir-ico .w{fill:#fff}
.h-dir-ico .t{stroke-width:2.2}
.h-dir-ico .s{fill:var(--v3-action);stroke:none}
.h-dir:hover .h-dir-ico{background:#d6e9fb}
@media (max-width:640px){
  .h-dir{grid-template-columns:52px minmax(0,1fr);column-gap:14px}
  .h-dir>.h-dir-ico{width:52px;height:52px;border-radius:13px}
  .h-dir-ico svg{width:32px;height:32px}
}

/* картинка справа на всех ширинах, кроме мобильной (701-1100 px) */
@media (min-width:701px) and (max-width:1100px){
html body.home-v2 #top.v3-hero{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr)!important;align-items:center;padding-left:var(--v3-gutter)!important;padding-right:var(--v3-gutter)!important;column-gap:24px}
html body.home-v2 #top.v3-hero>.audit-hero-copy{grid-column:1!important;grid-row:1!important;padding:40px 0!important;min-width:0}
html body.home-v2 #top.v3-hero>.v3-hero-visual{grid-column:2!important;grid-row:1!important;padding:24px 0!important;display:flex;justify-content:flex-end;align-items:center}
html body.home-v2 #top .v3-hero-visual .v3-shot{width:100%!important}
html body.home-v2 #top h1.v3-hero-title{font-size:3.5vw!important}
html body.home-v2 #top .audit-lead{font-size:min(1.4vw,15px)!important;white-space:nowrap}
html body.home-v2 #top .audit-lead br{display:inline!important}
html body.home-v2 #top .hero-proof{gap:0!important}
html body.home-v2 #top .hero-proof>div{padding:0 14px!important;gap:6px!important}html body.home-v2 #top .hero-proof>div:first-child{padding-left:0!important}
html body.home-v2 #top .hero-proof strong{font-size:3.2vw!important}
html body.home-v2 #top .hero-proof span{white-space:nowrap;font-size:11px!important}
html body.home-v2 #results .v3-results-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:28px;align-items:start!important}
html body.home-v2 #about .v3-team{grid-template-columns:minmax(0,5fr) minmax(0,7fr)!important;gap:24px}
}

/* 02 Подход: картинка по верхнему краю списка */
html body.home-v2 #results .v3-results-grid{align-items:start!important}
html body.home-v2 #results .v3-results-visual{align-self:start!important;margin-top:0!important;padding-top:0!important}

/* номер услуги без заливки – чтобы не дублировать плашку пиктограммы */
.h-dir-label b{width:auto!important;height:auto!important;background:none!important;border-radius:0!important;display:inline!important}
body.home-v2 .v3-results-offer2 .v3-hero-note{margin:12px 0 0;color:var(--v3-muted);font-size:13.5px;line-height:1.45;font-weight:400}
body.home-v2 .v3-results-offer2 .v3-hero-note b{color:var(--v3-navy);font-weight:700}
body.home-v2 .h-dir-label{display:block!important}
@media (min-width:1101px) and (max-width:1140px){html body.home-v2 #top .hero-proof span{white-space:nowrap}html body.home-v2 #top .hero-proof>div{padding-left:18px;padding-right:18px}html body.home-v2 #top .hero-proof>div:first-child{padding-left:0}}
body.home-v2 .v3-results-offer2 .h-offer-note{margin:14px 0 0;max-width:420px;color:var(--v3-muted);font-size:15px;line-height:1.5;font-weight:400}
body.home-v2 .h-dir-go{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;margin-top:clamp(4px,1vh,12px);padding:clamp(10px,1.4vh,14px) 0 clamp(12px,1.6vh,16px);border-top:1px solid var(--v3-line)}
body.home-v2 .h-dir-go span{font-size:18px}
body.home-v2 .h-dir,body.home-v2 .h-sol{padding-bottom:0!important}
body.home-v2 .h-dir>.h-dir-ico{grid-row:1/span 4}
html body.home-v2 main section#directions.v3-section.v3-section{padding-top:clamp(14px,2vh,40px)!important;padding-bottom:clamp(14px,2vh,40px)!important}
body.home-v2 #directions .h-dir-grid{margin-top:clamp(14px,2vh,28px)}
body.home-v2 #directions .h-dir-go{margin-top:4px}
@media (min-width:701px){html body.home-v2 #top.v3-hero{align-items:stretch!important}html body.home-v2 #top.v3-hero>.audit-hero-copy,html body.home-v2 #top.v3-hero>.v3-hero-visual{align-self:stretch!important}html body.home-v2 #top.v3-hero>.audit-hero-copy.h-hero-fit{justify-content:flex-start!important}html body.home-v2 #top .h-hero-fit>.audit-eyebrow,html body.home-v2 #top .h-hero-fit .hero-proof{margin-top:0!important}html body.home-v2 #top .h-hero-fit::before,html body.home-v2 #top .h-hero-fit::after{content:"";display:block}html body.home-v2 #top .h-hero-fit::before{order:-1;flex:1 1 0}html body.home-v2 #top .h-hero-fit::after{order:1;flex:3 1 0}html body.home-v2 #top .h-hero-fit .hero-proof{order:2}}
