/* Landing Page Specific Keyframes & Variables */
:root {
    /* Brand Colors matching Antigravity screenshots */
    --brand-dark: #202124;
    /* Keep for reference/gradients */
    --brand-gray: #5f6368;
    --brand-light-gray: #f8f9fa;
    --brand-blue: #4285f4;
    --brand-google-blue: #1a73e8;
    --brand-google-red: #ea4335;
    --brand-google-yellow: #fbbc04;
    --brand-google-green: #34a853;

    /* Semantic Variables - Light Mode (Default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-surface: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.95);

    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-tertiary: #80868b;
    --text-inverse: #ffffff;

    --border-subtle: #f1f3f4;
    --border-strong: #dadce0;

    --shadow-nav: rgba(0, 0, 0, 0.05);
    --shadow-card: rgba(0, 0, 0, 0.08);

    /* Animation Timing */
    --ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Semantic Variables - Dark Mode */
        --bg-primary: #171717;
        --bg-secondary: #202124;
        --bg-surface: #202124;
        --bg-nav: rgba(23, 23, 23, 0.95);

        --text-primary: #e8eaed;
        --text-secondary: #9aa0a6;
        --text-tertiary: #80868b;
        --text-inverse: #202124;

        --border-subtle: #3c4043;
        --border-strong: #5f6368;

        --shadow-nav: rgba(0, 0, 0, 0.4);
        --shadow-card: rgba(0, 0, 0, 0.3);
    }
}

/* Base resets for landing page content */
body.landing-page {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Google Sans', 'Inter', system-ui, -apple-system, sans-serif;
    overflow-y: auto;
    /* Enable scroll for landing page */
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* Typography Overrides */
.landing-page h1,
.landing-page h2,
.landing-page h3,
.landing-page h4 {
    font-family: 'Google Sans', 'Inter', sans-serif;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

/* Navigation - Floating / Glass */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: var(--bg-nav);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-subtle);
}

.landing-nav.scrolled {
    box-shadow: 0 4px 20px var(--shadow-nav);
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 20px;
}

.nav-brand img {
    height: 40px;
    width: auto;
}

/* Theme-based logo switching */
.logo-light {
    display: block;
}

.logo-dark {
    display: none;
}

@media (prefers-color-scheme: dark) {
    .logo-light {
        display: none;
    }

    .logo-dark {
        display: block;
        filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
    }
}

/* Menu Items */
.nav-menu {
    display: flex;
    gap: 8px;
    margin-left: 40px;
    flex: 1;
}

.nav-link-item {
    position: relative;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 20px;
    transition: color 0.2s, background 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link-item:hover,
.nav-link-item.active {
    color: var(--text-primary);
    background: var(--border-subtle);
    /* Subtle weight increase without layout shift using text-shadow or letter-spacing trick
       For Variable fonts we'd use font-variation-settings, but standard fonts: */
    text-shadow: 0 0 .65px var(--text-primary), 0 0 .65px var(--text-primary);
}

.nav-link-item:active,
.btn-cta:active,
.btn-secondary:active,
.feature-card:active {
    transform: scale(0.98);
}

.nav-link-item i {
    font-size: 10px;
    transition: transform 0.3s ease;
    margin-top: 1px;
}

.nav-link-item:hover i {
    transform: rotate(180deg);
}

/* Mega Menu Dropdowns */
.submenu-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 280px;
    /* Glass Effect */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 10px 40px var(--shadow-card), 0 2px 5px var(--shadow-nav);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1001;
    margin-top: 10px;
    border: 1px solid var(--border-subtle);
}

@media (prefers-color-scheme: dark) {
    .submenu-container {
        background: rgba(32, 33, 36, 0.7);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }
}

.nav-link-item:hover .submenu-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s;
}

.submenu-item:hover {
    background: var(--bg-secondary);
}

