/* ==========================================================================
   CSS VARIABLES & RESET (CLEAN MODERN THEME)
   ========================================================================== */
:root {
    /* Refined 4-Color Palette */
    --bg: #FFFFFF;
    --primary: #3B82F6;
    --text-main: #0F172A; /* Deep Slate for high contrast but softer than pure black */
    --text-muted: #64748B;
    
    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Space Grotesk', sans-serif;

    /* Modern Utilities */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;
    
    --shadow-soft: 0 4px 24px rgba(59, 130, 246, 0.08);
    --shadow-hover: 0 12px 32px rgba(59, 130, 246, 0.12);
    
    --border-light: 1px solid rgba(15, 23, 42, 0.06);
    
    /* Spacing */
    --section-padding: 120px;
    --container-max: 100%;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { border: none; background: none; font-family: inherit; cursor: pointer; }
.desktop-only { display: block; }
.mobile-only { display: none; }


/* Text Split Utilities */
.split-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    white-space: nowrap;
}
.split-char { display: inline-block; transform: translateY(110%); }

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(3rem, 6vw, 5.5rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }

p { font-size: 1.125rem; font-weight: 400; margin-bottom: 1rem; color: var(--text-muted); }

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

.section-label {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 5%; }
section { position: relative; padding: var(--section-padding) 0; }

/* Modern Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-weight: 600;
    border-radius: var(--radius-pill);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--bg);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background-color: var(--bg);
    color: var(--text-main);
    border: 1px solid rgba(15, 23, 42, 0.1);
}

.btn-secondary:hover {
    background-color: rgba(15, 23, 42, 0.02);
    border-color: rgba(15, 23, 42, 0.2);
}

.btn-large { padding: 18px 40px; font-size: 1.125rem; }

/* ==========================================================================
   INDEPENDENT NAV & EXPANDING ISLAND
   ========================================================================== */
.nav-logo-independent {
    position: fixed;
    top: 40px;
    left: 40px;
    z-index: 1001;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-main);
    font-family: var(--font-mono);
    text-transform: uppercase;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu-btn {
    position: fixed;
    top: 32px;
    right: 40px;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 48px;
    height: 48px;
    background: var(--bg);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 50%;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu-btn .line {
    width: 20px;
    height: 2px;
    background-color: var(--text-main);
    margin: 0 auto;
    border-radius: 2px;
}

/* Scroll Hide State */
.nav-hidden .nav-logo-independent { transform: translateY(-100px); }
.nav-hidden .nav-menu-btn { transform: translateY(-100px); }

/* Expanding Square Island Menu */
.island-menu {
    position: fixed;
    top: 32px;
    right: 40px;
    width: 48px;
    height: 48px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transform-origin: top right;
}

.island-links {
    display: flex;
    flex-direction: column;
    padding: 32px;
    gap: 16px;
    opacity: 0;
}

.island-links a {
    font-size: 1.5rem;
    font-weight: 800;
    color: #FFFFFF;
    text-transform: uppercase;
    font-family: var(--font-mono);
    transform: translateX(20px);
    transition: color 0.3s;
}

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

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 0;
    overflow: hidden;
}

/* Subtle background accent */
.hero-section::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    text-align: center;
    margin: 0 auto;
}

.hero-headline { margin-bottom: 24px; color: var(--text-main); }
.hero-subheadline {
    max-width: 650px;
    margin: 0 auto 48px auto;
    font-size: 1.25rem;
}
.hero-ctas { display: flex; gap: 16px; justify-content: center; }

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-section {
    position: relative;
    z-index: 10;
    background-color: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 -20px 40px rgba(0,0,0,0.1); /* Subtle shadow to separate from hero */
}

.about-section h2, .about-section p {
    color: #FFFFFF;
}

.about-section .section-label {
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.3);
}

