/* МЕТАФОРА — стиль снят с metaphora.pro (Tilda):
   фон #0d081a, блоки #120c1d, фиолетовые секции #a771fe, CTA #ccff33,
   заголовки Prosto One, текст TildaSans. */

:root {
  --bg: #0d081a;
  --bg-soft: #120c1d;
  --violet: #a771fe;
  --violet-2: #9985ff;
  --violet-title: #a16df4;
  --lime: #ccff33;
  --white: #ffffff;
  --cream: #ffefef;
  --grey: #afafaf;
  --line: #c7c7c7;

  --font-title: 'Prosto One', Arial, sans-serif;
  --font-text: 'TildaSans', Arial, Helvetica, sans-serif;

  --wrap: 1200px;
  --pad: 40px;
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-text);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; display: block; }
a { color: var(--white); text-decoration: none; }
a:hover { color: var(--lime); }

/* Размеры сняты с metaphora.pro: hero 62/1.2, заголовки блоков t-title_md 52px,
   карточка 22px, описание карточки 18px/1.3 */
h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 400; margin: 0; line-height: 1.2; }
h1 { font-size: 62px; }
h2 { font-size: 52px; line-height: 1.23; }
h3 { font-size: 22px; line-height: 1.25; }
h4 { font-size: 20px; }

