/* --- CSS Variables & Theme --- */
:root {
    /* --- New Palette --- */
    --color-brand-50: #eff6ff;
    --color-brand-100: #dbeafe;
    --color-brand-400: #60a5fa;
    --color-brand-500: #3b82f6;
    --color-brand-800: #1e40af;
    --color-brand-900: #0f172a; /* Deep Navy */
    --color-gold-500: #d4af37; /* Vibrant Gold */
    --color-gold-600: #b4942b;
    --color-gold-50: #fffdf5;
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0; /* Border color */
    --color-slate-300: #cbd5e1;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-600: #475569;
    --color-slate-700: #334155; /* Secondary Text */
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;
    --color-slate-950: #020617;

    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;

    /* --- Mappings --- */
    --primary: var(--color-brand-900); /* Navy Blue */
    --primary-dark: var(--color-slate-950); /* Black */
    --primary-light: var(--color-slate-100);
    --accent: var(--color-gold-500); /* Gold */
    --accent-dark: var(--color-gold-600);
    --accent-light: var(--color-gold-50);
    --secondary: var(--color-slate-700); /* Dark Gray/Black */
    --dark: var(--color-brand-900);
    --light: var(--color-slate-50);
    --white: #ffffff;
    --border-color: rgba(226, 232, 240, 0.8);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 20px 40px -15px rgba(15, 23, 42, 0.1);
    --shadow-hover: 0 25px 50px -12px rgba(15, 23, 42, 0.15);
    --radius: 24px; /* Larger, softer corners */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, var(--color-brand-900) 0%, var(--color-brand-800) 100%);
    --gradient-accent: linear-gradient(135deg, var(--color-gold-500) 0%, var(--color-gold-600) 100%);
    --gradient-text: linear-gradient(to right, var(--color-brand-900), var(--color-brand-500));
}

/* --- Reset & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--color-slate-50);
    background-image: radial-gradient(var(--color-slate-200) 1px, transparent 1px);
    background-size: 40px 40px; /* Subtle dot pattern */
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- Layout Utilities --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding { padding: 100px 0; }
.text-center { text-align: center; }
.text-primary { color: var(--primary); }

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 { 
    font-size: 4rem; 
    letter-spacing: -0.03em;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
h2 { font-size: 2.8rem; margin-bottom: 1rem; color: var(--dark); }
h3 { font-size: 1.5rem; }
p { color: var(--secondary); margin-bottom: 1.5rem; font-size: 1.05rem; }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.3);
}

.btn-primary:hover {
    background: var(--gradient-accent);
    border-color: transparent;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(212, 175, 55, 0.4);
}

.btn-outline {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* --- Header & Navigation --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo{
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
}
.logo span { color: var(--accent); }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a {
    font-weight: 500;
    color: var(--secondary);
    transition: var(--transition);
    font-size: 0.95rem;
}
.nav-links a:hover { color: var(--accent); }

.hamburger { display: none; cursor: pointer; font-size: 1.5rem; }

/* --- Hero Section --- */
#hero {
    padding-top: 200px;
    padding-bottom: 140px;
    background: transparent;
    position: relative;
    overflow: hidden;
}


/* Abstract Background Blob */
#hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, rgba(59, 130, 246, 0.05) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
}

/* Floating Circles */
#hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='42' height='42' viewBox='0 0 42 42' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cfilter id='a' x='0' y='0' width='42' height='42' filterUnits='userSpaceOnUse'%3E%3CfeFlood flood-color='%23D4AF37'/%3E%3CfeComposite in2='SourceAlpha' operator='in'/%3E%3CfeGaussianBlur stdDeviation='3'/%3E%3CfeOffset dx='0' dy='0'/%3E%3CfeComposite in2='SourceGraphic' operator='atop'/%3E%3C/filter%3E%3C/defs%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg filter='url(%23a)' transform='translate(3 3)'%3E%3Ccircle fill='%23D4AF37' cx='18' cy='18' r='18'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.08;
    z-index: -1;
    animation: floatCircles 15s linear infinite;
}