.about-grid { display: grid; grid-template-columns: 40% 60%; gap: 64px; align-items: center; }

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1); /* Translucent over blue */
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item { font-family: var(--font-mono); font-weight: 700; font-size: 2.5rem; color: #FCD34D; line-height: 1; }
.stat-label { display: block; font-family: var(--font-body); font-size: 0.875rem; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-top: 8px; }

.about-text { margin-bottom: 32px; }
.about-text p { color: rgba(255, 255, 255, 0.9); }

.about-accordion { display: flex; flex-direction: column; gap: 12px; }
.acc-item { border-radius: var(--radius-md); padding: 16px 24px; background: rgba(255, 255, 255, 0.1); border: 1px solid transparent; transition: all 0.3s; }
.acc-item.active { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.3); box-shadow: var(--shadow-soft); }
.acc-content { font-size: 1rem; font-weight: 500; color: #FFFFFF; }

/* ==========================================================================
   SERVICES (ISLAND GRID & STICKY HEADER)
   ========================================================================== */
.services-section { 
    background: var(--bg); 
    position: relative;
    z-index: 10;
}

.services-layout {
    display: grid;
    grid-template-columns: 35% 65%;
    gap: 64px;
    align-items: start;
}

.services-header {
    position: sticky;
    top: 120px;
}

.services-header h2 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 1.05;
    color: var(--text-main);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.service-island {
    background: #F8FAFC;
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    color: var(--text-main);
    border: 1px solid rgba(15, 23, 42, 0.04);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s, border-color 0.4s;
    cursor: default;
}

.service-island:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
}

.service-island .service-title {
    color: var(--text-main);
    font-size: 1.75rem;
    margin-bottom: 24px;
    font-family: var(--font-heading);
    transition: color 0.4s;
}

.service-island:hover .service-title {
    color: var(--primary);
}

.service-island p {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.service-island .tags { 
    display: flex; 
    gap: 8px; 
    flex-wrap: wrap; 
}

.service-island .tags span {
    padding: 6px 16px;
    background: rgba(59, 130, 246, 0.05);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-mono);
}

/* ==========================================================================
   PORTFOLIO (SCROLL STACK)
   ========================================================================== */
.portfolio-section {
    background: var(--bg);
    position: relative;
    z-index: 10;
    padding-bottom: 80px;
}

.scroll-stack-container { width: 100%; position: relative; margin-top: 40px; }

