/* ============================================================
   СТЕКЛО LAB — v3 styles
   светлая, минималистичная, премиальная подача
   mobile-first
   ============================================================ */

:root {
  --bg: #f5f5f3;
  --bg-soft: #ffffff;
  --bg-card: #ffffff;
  --bg-dark: #161616;
  --bg-dark-2: #1f1f1f;

  --text: #111111;
  --text-2: #3a3a3a;
  --text-muted: #7a7a7a;
  --text-on-dark: #ffffff;
  --text-on-dark-muted: #b9b9b9;

  --line: #e6e6e2;
  --line-strong: #d4d4cf;
  --line-dark: rgba(255, 255, 255, 0.12);

  --accent: #111111;
  --accent-hover: #2a2a2a;
  --accent-light: #ffffff;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 8px 28px rgba(15, 15, 15, 0.06);
  --shadow-lg: 0 18px 60px rgba(15, 15, 15, 0.08);

  --container: 1520px;
  --gutter: 16px;

  --font: "Inter", "Helvetica Neue", Arial, sans-serif;

  --t-fast: 160ms ease;
  --t: 240ms ease;
}

* { box-sizing: border-box; }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
  /* Низ страницы не должен прятаться за sticky-mobile-bar */
  padding-bottom: 76px;
}
@media (min-width: 960px) { body { padding-bottom: 0; } }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============================================================
   COMMON ELEMENTS
   ============================================================ */

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.section__head {
  margin-bottom: 36px;
  max-width: 760px;
}
.section__head--row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.section__title {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--text);
}
.section__lead {
  margin-top: 14px;
  font-size: 16px;
  color: var(--text-2);
  max-width: 560px;
}
.section__head--row .section__lead { margin-top: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t-fast);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { background: #fff; border-color: var(--accent); }
.btn--light { background: #fff; color: var(--text); }
.btn--light:hover { background: #f0f0ec; }
.btn--full { width: 100%; }
.btn:active { transform: translateY(1px); }


/* ============================================================
   LOGO
   ============================================================ */

.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  text-decoration: none;
  color: var(--text);
  user-select: none;
}
.logo__row {
  display: inline-flex;
  align-items: baseline;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 22px;
  line-height: 1;
}
.logo__main { color: var(--text); }
.logo__divider {
  display: inline-block;
  width: 1px;
  height: 0.95em;
  background: var(--text);
  margin: 0 8px;
  align-self: center;
}
.logo__lab { color: var(--text); }
.logo__rule {
  display: block;
  height: 1px;
  background: var(--text);
  width: 100%;
  margin-top: 4px;
}
.logo__sub {
  display: block;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.28em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
  text-align: center;
}
.logo--footer .logo__main,
.logo--footer .logo__lab { color: #fff; }
.logo--footer .logo__divider { background: #fff; }
.logo--footer .logo__rule { background: #fff; }
.logo--footer .logo__sub { color: rgba(255,255,255,0.55); }

/* Растровый логотип в футере — инвертируем тёмные пиксели в белые,
   прозрачные пиксели остаются прозрачными */
.logo--footer-img {
  display: block;
  width: auto;
  height: 50px;
  filter: brightness(0) invert(1);
  margin-bottom: 14px;
}

.logo--svg {
  flex-direction: row;
  align-items: center;
}
.logo__svg {
  height: 48px;
  width: auto;
  display: block;
}


/* ============================================================
   HEADER
   ============================================================ */

.header {
  position: fixed;
  left: 0; right: 0;
  top: 0;
  z-index: 50;
  background: rgba(245, 245, 243, 0.92);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background var(--t), border-color var(--t), color var(--t);
}

/* Прозрачная над hero — светлая версия (тёмный текст и логотип на белом hero) */
.header.header--over-hero {
  background: transparent;
  border-bottom-color: transparent;
}
.header.header--over-hero-light .nav a,
.header.header--over-hero-light .header__phone { color: var(--text-2); }
.header.header--over-hero-light .nav a:hover,
.header.header--over-hero-light .header__phone:hover { color: var(--text); }
.header.header--over-hero-light .msg {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
  color: var(--text);
}
.header.header--over-hero-light .msg:hover {
  background: #fff;
  border-color: var(--accent);
}
.header.header--over-hero-light .header__cta {
  background: var(--accent);
  color: #fff;
}
.header.header--over-hero-light .header__cta:hover { background: var(--accent-hover); }
.header.header--over-hero-light .logo__main,
.header.header--over-hero-light .logo__lab { color: var(--text); }
.header.header--over-hero-light .logo__divider,
.header.header--over-hero-light .logo__rule { background: var(--text); }
.header.header--over-hero-light .logo__sub { color: var(--text-muted); }
.header.header--over-hero-light .burger {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
}
.header.header--over-hero-light .burger span { background: var(--text); }
.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.nav {
  display: none;
  gap: 28px;
  margin-left: auto;
  font-size: 15px;
  color: var(--text-2);
}
.nav a:hover { color: var(--text); }
.header__right {
  display: none;
  align-items: center;
  gap: 18px;
  margin-left: 0;
}
.header__phone {
  font-weight: 500;
  font-size: 15.5px;
  white-space: nowrap;
}
.header__messengers {
  display: inline-flex;
  gap: 6px;
}
.msg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  transition: border-color var(--t), background var(--t);
}
.msg:hover { border-color: var(--accent); }
.msg svg { width: 18px; height: 18px; fill: currentColor; }
.msg img { width: 20px; height: 20px; object-fit: contain; display: block; }
.msg--max img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}
.msg--max span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.header__cta { padding: 11px 20px; font-size: 14px; }

/* burger */
.burger {
  margin-left: auto;
  width: 44px;
  height: 44px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  transition: transform var(--t), opacity var(--t);
}
.burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

[hidden] { display: none !important; }
.drawer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px var(--gutter) 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
}
.drawer a {
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}
.drawer a:last-child { border-bottom: 0; }
.drawer__phone {
  margin-top: 10px;
  font-weight: 600;
  color: var(--text);
}


/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  min-height: clamp(560px, 88vh, 940px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0;
  color: var(--text);
  background: var(--bg);
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* Светлый hero: белый горизонтальный градиент слева, чёрный текст.
   На мобиле — плотнее, чтобы текст был читаем над любой частью фото. */
.hero__scrim--light {
  background:
    linear-gradient(90deg,
      rgba(245, 245, 243, 0.96) 0%,
      rgba(245, 245, 243, 0.92) 55%,
      rgba(245, 245, 243, 0.6) 80%,
      rgba(245, 245, 243, 0) 100%);
}
@media (min-width: 640px) {
  .hero__scrim--light {
    background:
      linear-gradient(90deg,
        rgba(245, 245, 243, 0.98) 0%,
        rgba(245, 245, 243, 0.95) 38%,
        rgba(245, 245, 243, 0.7) 58%,
        rgba(245, 245, 243, 0) 80%);
  }
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: 80px 0 24px;
  width: 100%;
  text-align: center;
}
@media (min-width: 640px) {
  .hero__content { text-align: left; }
}
@media (min-width: 960px) {
  /* === HERO ОТСТУПЫ — поменять здесь ===
     hero-left   — отступ текста от ЛЕВОГО края (px). Сейчас 36.
     hero-top    — отступ сверху (после хедера). Сейчас 32.
     ====================================== */
  .hero .container { padding-left: 1px; padding-right: 0; }
  .hero__content { padding: 1px 0 0; }
}
.hero__title {
  font-size: clamp(28px, 7vw, 92px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--text);
  max-width: min(1080px, 100%);
  min-width: 0;
  margin: 0 auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
@media (min-width: 640px) {
  .hero__title { margin: 0; }
}
.hero__title-line {
  display: block;
  max-width: 100%;
}
.hero__title-line--accent {
  color: #6c6c66;
}
.hero__lead {
  margin: 18px auto 0;
  max-width: 560px;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.5;
}
@media (min-width: 640px) { .hero__lead { font-size: 16px; margin: 24px 0 0; line-height: 1.55; } }
.hero__ctas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
}
.hero__ctas .btn { width: auto; }
@media (min-width: 640px) {
  .hero__ctas { flex-direction: row; align-items: flex-start; gap: 12px; }
}
.btn--ghost-dark {
  background: transparent;
  color: var(--text);
  border-color: rgba(17, 17, 17, 0.45);
}
.btn--ghost-dark:hover {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--accent);
}
.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 22px;
  height: 36px;
  border: 1.5px solid rgba(17, 17, 17, 0.4);
  border-radius: 999px;
  display: none;
}
.hero__scroll span {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 6px;
  background: var(--text);
  border-radius: 2px;
  animation: heroScroll 1.6s ease-in-out infinite;
}
@keyframes heroScroll {
  0%, 100% { transform: translate(-50%, 0); opacity: 1; }
  50% { transform: translate(-50%, 8px); opacity: 0.4; }
}
@media (min-width: 960px) {
  .hero__scroll { display: block; }
}


/* ============================================================
   USP STRIP
   ============================================================ */

.usp {
  padding: 24px 0 48px;
}
.usp__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.usp__item {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 22px 24px;
  transition: background var(--t);
}
.usp__item:first-child { border-top: 0; }
.usp__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  margin-bottom: 14px;
}
.usp__icon svg { width: 18px; height: 18px; }
.usp__title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 6px;
}
.usp__text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}


