/* =====================================================================
   ПЕРВЫЙ ЭКРАН: "Создаём → Продвигаем → Автоматизируем".
   Сцена 3:2 (на телефоне 10:9). Все размеры внутри — от --u, а --u от
   ширины сцены (cqw), поэтому сцена масштабируется целиком.
   ===================================================================== */

/* С анимацией колонка с картинкой шире (на десктопе). */
@media (min-width: 1025px) {
    .luvit-hero--anim .luvit-hero-inner { grid-template-columns: 1fr 1fr; }
}

.luvit-hf {
    --u: 1cqw;
    --hf-accent: var(--luvit-color-accent, #E63946);
    --hf-ink: #F5F5F3;
    --hf-muted: rgba(245, 245, 243, .58);
    --hf-panel: rgba(22, 22, 28, .94);
    --hf-line: rgba(255, 255, 255, .1);
    --hf-ok: #5BE38F;
    --hf-green: #2F6B4F;
    --hf-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    container: luvit-hf / inline-size;
    position: relative;
    min-width: 0;
    max-width: 760px; /* в одноколоночной раскладке (планшет) не раздуваем сцену */
}
.luvit-hf [hidden] { display: none !important; }

.hf-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    container-type: inline-size;
    color: var(--hf-ink);
    font-family: var(--luvit-font);
    line-height: 1.35;
}
.hf-glow {
    position: absolute;
    inset: -12% 0;
    background:
        radial-gradient(closest-side at 72% 32%, rgba(230, 57, 70, .30), transparent),
        radial-gradient(closest-side at 22% 78%, rgba(80, 130, 255, .22), transparent);
    filter: blur(40px);
    pointer-events: none;
}

