/* Virtual Storytime Page */
.virtual-storytime-page {
    max-width: 1120px;
}

.vs-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
    gap: clamp(28px, 6vw, 70px);
    align-items: center;
    padding: clamp(32px, 7vw, 76px);
    margin: 12px 0 28px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 237, 0.86)),
        linear-gradient(90deg, rgba(45, 132, 126, 0.12), rgba(249, 115, 22, 0.12));
    border: 1px solid rgba(50, 16, 79, 0.08);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(50, 16, 79, 0.1);
}

.vs-kicker {
    margin: 0 0 10px;
    color: #2d847e;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.vs-hero h1 {
    margin: 0;
    font-size: clamp(2.4rem, 7vw, 4.6rem);
    line-height: 1;
    color: var(--text-primary);
}

.vs-lead {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--text-secondary);
    font-family: var(--font-playful);
    font-size: clamp(1.16rem, 2vw, 1.52rem);
    font-weight: 600;
    line-height: 1.45;
}

.vs-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.vs-hero__art {
    justify-self: center;
}

.vs-hero__art img {
    width: min(100%, 280px);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 28%;
    box-shadow: 0 18px 36px rgba(50, 16, 79, 0.16);
}

.vs-primary-download {
    max-width: 560px;
    margin-top: 30px;
}

.vs-download-button {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
    min-height: 56px;
}

.vs-download-size {
    font-size: 0.88em;
    opacity: 0.9;
}

.vs-download-size:empty {
    display: none;
}

.vs-download-note {
    margin: 14px 0 0;
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.55;
}

.vs-showcase {
    display: grid;
    grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
    gap: clamp(24px, 4vw, 44px);
    align-items: center;
    margin: 28px 0;
    padding: clamp(24px, 4vw, 40px);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(50, 16, 79, 0.08);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(50, 16, 79, 0.08);
}

#app-preview,
#downloads,
#other-downloads {
    scroll-margin-top: 96px;
}

.vs-showcase__copy h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3.5vw, 2.35rem);
}

.vs-showcase__copy p {
    margin-top: 14px;
    color: var(--text-secondary);
}

.vs-feature-list {
    grid-column: 1;
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vs-feature-list li {
    position: relative;
    padding-left: 28px;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.55;
}

.vs-feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 12px;
    height: 12px;
    background: #2d847e;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(45, 132, 126, 0.12);
}

.vs-showcase__media {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    margin: 0;
}

.vs-preview-trigger {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: var(--border-radius-sm);
    cursor: zoom-in;
}

.vs-preview-trigger:focus-visible {
    outline: 3px solid rgba(109, 40, 217, 0.72);
    outline-offset: 5px;
}

.vs-showcase__media img {
    display: block;
    width: 100%;
    aspect-ratio: 1512 / 1012;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 16px 36px rgba(50, 16, 79, 0.14);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.vs-preview-trigger:hover img,
.vs-preview-trigger:focus-visible img {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(50, 16, 79, 0.2);
}

.vs-showcase__media figcaption {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    text-align: center;
}

.vs-section {
    margin: 28px 0;
    padding: clamp(24px, 4vw, 40px);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(50, 16, 79, 0.08);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(50, 16, 79, 0.08);
}

.vs-section__heading {
    max-width: 760px;
    margin-bottom: 22px;
}

.vs-section__heading h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3.5vw, 2.35rem);
}

.vs-section__heading p,
.vs-why p {
    color: var(--text-secondary);
}

.vs-downloads .vs-primary-download {
    margin: 0 0 28px;
}

.vs-download-list {
    margin: 0 0 18px;
}

.vs-download-list h3 {
    margin: 0;
    font-size: 1.22rem;
}

.vs-download-list p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 0.98rem;
}

.vs-download-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.vs-download-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid rgba(45, 132, 126, 0.18);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 6px 18px var(--shadow-light);
}

.vs-download-card__platform {
    align-self: flex-start;
    padding: 5px 10px;
    color: #226862;
    background: rgba(45, 132, 126, 0.12);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.vs-download-card h3 {
    margin: 0;
    font-size: 1.22rem;
}

.vs-download-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.55;
}

.vs-download-card .btn {
    margin-top: auto;
    padding-inline: 18px;
}

.vs-why {
    border-left: 6px solid #2d847e;
}

.vs-why p:last-child {
    margin-bottom: 0;
}

.vs-install-list {
    display: grid;
    gap: 16px;
}

.vs-install-panel {
    background: #ffffff;
    border: 1px solid rgba(50, 16, 79, 0.12);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.vs-install-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    color: var(--text-primary);
    font-family: var(--font-headings);
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
}