/* ============================================================
   AUDIENCE TABS
   ============================================================ */

.audience {
  padding: 36px 0;
}
.tabs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  margin-bottom: 24px;
  width: 100%;
}
.tab {
  min-width: 0;
  padding: 10px 6px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.tab:hover { color: var(--text); }
.tab.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.tab__panels { position: relative; }
.tab__panel {
  display: none;
  grid-template-columns: 1fr;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  overflow: hidden;
}
.tab__panel.is-active { display: grid; }
.tab__text h3 {
  font-size: 22px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}
.tab__text p {
  color: var(--text-2);
  font-size: 15px;
  margin: 0 0 22px;
}
.tab__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  row-gap: 8px;
  margin: 0 0 28px;
  padding: 0;
}
.tab__list li {
  font-size: 14px;
  line-height: 1.35;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 0;
  padding: 2px 0 2px 14px;
  position: relative;
  list-style: none;
}
.tab__list li::before {
  content: '—';
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.35;
}
/* Правая колонка — в шахматку, по центру между левыми пунктами */
.tab__list li:nth-child(even) {
  transform: translateY(calc(50% - 3px));
}

.tab__text > .btn {
  display: block;
  width: fit-content;
  margin: 6px auto 0;
}
.tab__photo {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #ddd;
}
.tab__photo img { width: 100%; height: 100%; object-fit: cover; }


