/* =============================================================
   Motion layer: contour hero, About curtain, one line, live case
   covers, odometer numbers, contour contacts. See README-motion.md.
   ============================================================= */

/* ---------- contour canvases (hero + contacts) ---------- */
.motion-contours { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.4s var(--ease); }
.motion-contours.is-ready { opacity: 1; }

/* ---------- hero pinned under the About curtain (desktop, set by motion.js) ---------- */
.hero-pin-wrap.is-pinned { height: 220vh; }
.hero-pin-wrap.is-pinned > .hero { position: sticky; top: 0; height: 100vh; min-height: 0; }
.hero-pin-wrap.is-pinned + #about { margin-top: -100vh; z-index: 3; box-shadow: 0 -40px 80px rgba(0, 0, 0, .35); }
.hero-shade { position: absolute; inset: 0; z-index: 4; background: var(--c-ink); opacity: 0; pointer-events: none; }
.hero-pin-wrap.is-pinned .hero-title .line,
.hero-pin-wrap.is-pinned .hero-portrait { will-change: transform, opacity; }

/* ---------- the line replaces the About rail and underlines ---------- */
.has-thread .about-editorial .about-wrap::before { display: none; }
.has-thread .about-editorial .about-lead em { text-decoration-color: transparent; }
/* the three word underlines are strands of the line, drawn by thread.js */
.has-thread .about-editorial .about-lead-sub span { text-decoration-color: transparent; }
/* in the approach the line is the rail of the stack; each marker lights when it is reached */
.has-thread .result-stack { border-left-color: rgba(10, 10, 10, .1); }
.has-thread .result-card::before { background: rgba(10, 10, 10, .22); transition: background .5s var(--ease); }
.has-thread .result-card.is-reached::before { background: var(--c-accent); }

.thread-line { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 18; pointer-events: none; }
/* phones: the canvas sits in the page and is moved to the viewport each frame (thread.js) */
.thread-line--page { position: absolute; top: 0; left: 0; right: auto; bottom: auto; height: 100vh; will-change: transform; }

/* ---------- live covers inside the existing catalog cards ---------- */
.catalog-image { position: relative; }
.cover-art { position: absolute; inset: 0; overflow: hidden; background: #0d0d0c; }
.cover-art.is-fit .art { visibility: visible; }
.cover-art canvas { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- approach: odometer numbers ---------- */
.result-number.odo { display: inline-flex; }
.odo-d { display: block; height: 1em; overflow: hidden; line-height: 1; }
.odo-strip { display: flex; flex-direction: column; }
.odo-strip span { display: block; height: 1em; line-height: 1; }
.result-number.odo.is-in .odo-strip { transition: transform 1.6s var(--ease); }
.result-text strong .count { font-variant-numeric: tabular-nums; }

/* ---------- contacts ---------- */
.contacts--ribbon { padding-bottom: clamp(72px, 8vw, 112px); }
.contact-row--tg { background: var(--c-accent); color: var(--c-ink); border-bottom-color: transparent; padding-left: 20px; padding-right: 20px; transition: transform .9s cubic-bezier(.34, 1.56, .64, 1), padding-left .35s var(--ease); will-change: transform; }
.contact-row--tg .contact-label, .contact-row--tg .contact-value { color: var(--c-ink); }
.contact-row--tg .contact-ico { filter: none; }
.contact-row--tg::before { background: rgba(10, 10, 10, .06); }
.contact-row--tg.is-pulling { transition-duration: .15s, .35s; }
.contact-row--tg::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--c-accent); opacity: 0; pointer-events: none; }
.contact-row--tg.is-hit::after { animation: tg-pulse 1.4s var(--ease) 2; }
@keyframes tg-pulse { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(1.06, 1.35); } }
.contact-mail { position: relative; }
.contact-mail .contact-row { padding-right: 140px; }
.contact-copy {
    position: absolute; z-index: 2; right: 4px; top: 50%; transform: translateY(-50%);
    height: 34px; padding: 0 12px; overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .22); background: transparent; color: var(--c-paper);
    font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; cursor: pointer;
}
.contact-copy-track { display: flex; flex-direction: column; transition: transform .5s var(--ease); }
.contact-copy-track span { display: block; height: 32px; line-height: 32px; white-space: nowrap; }
.contact-copy.is-copied { background: var(--c-accent); color: var(--c-ink); border-color: var(--c-accent); }
.contact-copy.is-copied .contact-copy-track { transform: translateY(-32px); }

