/* =========================================================
   MIRIDEA · обновлённые блоки v1.0
   1) «Мы предлагаем» — все услуги в одной сетке
   2) «Студия в цифрах» — полоса на всю ширину, живые цифры
   3) Подвал — колонка «Услуги» в две колонки
   ========================================================= */

/* ---------- 1. Мы предлагаем ----------
   Компактные плитки по 6 в ряд, подписи в одну строку.
   16 услуг + широкая плитка-призыв на 2 места = 3 ровных ряда. */
.m-offer .title2 { margin-bottom: 30px; }
.m-offer__grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px;
}
@media (max-width: 1200px) { .m-offer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 768px)  { .m-offer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } }
@media (max-width: 520px)  { .m-offer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.m-offer__grid .cards__column { display: block; height: 100%; min-width: 0; border-radius: 10px 20px 10px 20px; }
.m-offer__grid .cards__item { min-height: 0; gap: 14px; padding: 22px 10px 18px; }
.m-offer__grid .cards__icon { height: 38px; }
.m-offer__grid .cards__icon img, .m-offer__grid .cards__icon svg, .m-offer__grid .m-icon { width: 38px; height: 38px; }
.m-offer__grid .cards__item p {
  font-size: 14px; line-height: 1.25; color: #6b7690; text-align: center;
  white-space: nowrap; max-width: 100%;
}
@media (max-width: 1200px) { .m-offer__grid .cards__item p { white-space: normal; text-wrap: balance; } }
/* Наведение — как у всех плиток сайта: градиентная подложка, белый текст и белые иконки */
.m-offer__grid .cards__column:hover .cards__item p { color: #fff; }

/* Плитка-призыв на два места */
.m-offer__cta {
  grid-column: span 2; position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; border-radius: 10px 20px 10px 20px;
  background: linear-gradient(120deg, #a068f8 0%, #3f55c3 45%, #184eae 100%); background-size: 200% 100%;
  color: #fff; text-decoration: none;
  box-shadow: 0 14px 30px -16px rgba(63, 85, 195, .8);
  transition: background-position .8s cubic-bezier(.22, 1, .36, 1), transform .4s cubic-bezier(.22, 1, .36, 1), box-shadow .4s;
}
.m-offer__cta:hover { background-position: 100% 0; transform: translateY(-4px); box-shadow: 0 22px 40px -18px rgba(63, 85, 195, .9); }
.m-offer__cta-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.m-offer__cta-text b { font-size: 16px; font-weight: 600; line-height: 1.2; }
.m-offer__cta-text span { font-size: 13px; line-height: 1.35; opacity: .85; }
.m-offer__cta-arrow {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35);
  transition: transform .4s cubic-bezier(.22, 1, .36, 1), background-color .3s;
}
.m-offer__cta-arrow svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.m-offer__cta:hover .m-offer__cta-arrow { transform: translateX(4px); background: rgba(255, 255, 255, .28); }
.m-offer__cta:focus-visible { outline: 2px solid #a068f8; outline-offset: 3px; }
@media (max-width: 1200px) { .m-offer__cta { grid-column: span 4; } }
@media (max-width: 768px)  { .m-offer__cta { grid-column: span 2; } }
@media (max-width: 520px)  { .m-offer__cta { grid-column: span 2; } }

/* Серые иконки доп. услуг перекрашиваем в фирменный градиент через маску */
.m-icon {
  display: block; width: 44px; height: 44px;
  background: linear-gradient(135deg, #a068f8 0%, #3f55c3 62%, #184eae 100%);
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
  transition: transform .6s cubic-bezier(.34, 1.56, .64, 1);
}
.cards__column:hover .m-icon { transform: translateY(-4px) rotate(-6deg) scale(1.12); }

/* Плашка «Новое» */
.m-offer__badge {
  position: absolute; z-index: 11; top: 8px; right: 8px;
  padding: 3px 8px; border-radius: 999px;
  background: linear-gradient(135deg, #f93c3c, #cd0973); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 6px 14px -6px rgba(205, 9, 115, .7);
  animation: m-badge 2.6s ease-in-out infinite;
}
@keyframes m-badge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* ---------- 2. Студия в цифрах ---------- */
.m-stats {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: clamp(64px, 7vw, 110px);
  color: #fff;
  background: #3a2fb5;
}
.m-stats__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.m-stats__img {
  position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover;
  translate: 0 var(--m-par, 0); will-change: translate;
}
.m-stats__bg::before { /* фирменный градиент поверх фото + лёгкая сетка */
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(125deg, rgba(36, 44, 150, .92) 0%, rgba(63, 85, 195, .82) 45%, rgba(122, 43, 214, .85) 100%);
}
.m-stats__orb { position: absolute; z-index: 2; border-radius: 50%; filter: blur(60px); opacity: .55; animation: m-orb-float 14s ease-in-out infinite alternate; }
.m-stats__orb--1 { width: 420px; height: 420px; left: -120px; top: -140px; background: #f93c3c; opacity: .35; }
.m-stats__orb--2 { width: 520px; height: 520px; right: -160px; bottom: -220px; background: #a068f8; animation-duration: 18s; }
@keyframes m-orb-float { from { transform: translate(0, 0); } to { transform: translate(60px, 40px); } }

.m-stats__head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); align-items: end;
  gap: 16px 40px; margin-bottom: clamp(28px, 3.5vw, 48px);
}
.m-stats__title {
  margin: 0; color: #fff; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.05; font-weight: 700;
  text-transform: uppercase; text-wrap: balance;
}
.m-stats__lead { margin: 0; font-size: 16px; line-height: 1.5; color: rgba(255, 255, 255, .8); }

.m-stats__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.m-stat {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 26px 24px 24px;
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 10px 26px 10px 26px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), background-color .4s, border-color .4s, box-shadow .5s;
}
.m-stat:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, .45);
  box-shadow: 0 24px 50px -24px rgba(10, 8, 60, .7);
}
.m-stat--hero { grid-column: span 2; padding: 30px 32px; }
.m-stat__icon {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  transition: transform .6s cubic-bezier(.34, 1.56, .64, 1), background-color .4s;
}
.m-stat__icon svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.m-stat:hover .m-stat__icon { transform: rotate(-8deg) scale(1.08); background: rgba(255, 255, 255, .24); }
.m-stat__value {
  display: flex; align-items: baseline; flex-wrap: nowrap; gap: 4px; white-space: nowrap;
  margin: 8px 0 0; font-size: clamp(40px, 3.6vw, 56px); line-height: 1; font-weight: 700; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.m-stat__value b { font-weight: 700; }
.m-stat__value span { font-size: .5em; font-weight: 600; letter-spacing: 0; opacity: .85; }
.m-stat--hero .m-stat__value { font-size: clamp(64px, 7vw, 108px); }
.m-stat__label { margin: 0; font-size: 15px; line-height: 1.4; color: rgba(255, 255, 255, .82); text-wrap: balance; }
.m-stat--hero .m-stat__label { font-size: 17px; max-width: 34ch; }

/* Линия времени 2006 → сегодня */
.m-stat__timeline { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 14px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .75); font-variant-numeric: tabular-nums; }
.m-stat__timeline i { position: relative; flex: 1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.m-stat__timeline em {
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg, #fff 0%, #ffb3c7 60%, #f93c3c 100%);
  transform: scaleX(0); transform-origin: left; transition: transform 2s cubic-bezier(.22, 1, .36, 1) .3s;
}
.m-stat.m-in .m-stat__timeline em, html:not(.m-js) .m-stat__timeline em { transform: scaleX(1); }

@media (max-width: 1000px) {
  .m-stats__head { grid-template-columns: 1fr; }
  .m-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .m-stats__grid { gap: 10px; }
  .m-stat { padding: 20px 16px 18px; }
  .m-stat--hero { padding: 24px 20px; }
  .m-stat__value { font-size: 36px; }
  .m-stat--hero .m-stat__value { font-size: 64px; }
  .m-stat__label { font-size: 13px; }
}

/* ---------- 3. Подвал: услуги в две колонки ---------- */
.footer-center__column--services ul { display: block; columns: 2; column-gap: 40px; }
.footer-center__column--services ul li { break-inside: avoid; margin-bottom: 20px; }
@media (max-width: 1200px) { .footer-center__column--services ul { column-gap: 24px; } }

@media (prefers-reduced-motion: reduce) {
  .m-offer__badge, .m-stats__orb { animation: none !important; }
  .m-stat__timeline em { transition: none; transform: scaleX(1); }
}

/* Наведение после анимации появления: без задержки и с подъёмом
   (правило появления в motion.css иначе перебивает transform) */
html.m-js .m-reveal.m-in:hover { transition-delay: 0s; }
html.m-js .m-offer .cards__column.m-reveal.m-in:hover { transform: translateY(-6px); }
html.m-js .m-stat.m-reveal.m-in:hover { transform: translateY(-6px); }

/* Двухцветный заголовок: тёмная часть + фирменный красный градиент (как «Наши кейсы») */
.title2.m-title-duo { text-transform: uppercase; }
.title2.m-title-duo span { -webkit-text-fill-color: #39404b; color: #39404b; }
/* «Наши кейсы» — в общем стиле заголовков; отступ задаёт шапка блока */
.m-cases__head .m-cases__title2 { margin: 0; }

/* ---------- Отличительные преимущества: 6 в ряд + плитка-призыв на 4 места ---------- */
.m-benefits .cards.cards--transparent { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1200px) { .m-benefits .cards.cards--transparent { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 768px)  { .m-benefits .cards.cards--transparent { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.m-benefits .cards__column { border-radius: 10px 20px 10px 20px; min-width: 0; }
.m-benefits .cards__item { min-height: 0; gap: 14px; padding: 22px 10px 18px; }
.m-benefits .cards__icon { height: 38px; }
.m-benefits .cards__icon img { width: 38px; height: 38px; }
.m-benefits .cards__item p { font-size: 14px; line-height: 1.3; text-wrap: balance; }
.m-benefits .cards__item p br { display: none; } /* строки переносятся сами по ширине плитки */

/* В преимуществах призыв всегда на 2 места: 10 плиток + призыв = ровные ряды при 6, 4 и 2 колонках */
.m-offer__cta.m-offer__cta--pair { grid-column: span 2; }
.m-benefits .m-icon { width: 38px; height: 38px; }

/* Подвал: «© 2006-2026 Студия Miridea» в одну строку */
.m-nowrap { white-space: nowrap; }
@media (min-width: 1101px) { .footer-left { flex: 0 0 auto; min-width: 196px; } }

/* Иконки, перекрашенные маской (.m-icon), при наведении тоже белеют — как обычные иконки сайта */
.cards__column:hover .m-icon { background: #fff; }
