:root {
    /* Color Palette - Coding/IDE Inspired */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    
    --code-cyan: #79c0ff;
    --code-green: #7ee787;
    --code-purple: #d2a8ff;
    --code-orange: #ffa657;
    --code-blue: #58a6ff;
    
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --text-accent: var(--code-cyan);
    
    --accent-glow: rgba(121, 192, 255, 0.3);
    
    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Fira Code', 'JetBrains Mono', monospace;
    --font-heading: 'Outfit', sans-serif;
    
    /* Layout */
    --container-width: 1440px;
    --nav-height: 64px;
    --section-padding: 100px;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Preloader Split Screen */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

.preloader-half {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50vh;
    background: var(--bg-primary);
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.preloader-top {
    top: 0;
}

.preloader-bottom {
    bottom: 0;
}

.preloader-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
    z-index: 10;
}

/* Loaded State */
#preloader.loaded .preloader-top {
    transform: translateY(-100%);
}

#preloader.loaded .preloader-bottom {
    transform: translateY(100%);
}

#preloader.loaded .preloader-content {
    opacity: 0;
}

.preloader-title {
    font-size: 3rem;
    letter-spacing: 4px;
    margin-bottom: 2rem;
    color: var(--meta-blue);
}

.progress-container {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    width: 20%;
    height: 100%;
    background: var(--meta-blue);
    transition: width 0.1s ease;
}

.progress-text {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-secondary);
}

/* Background Watermark */
.bg-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-mono);
    font-size: 15vw;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.01);
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

.section-padding {
    padding: var(--section-padding) 0;
}

.section-light {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.section-soft {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.section-dark {
    background-color: #010409;
    color: var(--text-primary);
}

.section-dark .section-title, 
.section-dark .section-desc,
.section-dark h3,
.section-dark p {
    color: var(--text-primary);
}

.section-dark .glass-panel {
    background: var(--bg-secondary);
    border-color: rgba(255, 255, 255, 0.05);
}

.bg-darker {
    background-color: var(--bg-primary);
}

.gradient-text {
    color: var(--code-cyan);
    display: inline-block;
}

.text-accent {
    color: var(--code-cyan);
}

.mt-4 { margin-top: 1.5rem; }
.hidden { display: none; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 6px; /* Code style */
    font-weight: 500;
    font-family: var(--font-mono);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--code-blue);
    color: #0d1117;
    font-weight: 700;
}

.btn-primary:hover {
    background: var(--code-cyan);
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--accent-glow);
}

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

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-accent);
}