@media (max-width: 800px) {
    .hero--ribbon .ribbon-scene { top: 0; height: auto; }
    .contacts--ribbon { padding-bottom: 72px; }
    .contacts--ribbon .ribbon-scene { top: 0; height: auto; }
    .contacts--ribbon .ribbon-scene::after { display: none; }
    .contact-mail .contact-row { padding-right: 120px; }
}
@media (max-width: 480px) {
    .contact-mail .contact-row { padding-right: 104px; }
    .contact-copy { right: 0; padding: 0 8px; font-size: 9.5px; letter-spacing: .06em; }
    .contact-mail .contact-value { font-size: clamp(13px, 3.7vw, 15px); overflow-wrap: normal; white-space: nowrap; }
}
/* ---------- mobile first screen: headline, lead, both actions in one row, the portrait
   right under them. Nothing here depends on the viewport height, so the photo stays put
   while the browser bars show and hide during scroll. */
@media (max-width: 800px), (max-width: 1024px) and (orientation: portrait) {
    .hero--ribbon { display: flex; flex-direction: column; min-height: 0; padding-top: 96px; padding-bottom: 0; }
    .hero--ribbon .hero-inner { flex-direction: column; align-items: stretch; }
    .hero--ribbon .hero-content { display: flex; flex-direction: column; max-width: 100%; padding-bottom: 0; }
    /* as large as the longest line («B2B-ПРОДУКТОВ», ~8.7em) allows without breaking */
    .hero--ribbon .hero-title { font-size: min(56px, calc((100vw - 2 * var(--gutter)) / 9)); line-height: .95; margin-bottom: 18px; }
    .hero--ribbon .hero-title .line-inner { white-space: nowrap; }
    .hero--ribbon .hero-lead { max-width: 34ch; margin-bottom: 24px; color: #cfc9bc; }
    .hero--ribbon .ribbon-scene { top: 0; height: auto; }
    .hero--ribbon .ribbon-scene::after { background: linear-gradient(180deg, rgba(10, 10, 10, .72) 0%, rgba(10, 10, 10, .3) 34%, rgba(10, 10, 10, 0) 58%); }
    .hero--ribbon .hero-portrait {
        order: 2; position: relative; right: auto; bottom: auto; align-self: flex-end;
        width: min(108vw, 560px); margin: -6px -8vw 0 0;
        -webkit-mask-image: linear-gradient(180deg, #000 52%, rgba(0, 0, 0, .35) 82%, transparent 100%);
        mask-image: linear-gradient(180deg, #000 52%, rgba(0, 0, 0, .35) 82%, transparent 100%);
    }
    .hero--ribbon .hero-ctas {
        margin-top: 0; flex-direction: row; flex-wrap: nowrap; align-items: center;
        justify-content: space-between; gap: 18px; width: 100%; max-width: none;
    }
    .hero--ribbon .hero-ctas .btn-lg {
        width: auto; flex: 0 1 auto; padding: 17px 20px; gap: 10px;
        background: var(--c-paper); color: var(--c-ink); border-color: var(--c-paper);
    }
    .hero--ribbon .hero-ctas .btn-lg::before { display: none; }
    .hero--ribbon .hero-ctas .btn-link { align-self: center; min-height: 44px; padding: 0; border-bottom: 0; }
    .hero--ribbon .hero-ctas .btn-link span { border-bottom: 1px solid currentColor; padding: 4px 0; }
    .hero--ribbon .cta-verb { display: none; }
}
@media (max-width: 340px) {
    .hero--ribbon .hero-ctas { flex-wrap: wrap; }
}
/* on tablets the two actions stay together instead of flying to opposite edges */
@media (min-width: 481px) and (max-width: 1024px) {
    .hero--ribbon .hero-ctas { justify-content: flex-start; gap: 32px; }
}
/* ---------- progress bar: the lime line with a mark for each chapter ---------- */
.scroll-progress { height: 3px; }
.scroll-progress span { background: var(--c-accent); }
.scroll-progress i { position: absolute; top: 0; width: 2px; height: 8px; margin-left: -1px; background: rgba(235, 230, 219, .3); transition: background .4s var(--ease), height .4s var(--ease); }
.scroll-progress i.is-on { background: var(--c-accent); height: 11px; }

@media (prefers-reduced-motion: reduce) {
    .motion-contours, .odo-strip, .contact-row--tg, .contact-copy-track { transition: none !important; }
    .contact-row--tg.is-hit::after { animation: none; }
}

/* ---------- live cover artboards (1200 × 800, scaled by covers.js) ---------- */
.art {
    position: absolute; left: 0; top: 0; width: 1200px; height: 800px;
    transform-origin: 0 0;
    transform: translate(var(--ox, 0px), var(--oy, 0px)) scale(var(--s, 1));
    overflow: hidden; color: #0a0a0a; font-family: var(--f-sans);
    visibility: hidden;
    background: radial-gradient(90% 90% at 55% 40%, #23231e 0%, #121210 55%, #0a0a09 100%);
}
.art * { box-sizing: border-box; }
.art .sheet { position: absolute; background: linear-gradient(135deg, #dcff3d, #b6dc1c); box-shadow: 0 40px 80px rgba(0,0,0,.45); }
.art .paper { position: absolute; background: #f1eee6; border-radius: 6px; box-shadow: 0 40px 90px rgba(0,0,0,.55), 0 10px 24px rgba(0,0,0,.25); }
.art .mk { position: absolute; font-family: var(--f-mono); font-size: 15px; letter-spacing: .12em; color: #55514a; }

/* 05 dispatch: the curtain opens the new page over the old one, the conversion lands */
.cv-dsp .d-frame { overflow: hidden; background: #0a0a0a; }
.cv-dsp .d-page { position: absolute; inset: 0; background-size: cover; background-position: top left; }
.cv-dsp .d-old { background-image: url("public/assets/media/cases/dispatch/old.jpg"); }
.cv-dsp .d-new { background-image: url("public/assets/media/cases/dispatch/new.jpg"); clip-path: inset(0 0 0 36%); }
.cv-dsp .d-line { position: absolute; left: 36%; top: 0; bottom: 0; width: 6px; margin-left: -3px; background: #d7ff2f; }
.cv-dsp .d-line::after { content: ''; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #d7ff2f; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.cv-dsp .d-tag { position: absolute; bottom: 22px; padding: 8px 14px; background: #0a0a0a; color: #f1eee6; font-family: var(--f-mono); font-size: 20px; font-weight: 500; letter-spacing: .12em; }
.cv-dsp .d-was { left: 22px; }
.cv-dsp .d-now { left: calc(36% + 22px); }
.cv-dsp .d-stat { position: absolute; left: 650px; top: 478px; padding: 12px 34px 20px; background: #d7ff2f; box-shadow: 0 30px 60px rgba(0,0,0,.5); transform: rotate(1.6deg); }
.cv-dsp .s-val { display: block; font-size: 172px; font-weight: 900; letter-spacing: -.065em; line-height: 1; font-variant-numeric: tabular-nums; }
.cv-dsp .d-stat small { display: block; margin-top: 2px; font-family: var(--f-mono); font-size: 20px; font-weight: 500; letter-spacing: .12em; }

/* ---------- shared pieces of the other covers ---------- */
.art .cv-tag { position: absolute; padding: 8px 14px; background: #0a0a0a; color: #f1eee6; font-family: var(--f-mono); font-size: 18px; font-weight: 500; letter-spacing: .12em; white-space: nowrap; }
.art .cv-stat { position: absolute; padding: 12px 34px 20px; background: #d7ff2f; box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.art .cv-stat .s-val { display: block; font-size: 150px; font-weight: 900; letter-spacing: -.065em; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.art .cv-stat small { display: block; margin-top: 4px; font-family: var(--f-mono); font-size: 20px; font-weight: 500; letter-spacing: .12em; }
.art .cv-bar { display: block; height: 10px; margin-top: 10px; background: rgba(10,10,10,.16); }
.art .cv-bar b { display: block; height: 100%; background: #0a0a0a; transform: scaleX(.6); transform-origin: 0 50%; }
.art img { position: absolute; display: block; }

/* 02 quality: paid inquiries flow towards sales; three filters drop in one after another — the ad,
   the site, the exclusions — and what they stop piles up under them */
.cv-q .sheet { left: 990px; top: 260px; width: 190px; height: 230px; transform: rotate(7deg); }
.cv-q .qf-pipe { position: absolute; left: 250px; top: 329px; width: 760px; height: 3px; background: rgba(241,238,230,.3); }
.cv-q .qf-src { position: absolute; left: 50px; top: 290px; width: 200px; height: 80px; line-height: 76px; text-align: center; background: #0a0a0a; border: 2px solid rgba(241,238,230,.5); color: #f1eee6; font-family: var(--f-mono); font-size: 22px; letter-spacing: .1em; }
.cv-q .qf-sales { left: 1000px; top: 230px; width: 160px; height: 200px; }
.cv-q .qf-sales .cv-tag { left: 14px; top: 14px; font-size: 18px; }
.cv-q .qf-gate { position: absolute; top: 210px; width: 22px; height: 240px; margin-left: -11px; border-radius: 3px; background: #f1eee6; box-shadow: 0 0 0 4px rgba(215,255,47,.0), 0 20px 40px rgba(0,0,0,.5); }
.cv-q .qf-gate::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 26px; border-radius: 3px 3px 0 0; background: #d7ff2f; }
.cv-q .qf-g1, .cv-q .qf-l1 { left: 420px; }
.cv-q .qf-g2, .cv-q .qf-l2 { left: 600px; }
.cv-q .qf-g3, .cv-q .qf-l3 { left: 780px; }
.cv-q .qf-label { top: 150px; translate: -50% 0; font-size: 19px; padding: 8px 12px; }
.cv-q .qf-tok { position: absolute; left: 0; top: 0; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; opacity: 0; }
.cv-q .qf-dot { display: inline-block; width: 28px; height: 28px; margin-right: 10px; border-radius: 50%; vertical-align: -5px; }
.cv-q .qf-t { background: #d7ff2f; }
.cv-q .qf-r { background: #f1eee6; }
.cv-q .qf-b { background: transparent; border: 3px dashed rgba(241,238,230,.75); }
.cv-q .qf-legend { position: absolute; left: 50px; top: 470px; display: flex; flex-direction: column; gap: 14px; color: #c9c4b8; font-family: var(--f-mono); font-size: 24px; letter-spacing: .06em; }
.cv-q .cv-stat { left: 560px; top: 540px; transform: rotate(-1.4deg); }
.cv-q .cv-stat .s-val { font-size: 112px; letter-spacing: -.05em; }

/* 03 demand: three acquisition scenarios, each its own offer, feed one stream of leads that
   grows twenty times */
.cv-dm .sheet { left: 720px; top: 150px; width: 260px; height: 560px; transform: rotate(4deg); }
.cv-dm .dm-offer { left: 40px; width: 390px; height: 128px; padding: 20px 24px; }
.cv-dm .dm-o1 { top: 120px; transform: rotate(-1.5deg); }
.cv-dm .dm-o2 { top: 316px; transform: rotate(1deg); }
.cv-dm .dm-o3 { top: 512px; transform: rotate(-.8deg); }
.cv-dm .dm-offer .mk { position: static; display: block; font-size: 16px; }
.cv-dm .dm-offer b { display: block; margin-top: 6px; font-size: 31px; font-weight: 800; letter-spacing: -.02em; color: #0a0a0a; white-space: nowrap; }
.cv-dm .dm-offer small { display: block; margin-top: 4px; font-family: var(--f-mono); font-size: 16px; letter-spacing: .04em; color: #6b665d; }
.cv-dm .dm-ways { position: absolute; left: 0; top: 0; width: 1200px; height: 800px; overflow: visible; }
.cv-dm .dm-ways path { fill: none; stroke: rgba(241,238,230,.35); stroke-width: 4; }
.cv-dm .dm-ways path:last-child { stroke: #d7ff2f; stroke-width: 8; }
.cv-dm .dm-tok { position: absolute; left: 0; top: 0; width: 26px; height: 26px; offset-rotate: 0deg; border-radius: 50%; background: #d7ff2f; border: 3px solid #0a0a0a; opacity: 0; }
.cv-dm .dm-col { left: 760px; top: 90px; width: 170px; height: 600px; overflow: hidden; }
.cv-dm .dm-col .cv-tag { left: 16px; top: 16px; font-size: 18px; z-index: 1; }
.cv-dm .dm-fill { position: absolute; left: 22px; right: 22px; bottom: 22px; height: 500px; background: #d7ff2f; border-top: 6px solid #0a0a0a; transform-origin: 50% 100%; }
.cv-dm .dm-mark { position: absolute; left: 10px; right: 10px; bottom: 47px; height: 3px; background: rgba(10,10,10,.5); }
.cv-dm .dm-y { position: absolute; right: 30px; font-family: var(--f-mono); font-size: 16px; letter-spacing: .1em; color: #0a0a0a; }
.cv-dm .dm-y1 { bottom: 54px; }
.cv-dm .dm-y2 { top: 92px; }
.cv-dm .cv-stat { left: 770px; top: 560px; transform: rotate(-1.4deg); }
.cv-dm .cv-stat small { white-space: nowrap; }

/* 04 analytics: spend from the ad accounts, visits from Metrica and the CRM's leads and deals
   slide together into one table, and a row is followed from the channel to the deal */
.cv-an .sheet { left: 120px; top: 470px; width: 600px; height: 280px; transform: rotate(-3deg); }
.cv-an .an-bi { left: 70px; top: 96px; }
.cv-an .an-part { top: 150px; height: 420px; display: grid; grid-template-rows: 56px 44px repeat(4, 80px); align-items: center; border-radius: 0; color: #0a0a0a; }
.cv-an .an-ads { left: 70px; width: 350px; grid-template-columns: 200px 150px; }
.cv-an .an-met { left: 420px; width: 200px; grid-template-columns: 200px; }
.cv-an .an-crm { left: 620px; width: 510px; grid-template-columns: 170px 170px 170px; }
.cv-an .an-met, .cv-an .an-crm { box-shadow: 0 40px 90px rgba(0,0,0,.55), inset 1px 0 0 rgba(10,10,10,.14); }
.cv-an .an-src { grid-column: 1 / -1; align-self: stretch; padding: 0 22px; line-height: 56px; background: #0a0a0a; color: #f1eee6; font-family: var(--f-mono); font-size: 16px; letter-spacing: .08em; white-space: nowrap; }
.cv-an .an-met .an-src { background: #2b2a26; }
.cv-an .an-crm .an-src { background: #d7ff2f; color: #0a0a0a; }
.cv-an .an-h { padding: 0 22px; font-family: var(--f-mono); font-size: 15px; letter-spacing: .12em; color: #6b665d; }
.cv-an .an-c { display: flex; align-items: center; height: 80px; padding: 0 22px; border-top: 1px solid rgba(10,10,10,.12); background: #f1eee6; position: relative; }
.cv-an .an-name { font-family: var(--f-mono); font-size: 18px; white-space: nowrap; }
.cv-an .an-v { display: block; height: 14px; border-radius: 7px; background: rgba(10,10,10,.78); }
.cv-an .an-q { display: flex; gap: 8px; }
.cv-an .an-q b { width: 22px; height: 22px; border-radius: 50%; background: rgba(10,10,10,.14); }
.cv-an .an-q b.on { background: #0a0a0a; }
.cv-an .an-deal { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(10,10,10,.2); }
.cv-an .an-deal.is-on { border-color: #0a0a0a; background: #0a0a0a; }
.cv-an .an-deal.is-on::after { content: ''; display: block; width: 9px; height: 16px; margin: 4px 0 0 10px; border: solid #d7ff2f; border-width: 0 4px 4px 0; transform: rotate(45deg); }
.cv-an .an-sweep { position: absolute; left: 70px; top: 250px; width: 1060px; height: 160px; background: rgba(215,255,47,.6); mix-blend-mode: multiply; transform-origin: 0 50%; }
.cv-an .cv-stat { left: 290px; top: 590px; transform: rotate(1.6deg); }
.cv-an .cv-stat .s-val { font-size: 84px; letter-spacing: -.04em; }

/* 05 licenses: a request used to travel through marketing and the layout before it became a
   PDF; marketing steps out, and sales runs it through the service on its own */
.cv-lc .lc-ways { position: absolute; left: 0; top: 0; width: 1200px; height: 800px; overflow: visible; }
.cv-lc .lc-ways path { fill: none; stroke-dasharray: 1; stroke-linecap: round; }
.cv-lc .lc-long { stroke: rgba(241,238,230,.55); stroke-width: 4; opacity: .22; }
.cv-lc .lc-short { stroke: #d7ff2f; stroke-width: 8; }
.cv-lc .lc-node { position: absolute; height: 92px; padding: 0 28px; line-height: 92px; background: #f1eee6; color: #0a0a0a; font-family: var(--f-mono); font-size: 25px; letter-spacing: .08em; white-space: nowrap; box-shadow: 0 20px 44px rgba(0,0,0,.45); }
.cv-lc .lc-mgr { left: 40px; top: 354px; background: #0a0a0a; color: #f1eee6; border: 2px solid rgba(241,238,230,.5); transform: rotate(-1.5deg); }
.cv-lc .lc-mkt { left: 330px; top: 104px; transform: rotate(-2deg) translateY(-14px); opacity: .28; }
.cv-lc .lc-lay { left: 650px; top: 104px; transform: rotate(1.5deg) translateY(-14px); opacity: .28; }
.cv-lc .lc-srv { left: 520px; top: 354px; background: #d7ff2f; font-weight: 600; transform: rotate(1deg); }
.cv-lc .sheet { left: 1000px; top: 300px; width: 180px; height: 270px; transform: rotate(9deg); }
.cv-lc .lc-pdf { left: 975px; top: 250px; width: 200px; height: 283px; transform: rotate(3deg); box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.cv-lc .lc-tok { position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: #d7ff2f; border: 3px solid #0a0a0a; offset-rotate: 0deg; opacity: 0; box-shadow: 0 6px 14px rgba(0,0,0,.4); }
.cv-lc .lc-tok.is-slow { background: #f1eee6; }
.cv-lc .cv-stat { left: 300px; top: 540px; transform: rotate(-1.4deg); }
.cv-lc .cv-stat .s-val { font-size: 70px; line-height: .98; letter-spacing: -.04em; white-space: normal; }