.submenu-icon {
    width: 32px;
    height: 32px;
    background: rgba(66, 133, 244, 0.1);
    /* Keep brand tint */
    color: var(--brand-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.submenu-text h4 {
    margin: 0;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.submenu-text p {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-cta {
    background: var(--text-primary);
    /* Inverts in dark mode */
    color: var(--bg-primary);
    /* Inverts in dark mode */
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-nav);
    opacity: 0.9;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding: 160px 20px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at 15% 50%, rgba(66, 133, 244, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(234, 67, 53, 0.08) 0%, transparent 25%);
    position: relative;
    overflow: hidden;
}

/* Particle Background Wrapper */
#particle-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

#hero-particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--border-strong) 1.5px, transparent 1.5px);
    background-size: 40px 40px;
    opacity: 0.15;
    z-index: -1;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-surface);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    box-shadow: 0 2px 10px var(--shadow-nav);
    margin-bottom: 32px;
    border: 1px solid var(--border-subtle);
    animation: fadeInDown 0.8s ease-out;
}

.hero-badge img {
    width: 16px;
    height: auto;
}

.hero-title {
    font-size: 72px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 24px;
    background: linear-gradient(180deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    max-width: 900px;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 40px;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.hero-actions {
    display: flex;
    gap: 16px;
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px 28px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-secondary:hover {
    background: var(--border-subtle);
    border-color: var(--border-strong);
}

/* Features Grid */
.section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-blue);
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: block;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.features-grid {
    display: grid;
    /* Force exactly 4 columns on desktop */
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 1100px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    background: var(--bg-surface);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    /* Contain the spotlight */
}

/* Spotlight Glow Overlay */
.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 0) var(--mouse-y, 0),
            rgba(66, 133, 244, 0.06),
            transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 1;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow-card);
    /* Border color change handled by spotlight mainly, but keeping subtle base */
    border-color: rgba(66, 133, 244, 0.2);
}

.feature-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 24px;
    color: var(--text-primary);
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.feature-link {
    color: var(--brand-blue);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.feature-link:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 42px;
    }

    .nav-menu {
        display: none;
        /* Simple hiding for first iteration */
    }

}

/* Social Proof Section */
.social-proof-section {
    padding: 40px 20px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    text-align: center;
}

.social-proof-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logo-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    align-items: center;
    opacity: 0.6;
}

.partner-logo {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    filter: grayscale(100%);
    transition: all 0.3s;
    cursor: default;
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: translateY(-1px);
}

/* Demo Section */
.demo-section {
    text-align: center;
    background: radial-gradient(circle at center, var(--bg-surface) 0%, var(--bg-secondary) 100%);
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.video-container {
    max-width: 900px;
    margin: 0 auto 60px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 20px;
    box-shadow: 0 20px 60px var(--shadow-card);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-subtle);
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #202124, #3c4043);
    color: white;
}

.play-button {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.play-button:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

.play-button i {
    margin-left: 4px;
    /* Optical adjustment */
}

.screenshots-grid-container {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.screenshot-item {
    background: var(--bg-surface);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 10px 30px var(--shadow-card);
    max-width: 400px;
    width: 100%;
}

.app-screenshot {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
}

.caption {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

/* Testimonials Section */
.testimonials-section {
    position: relative;
    overflow: hidden;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.testimonial-card {
    background: var(--bg-surface);
    padding: 32px;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 20px var(--shadow-card);
}

.testimonial-stars {
    color: var(--brand-google-yellow);
    margin-bottom: 20px;
    font-size: 14px;
}

.testimonial-text {
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 24px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 20px;
}

.author-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.author-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 2px 0 0;
}

/* FAQ Section */
.faq-section {
    background: var(--bg-surface);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 16px;
    padding-bottom: 16px;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item summary {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    padding: 12px 0;
    list-style: none;
    /* Hide default triangle */
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.faq-item summary:hover {
    color: var(--brand-blue);
}

/* Custom indicator for summary */
.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 24px;
    font-weight: 400;
    color: var(--text-tertiary);
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-content {
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 8px 0 16px;
    font-size: 16px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .logo-grid {
        gap: 20px;
    }

    .video-container {
        border-radius: 12px;
    }

    .play-button {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}