/* Glassmorphism Panel / Code Cards */
.glass-panel {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: transform 0.1s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.glass-panel:hover {
    border-color: var(--code-cyan);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.card-inner {
    transform: translateZ(20px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 100;
    transition: all 0.3s ease;
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar.scrolled {
    background: rgba(13, 17, 23, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

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

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-white);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.mobile-link {
    font-size: 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Hero Section & Sticky Wrapper */
.hero-sticky-wrapper {
    height: 250vh; /* Extended scrolling space */
    position: relative;
    z-index: 10;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    padding-top: var(--nav-height);
    overflow: hidden;
}

.hero-split-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    width: 100%;
}

.hero-canvas-container {
    position: relative;
    width: 100%;
    height: 600px;
    z-index: 1;
    transition: opacity 0.5s ease;
}

.hero-canvas-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Hide Spline Watermark — hide any non-canvas child inside the 3D container (except smoke) */
#hero-3d-canvas > :not(canvas):not(#smoke-screen) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
}

/* Cover sheet over bottom-right corner to hide any canvas-rendered watermark */
.hero-canvas-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 230px;
    height: 55px;
    background: linear-gradient(135deg, transparent 0%, #0d1117 40%);
    z-index: 10;
    pointer-events: none;
}

/* ===== DRIFT SMOKE SCREEN OVERLAY ===== */
.smoke-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    pointer-events: none;
    background: transparent; /* No solid background, just particles */
    transition: opacity 1.2s ease-out;
    overflow: hidden;
}

.smoke-screen.fade-out {
    opacity: 0;
}

.smoke-particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(30, 40, 55, 0.4) 30%, transparent 70%);
    filter: blur(50px);
    opacity: 0;
    animation: driftSmoke 4s infinite;
}

/* Individual particle positions and delays for a "trail" effect */
.smoke-particle.p1 { width: 400px; height: 400px; top: 60%; left: -20%; animation-delay: 0s; }
.smoke-particle.p2 { width: 350px; height: 350px; top: 65%; left: -20%; animation-delay: 0.5s; }
.smoke-particle.p3 { width: 450px; height: 450px; top: 55%; left: -20%; animation-delay: 1s; }
.smoke-particle.p4 { width: 300px; height: 300px; top: 70%; left: -20%; animation-delay: 1.5s; }
.smoke-particle.p5 { width: 400px; height: 400px; top: 50%; left: -20%; animation-delay: 2s; }
.smoke-particle.p6 { width: 380px; height: 380px; top: 60%; left: -20%; animation-delay: 2.5s; }
.smoke-particle.p7 { width: 320px; height: 320px; top: 65%; left: -20%; animation-delay: 1.2s; }
.smoke-particle.p8 { width: 420px; height: 420px; top: 55%; left: -20%; animation-delay: 2.8s; }
.smoke-particle.p9 { width: 360px; height: 360px; top: 70%; left: -20%; animation-delay: 0.3s; }
.smoke-particle.p10 { width: 340px; height: 340px; top: 62%; left: -20%; animation-delay: 1.8s; }

@keyframes driftSmoke {
    0% {
        transform: translate(0, 0) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    50% {
        transform: translate(120%, -30px) scale(1.5);
        opacity: 0.3;
    }
    100% {
        transform: translate(250%, -60px) scale(2);
        opacity: 0;
    }
}

.relative-z {
    position: relative;
    z-index: 10;
    pointer-events: none; /* Let clicks pass through to 3D canvas if needed */
}

.hero-content {
    max-width: 800px;
    pointer-events: all; /* Restore pointer events for content */
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
    background: rgba(121, 192, 255, 0.1);
    color: var(--code-cyan);
    font-size: 13px;
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(121, 192, 255, 0.2);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    z-index: 10;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--text-secondary);
    border-radius: 15px;
    position: relative;
}

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

@keyframes scroll {
    0% { top: 6px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-inline: auto;
}

.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Swiper 3D Coverflow */
.swiper {
    width: 100%;
    padding: 3rem 0;
}

.swiper-slide {
    width: 320px;
    height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem;
    border-radius: 24px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.swiper-slide-active {
    box-shadow: 0 10px 50px rgba(0, 100, 224, 0.2);
    border-color: var(--meta-blue);
}

.swiper-pagination-bullet {
    background: #000;
    opacity: 0.2;
}

.swiper-pagination-bullet-active {
    background: var(--meta-blue);
    opacity: 1;
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(121, 192, 255, 0.1);
    color: var(--code-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(121, 192, 255, 0.2);
}

.carousel-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.carousel-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* About Section */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.highlight-text {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: white;
    margin: 1.5rem 0;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-visual {
    position: relative;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.stat-card {
    padding: 2rem;
    text-align: center;
    min-width: 180px;
}

.stat-card.offset {
    transform: translateY(40px);
}

.stat-number {
    font-size: 3rem;
    font-family: var(--font-heading);
    font-weight: 900;
    color: var(--meta-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Process Steps */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    counter-reset: step-counter;
}

.step {
    position: relative;
    padding: 2rem;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.3s ease;
}

.step:hover {
    border-color: var(--text-accent);
}

.step-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05);
    line-height: 1;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.step:hover .step-number {
    color: rgba(0, 100, 224, 0.1);
}

.step h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

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

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.feature-item i {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    padding: 4rem;
}

.contact-info .section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.contact-desc {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.contact-note {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.contact-link i {
    color: var(--meta-blue);
    font-size: 1.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

input, textarea, select {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.5rem center;
    background-size: 1.2rem;
}

select option {
    background: var(--bg-secondary);
    color: white;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--code-cyan);
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.success-msg {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    text-align: center;
}

/* Footer */
.footer {
    background: #010409;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4rem 0 2rem;
}

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

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 1rem;
}

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

.link-group h4 {
    margin-bottom: 1.5rem;
    color: white;
}

.link-group a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.link-group a:hover {
    color: var(--code-cyan);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Background Visuals */
.bg-visuals {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 100, 224, 0.05) 0%, rgba(0, 100, 224, 0) 70%);
    filter: blur(60px);
    z-index: -1;
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Responsive adjustments for new themes */
@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }
    
    .hero-split-container {
        grid-template-columns: 1fr;
    }
    
    .hero-canvas-container {
        height: 400px;
        order: -1;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
}
/* Responsive */
@media (max-width: 992px) {
    .grid-2-col, .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .hero-split-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-canvas-container {
        height: 400px;
        order: -1;
    }
    
    .stat-card.offset {
        transform: none;
    }
    
    .contact-wrapper {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-cta {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }
    
    .section-padding {
        padding: 60px 0;
    }
}
