:root {
    --primary: #2ecc71;
    --secondary: #0b0f13;
    --accent: #1a2228;
    --text-light: #f4f7f6;
    --text-gray: #b3bfc6;
    --text-dark: #14181b;
    --bg-light: #ffffff;
    --bg-gray: #f7f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size for rem scaling */
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7; /* Increased for readability */
    overflow-x: hidden; /* Prevents horizontal scroll */
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* --- Navigation --- */
header {
    background-color: var(--secondary);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-light);
    font-weight: 800;
    font-size: 1.1rem;
    max-width: 100%;
}

.nav-brand img { 
    border-radius: 4px; 
    height: 35px; 
    width: auto; 
    flex-shrink: 0; 
}
nav { display: flex; align-items: center; }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: 6px;
    font-weight: 700;
    transition: 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary { background-color: var(--primary); color: var(--secondary); }
.btn-primary:hover { background-color: #27ae60; transform: translateY(-2px); }

.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--secondary); }

a:focus-visible, .btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(rgba(11, 15, 19, 0.92), rgba(11, 15, 19, 0.92)), url('https://images.unsplash.com/photo-1531297484001-80022131f5a1?q=80&w=2620&auto=format&fit=crop') center/cover no-repeat;
    color: var(--text-light);
    text-align: center;
    padding: 5rem 1.5rem;
}

.hero h1 { 
    font-size: clamp(2.2rem, 5vw, 3.5rem); 
    margin-bottom: 1.5rem; 
    line-height: 1.2; 
    font-weight: 800;
}
.hero h1 .highlight { color: var(--primary); }
.hero p { 
    font-size: clamp(1rem, 2vw, 1.25rem); 
    max-width: 700px; 
    margin: 0 auto 2.5rem auto; 
    color: var(--text-gray); 
}
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* --- Sections --- */
section { padding: 4rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { 
    font-size: clamp(1.8rem, 4vw, 2.5rem); 
    margin-bottom: 0.75rem; 
    font-weight: 800;
}
.section-header p { 
    color: #666; 
    max-width: 600px; 
    margin: 0 auto; 
    font-size: 1.1rem;
}

.bg-dark { background-color: var(--secondary); color: var(--text-light); }
.bg-dark .section-header p { color: var(--text-gray); }
.bg-gray { background-color: var(--bg-gray); }

/* --- Portfolio Cards --- */
.grid-cards {
    display: grid;
    grid-template-columns: 1fr; /* Mobile first */
    gap: 1.5rem;
}

.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.card.highlight { border: 2px solid var(--primary); }

.card-img { 
    width: 100%; 
    height: 220px; 
    object-fit: cover; 
    background-color: #eee; 
}
.card-body { padding: 1.5rem; flex-grow: 1; }
.card-body h3 { margin-bottom: 0.5rem; color: var(--secondary); font-size: 1.25rem; }
.card-body p { font-size: 1rem; color: #555; }

/* --- Journey --- */
.journey-content { max-width: 800px; margin: 0 auto; font-size: 1.1rem; color: var(--text-gray); }
.journey-content strong { color: var(--primary); }

/* --- Stats --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Mobile first */
    gap: 1.5rem;
    text-align: center;
}

.stat-box { 
    padding: 2rem 1rem; 
    border: 1px solid #eee; 
    border-radius: 8px; 
    transition: 0.3s;
}
.stat-box:hover { border-color: var(--primary); transform: translateY(-3px); }
.stat-box h3 { font-size: clamp(1.8rem, 4vw, 2.5rem); color: var(--primary); margin-bottom: 0.5rem; }
.stat-box p { font-weight: 500; font-size: 1rem; color: #555; }

/* --- Contact --- */
.contact-area { text-align: center; max-width: 600px; margin: 0 auto; }
.contact-area h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.contact-area p { font-size: 1.1rem; color: var(--text-gray); }
.contact-area .btn { margin: 2rem 0; }
.contact-details { color: var(--text-gray); font-size: 1rem; }

/* --- Footer --- */
footer {
    background-color: #070a0c;
    color: var(--text-gray);
    padding: 3rem 0;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-weight: 700;
}
.footer-brand img { height: 32px; width: auto; }

.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer-links a:hover { color: var(--primary); }

.copyright { font-size: 0.9rem; border-top: 1px solid var(--accent); padding-top: 1.5rem; width: 100%; }

/* --- Features Section --- */
.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Auto-fit stress test fix */
    gap: 1.5rem;
}
.feature-item {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: 0.3s;
}
.feature-item:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.feature-icon { font-size: 2.5rem; display: block; margin-bottom: 1rem; }
.feature-item h4 { color: var(--secondary); margin-bottom: 0.5rem; font-size: 1.2rem; }
.feature-item p { color: #555; font-size: 1rem; }

/* --- How It Works (Steps) --- */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Auto-fit fix */
    gap: 1.5rem;
}
.step {
    background: var(--accent);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s;
}
.step:hover { transform: translateY(-5px); border-color: var(--primary); }
.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem auto;
}
.step h4 { color: var(--text-light); margin-bottom: 0.5rem; font-size: 1.2rem; }
.step p { color: var(--text-gray); font-size: 1rem; }