/* ============================================================
   SOLUTIONS
   ============================================================ */

.solutions { padding: 36px 0; }
.solutions__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
  transition: transform var(--t-fast), box-shadow var(--t);
  isolation: isolate;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 700ms ease;
}
.card:hover .card__media { transform: scale(1.05); }

/* Белый фейд снизу + чёрный текст поверх */
.card__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 50%,
    rgba(255, 255, 255, 0.85) 78%,
    #ffffff 100%
  );
  pointer-events: none;
}

.card__caption {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  bottom: 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  align-items: end;
  color: var(--text);
}
.card__title {
  grid-column: 1 / 2;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}
.card__text {
  grid-column: 1 / 2;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}
.card__arrow {
  grid-row: 1 / 3;
  grid-column: 2 / 3;
  align-self: end;
  font-size: 22px;
  line-height: 1;
  color: var(--text);
  transition: transform var(--t);
}
.card:hover .card__arrow { transform: translateX(4px); }


/* ============================================================
   DARK CTA
   ============================================================ */

.cta-dark {
  margin: 36px 0;
  padding: 0;
}
.cta-dark__inner {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 56px 28px;
  color: #fff;
  display: grid;
  gap: 22px;
  overflow: hidden;
  isolation: isolate;
  background: #131313;
  min-height: 280px;
}
.cta-dark__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.7) saturate(0.95);
}
.cta-dark__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.25) 60%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
}
.cta-dark__content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 22px;
}
.cta-dark__text h2 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 14px;
  color: #fff;
}
.cta-dark__text p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  max-width: 620px;
  line-height: 1.55;
}
.cta-dark__content .btn--light { align-self: start; }


/* ============================================================
   PORTFOLIO
   ============================================================ */

