/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    background: #050A18;
    color: #CBD5E1;
    line-height: 1.7;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; font-family: inherit; }

/* ===== UTILITY ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #8B5CF6;
    margin-bottom: 16px;
}
.gradient-text {
    background: linear-gradient(135deg, #8B5CF6, #06B6D4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    transition: all 0.3s;
    box-shadow: 0 4px 24px rgba(139, 92, 246, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.5);
}

/* ===== ANIMATED BG ===== */
.bg-glow {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
}
.orb-1 {
    width: 600px; height: 600px;
    background: #8B5CF6;
    top: -200px; left: -100px;
    animation: float1 20s ease-in-out infinite;
}
.orb-2 {
    width: 500px; height: 500px;
    background: #06B6D4;
    top: 40%; right: -150px;
    animation: float2 25s ease-in-out infinite;
}
.orb-3 {
    width: 400px; height: 400px;
    background: #EC4899;
    bottom: -100px; left: 30%;
    animation: float3 22s ease-in-out infinite;
}
@keyframes float1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(80px, 60px); } }
@keyframes float2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-60px, -80px); } }
@keyframes float3 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(40px, -60px); } }

/* ===== NAV ===== */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 16px 0;
    background: rgba(5, 10, 24, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #F1F5F9;
}
.btn-nav {
    font-size: 0.9rem;
    font-weight: 600;
    color: #94A3B8;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
}
.btn-nav:hover { color: #F1F5F9; background: rgba(139, 92, 246, 0.1); }

/* ===== HERO ===== */
.hero {
    position: relative;
    z-index: 1;
    padding: 160px 0 60px;
    text-align: center;
}
.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    color: #F1F5F9;
    line-height: 1.1;
    margin-bottom: 20px;
}
.hero-subtitle {
    font-size: 1.2rem;
    color: #94A3B8;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ===== FILTER BAR ===== */
.filter-bar {
    position: relative;
    z-index: 1;
    padding: 20px 0 40px;
}
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.pill {
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #94A3B8;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s;
}
.pill:hover {
    color: #F1F5F9;
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.08);
}
.pill.active {
    color: #fff;
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    border-color: transparent;
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.3);
}

/* ===== CARD GRID ===== */
.demos {
    position: relative;
    z-index: 1;
    padding-bottom: 80px;
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}
.card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(139, 92, 246, 0.1);
}
.card.hidden {
    display: none;
}

/* Card thumbnail */
.card-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--accent-rgb, 139, 92, 246), 0.08), rgba(5, 10, 24, 0.9));
    color: var(--accent, #8B5CF6);
}
.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background: var(--badge-color, #8B5CF6);
    opacity: 0.9;
}

/* Card body */
.card-body {
    padding: 20px 20px 12px;
    flex: 1;
}
.card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #F1F5F9;
    margin-bottom: 8px;
}
.card-desc {
    font-size: 0.9rem;
    color: #94A3B8;
    line-height: 1.6;
    margin-bottom: 12px;
}
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tag {
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #8B9CB8;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Card footer */
.card-footer {
    padding: 16px 20px 20px;
}
.btn-launch {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    transition: all 0.3s;
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.2);
}
.btn-launch:hover {
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    transform: translateY(-1px);
}

/* ===== CTA ===== */
.cta-section {
    position: relative;
    z-index: 1;
    padding: 80px 0;
}
.cta-inner {
    text-align: center;
    padding: 60px 40px;
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 24px;
}
.cta-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: #F1F5F9;
    margin-bottom: 12px;
}
.cta-desc {
    font-size: 1.05rem;
    color: #94A3B8;
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== FOOTER ===== */
.footer {
    position: relative;
    z-index: 1;
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer-inner {
    text-align: center;
    font-size: 0.85rem;
    color: #64748B;
}

/* ===== DEMO OVERLAY ===== */
.demo-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1000;
    background: rgba(5, 10, 24, 0.95);
    backdrop-filter: blur(8px);
    display: none;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s;
}
.demo-overlay.active {
    display: flex;
    opacity: 1;
}
.demo-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
    flex-shrink: 0;
}
.demo-overlay-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #F1F5F9;
}
.demo-overlay-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.demo-banner {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.btn-newtab {
    font-size: 0.85rem;
    font-weight: 500;
    color: #94A3B8;
    transition: color 0.2s;
}
.btn-newtab:hover { color: #F1F5F9; }
.btn-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 1.4rem;
    color: #94A3B8;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.btn-close:hover { color: #F1F5F9; background: rgba(255, 255, 255, 0.1); }
.demo-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero { padding: 120px 0 40px; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .card-grid { grid-template-columns: 1fr; }
    .filter-pills { gap: 6px; }
    .pill { padding: 6px 14px; font-size: 0.8rem; }
    .cta-inner { padding: 40px 20px; }
    .demo-overlay-header { flex-wrap: wrap; gap: 8px; }
    .demo-banner { display: none; }
}

@media (max-width: 480px) {
    .btn-nav { display: none; }
    .card-grid { grid-template-columns: 1fr; gap: 16px; }
}