/* --- Pricing & Use Cases (Split Layout) --- */
.split-layout {
    display: grid;
    grid-template-columns: 1fr; /* Mobile first */
    gap: 2.5rem;
    align-items: center;
}
.use-cases { display: flex; flex-direction: column; gap: 1.5rem; }
.use-case {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.use-case h4 { color: var(--secondary); margin-bottom: 0.5rem; font-size: 1.2rem; }
.use-case p { color: #555; font-size: 1rem; }

.pricing-card {
    background: var(--secondary);
    color: var(--text-light);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--accent);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.pricing-card h3 { color: var(--text-light); margin-bottom: 1rem; font-size: 1.5rem; }
.price { 
    font-size: clamp(2rem, 5vw, 3rem); 
    font-weight: 800; 
    color: var(--primary); 
    margin-bottom: 1rem; 
    display: flex; 
    align-items: baseline; 
    justify-content: center; 
    gap: 0.5rem; 
    flex-wrap: wrap;
}
.price span { font-size: 1rem; font-weight: 400; color: var(--text-gray); }
.pricing-card p { color: var(--text-gray); margin-bottom: 1.5rem; font-size: 1rem; }

/* --- FAQ Section --- */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: 0.3s;
}
.faq-item:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.05); border-color: #ddd; }
.faq-item h4 { padding: 1.5rem; color: var(--secondary); font-size: 1.2rem; }
.faq-item p { padding: 0 1.5rem 1.5rem 1.5rem; color: #555; font-size: 1rem; }

/* --- Team Section --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Auto-fit fix */
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}
.team-member {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: 0.3s;
}
.team-member:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.team-member img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem auto;
    border: 3px solid var(--primary);
}
.team-member h4 { color: var(--secondary); margin-bottom: 0.25rem; font-size: 1.25rem; }
.team-member .role { color: var(--primary); font-weight: 600; display: block; margin-bottom: 1rem; font-size: 1rem; }
.team-member p { color: #555; font-size: 1rem; }

.social-icons a { transition: 0.3s; display: inline-flex; }
.social-icons a:hover { opacity: 0.7; transform: translateY(-2px); }

/* --- Media Queries (Scaling Up) --- */
@media (min-width: 600px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .footer-content { flex-direction: row; justify-content: space-between; text-align: left; flex-wrap: wrap; }
    .copyright { width: 100%; text-align: center; }
}

@media (min-width: 900px) {
    .container { padding: 0 2rem; }
    .hero { padding: 7rem 2rem; }
    section { padding: 5rem 0; }
    
    /* Desktop Portfolio Grid */
    .grid-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .split-layout { grid-template-columns: 1.5fr 1fr; gap: 3rem; }
}

@media (min-width: 1200px) {
    .grid-cards {
        grid-template-columns: repeat(4, 1fr); /* Puts all 4 cards on the same row */
    }
}

/* --- Mobile Stress Test Override --- */
/* Prevents horizontal scrolling on very small screens caused by inline nowrap on header */
@media (max-width: 480px) {
    .nav-brand {
        white-space: normal !important; /* Overrides inline style to prevent horizontal scroll */
        font-size: 1rem;
    }
    .nav-brand img {
        height: 30px;
    }
    .footer-brand span { font-size: 0.9rem; }
}