.portfolio { padding: 36px 0; }
.portfolio__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.portfolio__item {
  margin: 0;
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  isolation: isolate;
  min-width: 0;
  min-height: 0;
}
.portfolio__item--tall { aspect-ratio: 3 / 4; }
.portfolio__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 600ms ease;
}
.portfolio__item:hover img { transform: scale(1.03); }
/* По умолчанию — чистое фото без фейда. На hover проявляется тёмный градиент снизу + подпись. */
.portfolio__item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 45%,
    rgba(0, 0, 0, 0.5) 75%,
    rgba(0, 0, 0, 0.85) 100%
  );
  opacity: 0;
  transition: opacity var(--t);
  pointer-events: none;
}
.portfolio__item:hover::after { opacity: 1; }
/* На тач-устройствах hover нет — показываем градиент всегда */
@media (hover: none), (max-width: 639px) {
  .portfolio__item::after { opacity: 1; }
}
.portfolio__item figcaption {
  position: absolute;
  z-index: 2;
  inset: auto 18px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12.5px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--t), transform var(--t);
}
.portfolio__item:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}
@media (hover: none), (max-width: 639px) {
  .portfolio__item figcaption {
    opacity: 1;
    transform: translateY(0);
  }
}
.portfolio__item figcaption span {
  font-weight: 600;
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
}
.portfolio__item figcaption em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12.5px;
  line-height: 1.4;
}


/* ============================================================
   CLIENTS
   ============================================================ */

.clients { padding: 36px 0; }
.clients__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.client {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 14px;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--t), transform var(--t);
}
.client:hover { border-color: var(--line-strong); }
.client img {
  max-width: 80%;
  max-height: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(1) opacity(0.78);
  transition: filter var(--t);
}
.client:hover img { filter: grayscale(0) opacity(1); }
/* Скрываем 9-й (Yappy) лого на мобиле — чтобы 8 = 4 ряда по 2, симметрично */
@media (max-width: 639px) {
  .client--mobile-hide { display: none; }
}
.clients__note {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 760px;
}


/* ============================================================
   PROCESS
   ============================================================ */

.process { padding: 36px 0; }
.process__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  counter-reset: step;
}
.process__step {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  position: relative;
}
.process__num {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.process__step h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.process__step p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
}


/* ============================================================
   CONTACT
   ============================================================ */

.contact { padding: 36px 0 80px; }
.contact__head { margin-bottom: 24px; }
.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.contact__form-wrap { min-width: 0; }
.form {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field__label { font-size: 12px; color: var(--text-muted); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 500; }
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  transition: border-color var(--t), background var(--t);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--accent);
  background: #fff;
}
.field textarea { resize: vertical; min-height: 110px; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23111' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px; padding-right: 40px; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.check input { width: 16px; height: 16px; margin-top: 2px; }
.form__status { margin: 0; font-size: 13px; min-height: 1em; }
.form__status.is-ok { color: #1f7f3a; }
.form__status.is-err { color: #b03020; }

.contact__info { display: flex; flex-direction: column; gap: 22px; }
.contact__block { display: flex; flex-direction: column; gap: 8px; }
.contact__phone {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.contact__email {
  font-size: 16px;
  color: var(--text-2);
  border-bottom: 1px solid var(--line-strong);
  align-self: flex-start;
  padding-bottom: 1px;
}
.contact__msgs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.contact__msgs a {
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-card);
  transition: border-color var(--t);
}
.contact__msgs a:hover { border-color: var(--accent); }
.contact__block p { font-size: 14px; color: var(--text-2); }


/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: #131313;
  color: #fff;
  padding: 44px 0 24px;
  margin-top: 0;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line-dark);
}
.footer__brand p {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--text-on-dark-muted);
  max-width: 420px;
  line-height: 1.55;
}
.footer__nav, .footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer__nav h4, .footer__contacts h4 {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  margin-bottom: 6px;
}
.footer__nav a, .footer__contacts a, .footer__contacts span {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
}
.footer__nav a:hover, .footer__contacts a:hover { color: #fff; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  padding-top: 16px;
}


/* ============================================================
   MOBILE STICKY BAR
   ============================================================ */

