/* 01.12: hero «Макет» (backend/pages/promo-maket.php, js/promo-maket.js) — из концепта concepts/hero-2026-11, вариант 3 */
.hero--maket { --exp: cubic-bezier(.16, 1, .3, 1); color: var(--ink); background: radial-gradient(1200px 700px at var(--lx, 50%) var(--ly, 40%), #e9eae6 0%, #d3d5d0 55%, #c6c8c3 100%); perspective: 1600px; display: grid; place-items: center; overflow: hidden; }
.hero--maket::before { display: none; }
/* едва заметное фото того же проекта на фоне */
.hm__bg { position: absolute; inset: -40px; opacity: .21; filter: saturate(.55) blur(2px); transform: translate(var(--hm-bg-x, 0px), var(--hm-bg-y, 0px)) scale(1.04); transition: transform 1.15s var(--exp); pointer-events: none; }
.hm__bg-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; }
.hm__bg-photo.is-current { opacity: 1; }
.hm__bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 70% at 62% 50%, rgba(233, 234, 230, 0) 0%, rgba(233, 234, 230, .55) 100%); }
.hm__word { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -54%) translateX(var(--wx, 0)); margin: 0; font-weight: 800; font-size: 25vw; line-height: 1; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1.5px rgba(17, 17, 17, .16); white-space: nowrap; pointer-events: none; user-select: none; transition: transform 1.2s var(--exp); }
.hm__rig { --w: min(44vw, calc((100svh - var(--hdr) - var(--adv-h) - 150px) * 1.3333)); position: relative; width: var(--w); aspect-ratio: 4 / 3; transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); margin-top: -20px; margin-left: 32vw; }
.hm__in { position: absolute; inset: 0; transform-style: preserve-3d; opacity: 0; }
.hero--maket.is-in .hm__in { opacity: 1; animation: hmIn 1.6s cubic-bezier(.2, 1.1, .3, 1) both; }
@keyframes hmIn { from { transform: translateY(140px) rotateX(58deg) scale(.86); opacity: 0; } 40% { opacity: 1; } }
.hm__shadow { position: absolute; left: 8%; right: 8%; bottom: -9%; height: 16%; border-radius: 50%; background: rgba(20, 22, 18, .42); filter: blur(30px); transform: translateZ(-120px) translateX(calc(var(--ry, 0deg) / 1deg * -3px)); }
.hm__deck { position: absolute; inset: 0; transform-style: preserve-3d; touch-action: pan-y; cursor: grab; }
.hm__deck:active { cursor: grabbing; }
.hm__card { position: absolute; inset: 0; border-radius: 18px; overflow: hidden; background: #8a8c88 center / cover no-repeat; box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 40px 80px -30px rgba(0, 0, 0, .45); transition: transform .9s var(--exp), opacity .6s, filter .9s; backface-visibility: hidden; }
.hm__card[data-k="0"] { transform: translateZ(0); }
.hm__card[data-k="1"] { transform: translateZ(-50px) translateY(-22px) scale(.97); filter: brightness(.82); }
.hm__card[data-k="2"] { transform: translateZ(-100px) translateY(-42px) scale(.94); filter: brightness(.68); }
.hm__card[data-k="3"], .hm__card[data-k="4"] { transform: translateZ(-140px) translateY(-56px) scale(.92); opacity: 0; }
.hm__card.is-toss { transition: transform .75s cubic-bezier(.5, 0, .3, 1), opacity .75s; opacity: 0; }
.hm__card.is-drag { transition: none; }
.hm__glare { position: absolute; inset: 0; border-radius: 18px; pointer-events: none; transform: translateZ(1px); background: radial-gradient(600px circle at var(--gx, 30%) var(--gy, 20%), rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 45%); mix-blend-mode: soft-light; }
/* белый блок цены: цена, две кнопки; слева от него летает листалка проектов */
.hm__price { position: absolute; right: -6%; bottom: -8%; transform: translateZ(110px); padding: 20px 22px 22px 26px; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .45); }
.hm__pp { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.hm__pp b { font-size: clamp(34px, 2.8vw, 48px); line-height: 1.05; font-weight: 300; letter-spacing: -.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hm__pp s { font-size: 16px; color: var(--ink-3); text-decoration-thickness: 1.5px; white-space: nowrap; }
.hm__acts { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.hm__more { display: inline-flex; align-items: center; height: 52px; padding: 0 22px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); font-weight: 500; font-size: 15px; white-space: nowrap; transition: background .3s, color .3s; }
.hm__more:hover { background: var(--ink); color: #fff; }
.hm__more:focus-visible, .hm__calc:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.hm__ctrl { position: absolute; right: calc(100% + 16px); bottom: 0; white-space: nowrap; display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: 999px; background: #fff; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .5); }
.hm__ctrl button { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); background: rgba(255, 255, 255, .35); transition: background .3s, color .3s; }
.hm__ctrl button svg { width: 16px; height: 16px; }
.hm__ctrl button:hover { background: var(--ink); color: #fff; }
.hm__ctrl button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.hm__cnt { min-width: 64px; text-align: center; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.hm__dots { display: flex; gap: 6px; margin: 0 4px; }
.hm__dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(17, 17, 17, .45); transition: width .5s var(--exp), background .5s; }
.hm__dots i.is-on { width: 22px; background: var(--ink); }
/* ленты акции: выезжают из-за края кадра (передняя слева, задняя справа), текст бежит */
.hm__tape { position: absolute; left: -220%; right: -220%; height: 50px; display: flex; align-items: center; overflow: hidden; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .03em; white-space: nowrap; pointer-events: none; transform-origin: 50% 50%; }
@property --ta { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --tb { syntax: "<number>"; inherits: false; initial-value: 0; }
.hm__tape { visibility: hidden; transition: --ta 1.6s var(--exp) .9s, --tb 1.6s var(--exp) 1.15s, visibility 0s var(--tape-delay); }
.hero--maket.is-in .hm__tape { visibility: visible; --ta: 1; --tb: 1; }
.hm__tape--a { --tape-delay: .9s; top: 86%; transform: translateZ(140px) rotate(-4.5deg) translateX(calc((1 - var(--ta, 0)) * -145%)); }
.hm__tape--b { --tape-delay: 1.15s; top: 30%; transform: translateZ(-60px) rotate(13deg) translateX(calc((1 - var(--tb, 0)) * 145%)); background: #2a2a2a; }
.hm__tape span { display: inline-block; will-change: transform; }
/* слева — заголовок акции и проект, который сейчас наверху колоды */
.hm__txt { position: absolute; z-index: 2; left: var(--gutter); top: 50%; transform: translateY(-56%); max-width: 38vw; color: var(--ink); pointer-events: none; }
.hm__txt h1 { margin: 0; font-weight: 200; font-size: clamp(76px, 8.6vw, 172px); line-height: .9; letter-spacing: -.055em; }
.hm__txt p { margin: clamp(20px, 2.6vh, 32px) 0 0 4px; font-size: clamp(20px, 1.8vw, 34px); line-height: 1.3; font-weight: 500; color: var(--ink-2); max-width: 24ch; }
.hm__txt p span { color: var(--ink); font-weight: 700; }
.hero--maket .hm__txt { opacity: 0; }
.hero--maket.is-in .hm__txt { opacity: 1; animation: hmTxt 1.2s var(--exp) .2s both; }
@keyframes hmTxt { from { opacity: 0; translate: -40px 0; } }

@media (min-width: 901px) {
  .hm__deck, .hm__glare, .hm__shadow { scale: 1.1; }
  .hm__tape { left: calc(-88vw + var(--w) / 2); right: calc(-88vw + var(--w) / 2); }
  .hm__tape--a { left: calc(-94vw + var(--w) / 2); transform: translateZ(52px) rotate(-4.5deg) translateX(calc((1 - var(--ta, 0)) * -145%)); }
  .hm__txt { left: calc(var(--gutter) + 10px); top: calc(50% + 10px); }
  .hm__price { bottom: calc(-8% - 14px); }
}

/* телефон: текст сверху, колода по центру, цена под ней, листалка над ценой */
@media (max-width: 900px) {
  .hero--maket { place-items: end center; padding-bottom: 150px; }
  .hm__word { font-size: 42vw; top: 58%; }
  .hm__rig { --w: min(84vw, calc((100svh - var(--hdr) - 340px) * 1.3333)); margin: 0; }
  .hm__txt { top: clamp(18px, 4svh, 40px); transform: none; max-width: none; right: var(--gutter); }
  .hm__txt h1 { font-size: clamp(44px, 13vw, 72px); }
  .hm__txt p { font-size: 18px; margin-top: 12px; }
  .hm__price { left: 4%; right: 4%; bottom: auto; top: calc(100% + 18px); padding: 16px; }
  .hm__pp b { font-size: 30px; }
  .hm__acts { gap: 8px; }
  .hm__acts .btn { padding-left: 16px; gap: 10px; height: 46px; font-size: 14px; flex: 1; justify-content: space-between; }
  .hm__acts .btn__ic { width: 34px; height: 34px; }
  .hm__more { height: 46px; padding: 0 14px; font-size: 14px; }
  .hm__ctrl { right: auto; left: 0; bottom: calc(100% + 10px); gap: 8px; padding: 4px; }
  .hm__ctrl button { width: 38px; height: 38px; }
  .hm__dots { display: none; }
  .hm__tape { height: 38px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero--maket.is-in .hm__in, .hero--maket.is-in .hm__txt { animation: none; }
  .hm__tape, .hm__bg, .hm__bg-photo { transition: none; }
}

/* 01.12: на телефоне (≤900px) — прежний слайдер акций (#promoHero идёт сразу за «Макетом»), на ПК — только «Макет».
   Если слайдов нет, «Макет» остаётся и на телефоне (свой мобильный вид выше). */
@media (max-width: 900px) { .hero--maket:has(+ #promoHero) { display: none; } }
@media (min-width: 901px) { .hero--maket + #promoHero { display: none; } }


@media (min-width: 901px) and (max-width: 1120px) {
  .hm__ctrl { right: 0; bottom: calc(100% + 10px); gap: 8px; }
  .hm__ctrl button { width: 38px; height: 38px; }
}
