/* ==========================================================================
   CSS Variables & Global Resets
   ========================================================================== */
   :root {
    /* Color Palette */
    --bg-color: #F8FAFC; /* Clean off-white background */
    --text-color: #0F172A; /* Dark slate for high contrast */
    --text-muted: #64748B; /* Soft slate for secondary text */
    --primary-blue: #1A56DB; /* Strong corporate blue */
    --primary-blue-dark: #1E3A8A;
    --border-color: rgba(0, 0, 0, 0.1); /* Subtle dark border */
    --surface-color: #FFFFFF; /* Pure white for cards/sections */
    --surface-color-light: #F1F5F9; /* Very light gray */

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-padding: 5vw;
    --section-spacing: 15vh;
}

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

html {
    scroll-behavior: initial; /* Handled by Lenis */
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

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

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 2rem;
}

.lead-text {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary, .btn-secondary, .btn-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    border-radius: 2rem; /* Smooth curves */
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: #fff;
    border: 1px solid var(--primary-blue);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-blue);
}

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

.btn-secondary:hover {
    border-color: var(--text-color);
}

.btn-text {
    padding: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--primary-blue);
    padding-bottom: 0.25rem;
    color: var(--text-color);
}

.btn-text:hover {
    color: var(--primary-blue);
}

.arrow {
    transition: transform 0.3s ease;
}

.btn-primary:hover .arrow, .btn-secondary:hover .arrow, .btn-text:hover .arrow {
    transform: translateX(5px);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 100;
    padding: 0.75rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    transition: transform 0.4s ease;
}

.navbar.hidden {
    transform: translate(-50%, -150%);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 101;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-color);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
    opacity: 0.8;
    transition: opacity 0.3s ease, color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    opacity: 1;
    color: #1A56DB;;
}

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

/* Hamburger & Mobile Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 102;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(248, 250, 252, 0.98);
    backdrop-filter: blur(15px);
    z-index: 99; /* Below navbar (z-index 100) */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu a {
    font-size: 2rem;
    font-family: var(--font-heading);
    color: var(--text-color);
    font-weight: 500;
}

@media (max-width: 992px) {
    .nav-links, .nav-cta {
        display: none !important;
    }
    .hamburger {
        display: flex;
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 8rem;
    padding-bottom: 4rem;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, rgba(26, 86, 219, 0.05) 0%, rgba(248, 250, 252, 1) 70%);
}

.grid-line {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.04);
}

.grid-line.horizontal {
    width: 100%;
    height: 1px;
    top: 50%;
}

.grid-line.vertical {
    width: 1px;
    height: 100%;
    left: 50%;
}

.glow-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(41, 98, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
}

.hero-content {
    max-width: 1000px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 7rem);
    margin-bottom: 2rem;
}

.hero-title .line {
    overflow: hidden;
    padding-bottom: 0.1em;
}

.hero-title .word {
    display: inline-block;
    transform: translateY(100%);
}

.hero-subtitle {
    font-size: clamp(1.125rem, 1.5vw, 1.5rem);
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 3rem;
    opacity: 0;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    opacity: 0;
}

/* ==========================================================================
   Problem Section
   ========================================================================== */
.problem {
    position: relative;
    padding: var(--section-spacing) 0;
    overflow: hidden;
}

.bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 25vw;
    font-family: var(--font-heading);
    font-weight: 700;
    color: rgba(0, 0, 0, 0.03);
    white-space: nowrap;
    z-index: -1;
    pointer-events: none;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.split-right p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 1.125rem;
}

.split-right .highlight-text {
    font-size: 2rem;
    font-weight: 500;
    color: var(--primary-blue);
    margin-top: 3rem;
    font-family: var(--font-heading);
}

