/* ==========================================================================
   МОБИЛЬНОЕ МЕНЮ — DRILL-DOWN ЭКРАНЫ (cp-screens)
   Владелец слоя — app-global.js, экранов — app-mobmenu.js.
   ========================================================================== */

.cp-menu-blueprint {
    position: absolute;
    inset: 0;
    z-index: 0;
    color: var(--color-primary);
    pointer-events: none;
    overflow: clip;
}
.cp-menu-blueprint svg {
    width: 100%;
    height: 100%;
}

/* Стек экранов */
.cp-screens {
    position: relative;
    flex: 1;
    min-height: 0;
}
.cp-screen {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 2rem 0 7.5rem; /* низ — резерв под back/switcher */
    opacity: 0;
    transform: translateX(28px);
    pointer-events: none;
    transition: opacity .32s ease, transform .32s ease;
    will-change: opacity, transform;
}
.cp-screen.is-active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.cp-screen.is-prev {
    transform: translateX(-28px);
}
.cp-screens--no-anim .cp-screen {
    transition: none;
}
.cp-screen[inert] {
    pointer-events: none; /* фолбэк для старых движков */
}

/* Списки */
.cp-screen__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}
.cp-screen__list--sub {
    gap: .85rem;
}

/* Заголовок подэкрана */
.cp-screen__title {
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--color-primary);
    opacity: .85;
    margin: .25rem 0 1.5rem;
}

/* Пункты */
.cp-nav-item {
    display: block;
    width: 100%;
    font-size: clamp(1.65rem, 6vw, 2.1rem);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--color-text);
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: color .3s ease;
}
.cp-nav-item.is-active {
    color: var(--color-primary);
}
.cp-nav-item--minor {
    font-size: 1.15rem;
    font-weight: 600;
    opacity: .8;
}
.cp-nav-item--sub {
    font-size: 1.35rem;
    line-height: 1.2;
    font-weight: 600;
}

/* Drill-кнопка: текст + «дышащий» шеврон */
.cp-nav-item--drill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}
.cp-nav-item__chev {
    flex: 0 0 auto;
    color: var(--color-primary);
    animation: cp-chev-breathe 2.4s ease-in-out infinite;
}
@keyframes cp-chev-breathe {
    0%, 100% { transform: translateX(0);   opacity: .7; }
    50%      { transform: translateX(4px); opacity: 1; }
}

/* Глобальная кнопка «Назад» (иконка, слева внизу, видима только на подэкранах) */
.cp-screen__back--global {
    position: absolute;
    left: 2.5rem;   /* = px-10 контента */
    bottom: 2.5rem; /* = pb-10 контента */
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-primary);
    cursor: pointer;
    opacity: 0;
    transform: scale(.6);
    pointer-events: none;
    transition: opacity .28s ease, transform .28s ease;
}
.cp-screen__back--global.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.cp-screen__back--global:active {
    transform: scale(.92);
}

/* «АТМОСФЕРА САЙТА» — бегущая подсветка букв */
.cp-spotlight-word span {
    opacity: .35;
    animation: cp-spotlight 4.2s linear infinite;
    animation-delay: calc(var(--i, 0) * .14s);
}
@keyframes cp-spotlight {
    0%, 100% { opacity: .35; color: inherit; }
    50%      { opacity: 1;   color: var(--color-primary); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cp-screen { transition: opacity .15s ease; }
    .cp-screen,
    .cp-screen.is-prev { transform: none; }
    .cp-nav-item__chev,
    .cp-spotlight-word span { animation: none; }
}
