/* iManage сайт — маркетинговите секции на началната страница:
   лента на доверието, „За кого“, проблемът и решението (видео), „Вижте как работи“, „Защо iManage“, цената накратко. */


/* Златист бутон — за главното действие върху тъмен фон (банерите, страницата на портала) */
.btn--accent { --btn-bg: var(--accent-500); --btn-fg: var(--brand-900); border-color: var(--accent-500); }
.btn--accent:hover { background: var(--accent-600); border-color: var(--accent-600); color: var(--brand-900); }

/* Лента на доверието — веднага под банерите */
.trust { background: var(--brand-950); color: #a9c0da; border-top: 1px solid rgba(255, 255, 255, .08); }
.trust__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 28px; padding-block: 22px; }
.trust__row span { display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 10px; font-size: .86rem; line-height: 1.4; }
.trust__row svg { width: 24px; height: 24px; color: var(--accent-500); grid-row: span 2; }
.trust__row b { color: #fff; font-family: var(--font-head); font-weight: 700; font-size: .95rem; }

/* За кого — три карти със снимки */
.aud { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.aud__card { display: grid; grid-template-rows: auto 1fr; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm, 0 2px 10px rgba(12, 35, 64, .05)); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.aud__card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(12, 35, 64, .12); }
.aud__card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.aud__card--accent { border-color: var(--brand-600); box-shadow: 0 0 0 1px var(--brand-600), 0 18px 40px rgba(47, 108, 192, .16); }
.aud__body { display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; padding: 22px 24px 26px; }
.aud__body h3 { margin: 0; font-size: 1.22rem; }
.aud__body .checks { margin: 0 0 8px; }
.aud__body .checks li { margin: 7px 0; font-size: .95rem; }
.aud__body .checks li::before { content: ''; flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--brand-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f6cc0' stroke-width='3'%3E%3Cpath d='m6 12.5 4 4 8-9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.aud__body .btn { justify-self: start; }
.aud__tag { font: 800 .74rem/1 var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: var(--brand-600); }

/* Проблемът и решението — двете реклами */
.story { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 60px); align-items: center; }
.story__copy p { color: #b7cbe0; font-size: 1.1rem; max-width: 46ch; }
.story__steps { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.story__steps li { margin: 0; display: flex; align-items: center; gap: 12px; color: #dbe6f2; font-weight: 600; }
.story__steps b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--accent-500); color: var(--brand-900); font-family: var(--font-head); font-size: .9rem; }
.story__videos { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.vid { margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: #000; box-shadow: 0 24px 60px rgba(3, 12, 26, .45); }
.vid video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.vid figcaption { padding: 10px 16px; font-size: .85rem; font-weight: 600; color: #c6d6ea; background: rgba(255, 255, 255, .05); }
@media (min-width: 961px) {
    .story__videos { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: end; }
}

/* Вижте как работи — по примера на банерите: бутони с лента за напредък + екранът */
.how { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.6fr); gap: clamp(20px, 3.5vw, 40px); align-items: start; }
.how__tabs { display: grid; gap: 6px; }
.how__tab { display: grid; gap: 3px; text-align: left; padding: 10px 16px 11px; border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--ink-soft); transition: background .2s var(--ease), border-color .2s var(--ease); }
.how__tab b { font-family: var(--font-head); font-size: 1rem; color: var(--ink); }
.how__tab span { display: none; font-size: .86rem; color: var(--muted); line-height: 1.4; }
.how__tab.is-active span { display: block; }
.how__tab:hover { background: #fff; border-color: var(--line); }
.how__tab.is-active { background: #fff; border-color: var(--line-2); box-shadow: 0 10px 26px rgba(12, 35, 64, .08); }
.how__tab.is-active b { color: var(--brand-700); }
.how__tab i { display: block; height: 3px; margin-top: 8px; border-radius: 3px; background: var(--line); overflow: hidden; position: relative; visibility: hidden; }
.how__tab.is-active i { visibility: visible; }
.how__tab i::after { content: ''; position: absolute; inset: 0; background: var(--accent-500); transform-origin: left; transform: scaleX(var(--p, 0)); }
.how__tab i.run::after { transform: scaleX(var(--next, 1)); transition: transform var(--t, 3s) linear; }
.how__stage { position: relative; display: grid; gap: 10px; justify-items: center; }
.how__browser { width: 100%; }
.how__screen, .how__phone { position: relative; display: grid; }
.how__screen { aspect-ratio: 1280 / 603; background: var(--bg-soft); }
.how__screen img, .how__phone img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .5s var(--ease); }
.how__screen img.is-on, .how__phone img.is-on { opacity: 1; }
.how__phone { width: min(300px, 70%); aspect-ratio: 520 / 839; border: 10px solid var(--brand-900); border-radius: 34px; overflow: hidden; background: #fff; box-shadow: 0 24px 60px rgba(12, 35, 64, .25); }
.how__phone[hidden], .how__browser[hidden] { display: none !important; }
.how__note { margin: 0; font-size: .8rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
    .how__screen img, .how__phone img { transition: none; }
    .how__tab i.run::after { transition: none; }
}

/* Защо iManage */
.why__nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.why__nums div { display: grid; gap: 6px; align-content: start; padding: 20px 22px; border-radius: var(--radius-lg); background: var(--bg-soft); border: 1px solid var(--line); }
.why__nums b { font: 800 clamp(1.7rem, 3vw, 2.3rem)/1 var(--font-head); color: var(--brand-600); letter-spacing: -.02em; }
.why__nums span { font-size: .92rem; color: var(--ink-soft); }
.why__table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.why__table table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: .95rem; }
.why__table th, .why__table td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.why__table thead th { font: 700 .76rem var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--bg-soft); }
.why__table tbody th { font-weight: 600; color: var(--ink); width: 52%; }
.why__table tr:last-child th, .why__table tr:last-child td { border-bottom: 0; }
.why__table .why__us { background: var(--brand-50); }
.why__table thead .why__us { color: var(--brand-700); background: var(--brand-100); }
.why__table .yes, .why__table .part, .why__table .no { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; white-space: nowrap; }
.why__table .yes { color: #1e7b34; }
.why__table .yes::before { content: '✓'; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #e6f4ea; font-size: .75rem; }
.why__table .part { color: #8a5a00; }
.why__table .no { color: var(--muted); }

/* Цена накратко */
.pt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.pt__copy { max-width: 620px; }
.pt__copy h2 { margin-bottom: .3em; }
.pt__copy p { margin: 0; color: var(--muted); }
.pt__num { color: var(--brand-600); }

@media (max-width: 960px) {
    .trust__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .aud { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; }
    .story { grid-template-columns: minmax(0, 1fr); }
    .how { grid-template-columns: minmax(0, 1fr); }
    .how__tabs { grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
    .how__tab { scroll-snap-align: start; }
    .why__nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .trust__row { grid-template-columns: minmax(0, 1fr); }
    .how__tab span, .how__tab.is-active span { display: none; }
    .how__tabs { grid-auto-columns: minmax(150px, 1fr); }
}

/* Плащане с един клик — 4 телефона с новия iM Portal Mobile; двата набора екрани се сменят с преливане */
.app1 { background: radial-gradient(900px 420px at 50% 100%, var(--brand-100), transparent 70%), #fff; overflow: hidden; }
.app1__head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px 48px; align-items: end; margin-bottom: clamp(28px, 4vw, 48px); }
.app1__head p { color: var(--ink-soft); font-size: 1.08rem; max-width: 52ch; margin: 0; }
.app1__logos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.app1__logos li { margin: 0; height: 52px; min-width: 76px; padding: 0 14px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 4px 14px rgba(12, 35, 64, .06); }
.app1__logos img { height: 22px; width: auto; }
.app1__logos li:nth-child(2) img { height: 30px; }
.app1__logos .app1__bank { display: grid; gap: 1px; text-align: left; place-items: start; align-content: center; background: var(--brand-900); border-color: var(--brand-900); }
.app1__bank span { font-size: .66rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #a9c0da; }
.app1__bank b { font-family: var(--font-head); font-size: .98rem; color: #fff; }

.app1__stage { display: grid; perspective: 1600px; }
.app1__set { grid-area: 1 / 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2.4vw, 32px); align-items: end; padding: 30px 0 10px; opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility 0s linear .6s; }
.app1__set.is-active { opacity: 1; visibility: visible; transition: opacity .6s var(--ease), visibility 0s; }
.app1__ph { margin: 0; display: grid; gap: 14px; justify-items: center; transform: translateY(18px); transition: transform .7s var(--ease); transition-delay: calc(var(--i) * 90ms); }
.app1__set.is-active .app1__ph { transform: none; }
.app1__ph:nth-child(1) .app1__scr { transform: rotateY(16deg) scale(.92); }
.app1__ph:nth-child(4) .app1__scr { transform: rotateY(-16deg) scale(.92); }
.app1__ph:nth-child(2), .app1__ph:nth-child(3) { margin-bottom: 26px; }
/* Реалистичен телефон (само CSS): титанова рамка, Dynamic Island, странични бутони, отблясък на стъклото */
.app1__scr, .pp-hero__phone {
    position: relative; width: 100%; max-width: 260px; aspect-ratio: 520 / 1125;
    border-radius: 16% / 7.4%; padding: 3.4%;
    background:
        linear-gradient(145deg, #8b8f96 0%, #44474d 9%, #1c1d20 22%, #2b2d31 50%, #17181a 78%, #6c7078 100%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .35),
        inset 0 0 0 4px #0d0e10,
        0 2px 2px rgba(0, 0, 0, .25),
        0 34px 70px -18px rgba(12, 35, 64, .55),
        0 12px 24px -10px rgba(12, 35, 64, .35);
    transition: transform .5s var(--ease);
}
.app1__scr::before, .pp-hero__phone::before {   /* Dynamic Island с камерата */
    content: ''; position: absolute; z-index: 3; top: 4.6%; left: 50%; width: 29%; height: 3.3%; transform: translateX(-50%);
    border-radius: 999px; background: radial-gradient(circle at 78% 50%, #1d2a44 0 9%, #0a0b0d 11%) #050506;
}
.app1__scr::after, .pp-hero__phone::after {   /* бутоните: вляво звук и сила на звука, вдясно захранване */
    content: ''; position: absolute; z-index: -1; left: -2.2%; top: 17%; width: 2.6%; height: 4.2%; border-radius: 3px 0 0 3px;
    background: linear-gradient(90deg, #5a5e65, #2a2c30);
    box-shadow: 0 9.5cqh 0 0 #3a3d42, 0 16cqh 0 0 #3a3d42, 100.5cqw 6cqh 0 0 #3a3d42;
}
.app1__scr, .pp-hero__phone { container-type: size; isolation: isolate; }
.app1__scr img, .pp-hero__phone img {
    position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top; display: block;
    border-radius: 12.6% / 5.9%; background: #f4f6fa;
    -webkit-mask-image: linear-gradient(#000, #000); mask-image: linear-gradient(#000, #000);
}
.app1__ph:hover .app1__scr { transform: translateY(-6px) rotateY(0) scale(1); }
.app1__ph figcaption { font-size: .9rem; font-weight: 600; color: var(--ink-soft); text-align: center; }

.app1__ctrl { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.app1__tab { border: 1px solid var(--line-2); background: #fff; color: var(--ink-soft); font-weight: 600; font-size: .9rem; padding: 9px 18px; border-radius: 999px; }
.app1__tab.is-active { background: var(--brand-900); border-color: var(--brand-900); color: #fff; }
.app1__note { margin: 14px 0 0; text-align: center; font-size: .82rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .app1__set, .app1__ph, .app1__scr { transition: none; } }

@media (max-width: 960px) {
    .app1__head { grid-template-columns: minmax(0, 1fr); }
    .app1__logos { justify-content: flex-start; }
    .app1__set { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(190px, 46%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px; }
    .app1__ph { scroll-snap-align: center; margin-bottom: 0 !important; }
    .app1__ph .app1__scr { transform: none !important; }
}

.app1__cta { margin-top: 22px; }

/* Търсите домоуправител? — текст вляво, форма вдясно */
.seek__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.seek__copy p { color: var(--ink-soft); font-size: 1.08rem; max-width: 48ch; }
.seek__steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.seek__steps li { margin: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; color: var(--ink-soft); }
.seek__steps b { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-900); color: var(--accent-500); font-family: var(--font-head); }
.seek__steps strong { color: var(--ink); }
.seek__form { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 32px); box-shadow: 0 18px 44px rgba(12, 35, 64, .08); }
.seek__form .btn { justify-self: start; }
.seek__form .form__ok { color: #1a7f45; font-weight: 600; margin: 0; }
.seek__form .form__note { font-size: .82rem; color: var(--muted); margin: 0; }
@media (max-width: 960px) { .seek__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .seek__form .row2 { grid-template-columns: minmax(0, 1fr); } }

/* 3D телефони (phone3d.js): тяло от слоеве с дебелина, стъкло отпред, бутони по ръба.
   Наклон: --ry / --rx / --rz (по телефон) + --my / --mx (следва мишката). */
.app1__scr.is-3d, .pp-hero__phone.is-3d { background: none; box-shadow: none; padding: 0; perspective: 1300px; transform: none; }
.app1__scr.is-3d::before, .app1__scr.is-3d::after, .pp-hero__phone.is-3d::before, .pp-hero__phone.is-3d::after { content: none; }
.p3 {
    position: absolute; inset: 0; transform-style: preserve-3d;
    transform: rotateY(calc(var(--ry, 0deg) + var(--my, 0deg))) rotateX(calc(var(--rx, 0deg) + var(--mx, 0deg))) rotateZ(var(--rz, 0deg));
    transition: transform .45s var(--ease);
}
.p3__layer {   /* металният ръб: 14 заоблени слоя по 2 px */
    position: absolute; inset: 0; border-radius: 16% / 7.4%;
    background: linear-gradient(100deg, #9aa0a8 0%, #5d6168 18%, #2e3034 50%, #5d6168 82%, #a7acb3 100%);
    transform: translateZ(calc(var(--k) * -2px));
}
.p3__layer:nth-child(14) { background: #1a1b1e; box-shadow: 0 40px 70px -14px rgba(12, 35, 64, .55), 0 14px 26px -8px rgba(12, 35, 64, .35); }
.p3__front {
    position: absolute; inset: 0; border-radius: 16% / 7.4%; padding: 3.3%;
    background: #08090b; transform: translateZ(1px);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .42), inset 0 0 0 3px #0a0b0d;
}
.p3__front img { position: relative; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; border-radius: 12.6% / 5.9%; background: #f4f6fa; }
.p3__island { position: absolute; top: 4.3%; left: 50%; width: 29%; height: 3.3%; border-radius: 999px; transform: translateX(-50%) translateZ(1px); background: radial-gradient(circle at 78% 50%, #1d2a44 0 9%, #0a0b0d 11%) #050506; }
.p3__glare { position: absolute; inset: 3.3%; border-radius: 12.6% / 5.9%; pointer-events: none; transform: translateZ(1.5px); background: linear-gradient(118deg, rgba(255, 255, 255, .2) 0%, rgba(255, 255, 255, .06) 26%, transparent 44%); }
.p3__btn { position: absolute; width: 5px; border-radius: 2px; background: linear-gradient(90deg, #6c7078, #3a3d42); transform: translateZ(-14px); }
.p3__btn--a { left: -3px; top: 14%; height: 3.4%; }
.p3__btn--b { left: -3px; top: 21%; height: 6.4%; }
.p3__btn--c { left: -3px; top: 29%; height: 6.4%; }
.p3__btn--p { right: -3px; top: 24%; height: 9.5%; }

/* наклоните — както на рекламна снимка: крайните телефони са завъртени навътре */
.app1__ph:nth-child(1) .app1__scr.is-3d { --ry: 26deg; --rx: 4deg; transform: scale(.92); }
.app1__ph:nth-child(2) .app1__scr.is-3d { --ry: 10deg; --rx: 3deg; }
.app1__ph:nth-child(3) .app1__scr.is-3d { --ry: -10deg; --rx: 3deg; }
.app1__ph:nth-child(4) .app1__scr.is-3d { --ry: -26deg; --rx: 4deg; transform: scale(.92); }
.app1__ph:hover .app1__scr.is-3d { --ry: 0deg; --rx: 0deg; transform: translateY(-6px); }
.pp-hero__phone.is-3d { --ry: -24deg; --rx: 8deg; --rz: 2deg; }
.pp-hero__art:hover .pp-hero__phone.is-3d { --ry: -12deg; --rx: 4deg; --rz: 1deg; transform: none; }
@media (max-width: 960px) {
    .app1__ph .app1__scr.is-3d { --ry: -12deg !important; --rx: 3deg !important; transform: none !important; }
}
@media (prefers-reduced-motion: reduce) { .p3 { transition: none; } }
