/* --- SCROLL ANIMATIONS --- */
.scroll-fade {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.scroll-fade.visible {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* --- HERO SECTION --- */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 20px 80px 20px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    text-shadow: 0 4px 15px rgba(226, 54, 54, 0.15);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 600px;
    margin-bottom: 40px;
}

/* --- MINI DEMO CARD --- */
/* New container that handles the floating animation for both elements */
.demo-outer-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    animation: floatStrong 4s ease-in-out infinite;
}

.demo-wrapper {
    position: relative;
    width: 100%;
    height: 480px; 
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px var(--nav-shadow), var(--neon-glow);
    border: 1px solid var(--border-color);
    background-image: url('../assets/wallpaper/insidious_bg.png');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    color: #e0e0e0;
}

.live-preview-badge {
    position: absolute;
    top: -15px;
    left: 10px;
    background: rgba(226, 54, 54, 0.85); 
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 15;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(226, 54, 54, 0.4);
    animation: pulseBadge 2s infinite; 
}

.demo-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 25px 20px; /* Reduced padding */
    border-radius: 12px;
    text-align: center;
    width: 85%; /* Reduced width */
    max-width: 320px; /* Smaller max-width to show off the background */
    min-height: 280px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 2;
    position: relative; 
}

.demo-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

.demo-title em {
    font-size: 1rem;
    color: #d1d1d1;
    display: block;
    margin-top: 5px;
    font-style: italic;
}

.demo-details {
    font-size: 0.85rem;
    margin-bottom: 20px;
    line-height: 1.8;
    color: #f5f5f5;
}

.demo-highlight {
    color: #8b0000;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.6);
}

.demo-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    min-height: 40px; 
}

.demo-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.2s, left 0.3s ease-out, top 0.3s ease-out;
    color: white;
    z-index: 5;
}

.demo-btn-yes { background-color: #4a0000; box-shadow: 0 4px 10px rgba(74, 0, 0, 0.5); }
.demo-btn-yes:hover { background-color: #2b0000; transform: scale(1.05); transition: transform 0.2s; }
.demo-btn-no { background-color: #333333; }

@keyframes fadeInText {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.cheeky-message {
    display: none;
    margin-top: 15px;
    font-size: 0.85rem;
    font-style: italic;
    color: #f5f5f5;
    opacity: 0.9;
    animation: fadeInText 0.5s ease-out forwards;
}

/* --- THEMES SECTION --- */
.themes-section {
    padding: 80px 20px;
    background-color: var(--hover-bg);
    text-align: center;
}

.themes-section h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.themes-section p {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 50px;
}

.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.theme-card {
    background: var(--nav-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--nav-shadow), var(--neon-glow);
    border: 1px solid var(--border-color);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s;
}

.theme-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(226, 54, 54, 0.15), 0 0 25px rgba(226, 54, 54, 0.6);
    border-color: var(--primary-color);
}

.theme-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 3px solid var(--primary-color);
}

.theme-info {
    padding: 25px 20px;
}

.theme-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.theme-info p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.8;
}

/* --- HOW IT WORKS SECTION --- */
.how-it-works {
    padding: 100px 20px;
    text-align: center;
    max-width: 1100px;
    margin: 0 auto;
}

.how-it-works h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--text-color);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.step-card {
    padding: 40px 30px 30px 30px;
    background: var(--nav-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    position: relative;
    transition: border-color 0.3s, transform 0.3s;
    box-shadow: 0 10px 30px var(--nav-shadow), var(--neon-glow);
}

.step-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.step-number {
    width: 46px;
    height: 46px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    position: absolute;
    top: -23px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.3rem;
    box-shadow: 0 5px 15px rgba(226, 54, 54, 0.4);
}

.step-icon {
    width: 50px;
    height: 50px;
    fill: var(--primary-color);
    margin-bottom: 20px;
}

.step-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.step-card p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.8;
    line-height: 1.6;
}

/* --- JUMPSCARE & MODAL STYLES (Unchanged) --- */
.demo-blackout { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #000000; z-index: 8; opacity: 0; pointer-events: none; }
.demo-fog { position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle at center, rgba(13, 89, 89, 0.5) 0%, rgba(4, 26, 26, 0.7) 40%, transparent 70%); z-index: 9; opacity: 0; pointer-events: none; filter: blur(20px); }
.demo-jumpscare-img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0); z-index: 10; pointer-events: none; opacity: 0; width: 80%; max-width: 300px; filter: drop-shadow(0 0 25px rgba(0, 150, 150, 0.6)); }