@keyframes floatCircles {
    from { transform: translate(0, 0); }
    to { transform: translate(-50px, -50px); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-btns {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    margin-top: 2.5rem;
}

/* --- Hero Visuals (Right Side) --- */
.hero-visual-wrapper {
    position: relative;
    width: 100%;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px; /* Enable 3D space */
}

.visual-3d-container {
    position: relative;
    width: 400px;
    height: 300px;
    transform-style: preserve-3d;
    transform: rotateY(-15deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.visual-3d-container:hover {
    transform: rotateY(-5deg) rotateX(0deg); /* Interactive tilt on hover */
}

/* --- Browser Mockup --- */
.mockup-browser {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.mockup-header {
    height: 30px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.mockup-header .dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.mockup-header .dot:nth-child(1) { background: #ff5f56; }
.mockup-header .dot:nth-child(2) { background: #ffbd2e; }
.mockup-header .dot:nth-child(3) { background: #27c93f; }

.mockup-body { padding: 2px; flex: 1; display: flex; flex-direction: column; gap: 15px; }
/* --- Phone Mockup --- */
.mockup-phone {
    position: absolute;
    bottom: -20px;
    right: -30px;
    width: 120px;
    height: 220px;
    background: var(--dark);
    border-radius: 20px;
    border: 4px solid var(--dark);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    transform: translateZ(50px); /* Pop out in 3D */
    overflow: hidden;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 15px;
    background: var(--dark);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    z-index: 2;
}

.phone-body {
    background: var(--white);
    height: 100%;
    width: 100%;
    padding: 25px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-hero-sm { height: 50px; background: var(--accent); border-radius: 6px; }
.skeleton-lines { height: 80px; background: #f1f5f9; border-radius: 6px; }

/* --- Floating Icons --- */
.floating-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
    z-index: 10;
    animation: float 4s ease-in-out infinite;
}

.icon-code {
    top: -20px;
    right: -20px;
    color: var(--accent);
    transform: translateZ(80px);
}

.icon-design {
    bottom: 40px;
    left: -40px;
    color: #ec4899; /* Pink */
    transform: translateZ(60px);
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* --- About Section --- */
#about { background-color: transparent; }
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.stats-container {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: var(--radius);
    text-align: center;
    flex: 1;
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}
.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border:1px solid gold;
}
.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 5px;
}
.stat-label { font-size: 0.85rem; font-weight: 600; color: var(--secondary); }

/* --- Services Section --- */
#services { background-color: transparent; }
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.service-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px 35px;
    border-radius: var(--radius);
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}
.service-card:hover::before {
    transform: scaleX(1);
}
.service-icon {
    font-size: 1.8rem;
    margin-bottom: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-brand-50);
    color: var(--accent);
    width: 70px;
    height: 70px;
    border-radius: 20px;
    transition: var(--transition);
}
.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 15px rgba(212, 175, 55, 0.25);
}

/* --- Why Choose Us --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}
.feature-item { text-align: center; padding: 20px; }
.feature-icon {
    color: var(--accent);
    font-size: 2.5rem;
    margin-bottom: 20px;;
}

/* --- Our Work --- */
#work { background-color: transparent; }
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}
.project-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    border: none;
}
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.project-img {
    height: 260px;
    background-color: #cbd5e1;
    overflow: hidden;
    position: relative;
}
.project-img::after {
    content: '\f06e'; /* eye icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(22, 42, 44, 0.6); /* --dark with opacity */
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    opacity: 0;
    transition: var(--transition);
}
.project-card:hover .project-img::after {
    opacity: 1;
}
.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.project-card:hover .project-img img {
    transform: scale(1.05);
}
.project-info { padding: 30px; }
.project-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}
.project-card--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-light);
    text-align: center;
    border: 2px dashed var(--border-color);
    min-height: 300px; /* To match other cards' approximate height */
    box-shadow: none;
}
.project-card--placeholder:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--accent);
}

/* --- Process --- */
.process-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 40px;
}
.step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0 15px;
}

/* Icon Container */
.step-icon {
    width: 80px;
    height: 80px;
    background: var(--white);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    position: relative;
    z-index: 1;
    font-size: 1.8rem;
    color: var(--primary);
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* Hover Effect */
.step:hover .step-icon {
    background: var(--gradient-accent);
    color: var(--white);
    border-color: transparent;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.3);
}

/* Connector Line (Desktop) */
.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 40px; /* Center of the 80px icon */
    left: 50%;
    width: 100%;
    height: 2px;
    background-image: linear-gradient(to right, var(--accent) 50%, transparent 50%);
    background-size: 20px 100%; /* Dashed effect */
    z-index: 0;
    opacity: 0.5;
}

