/* Кейсы-лендинги (includes/case-landing.php). Цвета клиента — переменные
   --cl-acc, --cl-on-acc, --cl-dark, --cl-soft на <article class="cl">.
   Семь макетов: showcase, split, editorial, device, scroll, metrics, bento. */

.cl { --cl-r: 24px; --cl-ink: #131313; --cl-text: #4f585f; --cl-line: #e1e9ec; color: var(--cl-ink); }
.cl :where(h1, h2, h3, p) { margin: 0; }
.cl img { display: block; max-width: 100%; height: auto; }
.cl picture { display: contents; }
.cl .breadcrumbs { margin: 0 0 28px; }

/* ── Общие элементы ─────────────────────────────────────────────── */
.cl-label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cl-acc); margin-bottom: 14px !important; filter: saturate(1.1); }
.cl-sec { padding: 96px 0; }
.cl-sec-head { margin-bottom: 40px; }
.cl-sec-head h2 { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.12; letter-spacing: -0.03em; }
.cl-sec-head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.cl-more { font-weight: 600; color: var(--cl-ink); text-decoration: none; }
.cl-more:hover { color: var(--cl-acc); }

.cl-browser { margin: 0; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 30px 70px -30px rgba(19, 19, 19, .35), 0 0 0 1px rgba(19, 19, 19, .06); }
.cl-browser-bar { display: flex; gap: 6px; align-items: center; height: 32px; padding: 0 14px; background: #f1f3f5; border-bottom: 1px solid #e6e9ec; }
.cl-browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d4d9de; }
.cl-browser-view { display: block; max-height: 640px; overflow: hidden; }
.cl-browser-view img { width: 100%; }
.cl-browser--full .cl-browser-view { height: 560px; max-height: none; }
.cl-browser--full .cl-browser-view img { transition: transform 9s cubic-bezier(.45, .05, .55, .95); }
.cl-browser figcaption, .cl-phone figcaption, .cl-wide figcaption { padding: 12px 16px; font-size: 13px; color: var(--cl-text); background: #fff; }
.cl-phone { margin: 0; text-align: center; }
.cl-phone-in { display: block; padding: 8px; border-radius: 34px; background: #16191c; box-shadow: 0 30px 60px -24px rgba(19, 19, 19, .5); }
.cl-phone-in img { width: 100%; border-radius: 26px; aspect-ratio: 9 / 19.5; object-fit: cover; object-position: top; }
.cl-phone figcaption { background: none; }
.cl-wide { margin: 0; border-radius: var(--cl-r); overflow: hidden; }
.cl-wide img { width: 100%; }

/* ── Первый экран ───────────────────────────────────────────────── */
.cl-hero { position: relative; overflow: hidden; padding: 40px 0 88px; background: var(--cl-soft); }
.cl-hero h1 { font-size: clamp(34px, 4.4vw, 58px); line-height: 1.05; letter-spacing: -0.04em; font-weight: 800; }
.cl-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px !important; padding: 6px 14px; border-radius: 999px; background: #fff; font-size: 14px; font-weight: 600; color: var(--cl-ink); box-shadow: 0 6px 18px -12px rgba(19, 19, 19, .35); }
.cl-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cl-acc); }
.cl-lead { margin-top: 20px !important; font-size: 19px; line-height: 1.55; color: var(--cl-text); max-width: 620px; }
.cl-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.cl .cl-hero-cta .btn.primary { background: var(--cl-acc); color: var(--cl-on-acc); box-shadow: 0 14px 30px -14px var(--cl-acc); }
.cl .cl-hero-cta .btn.primary:hover { background: var(--cl-ink); color: #fff; }
.cl-site { background: #fff; }
.cl-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.cl-hero-vis { position: relative; }
.cl-hero-phone { position: absolute; right: -12px; bottom: -40px; width: 30%; max-width: 200px; }

/* ── Факты ──────────────────────────────────────────────────────── */
.cl-facts { background: var(--cl-dark); color: #fff; }
.cl-facts ul { list-style: none; margin: 0; padding: 36px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; }
.cl-facts b { display: block; font-family: var(--display, inherit); font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; color: var(--cl-acc); }
.cl-facts span { display: block; margin-top: 6px; font-size: 14px; color: rgba(255, 255, 255, .75); }

/* ── Клиент и задача ───────────────────────────────────────────── */
.cl-intro-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; }
.cl-intro h2 { font-size: 28px; letter-spacing: -0.02em; margin-bottom: 14px; }
.cl-intro p { font-size: 17px; line-height: 1.65; color: var(--cl-text); margin-bottom: 12px; }
.cl-task { padding: 36px; border-radius: var(--cl-r); background: var(--cl-soft); }
.cl-client-logo { max-width: 160px; margin-bottom: 16px; }

/* ── Решение ───────────────────────────────────────────────────── */
.cl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.cl-card { position: relative; padding: 30px 28px; border-radius: var(--cl-r); background: #fff; border: 1px solid var(--cl-line); }
.cl-card-n { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 18px; border-radius: 50%; background: var(--cl-acc); color: var(--cl-on-acc); font-weight: 800; font-size: 14px; }
.cl-card h3 { font-size: 19px; line-height: 1.3; margin-bottom: 10px; }
.cl-card p { font-size: 15px; line-height: 1.6; color: var(--cl-text); margin-bottom: 8px; }

/* ── Галерея ───────────────────────────────────────────────────── */
.cl-gallery { background: var(--cl-soft); }
.cl-shots { display: grid; gap: 28px; }
.cl-shots--many { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cl-shots--many .cl-browser-view { max-height: 420px; }
.cl-phones { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 220px)); justify-content: center; gap: 28px; margin-top: 48px; }

/* ── Возможности и технологии ──────────────────────────────────── */
.cl-feat-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 56px; }
.cl-checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }
.cl-checks li { position: relative; padding-left: 32px; font-size: 16px; line-height: 1.5; }
.cl-checks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--cl-acc); }
.cl-checks li::after { content: ""; position: absolute; left: 6px; top: 7px; width: 8px; height: 5px; border-left: 2px solid var(--cl-on-acc); border-bottom: 2px solid var(--cl-on-acc); transform: rotate(-45deg); }
.cl-stack { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cl-stack li { padding: 8px 14px; border-radius: 999px; background: var(--cl-soft); font-size: 14px; font-weight: 600; }

/* ── Этапы ─────────────────────────────────────────────────────── */
.cl-steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; counter-reset: s; }
.cl-steps li { counter-increment: s; position: relative; padding-top: 52px; display: flex; flex-direction: column; gap: 6px; }
.cl-steps li::before { content: counter(s, decimal-leading-zero); position: absolute; top: 0; left: 0; font-family: var(--display, inherit); font-size: 34px; font-weight: 800; color: var(--cl-acc); line-height: 1; }
.cl-steps b { font-size: 17px; }
.cl-steps span { font-size: 15px; color: var(--cl-text); line-height: 1.55; }

