:root {
    --bg-main: #f8fafc; 
    --bg-card: #ffffff; 
    --bg-dark: #0f172a;
    --text-main: #0f172a; 
    --text-light: #ffffff;
    --text-muted: #64748b; 
    --card-border: #e2e8f0;
    --accent-main: #4dc4c4;
    --accent-hover: #3ba0a0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

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

/* Layout Utilities */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.relative-z { position: relative; z-index: 2; }
h1, h2, h3, h4 { color: var(--text-main); font-weight: 700; }
.section-badge {
    color: var(--accent-main);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}
.center { display: block; text-align: center; }
.center-heading { text-align: center; font-size: 2.5rem; margin-bottom: 20px; }

/* Scroll Animation Classes */
.fade-in {
    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-in.appear {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation & Hamburger */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    position: fixed;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
}
.logo { display: flex; align-items: center; text-decoration: none; }
.site-logo { max-height: 45px; width: auto; display: block; }
.nav-links { display: flex; gap: 35px; list-style: none; align-items: center; }
.nav-links a { color: var(--text-main); text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: color 0.3s; }
.nav-links a:hover { color: var(--accent-main); }

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}
.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    transition: 0.3s ease;
}

/* Dropdown Menu Styles */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    list-style: none;
    padding: 10px 0;
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu li { margin: 0; }
.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
    border-left: 3px solid transparent;
}
.nav-project-type {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 500;
}
.dropdown-menu a:hover {
    background: var(--bg-main);
    color: var(--accent-main);
    border-left-color: var(--accent-main);
}
.dropdown-menu a:hover .nav-project-type { color: var(--accent-main); }

/* Buttons */
.btn-primary, .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 30px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    height: 48px;
}
.btn-primary { background: var(--accent-main); color: white; border: 2px solid var(--accent-main); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-2px); }
.btn-outline { background: transparent; border: 2px solid var(--accent-main); color: var(--accent-main); }
.btn-outline:hover { background: var(--accent-main); color: white; transform: translateY(-2px); }
.btn-block { width: 100%; margin-top: 10px; }
.center-btn { text-align: center; margin-top: 30px; }

/* Dark Mode Sections */
.dark-section {
    background-color: var(--bg-dark);
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}
.dark-section h1, .dark-section h2, .dark-section h3, .dark-section h4 { color: var(--text-light); }
.dark-section .pricing-desc { color: #cbd5e1; }

/* Glowing Ambient Orbs */
.ambient-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--accent-main);
    filter: blur(150px);
    border-radius: 50%;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}
.glow-left { top: 10%; left: -100px; }
.glow-right { top: 30%; right: -100px; }
.glow-center { top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: 0.2; }

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;
    background-color: var(--bg-main);
    background-image: radial-gradient(var(--card-border) 1.5px, transparent 1.5px);
    background-size: 30px 30px;
    position: relative;
    overflow: hidden;
}
.hero-content { max-width: 50%; margin-top: 80px; position: relative; z-index: 2; }
.hero-visual { max-width: 45%; display: flex; justify-content: center; margin-top: 80px; position: relative; z-index: 2;}
.subtitle { font-size: 1.1rem; margin-bottom: 15px; color: var(--text-muted); font-weight: 500;}

#rotating-text { color: var(--accent-main); font-weight: bold; transition: opacity 0.4s ease-in-out; }
.hero h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 20px; }
.hero-desc { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 40px; }
.hero-buttons { display: flex; gap: 20px; flex-wrap: wrap; }