/* ---------- вкладки этапов ---------- */
.hf-tabs { position: absolute; left: 0; top: 0; display: flex; gap: calc(1 * var(--u)); z-index: 6; }
.hf-tab {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: calc(.7 * var(--u));
    padding: calc(1.1 * var(--u)) calc(1.9 * var(--u));
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: calc(5 * var(--u));
    background: rgba(22, 22, 28, .7);
    color: var(--hf-muted);
    font: 600 calc(1.95 * var(--u)) / 1 var(--luvit-font);
    cursor: pointer;
    transition: color .3s, border-color .3s;
}
.hf-tab svg { position: relative; width: calc(1.9 * var(--u)); height: calc(1.9 * var(--u)); flex: none; }
.hf-tab span { position: relative; white-space: nowrap; }
.hf-tab-fill { position: absolute; inset: 0; }
.hf-tab-fill b { display: block; height: 100%; width: 0; background: var(--hf-accent); }
.hf-tab.is-on { color: #fff; border-color: var(--hf-accent); }
.hf-tab.is-done { color: var(--hf-ink); }
.is-cur-4 .hf-tab { color: #fff; border-color: var(--hf-accent); background: rgba(230, 57, 70, .9); }
.hf-tab:focus-visible, .hf-pause:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.hf-pause {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 6;
    width: calc(4.4 * var(--u));
    height: calc(4.4 * var(--u));
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(22, 22, 28, .7);
    color: var(--hf-ink);
    display: grid;
    place-items: center;
    cursor: pointer;
}
.hf-pause:hover { border-color: var(--hf-accent); }
.hf-pause svg { width: 40%; height: 40%; }

/* ---------- сайт клиента ---------- */
.hf-win {
    position: absolute;
    left: 0;
    top: 9.5cqw;
    width: 60cqw;
    height: 45cqw;
    z-index: 2;
    border-radius: calc(1.2 * var(--u));
    overflow: hidden;
    background: #fff;
    color: #1F2421;
    box-shadow: 0 calc(3 * var(--u)) calc(6 * var(--u)) calc(-1.5 * var(--u)) rgba(0, 0, 0, .7);
    display: flex;
    flex-direction: column;
}
.is-cur-1 .hf-win { animation: hf-win-in .8s cubic-bezier(.6, 0, .3, 1) both; }
.hf-bar { flex: none; height: calc(3.6 * var(--u)); display: flex; align-items: center; gap: calc(.6 * var(--u)); padding: 0 calc(1.2 * var(--u)); background: #EEF0EE; border-bottom: 1px solid #DFE3DF; }
.hf-bar > i { width: calc(.85 * var(--u)); height: calc(.85 * var(--u)); border-radius: 50%; background: #FF6159; }
.hf-bar > i:nth-child(2) { background: #FFBD2E; }
.hf-bar > i:nth-child(3) { background: #28C941; }
.hf-title { margin-left: calc(1.2 * var(--u)); display: flex; align-items: center; gap: calc(.5 * var(--u)); padding: calc(.4 * var(--u)) calc(1 * var(--u)); background: #fff; border-radius: calc(.6 * var(--u)) calc(.6 * var(--u)) 0 0; font-size: calc(1.2 * var(--u)); color: #4A524C; white-space: nowrap; }
.hf-fav { width: calc(1 * var(--u)); height: calc(1 * var(--u)); border-radius: 50%; background: radial-gradient(circle, #FFF3D6 30%, #E86A87 32%); }

.hf-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.hf-nav { flex: none; height: calc(4.8 * var(--u)); display: flex; align-items: center; gap: calc(1.8 * var(--u)); padding: 0 calc(2.6 * var(--u)); font-size: calc(1.2 * var(--u)); color: #4A524C; }
.hf-logo { margin-right: auto; font-weight: 800; font-size: calc(1.65 * var(--u)); letter-spacing: .14em; color: var(--hf-green); }
.hf-cart { width: calc(2 * var(--u)); height: calc(2 * var(--u)); border-radius: 50%; background: var(--hf-green); }
.hf-hero { flex: none; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: calc(1.5 * var(--u)); padding: calc(2.2 * var(--u)) calc(2.6 * var(--u)); background: #F4EFE7; }
.hf-hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: calc(1 * var(--u)); }
.hf-eb { font-size: calc(1.1 * var(--u)); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--hf-green); }
.hf-h { font-size: calc(2.8 * var(--u)); font-weight: 800; line-height: 1.12; letter-spacing: -.01em; color: #1F2421; }
.hf-order { position: relative; margin-top: calc(.4 * var(--u)); padding: calc(.95 * var(--u)) calc(1.7 * var(--u)); border-radius: calc(5 * var(--u)); background: var(--hf-green); color: #fff; font-size: calc(1.3 * var(--u)); font-weight: 700; transition: transform .15s, box-shadow .3s; }
.hf-order.is-press { transform: scale(.92); box-shadow: 0 0 0 calc(.6 * var(--u)) rgba(230, 57, 70, .35); }
.hf-hero-img { height: calc(16 * var(--u)); border-radius: calc(.8 * var(--u)); background: radial-gradient(circle at 50% 40%, #FFFFFF, #EADFCF); display: grid; place-items: center; overflow: hidden; }
.hf-bouquet { width: 82%; height: 100%; }
.hf-cards { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(1.3 * var(--u)); padding: calc(1.5 * var(--u)) calc(2.6 * var(--u)); }
.hf-card { min-height: 0; display: flex; flex-direction: column; gap: calc(.35 * var(--u)); font-size: calc(1.25 * var(--u)); }
.hf-ci { height: calc(8 * var(--u)); border-radius: calc(.6 * var(--u)); background: linear-gradient(150deg, var(--c1), var(--c2)); display: grid; place-items: center; overflow: hidden; }
.hf-ci .hf-bouquet { width: 70%; height: 92%; }
.hf-card small { font-size: calc(1.2 * var(--u)); font-weight: 700; color: var(--hf-green); }

/* сборка блоков в первом акте */
.hf-blk { position: relative; }
.is-cur-1 .hf-blk { animation: hf-snap .65s var(--d, 0s) cubic-bezier(.3, 1.35, .5, 1) both; }

/* ---------- панели: общий вид и появление ---------- */
.hf-panel {
    background: var(--hf-panel);
    border: 1px solid var(--hf-line);
    border-radius: calc(1.2 * var(--u));
    box-shadow: 0 calc(2 * var(--u)) calc(5 * var(--u)) calc(-1 * var(--u)) rgba(0, 0, 0, .65);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.hf-p1, .hf-p2, .hf-p3, .hf-p4 {
    position: absolute;
    z-index: 4;
    opacity: 0;
    transform: translateY(calc(2 * var(--u))) scale(.97);
    pointer-events: none;
    transition: opacity .35s, transform .35s;
}
.is-cur-1 .hf-p1, .is-cur-2 .hf-p2, .is-cur-3 .hf-p3, .is-cur-4 .hf-p4 {
    opacity: 1;
    transform: none;
    transition: opacity .55s var(--d, .2s), transform .7s var(--d, .2s) cubic-bezier(.2, .8, .2, 1);
}
.hf-muted { color: var(--hf-muted); }

/* 1. Создаём */
.hf-phone { left: 69cqw; top: 11.5cqw; width: 26cqw; height: 47cqw; --d: 1.9s; padding: calc(.7 * var(--u)); border-radius: calc(3 * var(--u)); background: #1A1A20; border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 calc(2 * var(--u)) calc(5 * var(--u)) calc(-1 * var(--u)) rgba(0, 0, 0, .7); }
.hf-phone-screen { height: 100%; border-radius: calc(2.3 * var(--u)); background: #fff; overflow: hidden; display: flex; flex-direction: column; gap: calc(.9 * var(--u)); padding-bottom: calc(1 * var(--u)); }
.hf-pn { display: flex; justify-content: space-between; align-items: center; padding: calc(1.8 * var(--u)) calc(1.6 * var(--u)) 0; font-size: calc(1.3 * var(--u)); font-weight: 800; letter-spacing: .12em; color: var(--hf-green); }
.hf-pn i { width: calc(1.6 * var(--u)); height: calc(.25 * var(--u)); background: #4A524C; box-shadow: 0 calc(.5 * var(--u)) 0 #4A524C; }
.hf-ph { margin: 0 calc(1 * var(--u)); padding: calc(1.4 * var(--u)) calc(1.2 * var(--u)); border-radius: calc(.8 * var(--u)); background: #F4EFE7; display: flex; flex-direction: column; align-items: flex-start; gap: calc(.9 * var(--u)); }
.hf-ph-t { font-size: calc(1.8 * var(--u)); font-weight: 800; line-height: 1.12; color: #1F2421; }
.hf-ph-b { padding: calc(.6 * var(--u)) calc(1.1 * var(--u)); border-radius: calc(5 * var(--u)); background: var(--hf-green); color: #fff; font-size: calc(1.15 * var(--u)); font-weight: 700; }
.hf-pc { flex: 1; min-height: 0; margin: 0 calc(1 * var(--u)); border-radius: calc(.8 * var(--u)); background: linear-gradient(150deg, var(--c1), var(--c2)); }
.hf-chips { left: 0; top: 58.5cqw; margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: calc(1.2 * var(--u)); --d: 0s; }
.hf-chips li { display: flex; align-items: center; gap: calc(.6 * var(--u)); padding: calc(.8 * var(--u)) calc(1.4 * var(--u)) calc(.8 * var(--u)) calc(.8 * var(--u)); border-radius: calc(5 * var(--u)); background: var(--hf-panel); border: 1px solid var(--hf-line); font-size: calc(1.65 * var(--u)); font-weight: 600; white-space: nowrap; opacity: 0; }
.hf-chips svg { width: calc(1.9 * var(--u)); height: calc(1.9 * var(--u)); flex: none; }
.is-cur-1 .hf-chips li { animation: hf-pop .5s var(--d) cubic-bezier(.3, 1.5, .5, 1) both; }

/* 2. Продвигаем */
.hf-serp { left: 48cqw; top: 12cqw; width: 52cqw; padding: calc(1.9 * var(--u)); --d: .15s; }
.hf-search { display: flex; align-items: center; gap: calc(.9 * var(--u)); height: calc(4.6 * var(--u)); padding: 0 calc(1.4 * var(--u)); border-radius: calc(.9 * var(--u)); background: #fff; color: #1F2421; font-size: calc(1.65 * var(--u)); font-weight: 600; }
.hf-search svg { width: calc(1.9 * var(--u)); height: calc(1.9 * var(--u)); color: #7A817C; flex: none; }
.hf-q-caret { width: 1.5px; height: calc(1.6 * var(--u)); background: #1F2421; margin-left: -.4em; animation: hf-blink 1s steps(1) infinite; }
.hf-results { position: relative; height: calc(4 * 6.4 * var(--u) - .8 * var(--u)); margin-top: calc(1.3 * var(--u)); }
.hf-row {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: calc(5.6 * var(--u));
    display: flex;
    align-items: center;
    gap: calc(1.1 * var(--u));
    padding: 0 calc(1.2 * var(--u));
    border-radius: calc(.7 * var(--u));
    transform: translateY(calc(var(--p0) * 6.4 * var(--u)));
    transition: transform 1.1s cubic-bezier(.6, 0, .2, 1), background-color .4s;
}
.is-up .hf-row { transform: translateY(calc(var(--p1) * 6.4 * var(--u))); }
.hf-row > i { width: calc(1.9 * var(--u)); height: calc(1.9 * var(--u)); border-radius: 50%; background: rgba(255, 255, 255, .16); flex: none; }
.hf-row > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(.45 * var(--u)); }
.hf-row b { font-size: calc(1.55 * var(--u)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #9DB4FF; }
.hf-row em { display: block; width: 70%; height: calc(.6 * var(--u)); border-radius: 2px; background: rgba(255, 255, 255, .12); }
.hf-row.is-ours { z-index: 1; background: rgba(230, 57, 70, .14); box-shadow: inset calc(.35 * var(--u)) 0 0 var(--hf-accent); }
.hf-row.is-ours > i { background: radial-gradient(circle, #FFF3D6 30%, #E86A87 32%); }
.hf-row.is-ours b { color: #fff; }
.hf-rank { flex: none; padding: calc(.45 * var(--u)) calc(.9 * var(--u)); border-radius: calc(5 * var(--u)); background: rgba(255, 255, 255, .1); font-size: calc(1.3 * var(--u)); font-weight: 700; white-space: nowrap; transition: background-color .4s, color .4s; }
.is-top .hf-rank { background: var(--hf-accent); color: #fff; }
.hf-chart { left: 48cqw; top: 50cqw; width: 52cqw; padding: calc(1.6 * var(--u)) calc(1.9 * var(--u)) calc(1.2 * var(--u)); --d: 1.5s; }
.hf-chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: calc(1 * var(--u)); font-size: calc(1.45 * var(--u)); color: var(--hf-muted); }
.hf-visits { font-size: calc(2.6 * var(--u)); font-weight: 800; color: var(--hf-ok); font-variant-numeric: tabular-nums; }
.hf-chart svg { display: block; width: 100%; height: calc(8 * var(--u)); margin-top: calc(.6 * var(--u)); overflow: visible; }
.hf-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.is-cur-2 .hf-line { animation: hf-draw 1.9s 1.8s ease-out both; }
.hf-area { opacity: 0; transition: opacity .3s; }
.is-cur-2 .hf-area { opacity: 1; transition: opacity 1.2s 2.4s; }

/* 3. Автоматизируем */
.hf-links { left: 0; top: 0; width: 100%; height: 100%; z-index: 3; overflow: visible; --d: 0s; }
.hf-links path { fill: none; stroke: var(--hf-accent); stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .8; }
.hf-links circle { fill: #fff; opacity: 0; filter: drop-shadow(0 0 4px var(--hf-accent)); }
.is-cur-3 .hf-links path:nth-of-type(1) { animation: hf-draw .7s 1.5s ease-in-out both; }
.is-cur-3 .hf-links path:nth-of-type(2) { animation: hf-draw .7s 2.5s ease-in-out both; }
.is-cur-3 .hf-links path:nth-of-type(3) { animation: hf-draw .7s 3.5s ease-in-out both; }
.hf-crm, .hf-chat, .hf-notify { left: 63cqw; width: 37cqw; padding: calc(1.5 * var(--u)) calc(1.8 * var(--u)); display: flex; flex-direction: column; gap: calc(.6 * var(--u)); font-size: calc(1.5 * var(--u)); }
.hf-crm { top: 9.5cqw; }
.hf-chat { top: 27cqw; }
.hf-notify { top: 45cqw; flex-direction: row; align-items: center; gap: calc(1 * var(--u)); }
.hf-ph-row { display: flex; align-items: center; justify-content: space-between; gap: calc(.8 * var(--u)); font-size: calc(1.3 * var(--u)); }
.hf-big { font-size: calc(2.2 * var(--u)); font-weight: 800; }
.hf-status > span { padding: calc(.35 * var(--u)) calc(.9 * var(--u)); border-radius: calc(5 * var(--u)); font-weight: 700; font-size: calc(1.2 * var(--u)); }
.hf-st-new { background: rgba(255, 181, 71, .18); color: #FFC56B; }
.hf-st-paid { display: none; background: rgba(91, 227, 143, .18); color: var(--hf-ok); }
.is-paid .hf-st-new { display: none; }
.is-paid .hf-st-paid { display: inline-block; animation: hf-pop .45s cubic-bezier(.3, 1.6, .5, 1) both; }
.hf-chat .hf-ph-row { justify-content: flex-start; }
.hf-ai { width: calc(2.6 * var(--u)); height: calc(2.6 * var(--u)); border-radius: 50%; display: grid; place-items: center; background: var(--hf-accent); color: #fff; font-size: calc(1.05 * var(--u)); font-weight: 800; flex: none; }
.hf-msg { max-width: 88%; padding: calc(.7 * var(--u)) calc(1.2 * var(--u)); font-size: calc(1.45 * var(--u)); border-radius: calc(1 * var(--u)); }
.hf-msg-in { align-self: flex-end; background: rgba(255, 255, 255, .1); border-bottom-right-radius: calc(.2 * var(--u)); }
.hf-msg-out { align-self: flex-start; background: rgba(230, 57, 70, .18); border: 1px solid rgba(230, 57, 70, .45); border-bottom-left-radius: calc(.2 * var(--u)); min-height: calc(3 * var(--u)); display: flex; align-items: center; }
.hf-reply { display: none; }
.is-replied .hf-reply { display: inline; }
.is-replied .hf-typing { display: none; }
.hf-typing { display: inline-flex; gap: calc(.35 * var(--u)); }
.hf-typing i { width: calc(.6 * var(--u)); height: calc(.6 * var(--u)); border-radius: 50%; background: var(--hf-ink); opacity: .4; animation: hf-dot 1s infinite; }
.hf-typing i:nth-child(2) { animation-delay: .15s; }
.hf-typing i:nth-child(3) { animation-delay: .3s; }
.hf-bell { width: calc(3.6 * var(--u)); height: calc(3.6 * var(--u)); border-radius: 50%; background: var(--hf-accent); display: grid; place-items: center; flex: none; }
.hf-bell svg { width: 55%; height: 55%; }
.hf-notify b { display: block; }

/* итог */
.hf-final { left: 50cqw; top: 13cqw; width: 50cqw; padding: calc(2.4 * var(--u)) calc(2.6 * var(--u)); display: flex; flex-direction: column; gap: calc(.6 * var(--u)); font-size: calc(1.6 * var(--u)); --d: .15s; }
.hf-count { font-size: calc(8 * var(--u)); font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: #fff; }
.hf-final ul { margin: calc(1 * var(--u)) 0 0; padding: calc(1.4 * var(--u)) 0 0; list-style: none; border-top: 1px solid var(--hf-line); display: grid; gap: calc(.9 * var(--u)); }
.hf-final li { display: flex; align-items: center; gap: calc(.8 * var(--u)); opacity: 0; }
.hf-final li svg { width: calc(2.1 * var(--u)); height: calc(2.1 * var(--u)); flex: none; }
.is-cur-4 .hf-final li { animation: hf-rise .45s var(--d) both; }

.hf-pointer { position: absolute; left: 0; top: 0; z-index: 7; width: calc(2.8 * var(--u)); opacity: 0; pointer-events: none; transform: translate(-12%, -6%); filter: drop-shadow(0 .3cqw .4cqw rgba(0, 0, 0, .4)); }
.hf-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 8; pointer-events: none; }

@keyframes hf-win-in { from { clip-path: inset(0 100% 100% 0 round 1cqw); } to { clip-path: inset(0 0 0 0 round 1cqw); } }
@keyframes hf-snap { from { opacity: 0; transform: translate(calc(var(--fx, 0) * var(--u)), calc(var(--fy, 3) * var(--u))) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes hf-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes hf-rise { from { opacity: 0; transform: translateY(calc(1.2 * var(--u))); } to { opacity: 1; transform: none; } }
@keyframes hf-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes hf-blink { 50% { opacity: 0; } }
@keyframes hf-dot { 0%, 100% { opacity: .3; transform: none; } 50% { opacity: 1; transform: translateY(-30%); } }

.hf-stage.is-paused *, .hf-stage.is-offscreen * { animation-play-state: paused !important; }

/* ---------- узкий экран: сайт на всю ширину, панель текущего акта поверх ---------- */
@container luvit-hf (max-width: 560px) {
    .hf-stage { --u: 1.55cqw; aspect-ratio: 10 / 9; }
    .hf-tab svg { display: none; }
    .hf-win { left: 0; top: 11cqw; width: 100cqw; height: 64cqw; }
    .hf-phone, .hf-chart, .hf-chat, .hf-links { display: none; }
    .hf-chips { left: 0; right: 0; top: auto; bottom: 0; justify-content: center; gap: calc(.9 * var(--u)); }
    .hf-chips li { font-size: calc(1.8 * var(--u)); }
    .hf-serp, .hf-crm, .hf-notify, .hf-final { left: 3cqw; width: 94cqw; top: auto; bottom: 0; }
    .hf-crm { bottom: 14cqw; }
    .hf-results { height: calc(3 * 6.4 * var(--u) - .8 * var(--u)); overflow: hidden; }
    .hf-final { padding: calc(1.6 * var(--u)) calc(2 * var(--u)); }
    .hf-count { font-size: calc(6 * var(--u)); }
}

@media (prefers-reduced-motion: reduce) {
    .hf-stage *, .hf-stage *::after { animation-duration: .01s !important; animation-delay: 0s !important; transition-duration: .01s !important; transition-delay: 0s !important; }
}
