@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Open+Sans:wght@300;400;600;700&display=swap');

/* CSS Variables for easier theming and consistency */
:root {
    /* White Theme Color Palette */
    --primary-color: #6a1b9a; /* Deep Purple - primary accent for links, highlights */
    --primary-light: #9c27b0; /* Lighter Purple */
    --primary-dark: #4a148c; /* Darker Purple */

    --accent-color: #00bcd4; /* Bright Cyan - secondary accent for CTA/elements */
    --accent-light: #64ffda; /* Aqua Green */
    --accent-dark: #00838f; /* Darker Cyan */

    --text-dark: #ffffff; 
    --text-light: #f4f7f6;

    /* Change background colors to black/dark */
    --bg-main: #000000; 
    --bg-accent: #1a1a1a;
    --bg-overlay: rgba(0, 0, 0, 0.6); /* This creates the dark tint on the video */
    --bg-light-header: rgba(0, 0, 0, 0.8);


    --shadow-sm: rgba(0, 0, 0, 0.08);
    --shadow-md: rgba(0, 0, 0, 0.15);
    --shadow-lg: rgba(0, 0, 0, 0.25);

    --border-radius-md: 12px;
    --border-radius-lg: 20px;

    --transition-speed: 0.4s;
    --header-height: 90px;

    /* Multi-shade gradient colors inspired by the logo */
    --logo-gradient-color-1: #e74c3c; /* Reddish */
    --logo-gradient-color-2: #f1c40f; /* Yellowish */
    --logo-gradient-color-3: #2ecc71; /* Greenish */
    --logo-gradient-color-4: #3498db; /* Bluish */
    --logo-gradient-color-5: #9b59b6; /* Purplish */
}

/* General Styles */
html {
    scroll-behavior: smooth;
    height: 100%; /* Ensure html and body take full height for video */
}

body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    line-height: 1.8;
    background-color: var(--bg-main); /* Overall light background */
    color: var(--text-dark); /* Dark text on light background */
    overflow-x: hidden;
    padding-top: var(--header-height); /* Push content down to clear fixed header */
    position: relative; /* Needed for video positioning context */
    z-index: 1; /* Ensure body content is above video and overlay */
    min-height: 100vh; /* Ensure body takes at least full viewport height */
}

/* Background Video Styles */
#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* This makes it look like the reference photo */
    z-index: -2;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Use a lower number (like 0.4) so the video is clear */
    background: rgba(0, 0, 0, 0.4); 
    z-index: -1;
    pointer-events: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark); /* Default dark color for headings */
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 700;
}

/* Fluid Typography using clamp() */
h1 { font-size: clamp(2.8rem, 7vw, 5rem); }
h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h3 { font-size: clamp(1.7rem, 3.5vw, 2.2rem); }
p { font-size: clamp(1rem, 1.6vw, 1.25rem); }

/* General link styling */
a {
    color: var(--primary-color); /* Deep Purple for links */
    text-decoration: none;
    transition: all var(--transition-speed) ease-in-out;
}

a:hover {
    color: var(--primary-light); /* Lighter Purple on hover */
    text-decoration: underline;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

/* Header Styles */
header {
    background: var(--bg-light-header); /* Light header with transparency */
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px); /* Frosted glass effect */
    -webkit-backdrop-filter: blur(8px);
    height: var(--header-height);
    display: flex;
    align-items: center;
    box-shadow: 0 4px 20px var(--shadow-md); /* Stronger shadow on light theme */
}

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

header .logo {
    max-width: 140px; /* Line 139 */
    height: auto;     /* Line 140 */
    
    /* ADD THESE TO FIX THE LOOK */
    background: transparent; 
    display: block;
    mix-blend-mode: multiply; /* This can help hide a white background on a dark header */
}

header .logo:hover {
    transform: scale(1.08);
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

header nav ul li {
    margin-left: 45px;
}

header nav ul li a {
    color: var(--text-dark); /* Dark text for header navigation */
    font-weight: 600;
    position: relative;
    padding-bottom: 8px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1); /* Subtle text shadow for visibility */
    letter-spacing: 0.5px;
    font-size: 1.05rem;
}

header nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 4px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    background: var(--primary-color); /* Purple underline */
    border-radius: 3px;
    transition: width var(--transition-speed) ease-in-out, transform var(--transition-speed) ease-in-out;
}

header nav ul li a:hover {
    color: var(--primary-light); /* Lighter Purple on hover */
    text-shadow: 0 0 8px rgba(0,0,0,0.2);
}

header nav ul li a:hover::after {
    width: 100%;
    transform: translateX(-50%) scaleX(1);
    background: var(--primary-light);
}

/* Mobile Navigation (Hamburger) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
    width: 35px;
    height: 24px;
    justify-content: space-between;
}

.menu-toggle span {
    height: 4px;
    width: 100%;
    background-color: var(--text-dark); /* Dark color for hamburger */
    border-radius: 2px;
    transition: all var(--transition-speed) ease-in-out;
}

.menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(9px, 9px);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
    transform: translateX(-30px);
}

.menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(9px, -9px);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Pushes text to the right side */
    align-items: flex-end; 
    text-align: right;
    padding: 0 8%;
    background: transparent;
    position: relative;
    z-index: 2;
}

/* Multi-shade text for H1 from logo colors */
.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    /* Subtle professional gradient: Light Blue to Silver */
    background: linear-gradient(135deg, #ffffff 0%, #a5c7d0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero p {
    color: var(--text-muted); /* Muted grey */
    margin-bottom: 3.5rem;
    max-width: 900px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Lighter text shadow */
    animation: slideInUp 1.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    opacity: 0;
    animation-delay: 0.2s;
    position: relative;
    z-index: 2;
}

.hero .cta {
    /* Apply gradient for CTA from logo colors */
    background: linear-gradient(45deg, var(--logo-gradient-color-5), var(--logo-gradient-color-4), var(--logo-gradient-color-3));
    color: var(--text-light); /* Light text for CTA */
    padding: 1.4rem 3.5rem;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); /* Shadow using a general dark color for buttons */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: fadeIn 1.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    opacity: 0;
    animation-delay: 0.4s;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.hero .cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: -1;
}

.hero .cta:hover {
    background: linear-gradient(45deg, var(--logo-gradient-color-4), var(--logo-gradient-color-3), var(--logo-gradient-color-5)); /* Slightly shifted gradient on hover */
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.3); /* Even stronger shadow */
}

.hero .cta:hover::before {
    width: 200%;
    height: 200%;
}

/* Keyframe Animations */
@keyframes slideInUp {
    from { transform: translateY(80px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Sections (These will overlay the background video) */
section {
    padding: 6rem 2.5rem;
    margin: 5rem auto;
    background: var(--bg-section); /* Light section background */
    border-radius: var(--border-radius-lg);
    box-shadow: 0 15px 40px var(--shadow-sm);
    text-align: center; /* Center the text for all sections */
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05); /* Subtle dark border on light sections */
    z-index: 3; /* Ensure sections are above the video overlay */
}

/* Subtle gradient overlay for section backgrounds */
section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top left, var(--primary-light) 0%, transparent 20%), /* Use primary light for subtle effect */
                radial-gradient(circle at bottom right, var(--accent-light) 0%, transparent 20%); /* Use accent light for subtle effect */
    opacity: 0.05; /* Light opacity for subtle effect */
    z-index: 0;
    border-radius: var(--border-radius-lg);
}

/* Multi-shade text for H2 from logo colors */
section h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    background-image: linear-gradient(90deg, var(--logo-gradient-color-1), var(--logo-gradient-color-4), var(--logo-gradient-color-5));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent; /* Hide original text color to show gradient */
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
}

section h2::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 5px;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    background: linear-gradient(to right, var(--logo-gradient-color-1), var(--logo-gradient-color-4)); /* Gradient underline */
    border-radius: 3px;
    transition: transform var(--transition-speed) ease-in-out;
}

section:hover h2::after {
    transform: translateX(-50%) scaleX(1);
}

section p {
    margin-bottom: 2.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-muted); /* Muted grey */
}

/* Services Section Specifics */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 5rem;
}

.service-item {
    background: var(--bg-section); /* White background for service items */
    padding: 3rem;
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 25px var(--shadow-md); /* Stronger shadow */
    transition: all var(--transition-speed) cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-bottom: 6px solid transparent;
    position: relative;
    overflow: hidden;
}

