/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevent layout shift during page load */
html {
    scroll-behavior: smooth;
}

/* Prevent animations on initial load to avoid CLS */
@media (prefers-reduced-motion: no-preference) {
    .no-js * {
        animation: none !important;
        transition: none !important;
    }
}

:root {
    --primary-color: #222D59;
    --secondary-color: #2c3e50;
    --accent-color: #C8D400;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    font-display: swap;
    text-rendering: optimizeSpeed;
}

/* Prevent layout shift from font loading */
* {
    font-display: swap;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
    height: 90px;
    min-height: 90px;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 20px;
    height: 100%;
}

@media (max-width: 480px) {
    .navbar .container {
        padding: 0.5rem 15px;
    }
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
}

.logo {
    height: 80px;
    width: auto;
    transition: var(--transition);
    image-rendering: -webkit-optimize-contrast;
    will-change: auto;
    backface-visibility: hidden;
    display: block;
}

.nav-brand a:hover .logo {
    opacity: 0.8;
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

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

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    margin-top: 70px;
    padding: 80px 0;
    background: linear-gradient(135deg, #222D59 0%, #1a2340 100%);
    color: white;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    min-height: 4.2em;
    color: white;
    word-wrap: break-word;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    margin-top: 0;
    color: var(--accent-color);
    font-weight: 600;
    min-height: 1.875em;
    line-height: 1.5;
    display: block;
    word-wrap: break-word;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    min-height: 50px;
}

.btn {
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--primary-color);
    font-weight: 600;
}

.btn-primary:hover {
    background: #b8c300;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    width: 100%;
    /* Reserve space for image to prevent CLS */
    contain: layout;
}

.hero-img {
    width: 100%;
    max-width: 500px;
    height: 500px;
    object-fit: contain;
    display: block;
    aspect-ratio: 1 / 1;
    filter: hue-rotate(90deg) saturate(1.2);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    will-change: auto;
    backface-visibility: hidden;
    transform: translateZ(0);
    /* No content-visibility to avoid CLS when scrolling */
}

@media (max-width: 768px) {
    .navbar {
        height: 70px;
        min-height: 70px;
    }
    
    .logo {
        height: 60px;
    }
    
    .hero-image {
        order: -1;
        margin-bottom: 2rem;
        min-height: 300px;
        width: 100%;
    }

    .hero-img {
        max-width: 100%;
        height: 300px;
        min-height: 300px;
        aspect-ratio: 1 / 1;
    }
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--bg-light);
    min-height: 600px;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    min-height: 1.2em;
    line-height: 1.2;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    min-height: 1.5em;
    line-height: 1.5;
}

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    width: 100%;
    contain: layout style;
}

.feature-card:hover {
    transform: translateY(-10px) perspective(1000px) rotateX(3deg) scale(1.02);
    box-shadow: 0 12px 40px rgba(34, 45, 89, 0.3);
    background: #f8f9fa;
    border-left-width: 6px;
    border-left-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    will-change: auto;
    backface-visibility: hidden;
    display: block;
    flex-shrink: 0;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    min-height: 1.2em;
    line-height: 1.2;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Client Challenges Section */
.challenges {
    padding: 80px 0;
    background: white;
    min-height: 600px;
}

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

.challenge-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid var(--accent-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    width: 100%;
    contain: layout style;
}

.challenge-card:hover {
    transform: translateY(-10px) perspective(1000px) rotateX(3deg) scale(1.02);
    box-shadow: 0 12px 40px rgba(200, 212, 0, 0.3);
    background: white;
    border-left-width: 6px;
    border-left-color: var(--accent-color);
}

.challenge-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.challenge-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    will-change: auto;
    backface-visibility: hidden;
    display: block;
    flex-shrink: 0;
}

.challenge-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    min-height: 1.2em;
    line-height: 1.2;
}