@keyframes flickerBlack { 0% { opacity: 0; } 15% { opacity: 0.8; } 30% { opacity: 0; } 45% { opacity: 0.9; } 60% { opacity: 0.2; } 80% { opacity: 1; } 90% { opacity: 0.5; } 100% { opacity: 1; } }
@keyframes driftFog { 0% { opacity: 0; transform: scale(1) translate(0, 0); } 20% { opacity: 1; transform: scale(1.1) translate(-2%, 2%); } 80% { opacity: 1; transform: scale(1.3) translate(2%, -2%); } 100% { opacity: 0; transform: scale(1.5) translate(-4%, 4%); } }
@keyframes snapJumpscare { 0% { transform: translate(-50%, -50%) scale(0); opacity: 0; } 10% { transform: translate(-50%, -50%) scale(1.5); opacity: 1; } 20% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; } 75% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(5); opacity: 0; } }
@keyframes fadeBlackout { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes pullModal { 0% { transform: scale(0.2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.demo-modal { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; z-index: 20; }
.demo-modal.active { opacity: 1; visibility: visible; }
.demo-modal-content { background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.15); padding: 30px; border-radius: 12px; text-align: center; color: #f5f5f5; opacity: 0; max-width: 280px; }
.demo-modal-title { font-family: 'Playfair Display', serif; font-size: 1.6rem; color: #8b0000; margin-bottom: 10px; text-shadow: 0 0 10px rgba(139, 0, 0, 0.6); }

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    
    /* Restored the 16px border-radius so it stays rounded on phones */
    .demo-wrapper { 
        height: 420px; 
        border-radius: 16px; 
    }
    
    .themes-section h2, .how-it-works h2 { font-size: 2rem; }
}


/* --- HOME FAQ STYLES --- */
.home-faq-section {
    padding: 80px 20px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.home-faq-section h2 { font-size: 2.5rem; margin-bottom: 40px; color: var(--text-color); }
.faq-item {
    background-color: var(--nav-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--nav-shadow), var(--neon-glow);
    text-align: left;
    transition: border-color 0.3s;
}
.faq-item:hover { border-color: var(--primary-color); }
.faq-question {
    width: 100%; background: transparent; border: none; padding: 20px 25px;
    font-family: 'Poppins', sans-serif; font-size: 1.1rem; font-weight: 500;
    color: var(--text-color); cursor: pointer; display: flex;
    justify-content: space-between; align-items: center;
}
.faq-icon { font-size: 1.5rem; color: var(--primary-color); transition: transform 0.3s; }
.faq-answer { max-height: 0; overflow: hidden; background-color: var(--bg-color); transition: max-height 0.4s ease-out; }
.faq-answer p { margin: 0; padding: 0 25px 25px 25px; opacity: 0.85; font-size: 1rem; }
.faq-item.active .faq-icon { transform: rotate(45deg); color: #E23636; }

/* --- HOME DEVELOPER SECTION --- */
.home-dev-section {
    padding: 100px 20px;
    background-color: var(--hover-bg);
    text-align: center;
}
.dev-preview-card {
    max-width: 700px;
    margin: 0 auto;
    background: var(--nav-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 10px 40px var(--nav-shadow), var(--neon-glow);
}
.dev-avatar-small {
    width: 90px; height: 90px;
    background: var(--bg-color);
    border-radius: 50%; margin: 0 auto 20px auto;
    display: flex; justify-content: center; align-items: center;
    font-size: 2.5rem; border: 3px solid var(--primary-color);
}
.dev-name-small { font-size: 1.8rem; font-weight: 600; margin-bottom: 5px; }
.dev-title-small { color: var(--primary-color); font-weight: 500; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; margin-bottom: 20px; }
.dev-bio-small { font-size: 1.05rem; opacity: 0.85; line-height: 1.8; margin-bottom: 30px; }

.dev-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: transparent;
    color: var(--text-color);
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}
.dev-contact-btn:hover {
    background-color: var(--primary-color);
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(226, 54, 54, 0.2);
}

.title-sparkle {
    display: inline-block;
    animation: sparkleFloat 2.5s ease-in-out infinite; 
}
