html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Black & White Theme Palette */
    --bg-light: #ffffff;
    --bg-subtle: #f5f5f5;
    --bg-card: #ffffff;
    --text-primary: #000000;
    --text-secondary: #4a4a4a;
    --text-muted: #757575;
    --accent-blue: #000000;
    --accent-green: #333333;
    --accent-hover: #333333;
    --border-color: #e0e0e0;
    --accent-purple: #9c27b0;
}

body {
    font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Interactive Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.logo-text svg {
    height: 36px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: #444;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 4px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-purple) !important;
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--text-primary);
}

.nav-menu a:hover::after {
    width: 100% !important;
}

.btn-download {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-download:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.25);
}

/* Hero Section */
.hero {
    padding: 120px 2rem 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: block;
    text-align: center;
    min-height: calc(100vh - 80px);
    padding-top: 100px;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding-right: 0;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    justify-content: center;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    background: var(--bg-subtle);
}

/* IDE Window */
.hero-visual {
    position: relative;
}

.ide-window {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border-color);
}

.ide-titlebar {
    background: #e8eaed;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.titlebar-controls {
    display: flex;
    gap: 0.5rem;
}

.control-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.control-dot.red {
    background: #ff5f56;
}

.control-dot.yellow {
    background: #ffbd2e;
}

.control-dot.green {
    background: #27c93f;
}

.titlebar-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.ide-preview {
    height: 700px;
    background: #1e1e1e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ide-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: bottom;
}

/* Features Section */
.features {
    padding: 100px 2rem;
    background: var(--bg-subtle);
    position: relative;
    z-index: 1;
}

.features-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(26, 115, 232, 0.3);
}

