/* CSS Variables for Light/Dark Mode */
:root {
    /* Light mode colors - Cloud-like gradient */
    --bg-base: #f0f6ff;
    --bg-gradient-start: #dbeafe;
    --bg-gradient-middle: #bfdbfe;
    --bg-gradient-end: #93c5fd;
    --blur-color-1: rgba(147, 197, 253, 0.8);
    --blur-color-2: rgba(191, 219, 254, 0.6);
    --blur-color-3: rgba(59, 130, 246, 0.4);
    --blur-color-4: rgba(219, 234, 254, 0.7);
    --blur-color-5: rgba(96, 165, 250, 0.5);
    --text-primary: #1f2937;
    --text-secondary: rgba(31, 41, 55, 0.9);
    --text-muted: rgba(31, 41, 55, 0.8);
    --card-bg: rgba(255, 255, 255, 0.25);
    --card-text: #1f2937;
    --card-text-secondary: #374151;
    --card-text-muted: #374151;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --footer-text: rgba(31, 41, 55, 0.7);
    --footer-bg: rgba(255, 255, 255, 0.3);
    --footer-border: rgba(31, 41, 55, 0.1);
    --toggle-bg: rgba(255, 255, 255, 0.25);
    --toggle-border: rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] {
    /* Dark mode colors - Darker cloud-like gradient */
    --bg-base: #0f172a;
    --bg-gradient-start: #1e293b;
    --bg-gradient-middle: #334155;
    --bg-gradient-end: #475569;
    --blur-color-1: rgba(71, 85, 105, 0.6);
    --blur-color-2: rgba(51, 65, 85, 0.5);
    --blur-color-3: rgba(30, 41, 59, 0.7);
    --blur-color-4: rgba(15, 23, 42, 0.8);
    --blur-color-5: rgba(59, 130, 246, 0.3);
    --text-primary: #f1f5f9;
    --text-secondary: rgba(241, 245, 249, 0.9);
    --text-muted: rgba(241, 245, 249, 0.8);
    --card-bg: rgba(30, 41, 59, 0.4);
    --card-text: #f1f5f9;
    --card-text-secondary: #e2e8f0;
    --card-text-muted: #cbd5e1;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --footer-text: rgba(241, 245, 249, 0.7);
    --footer-bg: rgba(30, 41, 59, 0.3);
    --footer-border: rgba(51, 65, 85, 0.4);
    --toggle-bg: rgba(30, 41, 59, 0.4);
    --toggle-border: rgba(255, 255, 255, 0.15);
}

/* Image Background System */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./bg-gradient-opt.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -2;
    transition: all 0.3s ease;
}

/* Fallback gradient if image fails to load */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        var(--bg-gradient-start) 0%, 
        var(--bg-gradient-middle) 50%, 
        var(--bg-gradient-end) 100%);
    z-index: -3;
    transition: opacity 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--toggle-bg);
    border: 1px solid var(--toggle-border);
    border-radius: 50px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 1001;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--card-text);
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    background: var(--toggle-bg);
    border-color: rgba(255, 255, 255, 0.25);
}

.theme-toggle .icon {
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .icon {
    transform: rotate(180deg);
}

/* Container and Layout */
.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    width: 100%;
    gap: 4rem;
    padding: 2rem;
    align-items: center;
    justify-items: center;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}



/* Component styles */
.left-section {
    color: var(--text-primary);
    text-align: center;
    transition: color 0.3s ease;
    position: relative;
    z-index: 2;
}

.logo {
    margin-bottom: 2rem;
}

.logo img {
    max-width: 200px;
    height: auto;
    transition: opacity 0.3s ease;
    display: block;
    margin: 0 auto;
}

/* Reserve space for logo to avoid layout shift when images load */
.logo {
    width: 200px;
    height: 70px;
    position: relative; /* establish containing block for absolute children */
    overflow: hidden;
    display: block; /* ensure block-level so margin auto centers it */
    margin: 0 auto; /* center the logo container in its column */
    margin-bottom: 2.5rem; /* restore vertical spacing below logo */
}

