/* «Webivan» v3 first screen: a calm dark studio. The text column is never
   covered; on the right — the free-prototype offer card with the portrait,
   or the portrait alone, or the first screenshot; the strip of works below. */

.cms-section:has(> .cms-section__inner > .wi-hero) { padding-block: 0; overflow: clip; }

.wi-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100svh - var(--wi-hdr-h));
    padding: clamp(24px, 4vw, 64px) 0 clamp(20px, 2vw, 32px);
}
.wi-hero__light {
    position: absolute;
    z-index: -1;
    inset: -20% -30% 0 30%;
    pointer-events: none;
    background: radial-gradient(closest-side at 60% 45%, var(--wi-glow), transparent 75%);
}
.wi-hero__grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
    align-items: center;
    gap: 40px 48px;
}

/* ---- copy ---- */
.wi-hero__copy { position: relative; z-index: 2; display: grid; justify-items: start; gap: 0; max-width: 720px; }
.wi-hero__badge { margin-bottom: 24px; }
.wi-body .wi-hero__title {
    margin: 0;
    font-size: clamp(40px, 5vw, 72px);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.02em;
    color: #fff;
    text-wrap: initial;
}
.wi-body .wi-hero__title--long { font-size: clamp(34px, 3.4vw + 15px, 64px); line-height: 1.04; }
.wi-line { display: block; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.wi-js:not(.wi-still) .wi-line { clip-path: inset(-0.3em -100vw 0 -0.2em); }
.wi-line > span { display: block; }
.wi-line--accent { color: var(--webivan-cobalt-2); }
@media (min-width: 64rem) {
    .wi-hero__title:not(.wi-hero__title--long) .wi-line { white-space: nowrap; }
}
.wi-hero__city { margin: 24px 0 0; color: var(--webivan-text); font-size: 17px; font-weight: 500; }
.wi-hero__lead { margin: 12px 0 0; max-width: 46ch; color: var(--webivan-mute); font-size: var(--wi-fs-lead); line-height: 1.6; }
.wi-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.wi-hero__stats {
    display: grid;
    grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
    align-items: start;
    gap: 16px 24px;
    width: 100%;
    margin: 40px 0 0;
    padding: 24px 0 0;
    border-top: 1px solid var(--webivan-line);
    list-style: none;
}
.wi-hero__stats li { display: grid; align-content: start; gap: 8px; min-width: 0; }
.wi-hero__stats strong {
    font-family: var(--webivan-font-display);
    font-size: clamp(26px, 1vw + 16px, 34px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #fff;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.wi-count__sfx { color: var(--webivan-cobalt-2); }
.wi-hero__stats li > span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 15px;
    line-height: 22px;
    color: var(--webivan-mute);
}

/* ---- offer: «Прототип главной — бесплатно» ---- */
.wi-offer {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30%;
    width: 100%;
    max-width: 560px;
    justify-self: end;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--wi-r-xl);
    background: var(--webivan-deep);
}
.wi-offer--nophoto { grid-template-columns: 1fr; max-width: 520px; }
.wi-offer__photo { position: relative; order: 2; margin: 0; min-height: 100%; background: var(--webivan-raise); }
.wi-offer__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.wi-offer__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10, 11, 24, 0.85)); pointer-events: none; }
.wi-offer__sign {
    position: absolute;
    z-index: 1;
    left: 16px;
    right: 16px;
    bottom: 16px;
    padding: 10px 14px;
    border-radius: var(--wi-r-md);
    background: rgba(10, 11, 24, 0.72);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
}
.wi-offer__body { display: grid; align-content: start; gap: 14px; padding: 28px; min-width: 0; }
.wi-offer__by { display: none; align-items: center; gap: 12px; }
.wi-offer__by img { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; box-shadow: 0 0 0 2px var(--webivan-deep), 0 0 0 3px rgba(255, 255, 255, 0.16); }
.wi-offer__by span { display: grid; gap: 2px; font-size: 13px; line-height: 1.3; color: var(--webivan-mute); }
.wi-offer__by strong { color: #fff; font-size: 15px; font-weight: 600; }
.wi-offer__body > * { margin: 0; }
.wi-body .wi-offer__title { font-size: clamp(22px, 0.8vw + 14px, 26px); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; color: #fff; text-wrap: balance; }
.wi-offer__text { color: var(--webivan-mute); font-size: 14.5px; line-height: 1.55; }
.wi-offer__points { display: grid; gap: 6px; padding: 0; list-style: none; }
.wi-offer__points li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; color: var(--webivan-text); font-size: 14.5px; line-height: 1.45; }
.wi-offer__points svg { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: color-mix(in srgb, var(--webivan-cobalt-2) 18%, transparent); color: var(--webivan-cobalt-2); stroke-width: 3; }
.wi-offer__foot { display: grid; gap: 10px; justify-items: stretch; padding-top: 4px; }
.wi-offer__btn.cms-btn { width: 100%; }
.wi-offer__note { margin: 0; color: var(--webivan-mute); font-size: 14px; text-align: center; }

/* The live mock (js/webivan.js «proto»): a niche's home page assembles, the cursor
   clicks its button, a lead arrives; then the next niche. Static = the first niche, drawn. */
.wi-offer__body { background: radial-gradient(280px circle at var(--mx, -400px) var(--my, -400px), rgba(128, 136, 255, 0.10), transparent 70%); }
.wi-proto {
    --tx: 0deg; --ty: 0deg;
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--wi-r-md);
    background: #0E1024;
    box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
    transform: perspective(800px) rotateX(var(--tx)) rotateY(var(--ty));
    transition: transform 0.5s var(--wi-ease-out);
    font-family: var(--webivan-font-text);
    user-select: none;
}
.wi-proto__bar { display: flex; gap: 5px; align-items: center; height: 24px; padding: 0 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.wi-proto__bar > i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.wi-proto__url { margin-left: 8px; padding: 2px 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); color: var(--webivan-mute); font-size: 10px; line-height: 1.3; }
.wi-proto__page {
    display: grid; gap: 10px; padding: 11px 12px 13px;
    background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--acc) 14%, transparent), transparent 60%);
    transition: opacity 0.35s ease;
}
.wi-proto__nav { display: flex; align-items: center; gap: 8px; }
.wi-proto__logo { display: inline-flex; align-items: center; gap: 5px; margin-right: auto; color: #fff; font-size: 10px; font-weight: 700; }
.wi-proto__logo i { width: 9px; height: 9px; border-radius: 3px; background: var(--acc); }
.wi-proto__nav > i { width: 18px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.18); }
.wi-proto__nav em { padding: 3px 8px; border-radius: 99px; background: color-mix(in srgb, var(--acc) 18%, transparent); color: var(--acc); font-size: 8.5px; font-style: normal; font-weight: 600; }
.wi-proto__hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; align-items: center; }
.wi-proto__copy { display: grid; gap: 5px; justify-items: start; }
.wi-proto__tag { color: var(--acc); font-size: 8.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.wi-proto__h { color: #fff; font-family: var(--webivan-font-display); font-size: 13px; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.wi-proto__sub { color: var(--webivan-mute); font-size: 9.5px; line-height: 1.3; }
.wi-proto__cta { position: relative; margin-top: 3px; padding: 5px 11px; border-radius: 99px; background: var(--acc); color: #0A0B18; font-size: 9.5px; font-weight: 700; transition: transform 0.15s ease; }
.wi-proto__cta::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 var(--acc); opacity: 0; }
.wi-proto__pic { position: relative; display: block; aspect-ratio: 5 / 4; overflow: hidden; border-radius: 8px;
    background: linear-gradient(140deg, color-mix(in srgb, var(--acc) 70%, #0A0B18), color-mix(in srgb, var(--acc) 18%, #12142A)); }
.wi-proto__pic i { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
.wi-proto__pic i:first-child { width: 46%; aspect-ratio: 1; right: -8%; bottom: -12%; }
.wi-proto__pic i:last-child { width: 22%; aspect-ratio: 1; left: 14%; top: 16%; background: rgba(255, 255, 255, 0.35); }
.wi-proto__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wi-proto__cards > span { display: grid; gap: 5px; padding: 7px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.04); color: var(--webivan-text); font-size: 8.5px; line-height: 1.2; }
.wi-proto__cards i { width: 12px; height: 12px; border-radius: 4px; background: color-mix(in srgb, var(--acc) 35%, transparent); }
.wi-proto__cursor { position: absolute; left: 0; top: 0; width: 18px; height: 18px; opacity: 0; transform: translate(var(--cx, 300px), var(--cy, 230px)); pointer-events: none;
    transition: transform 1.1s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.3s ease; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); }
.wi-proto__cursor svg { display: block; width: 100%; height: 100%; }
.wi-proto__toast { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 7px; border-radius: 99px;
    background: #1A1D3A; border: 1px solid rgba(255, 255, 255, 0.12); color: #fff; font-size: 10px; font-weight: 600; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.7);
    opacity: 0; transform: translateY(10px) scale(0.96); transition: opacity 0.3s ease, transform 0.4s var(--wi-ease-out); }
.wi-proto__toast svg { width: 16px; height: 16px; padding: 3px; border-radius: 50%; background: var(--webivan-lime); color: #0A0B18; }
/* Phases (classes from JS). */
.wi-proto.is-build [style*="--k"] { animation: wi-proto-in 0.5s var(--wi-ease-out) both; animation-delay: calc(var(--k) * 110ms); }
.wi-proto.is-build .wi-proto__pic { animation-name: wi-proto-pic; }
@keyframes wi-proto-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes wi-proto-pic { from { opacity: 0; transform: scale(0.94); } }
.wi-proto.is-cursor .wi-proto__cursor { opacity: 1; }
.wi-proto.is-click .wi-proto__cta { transform: scale(0.92); }
.wi-proto.is-click .wi-proto__cta::after { animation: wi-proto-ring 0.6s ease-out; }
@keyframes wi-proto-ring { from { opacity: 0.7; box-shadow: 0 0 0 0 var(--acc); } to { opacity: 0; box-shadow: 0 0 0 10px var(--acc); } }
.wi-proto.is-lead .wi-proto__toast { opacity: 1; transform: none; }
.wi-proto.is-out .wi-proto__page { opacity: 0; }
.wi-proto.is-out .wi-proto__cursor, .wi-proto.is-out .wi-proto__toast { opacity: 0; }

/* ---- portrait alone ---- */
.wi-hero__portrait {
    position: relative;
    justify-self: end;
    width: min(100%, 560px);
    aspect-ratio: 1 / 1.06;
    max-height: calc(100svh - var(--wi-hdr-h) - 220px);
    min-height: 420px;
    margin: 0;
    overflow: hidden;
    border-radius: var(--wi-r-xl);
    background: var(--webivan-deep);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.wi-hero__portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; scale: 1.08; transform-origin: 50% 0; }
.wi-hero__portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(10, 11, 24, 0.55)); pointer-events: none; }

/* ---- no portrait: the first screenshot ---- */
.wi-hero__main { position: relative; justify-self: end; width: min(100%, 680px); aspect-ratio: 16 / 11; box-shadow: var(--wi-elev-2), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.wi-hero__main-shot { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.wi-hero__main-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.6s var(--wi-ease-out); }
@media (hover: hover) and (pointer: fine) { .wi-hero__main:hover .wi-hero__main-shot img { transform: scale(var(--wi-hover-zoom)); } }

/* ---- the strip of works ---- */
.wi-marquee {
    position: relative;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.wi-hero__marquee { margin: clamp(24px, 3vw, 48px) calc(50% - 50vw) 0; }
.wi-marquee__track { display: flex; width: max-content; animation: wi-marquee 64s linear infinite; }
.wi-marquee__item {
    flex: 0 0 auto;
    width: clamp(150px, 11vw, 200px);
    aspect-ratio: 16 / 10;
    margin-right: 16px;
    overflow: hidden;
    border-radius: var(--wi-r-sm);
    background: var(--webivan-deep);
    box-shadow: 0 0 0 1px var(--webivan-line);
    opacity: 0.7;
}
.wi-marquee__item img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.wi-marquee:hover .wi-marquee__track, .wi-marquee.is-off .wi-marquee__track { animation-play-state: paused; }
@keyframes wi-marquee { to { transform: translateX(-50%); } }
.wi-still .wi-marquee__track { animation: none; }

/* ---- the entrance: a shift only, ≤ 1 s — the first screen is never hidden ---- */
.wi-js:not(.wi-still) .wi-hero .wi-in { animation: wi-rise 0.6s var(--wi-ease-out) both; animation-delay: calc(var(--in, 0) * 70ms + 40ms); }
.wi-js:not(.wi-still) .wi-hero .wi-line > .wi-in { animation-name: wi-line-up; animation-duration: 0.7s; }
.wi-js:not(.wi-still) .wi-hero :is(.wi-offer, .wi-hero__portrait, .wi-hero__main).wi-in { animation-name: wi-card-in; animation-duration: 0.8s; animation-delay: 160ms; }
@keyframes wi-rise { from { transform: translateY(16px); } }
@keyframes wi-line-up { from { transform: translateY(36%); } }
@keyframes wi-card-in { from { transform: translateY(20px) scale(0.985); } }

/* ---- laptops: the card narrows, the photo panel becomes a round portrait ---- */
@media (max-width: 89.99rem) and (min-width: 64rem) {
    .wi-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 460px); }
    .wi-offer { grid-template-columns: 1fr; max-width: 460px; }
    .wi-offer__photo { display: none; }
    .wi-offer__by { display: flex; }
}

/* ---- tablets and phones: text first, the card under it ---- */
@media (max-width: 63.99rem) {
    .wi-hero { min-height: 0; padding-top: 16px; }
    .wi-hero__grid { grid-template-columns: 1fr; gap: 40px; }
    .wi-hero__badge { margin-bottom: 20px; }
    .wi-offer { justify-self: stretch; max-width: none; grid-template-columns: minmax(0, 1fr) 36%; }
    .wi-hero__portrait { justify-self: center; width: min(100%, 520px); max-height: none; min-height: 0; }
    .wi-hero__main { justify-self: stretch; width: 100%; }
}
@media (max-width: 47.99rem) {
    .wi-body .wi-hero__title { font-size: clamp(36px, 10.4vw, 44px); }
    .wi-body .wi-hero__title--long { font-size: clamp(28px, 7.6vw, 34px); }
    .wi-hero__city { font-size: 16px; margin-top: 20px; }
    .wi-hero__lead { font-size: 16px; }
    .wi-hero__actions { width: 100%; margin-top: 28px; }
    .wi-hero__actions > *, .wi-hero__actions .cms-btn { flex: 1 1 100%; }
    .wi-hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 32px; gap: 20px 16px; }
    .wi-offer { grid-template-columns: 1fr; border-radius: var(--wi-r-lg); }
    .wi-offer__photo { order: 0; height: 240px; min-height: 0; }
    .wi-offer__photo img { object-position: 50% 6%; }
    .wi-offer__body { padding: 24px 20px; }
}