.service-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, var(--logo-gradient-color-1), var(--logo-gradient-color-4)); /* Gradient border */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-speed) ease-out;
}

.service-item:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px var(--shadow-lg); /* Even stronger shadow on hover */
}

.service-item:hover::before {
    transform: scaleX(1);
}

.service-item .service-icon {
    width: 420px; /* Increased width to fit the red box */
    height: 220px; /* Increased height to fit the red box */
    object-fit: contain; /* Ensures the entire image is visible within the bounds */
    margin-bottom: 2rem;
    fill: var(--primary-color); /* Deep Purple for icons (can also be gradient if SVG allows) */
    transition: transform var(--transition-speed) ease, filter var(--transition-speed) ease;
}

.service-item:hover .service-icon {
    transform: scale(1.15) rotate(5deg);
    filter: brightness(1.2) drop-shadow(0 5px 10px rgba(0,0,0,0.2));
}

/* Multi-shade text for H3 from logo colors */
.service-item h3 {
    font-size: 1.8rem;
    background-image: linear-gradient(90deg, var(--logo-gradient-color-5), var(--logo-gradient-color-3));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent; /* Hide original text color to show gradient */
    margin-bottom: 1rem;
    letter-spacing: 0.2px;
    text-shadow: 0.5px 0.5px 3px rgba(0, 0, 0, 0.1);
}

.service-item p {
    font-size: 1.05rem;
    color: var(--text-muted); /* Muted grey */
    line-height: 1.7;
}

/* Form Section */
#contact {
    text-align: center; /* Center the content of the contact section */
}

form {
    display: flex;
    flex-direction: column;
    max-width: 750px;
    margin: 0 auto;
    padding: 3.5rem;
    background: var(--bg-section); /* White background for form */
    border-radius: var(--border-radius-lg);
    box-shadow: 0 15px 40px var(--shadow-md); /* Stronger shadow */
    border: 1px solid rgba(0,0,0,0.05); /* Subtle dark border */
}

form label {
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--text-dark); /* Dark text for labels */
    font-size: 1.1rem;
    text-align: left; /* Align labels to the left within the centered form */
}

form input,
form textarea {
    margin-bottom: 2rem;
    padding: 1.3rem;
    border: 1px solid rgba(0,0,0,0.2); 
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background-color: #ffffff; /* Updated */
    color: #000000;            /* Updated */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    position: relative;        /* Added */
    z-index: 5;               /* Added */
    pointer-events: auto !important; /* This explicitly tells the mouse to work here */
}

form input:focus,
form textarea:focus {
    border-color: var(--primary-color); /* Purple focus border */
    box-shadow: 0 0 0 5px rgba(106, 27, 154, 0.25), inset 0 1px 3px rgba(0,0,0,0.15);
    outline: none;
    background-color: var(--bg-main); /* Keep background consistent on focus */
}

form textarea {
    min-height: 160px;
    resize: vertical;
}

form button {
    /* Apply gradient for button from logo colors */
    background: linear-gradient(45deg, var(--logo-gradient-color-5), var(--logo-gradient-color-4), var(--logo-gradient-color-3));
    color: var(--text-light); /* Light text for button */
    padding: 1.4rem 2.8rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    font-size: 1.25rem;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

form button:hover {
    background: linear-gradient(45deg, var(--logo-gradient-color-4), var(--logo-gradient-color-3), var(--logo-gradient-color-5)); /* Slightly shifted gradient on hover */
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.3);
}

form button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: skewX(-20deg);
    transition: transform 0.4s ease-in-out;
}

form button:hover::before {
    transform: skewX(-20deg) translateX(200%);
}


/* Footer */
footer {
    background: var(--bg-light-header); /* Use light header background for consistency */
    color: var(--text-dark); /* Dark text */
    text-align: center;
    padding: 3rem 0;
    margin-top: 6rem;
    font-size: 1rem;
    box-shadow: inset 0 8px 20px rgba(0, 0, 0, 0.2); /* Stronger inner shadow */
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGZpbGw9IiMwMDAwMDAiIGZpbGwtb3BhY2l0eT0iMC4wMyI+CiAgICAgICAgPHBhdGggZD0iTTAgMGgxMHYxMEgweiBNMTAtMTBoMTB2MTBIMTB6IiAvPgogICAgPC9nPgplcnN2Zz4='); /* Changed pattern color for light theme */
    opacity: 0.1;
    z-index: 0;
}

