* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #5B5FCF;
    --primary-dark: #4A4EBF;
    --secondary-color: #7C7FE8;
    --accent-color: #9B9EFF;
    --text-dark: #1A1A2E;
    --text-light: #666;
    --bg-light: #F8F9FF;
    --bg-white: #FFFFFF;
    --success-color: #4CAF50;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Accessibility / Skip Link */
.skip-link {
    position: absolute;
    left: 0;
    top: -40px;
    background: var(--primary-color);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 2000;
    border-radius: 0 0 4px 0;
    text-decoration: none;
    transition: top .2s;
}
.skip-link:focus { top: 0; outline: 2px solid #fff; }

/* Visible focus for interactive elements */
a:focus, button:focus, .cta-button:focus, .secondary-button:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Visually hidden utility for accessible labels */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    white-space: nowrap !important;
}

html {
    scroll-behavior: smooth; /* Native smooth scrolling */
}

/* Offset anchor scrolling so content isn't hidden behind fixed header */
section[id] {
    scroll-margin-top: 90px; /* header height + spacing */
}

/* Header */
header {
    background: var(--bg-white);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: .6rem .4rem; /* Ensure minimum target size ~44px line-height across devices */
    line-height: 1.4;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.cta-button {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.cta-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(91, 95, 207, 0.3);
}

/* Hero Section */
.hero {
    padding: 8rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 80vh;
}

.hero-content h1 {
        font-size: 3.5rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
        color: var(--text-dark); /* Solid color for reliable contrast calculation */
}

/* Optional decorative gradient (disabled for high contrast modes) */
@media (prefers-contrast: no-preference) {
    .decorative-gradient-heading {
            background: var(--gradient);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            -webkit-text-fill-color: transparent;
    }
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.secondary-button {
    background: transparent;
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.secondary-button:hover {
    background: var(--primary-color);
    color: white;
}

.trust-badges {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.trust-badge::before {
    content: "✓";
    display: inline-block;
    width: 24px;
    height: 24px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
}

.hero-image { position: relative; }

.browser-mockup {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
    transform: perspective(1000px) rotateY(-10deg);
    transition: transform 0.3s;
}

.browser-mockup:hover { transform: perspective(1000px) rotateY(0deg); }

.browser-header {
    background: #F5F5F5;
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.browser-dot { width: 12px; height: 12px; border-radius: 50%; background: #DDD; }
.browser-dot:first-child { background: #FF5F57; }
.browser-dot:nth-child(2) { background: #FFBD2E; }
.browser-dot:nth-child(3) { background: #28CA42; }

.browser-content { padding: 2rem; background: linear-gradient(to bottom, #F8F9FF, white); min-height: 300px; }
.dashboard-preview { text-align: center; color: var(--text-light); }
.dashboard-preview h2, .dashboard-preview h3, .mockup-title { color: var(--text-dark); margin-bottom: 1rem; font-size: 1.5rem; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.stat-card { background: white; padding: 1rem; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.stat-card { display: flex; flex-direction: column; align-items: center; }
.stat-label { font-size: 0.85rem; color: var(--text-light); order: 2; }
.stat-value { font-size: 1.5rem; font-weight: bold; color: var(--primary-color); order: 1; }

/* Mobile menu toggle */
.mobile-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: .6rem .7rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary-color);
    transition: transform .3s, opacity .3s;
}
.mobile-toggle:focus { outline: 3px solid var(--accent-color); }

/* Expanded state transforms */
.mobile-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(4px,4px); }
.mobile-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mobile-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(4px,-4px); }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .browser-mockup, .service-card:hover, .work-card:hover { transform: none !important; }
}

/* Services Section */
.services { background: var(--bg-light); padding: 4rem 2rem; }
.section-container { max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 3rem; color: var(--text-dark); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-bottom: 3rem; }
.service-card { background: white; padding: 2rem; border-radius: 12px; text-align: center; transition: all 0.3s; box-shadow: 0 5px 15px rgba(0,0,0,0.08); }
.service-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.service-icon { width: 60px; height: 60px; margin: 0 auto 1rem; background: var(--bg-light); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.service-card h3 { margin-bottom: 1rem; color: var(--text-dark); }
.service-card p { color: var(--text-light); font-size: 0.95rem; }

/* Process Section */
.process { padding: 4rem 2rem; background: white; }
.process-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 3rem; position: relative; }
.process-step { text-align: center; position: relative; }
.step-number { width: 60px; height: 60px; background: var(--gradient); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: bold; margin: 0 auto 1.5rem; }
.process-step h3 { margin-bottom: 1rem; color: var(--text-dark); }
.process-step p { color: var(--text-light); line-height: 1.8; }

/* Recent Work Section */
.recent-work { background: var(--bg-light); padding: 4rem 2rem; }
.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; }
.work-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.08); transition: all 0.3s; }
.work-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.work-card-header { padding: 2rem; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: white; }
.work-card-header h3 { margin-bottom: 0.5rem; font-size: 1.5rem; }
.work-card-header p { opacity: 0.9; font-size: 0.95rem; }
.work-card-body { padding: 2rem; }
.work-card-body p { color: var(--text-light); line-height: 1.8; margin-bottom: 1rem; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tech-tag { background: var(--bg-light); color: var(--primary-color); padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.85rem; font-weight: 500; }

/* Pricing Section */
.pricing { padding: 4rem 2rem; background: white; }
.pricing-intro { text-align: center; max-width: 800px; margin: 0 auto 3rem; }
.pricing-intro p { font-size: 1.1rem; color: var(--text-light); line-height: 1.8; }
.pricing-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; max-width: 1000px; margin: 0 auto; }
.pricing-feature { text-align: center; padding: 1.5rem; }
.pricing-feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.pricing-feature h3 { color: var(--text-dark); margin-bottom: 0.5rem; }
.pricing-feature p { color: var(--text-light); font-size: 0.95rem; }
.pricing-intro .pricing-value {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 500;
    margin-top: 1.2rem;
    text-align: center;
    opacity: 0.9;
}
/* Contact Section */
.contact { background: linear-gradient(135deg, #303374, #4A4EBF); padding: 4rem 2rem; text-align: center; color: #FFFFFF; }
/* Restrict white text styling to body copy & contact info links so primary action button can use brand color text */
.contact p, .contact .contact-item, .contact .contact-info a { color: #FFFFFF; }
.contact .contact-info a { text-decoration: underline; text-decoration-color: rgba(255,255,255,0.6); }
.contact .contact-info a:hover { text-decoration-color: #FFFFFF; }
.contact h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.contact p { font-size: 1.2rem; margin-bottom: 2rem; opacity: 0.95; }
.contact-info { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; margin-top: 2rem; }
.contact-item { display: flex; align-items: center; gap: 0.5rem; font-size: 1.1rem; }
.contact-item a { color: white; text-decoration: none; }
.contact-item a:hover { text-decoration: underline; }
.contact-button { 
    background: #FFFFFF; 
    color: var(--primary-color) !important; /* Ensure text color not overridden by more specific section rules */
    padding: 1rem 2rem; 
    border-radius: 8px; 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 1.1rem; 
    display: inline-block; 
    transition: all 0.3s; 
    margin-top: 1rem; 
    border: 2px solid var(--primary-color); /* Non-text contrast for interactive component outline */
}
.contact-button:hover { 
    background: var(--primary-color); 
    color: #FFFFFF !important; 
    transform: translateY(-2px); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.25); 
}
.contact-button:focus { outline: 3px solid #FFFFFF; outline-offset: 2px; }

/* Footer */
footer { background: var(--text-dark); color: white; padding: 2rem; text-align: center; }
footer p { opacity: 0.8; font-size: 0.95rem; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-toggle { display: flex; }
    .nav-links { 
        position: absolute; 
        top: 70px; 
        right: 1rem; 
        background: var(--bg-white); 
        flex-direction: column; 
        padding: 1rem 1.25rem; 
        border-radius: 12px; 
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        min-width: 200px;
        display: none;
    }
    .nav-links.active { display: flex; }
    .nav-links a { padding: .75rem 0; }
    .hero { grid-template-columns: 1fr; padding: 6rem 1rem 2rem; min-height: auto; }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-image { display: none; }
    .services-grid, .process-steps, .work-grid { grid-template-columns: 1fr; }
    .contact-info { flex-direction: column; gap: 1rem; }
}
