/* ==========================================================================
   CSS Variables & Theme Tokens
   ========================================================================== */
   :root {
    /* Colors */
    --color-bg-primary: #FFFFFF;
    --color-bg-secondary: #F7FAFF;
    --color-text-primary: #0A0A0A;
    --color-text-secondary: #5A5A5A;
    
    /* Accents (Premium Blue) */
    --color-accent-100: #E6F0FF;
    --color-accent-300: #A8E8FF;
    --color-accent-400: #7FD4FF;
    --color-accent-500: #4DA8FF;
    --color-accent-600: #2D7EFF;
    --color-accent-700: #0066FF;

    /* Typography */
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Spacing */
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    --space-2xl: 12rem;

    /* Effects */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(0, 102, 255, 0.05);
    --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: initial; /* Lenis handles this */
}

html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-smooth iframe {
    pointer-events: none;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    cursor: none; /* Custom cursor */
}

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 2rem;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.section-title {
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 300;
    margin-bottom: 1rem;
}

.section-desc {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: var(--color-text-secondary);
    font-weight: 300;
    max-width: 600px;
}

.section-header {
    margin-bottom: var(--space-xl);
}
.section-header.center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==========================================================================
   Custom Cursor
   ========================================================================== */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background-color: var(--color-accent-700);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, mix-blend-mode 0.3s ease;
    mix-blend-mode: exclusion;
    will-change: transform;
}

.custom-cursor.hover {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 1);
    mix-blend-mode: exclusion;
}

/* ==========================================================================
   Loading Screen (Updated for color and slide-up)
   ========================================================================== */
.loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--color-accent-700), #003b99);
    color: white;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    will-change: transform;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
    max-width: 300px;
}

.loader-logo {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.1em;
}

.loader-line-wrapper {
    width: 100%;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.loader-line {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: #ffffff;
}

.loader-percentage {
    font-size: 0.875rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   WebGL Canvas
   ========================================================================== */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2; /* Behind the mesh gradient */
    pointer-events: none;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 100px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 400;
    cursor: none;
    transition: var(--transition-smooth);
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--color-accent-700);
    color: white;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, var(--color-accent-700), var(--color-accent-500));
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    box-shadow: 0 10px 30px rgba(0, 102, 255, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--color-text-primary);
    border: 1px solid rgba(0,0,0,0.1);
}

.btn-secondary:hover {
    border-color: rgba(0,0,0,0.3);
    background-color: rgba(255,255,255,0.9);
}

.btn-large {
    padding: 1.5rem 3rem;
    font-size: 1.25rem;
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 100;
    transition: transform 0.4s ease;
}

.navbar.hidden {
    transform: translateY(-100%);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-bottom: 1px solid var(--glass-border);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.navbar.scrolled::before {
    opacity: 1;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

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

.nav-links a:not(.nav-btn) {
    font-size: 0.875rem;
    font-weight: 400;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:not(.nav-btn)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--color-text-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:not(.nav-btn):hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-btn {
    font-size: 0.875rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-text-primary);
    color: var(--color-bg-primary);
    border-radius: 100px;
    transition: var(--transition-fast);
}

.nav-btn:hover {
    background-color: var(--color-accent-700);
    color: white;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: none;
}

.menu-line {
    width: 24px;
    height: 1px;
    background-color: var(--color-text-primary);
    transition: 0.3s ease;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .menu-toggle {
        display: flex;
    }
}

/* ==========================================================================
   Hero Section (Updated with Mesh & Content)
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 5rem;
    overflow: hidden;
}

.hero-bg-gradient {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 50% 50%, rgba(77, 168, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(168, 232, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(45, 126, 255, 0.05) 0%, transparent 40%);
    z-index: -1;
    animation: heroMeshRotate 30s linear infinite;
    pointer-events: none;
}

@keyframes heroMeshRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--color-text-primary);
    z-index: 5;
}

.floating-card i {
    color: var(--color-accent-700);
    width: 20px;
    height: 20px;
}

.fc-1 { top: 25%; left: 10%; animation: float 6s ease-in-out infinite; }
.fc-2 { top: 60%; right: 10%; animation: float 7s ease-in-out infinite 1s; }
.fc-3 { bottom: 20%; left: 15%; animation: float 8s ease-in-out infinite 2s; }

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.hero-content {
    max-width: 1100px;
    padding: 0 2rem;
    z-index: 10;
}

.hero-subtitle-wrapper {
    overflow: hidden;
    margin-bottom: 2rem;
}

.hero-subtitle {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent-700);
}

.hero-title {
    font-size: clamp(3.5rem, 7vw, 8rem);
    font-weight: 200;
    line-height: 1.05;
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
}

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

.hero-title .word {
    display: inline-block;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-accent-700), var(--color-accent-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 400;
}

.hero-description {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: var(--color-text-secondary);
    font-weight: 300;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 26px;
    height: 40px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 4px;
    background-color: var(--color-text-primary);
    border-radius: 50%;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}

/* ==========================================================================
   About Section (NEW)
   ========================================================================== */
.about {
    padding: var(--space-2xl) 0;
    background-color: var(--color-bg-primary);
}

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

.about-desc {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    font-weight: 300;
    margin-bottom: 3rem;
    line-height: 1.8;
}

.about-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.125rem;
    font-weight: 400;
}

.about-list i {
    color: var(--color-accent-700);
}

.about-visual {
    position: relative;
    height: 600px;
    background: var(--color-bg-secondary);
    border-radius: 32px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abstract-shape {
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, var(--color-accent-700), var(--color-accent-300));
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: morph 8s ease-in-out infinite alternate;
}

@keyframes morph {
    0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: scale(1); }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: scale(1.1); }
}

