/* ==========================================================================
   CSS Variables & Theming
   ========================================================================== */
   :root {
    /* Primary Colors - Indigo/Blue for trust & tech */
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --secondary: #0F172A;
    
    /* Light Theme (Default) */
    --bg-main: #FAFAFA;
    --bg-alt: #F1F5F9;
    --bg-card: rgba(255, 255, 255, 0.8);
    --text-main: #0F172A;
    --text-muted: #475569;
    --border-color: #E2E8F0;
    
    /* Layout */
    --container-width: 1200px;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.025);
}

/* Dark Theme Overlay */
[data-theme="dark"] {
    /* Brighter primary colors for high contrast against dark backgrounds */
    --primary: #818CF8; 
    --primary-hover: #A5B4FC;
    
    --bg-main: #0F172A;
    --bg-alt: #1E293B;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #F8FAFC;
    --text-muted: #CBD5E1; /* Lightened from #94A3B8 for better readability */
    --border-color: #334155;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color var(--transition), color var(--transition);
}

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

ul {
    list-style: none;
}

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

/* Typography elements */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-main);
}

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

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

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

.bg-primary {
    background-color: var(--primary);
    color: white;
}
.bg-primary h2, .bg-primary p {
    color: white;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 1.2rem;
}

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

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

/* Button Styles */
.btn-primary, .btn-primary-outline, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px var(--primary);
    filter: brightness(1.1);
}

.btn-primary-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-primary-outline:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px var(--primary);
}

.btn-secondary {
    background-color: var(--bg-alt);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background-color: var(--bg-alt);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.w-100 { width: 100%; }

/* Glassmorphism Card Style */
.card, .service-box {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover, .service-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary);
}

[data-theme="dark"] .card:hover, [data-theme="dark"] .service-box:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

.work-card {
    display: block;
    color: var(--text-main);
    overflow: hidden;
}

.card-img {
    width: calc(100% + 5rem);
    margin: -2.5rem -2.5rem 2rem -2.5rem;
    max-width: none;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
    transition: transform 0.5s ease;
}

.work-card:hover .card-img {
    transform: scale(1.08) translateY(-5px);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

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

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.logo span {
    color: var(--primary);
    display: inline-block;
    animation: pulse 2.5s infinite ease-in-out;
}

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

.nav-links a:not(.btn-primary-outline) {
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-links a:hover:not(.btn-primary-outline) {
    color: var(--primary);
    transform: translateY(-1px);
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
}
.theme-toggle:hover {
    background-color: var(--bg-alt);
    transform: rotate(15deg) scale(1.1);
    color: var(--primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Offset for navbar */
}

.hero-content {
    max-width: 800px;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
[data-theme="dark"] .badge {
    background-color: rgba(129, 140, 248, 0.15);
}

.hero-title {
    font-size: 4rem;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.hero-desc {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

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

.hero-actions .ri-arrow-right-line {
    margin-left: 8px;
    transition: transform 0.3s ease;
}
.hero-actions .btn-primary:hover .ri-arrow-right-line {
    transform: translateX(5px);
}

/* ==========================================================================
   Philosophy / Edge
   ========================================================================== */
.card-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}
[data-theme="dark"] .card-icon {
    background-color: rgba(79, 70, 229, 0.2);
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-info p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.contact-item i {
    font-size: 1.5rem;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    color: var(--text-main);
    border-radius: var(--border-radius);
    font-family: inherit;
    transition: var(--transition);
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background-color: var(--bg-main);
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

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

.footer-socials {
    display: flex;
    gap: 1rem;
}

.footer-socials a {
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: var(--transition);
}
.footer-socials a:hover {
    color: var(--primary);
    transform: translateY(-3px) scale(1.2);
}

/* ==========================================================================
   Navigation Controls (Theme & Menu)
   ========================================================================== */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

/* ==========================================================================
   Floating CTA (WhatsApp)
   ========================================================================== */
@keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); transform: scale(1); }
    50% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); transform: scale(1.05); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); transform: scale(1); }
}

.floating-cta {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background-color: #25D366; /* WhatsApp Green */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: pulse-whatsapp 2.5s infinite ease-in-out;
}

.floating-cta:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.8);
    color: white;
    animation: none;
}

@keyframes wiggle-whatsapp {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(15deg) scale(1.1); }
    20% { transform: rotate(-10deg) scale(1.1); }
    30% { transform: rotate(5deg) scale(1.1); }
    40% { transform: rotate(-5deg) scale(1.1); }
    50% { transform: rotate(0deg) scale(1); }
}

.floating-cta i {
    animation: wiggle-whatsapp 2.5s infinite;
}

.floating-cta:hover i {
    animation: none;
}

.cta-tooltip {
    position: absolute;
    right: 75px;
    background-color: var(--bg-card);
    color: var(--text-main);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.floating-cta:hover .cta-tooltip {
    opacity: 1;
}

/* ==========================================================================
   Animations & Scroll Reveals
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 3rem;
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }
    
    .hero {
        padding-top: 100px;
    }

    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-desc {
        font-size: 1.1rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    /* Mobile Sidebar Menu Overlay */
    .nav-links {
        position: fixed;
        top: 70px; /* Below navbar */
        left: -100%; /* Hidden off-screen */
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--bg-main);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }

    .nav-links.active {
        left: 0; /* Slide in */
    }

    .nav-links a {
        font-size: 1.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions a {
        width: 100%;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .floating-cta {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}
