/* Layout Utilities */

.container {
    width: 90%;
    max-width: var(--container-max);
    margin: 0 auto;
}

@media (max-width: 768px) {
    .container {
        width: 92%;
    }
}

/* Floating Navbar "Notch" */
.navbar {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 8px 16px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: auto;
    /* Shrink to fit */
    min-width: 280px;
    /* Smart Navbar Transition */
    transition: transform 0.3s ease, padding 0.3s ease, background 0.3s ease;
}

/* Hidden State for Smart Navbar */
.navbar.navbar-hidden {
    transform: translate(-50%, -150%);
    /* Start from centered (-50%) and move up (-150%) */
}

.logo {
    font-weight: 800;
    letter-spacing: -0.05em;
    font-size: 1rem;
    position: relative;
    z-index: 10001;
    /* Above mobile menu */
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-text);
}

.nav-cta {
    background: var(--color-text);
    color: white;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: transform 0.2s;
    position: relative;
    z-index: 10001;
    /* Above mobile menu */
}

.nav-cta:hover {
    transform: scale(1.05);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
    padding: 4px;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.mobile-nav-links a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
}

@media (max-width: 768px) {
    .navbar {
        width: 90%;
        top: 1rem;
        padding: 8px 16px !important;
        /* Force padding on mobile */
    }

    .nav-links,
    .nav-cta {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }
}

.mobile-cta {
    background: var(--color-text);
    color: white !important;
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 1.2rem !important;
    /* Slightly smaller than other links but distinct */
    margin-top: 1rem;
    transition: transform 0.2s;
}

.mobile-cta:active {
    transform: scale(0.95);
}

/* BENTO GRID SYSTEM */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 columns base */
    grid-auto-rows: minmax(130px, auto);
    gap: var(--grid-gap);
    width: 100%;
}

.bento-item {
    background: var(--color-bg-subtle);
    border-radius: var(--radius-bento);
    padding: 1.5rem;
    /* Increased slightly for better breathability */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    /* Prepare for highlight */
}

.bento-item:hover {
    transform: scale(1.02);
    /* CSS Only zoom */
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    z-index: 10;
}

/* Span Utilities */
.span-2 {
    grid-column: span 2;
}

.span-3 {
    grid-column: span 3;
}

.span-4 {
    grid-column: span 4;
}

/* Full width */
.row-2 {
    grid-row: span 2;
}

@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .span-3,
    .span-4 {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .bento-grid {
        display: flex;
        /* Flex is often better for simple stacking than single column grid, but grid is fine too */
        flex-direction: column;
        gap: 1rem;
    }

    .bento-item {
        min-height: auto;
        /* Allow auto height */
        padding: 1.25rem;
    }

    /* Reset spans */
    .span-2,
    .span-3,
    .span-4,
    .row-2 {
        grid-column: auto;
        grid-row: auto;
    }
}

/* --- SITE FOOTER --- */
.site-footer {
    padding: 40px 0;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text-muted);
    position: relative;
    font-size: 12px;
}

.footer-legal {
    display: flex;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    gap: 2rem;
    align-items: center;
}

.footer-social {
    display: flex;
    gap: 2rem;
}

@media (max-width: 768px) {
    .site-footer {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        padding: 30px 0;
    }

    .footer-legal {
        position: static;
        transform: none;
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-social {
        gap: 1.5rem;
    }

    /* Hero Adjustments */
    .hero-section {
        padding-top: 100px !important;
        /* Override inline style if possible, but better to move inline style to class */
        min-height: auto !important;
        padding-bottom: 3rem;
    }

    .hero-title {
        font-size: 2.5rem !important;
        /* Ensure title isn't too huge */
    }
}