/* ai4life.ru — светлая тема «E»: светло-серый #F0F0F0 / белый / чёрные акцентные блоки, первый экран чёрный.
   Подключается после subpages.css на всех страницах, кроме OwnSI (ownsi*, oferta). */
:root{
  --canvas-dark:var(--L-bg);--canvas-elevated:var(--L-alt);--card-dark:var(--L-card);
  --border-dark:var(--L-line);--border-dark-soft:var(--L-line);
  --txt-d-primary:var(--L-ink);--txt-d-secondary:var(--L-ink2);--txt-d-muted:var(--L-muted);--txt-d-faint:var(--L-faint);
  --canvas-light:var(--L-bg);--canvas-soft:var(--L-alt);--card-light:var(--L-card);--border-light:var(--L-line);
  --txt-l-primary:var(--L-ink);--txt-l-secondary:var(--L-ink2);--txt-l-muted:var(--L-muted);
}
body{background:var(--L-bg);color:var(--L-ink)}
/* навигация */
.nav--scrolled{background:color-mix(in srgb,var(--L-bg) 86%,transparent)!important;border-bottom-color:var(--L-line)!important}
.nav__link{color:var(--L-ink2)}
.nav__cta,.btn--white{background:var(--L-ink)!important;color:#fff!important}
.nav__cta:hover,.btn--white:hover{background:var(--primary)!important}
.nav__menu{background:#fff;border-color:var(--L-line);box-shadow:0 18px 40px -12px rgba(20,30,50,.18)}
.nav__menu-link:hover{background:var(--L-alt)}
.nav__burger span{background:var(--L-ink)}
/* жёстко прописанные тёмные цвета */
.hero__grid{background-image:linear-gradient(var(--L-gridline) 1px,transparent 1px),linear-gradient(90deg,var(--L-gridline) 1px,transparent 1px)!important}
.case:hover{background:var(--L-card)}
.founder__photo{background:var(--L-alt)}
/* карточки */
.case,.service,.svc,.saas-card,.faq__item,.result,.res{box-shadow:var(--L-shadow)}
.faq__q{color:var(--L-ink2)}.faq__chev{color:var(--L-muted)}.faq__item:hover .faq__q{color:var(--L-ink)}

/* палитра */
:root{--L-bg:#F0F0F0;--L-alt:#FFFFFF;--L-card:#FFFFFF;--L-ink:#000000;--L-ink2:#3A3A3A;--L-muted:#707070;--L-faint:#A8A8A8;--L-line:#DCDCDC;
 --L-gridline:rgba(0,0,0,.05);--L-shadow:none;--L-grey:#F0F0F0;--L-white:#FFFFFF;--L-dark:#000000;--L-hover:#FFFFFF;--L-hover-shadow:0 14px 34px rgba(20,30,50,.10)}
.case,.service,.svc,.saas-card,.faq__item,.result,.res{border-radius:22px}
.btn--primary{background:#000!important;color:#fff!important}
.btn--primary:hover{background:#262626!important}

/* главная: ритм секций */
body[data-page="home"] .hero,body[data-page="home"] .facts{background:var(--L-dark)!important}
body[data-page="home"] .facts{border-color:rgba(255,255,255,.14)!important}
body[data-page="home"] [data-screen-label^="03"],body[data-page="home"] [data-screen-label^="06"],body[data-page="home"] [data-screen-label^="09"]{background:var(--L-white)!important;--L-card:var(--L-grey);--card-dark:var(--L-grey);--card-light:var(--L-grey)}
body[data-page="home"] [data-screen-label^="05"],body[data-page="home"] [data-screen-label^="08"],body[data-page="home"] [data-screen-label^="11"]{background:var(--L-grey)!important}
body[data-page="home"] [data-screen-label^="04"],body[data-page="home"] [data-screen-label^="07"],body[data-page="home"] [data-screen-label^="10"]{background:var(--L-dark)!important}

/* разделы (Услуги, SaaS, Кейсы, Обучение…): после чёрного первого экрана — серый, белый, чёрный по кругу */
.page-hero,.cta-final{background:var(--L-dark)!important}
body:not([data-page="home"]):not([data-depth]) section.section:nth-of-type(3n+2){background:var(--L-grey)!important}
body:not([data-page="home"]):not([data-depth]) section.section:nth-of-type(3n){background:var(--L-white)!important;--L-card:var(--L-grey);--card-dark:var(--L-grey);--card-light:var(--L-grey)}
body:not([data-page="home"]):not([data-depth]) section.section:nth-of-type(3n+1){background:var(--L-dark)!important}
body:not([data-page="home"]):not([data-depth]) section.section:nth-of-type(3n+1):nth-last-of-type(2){background:var(--L-white)!important}

/* страницы кейсов, продуктов и статей блога: чёрная шапка, белая статья */
body[data-depth] section.section,body[data-depth] .detail-section{background:var(--L-white)!important;--L-card:var(--L-grey);--card-dark:var(--L-grey);--card-light:var(--L-grey)}
body[data-depth] .page-hero + section.section{background:var(--L-grey)!important;--L-card:var(--L-white);--card-dark:var(--L-white);--card-light:var(--L-white)}

/* длинные списки (Услуги, SaaS, Кейсы): карточки — белые, каждая третья чёрная */
.service-block,.saas-detail{background:var(--L-white);border:0!important;border-radius:28px;padding:56px!important;margin-bottom:20px}
.service-block:nth-of-type(3n+2),.saas-detail:nth-of-type(3n+2){background:#000}
.case-list{background:var(--L-white);border:0!important;border-radius:28px;padding:8px 40px;--border-dark-soft:#E6E6E6}
.case-row:last-child{border-bottom:0}
.case-row:hover{background:transparent}
@media (max-width:768px){.service-block,.saas-detail{padding:28px 22px!important;border-radius:22px}.case-list{padding:4px 18px;border-radius:22px}}

/* чёрные блоки: светлый текст */
body[data-page="home"] .hero,
body[data-page="home"] .facts,
body[data-page="home"] [data-screen-label^="04"],
body[data-page="home"] [data-screen-label^="07"],
body[data-page="home"] [data-screen-label^="10"],
.page-hero,
.cta-final,
body:not([data-page="home"]):not([data-depth]) section.section:nth-of-type(3n+1):not(:nth-last-of-type(2)),
.service-block:nth-of-type(3n+2),
.saas-detail:nth-of-type(3n+2){
 --canvas-dark:#000;--canvas-elevated:#0E0E0E;--canvas-light:#000;--canvas-soft:#0E0E0E;
 --txt-d-primary:#fff;--txt-d-secondary:rgba(255,255,255,.78);--txt-d-muted:rgba(255,255,255,.6);--txt-d-faint:rgba(255,255,255,.4);
 --txt-l-primary:#fff;--txt-l-secondary:rgba(255,255,255,.78);--txt-l-muted:rgba(255,255,255,.6);
 --card-dark:rgba(255,255,255,.06);--card-light:rgba(255,255,255,.06);--border-dark:rgba(255,255,255,.14);--border-dark-soft:rgba(255,255,255,.1);--border-light:rgba(255,255,255,.14);
 --L-card:rgba(255,255,255,.06);--L-line:rgba(255,255,255,.14);--L-ink:#fff;--L-ink2:rgba(255,255,255,.78);--L-muted:rgba(255,255,255,.6);--L-gridline:rgba(255,255,255,.04);--L-hover:#161616;--L-hover-shadow:none;color:#fff}
body[data-page="home"] .hero .btn--secondary,body[data-page="home"] .facts .btn--secondary,body[data-page="home"] [data-screen-label^="04"] .btn--secondary,body[data-page="home"] [data-screen-label^="07"] .btn--secondary,body[data-page="home"] [data-screen-label^="10"] .btn--secondary,.page-hero .btn--secondary,.cta-final .btn--secondary,body:not([data-page="home"]):not([data-depth]) section.section:nth-of-type(3n+1):not(:nth-last-of-type(2)) .btn--secondary,.service-block:nth-of-type(3n+2) .btn--secondary,.saas-detail:nth-of-type(3n+2) .btn--secondary,body[data-page="home"] .hero .btn--ghost,body[data-page="home"] .facts .btn--ghost,body[data-page="home"] [data-screen-label^="04"] .btn--ghost,body[data-page="home"] [data-screen-label^="07"] .btn--ghost,body[data-page="home"] [data-screen-label^="10"] .btn--ghost,.page-hero .btn--ghost,.cta-final .btn--ghost,body:not([data-page="home"]):not([data-depth]) section.section:nth-of-type(3n+1):not(:nth-last-of-type(2)) .btn--ghost,.service-block:nth-of-type(3n+2) .btn--ghost,.saas-detail:nth-of-type(3n+2) .btn--ghost{color:#fff;border-color:rgba(255,255,255,.4)}
body[data-page="home"] .hero .btn--white,body[data-page="home"] .facts .btn--white,body[data-page="home"] [data-screen-label^="04"] .btn--white,body[data-page="home"] [data-screen-label^="07"] .btn--white,body[data-page="home"] [data-screen-label^="10"] .btn--white,.page-hero .btn--white,.cta-final .btn--white,body:not([data-page="home"]):not([data-depth]) section.section:nth-of-type(3n+1):not(:nth-last-of-type(2)) .btn--white,.service-block:nth-of-type(3n+2) .btn--white,.saas-detail:nth-of-type(3n+2) .btn--white,body[data-page="home"] .hero .btn--primary,body[data-page="home"] .facts .btn--primary,body[data-page="home"] [data-screen-label^="04"] .btn--primary,body[data-page="home"] [data-screen-label^="07"] .btn--primary,body[data-page="home"] [data-screen-label^="10"] .btn--primary,.page-hero .btn--primary,.cta-final .btn--primary,body:not([data-page="home"]):not([data-depth]) section.section:nth-of-type(3n+1):not(:nth-last-of-type(2)) .btn--primary,.service-block:nth-of-type(3n+2) .btn--primary,.saas-detail:nth-of-type(3n+2) .btn--primary{background:#fff!important;color:#000!important}
body[data-page="home"] [data-screen-label^="04"] .pain:hover{background:#111}
.founder__photo-tag{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.2);color:#fff}

/* навигация поверх чёрного первого экрана */
.nav:not(.nav--scrolled) .nav__link{color:rgba(255,255,255,.75)}
.nav:not(.nav--scrolled) .nav__cta{background:#fff!important;color:#000!important}
.nav:not(.nav--scrolled) .nav__burger span{background:#fff}
.nav:not(.nav--scrolled) .nav__brand{color:#fff}
.nav--scrolled .nav__brand{color:#000}

/* 2026-11-11: наведение на карточки — без чёрного фона под тёмным текстом (было #131313 от тёмной темы) */
.ability:hover,.geo-card:hover,.pain:hover,.case:hover,.sol-item:hover{background:var(--L-hover)!important;box-shadow:var(--L-hover-shadow)}

/* 2026-11-11: читаемость мелких подписей (проверка контраста) */
.faq__num{color:var(--L-muted)!important}
.footer__copyright{color:#8C8C8C!important}
.saas-card__status{color:#15803D!important}
.ability__badge{color:#0A66CF!important}
body[data-page="home"] [data-screen-label^="04"] .t-mono,body[data-page="home"] [data-screen-label^="07"] .t-mono,body[data-page="home"] [data-screen-label^="10"] .t-mono{color:rgba(255,255,255,.55)!important}
.nav__cta{white-space:nowrap}
@media (max-width:1180px){.nav__cta{padding-left:14px;padding-right:14px;font-size:13px}}