.step-number {
    width: 30px;
    height: 30px;
    background: var(--accent);
    color: var(--primary); /* Navy text on Gold */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    position: absolute;
    top: -5px;
    right: -5px;
    border: 3px solid var(--white);
    box-shadow: none;
}

/* --- Testimonials --- */
#testimonials { background-color: transparent; }
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.testimonial-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255,255,255,0.5);
    position: relative;
    overflow: hidden;
}
.testimonial-card::before {
    content: '\f10d'; /* quote-left */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 15px;
    left: 25px;
    font-size: 4rem;
    color: var(--accent-light);
    z-index: 0;
}
.testimonial-card p, .testimonial-card .client-info {
    position: relative;
    z-index: 1;
}



/* --- Contact --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}
.contact-info h2 { font-size: 2.5rem; margin-bottom: 20px; }
.contact-details { margin-top: 40px; }
.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}
.contact-item i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-right: 20px;
    margin-top: 5px;
    width: 30px;
    text-align: center;
}
.contact-item h4 { font-size: 1.1rem; margin-bottom: 5px; color: var(--dark); }
.contact-item p { margin-bottom: 0; font-size: 0.95rem; }

.contact-form-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255,255,255,0.5);
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; }
.form-control {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: #f8fafc;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}
.success-message {
    display: none;
    background: var(--accent-light);
    color: var(--primary);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
}

/* --- Footer --- */
footer {
    background: var(--dark);
    color: var(--border-color);
    padding: 80px 0 30px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}
.footer-col h4 { color: var(--white); margin-bottom: 25px; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col a:hover { color: var(--white); }
.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #2a3c3e; /* Slightly lighter than --dark */
    font-size: 0.9rem;
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* --- Typing Cursor Animation --- */
.cursor {
    display: inline-block;
    color: var(--accent);
    font-weight: 400;
    animation: blink 1s infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* --- Responsive --- */
@media (max-width: 1024px) {
    h1 { font-size: 3.5rem; }
    .section-padding { padding: 80px 0; }
    #hero { padding-top: 160px; padding-bottom: 100px; }
    .contact-wrapper { gap: 40px; }

    /* --- Horizontal Scroll for Tablet & Mobile --- */
    .horizontal-scroll-wrapper {
        display: flex;
        overflow-x: auto;
        padding: 10px 5px 30px 5px; /* Spacing for shadow/hover */
        margin: 0 -20px; /* Bleed to edges */
        padding-left: 20px;
        padding-right: 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .horizontal-scroll-wrapper::-webkit-scrollbar { display: none; }

    .services-grid, .features-grid, .projects-grid, .testimonial-grid {
        display: grid;
        grid-auto-flow: column;
        gap: 20px;
        grid-auto-columns: 45vw; /* Tablet: Show ~2 cards */
    }

    /* Process Flowchart Tablet/Mobile */
    .process-steps {
        display: flex;
        gap: 20px;
        width: max-content;
    }
    .step { width: 300px; flex-shrink: 0; margin: 0; padding: 0; }
    .step:not(:last-child)::after, .step:not(:last-child)::before { display: none; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .nav-links {
        border-radius: 20px;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 40px 30px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    .nav-links.active { transform: translateY(0); }
    
    /* Reset header for mobile */
    header { top: 0; }
    header .container { border-radius: 0; background: rgba(255,255,255,0.95); }
    nav { height: 70px; }

    .hamburger { display: block; }
    .about-grid { grid-template-columns: 1fr; }
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
    }
    .hero-btns { flex-direction: column; }
    .btn { width: 100%; text-align: center; }

    /* Remove unwanted hero decorations to simplify mobile view */
    #hero::before, #hero::after, .floating-icon {
        display: none;
    }

    /* Contact Mobile */
    .contact-wrapper { grid-template-columns: 1fr; gap: 40px; }
    .contact-form-container { padding: 30px 20px; }

    .services-grid, .features-grid, .projects-grid, .testimonial-grid {
        grid-auto-columns: 90vw; /* Mobile: Screen fit (90% width) */
    }
    .step { width: 85vw; } /* Mobile Process fit */
}

@media (max-width: 480px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .step-icon { width: 60px; height: 60px; font-size: 1.4rem; }
    .step:not(:last-child)::before { top: 60px; }
}