p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: 90px 0; }
.section_soft { background: var(--bg-soft); }
.section_tight { padding-top: 24px; }
.section_tight .facts { margin-top: 0; }
.section_violet { background: var(--violet); color: #000; }
.section_violet a { color: #000; }
.section_violet a:hover { color: var(--white); }

.lead { font-size: 26px; line-height: 1.2; color: var(--grey); max-width: 900px; }
.section_violet .lead { color: rgba(0, 0, 0, .72); }
.eyebrow {
  font-family: var(--font-title);
  font-size: 14px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--violet-title); margin-bottom: 18px;
}
.section_violet .eyebrow { color: #000; opacity: .6; }

/* ── Кнопки ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 60px; padding: 14px 44px; max-width: 100%; text-align: center;
  font-family: var(--font-title); font-size: 16px; font-weight: 600;
  border: 0; border-radius: 30px; cursor: pointer;
  background: var(--lime); color: #000;
  box-shadow: 0 2px 3px rgba(0, 11, 48, .25);
  transition: box-shadow .25s ease, background-color .25s ease, color .25s ease;
}
.btn:hover { color: #000; box-shadow: 0 3px 10px 5px rgba(92, 70, 115, .6); }
/* вторичная — фиолетовая с чёрной обводкой, как вторая кнопка на главной */
.btn_ghost {
  background: var(--violet); color: #000; border-radius: 50px;
  box-shadow: inset 0 0 0 1px #000;
}
.btn_ghost:hover { color: #000; background: var(--violet-2); box-shadow: 0 3px 10px 5px rgba(92, 70, 115, .6); }
.section_violet .btn_ghost { background: var(--bg-soft); color: var(--lime); box-shadow: inset 0 0 0 2px #fff; }
.header .btn_ghost { background: var(--bg-soft); color: var(--lime); box-shadow: inset 0 0 0 2px #fff; }

/* ── Шапка ────────────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 8, 26, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.header__in { display: flex; align-items: center; gap: 32px; height: 84px; }
.header__logo { display: flex; align-items: center; }
/* как на metaphora.pro: логотип шириной 150px */
.header__logo img { width: 150px; height: auto; }
.header__nav { display: flex; gap: 28px; margin-left: auto; font-size: 16px; }
.header__nav a.is-active { color: var(--lime); }
.header__cta { display: inline-flex; }
.header__burger { display: none; background: none; border: 0; color: var(--white); font-size: 26px; cursor: pointer; }

/* ── Хлебные крошки ───────────────────────────────────────── */
/* padding-block, а не shorthand: иначе затрёт боковые отступы .wrap */
.crumbs { font-size: 14px; color: var(--grey); padding-top: 28px; }
.crumbs a { color: var(--grey); }
.crumbs a:hover { color: var(--lime); }

/* ── Хиро страницы ────────────────────────────────────────── */
.pagehero { padding-top: 56px; padding-bottom: 40px; }
.pagehero h1 { color: var(--violet-title); max-width: 15ch; }
.pagehero .lead { margin-top: 24px; }
.pagehero__meta { margin-top: 28px; display: flex; gap: 28px; flex-wrap: wrap; font-size: 15px; color: var(--grey); }

/* ── Плейсхолдеры (вместо фото/гифок/галерей) ─────────────── */
.ph {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 24px;
  border: 1px dashed rgba(167, 113, 254, .55);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg,
      rgba(167, 113, 254, .08) 0 12px,
      rgba(167, 113, 254, .02) 12px 24px);
  color: var(--grey);
  font-family: var(--font-title); font-size: 13px; letter-spacing: .06em;
  text-transform: uppercase;
}
.ph::before {
  content: attr(data-kind);
  position: absolute; top: 12px; left: 12px;
  padding: 4px 10px; border-radius: 100px;
  background: var(--violet); color: #000;
  font-size: 11px; letter-spacing: .1em;
}
.ph_16x9 { aspect-ratio: 16 / 9; }
.ph_4x3  { aspect-ratio: 4 / 3; }
.ph_1x1  { aspect-ratio: 1 / 1; }
.ph_wide { aspect-ratio: 21 / 9; max-height: 380px; }
.slot { max-width: 640px; }
.ph__note { max-width: 42ch; text-transform: none; letter-spacing: 0; font-size: 14px; }
.section_violet .ph { border-color: rgba(0, 0, 0, .45); color: rgba(0, 0, 0, .7); }
.section_violet .ph::before { background: #000; color: var(--lime); }

/* ── Настоящие медиа (кадры проектов) ─────────────────────── */
.m {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--radius); background: #0a0612;
}
.m img, .m video { width: 100%; height: 100%; object-fit: cover; }
.m_16x9 { aspect-ratio: 16 / 9; }
.m_4x3  { aspect-ratio: 4 / 3; }
.m_1x1  { aspect-ratio: 1 / 1; }
.m_wide { aspect-ratio: 21 / 9; }
.m_9x16 { aspect-ratio: 9 / 16; }
/* Видео в карточке показывается постером — значок говорит, что там ролик */
.m_play::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 62px; height: 62px; margin: -31px 0 0 -31px;
  border-radius: 50%; background: rgba(13, 8, 26, .72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
  background-image: linear-gradient(transparent, transparent);
  transition: background-color .25s ease;
}
.m_play::before {
  content: ''; position: absolute; left: 50%; top: 50%; z-index: 1;
  margin: -10px 0 0 -5px;
  border: 10px solid transparent; border-left: 16px solid var(--lime);
}
.card:hover .m_play::after { background: rgba(204, 255, 51, .25); }

/* Галерея — колонки, а не сетка: каждый кадр в своих пропорциях и компактный.
   Ничего не кропается, вертикальные кадры не растягивают строку. */
.gallery { columns: 4; column-gap: 14px; }
.gallery_2 { columns: 2; max-width: 620px; }
.gallery_3 { columns: 3; max-width: 940px; }
.tile {
  display: block; position: relative; break-inside: avoid;
  margin: 0 0 14px; border-radius: 12px; overflow: hidden;
  background: #0a0612; cursor: zoom-in;
}
.tile img, .tile video { width: 100%; height: auto; }
.tile::after {
  content: ''; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  border-radius: 12px; transition: box-shadow .2s ease;
}
.tile:hover::after { box-shadow: inset 0 0 0 2px var(--lime); }
.tile_video { cursor: default; }
/* Текстовая плитка — закрывает пустоту, которая остаётся в колонках */
.tile_note {
  background: var(--violet); color: #000; cursor: default;
  padding: 26px 24px 28px;
}
.tile_note p {
  margin: 0; font-family: var(--font-title); font-size: 20px; line-height: 1.25;
}
.tile__eyebrow {
  display: block; margin-bottom: 12px;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(0, 0, 0, .55);
}
.tile_note::after { box-shadow: none; }

/* ── Лайтбокс ─────────────────────────────────────────────── */
.lb {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(6, 3, 12, .94);
  align-items: center; justify-content: center; padding: 32px;
}
.lb.is-open { display: flex; }
.lb img { max-width: 100%; max-height: 84vh; border-radius: 12px; }
.lb__cap {
  position: absolute; left: 0; right: 0; bottom: 26px;
  text-align: center; color: var(--grey); font-size: 15px; padding: 0 32px;
}
.lb__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 54px; height: 54px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .1); color: #fff;
  font-size: 26px; line-height: 1; cursor: pointer;
}
.lb__btn:hover { background: var(--lime); color: #000; }
.lb__prev { left: 20px; }
.lb__next { right: 20px; }
.lb__close { top: 20px; right: 20px; transform: none; }

/* ── Фильтр кейсов ────────────────────────────────────────── */
.filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 40px; }
.filter button {
  height: 44px; padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 100px;
  background: transparent; color: var(--white);
  font-family: var(--font-text); font-size: 15px; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.filter button:hover { border-color: var(--lime); }
.filter button.is-active { background: var(--lime); border-color: var(--lime); color: #000; }

/* ── Сетка карточек ───────────────────────────────────────── */
.grid { display: grid; gap: 24px; }
.grid_2 { grid-template-columns: repeat(2, 1fr); }
.grid_3 { grid-template-columns: repeat(3, 1fr); }

.card {
  display: flex; flex-direction: column;
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s ease, transform .25s ease;
}
.card:hover { border-color: var(--violet); transform: translateY(-4px); }
.card__media { border: 0; border-bottom: 1px dashed rgba(167, 113, 254, .4); border-radius: 0; }
.card__body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card__client { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--violet-title); }
.card__title { font-family: var(--font-title); font-weight: 400; font-size: 22px; line-height: 1.25; color: var(--white); }
.card:hover .card__title { color: var(--lime); }
.card__descr { font-size: 18px; line-height: 1.3; color: var(--white); }
.card__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.tag {
  font-size: 12px; padding: 5px 12px; border-radius: 100px;
  background: rgba(167, 113, 254, .14); color: #cbb4ff;
}

/* ── Услуги: крупные блоки ────────────────────────────────── */
.svc {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center;
  padding: 48px 0; border-top: 1px solid rgba(255, 255, 255, .1);
}
.svc:nth-child(even) .svc__text { order: 2; }
.svc__sub { font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--violet-title); margin-bottom: 12px; }
.svc__list { margin: 22px 0 26px; display: grid; gap: 10px; }
.svc__list li { position: relative; padding-left: 22px; color: var(--cream); font-size: 17px; }
.svc__list li::before { content: '•'; position: absolute; left: 4px; color: var(--violet); }

/* ── Списки-колонки на странице услуги ────────────────────── */
.cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 40px; }
.cols li {
  padding: 18px 20px; border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .07);
  font-size: 17px;
}

