/* Оболочка «ноутбук» для демо AiRAG (premium-laptop) */
.premium-laptop-showcase {
    max-width: 980px;
    margin: 28px auto 0;
    padding: 0;
    overflow-x: clip;
}
.premium-laptop-showcase-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 2.5vw, 22px);
}
.premium-laptop-showcase-row .premium-laptop {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 900px;
}
.premium-laptop {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    padding-bottom: 30px;
}
.premium-laptop::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 82%;
    height: 34px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(161, 161, 170, 0.22) 0%, rgba(0, 0, 0, 0.35) 40%, transparent 72%);
    filter: blur(2px);
    pointer-events: none;
}
.premium-laptop__screen {
    position: relative;
    z-index: 2;
    padding: 12px;
    border-radius: 24px 24px 16px 16px;
    background: linear-gradient(145deg, #18181b 0%, #27272a 48%, #09090b 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 34px 70px rgba(0, 0, 0, 0.55),
        0 0 40px rgba(161, 161, 170, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.premium-laptop__camera {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle at 35% 35%, #64748b 0%, #020617 78%);
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.85);
    z-index: 4;
}
.premium-laptop__viewport {
    border-radius: 14px;
    overflow: hidden;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.premium-laptop__base {
    position: relative;
    z-index: 1;
    width: 108%;
    height: 28px;
    margin-left: -4%;
    border-radius: 0 0 34px 34px;
    background: linear-gradient(180deg, #475569 0%, #1f2937 62%, #0f172a 100%);
    border: 1px solid rgba(226, 232, 240, 0.12);
    border-top: none;
    box-shadow:
        0 24px 44px rgba(2, 6, 23, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.premium-laptop__base::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 120px;
    height: 7px;
    border-radius: 0 0 12px 12px;
    transform: translateX(-50%);
    background: rgba(2, 6, 23, 0.42);
}

.demo-nav-btn {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(24, 24, 27, 0.85);
    color: #e4e4e7;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.demo-nav-btn svg {
    display: block;
}
.demo-nav-btn:hover {
    background: rgba(39, 39, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fafafa;
}
.demo-nav-btn:active {
    transform: scale(0.96);
}
.demo-nav-btn:focus-visible {
    outline: 2px solid #a1a1aa;
    outline-offset: 3px;
}

@media (max-width: 768px) {
    .demo-nav-btn {
        width: 42px;
        height: 42px;
    }
    .premium-laptop-showcase {
        margin-top: 10px;
    }
    .premium-laptop-showcase-row {
        gap: 8px;
    }
    .premium-laptop-showcase-row .demo-nav-btn {
        width: 42px;
        height: 42px;
    }
}

/* На узких экранах — iPhone-подобный смартфон, стрелки под ним */
@media (max-width: 720px) {
    .premium-laptop-showcase {
        max-width: 380px;
    }
    .premium-laptop-showcase-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            'phone phone'
            'prev next';
        gap: 18px 16px;
        align-items: center;
    }
    .premium-laptop-showcase-row .premium-laptop {
        grid-area: phone;
        width: 100%;
        max-width: 310px;
        margin-left: auto;
        margin-right: auto;
        padding-bottom: 0;
    }
    .premium-laptop-showcase-row .demo-nav-btn--prev {
        grid-area: prev;
        justify-self: end;
    }
    .premium-laptop-showcase-row .demo-nav-btn--next {
        grid-area: next;
        justify-self: start;
    }

    /* Тень под телефоном */
    .premium-laptop::after {
        width: 70%;
        height: 40px;
        bottom: -16px;
        background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.5) 0%, transparent 70%);
        filter: blur(8px);
    }

    /* Кнопка питания — правая сторона корпуса */
    .premium-laptop::before {
        content: '';
        position: absolute;
        right: -3px;
        top: 120px;
        width: 3px;
        height: 56px;
        border-radius: 0 2px 2px 0;
        background: linear-gradient(180deg, #44454d 0%, #2b2c33 100%);
        box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.08);
        z-index: 5;
        pointer-events: none;
    }

    /* Скрываем подставку ноутбука */
    .premium-laptop__base {
        display: none;
    }

    /* Корпус телефона — тонкая металлическая рамка, экран занимает всё лицо */
    .premium-laptop__screen {
        padding: 13px 11px 24px;
        border-radius: 48px;
        background:
            linear-gradient(155deg,
                rgba(255, 255, 255, 0.15) 0%,
                rgba(255, 255, 255, 0.02) 22%,
                rgba(255, 255, 255, 0.00) 65%,
                rgba(255, 255, 255, 0.10) 100%),
            linear-gradient(145deg, #38393f 0%, #13141a 46%, #313239 100%);
        border: 1px solid rgba(255, 255, 255, 0.18);
        box-shadow:
            0 32px 72px rgba(0, 0, 0, 0.72),
            0 0 0 1px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.14);
    }

    /* Кнопки громкости — левая сторона */
    .premium-laptop__screen::before {
        content: '';
        position: absolute;
        left: -3px;
        top: 72px;
        width: 3px;
        height: 56px;
        border-radius: 2px 0 0 2px;
        background: linear-gradient(180deg, #44454d 0%, #2b2c33 100%);
        box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
        z-index: 5;
        pointer-events: none;
    }

    /* Индикатор «домой» — белая полоска внизу корпуса */
    .premium-laptop__screen::after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: 8px;
        width: 86px;
        height: 4px;
        border-radius: 999px;
        transform: translateX(-50%);
        background: rgba(235, 235, 240, 0.48);
        z-index: 4;
        pointer-events: none;
    }

    /* Dynamic Island — плавает прямо над контентом, как на настоящем iPhone */
    .premium-laptop__camera {
        top: 13px;
        width: 90px;
        height: 28px;
        border-radius: 999px;
        background: #000;
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.08),
            0 2px 8px rgba(0, 0, 0, 0.6);
        z-index: 10;
    }

    /* Точка камеры внутри Dynamic Island */
    .premium-laptop__camera::after {
        content: '';
        position: absolute;
        top: 50%;
        right: 11px;
        width: 9px;
        height: 9px;
        border-radius: 50%;
        transform: translateY(-50%);
        background: radial-gradient(circle at 35% 35%, #1e2a3a 0%, #010204 80%);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    }

    /* Экран — радиус подстроен, контент масштабирован для читаемости */
    .premium-laptop__viewport {
        border-radius: 36px;
        min-height: 0;
        border: none;
        box-shadow: none;
        zoom: 0.84;
    }
}

@media (max-width: 520px) {
    .premium-laptop-showcase {
        max-width: 100%;
    }
    .premium-laptop-showcase-row {
        gap: 14px 12px;
    }
    .demo-nav-btn {
        width: 44px;
        height: 44px;
    }
    .demo-nav-btn svg {
        width: 20px;
        height: 20px;
    }
    .premium-laptop-showcase-row .premium-laptop {
        max-width: min(290px, 100%);
    }
    .premium-laptop__screen {
        padding: 12px 10px 22px;
        border-radius: 44px;
    }
    .premium-laptop__screen::before {
        top: 66px;
        height: 50px;
    }
    .premium-laptop__screen::after {
        width: 76px;
        height: 4px;
        bottom: 7px;
    }
    .premium-laptop__camera {
        top: 12px;
        width: 82px;
        height: 26px;
    }
    .premium-laptop__viewport {
        border-radius: 33px;
    }
    .premium-laptop::before {
        top: 80px;
        height: 46px;
    }
}

html[data-color-scheme="light"] .demo-nav-btn {
    border: 1px solid rgba(71, 85, 105, 0.28);
    background: rgba(255, 255, 255, 0.92);
    color: #334155;
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
html[data-color-scheme="light"] .demo-nav-btn:hover {
    background: #ffffff;
    border-color: rgba(37, 99, 235, 0.35);
    color: #1e293b;
}
html[data-color-scheme="light"] .demo-nav-btn:focus-visible {
    outline-color: #2563eb;
}
