/* =========================================
   CSS VARIABLES & THEME SETUP
   ========================================= */
:root {
    /* UI Design Colors */
    --primary: #d516e8;
    --primary-rgb: 213, 22, 232;
    --secondary: #4072b7;
    --secondary-rgb: 64, 114, 183;
    --accent: #aeba63;
    --accent-rgb: 174, 186, 99;
    
    /* Backgrounds & Surfaces */
    --background: #FFFFFF;
    --background-alt: #F8FAFC;
    --surface: #FFFFFF;
    
    /* Typography Colors */
    --text: #000000;
    --text-primary: #000000;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    
    /* Borders & UI */
    --border: #E2E8F0;
    --border-radius: 24px;
    --shadow-subtle: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lift: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Fonts */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--background);
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    line-height: 1.6;
    background-color: var(--background);
    overflow-x: hidden;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   SECTION STYLING - MANDATORY
   ========================================= */
section {
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}

section:nth-child(odd) {
    background-color: var(--background);
}

section:nth-child(even) {
    background-color: var(--background-alt);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* =========================================
   BUTTON STYLES
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 9999px; /* Pill shape */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.125rem;
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

header nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

header nav a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
}

header nav a:hover {
    color: var(--primary);
}

#header-cta {
    padding: 0.6rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
}

#header-cta:hover {
    background: var(--secondary);
    color: white;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
}

/* Base state for mobile-only elements - hidden on desktop */
.mobile-only {
    display: none;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    color: white; /* Text is white on hero */
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Hero Animation - Aurora Blobs */
.hero-bg-animation {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: blobFloat 20s infinite alternate;
}

.blob-1 {
    width: 50vw;
    height: 50vw;
    background: var(--primary);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.blob-2 {
    width: 40vw;
    height: 40vw;
    background: var(--secondary);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.blob-3 {
    width: 30vw;
    height: 30vw;
    background: var(--accent);
    top: 40%;
    left: 40%;
    animation-delay: -10s;
    opacity: 0.4;
}

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: rgba(0, 0, 0, 0.4); /* Darkens bg for text readability */
    backdrop-filter: blur(2px);
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1.5rem;
    color: white;
}

.hero-description {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* =========================================
   PLAYGROUND SECTION
   ========================================= */
#playground {
    background: var(--background);
}

.playground-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.playground-panel {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-subtle);
}

.panel-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.panel-header h4 {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Fixed height zones - 350px */
.upload-zone, .result-display {
    height: 350px;
    width: 100%;
    background: var(--background-alt);
    border-radius: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.upload-zone {
    border: 2px dashed var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.upload-placeholder, .result-placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.upload-icon, .result-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.upload-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

/* Images inside zones */
#preview-image, #result-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    background: black; /* Contrast for images */
}

/* Loading State */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.playground-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.playground-actions .btn {
    min-width: 120px;
}

.hidden { display: none !important; }

/* =========================================
   HOW IT WORKS (STEPS)
   ========================================= */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.step-card {
    background: var(--surface);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    height: 100%;
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lift);
    border-color: var(--primary);
}

.step-icon {
    width: 70px;
    height: 70px;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
    font-size: 1.75rem;
}

.step-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* =========================================
   FEATURES (BENEFITS)
   ========================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lift);
    border-color: var(--secondary);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* =========================================
   GALLERY
   ========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2x2 grid for 4 items */
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay span {
    color: white;
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

/* =========================================
   TESTIMONIALS
   ========================================= */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2x2 grid */
    gap: 2rem;
}

.testimonial-card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    position: relative;
    box-shadow: var(--shadow-subtle);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lift);
}

.testimonial-card p {
    font-style: italic;
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 5rem;
    color: rgba(var(--primary-rgb), 0.1);
    font-family: serif;
    line-height: 1;
    z-index: 0;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.author-info h5 {
    margin: 0;
    font-size: 1rem;
}

.author-role {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* =========================================
   FAQ SECTION
   ========================================= */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--surface);
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    text-align: left;
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: rgba(var(--primary-rgb), 0.05);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    margin: 0;
    color: var(--text-secondary);
}

/* =========================================
   CTA BANNER
   ========================================= */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    text-align: center;
    color: white;
}

.cta-content h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.cta-content .btn {
    background: white;
    color: var(--primary);
}

.cta-content .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    max-width: 1280px;
    margin: 0 auto;
}

.footer-brand p {
    margin-top: 1rem;
    max-width: 300px;
}

.footer-col h4 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    margin-top: 3rem;
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* =========================================
   RESPONSIVE MEDIA QUERIES
   ========================================= */

/* Mobile (max 768px) */
@media (max-width: 768px) {
    html { font-size: 14px; }
    
    header { padding: 0.75rem 1rem; }
    
    .menu-toggle { display: block; }
    
    header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        gap: 1rem;
    }
    
    header nav.active { display: flex; }
    
    .desktop-only { display: none; }
    .mobile-only { display: inline-flex; }
    
    .hero { 
        min-height: auto;
        padding: 6rem 1rem 3rem; 
    }
    
    .playground-grid, 
    .steps-grid, 
    .features-grid, 
    .gallery-grid, 
    .testimonials-grid, 
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .playground-actions {
        flex-direction: column;
    }
    
    .upload-zone, .result-display {
        height: 250px;
    }
    
    .footer-content {
        text-align: center;
    }
    
    .footer-brand p {
        margin: 1rem auto;
    }
}

/* Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .steps-grid, .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}