/* ===== Client case page ===== */
.client-page{ overflow-x: clip; }
/* сброс стилей сайта (Bootstrap, main.css, blog-item.css): .client-page :where() = 0,1,0, классы ниже перебивают */
.client-page :where(h1, .client-page h2, .client-page h3, .client-page p, .client-page ol, .client-page ul){ margin: 0; }
.client-page :where(h1, .client-page h2, .client-page h3){ font-size: inherit; font-weight: inherit; line-height: inherit; }
.client-page :where(ol, .client-page ul){ padding: 0; list-style: none; }
.client-page :where(a){ color: inherit; text-decoration: none; }
.client-page :where(button){ font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
.client-page :focus-visible{ outline: 2px solid var(--accent); outline-offset: 3px; }

.client-page .cp-container{ width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
.client-page .abs{ position: absolute; }
.client-page .icon{ flex: none; display: block; }
.client-page .light{ font-weight: 300; }
.client-page .accent{ color: var(--accent); }

.client-page .cp-h2{ font-size: var(--fs-h2); font-weight: 800; line-height: 1; letter-spacing: -.005em; }
.client-page .cp-eyebrow{ color: var(--accent); font-size: var(--fs-caption); font-weight: 600; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; }
.client-page .eyebrow-dot{ display: flex; align-items: center; gap: 10px; color: var(--subtle); font-size: 14px; line-height: 1; letter-spacing: .32em; }
.client-page .eyebrow-dot::before{ content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

.client-page .section-head{ display: flex; flex-direction: column; gap: 16px; }
.client-page .section-head--center{ gap: 30px; }
.client-page .section-head__desc{ color: var(--muted); font-size: var(--fs-body); line-height: 1.5; max-width: 1040px; }

/* ===== Buttons ===== */
.client-page .cp-btn{
  display: inline-flex; align-items: center; gap: 12px;
  border-radius: 16px; font-size: var(--fs-body); font-weight: 500; line-height: 1.4;
  transition: background-color .2s, color .2s, box-shadow .2s, transform .2s;
}
.client-page .cp-btn .icon{ width: 18px; height: 18px; }
.client-page .btn--secondary{ padding: 22px 32px; background: var(--surface); color: var(--ink); }
.client-page .btn--secondary .icon{ color: var(--accent); }
.client-page .btn--secondary:hover{ background: var(--accent-soft); }
.client-page .btn--white, .client-page .btn--glass{ padding: 24px 40px; }
.client-page .btn--white .icon, .client-page .btn--glass .icon{ width: 20px; height: 20px; }
.client-page .btn--white{ background: var(--white); color: var(--accent); }
.client-page .btn--white:hover{ background: var(--accent-soft); }
.client-page .btn--glass{ background: #1F6BFF; color: var(--white); box-shadow: inset 0 0 0 1px var(--accent-soft); backdrop-filter: blur(6px); }
.client-page .btn--glass:hover{ background: #0A5CF5; }
.client-page .cp-btn:active{ transform: translateY(1px); }

/* ===== Hero ===== */
.client-page .cp-hero{ padding: 24px 0 var(--section); }
.client-page .crumbs{ display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: var(--fs-caption); line-height: 1.4; color: var(--muted); }
.client-page .crumbs__back{ display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px 10px 16px; border-radius: 12px; background: var(--surface); color: var(--ink); transition: background-color .2s; }
.client-page .crumbs__back:hover{ background: var(--accent-soft); }
.client-page .crumbs__back .icon{ width: 18px; height: 18px; }
.client-page .crumbs__list{ display: flex; flex-wrap: wrap; gap: 12px; }
.client-page .crumbs__list li{ display: flex; gap: 12px; }
.client-page .crumbs__list li + li::before{ content: '/'; }
.client-page .crumbs__list a:hover{ color: var(--accent); }
.client-page .crumbs__list [aria-current]{ color: var(--ink); }

.client-page .hero__row{ display: grid; grid-template-columns: minmax(0, 860fr) minmax(0, 820fr); gap: 80px; margin-top: 56px; align-items: start; }
.client-page .hero__text{ display: flex; flex-direction: column; gap: 32px; }
.client-page .hero__title{ font-size: var(--fs-h1); font-weight: 800; line-height: 1; overflow-wrap: anywhere; hyphens: auto; }
.client-page .hero__legal{ color: var(--muted); font-size: var(--fs-body); line-height: 1.5; }
.client-page .hero__lead{ font-size: var(--fs-lead); line-height: 1.4; }
.client-page .hero__cta{ display: flex; flex-wrap: wrap; gap: 16px; }

/* decorative composition, drawn in figma px and scaled to column width */
.client-page .viz{ position: relative; width: 100%; aspect-ratio: var(--vw) / var(--vh); }
.client-page .viz__stage{ position: absolute; left: 0; top: 0; width: calc(var(--vw) * 1px); height: calc(var(--vh) * 1px); transform-origin: 0 0; transform: scale(var(--s, 1)); }
.client-page .viz__stage img, .client-page .viz__stage svg{ display: block; overflow: visible; }
.client-page .viz__stage svg{ width: 100%; height: 100%; }

.client-page .cp-stats{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); container-type: inline-size; margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.client-page .cp-stat{ min-width: 0; display: flex; flex-direction: column; gap: 16px; padding-inline: 32px; border-left: 1px solid var(--line); }
.client-page .cp-stat:first-child{ padding-left: 0; border-left: 0; }
/* размер цифр — от ширины блока (cqi), а не окна: «2020» всегда помещается в колонку */
.client-page .stat__num{ font-size: clamp(44px, 7.2cqi, 120px); font-weight: 900; line-height: 1; white-space: nowrap; }
.client-page .stat__unit{ color: var(--accent); font-size: clamp(24px, 2.8cqi, 48px); }
.client-page .stat__label{ color: var(--muted); font-size: var(--fs-body); line-height: 1.5; }

/* ===== History ===== */
.client-page .cp-history{ padding-bottom: var(--section); }
.client-page .history__box{ display: flex; flex-direction: column; gap: 56px; padding: 80px 64px 64px; border-radius: 40px; background: var(--surface); }
.client-page .history__head{ display: flex; align-items: flex-end; gap: 80px; }
.client-page .history__head .cp-h2{ flex: 0 1 700px; }
.client-page .history__desc{ flex: 1 1 0; color: var(--muted); font-size: var(--fs-body); line-height: 1.5; }
.client-page .history__box > *{ min-width: 0; }
.client-page .history__stages{ display: flex; gap: 24px; }

.client-page .stage{ flex: var(--grow) 1 0; min-width: 0; display: flex; flex-direction: column; gap: 24px; padding: 32px; border-radius: 32px; background: var(--white); }
.client-page .stage__years{ align-self: flex-start; padding: 6px 14px; border-radius: 100px; background: var(--accent-soft); color: var(--accent); font-size: var(--fs-caption); line-height: 1.4; }
.client-page .stage__title{ font-size: var(--fs-h3); font-weight: 600; line-height: 1.2; }
.client-page .stage__text{ color: var(--muted); font-size: var(--fs-body); line-height: 1.5; }
.client-page .chart{ min-width: 0; display: flex; align-items: flex-end; gap: 16px; margin-top: auto; padding-top: 24px; border-top: 1px solid var(--line); }
.client-page .cp-bar{ flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.client-page .bar__count{ font-size: var(--fs-number-s); font-weight: 900; line-height: 1; }
.client-page .bar__bin{
  height: calc(var(--rows) * 18px); overflow: hidden; white-space: pre;
  font-family: var(--mono); font-size: 16px; font-weight: 500; line-height: 18px; letter-spacing: .2em;
  color: var(--accent);
  -webkit-mask-image: linear-gradient(#000, rgba(0, 0, 0, .25)); mask-image: linear-gradient(#000, rgba(0, 0, 0, .25));
}
/* лишние символы обрезаются слева (ведущие нули), двоичное число в верхней строке остаётся видно */
.client-page .bar__bin div{ direction: rtl; text-align: right; }
.client-page .bar__year{ color: var(--muted); font-size: var(--fs-caption); line-height: 1.4; }
.client-page .bar__year b{ color: var(--ink); font-size: var(--fs-body); font-weight: 500; margin-right: 2px; }

.client-page .stage--accent{ background: var(--accent); color: var(--white); }
.client-page .stage--accent .stage__years{ background: rgba(255, 255, 255, .18); color: var(--white); }
.client-page .stage--accent .stage__text{ color: rgba(255, 255, 255, .9); }
.client-page .stage--accent .chart{ border-top-color: rgba(255, 255, 255, .25); }
.client-page .stage--accent .bar__bin{ color: var(--white); -webkit-mask-image: linear-gradient(#000, rgba(0, 0, 0, .35)); mask-image: linear-gradient(#000, rgba(0, 0, 0, .35)); }
.client-page .stage--accent .bar__year, .client-page .stage--accent .bar__year b{ color: var(--white); }

/* ===== Cards (organizations / directions / stages / projects overview) ===== */
.client-page .cards-section{ padding-bottom: var(--section); }
.client-page .cards{ display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 24px; margin-top: 48px; }
.client-page .cards--3{ --cols: 3; }
.client-page .cards--3 .cp-card{ min-height: 240px; }
.client-page .cards--4 .cp-card{ min-height: 260px; }
.client-page .cp-card{
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 32px; padding: 28px;
  border-radius: 24px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .2s;
}
.client-page .cp-card:hover{ box-shadow: inset 0 0 0 1px var(--accent); }
.client-page .card__dots{ position: absolute; inset: 0 0 auto auto; z-index: -1; pointer-events: none; }
.client-page .card__dots img{ display: block; width: 422px; height: 260px; max-width: none; margin-left: auto; position: absolute; right: 0; top: 0; }
.client-page .card__big{
  position: absolute; right: -14px; bottom: -34px; z-index: -1;
  font-family: var(--mono); font-size: 150px; font-weight: 500; line-height: 1; letter-spacing: -.04em; text-align: right;
  background: linear-gradient(180deg, var(--accent-soft), rgba(229, 239, 255, .2)); -webkit-background-clip: text; background-clip: text; color: transparent;
  pointer-events: none;
}
.client-page .card__name{ font-size: var(--fs-body); font-weight: 500; line-height: 1.4; max-width: 364px; }
.client-page .card__bottom{ display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.client-page .card__count{ display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: var(--fs-body); line-height: 1.5; }
.client-page .card__count b{ color: var(--ink); font-size: var(--fs-number-s); font-weight: 900; line-height: 1; }
.client-page .card__dirs{ color: var(--muted); font-size: var(--fs-caption); line-height: 1.4; }

/* ===== Projects ===== */
.client-page .projects{ padding-bottom: var(--section); scroll-margin-top: 24px; }
.client-page .tabs{ display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.client-page .tab{
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 100px;
  background: var(--surface); color: var(--ink); font-size: var(--fs-caption); line-height: 1.4; white-space: nowrap;
  transition: background-color .2s, color .2s;
}

.client-page .tab__count{ color: var(--muted); }
.client-page .tab:hover{ background: var(--accent-soft); }
.client-page .tab.is-active{ background: var(--accent); color: var(--white); }
.client-page .tab.is-active .tab__count{ color: rgba(255, 255, 255, .6); }
.client-page .projects__panel{ margin-top: 40px; }
.client-page .projects__list{ border-top: 1px solid var(--line); }
.client-page .prow{ display: grid; grid-template-columns: minmax(0, 560fr) minmax(0, 640fr) minmax(0, 480fr); gap: 40px; padding: 40px 0; border-bottom: 1px solid var(--line); }
.client-page .prow__year{ display: flex; align-items: flex-start; gap: 24px; }
.client-page .prow__num{ color: var(--accent); font-size: var(--fs-body); font-weight: 600; line-height: 1.4; }
.client-page .prow__y{ font-size: clamp(28px, 1.5rem + .77vw, 40px); font-weight: 700; line-height: 1; }
.client-page .prow__cnt{ margin-top: 6px; color: var(--muted); font-size: var(--fs-body); line-height: 1.5; }
.client-page .prow__body{ display: flex; flex-direction: column; gap: 12px; }
.client-page .prow__title{ font-size: var(--fs-lead); font-weight: 400; line-height: 1.4; }
.client-page .prow__desc{ color: var(--muted); font-size: var(--fs-body); line-height: 1.5; }
.client-page .prow__chips{ display: flex; flex-wrap: wrap; align-content: flex-start; gap: 10px; }
.client-page .chip{ padding: 10px 16px; border-radius: 100px; background: var(--surface); font-size: var(--fs-caption); font-weight: 500; line-height: 1.4; }

/* ===== Other clients ===== */
.client-page .others{ padding-bottom: clamp(48px, 4.17vw, 80px); }
.client-page .others__head{ display: flex; align-items: center; gap: 16px; }
.client-page .others__head .cp-h2{ flex: 1 1 auto; }
.client-page .others__nav{ display: flex; gap: 16px; }
.client-page .arrow{ display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; transition: background-color .2s, opacity .2s; }
.client-page .arrow .icon{ width: 20px; height: 20px; }
.client-page .arrow--prev{ background: var(--surface); color: var(--ink); }
.client-page .arrow--next{ background: var(--accent); color: var(--white); }
.client-page .arrow--prev:hover{ background: var(--accent-soft); }
.client-page .arrow--next:hover{ background: #0A5CF5; }
.client-page .arrow:disabled{ opacity: .4; cursor: default; }
.client-page .logos{
  display: flex; gap: 16px; margin-top: 34px; padding-block: 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.client-page .logos::-webkit-scrollbar{ display: none; }
.client-page .logo-card{ flex: 0 0 calc((100% - 5 * 16px) / 6); min-width: 220px; scroll-snap-align: start; }
.client-page .logo-card a{
  display: grid; place-items: center; height: 140px; padding: 24px; border-radius: 24px;
  background: var(--white); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s;
}
/* логотипы с crocos.kz: серые в покое, в цвете при наведении */
.client-page .logo-card__img{
  display: block; max-width: 100%; max-height: 64px; width: auto; height: auto; object-fit: contain;
  filter: grayscale(1); opacity: .6;
  transition: filter .2s, opacity .2s;
}
.client-page .logo-card a:hover, .client-page .logo-card a:focus-visible{ box-shadow: inset 0 0 0 1px var(--accent); }
.client-page .logo-card a:hover .logo-card__img, .client-page .logo-card a:focus-visible .logo-card__img{ filter: none; opacity: 1; }

/* ===== CTA ===== */
.client-page .cp-cta{ padding-bottom: var(--section); }
.client-page .cta__card{
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 80px; padding: 80px; border-radius: 40px;
  background: linear-gradient(90deg, #0059F2 0%, #408CFF 100%); color: var(--white);
}
.client-page .cta__bg{ position: absolute; top: 0; z-index: -1; pointer-events: none; }
.client-page .cta__bg--right{ right: 0; }
.client-page .cta__bg img, .client-page .cta__bg svg{ display: block; max-width: none; overflow: visible; }
.client-page .cta__text{ flex: 0 1 977px; display: flex; flex-direction: column; gap: 24px; }
.client-page .cta__title{ font-size: var(--fs-h2); font-weight: 800; line-height: 1; }
.client-page .cta__lead{ color: rgba(255, 255, 255, .9); font-size: var(--fs-lead); line-height: 1.4; }
.client-page .cta__btns{ display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; }

/* ===== Responsive ===== */
@media (max-width: 1440px) {
  .client-page .hero__row{ gap: 48px; }
  .client-page .history__box{ padding: 64px 40px 40px; }
  .client-page .history__head{ gap: 48px; }
  .client-page .prow{ grid-template-columns: minmax(0, 400fr) minmax(0, 640fr) minmax(0, 480fr); }
  .client-page .cta__card{ padding: 64px; gap: 48px; }
}

@media (max-width: 1200px) {
  .client-page .hero__row{ grid-template-columns: 1fr; }
  .client-page .hero__viz{ max-width: 820px; }
  .client-page .history__stages{ flex-wrap: wrap; }
  .client-page .stage{ flex: 1 1 calc(50% - 12px); }
  .client-page .stage:first-child{ flex-basis: 100%; }
  .client-page .cards--4{ --cols: 2; }
  .client-page .prow{ grid-template-columns: minmax(0, 260px) minmax(0, 1fr); row-gap: 20px; }
  .client-page .prow__chips{ grid-column: 2; }
  .client-page .cta__card{ flex-direction: column; align-items: flex-start; }
  .client-page .cta__text{ flex: none; }
  .client-page .cta__btns{ margin-left: 0; }
  .client-page .logo-card{ flex-basis: calc((100% - 3 * 16px) / 4); }
}

@media (max-width: 1024px) {
  .client-page .cp-stats{ grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .client-page .cp-stat:nth-child(odd){ padding-left: 0; border-left: 0; }
  .client-page .cp-stat:nth-child(even){ padding-left: 32px; border-left: 1px solid var(--line); }
  .client-page .stat__num{ font-size: clamp(44px, 12cqi, 96px); }
  .client-page .stat__unit{ font-size: clamp(24px, 5cqi, 40px); }
  .client-page .history__head{ flex-direction: column; align-items: flex-start; gap: 24px; }
  .client-page .history__head .cp-h2{ flex-basis: auto; }
  .client-page .cards--3{ --cols: 2; }
}

@media (max-width: 768px) {
  .client-page .hero__row{ margin-top: 32px; gap: 32px; }
  .client-page .hero__text{ gap: 24px; }
  .client-page .cp-stats{ margin-top: 32px; padding-top: 32px; }
  .client-page .history__box{ gap: 32px; padding: 40px 20px 20px; border-radius: 28px; }
  .client-page .history__stages{ flex-direction: column; gap: 16px; }
  .client-page .stage{ flex: none; width: 100%; padding: 24px; border-radius: 24px; }
  .client-page .cards, .client-page .cards--3, .client-page .cards--4{ margin-top: 32px; gap: 16px; }
  .client-page .cards--3 .cp-card, .client-page .cards--4 .cp-card{ min-height: 220px; }
  .client-page .tabs{ flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; margin-top: 32px; }
  .client-page .tabs::-webkit-scrollbar{ display: none; }
  .client-page .projects__panel{ margin-top: 24px; }
  .client-page .prow{ grid-template-columns: 1fr; gap: 16px; padding: 28px 0; }
  .client-page .prow__chips{ grid-column: auto; }
  .client-page .prow__year{ align-items: baseline; gap: 16px; }
  .client-page .others__head .cp-h2{ font-size: clamp(28px, 7vw, 40px); }
  .client-page .others__nav{ gap: 8px; }
  .client-page .arrow{ width: 48px; height: 48px; border-radius: 12px; }
  .client-page .logos{ margin-top: 18px; gap: 12px; }
  .client-page .logo-card{ flex-basis: calc((100% - 12px) / 2); min-width: 0; }
  .client-page .logo-card a{ height: 112px; padding: 20px; border-radius: 20px; }
  .client-page .logo-card__img{ max-height: 56px; }
  .client-page .cta__card{ gap: 32px; padding: 40px 24px; border-radius: 28px; }
  .client-page .cta__bg--right{ opacity: .6; }
  .client-page .cta__btns{ flex-direction: column; align-items: stretch; width: 100%; }
  .client-page .cta__btns .cp-btn{ justify-content: center; padding: 20px 24px; }
}

@media (max-width: 600px) {
  .client-page .cards, .client-page .cards--3, .client-page .cards--4{ --cols: 1; }
}

@media (max-width: 480px) {
  .client-page .btn--secondary{ padding: 18px 24px; }
  .client-page .cp-stat{ padding-right: 12px; }
  .client-page .cp-stat:nth-child(even){ padding-left: 20px; }
  .client-page .stat__num{ font-size: clamp(40px, 12cqi, 56px); }
  .client-page .cp-card{ padding: 24px; }
  .client-page .chart{ gap: 10px; }
  .client-page .bar__bin{ font-size: 14px; line-height: 16px; height: calc(var(--rows) * 16px); letter-spacing: .12em; }
  .client-page .bar__bin div{ height: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .client-page *, .client-page *::before, .client-page *::after{ transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* На сайте страница стоит внутри .ch-wrap, у которой уже есть боковые поля. Свои не добавляем. */
.ch .client-page{ --gutter: calc(5 * var(--r)); }
.ch .client-page .cp-container{ width: 100%; }
@media (max-width: 1199px){ .ch .client-page{ --gutter: 40px; } }
@media (max-width: 767px){ .ch .client-page{ --gutter: 16px; } }