.glass-content {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.5);
}

.glass-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.glass-content p {
    color: var(--color-text-secondary);
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services {
    padding: var(--space-2xl) 0;
    background-color: var(--color-bg-secondary);
    border-radius: 40px;
    margin: 0 1rem;
}

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

.service-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 3rem 2rem;
    border-radius: 24px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.service-icon {
    width: 60px;
    height: 60px;
    background-color: var(--color-bg-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    color: var(--color-accent-700);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--color-text-secondary);
    font-weight: 300;
    line-height: 1.6;
}

.service-hover-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 102, 255, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.service-card:hover .service-hover-glow {
    opacity: 1;
}

/* ==========================================================================
   Selected Work (NEW)
   ========================================================================== */
.work {
    padding: var(--space-2xl) 0;
    background: var(--color-bg-primary);
}

.work-showcase {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-top: 4rem;
}

.work-card {
    position: relative;
    height: 70vh;
    border-radius: 32px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 4rem;
    color: white;
    transform-origin: center top;
}

.work-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transition: transform 0.6s ease;
}

.work-card:hover .work-bg {
    transform: scale(1.05);
}

.work-info {
    position: relative;
    z-index: 2;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    padding: 2rem 3rem;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.1);
}

.work-info h3 {
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.work-info p {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.8;
}

/* ==========================================================================
   Process Section
   ========================================================================== */
.process {
    padding: var(--space-2xl) 0;
}

.process-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    top: 0;
    left: 40px;
    width: 1px;
    height: 100%;
    background-color: rgba(0,0,0,0.1);
}

.timeline-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background-color: var(--color-accent-700);
    transform-origin: top;
}

.process-step {
    display: flex;
    gap: 4rem;
    margin-bottom: 6rem;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
}

.process-step:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 80px;
    height: 80px;
    background-color: var(--color-bg-primary);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--color-text-secondary);
    z-index: 2;
    position: relative;
    transition: var(--transition-smooth);
}

.process-step:hover .step-number {
    border-color: var(--color-accent-700);
    color: var(--color-accent-700);
    background-color: var(--color-accent-100);
}

.step-content {
    flex: 1;
    padding-top: 1.5rem;
}

.step-content h3 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.step-content p {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    font-weight: 300;
    max-width: 500px;
}

/* ==========================================================================
   Statistics Section
   ========================================================================== */
.statistics {
    padding: var(--space-xl) 0;
    background-color: var(--color-text-primary);
    color: var(--color-bg-primary);
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 4rem;
}

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

.stat-number {
    font-size: clamp(4rem, 8vw, 7rem);
    font-weight: 200;
    display: inline-block;
    line-height: 1;
}

.stat-suffix {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 200;
    color: var(--color-accent-400);
}

.stat-label {
    font-size: 1.125rem;
    font-weight: 300;
    color: rgba(255,255,255,0.6);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta {
    padding: var(--space-2xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(77, 168, 255, 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.cta-title {
    font-size: clamp(3.5rem, 6vw, 6rem);
    font-weight: 300;
    margin-bottom: 1rem;
}

.cta-desc {
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    font-weight: 300;
    margin-bottom: 3rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--color-bg-secondary);
    padding: 6rem 0 2rem;
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    margin-top: 4rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4rem;
    margin-bottom: 6rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.footer-brand p {
    color: var(--color-text-secondary);
    font-weight: 300;
}

.footer-links {
    display: flex;
    gap: 6rem;
    flex-wrap: wrap;
}

.link-group h4 {
    font-size: 1.125rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.link-group a {
    display: block;
    color: var(--color-text-secondary);
    font-weight: 300;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.link-group a:hover {
    color: var(--color-accent-700);
}

.footer-bottom {
    position: relative;
}

.footer-divider {
    height: 1px;
    background-color: rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.footer-signature {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    font-weight: 300;
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    .about-visual {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .process-step {
        gap: 2rem;
    }
    .timeline-line {
        left: 24px;
    }
    .step-number {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }
    .footer-links {
        gap: 3rem;
    }
    .custom-cursor {
        display: none;
    }
    body {
        cursor: auto;
    }
    .btn, a, .menu-toggle {
        cursor: pointer;
    }
    .floating-card {
        display: none;
    }
    .work-card {
        padding: 2rem;
        height: 50vh;
    }
    .work-info h3 {
        font-size: 2rem;
    }
}
