/* =========================================
   VARIABLES & THEME CONFIGURATION
   ========================================= */
   :root {
    /* Zero-Kelvin Cybernetic Palette */
    --primary: #87CEEB;
    --primary-rgb: 135, 206, 235;
    --secondary: #E0FFFF;
    --secondary-rgb: 224, 255, 255;
    --accent: #00BFFF;
    --accent-rgb: 0, 191, 255;
    --background: #F8FCFF;
    --background-alt: #F0F8FF; /* Slightly darker than main bg for contrast */
    --surface: #FFFFFF;
    --text: #1A2B3C;
    --text-secondary: #4A6B8A;
    --text-muted: #8FA3B8;
    --border: #D1E5F0;
    
    /* Spacing */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;

    /* Fonts */
    --font-display: 'Unbounded', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 14px; /* Mobile base */
    background-color: var(--background);
    color: var(--text);
    overflow-x: hidden;
    width: 100%;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--text);
    margin-bottom: 1rem;
    font-weight: 700;
    word-break: break-word;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.1; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }

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

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

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

/* =========================================
   SECTION STYLING - MANDATORY
   ========================================= */
section, .section {
    padding: 4rem 1.5rem;
    position: relative;
    width: 100%;
}

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

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

/* Add subtle frosted texture to even sections */
section:nth-child(even)::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 50% 50%, rgba(135, 206, 235, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

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

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

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

/* =========================================
   COMPONENTS
   ========================================= */
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 4px; /* Sharp edges for theme */
    font-weight: 600;
    font-family: var(--font-display);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.btn-primary {
    background: var(--primary);
    color: #003049;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.4);
}

.btn-secondary {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

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

.btn-accent {
    background: var(--accent);
    color: white;
}

.btn-accent:hover {
    filter: brightness(1.1);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(135, 206, 235, 0.15);
    border-color: var(--primary);
}

.card-border-reveal {
    position: relative;
    overflow: hidden;
}

.card-border-reveal::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.card-border-reveal:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Glass Panel */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px 0 rgba(135, 206, 235, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

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

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

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

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

header nav .btn-nav {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    background: var(--primary);
    color: #003049;
    border-radius: 4px;
}

header nav .btn-nav:hover {
    background: var(--accent);
    color: white;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 6rem 1rem 4rem;
    text-align: center;
    background-color: #000; /* Fallback */
}

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

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

.hero-bg-animation {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* Shimmer Animation Style */
.shimmer-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.2) 50%, transparent 60%);
    background-size: 200% 200%;
    animation: shimmerMove 3s infinite;
}

@keyframes shimmerMove {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(248, 252, 255, 0.9));
}

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

.hero h1 {
    color: var(--text);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px rgba(135, 206, 235, 0.3);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: var(--text-secondary);
}

/* =========================================
   PLAYGROUND
   ========================================= */
.playground-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

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

.panel-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.upload-zone, .result-display {
    width: 100%;
    height: 350px;
    background: #F0F4F8;
    border: 2px dashed var(--border);
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: #F8FCFF;
}

.upload-content, .placeholder-content {
    text-align: center;
    color: var(--text-muted);
}

.upload-content i, .placeholder-content i {
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Images fit inside containers */
.upload-zone img, .result-display img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

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

.loading-state {
    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;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* =========================================
   GRIDS & FEATURES
   ========================================= */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.step-card {
    position: relative;
}

.step-icon {
    width: 60px;
    height: 60px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--accent);
    font-size: 1.5rem;
}

/* =========================================
   GALLERY
   ========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--surface);
    border: 1px solid var(--border);
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay span {
    color: white;
    font-family: var(--font-display);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 1px solid white;
    backdrop-filter: blur(4px);
}

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

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

/* =========================================
   TESTIMONIALS
   ========================================= */
.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.testimonial-card {
    text-align: left;
}

.quote-icon {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.review-text {
    font-style: italic;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.reviewer-info h4 {
    margin-bottom: 0.25rem;
    color: var(--text);
}

.reviewer-info span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

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

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: var(--secondary);
}

.accordion-header i {
    transition: transform 0.3s ease;
    color: var(--primary);
}

.accordion-header.active i {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--background-alt);
}

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

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

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    text-align: center;
}

.footer-brand h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.footer-links ul, .footer-legal ul {
    list-style: none;
}

.footer-links li, .footer-legal li {
    margin-bottom: 0.75rem;
}

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

/* =========================================
   MODALS
   ========================================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--surface);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    text-align: left;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    color: var(--text-muted);
}

.modal-body h2 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.modal-body h4 {
    color: var(--text);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.modal-body ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

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

/* Mobile (Default above is mobile-first) */
@media (max-width: 767px) {
    .menu-toggle {
        display: block;
    }

    header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        border-bottom: 1px solid var(--border);
    }

    header nav.active {
        display: flex;
    }

    header nav a {
        width: 100%;
        text-align: center;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border);
    }
    
    header nav .btn-nav {
        width: 100%;
        margin-top: 1rem;
    }
}

/* Tablet (768px+) */
@media (min-width: 768px) {
    html { font-size: 15px; }

    .grid-2, .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .playground-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
        text-align: left;
    }
    
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    html { font-size: 16px; }

    .steps-grid, .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .bento-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}