/* ── Результат ─────────────────────────────────────────────────── */
.cl-results { padding: 80px 0; background: var(--cl-acc); color: var(--cl-on-acc); }
.cl-results .cl-label { color: var(--cl-on-acc); opacity: .8; }
.cl-results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; }
.cl-results b { display: block; font-family: var(--display, inherit); font-size: clamp(40px, 5vw, 64px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.cl-results span { display: block; margin-top: 10px; font-size: 16px; line-height: 1.45; opacity: .9; }

/* ── Отзыв ─────────────────────────────────────────────────────── */
.cl-quote blockquote { margin: 0 auto; max-width: 860px; text-align: center; }
.cl-quote blockquote p { font-family: var(--display, inherit); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.4; font-weight: 600; letter-spacing: -0.02em; }
.cl-quote blockquote p::before { content: "“"; display: block; font-size: 80px; line-height: .6; color: var(--cl-acc); margin-bottom: 18px; }
.cl-quote-by { margin-top: 24px; display: flex; flex-direction: column; gap: 2px; }
.cl-quote-by span { font-size: 14px; color: var(--cl-text); }

/* ── Ещё кейсы ─────────────────────────────────────────────────── */
.cl-next { padding-top: 0; }
.cl-next-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cl-next-item { display: flex; gap: 20px; align-items: center; padding: 14px; border: 1px solid var(--cl-line); border-radius: var(--cl-r); text-decoration: none; color: var(--cl-ink); transition: box-shadow .2s, transform .2s; }
.cl-next-item:hover { box-shadow: 0 18px 40px -16px rgba(19, 19, 19, .22); transform: translateY(-2px); }
.cl-next-img { flex: none; width: 120px; height: 120px; border-radius: 16px; overflow: hidden; background: var(--cl-soft); }
.cl-next-img img { width: 100%; height: 100%; object-fit: cover; }
.cl-next-txt small { display: block; font-size: 13px; color: var(--cl-text); }
.cl-next-txt b { display: block; margin-top: 4px; font-size: 17px; line-height: 1.35; }

/* ════════════════ Макеты ════════════════ */

/* showcase: заголовок по центру, большой экран под ним на цветной подложке */
.cl--showcase .cl-hero { padding-bottom: 0; background: linear-gradient(180deg, var(--cl-soft) 0%, var(--cl-soft) 62%, #fff 62%); }
.cl--showcase .cl-hero-grid { grid-template-columns: 1fr; text-align: center; gap: 48px; }
.cl--showcase .cl-hero-txt { max-width: 860px; margin: 0 auto; }
.cl--showcase .cl-lead { margin-left: auto; margin-right: auto; }
.cl--showcase .cl-hero-cta { justify-content: center; }
.cl--showcase .cl-hero-vis { max-width: 1080px; margin: 0 auto; width: 100%; }
.cl--showcase .cl-crumbs { justify-content: center; text-align: center; }
.cl--showcase .cl-facts { margin-top: 80px; }

/* split: текст слева, экран и телефон справа */
.cl--split .cl-hero { background: #fff; }
.cl--split .cl-hero::before { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 46%; background: var(--cl-soft); border-radius: 0 0 0 48px; }
.cl--split .cl-hero-in { position: relative; }

/* editorial: крупная типографика, фирменная полоса, текст и картинки чередуются */
.cl--editorial .cl-hero { background: var(--cl-acc); color: var(--cl-on-acc); padding-bottom: 64px; }
.cl--editorial .cl-hero h1 { font-size: clamp(38px, 5.6vw, 76px); }
.cl--editorial .cl-hero .breadcrumbs, .cl--editorial .cl-hero .breadcrumbs a, .cl--editorial .cl-hero .breadcrumbs span { color: var(--cl-on-acc) !important; opacity: .85; }
.cl--editorial .cl-lead { color: var(--cl-on-acc); opacity: .88; }
.cl--editorial .cl-hero-grid { grid-template-columns: 1.2fr 1fr; }
.cl--editorial .cl-hero-cta .btn.primary { background: var(--cl-on-acc); color: var(--cl-acc); box-shadow: none; }
.cl--editorial .cl-hero-vis .cl-browser { transform: rotate(2deg); }
.cl--editorial .cl-facts { background: #fff; color: var(--cl-ink); border-bottom: 1px solid var(--cl-line); }
.cl--editorial .cl-facts b { color: var(--cl-ink); }
.cl--editorial .cl-facts span { color: var(--cl-text); }
.cl--editorial .cl-cards { grid-template-columns: 1fr; gap: 0; }
.cl--editorial .cl-card { display: grid; grid-template-columns: 80px 1fr 1.4fr; gap: 24px; align-items: start; padding: 32px 0; border: 0; border-top: 1px solid var(--cl-line); border-radius: 0; background: none; }
.cl--editorial .cl-card-n { width: auto; height: auto; background: none; color: var(--cl-acc); font-size: 40px; border-radius: 0; margin: 0; }
.cl--editorial .cl-card h3 { font-size: 24px; }

/* device: тёмный экран, телефоны */
.cl--device .cl-hero { background: var(--cl-dark); color: #fff; }
.cl--device .cl-hero .breadcrumbs a, .cl--device .cl-hero .breadcrumbs span { color: rgba(255, 255, 255, .7) !important; }
.cl--device .cl-hero h1 { color: #fff; }
.cl--device .cl-lead { color: rgba(255, 255, 255, .78); }
.cl--device .cl-eyebrow { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: none; }
.cl--device .cl-site { background: rgba(255, 255, 255, .12); color: #fff; border-color: transparent; }
.cl--device .cl-hero::after { content: ""; position: absolute; right: -200px; top: -200px; width: 700px; height: 700px; border-radius: 50%; background: radial-gradient(closest-side, var(--cl-acc), transparent); opacity: .35; pointer-events: none; }
.cl--device .cl-hero-in { position: relative; z-index: 1; }
.cl--device .cl-facts { background: #fff; color: var(--cl-ink); border-bottom: 1px solid var(--cl-line); }
.cl--device .cl-facts span { color: var(--cl-text); }
.cl--device .cl-gallery { background: var(--cl-dark); color: #fff; }
.cl--device .cl-gallery h2 { color: #fff; }

/* scroll: длинный скриншот прокручивается при наведении, рядом — что сделали */
.cl--scroll .cl-hero { background: #fff; border-bottom: 1px solid var(--cl-line); }
.cl--scroll .cl-hero-vis .cl-browser-view { max-height: 460px; }
.cl-scrolly-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.cl-scrolly-vis { position: sticky; top: 110px; }
.cl-scrolly-item { padding: 28px 0; border-top: 1px solid var(--cl-line); }
.cl-scrolly-item:first-of-type { border-top: 0; padding-top: 0; }
.cl-scrolly-item h3 { font-size: 22px; margin-bottom: 10px; }
.cl-scrolly-item p { font-size: 16px; line-height: 1.65; color: var(--cl-text); margin-bottom: 8px; }

/* metrics: цифры результата — главный экран */
.cl--metrics .cl-hero { background: var(--cl-dark); color: #fff; padding-bottom: 96px; }
.cl--metrics .cl-hero h1 { color: #fff; }
.cl--metrics .cl-hero .breadcrumbs a, .cl--metrics .cl-hero .breadcrumbs span { color: rgba(255, 255, 255, .7) !important; }
.cl--metrics .cl-lead { color: rgba(255, 255, 255, .78); }
.cl--metrics .cl-eyebrow { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: none; }
.cl--metrics .cl-site { background: rgba(255, 255, 255, .12); color: #fff; border-color: transparent; }
.cl-hero-nums { display: grid; gap: 16px; }
.cl-hero-nums div { padding: 26px 28px; border-radius: var(--cl-r); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.cl-hero-nums div:first-child { background: var(--cl-acc); color: var(--cl-on-acc); border-color: transparent; }
.cl-hero-nums b { display: block; font-family: var(--display, inherit); font-size: clamp(44px, 5vw, 68px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.cl-hero-nums span { display: block; margin-top: 8px; font-size: 15px; opacity: .85; }
.cl--metrics .cl-facts { background: #fff; color: var(--cl-ink); border-bottom: 1px solid var(--cl-line); }
.cl--metrics .cl-facts span { color: var(--cl-text); }

/* bento: экраны и факты сеткой разной величины */
.cl--bento .cl-hero-grid { grid-template-columns: 1fr 1fr; }
.cl--bento .cl-shots--many { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-flow: dense; }
.cl--bento .cl-shots--many > * { grid-column: span 3; }
.cl--bento .cl-shots--many > *:nth-child(3n+1) { grid-column: span 4; }
.cl--bento .cl-shots--many > *:nth-child(3n+2) { grid-column: span 2; }
.cl--bento .cl-shots--many > *:nth-child(3n+2) .cl-browser-view img { height: 420px; object-fit: cover; object-position: top left; }
.cl--bento .cl-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cl--bento .cl-card:first-child { grid-column: span 2; background: var(--cl-dark); color: #fff; border: 0; }
.cl--bento .cl-card:first-child p { color: rgba(255, 255, 255, .78); }

/* ── Адаптив ───────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .cl-hero-grid, .cl--editorial .cl-hero-grid, .cl--bento .cl-hero-grid, .cl-intro-grid, .cl-feat-grid, .cl-scrolly-grid { grid-template-columns: 1fr; gap: 40px; }
  .cl--split .cl-hero::before { display: none; }
  .cl--split .cl-hero { background: var(--cl-soft); }
  .cl-scrolly-vis { position: static; }
  .cl--editorial .cl-card { grid-template-columns: 56px 1fr; }
  .cl--editorial .cl-card > p, .cl--editorial .cl-card > :nth-child(n+3) { grid-column: 2; }
  .cl--bento .cl-cards { grid-template-columns: 1fr 1fr; }
  .cl-shots--many, .cl--bento .cl-shots--many { grid-template-columns: 1fr; }
  .cl--bento .cl-shots--many > * { grid-column: auto !important; }
  .cl--bento .cl-shots--many > * .cl-browser-view img { height: auto !important; }
}
@media (max-width: 640px) {
  .cl-sec { padding: 64px 0; }
  .cl-hero { padding: 28px 0 56px; }
  .cl-lead { font-size: 17px; }
  .cl-hero-cta .btn { width: 100%; }
  .cl-hero-phone { width: 34%; right: -4px; bottom: -24px; }
  .cl-browser--full .cl-browser-view { height: 420px; }
  .cl-checks { grid-template-columns: 1fr; }
  .cl-task { padding: 24px; }
  .cl--bento .cl-cards { grid-template-columns: 1fr; }
  .cl--bento .cl-card:first-child { grid-column: auto; }
  .cl-next-grid { grid-template-columns: 1fr; }
  .cl-next-img { width: 88px; height: 88px; }
  .cl-phones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .cl-sec-head--row { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .cl-browser--full .cl-browser-view img { transition: none; }
}
/* scroll: шапка без картинки — текст на всю ширину */
.cl--scroll .cl-hero-grid { grid-template-columns: 1fr; }
.cl--scroll .cl-hero-txt { max-width: 900px; }
/* Крошки в шапке лендинга — одной строкой с переносом, мельче */
.cl-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.cl-crumbs .separator { margin: 0; }
@media (max-width: 640px) {
  .cl-hero-vis .cl-browser-view { max-height: 360px; }
  .cl-crumbs .current { display: none; }
}
/* Длинные слова в заголовках — с переносами, без вылезания за край */
.cl h1, .cl h2, .cl h3 { overflow-wrap: break-word; }
.cl-hero h1.cl-long { font-size: clamp(30px, 3.1vw, 42px); line-height: 1.1; hyphens: auto; -webkit-hyphens: auto; }
@media (max-width: 640px) {
  .cl h1, .cl h2, .cl h3 { hyphens: auto; -webkit-hyphens: auto; }
  .cl-hero h1.cl-long { font-size: 28px; }
}
.cl-hero-txt { min-width: 0; }
