/* ============================================================
   Demo section + hero/about real screenshot styles.
   Browser-bar mockup + lightbox live in styles-shared.css.
   Narrated walkthrough video styles live in styles-video.css.
   ============================================================ */

/* --- Screenshot frames reused on hero + about --- */
.hero-screenshot,
.about-screenshot {
    background: white;
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.35);
    overflow: hidden;
    transform: perspective(1200px) rotateY(-6deg) rotateX(3deg);
    transition: transform 0.6s ease;
    max-width: 560px;
    width: 100%;
}

.hero-screenshot:hover,
.about-screenshot:hover {
    transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
}

.about-screenshot {
    transform: none;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.hero-screenshot img,
.about-screenshot img,
.demo-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

/* --- Demo section --- */
.demo {
    background: linear-gradient(180deg, #f5f7ff 0%, #ffffff 100%);
}

.demo-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
}

.demo-tab {
    border: 2px solid transparent;
    background: white;
    color: var(--text-dark);
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: all 0.25s ease;
}

.demo-tab:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.demo-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.demo-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
    transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
    opacity: 0;
    transform: translateY(24px);
    display: flex;
    flex-direction: column;
}

.demo-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.demo-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 34px rgba(99, 102, 241, 0.18);
}

.demo-card.is-hidden {
    display: none !important;
}

.demo-thumb {
    position: relative;
    background: #0f172a;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.demo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s ease;
}

.demo-card:hover .demo-thumb img {
    transform: scale(1.03);
}

.demo-card figcaption {
    padding: 1.25rem 1.5rem 1.5rem;
}

.demo-card figcaption h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-dark);
}

.demo-card figcaption p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-screenshot,
    .about-screenshot {
        transform: none;
        max-width: 100%;
    }

    .demo-grid {
        grid-template-columns: 1fr;
    }
}