.feature-icon {
    width: 100px;
    height: 48px;
    margin-bottom: 1.5rem;
    color: var(--accent-blue);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Stats Section */
.stats {
    padding: 80px 2rem;
    background: var(--bg-light);
    position: relative;
    z-index: 1;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    text-align: center;
}

.stat-number {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* CTA Section */
.cta-section {
    padding: 100px 2rem;
    background: #000000;
    color: #ffffff;
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta-container {
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: white;
}

.cta-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2.5rem;
}

.btn-primary-large {
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 1.25rem 3rem;
    border-radius: 6px;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary-large:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
    background: var(--bg-subtle);
    padding: 60px 2rem 30px;
    position: relative;
    z-index: 1;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-column ul {
    list-style: none;
}

/* Footer contact column: allow long text to wrap cleanly */
.footer-column li {
    word-break: break-word;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .stats-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   BLACK & WHITE THEME SPECIFIC STYLES
   ======================================== */

/* Black dots on canvas background */
#bg-canvas {
    filter: brightness(0);
}

/* Make body and wrappers transparent so canvas is visible */
body,
main,
.page-container,
.legal-content {
    background-color: transparent !important;
}

/* Alternating Section Colors: Black Background / White Text */
body>section:nth-of-type(even),
main>section:nth-of-type(even),
.legal-content>section:nth-of-type(even) {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-radius: 15px;
    margin-left: 10px;
    margin-right: 10px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    padding: 2rem;
}

/* Odd sections = Transparent (Shows dots) */
body>section:nth-of-type(odd),
main>section:nth-of-type(odd),
.legal-content>section:nth-of-type(odd) {
    background-color: transparent !important;
    color: #000000 !important;
    position: relative;
    z-index: 1;
}

/* Ensure headings and text are White in Black sections */
.bw-text-white,
body>section:nth-of-type(even) h1,
body>section:nth-of-type(even) h2,
body>section:nth-of-type(even) h3,
body>section:nth-of-type(even) p,
body>section:nth-of-type(even) li,
body>section:nth-of-type(even) span,
body>section:nth-of-type(even) div,
main>section:nth-of-type(even) h1,
main>section:nth-of-type(even) h2,
main>section:nth-of-type(even) h3,
main>section:nth-of-type(even) p,
main>section:nth-of-type(even) li,
main>section:nth-of-type(even) span,
main>section:nth-of-type(even) div,
.legal-content>section:nth-of-type(even) h1,
.legal-content>section:nth-of-type(even) h2,
.legal-content>section:nth-of-type(even) p,
.legal-content>section:nth-of-type(even) li {
    color: #ffffff !important;
}

/* Inverted Cards in Black Sections */
body>section:nth-of-type(even) .use-case-card,
body>section:nth-of-type(even) .feature-card,
body>section:nth-of-type(even) .pricing-card,
body>section:nth-of-type(even) .blog-card,
body>section:nth-of-type(even) .platform-card,
main>section:nth-of-type(even) .use-case-card,
main>section:nth-of-type(even) .feature-card,
main>section:nth-of-type(even) .pricing-card,
main>section:nth-of-type(even) .blog-card,
main>section:nth-of-type(even) .platform-card {
    background-color: #000000 !important;
    border-color: #ffffff !important;
}

/* Ensure list items and icons inside cards are correct */
body>section:nth-of-type(even) .use-case-card ul li,
body>section:nth-of-type(even) .use-case-card ul li:before,
body>section:nth-of-type(even) .pricing-features li,
body>section:nth-of-type(even) .pricing-features li:before {
    color: #ffffff !important;
}

/* Button overrides - High Contrast */
.btn-primary,
.btn-primary-large,
.download-btn,
.pricing-btn-primary {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #000000 !important;
}

/* Invert buttons on Black backgrounds */
main>section:nth-of-type(even) .btn-primary,
main>section:nth-of-type(even) .btn-secondary,
main>section:nth-of-type(even) .pricing-btn-primary,
main>section:nth-of-type(even) .pricing-btn-secondary,
body>section:nth-of-type(even) .btn-primary,
body>section:nth-of-type(even) .btn-secondary,
body>section:nth-of-type(even) .pricing-btn-primary,
body>section:nth-of-type(even) .pricing-btn-secondary,
body>section:nth-of-type(even) .download-btn {
    border: 1px solid #ffffff !important;
    color: #ffffff !important;
    background-color: #000000 !important;
}

/* Scroll Progress Bar - Purple */
.scroll-progress {
    background: var(--accent-purple) !important;
}

/* Logo - Black to Purple Gradient */
.logo-text {
    background: linear-gradient(135deg, #000000, var(--accent-purple)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* Footer - White Background */
.footer {
    background: #ffffff !important;
    position: relative;
    z-index: 1;
}

/* Navbar - White Background */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
}

/* CTA Section - Black Background */
.cta-section {
    background: #000000 !important;
    color: #ffffff !important;
}

.cta-section .btn-primary-large {
    background: #ffffff !important;
    color: #000000 !important;
}

.cta-section .btn-primary-large:hover {
    background: #e0e0e0 !important;
}

/* ========================================
   STICKY SCROLL SECTION OVERRIDES
   Must come AFTER BW theme to override
   ======================================== */

/* Prevent BW theme from affecting sticky scroll wrapper */
body>section.sticky-features-wrapper {
    background: transparent !important;
    border-radius: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    color: inherit !important;
}

/* Force white background and black text for descriptions */
.scrolling-descriptions,
.feature-scroll-item {
    background-color: #ffffff !important;
}

.feature-scroll-item p,
.feature-scroll-item *,
.scrolling-descriptions p,
.scrolling-descriptions * {
    color: #000000 !important;
}

/* Force black background and purple text for heading */
.sticky-heading-panel {
    background-color: #000000 !important;
}

.sticky-heading-panel h2,
.sticky-heading-panel * {
    color: var(--accent-purple) !important;
}

/* Video Section Override - Remove Black Background */
body>section.video-section {
    background: transparent !important;
    color: #000000 !important;
    /* Ensure text creates contrast if dots are dark, or matches standard light theme */
}