:root {
    /* Colors - Light Mode (Tonal Azure & Midnight Slate) */
    --surface: #f8fafc;
    --surface-low: #f1f5f9;
    --surface-lowest: #ffffff;
    --surface-high: #e2e8f0;
    --on-surface: #1e293b;
    --on-surface-muted: #64748b;
    
    --primary: #2563eb;
    --primary-container: rgba(37, 99, 235, 0.1);
    --on-primary: #ffffff;
    
    --secondary: #0d9488;
    --secondary-container: rgba(13, 148, 136, 0.1);
    
    --tertiary: #7c3aed;
    --tertiary-container: rgba(124, 58, 237, 0.1);

    /* Geometry */
    --radius-sm: 0.4rem;
    --radius-md: 0.6rem;
    --radius-lg: 1rem;

    /* Spacing */
    --space-sm: 0.75rem;
    --space-md: 1.25rem;
    --space-lg: 2rem;
    --space-xl: 4rem;

    --container-max: 1200px;
    --header-height: 72px;
    
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-theme {
    --surface: #0b0f1a;
    --surface-low: #161e2e;
    --surface-lowest: #05070a;
    --surface-high: #1e293b;
    --on-surface: #f1f5f9;
    --on-surface-muted: #94a3b8;
    
    --primary: #60a5fa;
    --primary-container: rgba(96, 165, 250, 0.15);
    
    --secondary: #2dd4bf;
    --secondary-container: rgba(45, 212, 191, 0.15);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--surface);
    color: var(--on-surface);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section-spacing {
    padding: var(--space-xl) 0;
}

.bg-low { background-color: var(--surface-low); }
.bg-primary { background-color: var(--primary); }

.center { text-align: center; }
.text-white { color: #ffffff; }
.text-white-muted { color: rgba(255, 255, 255, 0.8); }

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-container);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: var(--surface-high);
    color: var(--on-surface);
}

.btn-outline {
    border: 2px solid var(--surface-high);
}

.btn-outline:hover {
    background: var(--surface-high);
}

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

.btn-white-outline {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--surface-high);
    transition: var(--transition);
}

.dark-theme header {
    background: rgba(11, 15, 26, 0.85);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 32px;
    width: 32px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.desktop-nav a {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--on-surface-muted);
}

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

#theme-toggle {
    background: none;
    border: none;
    color: var(--on-surface);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sun-icon { display: none; }
.dark-theme .sun-icon { display: block; }
.dark-theme .moon-icon { display: none; }

#mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1001;
}

#mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--on-surface);
    transition: var(--transition);
}

#mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

#mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 26, 0.5);
    backdrop-filter: blur(8px);
    z-index: 999;
}

.mobile-overlay.active {
    display: block;
}

/* Hero */
.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.hero-headline {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.accent-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subheadline {
    font-size: 1.25rem;
    color: var(--on-surface-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    position: relative;
}

.hero-image {
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    z-index: 2;
    position: relative;
}

.halo-effect {
    position: relative;
    display: inline-block; /* Ensure it wraps around the image */
    width: 100%;
}

.halo-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%; /* Slightly larger than the image for a halo effect */
    height: 120%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    filter: blur(50px);
    opacity: 0.2;
    z-index: -1;
    pointer-events: none;
}

/* Problem Section */
.section-header {
    margin-bottom: 3rem;
}

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

.section-header p {
    color: var(--on-surface-muted);
    font-size: 1.1rem;
    max-width: 600px;
}

.section-header.center p {
    margin: 0 auto;
}

.problem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.problem-card {
    background: var(--surface-lowest);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.problem-card .icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
}

.feature-card {
    background: var(--surface-low);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border-top: 4px solid var(--primary);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    background: var(--surface-lowest);
    box-shadow: 0 12px 24px rgba(0,0,0,0.05);
}

.feature-card.accent-primary { border-top-color: var(--primary); }
.feature-card.accent-secondary { border-top-color: var(--secondary); }
.feature-card.accent-tertiary { border-top-color: var(--tertiary); }

/* Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.step {
    text-align: center;
}

.step-num {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin: 0 auto 1.5rem;
}

/* Screenshots */
.screenshots-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: auto auto;
    gap: var(--space-lg);
}

.screenshot-item:first-child {
    grid-row: span 2;
}

.screenshot-item img {
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.caption {
    font-size: 0.875rem;
    color: var(--on-surface-muted);
    font-weight: 600;
}

/* Tech Section */
.tech-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-xl);
    align-items: center;
}

.tech-list {
    list-style: none;
    margin-top: 2rem;
}

.tech-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.tech-list li::before {
    content: '✓';
    color: var(--secondary);
    font-weight: 800;
}

.code-img {
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Docs Grid */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.docs-card {
    background: var(--surface-lowest);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
}

.docs-card:hover {
    border-color: var(--primary);
}

/* Creator Card */
.creator-card {
    display: flex;
    background: var(--surface-low);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.creator-image {
    width: 300px;
    flex-shrink: 0;
}

.creator-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.creator-info {
    padding: var(--space-lg);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-links a {
    font-weight: 700;
    color: var(--primary);
}

/* Footer */
footer {
    padding: var(--space-xl) 0 var(--space-lg);
    border-top: 1px solid var(--surface-high);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-links {
    display: flex;
    gap: var(--space-xl);
}

.link-group h4 {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.link-group a {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--on-surface-muted);
    font-size: 0.9rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--surface-high);
    color: var(--on-surface-muted);
    font-size: 0.875rem;
}

/* Final CTA Section */
.final-cta .hero-ctas {
    justify-content: center;
    margin-top: 2rem;
}

/* Mobile */
@media (max-width: 992px) {
    .hero .container, .tech-grid, .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .hero-headline { font-size: 3rem; }
    
    .creator-card { flex-direction: column; }
    .creator-image { width: 100%; height: 300px; }
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background: var(--surface);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        gap: 2rem;
        padding: 2rem;
    }

    .desktop-nav.active {
        display: flex;
    }

    .desktop-nav a {
        font-size: 1.5rem;
        color: var(--on-surface) !important; /* Force visibility */
        font-weight: 700;
        width: 100%;
        text-align: center;
    }

    .desktop-nav a.btn {
        width: auto;
        padding: 1rem 2.5rem;
    }
    
    #mobile-menu-toggle {
        display: flex;
    }
    
    .problem-grid, .steps-grid, .screenshots-grid {
        grid-template-columns: 1fr;
    }
    
    .screenshot-item:first-child { grid-row: auto; }
}
