:root {
    --primary-color: #4B7BEC;
    --secondary-color: #45AEF5;
    --background-dark: #1E2337;
    --background-card: #2A2F45;
    --text-primary: #FFFFFF;
    --text-secondary: #A0A7B7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
nav {
    background-color: rgba(30, 35, 55, 0.95);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logos {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.xbo-logo, .checkie-logo {
    height: 40px;
    object-fit: contain;
}

.plus {
    font-size: 24px;
    color: var(--text-secondary);
}

.nav-buttons {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    padding: 160px 0 80px;
    text-align: center;
    background: linear-gradient(180deg, var(--background-dark) 0%, rgba(30, 35, 55, 0.95) 100%);
}

h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* Buttons */
.cta-button {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
}

.nav-buttons .cta-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(75, 123, 236, 0.3);
}

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Sections */
section {
    padding: 80px 0;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

/* Partnership Grid */
.partnership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.partnership-card {
    background-color: var(--background-card);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.partnership-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.benefit-card {
    background-color: var(--background-card);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.benefit-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    background-color: var(--background-card);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.feature h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Dashboards Gallery */
.dashboards {
    background-color: var(--background-card);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.2rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

.gallery-caption {
    margin-top: 1rem;
    text-align: center;
    color: var(--text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1001;
    overflow: auto;
    cursor: zoom-out;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    margin-top: 50px;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CTA Section */
.cta-section {
    text-align: center;
    background: linear-gradient(135deg, rgba(75, 123, 236, 0.1), rgba(69, 174, 245, 0.1));
    padding: 100px 0;
}

.cta-section h2 {
    margin-bottom: 1rem;
}

.cta-section p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Footer */
footer {
    background-color: var(--background-card);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logos {
    display: flex;
    gap: 2rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-links .contact-link {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 4px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    line-height: 1.6;
    display: inline-flex;
    align-items: center;
}

.footer-links .contact-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.footer-bottom {
    text-align: center;
    color: var(--text-secondary);
    padding-top: 2rem;
    border-top: 1px solid rgba(160, 167, 183, 0.1);
}

/* Mobile Optimization */
@media only screen and (max-width: 768px) {
    /* Typography */
    h1 {
        font-size: 2.5rem;
        padding: 0 20px;
    }
    
    h2 {
        font-size: 2rem;
        padding: 0 20px;
    }
    
    .subtitle {
        font-size: 1.1rem;
        padding: 0 20px;
    }

    /* Navigation */
    .nav-container {
        padding: 10px 20px;
    }

    .logos {
        gap: 0.5rem;
    }

    .xbo-logo, .checkie-logo {
        height: 32px;
    }

    .nav-buttons {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--background-dark);
        padding: 15px;
        display: flex;
        justify-content: space-around;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(10px);
        z-index: 100;
    }

    .nav-buttons .cta-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 8px 12px;
        white-space: nowrap;
    }

    /* Sections */
    section {
        padding: 60px 0;
    }

    .hero {
        padding: 120px 20px 80px;
    }

    /* Cards and Grids */
    .partnership-grid,
    .benefits-grid,
    .features-grid,
    .gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 20px;
    }

    .partnership-card,
    .benefit-card,
    .feature {
        padding: 1.5rem;
    }

    /* Gallery */
    .gallery-item {
        margin-bottom: 1rem;
    }

    .gallery-caption {
        font-size: 0.9rem;
    }

    /* CTA Section */
    .cta-section {
        padding: 60px 20px;
    }

    .cta-group {
        flex-direction: column;
        gap: 1rem;
    }

    .cta-button {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    /* Footer */
    footer {
        padding: 3rem 20px 100px; /* Added padding bottom for fixed nav */
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-logos {
        justify-content: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .footer-bottom {
        font-size: 0.9rem;
    }
}

/* iPhone-specific optimizations */
@media only screen and (max-width: 390px) {
    .nav-link {
        font-size: 0.8rem;
        padding: 8px 10px;
    }

    .nav-buttons .cta-button {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

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

/* Safe area insets for iPhone notches and home indicator */
@supports (padding: max(0px)) {
    .nav-container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }

    .nav-buttons {
        padding-bottom: max(15px, env(safe-area-inset-bottom));
    }

    footer {
        padding-bottom: max(100px, env(safe-area-inset-bottom) + 100px);
    }
}