@media (max-width: 768px) {
    .split-layout {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Services Section (Scroll Stacking)
   ========================================================================== */
.services {
    padding: var(--section-spacing) 0;
    background-color: var(--surface-color);
}

.service-cards-container {
    margin-top: 5rem;
    position: relative;
}

.service-card {
    height: 60vh;
    min-height: 400px;
    position: sticky;
    top: 20vh;
    padding-top: 2rem;
}

.card-inner {
    background-color: var(--surface-color-light);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    height: 100%;
    padding: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: 0 -20px 40px rgba(0,0,0,0.5);
    transform-origin: top center;
}

.card-content {
    max-width: 600px;
}

.card-content h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.card-content p {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.card-number {
    font-size: 6rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: rgba(0, 0, 0, 0.05);
    line-height: 1;
}

@media (max-width: 768px) {
    .card-inner {
        padding: 2rem;
        flex-direction: column-reverse;
        justify-content: flex-end;
        gap: 2rem;
    }
    .card-number {
        font-size: 4rem;
    }
    .service-card {
        height: auto;
        position: relative;
        top: 0;
        margin-bottom: 2rem;
    }
    .card-inner {
        box-shadow: none;
    }
}

/* ==========================================================================
   How It Works Section
   ========================================================================== */
.how-it-works {
    padding: var(--section-spacing) 0;
}

.timeline {
    margin-top: 5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
}

.timeline-step {
    position: relative;
    padding-top: 3rem;
}

.step-line {
    position: absolute;
    top: -1px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary-blue);
    transition: width 0.5s ease;
}

.timeline-step:hover .step-line,
.timeline-step.active .step-line {
    width: 100%;
}

.step-header {
    margin-bottom: 1.5rem;
}

.step-num {
    font-size: 0.875rem;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.5rem;
}

.step-header h3 {
    font-size: 1.5rem;
}

.step-content p {
    color: var(--text-muted);
}

@media (max-width: 992px) {
    .timeline {
        grid-template-columns: 1fr;
    }
    .timeline::before {
        width: 1px;
        height: 100%;
        left: 0;
    }
    .timeline-step {
        padding-top: 0;
        padding-left: 3rem;
    }
    .step-line {
        top: 0;
        left: -1px;
        width: 2px;
        height: 0%;
        transition: height 0.5s ease;
    }
    .timeline-step:hover .step-line,
    .timeline-step.active .step-line {
        height: 100%;
        width: 2px;
    }
}

/* ==========================================================================
   Portfolio Section
   ========================================================================== */
.portfolio {
    padding: var(--section-spacing) 0;
    background-color: var(--surface-color);
}

.projects-grid {
    margin-top: 5rem;
    display: flex;
    flex-direction: column;
    gap: 8rem;
}

.project-item {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.project-item:nth-child(even) {
    grid-template-columns: 1fr 1.5fr;
}

.project-item:nth-child(even) .project-image {
    order: 2;
}

.project-image {
    overflow: hidden;
    border-radius: 1rem;
    aspect-ratio: 16 / 10;
}

.img-placeholder {
    width: 100%;
    height: 100%;
    transform: scale(1.1);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-item:hover .img-placeholder {
    transform: scale(1);
}

.project-info h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.project-info p {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

@media (max-width: 992px) {
    .project-item, .project-item:nth-child(even) {
        grid-template-columns: 1fr;
    }
    .project-item:nth-child(even) .project-image {
        order: -1;
    }
    .projects-grid {
        gap: 5rem;
    }
}

/* ==========================================================================
   Testimonials Section
   ========================================================================== */
.testimonials {
    padding: var(--section-spacing) 0;
    overflow: hidden;
}

.testimonials-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
}

.testimonials-header .section-title {
    margin-bottom: 0;
}

.slider-controls {
    display: flex;
    gap: 1rem;
}

.slider-btn {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--surface-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background-color: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
}

.slider-container {
    width: 100%;
}

.slider-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.testimonial-card {
    flex: 0 0 calc(50% - 1rem);
    width: calc(50% - 1rem);
    padding: 3rem;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    position: relative;
    background-color: var(--surface-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.quote-mark {
    position: absolute;
    top: 1rem;
    left: 2rem;
    font-size: 6rem;
    font-family: var(--font-heading);
    color: var(--primary-blue);
    opacity: 0.1;
    line-height: 1;
}

.quote-text {
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.quote-author {
    font-weight: 500;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .testimonials-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }
    .testimonial-card {
        flex: 0 0 100%;
        width: 100%;
    }
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
    padding: var(--section-spacing) 0;
    background-color: var(--surface-color);
}

.about .split-right p {
    font-size: 1.25rem;
    color: var(--text-color);
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq {
    padding: var(--section-spacing) 0;
}

.accordion {
    margin-top: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.accordion-item {
    border-bottom: 1px solid var(--border-color);
}

.accordion-header {
    width: 100%;
    text-align: left;
    padding: 2rem 0;
    background: none;
    border: none;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.accordion-header .icon {
    width: 24px;
    height: 24px;
    position: relative;
}

.accordion-header .icon::before,
.accordion-header .icon::after {
    content: '';
    position: absolute;
    background-color: var(--text-color);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
}

.accordion-header .icon::before {
    width: 16px;
    height: 2px;
}

.accordion-header .icon::after {
    width: 2px;
    height: 16px;
}

.accordion-item.active .icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.accordion-content p {
    padding-bottom: 2rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact {
    padding: var(--section-spacing) 0;
    background-color: var(--surface-color);
}

.contact-desc {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-blue);
}

.contact-form .btn-primary {
    align-self: flex-start;
    margin-top: 1rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

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

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