.vs-install-panel summary::-webkit-details-marker {
    display: none;
}

.vs-install-panel summary::after {
    content: '+';
    flex: 0 0 auto;
    color: var(--accent-primary);
    font-size: 1.45rem;
    line-height: 1;
}

.vs-install-panel[open] summary::after {
    content: '-';
}

.vs-summary-detail {
    margin-left: auto;
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.vs-install-panel__body {
    padding: 0 22px 24px;
    border-top: 1px solid rgba(50, 16, 79, 0.08);
}

.vs-install-panel ol {
    margin: 20px 0 0 1.35rem;
}

.vs-install-panel li {
    margin-bottom: 16px;
    padding-left: 6px;
}

.vs-install-panel li:last-child {
    margin-bottom: 0;
}

.vs-install-panel ul {
    margin: 10px 0 8px 1.2rem;
}

.vs-install-panel p {
    font-size: 1rem;
    line-height: 1.6;
}

.vs-install-panel code,
.vs-shortcut code {
    overflow-wrap: anywhere;
    color: #32104f;
    font-size: 0.95em;
}

.vs-shortcut {
    margin-top: 24px;
    padding: 18px;
    background: rgba(45, 132, 126, 0.08);
    border: 1px solid rgba(45, 132, 126, 0.18);
    border-radius: var(--border-radius-sm);
}

.vs-shortcut p {
    margin-bottom: 10px;
}

.vs-shortcut code {
    display: block;
    padding: 12px;
    background: #ffffff;
    border-radius: 6px;
}

.vs-note {
    margin: 18px 0 0;
    padding: 16px;
    color: var(--text-secondary);
    background: rgba(249, 115, 22, 0.1);
    border-radius: var(--border-radius-sm);
}

body.modal-open {
    overflow: hidden;
}

.vs-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 4vw, 48px);
    background: rgba(6, 12, 24, 0.92);
}

.vs-preview-modal[hidden] {
    display: none;
}

.vs-preview-modal__frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 1440px);
    max-height: calc(100vh - 96px);
}

.vs-preview-modal__frame img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 96px);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.vs-preview-modal__close {
    position: fixed;
    top: clamp(14px, 3vw, 26px);
    right: clamp(14px, 3vw, 26px);
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.vs-preview-modal__close:hover,
.vs-preview-modal__close:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    outline: 3px solid rgba(255, 255, 255, 0.32);
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .vs-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .vs-hero__actions {
        justify-content: center;
    }

    .vs-showcase {
        grid-template-columns: 1fr;
    }

    .vs-showcase__media,
    .vs-feature-list {
        grid-column: auto;
        grid-row: auto;
    }

    .vs-primary-download,
    .vs-section__heading {
        margin-inline: auto;
    }

    .vs-download-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 560px) {
    .virtual-storytime-page {
        padding-inline: 14px;
    }

    .vs-hero {
        gap: 16px;
        padding: 22px 20px;
    }

    .vs-hero,
    .vs-section {
        border-radius: var(--border-radius-sm);
    }

    .vs-hero h1 {
        font-size: clamp(2.65rem, 13vw, 3.15rem);
    }

    .vs-kicker {
        margin-bottom: 6px;
        font-size: 0.82rem;
    }

    .vs-lead {
        margin-top: 16px;
        font-size: 1.08rem;
    }

    .vs-primary-download {
        margin-top: 18px;
    }

    .vs-downloads .vs-primary-download {
        margin: 0 0 24px;
    }

    .vs-download-button {
        font-size: 0.96rem;
        line-height: 1.28;
        min-height: 0;
        padding: 10px 16px;
        width: 100%;
    }

    .vs-download-note {
        margin-top: 10px;
        font-size: 0.92rem;
    }

    .vs-hero__art img {
        width: min(52vw, 150px);
    }

    .vs-showcase {
        padding: 22px 20px;
    }

    .vs-showcase__copy h2 {
        font-size: 1.9rem;
    }

    .vs-showcase__media figcaption {
        font-size: 0.86rem;
    }

    .vs-preview-modal {
        padding: 54px 12px 20px;
    }

    .vs-preview-modal__frame,
    .vs-preview-modal__frame img {
        max-height: calc(100vh - 86px);
    }

    .vs-install-panel summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .vs-install-panel summary::after {
        position: absolute;
        right: 20px;
    }

    .vs-install-panel summary {
        position: relative;
        padding-right: 52px;
    }

    .vs-summary-detail {
        margin-left: 0;
    }
}