.project-card {
    position: sticky;
    top: 15vh;
    display: flex;
    margin-bottom: 40px;
    height: 65vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    will-change: transform;
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.card-blue {
    background-color: var(--primary);
    color: #FFFFFF;
}
.card-blue .project-title { color: #FFFFFF; }
.card-blue .project-desc { color: rgba(255,255,255,0.9); }
.card-blue .project-tag { color: #FCD34D; }
.card-blue .btn-secondary { background: rgba(255,255,255,0.1); color: #FFF; border: 1px solid rgba(255,255,255,0.2); }
.card-blue .btn-secondary:hover { background: #FFF; color: var(--primary); }

.card-white {
    background-color: #F8FAFC;
    color: var(--text-main);
}
.card-white .project-title { color: var(--text-main); }
.card-white .project-desc { color: var(--text-muted); }
.card-white .project-tag { color: var(--primary); }

.project-info {
    flex: 1;
    padding: 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-tag {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.project-title { font-size: 2.5rem; margin-bottom: 24px; font-family: var(--font-heading); }
.project-desc { font-size: 1.125rem; margin-bottom: 40px; }

.project-visual {
    flex: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 1.5rem;
}
.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    display: block;
}
/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */
.testimonials-section { background: #F8FAFC; position: relative; z-index: 10; padding: 120px 0; overflow: hidden; }
.testimonials-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 64px; }
.carousel-nav { display: flex; gap: 16px; }
.nav-btn {
    width: 64px; height: 64px; border-radius: 50%; border: 1px solid rgba(15,23,42,0.1);
    background: #FFF; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1.5rem; transition: all 0.3s;
}
.nav-btn:hover { background: var(--primary); color: #FFF; border-color: var(--primary); }

.testimonials-carousel-wrapper { width: 100%; overflow: hidden; padding-left: max(20px, calc((100vw - 1200px) / 2)); padding-bottom: 24px; }
.testimonials-track { display: flex; gap: 32px; width: max-content; padding-right: 5vw; }

.testim-card {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    padding: 64px 48px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.02);
    border: 1px solid rgba(15,23,42,0.05);
    position: relative;
    width: 500px;
    flex-shrink: 0;
}

.quote-icon {
    font-family: var(--font-heading);
    font-size: 5rem;
    color: var(--primary);
    opacity: 0.1;
    position: absolute;
    top: 24px;
    left: 40px;
    line-height: 1;
}

.quote-text { font-size: 1.125rem; font-weight: 400; line-height: 1.7; margin-bottom: 32px; color: var(--text-main); position: relative; z-index: 2; }
.author-info { display: flex; align-items: center; gap: 16px; position: relative; z-index: 2; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: rgba(59, 130, 246, 0.1); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-mono); }
.author-name { font-size: 1rem; font-weight: 600; color: var(--text-main); }
.author-company { font-size: 0.875rem; color: var(--text-muted); }

/* ==========================================================================
   PROCESS (TYPOGRAPHY GRID)
   ========================================================================== */
.process-section { background: var(--bg); position: relative; z-index: 10; padding: 120px 0; }
.process-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px 40px;
}

.process-step {
    display: flex;
    flex-direction: column;
    position: relative;
}

.step-number {
    font-family: var(--font-heading);
    font-size: clamp(5rem, 10vw, 10rem);
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(59, 130, 246, 0.15); /* Faint blue outline */
    line-height: 0.8;
    margin-bottom: -32px;
    margin-left: -8px;
    transition: all 0.4s;
    user-select: none;
}

.process-step:hover .step-number {
    -webkit-text-stroke: 1.5px var(--primary);
    transform: translateY(-8px);
}

.step-content {
    position: relative;
    z-index: 2;
    padding-left: 16px;
    border-left: 2px solid rgba(15, 23, 42, 0.1);
}

.process-step:hover .step-content {
    border-left-color: var(--primary);
    border-top-color: var(--primary);
}

.step-content h3 { font-size: 1.75rem; margin-bottom: 16px; color: var(--text-main); }
.step-content p { font-size: 1.125rem; color: var(--text-muted); max-width: 500px; line-height: 1.7; }

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */
.faq-section { background: #F8FAFC; position: relative; z-index: 10; padding: 120px 0; }
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-accordion { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--bg); border-radius: var(--radius-md); box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.faq-question { display: flex; justify-content: space-between; align-items: center; padding: 24px; cursor: pointer; }
.faq-question h4 { margin: 0; font-size: 1.125rem; font-weight: 600; color: var(--text-main); }
.faq-icon {
    width: 24px; height: 24px; position: relative;
}
.faq-icon::before, .faq-icon::after {
    content: ''; position: absolute; background: var(--primary); transition: transform 0.3s;
}
.faq-icon::before { top: 11px; left: 4px; width: 16px; height: 2px; }
.faq-icon::after { top: 4px; left: 11px; width: 2px; height: 16px; }

.faq-item.active .faq-icon::after { transform: rotate(90deg); opacity: 0; }
.faq-answer { height: 0; overflow: hidden; }
.faq-answer-inner { padding: 0 24px 24px 24px; font-size: 1rem; color: var(--text-muted); }

/* ==========================================================================
   REVIEW MODAL
   ========================================================================== */
.review-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.review-modal.active {
    display: flex;
}
.review-modal-backdrop {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
}
.review-modal-content {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    padding: 64px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
    animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.review-modal-close {
    position: absolute;
    top: 24px; right: 24px;
    font-size: 2.5rem;
    color: var(--text-muted);
    transition: color 0.3s;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
}
.review-modal-close:hover { color: var(--text-main); }
.read-more-btn {
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    background: none;
    border: none;
    display: inline-block;
    margin-left: 8px;
    font-size: 1rem;
    padding: 0;
}
.read-more-btn:hover {
    text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    
    .project-card { 
        position: relative; 
        top: 0; 
        flex-direction: column; 
        height: auto; 
    }
    .project-info { padding: 40px; }
    .project-visual { height: 300px; padding: 0; }
    .placeholder-img { width: 100%; height: 100%; border-radius: 0; }
    
    .services-layout { grid-template-columns: 1fr; gap: 40px; }
    .services-header { position: relative; top: 0; }
    .services-grid { grid-template-columns: 1fr; }
    
    .testimonials-header { flex-direction: column; align-items: flex-start; gap: 24px; }
    .testim-card { width: 85vw; padding: 40px 32px; }
    
    .process-grid { grid-template-columns: 1fr; gap: 64px; }
    .contact-grid { grid-template-columns: 1fr; gap: 64px; }
    .contact-form-wrapper { padding: 32px; }
}

@media (max-width: 768px) {
    .split-word { font-size: 2.5rem; }
    .footer-bottom { flex-direction: column; gap: 24px; text-align: center; }
    .desktop-only { display: none !important; }
    .mobile-only { display: block !important; }
    .hero-section { padding-top: 140px; }
    .scroll-stack-container { padding-bottom: 20vh; }
    .process-timeline { padding-left: 16px; }
    
    .nav-logo-independent { top: 20px; left: 20px; }
    .nav-menu-btn { top: 12px; right: 20px; }
    .island-menu { top: 12px; right: 20px; }
}