/* 3D Isometric Video Mockup */
.isometric-video-container {
    perspective: 1200px;
    cursor: pointer;
}
.isometric-video {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 16/9;
    background: var(--bg-card);
    border-radius: 12px;
    border: 6px solid #ffffff;
    box-shadow: -20px 30px 50px rgba(0,0,0,0.15);
    overflow: hidden;
    transform: rotateY(-15deg) rotateX(10deg) rotateZ(2deg);
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.5s ease;
    animation: float 6s ease-in-out infinite;
}
.isometric-video-container:hover .isometric-video {
    transform: rotateY(0deg) rotateX(0deg) rotateZ(0deg) scale(1.05);
    box-shadow: 0 20px 40px rgba(77, 196, 196, 0.3);
    animation-play-state: paused;
}
.isometric-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    transform: scale(1.01);
}
@keyframes float {
    0%, 100% { transform: translateY(0) rotateY(-15deg) rotateX(10deg) rotateZ(2deg); }
    50% { transform: translateY(-20px) rotateY(-15deg) rotateX(10deg) rotateZ(2deg); }
}

/* Services */
.services { padding: 80px 8%; position: relative; z-index: 2; }
.services-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.services-header-text { max-width: 60%; }
.services-header h2 { font-size: 2.8rem; line-height: 1.2; margin-top: 10px; }
.services-header-visual { display: flex; justify-content: flex-end; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.service-card {
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    padding: 35px 25px;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.service-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: var(--accent-main);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}
.service-card:hover { transform: translateY(-8px); box-shadow: 0 20px 30px -10px rgba(77, 196, 196, 0.15); }
.service-card:hover::before { transform: scaleX(1); }
.icon-wrapper { margin-bottom: 20px; display: inline-block; }
.service-card .icon { 
    font-size: 2.2rem; 
    background: linear-gradient(135deg, var(--accent-main), #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.4s ease; 
}
.service-card:hover .icon { transform: scale(1.15) rotate(5deg); }
.service-card h3 { margin-bottom: 15px; font-size: 1.3rem; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }

/* Tech Stack Marquee (No Hover Pause) */
.marquee { 
    width: 100%; overflow: hidden; padding: 40px 0; 
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: scroll-tech 40s linear infinite; }
.marquee-content { display: flex; gap: 50px; padding-right: 50px; }
.marquee-content span { 
    display: inline-flex; align-items: center; gap: 10px; font-size: 1.4rem; font-weight: bold; 
    color: #cbd5e1; 
}
@keyframes scroll-tech { 
    from { transform: translateX(-50%); } 
    to { transform: translateX(0); } 
}

/* Edge-to-Edge Portfolio Marquee (No Hover Pause) */
.portfolio { padding: 80px 0; background: var(--bg-main); }
.portfolio-instruction { color: var(--text-muted); margin-bottom: 30px; font-size: 1.05rem; }

.portfolio-edge-to-edge {
    width: 100%;
    overflow: hidden;
    margin-top: 40px;
    padding: 20px 0;
}
.portfolio-track {
    display: flex;
    width: max-content;
    animation: scroll-portfolio 35s linear infinite;
    will-change: transform;
}
.portfolio-content {
    display: flex;
    gap: 30px;
    padding-right: 30px;
}
.portfolio-item {
    display: flex;
    flex-direction: column;
    gap: 15px;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.portfolio-item:hover {
    transform: scale(1.02);
}
.portfolio-item-text {
    text-align: center;
}
.portfolio-item-text h3 {
    margin: 0 0 5px 0;
    font-size: 1.3rem;
    color: var(--text-main);
}
.portfolio-item-text .project-type {
    display: block;
    font-size: 0.85rem;
    color: var(--accent-main);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}
.project-video-card {
    width: 500px;
    aspect-ratio: 16/9;
    position: relative;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    transition: box-shadow 0.3s ease;
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}
.portfolio-item:hover .project-video-card {
    box-shadow: 0 15px 30px rgba(77, 196, 196, 0.3);
}
.project-video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    display: block;
    transform: scale(1.01);
}

@keyframes scroll-portfolio {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Pricing */
.pricing { padding: 100px 0; text-align: center; border-radius: 40px 40px 0 0; }
.pricing-desc { max-width: 600px; margin: 0 auto 50px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-bottom: 50px; text-align: left; }
.price-card {
    background: var(--bg-card); padding: 40px; border-radius: 20px;
    border: 1px solid var(--card-border); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); transition: transform 0.3s;
}
.light-card { background: #1e293b; border-color: #334155; color: white; }
.light-card h3, .light-card h2, .light-card ul li { color: white !important; }
.light-card span { color: #94a3b8; }
.light-card hr { border-color: #334155; }

.highlight-card { 
    background: #ffffff;
    border: 2px solid var(--accent-main); 
    box-shadow: 0 20px 40px rgba(77, 196, 196, 0.3); 
    transform: scale(1.05); 
    color: var(--text-main);
    z-index: 10;
}
.highlight-card h3, .highlight-card h2, .highlight-card ul li { color: var(--text-main); }
.highlight-card span { color: var(--text-muted); }
.price-card:not(.highlight-card):hover { transform: translateY(-5px); }
.price-card h3 { font-size: 1.2rem; margin-bottom: 15px; font-weight: 600; }
.price-amount { display: flex; align-items: baseline; gap: 5px; margin-bottom: 10px; }
.price-amount h2 { font-size: 2.5rem; margin: 0; }
.price-amount span { font-size: 0.8rem; }
.monthly { font-size: 0.9rem; color: var(--accent-main); margin-bottom: 25px; font-weight: 500;}
.price-card hr { border: none; border-top: 1px solid var(--card-border); margin-bottom: 25px; }
.price-card ul { list-style: none; }
.price-card ul li { margin-bottom: 15px; font-size: 0.95rem; display: flex; gap: 10px; align-items: center; }
.price-card ul li i { color: var(--accent-main); font-size: 0.8rem; }

/* Custom Free Testimonials */
.testimonials { padding: 80px 0; background: var(--bg-main); }
.custom-testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.testimonial-card { 
    background: var(--bg-card); padding: 35px 30px; border-radius: 15px; 
    border: 1px solid var(--card-border); box-shadow: 0 10px 20px rgba(0,0,0,0.05); 
    transition: transform 0.3s; 
}
.testimonial-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.stars { color: #f59e0b; margin-bottom: 15px; font-size: 0.95rem; }
.testimonial-card p { font-style: italic; color: var(--text-muted); margin-bottom: 25px; font-size: 1rem; line-height: 1.6; }
.testimonial-card h4 { color: var(--text-main); font-size: 1.05rem; margin-bottom: 2px; }
.testimonial-card span { color: var(--accent-main); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; }

/* Footer */
footer { background: var(--bg-card); padding: 60px 8% 20px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; border-top: 1px solid var(--card-border); }
.footer-col p { color: var(--text-muted); margin-top: 10px; font-size: 0.9rem; }
.socials { display: flex; gap: 15px; margin-top: 20px; }
.socials a { color: var(--text-muted); width: 35px; height: 35px; border-radius: 50%; border: 1px solid var(--card-border); display: flex; align-items: center; justify-content: center; text-decoration: none; transition: 0.3s; }
.socials a:hover { background: var(--accent-main); border-color: var(--accent-main); color: white; }
.footer-col h4 { margin-bottom: 20px; font-size: 1.1rem; color: var(--text-main); }
.links ul { list-style: none; }
.links ul li { margin-bottom: 10px; }
.links ul li a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; transition: 0.3s; }
.links ul li a:hover { color: var(--accent-main); }
.contact p { margin-bottom: 10px; display: flex; gap: 10px; align-items: center; color: var(--text-muted); }
.contact p a { color: var(--text-muted); text-decoration: none; transition: 0.3s; }
.contact p a:hover { color: var(--accent-main); }
.copyright { grid-column: 1 / -1; text-align: right; border-top: 1px solid var(--card-border); margin-top: 40px; padding-top: 20px; color: var(--text-muted); font-size: 0.8rem; }

/* Redesigned Modal Form */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.8); z-index: 2000; align-items: center; justify-content: center; backdrop-filter: blur(8px); }
.modal-content { 
    background: var(--bg-card); border: 1px solid var(--card-border); padding: 40px 30px; 
    border-radius: 15px; width: 90%; max-width: 450px; position: relative; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); 
}
.close-btn { position: absolute; top: 20px; right: 20px; font-size: 1.5rem; cursor: pointer; color: var(--text-main); }

.modal-header { text-align: center; margin-bottom: 25px; }
.modal-icon { font-size: 2.5rem; color: var(--accent-main); margin-bottom: 15px; }
.modal-header h2 { font-size: 1.8rem; margin-bottom: 5px; }
.modal-header p { color: var(--text-muted); font-size: 0.95rem; }

.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; color: var(--text-main); }
form input, form textarea { 
    width: 100%; padding: 14px; border: 1px solid var(--card-border); background: var(--bg-main); color: var(--text-main); 
    border-radius: 8px; transition: border-color 0.3s; font-family: inherit;
}
form input:focus, form textarea:focus { outline: none; border-color: var(--accent-main); }

/* Form Success Message */
.form-success { text-align: center; padding: 20px 0; display: none; }
.form-success i { font-size: 3.5rem; color: #10b981; margin-bottom: 15px; }
.form-success h3 { font-size: 1.5rem; margin-bottom: 10px; color: var(--text-main); }
.form-success p { color: var(--text-muted); font-size: 0.95rem; }

/* Full Screen Website Viewer Modal */
.viewer-modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-main); z-index: 3000; flex-direction: column;
}
.viewer-header { display: flex; align-items: center; padding: 15px 25px; background: var(--bg-card); border-bottom: 1px solid var(--card-border); gap: 20px; }
.viewer-title { font-weight: 600; color: var(--text-muted); }
.viewer-modal iframe { width: 100%; flex-grow: 1; border: none; background: #ffffff; }

/* Responsive adjustments */
@media (max-width: 1024px) {
    .project-video-card { width: 400px; }
    .isometric-video { max-width: 450px; }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        padding: 20px 0;
        gap: 15px;
        text-align: center;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        display: none;
        border-bottom: 1px solid var(--card-border);
    }
    .nav-links.active { display: flex; }

    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        padding: 0;
    }
    .dropdown.active .dropdown-menu { display: block; }
    .dropdown-menu a { padding: 10px; font-size: 0.85rem; }

    /* Gap perfectly closed in the Hero Mobile rules below */
    .hero { 
        flex-direction: column; 
        text-align: center; 
        padding-top: 120px; 
        justify-content: flex-start; /* Forces content to top without large space-between gap */
    }
    .hero-content { max-width: 100%; margin-top: 0; }
    .hero-buttons { justify-content: center; }
    .hero-visual { max-width: 100%; margin-top: 50px; } 
    
    .isometric-video { transform: none; box-shadow: 0 10px 20px rgba(0,0,0,0.1); border: 2px solid white; animation: none;}
    .isometric-video-container:hover .isometric-video { transform: none; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
    
    .services-header { flex-direction: column-reverse; text-align: center; }
    .services-header-text { max-width: 100%; }
    .services-header-visual { margin-bottom: 20px; display: flex; justify-content: center; }
    .hero h1 { font-size: 2.5rem; }
    
    .project-video-card { width: 320px; }
    
    .highlight-card { transform: scale(1); z-index: 1;}
    
    footer { grid-template-columns: 1fr; text-align: center; }
    .socials { justify-content: center; }
    .copyright { text-align: center; }

    /* Better mobile header for the Project Viewer */
    .viewer-header {
        flex-direction: column;
        gap: 10px;
        padding: 12px 15px;
        text-align: center;
    }
    .viewer-header .btn-primary {
        width: 100%;
        height: 45px;
        font-size: 0.9rem;
    }
    .viewer-title {
        display: block;
        font-size: 0.85rem;
    }
}