.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 8px max(8px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
  gap: 6px;
}
.mobile-bar__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 6px;
  border-radius: 12px;
  font-size: 11px;
  color: var(--text);
  background: var(--bg);
}
.mobile-bar__btn svg { width: 20px; height: 20px; color: var(--text); }
.mobile-bar__btn img { width: 22px; height: 22px; object-fit: contain; display: block; }


/* ============================================================
   BACK ANCHOR BUTTON
   ============================================================ */

.back-anchor {
  position: fixed;
  right: 16px;
  bottom: 92px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 12px;
  font-size: 11px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.back-anchor.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-anchor svg { width: 18px; height: 18px; }
.back-anchor:hover { background: var(--bg); }
.back-anchor:active { transform: scale(0.96); }
@media (min-width: 960px) {
  .back-anchor { bottom: 28px; right: 28px; }
}


/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */

@media (min-width: 640px) {
  :root { --gutter: 22px; }

  .usp__grid { grid-template-columns: repeat(4, 1fr); gap: 0; }
  .usp__item {
    padding: 26px 24px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
  .usp__item:first-child { border-left: 0; }

  .solutions__grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .portfolio__grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .clients__grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .process__list { grid-template-columns: repeat(2, 1fr); gap: 18px; }

  .form__row { grid-template-columns: 1fr 1fr; }
  .form { padding: 28px; }

  .footer__inner { grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
}


/* ============================================================
   RESPONSIVE — DESKTOP
   ============================================================ */

@media (min-width: 960px) {
  :root { --gutter: 20px; }

  .header__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 36px;
  }
  .nav {
    display: inline-flex;
    margin-left: 0;
    justify-self: center;
    gap: 32px;
  }
  .header__right { display: inline-flex; }
  .burger { display: none; }
  .drawer { display: none !important; }
  .mobile-bar { display: none; }

  .hero { padding: 36px 0 56px; }
  .hero__grid {
    grid-template-columns: 1fr 1.05fr;
    gap: 56px;
  }
  .hero__photo { aspect-ratio: 4 / 5; }
  .hero__caption { right: 20px; top: 20px; max-width: 240px; padding: 12px 16px; }

  .usp { padding: 8px 0 36px; }

  .audience { padding: 56px 0; }
  .tab__panel { grid-template-columns: 1fr 1fr; padding: 32px; gap: 36px; align-items: center; }
  .tab__photo { aspect-ratio: 5 / 4; }

  .solutions { padding: 56px 0; }
  .solutions__grid { grid-template-columns: repeat(4, 1fr); }

  .cta-dark { margin: 56px 0; }
  .cta-dark__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 56px;
  }

  .portfolio { padding: 56px 0; }
  .portfolio__grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 230px;
    grid-auto-flow: dense;
    gap: 16px;
  }
  .portfolio__item { aspect-ratio: auto; height: 100%; }
  /* мозаика: 1(2×2) + 3(1×2 верт.) + 5(1×1) = 15 ячеек в 4×4 (1 пустая снизу справа) */
  .portfolio__item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
  }
  .portfolio__item--tall { grid-row: span 2; }

  .clients { padding: 56px 0; }
  .clients__grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .client { min-height: 140px; padding: 24px 28px; }
  .client img { max-height: 76px; max-width: 75%; }
  /* Квадратные / компактные лого — позволяем расти выше для визуального паритета */
  .client--compact img { max-height: 100px; max-width: 70%; }

  .process { padding: 56px 0; }
  .process__list { grid-template-columns: repeat(4, 1fr); }
  .process__step { padding: 26px; }

  .contact { padding: 56px 0; }
  .contact__head { margin-bottom: 36px; }
  .contact__grid { grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
  .contact__info { padding-top: 0; }

  .footer { padding: 64px 0 28px; }
  .footer__inner { grid-template-columns: 2fr 1fr 1fr; }
}


/* ============================================================
   RESPONSIVE — LARGE DESKTOP
   ============================================================ */

@media (min-width: 1200px) {
  .hero__title { font-size: 76px; }
  .hero__photo { aspect-ratio: 5 / 6; }
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .card:hover .card__photo img,
  .portfolio__item:hover img { transform: none; }
}