/* ── Проза кейса ──────────────────────────────────────────── */
.prose { max-width: 760px; font-size: 19px; color: var(--cream); }
.prose h2 { margin: 48px 0 18px; font-size: 32px; color: var(--white); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 40px 0; }
.fact { padding: 24px; background: var(--bg-soft); border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, .07); }
.fact__k { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--grey); }
.fact__v { font-family: var(--font-title); font-size: 20px; margin-top: 8px; }

/* ── Логотипы партнёров ───────────────────────────────────── */
.partners { display: flex; flex-wrap: wrap; gap: 14px; }
.partners li {
  padding: 14px 22px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 100px;
  font-size: 14px; letter-spacing: .08em; color: var(--grey);
}

/* ── CTA-блок ─────────────────────────────────────────────── */
.cta { text-align: center; }
.cta h2 { max-width: 18ch; margin: 0 auto 28px; }
.cta__contacts { margin-top: 28px; display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; font-size: 18px; }

/* ── Подвал ───────────────────────────────────────────────── */
.footer { background: var(--bg-soft); padding: 64px 0 40px; font-size: 15px; color: var(--grey); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer h4 { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--white); margin-bottom: 16px; }
.footer li { margin-bottom: 10px; }
.footer a { color: var(--grey); }
.footer a:hover { color: var(--lime); }
.footer__bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13px; }

/* ── Адаптив ──────────────────────────────────────────────── */
@media screen and (max-width: 1199px) {
  h1 { font-size: 48px; }
  h2 { font-size: 42px; }
  .grid_3 { grid-template-columns: repeat(2, 1fr); }
  .gallery { columns: 3; }
}

@media screen and (max-width: 899px) {
  body { font-size: 16px; overflow-x: hidden; }
  .btn { min-height: 54px; padding: 12px 24px; font-size: 15px; }
  .filter { gap: 8px; }
  .filter button { height: 40px; padding: 0 16px; font-size: 14px; }
  h1 { font-size: 34px; }
  h2 { font-size: 30px; }
  h3 { font-size: 20px; }
  .lead { font-size: 20px; }
  .card__descr { font-size: 16px; }
  .pagehero { padding-top: 36px; padding-bottom: 24px; }
  .header__logo img { width: 116px; }
  :root { --pad: 20px; }
  .section { padding: 56px 0; }
  .header__nav {
    position: fixed; inset: 84px 0 auto; display: none; flex-direction: column;
    gap: 0; background: var(--bg-soft); padding: 12px 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }
  .header__nav.is-open { display: flex; }
  .header__nav a { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
  .header__burger { display: block; margin-left: auto; }
  .header__cta { display: none; }
  .grid_2, .grid_3, .facts, .cols, .footer__grid { grid-template-columns: 1fr; }
  .gallery { columns: 2; column-gap: 10px; }
  .tile { margin-bottom: 10px; }
  .lb { padding: 16px; }
  .lb__btn { width: 44px; height: 44px; }
  .svc { grid-template-columns: 1fr; gap: 24px; padding: 36px 0; }
  .svc:nth-child(even) .svc__text { order: 0; }
}