footer p {
    margin: 0;
    position: relative;
    z-index: 1;
    letter-spacing: 0.2px;
}


/* Media Queries for Responsiveness */
@media (max-width: 992px) {
    header nav ul li {
        margin-left: 30px;
    }

    .hero h1 {
        font-size: clamp(2.2rem, 8vw, 4rem);
    }

    .hero p {
        font-size: clamp(1rem, 3vw, 1.2rem);
    }

    section {
        padding: 4rem 2rem;
        margin: 4rem auto;
    }

    section h2 {
        font-size: clamp(2rem, 6vw, 3rem);
    }

    .service-grid {
        gap: 2rem;
    }

    .service-item {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: var(--header-height);
    }

    header .container {
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 0 1.5rem;
    }

    header .logo {
        max-width: 120px;
    }

    header nav {
        width: 100%;
        order: 3;
    }

    header nav ul {
        flex-direction: column;
        text-align: center;
        margin-top: 1rem;
        display: none;
        width: 100%;
        background: var(--bg-light-header); /* Light background for mobile menu */
        box-shadow: 0 5px 20px var(--shadow-md);
        border-radius: var(--border-radius-md);
        padding: 1.5rem 0;
        position: fixed;
        top: var(--header-height);
        left: 0;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        height: calc(100vh - var(--header-height));
        overflow-y: auto;
        transition: transform var(--transition-speed) ease-in-out;
        transform: translateY(-100%);
    }

    header nav ul.open {
        display: flex;
        transform: translateY(0);
    }

    header nav ul li {
        margin: 18px 0;
    }

    header nav ul li a {
        color: var(--text-dark); /* Dark text */
        font-size: 1.2rem;
        text-shadow: none;
    }

    header nav ul li a:hover {
        color: var(--primary-light); /* Lighter Purple */
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle span {
        background-color: var(--text-dark); /* Dark color */
    }

    .hero {
        height: calc(100vh - var(--header-height));
        padding: 0 1.5rem;
    }

    .hero h1 {
        font-size: clamp(2rem, 9vw, 3.5rem);
    }

    .hero p {
        font-size: clamp(1rem, 4.5vw, 1.1rem);
    }

    .hero .cta {
        padding: 1.2rem 2.8rem;
    }

    section {
        padding: 3rem 1.5rem;
        margin: 3rem auto;
    }

    section h2 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

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

    .service-item {
        margin-bottom: 2.5rem;
    }

    form {
        padding: 2.5rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    header .logo {
        max-width: 100px;
    }

    .hero h1 {
        font-size: clamp(1.6rem, 11vw, 2.8rem);
    }
    
    .hero p {
        font-size: clamp(0.9rem, 5vw, 1.05rem);
    }

    .hero .cta {
        padding: 1rem 2.2rem;
    }

    section {
        padding: 2rem 1rem;
    }

    form {
        padding: 2rem 1rem;
    }
}

/* Force form fields to stay white when typing/selected */
input:focus, 
textarea:focus {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 2px solid var(--primary-color) !important;
    outline: none;
}

/* Fix for Chrome autofill turning fields black/yellow */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #000000 !important;
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid #ffffff;
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    width: 4px;
    height: 8px;
    background-color: #ffffff;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 8px;
    border-radius: 2px;
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% { top: 8px; opacity: 1; }
    100% { top: 25px; opacity: 0; }
}
/* Styling for standalone pages (About, Services, Contact) */
.sub-page {
    background-color: #000000 !important; /* Forces solid black background */
}

/* Specifically moves the Hero text to the right for sub-pages */
.hero.right-align {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Pushes content to the right side */
    text-align: right;    /* Aligns the text lines to the right */
    padding-right: 10%;   /* Adds a professional gap from the edge */
    background: transparent;
    height: 60vh;         /* Shorter height for sub-pages so content is higher up */
}
