/* Layout Utilities */
body {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    /* Clean background, no pattern */
    background-image: none;
}

.container {
    max-width: var(--container-width-wide);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Ensure all sections except home are centered */
section:not(#home) {
    display: flex;
    justify-content: center;
    align-items: center;
}

section:not(#home) > .container {
    width: 100%;
    max-width: var(--container-width-wide);
}

/* Ensure hero section maintains its full height layout */
#home {
    display: block;
}



.section {
    padding: var(--spacing-lg) 0;
    /* Consistent vertical spacing for all sections */
    position: relative;
    overflow: hidden;
}

.section-header {
    margin-bottom: var(--spacing-xl);
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-eyebrow {
    display: none;
    /* Hide eyebrows for cleaner look */
}

.section-title {
    font-size: 3.5rem;
    /* 56px */
    font-weight: 700;
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-primary);
    text-align: center;
}

.section-description {
    color: var(--color-text-secondary);
    font-size: 1.5rem;
    /* 24px */
    line-height: 1.4;
    font-weight: 400;
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.8);
    /* Light frosted glass */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* very subtle dark border */
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Hide mobile menu toggle on desktop */
.mobile-menu-toggle {
    display: none;
}

.logo {
    font-weight: 600;
    font-size: 19px;
    /* SF Pro specific size usually */
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

.nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    font-size: 12px;
    /* Apple nav is small */
    font-weight: 400;
    color: var(--color-text-secondary);
    /* Darker gray for light mode */
    opacity: 0.8;
    transition: opacity 0.2s ease;
    letter-spacing: -0.01em;
}

.nav-link:hover {
    color: var(--color-text-primary);
    /* Black on hover */
    opacity: 1;
}

/* Hero Section */
.hero {
    height: auto;
    display: flex;
    align-items: center;
    padding-top: calc(var(--header-height) + var(--spacing-lg));
    padding-bottom: var(--spacing-lg);
    overflow: hidden;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 60px;
    /* Push down a bit */
}

.hero-title {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    color: transparent;
    /* Text must be transparent for clip */

    /* Animated Gradient */
    background: linear-gradient(90deg,
            #1d1d1f 0%,
            #86868b 25%,
            #1d1d1f 50%,
            #86868b 75%,
            #1d1d1f 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gradientFlow 8s linear infinite;
}

.text-highlight {
    color: var(--color-accent-primary);
    -webkit-text-fill-color: var(--color-accent-primary);
}

.hero-subtitle {
    font-size: 1.7rem;
    /* 27px */
    margin: 0 auto var(--spacing-lg);
    color: var(--color-text-secondary);
    max-width: 700px;
    line-height: 1.4;
    font-weight: 400;
    text-align: center;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

/* Grids */
.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: var(--spacing-md);
    /* Tighter gaps for bento feel */
    justify-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }

    .grid-3 {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-lg) 0;
    background-color: var(--color-bg-primary);
    /* Match body */
    font-size: 12px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
}

.footer-links a {
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-text-primary);
    text-decoration: none;
}

/* Media Queries */

/* Large screens */
@media (max-width: 1200px) {
    .section-title {
        font-size: 3rem;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .card {
        padding: 32px;
    }
}

/* Medium screens */
@media (max-width: 992px) {
    .section-title {
        font-size: 2.5rem;
    }
    
    .section-description {
        font-size: 1.25rem;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 28px;
    }
}

/* Tablet screens */
@media (max-width: 768px) {
    /* Mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
        background: transparent;
        border: none;
        font-size: 24px;
        color: var(--color-text-primary);
        cursor: pointer;
    }
    
    /* Hide desktop nav on mobile */
    .nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        flex-direction: column;
        gap: 16px;
        padding: 24px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        z-index: 999;
    }
    
    /* Show nav when active */
    .nav.active {
        display: flex;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-description {
        font-size: 1.1rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
    }
    
    .card {
        padding: 24px;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .card-text {
        font-size: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
    
    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
}

/* Mobile screens */
@media (max-width: 576px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .section {
        padding: var(--spacing-md) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-lg);
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 0 20px;
        height: 44px;
        font-size: 16px;
    }
    
    /* Hide scroll container auto scroll on mobile */
    .scroll-container.auto-scroll-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .scroll-container.auto-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }
    
    .scroll-container.auto-scroll-wrapper > div {
        display: flex;
        gap: var(--spacing-sm);
        min-width: max-content;
    }
    
    /* Adjust card width for mobile horizontal scroll */
    .scroll-container.auto-scroll-wrapper .card {
        width: 300px;
        flex-shrink: 0;
    }
}
