/* ═══════════════════════════════════════════
   Offers — hero carousel, offer modal, «С чего можно начать»,
   corner popup, monthly promo slider.
   Built on the studio-system tokens.
   ═══════════════════════════════════════════ */

:root{
    --offer-r-card:clamp(14px,1.1vw,20px);
    --offer-r-ctl:12px;
    --offer-lift:translateY(-4px);
    --offer-shadow-hover:0 18px 40px -12px rgba(12,17,29,.18);
    --offer-ease:cubic-bezier(.22,.61,.36,1);
}

.offer-card,.offer-hero-card,.offers-popup,.offer-modal{
    --offer-fill:var(--acid-green);--offer-on-fill:#0b0f17;--offer-ink:var(--accent-ink);
}
:is(.offer-card,.offer-hero-card,.offers-popup,.offer-modal) .screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ── Shared pieces ─────────────────────────── */

.offer-cta{white-space:nowrap;border-radius:var(--offer-r-ctl)}
.offer-cta--sm{min-height:42px;padding:10px 16px;font-size:.88rem}
.offer-cta--block{width:100%}
.offer-price{display:inline-flex;flex-direction:column;align-items:flex-end;line-height:1.1;white-space:nowrap}
.offer-price__old{color:#94a3b8;font-size:.8rem;font-weight:600}
.offer-price__new{color:var(--text-main);font-family:var(--font-heading);font-size:clamp(1.15rem,1.5vw,1.4rem);font-weight:800;letter-spacing:-.02em}
.offer-points{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.offer-points li{display:flex;gap:8px;align-items:flex-start;color:#475569;font-size:.88rem;line-height:1.45}
.offer-points i{flex:none;display:grid;width:18px;height:18px;margin-top:1px;place-items:center;border-radius:50%;background:var(--offer-fill);color:var(--offer-on-fill);font-size:.65rem}
.offer-points--sm li{font-size:.82rem}

/* ── 2.1 Hero carousel ─────────────────────── */

/* Home hero: offers replace the background / mockup */
.home-hero:has(.offers-hero){background-image:none}
.home-hero:has(.offers-hero)::after{display:none}
.home-hero:has(.offers-hero) .home-hero-editorial>.site-mockup,
.home-hero:has(.offers-hero) .home-hero-editorial>.project-mockup{display:none}
.home-hero:has(.offers-hero)>.home-hero-editorial{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(28px,4vw,64px);align-items:center}

/* Service hero */
.service-hero:has(.offers-hero) .container{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:clamp(28px,4vw,56px);align-items:center}
.service-hero:has(.offers-hero) .service-hero__content{max-width:none;margin:0}
.service-hero:has(.offers-hero) :is(.service-hero__media,.site-mockup,.project-mockup){display:none}
.service-hero:has(.offers-hero) .hero-trust{gap:20px}

.offers-hero{position:relative;width:100%;max-width:560px;justify-self:end;padding-right:30px}
.offers-hero__stack{display:grid;padding-block:84px;perspective:1100px;touch-action:pan-y}
.offers-hero--n1 .offers-hero__stack{padding-block:0}
.offers-hero--n1{padding-right:0}
.offers-hero--n2 .offers-hero__stack{padding-block:0 96px}

.offer-hero-card{
    grid-area:1/1;position:relative;display:grid;grid-template-columns:minmax(0,1fr) 76px;overflow:hidden;
    border:1px solid #e2e8f0;border-radius:var(--offer-r-card);background:#fff;box-shadow:0 24px 48px -20px rgba(12,17,29,.22);
    opacity:0;visibility:hidden;pointer-events:none;transform:scale(.8);transform-origin:50% 50%;
    transition:transform .65s var(--offer-ease),opacity .5s ease,visibility 0s linear .65s,box-shadow .35s ease;
}
.offer-hero-card.is-active,.offer-hero-card.is-prev,.offer-hero-card.is-next{visibility:visible;transition:transform .65s var(--offer-ease),opacity .5s ease,visibility 0s,box-shadow .35s ease}
.offer-hero-card.is-active{z-index:3;opacity:1;pointer-events:auto;transform:none}
.offer-hero-card.is-prev,.offer-hero-card.is-next{z-index:2;opacity:.42;pointer-events:auto;cursor:pointer}
.offer-hero-card.is-prev{transform:translateY(-36%) rotateX(16deg) rotate(-1.6deg) scale(.84)}
.offer-hero-card.is-next{transform:translateY(36%) rotateX(-16deg) rotate(1.6deg) scale(.84)}
.offer-hero-card.is-prev:hover,.offer-hero-card.is-next:hover{opacity:.6}
.offers-hero--n2 .offer-hero-card.is-next{transform:translateY(40%) rotateX(-14deg) rotate(1.4deg) scale(.86)}
.offer-hero-card.is-active:hover{box-shadow:0 30px 56px -18px rgba(12,17,29,.28)}

.offer-hero-card__body{display:flex;min-width:0;flex-direction:column;gap:12px;padding:clamp(20px,2vw,28px)}
.offer-hero-card__name{color:var(--offer-ink);font-size:.72rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.offers-hero .offer-hero-card__title{max-width:none;margin:0 0 6px;color:var(--text-main);font-family:var(--font-heading);font-size:clamp(1.1rem,1.45vw,1.42rem);font-weight:700;line-height:1.25;letter-spacing:-.02em;overflow-wrap:break-word}
.offers-hero .offer-hero-card__title:has(+.offer-hero-card__sub){margin-bottom:0}
.offers-hero .offer-hero-card__sub{max-width:none;margin:0 0 6px;color:var(--text-muted);font-size:clamp(.84rem,.95vw,.95rem);line-height:1.45}
.offer-hero-card__foot{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-top:auto;flex-wrap:nowrap}
.offer-hero-card__aside{position:relative;display:flex;align-items:flex-start;justify-content:center;padding-top:24px;background:linear-gradient(180deg,var(--offer-fill),color-mix(in srgb,var(--offer-fill) 55%,#fff))}
.offer-hero-card__aside::before{position:absolute;inset:0;background:repeating-linear-gradient(135deg,rgba(255,255,255,.18) 0 8px,transparent 8px 18px);content:''}
.offer-hero-card__icon{position:relative;display:grid;width:48px;height:48px;place-items:center;border-radius:14px;background:#fff;color:#0b0f17;font-size:1.5rem;box-shadow:0 6px 16px -6px rgba(12,17,29,.25)}
.offer-hero-card__icon img,.offer-card__icon img,.offers-popup__icon img,.offer-modal__icon img{width:70%;height:70%;object-fit:contain}

.offers-hero__dots{position:absolute;top:50%;right:0;display:flex;flex-direction:column;gap:10px;transform:translateY(-50%)}
.offers-hero--n2 .offers-hero__dots{top:calc(50% - 48px)}
.offers-hero__dot{width:10px;height:10px;padding:0;border:0;border-radius:999px;background:#cbd5e1;transition:height .35s var(--offer-ease),background .35s ease}
.offers-hero__dot:hover{background:#94a3b8}
.offers-hero__dot.is-active{height:28px;background:#0b0f17}

@media(min-width:901px) and (max-width:1024px){
    .home-hero:has(.offers-hero)>.home-hero-editorial{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
}
@media(max-width:900px){
    .home-hero:has(.offers-hero)>.home-hero-editorial,
    .service-hero:has(.offers-hero) .container{grid-template-columns:minmax(0,1fr)}
    .offers-hero{max-width:560px;justify-self:center;padding-right:0}
    .offers-hero__stack{padding-block:64px}
    .offers-hero--n2 .offers-hero__stack{padding-block:0 76px}
    .offers-hero__dots{position:static;flex-direction:row;justify-content:center;margin-top:18px;transform:none}
    .offers-hero__dot.is-active{width:28px;height:10px}
}
@media(max-width:560px){
    .offer-hero-card{grid-template-columns:minmax(0,1fr) 52px}
    .offer-hero-card__body{padding:18px}
    .offer-hero-card__icon{width:38px;height:38px;border-radius:11px;font-size:1.2rem}
    .offer-hero-card__aside{padding-top:18px}
    .offers-hero__stack{padding-block:52px}
    .offer-hero-card.is-prev{transform:translateY(-30%) rotateX(14deg) rotate(-1deg) scale(.88)}
    .offer-hero-card.is-next{transform:translateY(30%) rotateX(-14deg) rotate(1deg) scale(.88)}
    .offer-cta--sm{padding:10px 13px;font-size:.84rem}
}

/* ── Cards: «С чего можно начать» + акции ─── */

.offer-card{
    display:flex;min-width:0;flex-direction:column;gap:12px;padding:24px;border:1px solid #e2e8f0;border-radius:var(--offer-r-card);background:#fff;box-shadow:var(--shadow-card);
    transition:transform .35s var(--offer-ease),box-shadow .35s ease,border-color .35s ease,opacity .7s var(--ease-out,ease);
}
.offer-card:hover{transform:var(--offer-lift);border-color:#d0d5dd;box-shadow:var(--offer-shadow-hover)}
.offer-card__top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.offer-card__icon{display:grid;width:48px;height:48px;flex:none;place-items:center;border-radius:14px;background:var(--offer-fill);color:var(--offer-on-fill);font-size:1.45rem}
.offer-card__name{color:var(--offer-ink);font-size:.72rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.offer-card__title{margin:0;font-size:1.06rem;line-height:1.3;overflow-wrap:break-word}
.offer-card__hook{margin:0;color:var(--text-muted);font-size:.88rem;line-height:1.5}
.offer-card .offer-points{margin-top:2px}
.offer-card__foot{display:grid;gap:12px;margin-top:auto;padding-top:8px}
.offer-seats{justify-self:start;padding:5px 11px;border-radius:999px;background:#fef3f2;color:#b42318;font-size:.76rem;font-weight:700}

.offers-start{border-top:1px solid #e2e8f0;background:#f8f9fc}
.offers-start .section-header{margin-bottom:40px}
.offers-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
/* three offers → three columns, no empty slot */
.offers-grid:has(>.offer-card:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:1180px){.offers-grid,.offers-grid:has(>.offer-card:nth-child(3):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}.offers-grid>.offer-card:nth-child(3):last-child{grid-column:1/-1}}
@media(max-width:640px){.offers-grid>.offer-card:nth-child(3):last-child{grid-column:auto}}
@media(max-width:640px){.offers-grid{grid-template-columns:minmax(0,1fr)}.offer-card{padding:20px}}

/* 2.5 — cards inside the site's .solution-rail slider */
.offers-promo{background:#fff;border-bottom:1px solid #e2e8f0}
.solution-rail.offers-promo__rail{grid-auto-columns:calc(25% - 18px);gap:24px;padding:6px 2px 18px}
.offers-promo__rail .offer-card{scroll-snap-align:start}
@media(max-width:1180px){.solution-rail.offers-promo__rail{grid-auto-columns:calc(50% - 12px)}}
@media(max-width:640px){.solution-rail.offers-promo__rail{grid-auto-columns:86%}}

/* ── 2.2 Offer modal (same overlay as the site's modal) ─ */

.offer-modal-overlay{z-index:1001}
.offer-modal{max-width:940px;padding:0;border-radius:var(--offer-r-card)}
.offer-modal__grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr)}
.offer-modal__info{display:flex;flex-direction:column;gap:12px;padding:36px}
.offer-modal__meta{display:flex;align-items:center;gap:12px}
.offer-modal__icon{display:grid;width:52px;height:52px;place-items:center;border-radius:14px;background:var(--offer-fill);color:var(--offer-on-fill);font-size:1.6rem}
.offer-modal__term{padding:6px 12px;border:1px solid #e2e8f0;border-radius:999px;color:#475569;font-size:.8rem;font-weight:600}
.offer-modal__term:empty{display:none}
.offer-modal__name{color:var(--offer-ink);font-size:.74rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.offer-modal__title{margin:0;font-size:clamp(1.35rem,2.1vw,1.75rem);line-height:1.18;letter-spacing:-.025em}
.offer-modal__hook{margin:0;color:#0b0f17;font-weight:600}
.offer-modal__desc{margin:0;color:var(--text-muted);font-size:.94rem;line-height:1.6}
.offer-modal__hook:empty,.offer-modal__desc:empty{display:none}
.offer-modal__includes{margin-top:8px;padding-top:18px;border-top:1px solid #e2e8f0}
.offer-modal__includes h3{margin:0 0 12px;font-size:.95rem}
.offer-modal__order{display:flex;flex-direction:column;gap:18px;padding:64px 32px 32px;border-left:1px solid #e2e8f0;background:#f8f9fc}
.offer-modal__price{display:flex;flex-direction:column;line-height:1.05}
.offer-modal__price s{color:#94a3b8;font-size:1rem;font-weight:600}
.offer-modal__price s:empty{display:none}
.offer-modal__price b{font-family:var(--font-heading);font-size:clamp(2rem,3.4vw,2.6rem);font-weight:800;letter-spacing:-.03em}
.offer-form{display:grid;gap:14px}
.offer-form .form-group{margin:0}
.offer-form .form-input{border-radius:var(--offer-r-ctl)}
.offer-form__hint{display:block;margin-top:6px;color:#b42318;font-size:.78rem}
.offer-form__methods{margin:0;padding:0;border:0}
.offer-form__methods legend{margin-bottom:8px;font-size:.85rem;font-weight:600}
.offer-form__methods{display:flex;flex-wrap:wrap;gap:8px}
.offer-form__methods legend{width:100%}
.offer-chip{position:relative;cursor:pointer}
.offer-chip input{position:absolute;opacity:0;pointer-events:none}
.offer-chip span{display:inline-flex;align-items:center;gap:6px;padding:8px 13px;border:1px solid #d0d5dd;border-radius:999px;background:#fff;color:#334155;font-size:.84rem;font-weight:600;transition:border-color .2s ease,background .2s ease}
.offer-chip:hover span{border-color:#98a2b3}
.offer-chip input:checked+span{border-color:#0b0f17;background:#0b0f17;color:#fff}
.offer-chip input:focus-visible+span{outline:3px solid var(--focus-ring);outline-offset:2px}
.offer-form__submit{width:100%;border-radius:var(--offer-r-ctl)}
.offer-form .form-consent{margin:0}
@media(max-width:760px){
    .offer-modal__grid{grid-template-columns:minmax(0,1fr)}
    .offer-modal__info{padding:28px 20px 20px}
    .offer-modal__info .offer-modal__meta{padding-right:48px}
    .offer-modal__order{padding:22px 20px 26px;border-left:0;border-top:1px solid #e2e8f0}
}

/* ── 2.4 Corner popup ──────────────────────── */

.offers-popup{
    position:fixed;left:20px;bottom:20px;z-index:180;width:340px;max-width:calc(100vw - 24px);
    padding:14px 16px 16px;border:1px solid #e2e8f0;border-radius:var(--offer-r-card);background:#fff;box-shadow:0 24px 60px -18px rgba(12,17,29,.35);
    opacity:0;transform:translateY(16px);transition:opacity .35s ease,transform .35s var(--offer-ease);
}
.offers-popup.is-shown{opacity:1;transform:none}
.offers-popup.is-suppressed{opacity:0;transform:translateY(16px);pointer-events:none;visibility:hidden}
.offers-popup__head{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.offers-popup__label{flex:1;min-width:0;color:#64748b;font-size:.68rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.offers-popup__nav{display:flex;align-items:center;gap:2px}
.offers-popup__count{min-width:30px;color:#64748b;font-size:.75rem;text-align:center;font-variant-numeric:tabular-nums}
.offers-popup__count b{color:#0b0f17}
.offers-popup__arrow,.offers-popup__close{display:grid;width:28px;height:28px;padding:0;place-items:center;border:0;border-radius:50%;background:transparent;color:#475569;font-size:.9rem}
.offers-popup__arrow:hover,.offers-popup__close:hover{background:#f1f5f9;color:#0b0f17}
.offers-popup__track{touch-action:pan-y}
.offers-popup__slide{display:grid;gap:10px}
.offers-popup__slide.is-active{animation:offers-fade .35s ease}
.offers-popup__row{display:flex;align-items:center;gap:10px}
.offers-popup__icon{display:grid;width:38px;height:38px;flex:none;place-items:center;border-radius:11px;background:var(--offer-fill);color:var(--offer-on-fill);font-size:1.2rem}
.offers-popup__name{flex:1;min-width:0;color:var(--offer-ink);font-size:.72rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.offers-popup__price{display:flex;flex-direction:column;align-items:flex-end;line-height:1.05;white-space:nowrap}
.offers-popup__price__old{color:#94a3b8;font-size:.72rem}
.offers-popup__price__new{font-family:var(--font-heading);font-size:1.15rem;font-weight:800}
.offers-popup__title{margin:0;color:#0b0f17;font-family:var(--font-heading);font-size:.98rem;font-weight:700;line-height:1.3}
@keyframes offers-fade{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:none}}
@media(max-width:560px){
    .offers-popup{left:12px;right:12px;bottom:12px;width:auto;padding:12px 14px 14px}
    .offers-popup .offer-points{display:none}
}

/* While the popup is on screen, hide floating widgets in the same corner
   (and, on phones, in the other corner too). */
body.offers-popup-on :is(.video-vizitka,.video-widget,[data-float-widget="left"],#jvlabelWrap,.jivo-iframe-container,.b24-widget-button-wrapper){opacity:0!important;pointer-events:none!important}
@media(max-width:768px){
    body.offers-popup-on :is(.express-audit-sticky,[data-float-widget],.floating-buttons,.scroll-top){opacity:0!important;pointer-events:none!important}
}

/* ── Reduced motion ────────────────────────── */

@media(prefers-reduced-motion:reduce){
    .offer-hero-card,.offer-card,.offers-popup,.offers-hero__dot{transition:none!important}
    .offer-card:hover{transform:none}
    .offers-popup__slide.is-active{animation:none}
}

/* [hidden] must win over display rules above */
.offers-popup__slide[hidden],.offer-form__hint[hidden],.offer-modal__includes[hidden],.offers-popup[hidden]{display:none}