/* Logo theme switching - more specific selectors */
/* Theme logo switching without reflow: keep both images in layout and toggle opacity */
.logo img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%); /* center both axes */
    transition: opacity 0.25s ease;
}

/* default: show dark logo (when not in dark theme) */
.logo img.logo-dark { opacity: 1; }
.logo img.logo-light { opacity: 0; }

/* in dark theme: fade in light logo and fade out dark logo */
body[data-theme="dark"] .logo img.logo-dark { opacity: 0; }
body[data-theme="dark"] .logo img.logo-light { opacity: 1; }

.logo-text {
    font-size: 4rem;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 1px;
    color: var(--text-primary);
    transition: color 0.3s ease;
    display: none;
    font-family: 'Inter', sans-serif;
    margin-bottom: 0.5rem;
}

/* Show fallback text only when logo images fail to load */
.logo.logo-failed .logo-text {
    display: block !important;
}

.logo.logo-failed .logo-dark,
.logo.logo-failed .logo-light {
    display: none !important;
}

.brand-text {
    font-size: 4rem;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 1px;
    color: var(--text-primary);
    transition: color 0.3s ease;
    margin-bottom: 1.5rem;
    font-family: 'Inter', sans-serif;
}

.tagline {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.9;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.launching-soon {
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: 6px;
    text-transform: uppercase;
    opacity: 0.8;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.right-section {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    z-index: 2;
    max-width: 460px;
}

/* Reduce CLS: reserve space for right card and set stable typographic metrics */
.right-section {
    min-height: 420px; /* approximate visual height to prevent big shifts */
}

/* Stable typography to reduce reflow when webfonts load */
body, .right-section, .left-section {
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

/* Apply Inter only after it's loaded to prevent layout shifts from font metrics */
html.fonts-loaded body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Ensure logo images use intrinsic sizing to avoid layout shift */
.logo img.logo-light, .logo img.logo-dark {
    width: 200px;
    height: 70px;
    object-fit: contain;
}

.promo-header {
    text-align: center;
    margin-bottom: 2rem;
}

.promo-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--card-text);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.promo-subtitle {
    color: var(--card-text-secondary);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.free-text {
    color: #f97316;
    font-weight: 700;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    text-shadow: 0 0 8px rgba(249, 115, 22, 0.3);
}

.reviewers {
    display: flex;
    justify-content: center;
    gap: -10px;
    margin: 2rem 0;
}

.reviewer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid white;
    margin-left: -10px;
    object-fit: cover;
}

/* Ensure browser reserves avatar aspect ratio to reduce CLS */
.reviewer-avatar {
    aspect-ratio: 1 / 1;
    display: inline-block;
}

.reviewer-avatar:first-child {
    margin-left: 0;
}

.sparkle {
    color: #fbbf24;
    font-size: 1.5rem;
    margin-left: 1rem;
}

.benefits {
    margin: 2rem 0;
    text-align: left;
}

.benefit-intro {
    color: var(--card-text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.benefit-list {
    list-style: none;
}

.benefit-item {
    color: var(--card-text-muted);
    margin-bottom: 0.75rem;
    padding-left: 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.benefit-item::before {
    content: "•";
    color: var(--accent-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    transition: color 0.3s ease;
}

.highlight {
    font-weight: 600;
    color: var(--card-text);
    transition: color 0.3s ease;
}

.cta-section {
    text-align: center;
    margin-top: 2.5rem;
}

.cta-button {
    background: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.cta-button:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

.value-text {
    margin-top: 1rem;
    /* color: var(--accent-color); */
    color: #f97316;
    font-weight: 600;
    transition: color 0.3s ease;
}

.limited-seat {
    color: #f97316;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(249, 115, 22, 0.3);
}

.footer {
    position: fixed;
    bottom: 1.5rem;
    right: 2rem;
    color: var(--footer-text);
    font-size: 0.875rem;
    font-weight: 400;
    z-index: 1000;
    pointer-events: none;
    transition: all 0.3s ease;
    background: var(--footer-bg);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--footer-border);
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0.9;
}

/* Tablet styles */
@media (max-width: 1024px) {
    .container {
        gap: 3rem;
        padding: 1.5rem;
    }

    .logo img {
        max-width: 180px;
    }

    .logo-text {
        font-size: 3rem;
    }

    .launching-soon {
        font-size: 2rem;
        letter-spacing: 6px;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    body {
        padding: 1rem 0;
    }

    .theme-toggle {
        top: 1rem;
        right: 1rem;
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }

    .theme-toggle .icon {
        font-size: 1.2rem;
    }



    .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
        max-width: 100%;
    }

    .left-section {
        order: 1;
        padding: 2rem 1rem;
        display: block;
        visibility: visible;
        opacity: 1;
    }

    .logo {
        margin-bottom: 1rem;
    }

    .logo img {
        max-width: 150px;
    }

    .logo-text {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 0.9rem;
        letter-spacing: 2px;
        margin-bottom: 2rem;
    }

    .launching-soon {
        font-size: 1.5rem;
        letter-spacing: 3px;
    }

    .right-section {
        order: 2;
        padding: 2rem 1.5rem;
        margin: 0 1rem;
        border-radius: 15px;
    }

    .promo-title {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    .promo-subtitle {
        font-size: 0.9rem;
    }

    .free-text {
        font-size: 1rem;
    }

    .reviewers {
        gap: -5px;
        margin: 1.5rem 0;
    }

    .reviewer-avatar {
        width: 50px;
        height: 50px;
        margin-left: -5px;
    }

    .sparkle {
        font-size: 1.2rem;
        margin-left: 0.5rem;
    }

    .benefit-intro {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .benefit-item {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
        line-height: 1.4;
    }

    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 280px;
    }

    .value-text {
        font-size: 0.9rem;
        margin-top: 0.75rem;
    }

    .footer {
        position: fixed;
        bottom: 1rem;
        right: 1rem;
        text-align: center;
        margin-top: 0;
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        color: var(--footer-text);
        background: var(--footer-bg);
        border-radius: 30px;
        border: 1px solid var(--footer-border);
        backdrop-filter: blur(8px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
}

/* Small mobile styles */
@media (max-width: 480px) {
                .container {
                    grid-template-columns: 1fr;
                    gap: 1.5rem; /* smaller gap to reduce layout movement */
                    padding: 1rem;
                    max-width: 100%;
                }
                body {
                    padding: 1rem 0;
                }

                /* Increase reserved height for right-section on mobile to avoid large shifts */
                .right-section {
            min-height: 520px;
            padding: 2.5rem; /* keep original padding */
                        box-sizing: border-box;
                }

                /* Reduce large headings to prevent reflow when fonts load */
                .promo-title { font-size: 1.6rem; }
                .promo-subtitle { font-size: 0.95rem; }
                .logo-text { font-size: 3rem; }


    .left-section {
        padding: 1.5rem 0.5rem;
    }

    .logo img {
        max-width: 120px;
    }

    .logo-text {
        font-size: 2rem;
    }

    .tagline {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }

    .launching-soon {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }

    .right-section {
        /* preserve original padding on small viewports */
        padding: 2.5rem;
    }

    .promo-title {
        font-size: 1.2rem;
    }

    .reviewers {
        margin: 1rem 0;
    }

    .reviewer-avatar {
        width: 45px;
        height: 45px;
    }

    .benefit-intro,
    .benefit-item {
        font-size: 0.8rem;
    }

    .cta-button {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }

    .footer {
        bottom: 0.75rem;
        right: 0.75rem;
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        border-radius: 25px;
        letter-spacing: 0.3px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .logo img {
        max-width: 100px;
    }

    .logo-text {
        font-size: 1.8rem;
    }

    .launching-soon {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .right-section {
        padding: 1.2rem 0.8rem;
    }

    .promo-title {
        font-size: 1.1rem;
    }

    .reviewer-avatar {
        width: 40px;
        height: 40px;
    }
}