/* Blueberry Agency — mobile first */

@font-face { font-family: "Bebas Neue"; src: url("../fonts/bebas-neue-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Onest"; src: url("../fonts/onest-cyrillic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; src: url("../fonts/onest-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+20BD; }
@font-face { font-family: "Onest"; src: url("../fonts/onest-cyrillic-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; src: url("../fonts/onest-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+20BD; }
@font-face { font-family: "Onest"; src: url("../fonts/onest-cyrillic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; src: url("../fonts/onest-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+20BD; }

:root {
  --red: #FF144C;
  --red-dark: #D90D3D;
  --ink: #3A3B4F;
  --ink-2: #5E5F73;
  --muted: #8A8B9B;
  --bg: #FAFBF6;
  --paper: #FFFFFF;
  --line: #E7E7E0;
  --berry: #4E6A94;
  --neu: #C9CBD6;
  --radius: 18px;
  --gutter: 20px;
  --header-h: 60px;
  --display: "Bebas Neue", "Oswald", Impact, "Arial Narrow", sans-serif;
  --text: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
html.modal-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--text); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 8px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.sign { font-size: .5em; margin: 0 .06em; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); box-shadow: 0 1px 0 transparent; transition: box-shadow .2s; }
.header.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.header__in { height: var(--header-h); display: flex; align-items: center; gap: 12px; }
.header__logo { display: block; color: var(--ink); margin-right: auto; }
.logo { display: block; height: 34px; width: auto; }
.lang { display: flex; gap: 2px; font: 700 13px/1 var(--text); letter-spacing: .04em; }
.lang a { text-decoration: none; padding: 15px 10px; border-radius: 8px; color: var(--muted); }
.lang a[aria-current] { color: var(--ink); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.burger { width: 48px; height: 48px; border: 0; background: none; padding: 0; display: grid; place-items: center; cursor: pointer; margin-right: -12px; }
.burger i, .burger i::before, .burger i::after { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .25s, background .25s; }
.burger i::before, .burger i::after { content: ""; position: absolute; left: 0; }
.burger i::before { top: -7px; } .burger i::after { top: 7px; }
.burger[aria-expanded="true"] i { background: transparent; }
.burger[aria-expanded="true"] i::before { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] i::after { transform: translateY(-7px) rotate(-45deg); }
.nav { position: fixed; inset: var(--header-h) 0 auto 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s; }
.nav.is-open { transform: none; opacity: 1; visibility: visible; }
.nav a { display: block; font: 700 34px/1 var(--display); text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--line); }
.nav a:hover { color: var(--red); }
html:not(.js) .nav { position: static; opacity: 1; visibility: visible; transform: none; padding: 0; border: 0; }
html:not(.js) .burger { display: none; }

/* ---------- Buttons, labels ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px; background: var(--red); color: #fff; font: 500 16px/1.1 var(--text); text-decoration: none; border: 0; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; text-align: center; }
.btn:hover { background: var(--red-dark); }
.btn--soft { background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn--soft:hover { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--lg { min-height: 60px; padding: 0 34px; font-size: 18px; }
.btn sup { font-size: 11px; opacity: .7; }

.label { display: flex; align-items: center; gap: 10px; color: var(--red); font: 700 13px/1 var(--text); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.label::before { content: ""; width: 22px; height: 3px; background: currentColor; }
.h2 { font: 700 44px/.95 var(--display); text-transform: uppercase; max-width: 16ch; }
.section { padding: 64px 0; }
.section__lead { margin-top: 16px; max-width: 52ch; color: var(--ink-2); font-size: 17px; }

/* Чередование фонов: hero и контакты белые, между ними — через раз кремовые */
.about, .approach, .cases { background: var(--bg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--paper); display: flex; flex-direction: column; }
.hero__in { order: 1; padding-top: 28px; padding-bottom: 8px; }
.hero__media { order: 2; position: relative; height: 230px; margin-top: 8px; }
.hero__media img { position: absolute; right: -18%; top: -34px; width: 88%; max-width: 420px; height: auto;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30%), linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent 0, #000 30%), linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%); mask-composite: intersect; }
.kicker { font: 500 13px/1.5 var(--text); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); max-width: 30ch; }
.hero__title { margin-top: 14px; font: 700 clamp(52px, 15.5vw, 64px)/.9 var(--display); text-transform: uppercase; color: var(--ink); }
.hero__title .line { display: block; }
.hero__title .line:last-child::after { content: ""; display: inline-block; width: .42em; height: .09em; background: var(--red); margin-left: .14em; }
.hero__lead { margin-top: 18px; font-size: 17px; line-height: 1.5; color: var(--ink-2); max-width: 36ch; }
.hero__cta { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.hero__cta .btn { width: 100%; }

/* Телефон и планшет: без фото, hero вместе с шапкой занимает один экран */
@media (max-width: 899px) {
  .hero__media { display: none; }
  .hero { min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); }
  .hero__in { flex: 1; display: flex; flex-direction: column; padding-top: 28px; padding-bottom: 32px; }
  .hero__text { flex: 1; display: flex; flex-direction: column; }
  .hero__cta { margin-top: auto; padding-top: 32px; gap: 12px; }
  /* Заголовок на всю ширину: длиннейшая строка — 4,57 em («НЕЗАВИСИМОЕ») и 4,14 em («INDEPENDENT») */
  .hero__title { font-size: calc((100vw - 2 * var(--gutter)) / 4.62); }
  .hero__title:lang(en) { font-size: calc((100vw - 2 * var(--gutter)) / 4.19); }
}

/* ---------- About ---------- */
.about__grid { display: grid; gap: 36px; }
.about__text { margin-top: 20px; display: grid; gap: 14px; font-size: 17px; color: var(--ink-2); max-width: 56ch; }
.about__text p:first-child { color: var(--ink); font-weight: 500; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; align-self: start; }
.stats li { background: var(--paper); padding: 20px 16px; display: flex; flex-direction: column; gap: 6px; }
.stat__num { font: 700 52px/.9 var(--display); color: var(--red); }
.stat__lbl { font-size: 14px; line-height: 1.3; color: var(--ink-2); }

/* ---------- Services ---------- */
.svc-grid { margin-top: 28px; display: grid; gap: 10px; }
.svc { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: grid; grid-template-columns: 36px 1fr; column-gap: 10px; row-gap: 4px; transition: border-color .2s; }
.svc:hover { border-color: var(--red); }
.svc__n { grid-row: span 2; font: 700 22px/1 var(--display); color: var(--red); padding-top: 3px; }
.svc__t { font: 700 26px/1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.svc__d { font-size: 15px; line-height: 1.45; color: var(--ink-2); }

/* ---------- Approach ---------- */
.phases { margin-top: 32px; display: grid; gap: 12px; }
.phase { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.phase__t { display: flex; align-items: center; gap: 14px; font: 700 30px/1 var(--display); text-transform: uppercase; }
.phase__berry { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--berry); color: #fff; display: grid; place-items: center; font: 700 20px/1 var(--display); box-shadow: inset -6px -8px 14px rgba(0,0,0,.25), inset 4px 4px 8px rgba(255,255,255,.18); }
.phase:last-child .phase__berry { background: var(--red); }
.phase__steps { margin-top: 16px; display: grid; gap: 10px; }
.phase__steps li { display: flex; gap: 12px; align-items: baseline; font-size: 16px; line-height: 1.35; }
.step__n { flex: none; min-width: 20px; font: 700 16px/1 var(--display); color: var(--muted); }

/* ---------- Clients ---------- */
.clients__groups { margin-top: 32px; display: grid; gap: 28px; }
.clients__cat { font: 700 13px/1 var(--text); letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; }
.clients__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.clients__grid li { background: var(--bg); border-radius: 12px; height: 76px; display: grid; place-items: center; padding: 10px; }
.clients__grid img { width: calc(var(--lw) * 1px); max-width: 100%; max-height: 52px; height: auto; object-fit: contain; }

/* ---------- Cases ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; margin: 28px calc(-1 * var(--gutter)) 20px; padding: 2px var(--gutter) 6px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font: 500 14px/1 var(--text); cursor: pointer; white-space: nowrap; }
.chip sup { font-size: 10px; color: var(--muted); margin-left: 2px; }
.chip:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.chip[aria-pressed="true"] sup { color: rgba(255,255,255,.7); }

.case-list { display: grid; gap: 16px; }
.js .case.is-extra { display: none; }
.js .case-list.show-all .case.is-extra { display: block; }
.case[hidden] { display: none !important; }
.js .case__detail { display: none; }

.card { display: flex; flex-direction: column; height: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: box-shadow .25s, transform .25s, border-color .25s; }
.card:hover { box-shadow: 0 22px 50px -28px rgba(58, 59, 79, .45); transform: translateY(-2px); border-color: transparent; }
.cover { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--bg); overflow: hidden; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .cover img { transform: scale(1.04); }
.cover--logo img { inset: 22% 25%; width: 50%; height: 56%; object-fit: contain; }
.card:hover .cover--logo img { transform: scale(1.06); }
.cover--text { display: grid; place-items: center; background: var(--ink); color: #fff; font: 700 64px/1 var(--display); letter-spacing: .02em; }
.card__body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 22px; flex: 1; }
.card__brand { font: 700 12px/1.2 var(--text); letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.card__title { font: 700 30px/.95 var(--display); text-transform: uppercase; color: var(--ink); }
.card__key { display: flex; flex-direction: column; gap: 4px; margin-top: auto; padding-top: 14px; }
.card__key .case__num { font-size: 48px; }
.card__key--video { flex-direction: row; align-items: center; gap: 10px; }
.case__num { font: 700 38px/.9 var(--display); color: var(--red); }
.case__lbl { font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.case__play { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--red); position: relative; }
.case__play::after { content: ""; position: absolute; left: 14px; top: 11px; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent #fff; }
.case__play--sm { width: 26px; height: 26px; }
.case__play--sm::after { left: 10px; top: 8px; border-width: 5px 0 5px 8px; }
.more { display: flex; justify-content: center; margin-top: 28px; }
.show-all + .more, html:not(.js) .more, .more[hidden] { display: none; }

/* Подробности кейса (внутри окна) */
.case__header { padding-right: 56px; }
.case__title { margin-top: 6px; font: 700 40px/.95 var(--display); text-transform: uppercase; }
.case__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.case__tags li { font-size: 13px; line-height: 1; padding: 7px 12px; border-radius: 999px; background: #EFEFE8; box-shadow: inset 0 0 0 1px #D9D9D0; color: var(--ink); }
.case__body { margin-top: 24px; display: grid; gap: 24px; }
.case__h { font: 700 12px/1 var(--text); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 20px 0 8px; }
.case__text > .case__h:first-child, .case__results .case__h { margin-top: 0; }
.case__list { display: grid; gap: 8px; }
.case__list li { position: relative; padding-left: 20px; color: var(--ink-2); }
.case__list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 2px; background: var(--red); }
.case__people { display: flex; flex-wrap: wrap; gap: 6px; }
.case__people li { font-size: 14px; padding: 6px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.case__metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.case__metrics li { background: var(--paper); padding: 16px 14px; display: flex; flex-direction: column; gap: 6px; }
.case__metrics li:first-child { grid-column: 1 / -1; background: var(--bg); }
.case__metrics li:last-child:nth-child(even) { grid-column: 1 / -1; }
.case__metrics li:first-child .case__num { font-size: 60px; }
.case__metrics .case__num { font-size: 38px; }
.case__gallery { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.case__gallery li { flex: none; max-width: 100%; scroll-snap-align: start; border-radius: 12px; overflow: hidden; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.case__gallery a { display: block; cursor: zoom-in; }
.case__gallery img { height: 240px; width: auto; max-width: 100%; object-fit: contain; transition: transform .3s; }
.case__gallery a:hover img { transform: scale(1.02); }
.case__video { justify-self: start; }
html:not(.js) .case__detail { padding: 20px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: var(--paper); }

/* Окно кейса */
.case-modal { border: 0; padding: 0; margin: 0; width: 100%; max-width: none; height: 100%; max-height: none; background: transparent; }
.case-modal[open] { display: flex; }
.case-modal::backdrop { background: rgba(28, 29, 40, .6); backdrop-filter: blur(3px); }
.case-modal__box { position: relative; width: 100%; margin-top: auto; max-height: 94dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); border-radius: 22px 22px 0 0; padding: 26px var(--gutter) calc(32px + env(safe-area-inset-bottom)); animation: sheet .3s ease; }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.case-modal__close { position: sticky; top: 0; float: right; margin: -8px -6px 0 0; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.case-modal__box:focus { outline: none; }
.case-modal__close:hover { background: var(--ink); color: #fff; }

/* Chart */
.chart { margin-top: 16px; }
.chart__pair { display: flex; align-items: center; justify-content: center; gap: 14px; }
.chart__arrow { font-size: 22px; color: var(--muted); }
.donut { margin: 0; display: grid; justify-items: center; gap: 8px; }
.donut__svg { width: 120px; height: 120px; display: block; }
.donut__svg circle { fill: none; stroke-width: 6; }
.donut__svg .s-neg { stroke: var(--red); } .donut__svg .s-neu { stroke: var(--neu); } .donut__svg .s-pos { stroke: var(--berry); }
.donut__svg text { font: 700 9px/1 var(--display); fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
.donut figcaption { font-size: 13px; color: var(--ink-2); }
.chart__legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.chart__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
i.k-neg { background: var(--red); } i.k-neu { background: var(--neu); } i.k-pos { background: var(--berry); }
b.k-neg { color: var(--red); } b.k-neu { color: var(--ink-2); } b.k-pos { color: var(--berry); }

/* Lightbox */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: rgba(28, 29, 40, .94); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100dvh - 120px); width: auto; height: auto; border-radius: 8px; background: #fff; }
.lightbox__btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lightbox__btn:hover { background: var(--red); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; bottom: 16px; } .lightbox__next { right: 16px; bottom: 16px; }
.lightbox.is-single .lightbox__prev, .lightbox.is-single .lightbox__next { display: none; }

/* ---------- Contact ---------- */
.contact { position: relative; padding-bottom: 0; overflow: hidden; }
.contact__title { max-width: 14ch; font-size: 56px; }
.contact__lead { margin-top: 14px; font-size: 18px; color: var(--ink-2); }
.contact__in > .btn { margin-top: 26px; }
.contact__or { margin-top: 22px; font-size: 14px; color: var(--muted); }
.contact__mail { display: inline-block; margin-top: 4px; padding-top: 6px; font: 700 clamp(22px, 6.4vw, 44px)/1.15 var(--text); letter-spacing: -.01em; color: var(--red); text-decoration: none; word-break: break-all; background: linear-gradient(currentColor, currentColor) 0 100% / 0 3px no-repeat; transition: background-size .3s; padding-bottom: 4px; }
.contact__mail:hover { background-size: 100% 3px; }
.contact__person { margin-top: 20px; display: flex; flex-direction: column; gap: 2px; }
.contact__person b { font-size: 18px; }
.contact__person span { color: var(--ink-2); font-size: 15px; }
.contact__berries { width: 100%; max-width: 960px; margin: 8px auto -2%; padding: 0 var(--gutter); height: auto; }

/* ---------- Footer ---------- */
.footer { background: var(--paper); border-top: 1px solid var(--line); padding: 24px 0 calc(24px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--ink-2); }
.footer__in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.footer__logo { color: var(--ink); margin-right: auto; }
.footer__logo .logo { height: 28px; }
.footer a { text-decoration: none; padding: 12px 0; }
.footer a:hover { color: var(--red); }

/* ---------- ≥ 420px ---------- */
@media (min-width: 420px) {
  .clients__grid { grid-template-columns: repeat(3, 1fr); }
  .hero__media { height: 260px; }
}

/* ---------- ≥ 600px ---------- */
@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .h2 { font-size: 56px; }
  .hero__title { font-size: 80px; }
  .hero__cta { flex-direction: row; flex-wrap: wrap; }
  .kicker { max-width: none; }
  .hero__cta .btn { width: auto; }
  .hero__media { height: 320px; }
  .hero__media img { right: -8%; width: 62%; max-width: 480px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .phases { grid-template-columns: 1fr 1fr; }
  .clients__grid { grid-template-columns: repeat(4, 1fr); }
  .case-list { grid-template-columns: 1fr 1fr; gap: 20px; }
  .case-modal[open] { align-items: center; justify-content: center; padding: 32px; }
  .case-modal__box { margin: 0; max-width: 1000px; max-height: calc(100dvh - 64px); border-radius: 24px; padding: 36px 40px 40px; }
  /* Все картинки кейса в один ряд одинаковой высоты: ширина пропорциональна формату */
  .case__gallery { overflow: visible; flex-wrap: nowrap; }
  .case__gallery li { flex: var(--r) 1 0; min-width: 0; }
  .case__gallery img { width: 100%; height: auto; max-width: none; }
  .case__gallery[data-count="1"] li { flex: none; }
  .case__gallery[data-count="1"] img { width: auto; max-width: 100%; max-height: 520px; }
  .donut__svg { width: 150px; height: 150px; }
}

/* Планшет: кнопки hero как на телефоне — друг под другом на всю ширину */
@media (min-width: 600px) and (max-width: 899px) {
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }
  .hero__lead { font-size: 19px; max-width: 40ch; }
  .hero__title { font-size: min(170px, calc((100vw - 2 * var(--gutter)) / 4.62)); }
  .hero__title:lang(en) { font-size: min(170px, calc((100vw - 2 * var(--gutter)) / 4.19)); }
}

/* ---------- ≥ 900px ---------- */
@media (min-width: 900px) {
  :root { --header-h: 76px; }
  .section { padding: 104px 0; }
  .logo { height: 40px; }
  .burger { display: none; }
  .nav { position: static; opacity: 1; visibility: visible; transform: none; padding: 0; border: 0; background: none; }
  .nav ul { display: flex; gap: 4px; }
  .nav a { font: 500 15px/1 var(--text); padding: 15px 12px; border: 0; border-radius: 8px; }
  .nav a:hover { background: var(--bg); }
  .lang { margin-left: 8px; }
  .h2 { font-size: 72px; max-width: 20ch; }

  /* Hero: фото слева, текст справа на своём поле */
  .hero { flex-direction: row; min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); max-height: 920px; align-items: center; }
  .hero__media { position: absolute; left: 0; top: 0; bottom: 0; width: 47%; height: auto; margin: 0; overflow: hidden; }
  .hero__media img { inset: 0; right: auto; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 80% 45%;
    -webkit-mask-image: linear-gradient(to right, #000 78%, transparent 100%); -webkit-mask-composite: source-over;
    mask-image: linear-gradient(to right, #000 78%, transparent 100%); mask-composite: add; }
  .hero__in { padding-top: 48px; padding-bottom: 48px; display: flex; justify-content: flex-end; }
  .hero__text { width: 53%; padding-left: 64px; }
  .hero__title { font-size: clamp(84px, 7.6vw, 116px); }
  .kicker { max-width: none; }
  .hero__lead { font-size: 18px; margin-top: 22px; }
  .hero__cta { margin-top: 32px; }

  .about__grid { grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats li { padding: 28px 24px; }
  .stat__num { font-size: 72px; }

  .svc-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
  .svc { grid-template-columns: 1fr; padding: 26px 28px 28px; row-gap: 10px; align-content: start; }
  .svc__n { grid-row: auto; font-size: 26px; }
  .svc__t { font-size: 32px; }

  .phases { grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; }
  .phase { padding: 26px 24px 28px; }

  .clients__groups { gap: 20px; margin-top: 48px; }
  .clients__group { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; }
  .clients__cat { margin: 0; text-align: right; }
  .clients__grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
  .clients__grid li { height: 88px; }
  .clients__grid img { max-height: 56px; }

  .filters { flex-wrap: wrap; overflow: visible; margin: 36px 0 28px; padding: 0; }
  .case-list { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .card__body { padding: 20px 24px 26px; }
  .card__title { font-size: 32px; }
  .card__key .case__num { font-size: 56px; }

  .case__title { font-size: 52px; }
  .case__body { grid-template-columns: 1.1fr 1fr; column-gap: 48px; margin-top: 28px; }
  .case__gallery, .case__video { grid-column: 1 / -1; }
  .case__metrics li:first-child .case__num { font-size: 72px; }
  .lightbox__prev, .lightbox__next { top: 50%; bottom: auto; transform: translateY(-50%); }
  .lightbox__prev { left: 24px; } .lightbox__next { right: 24px; }
  .lightbox img { max-width: calc(100vw - 160px); max-height: calc(100dvh - 64px); }

  .contact { padding-top: 104px; }
  .contact__title { font-size: 96px; }
  .contact__berries { margin-top: -24px; }
}