.challenge-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* About Section */
.about {
    padding: 80px 0;
    background: white;
    min-height: 500px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    text-align: left;
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-logo {
    width: 100%;
    max-width: 300px;
    height: 300px;
    image-rendering: -webkit-optimize-contrast;
    will-change: auto;
    object-fit: contain;
    display: block;
    aspect-ratio: 1 / 1;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: var(--bg-light);
    min-height: 800px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    margin-top: 3rem;
    align-items: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.contact-icon {
    font-size: 2rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    will-change: auto;
    backface-visibility: hidden;
    display: block;
    flex-shrink: 0;
}

.contact-item h3 {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.contact-item p {
    color: var(--text-light);
    line-height: 1.8;
}

.calendly-wrapper {
    width: 100%;
    min-height: 700px;
    height: 700px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: white;
    position: relative;
    /* Reserve space to prevent CLS when Calendly iframe loads */
    contain: layout style;
}

.calendly-inline-widget {
    width: 100%;
    height: 700px;
    min-width: 320px;
    min-height: 700px;
    border-radius: 10px;
    display: block;
    /* Prevent layout shift when widget injects content */
    overflow: hidden;
}

/* Make Calendly widget responsive */
@media (max-width: 768px) {
    .calendly-wrapper {
        min-height: 800px;
    }
    
    .calendly-inline-widget {
        height: 800px;
        min-height: 800px;
    }
}

@media (max-width: 480px) {
    .calendly-wrapper {
        min-height: 900px;
    }
    
    .calendly-inline-widget {
        height: 900px;
        min-height: 900px;
    }
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-logo {
    height: 90px;
    width: auto;
    margin-bottom: 1rem;
    image-rendering: -webkit-optimize-contrast;
    will-change: auto;
    opacity: 1;
    display: block;
}

.footer-section:first-child {
    text-align: left;
}

.footer-section:first-child p {
    text-align: left;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-section a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

.footer-bottom a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: #b8c300;
    text-decoration: underline;
}


/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero .container {
        gap: 3rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .contact-content {
        gap: 3rem;
    }

    .about-content {
        gap: 3rem;
    }

    .calendly-wrapper {
        min-height: 700px;
    }

    .calendly-inline-widget {
        height: 700px;
    }
}

@media (max-width: 900px) {
    .contact-content {
        grid-template-columns: 1fr;
    }

    .calendly-wrapper {
        margin-top: 2rem;
    }
}


@media (max-width: 768px) {
    .navbar {
        height: 70px;
        min-height: 70px;
    }
    
    .logo {
        height: 60px;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow);
        padding: 2rem 0;
        min-height: 300px;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero {
        padding: 60px 0;
        min-height: 600px;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        min-height: 500px;
    }
    
    .hero-content {
        min-height: 300px;
    }
    
    .hero-image {
        min-height: 300px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
        min-height: 1.2em;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        min-height: 1.5em;
    }
    
    .feature-card,
    .challenge-card {
        min-height: 250px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info {
        gap: 1.5rem;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 1rem;
    }
    
    .contact-icon {
        order: -1;
        margin-bottom: 0.5rem;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .challenges-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .feature-icon,
    .challenge-icon {
        font-size: 2.5rem;
    }


    .features {
        padding: 60px 0;
        min-height: 500px;
    }
    
    .challenges {
        padding: 60px 0;
        min-height: 500px;
    }
    
    .about {
        padding: 60px 0;
        min-height: 400px;
    }
    
    .contact {
        padding: 60px 0;
        min-height: 700px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .navbar {
        height: 70px;
        min-height: 70px;
    }
    
    .logo {
        height: 55px;
    }
    
    .hero {
        padding: 40px 0;
        margin-top: 70px;
        min-height: 500px;
    }
    
    .hero .container {
        min-height: 450px;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
        min-height: 2.6em;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        min-height: 1.5em;
    }
    
    .hero-image {
        min-height: 250px;
    }
    
    .hero-img {
        min-height: 250px;
    }

    .section-title {
        font-size: 1.75rem;
        min-height: 1.2em;
    }

    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        min-height: 1.5em;
    }
    
    .feature-card,
    .challenge-card {
        min-height: 220px;
    }


    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .features,
    .challenges,
    .about,
    .contact {
        padding: 40px 0;
    }

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

    .feature-card h3,
    .challenge-card h3 {
        font-size: 1.25rem;
    }

    .feature-card p,
    .challenge-card p {
        font-size: 0.9rem;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 1rem;
    }
    
    .contact-icon {
        order: -1;
        margin-bottom: 0.5rem;
    }

    .contact-item h3 {
        font-size: 1.1rem;
    }

    .contact-item p {
        font-size: 0.9rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .footer {
        padding: 40px 0 15px;
    }

    .footer-content {
        gap: 1.5rem;
    }
}


