:root {
    /* Light Theme Defaults */
    --primary-light: #232228;
    --secondary-light: #88827e;
    --bg-light: #f8fafc;
    --text-light: #19181b;
    --accent-light: #ff6b6b;
    --white-light: #fff;
    --header-blur-light: 16px;
    --alt-bg-light: #f8fafc; /* NOTE: Same as --bg-light */
    --card-bg-light: #fff;
    --work-card-bg-light: #fff;
    --button-cta-bg-light: #fff;
    --button-cta-text-light: #2626f5;
    --footer-text-light: #232228;
    --footer-separator-light: #a7a5a0;
    --input-border-light: #88827e;
    --input-focus-border-light: #ff6b6b;
    --input-bg-light: #fff;
    --header-bg-light: rgba(255, 255, 255, 0.48);
    --header-bg-mobile-bottom-light: rgb(255,255,255);
    --box-shadow-general-light: rgba(30,30,30,0.10);
    --box-shadow-services-mobile-light: rgba(30, 30, 30, 0.09);
    --mobile-bottom-nav-shadow-light: 0 -3px 18px rgba(30,30,30,0.10);
    --team-card-p-text-light: #7070b5;
    --team-card-img-border-light: #232228;
    --hero-gradient-1-light: #2c3e50;
    --hero-gradient-2-light: #3498db;
    --hero-gradient-3-light: #1abc9c;
    --hero-gradient-4-light: #9b59b6; /* New violet color */

    /* Dark Theme Defaults - Revised for consistency */
    --primary-dark: #e0e0e0;
    --secondary-dark: #b0b0b0;
    --bg-dark: #12121a; /* Main very dark background */
    --text-dark: #f0f0f0;
    --accent-dark: #00e5ff;
    --white-dark: #fff;
    --header-blur-dark: 16px;
    --alt-bg-dark: #1a1a28; /* Consistent alt background, subtly lighter than main */
    --card-bg-dark: #222235; /* Consistent card background */
    --work-card-bg-dark: var(--card-bg-dark); /* Work cards use general card bg */
    --button-cta-bg-dark: #3a3a5e;
    --button-cta-text-dark: #181825; /* Dark text for contrast on bright gradient */
    --footer-text-dark: #c0c0c0;
    --footer-separator-dark: #404055;
    --input-border-dark: #404055;
    --input-focus-border-dark: var(--accent-dark);
    --input-bg-dark: #1a1a28;
    --header-bg-dark: rgba(20, 20, 30, 0.75);
    --header-bg-mobile-bottom-dark: rgb(15,15,25);
    --box-shadow-general-dark: rgba(0,0,0,0.35);
    --box-shadow-services-mobile-dark: rgba(0,0,0,0.25);
    --mobile-bottom-nav-shadow-dark: 0 -3px 12px rgba(0,0,0,0.3);
    --team-card-p-text-dark: var(--secondary-dark);
    --team-card-img-border-dark: var(--primary-dark);
    --hero-gradient-1-dark: #1a2530;
    --hero-gradient-2-dark: #2980b9;
    --hero-gradient-3-dark: #16a085;
    --hero-gradient-4-dark: #8e44ad; /* New violet color for dark mode */

    /* Current Theme Variables (default to light) */
    --primary: var(--primary-light);
    --secondary: var(--secondary-light);
    --bg: var(--bg-light);
    --text: var(--text-light);
    --accent: var(--accent-light);
    --white: var(--white-light);
    --header-blur: var(--header-blur-light);
    --alt-bg-color: var(--alt-bg-light);
    --card-bg: var(--card-bg-light);
    --work-card-bg: var(--work-card-bg-light);
    --button-cta-bg: var(--button-cta-bg-light);
    --button-cta-text: var(--button-cta-text-light);
    --footer-text: var(--footer-text-light);
    --footer-separator: var(--footer-separator-light);
    --input-border: var(--input-border-light);
    --input-focus-border: var(--input-focus-border-light);
    --input-bg: var(--input-bg-light);
    --header-bg: var(--header-bg-light);
    --header-bg-mobile-bottom: var(--header-bg-mobile-bottom-light);
    --current-box-shadow: var(--box-shadow-general-light);
    --current-box-shadow-services-mobile: var(--box-shadow-services-mobile-light);
    --mobile-bottom-nav-shadow-val: var(--mobile-bottom-nav-shadow-light);
    --team-card-p-text: var(--team-card-p-text-light);
    --team-card-img-border: var(--team-card-img-border-light);
    --hero-gradient-1: var(--hero-gradient-1-light);
    --hero-gradient-2: var(--hero-gradient-2-light);
    --hero-gradient-3: var(--hero-gradient-3-light);
    --hero-gradient-4: var(--hero-gradient-4-light);

    font-size: clamp(14px, 2vw, 22px);
}

body.dark-theme {
    --primary: var(--primary-dark);
    --secondary: var(--secondary-dark);
    --bg: var(--bg-dark);
    --text: var(--text-dark);
    --accent: var(--accent-dark);
    --white: var(--white-dark);
    --header-blur: var(--header-blur-dark);
    --alt-bg-color: var(--bg-dark);
    --card-bg: var(--card-bg-dark);
    --work-card-bg: var(--work-card-bg-dark);
    --button-cta-bg: var(--button-cta-bg-dark);
    --button-cta-text: var(--button-cta-text-dark);
    --footer-text: var(--footer-text-dark);
    --footer-separator: var(--footer-separator-dark);
    --input-border: var(--input-border-dark);
    --input-focus-border: var(--input-focus-border-dark);
    --input-bg: var(--input-bg-dark);
    --header-bg: var(--header-bg-dark);
    --header-bg-mobile-bottom: var(--header-bg-mobile-bottom-dark);
    --current-box-shadow: var(--box-shadow-general-dark);
    --current-box-shadow-services-mobile: var(--box-shadow-services-mobile-dark);
    --mobile-bottom-nav-shadow-val: var(--mobile-bottom-nav-shadow-dark);
    --team-card-p-text: var(--team-card-p-text-dark);
    --team-card-img-border: var(--team-card-img-border-dark);
    --hero-gradient-1: var(--hero-gradient-1-dark);
    --hero-gradient-2: var(--hero-gradient-2-dark);
    --hero-gradient-3: var(--hero-gradient-3-dark);
    --hero-gradient-4: var(--hero-gradient-4-dark);
}


@media (max-width: 1200px) { :root { font-size: clamp(13px, 2vw, 20px); } }
@media (max-width: 900px) { :root { font-size: clamp(12px, 3vw, 18px); } }
@media (max-width: 700px) { :root { font-size: clamp(11px, 4vw, 16px); } }
@media (max-width: 400px) { :root { font-size: clamp(10px, 5vw, 14px); } }

* { box-sizing: border-box; }
body {
    margin: 0; font-family: 'Inter', Arial, sans-serif;
    background: var(--bg); color: var(--text);
    scroll-behavior: smooth; min-height: 100vh;
    font-size: clamp(0.9rem, 2vw, 1.15rem);
    transition: background 0.3s, color 0.3s;
}

/* HEADER & NAV (Top bar: Reverted to original fixed heights) */
.header {
    position: fixed; top: 2vw; left: 50%; transform: translateX(-50%);
    width: auto; background: var(--header-bg);
    box-shadow: 0 4px 32px var(--current-box-shadow);
    border-radius: 2.8em; z-index: 1000;
    display: flex; align-items: center;
    padding: 0 2vw;
    height: clamp(50px, 7vw, 70px);
    min-height: 50px;
    max-width: 98vw;
    max-height: 96px;
    backdrop-filter: blur(var(--header-blur)); border: none;
    transition: background 0.3s, width 0.3s, height 0.3s, box-shadow 0.3s;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    overflow: hidden;
}
#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3em; /* Adjust padding as needed */
    margin-left: auto;
    flex-shrink: 0;
    display: flex; /* To center the image if needed */
    align-items: center;
    justify-content: center;
    /* Remove text color if it was set, or ensure image isn't affected by it */
    color: transparent; /* Or some other way to hide potential text overflow if any */
}

#theme-toggle-icon {
    width: clamp(20px, 2vw, 28px); /* Adjust size as needed */
    height: clamp(20px, 2vw, 28px); /* Adjust size as needed */
    object-fit: contain; /* Ensures the image scales nicely */
    display: block; /* Removes extra space below the image */
}
.logo-container {
    display: flex; align-items: center; gap: clamp(0.3em, 1vw, 0.7em);
    flex-shrink: 0; margin-right: clamp(1em, 2vw, 2vw);
}
.logo-img {
    width: clamp(24px, 2.2vw, 3.3em); height: clamp(24px, 2.2vw, 3.3em);
    min-width: 24px; min-height: 24px; object-fit: contain;
    border-radius: 0.2em; transition: all 0.3s cubic-bezier(.77,0,.18,1);
}
nav { position: relative; margin-left: 0; min-width: 0; }
.nav-list {
    list-style: none; margin: 0; display: flex; gap: clamp(0.5em, 1.5vw, 1.5vw);
    align-items: center; padding: 0; position: relative;
    width: auto; min-width: 0; max-width: 100%;
    justify-content: flex-start;
}
.nav-link {
    position: relative; text-decoration: none; color: var(--text);
    font-weight: 600; font-size: clamp(0.9em, 1.3vw, 1.1em);
    background: none; border: none; outline: none; box-shadow: none;
    padding: clamp(0.25em, 0.8vw, 0.5em) clamp(0.7em, 1.2vw, 1.2em);
    border-radius: 999px; z-index: 1000; transition: color 0.22s;
    cursor: pointer; display: inline-block; white-space: nowrap;
}
.nav-link:focus { outline: none; }
.nav-link::after {
    content: ""; display: block; position: absolute; left: 22%; right: 22%;
    bottom: 0.20em; height: clamp(2px, 0.4vw, 3px); border-radius: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.32s cubic-bezier(.77,0,.18,1), background 0.3s;
    z-index: 10; pointer-events: none;
}
.nav-link.active::after { transform: scaleX(1); }
.gradient-underline.active::after {
    left: 18%; right: 18%; height: clamp(3px, 0.7vw, 4px); border-radius: 3px;
    background: linear-gradient(90deg, #4c2802, #ff6b6b, #70e1f5);
    box-shadow: 0 0 8px 0 #ff6b6b55, 0 0 18px 0 #70e1f555;
    animation: pulse-underline-gradient 1.3s infinite alternate cubic-bezier(.77,0,.18,1);
    opacity: 1 !important; transform: scaleX(1);
}
body.dark-theme .gradient-underline.active::after {
    background: linear-gradient(90deg, #ff8c42, var(--accent), #4dd0e1);
    box-shadow: 0 0 8px 0 var(--accent)55, 0 0 18px 0 #4dd0e155;
}
@keyframes pulse-underline-gradient {
    0% { box-shadow: 0 0 8px 0 #ff6b6b44, 0 0 18px 0 #70e1f544; opacity: 1; }
    50% { box-shadow: 0 0 14px 2px #ff6b6baa, 0 0 28px 0 #70e1f588; opacity: 0.93; }
    100% { box-shadow: 0 0 20px 4px #ff6b6bcc, 0 0 32px 0 #70e1f5aa; opacity: 1; }
}
body.dark-theme @keyframes pulse-underline-gradient {
                    0% { box-shadow: 0 0 8px 0 var(--accent)44, 0 0 18px 0 #4dd0e144; opacity: 1; }
                    50% { box-shadow: 0 0 14px 2px var(--accent)aa, 0 0 28px 0 #4dd0e188; opacity: 0.93; }
                    100% { box-shadow: 0 0 20px 4px var(--accent)cc, 0 0 32px 0 #4dd0e1aa; opacity: 1; }
                }
.nav-link:not(.active):hover::after { transform: scaleX(1); opacity: 0.5; }

/* LOGO INTRO */
.logo-intro {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: var(--bg); display: flex; align-items: center; justify-content: center;
    z-index: 3000; opacity: 1; visibility: visible;
    transition: opacity 0.7s, visibility 0.7s, background 0.3s;
}
.logo-intro.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-logo-img {
    width: clamp(150px, 40vw, 340px); height: clamp(150px, 40vw, 340px);
    object-fit: contain; filter: drop-shadow(0 8px 16px rgba(30,30,30,0.15));
    animation: logo-pop 1s cubic-bezier(.77,0,.18,1);
}
body.dark-theme .intro-logo-img { filter: drop-shadow(0 8px 16px rgba(0,0,0,0.3)); }
@keyframes logo-pop {
    0% { transform: scale(0.5) rotate(-8deg); opacity: 0; }
    60% { transform: scale(1.15) rotate(6deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* HERO SECTION - SMOOTHER GRADIENT ANIMATION */
.hero {
    min-height: 100vh;
    /* Define a sequence of colors for the gradient. G1 is repeated at the end
       to ensure a seamless loop when 'alternate' is used. */
    background: linear-gradient(135deg,
    var(--hero-gradient-1),
    var(--hero-gradient-2),
    var(--hero-gradient-3),
    var(--hero-gradient-4),
    var(--hero-gradient-1) /* G1 repeated for smooth loop with alternate */
    );
    /* Make the background much larger than the viewport.
       This gives colors more space to blend and allows for wider movement. */
    background-size: 300% 300%;
    /* Slower animation, ease-in-out for smooth start/end, infinite loop,
       and alternate direction for a back-and-forth motion. */
    animation: gradualGradientBG 35s ease-in-out infinite alternate;
    color: var(--white); display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden; padding-top: clamp(60px, 10vw, 90px);
    /* transition: background 0.5s ease-out; /* Optional: for theme switch, if needed */
}

@keyframes gradualGradientBG {
    0% {
        background-position: 0% 50%; /* Start: Left-Center */
    }
    25% {
        background-position: 100% 0%; /* Move: Top-Right */
    }
    50% {
        background-position: 50% 100%; /* Move: Bottom-Center */
    }
    75% {
        background-position: 0% 100%; /* Move: Bottom-Left */
    }
    100% {
        background-position: 0% 50%; /* Return to Start: Left-Center */
    }
}

/* Il resto del tuo CSS per .hero-bg, .hero .content, etc. segue qui... */
/* ... ad esempio ... */

.hero-bg {
    position: absolute; width: 100vw; height: 100vh; top: 0; left: 0;
    background: url('https://www.transparenttextures.com/patterns/memphis-mini.png'), radial-gradient(circle at 70% 30%, var(--white) 0%, transparent 70%);
    opacity: 0.12; z-index: 0;
}
.hero .content {
    position: relative; z-index: 1; max-width: clamp(22em, 90vw, 44em);
    text-align: center; margin: 0 auto;
    padding: clamp(1em, 3vw, 2em);
}
.hero .content.visible { /* Only for container visibility if needed, children handle their own opacity */ }

.hero h1 {
    font-family: 'Inter', Arial, sans-serif; font-size: clamp(1.8em, 6vw, 3.2em);
    font-weight: 700; /* Consistent font weight */
    margin-bottom: clamp(0.7em, 2.5vw, 1.2em); letter-spacing: -0.03em;
    opacity: 0; /* Start hidden for JS animation */
}
.hero h1.animation-finished { opacity: 1; } /* After hacking animation */

.hero h1.hacking-active { /* Style during hacking animation */
    font-family: 'Inter', Arial, sans-serif; /* Ensure Inter font */
    font-weight: 700; /* Consistent with final state */
    opacity: 1 !important;
}

@media (max-width: 700px) { /* Hero mobile */
    .hero { min-height: 100vh; padding-top: clamp(50px,10vw,70px); padding-bottom: clamp(50px,15vw,80px); display: flex; align-items: center; justify-content: center;}
    .hero .content {
        padding:clamp(1.5em,5vw,3em); min-height:70vh;
        display: flex; flex-direction: column; justify-content: center; align-items: center;
        width: 90%;
    }
    .container-btn { margin-top:clamp(1em,4vw,1.5em); }
    .hero h1 { margin-bottom:clamp(1em,5vw,1.5em); }
}

/* BUTTONS */
.container-btn { display: flex; justify-content: center; margin-top: clamp(1em, 2.5vw, 1.5em); }
.button-cta {
    position: relative; background: var(--button-cta-bg);
    box-shadow: 0px 6px 16px 0px var(--current-box-shadow);
    overflow: hidden; color: var(--button-cta-text); font-weight: 700;
    border: none; border-radius: 12px;
    padding: clamp(0.6em, 1.8vw, 1em) clamp(1.5em, 5vw, 2.2em);
    font-size: clamp(1em, 2vw, 1.2em); cursor: pointer;
    transition: color 0.3s, box-shadow 0.2s, background 0.3s;
    z-index: 1; text-decoration: none; display: inline-block;
}
@media (max-width: 700px) { /* Button mobile */
    .button-cta { padding:clamp(0.8em,3vw,1.2em) clamp(2em,8vw,3em); font-size:clamp(1.1em,3vw,1.3em); }
}
.button-cta:after {
    position: absolute; content: ""; width: 100%; height: 100%; bottom: 0; left: 0;
    z-index: -1; border-radius: 12px; background-color: #8BC34A; /* Fallback */
    transition: all 0.3s ease;
    background-image: linear-gradient(to right, #70e1f5, #ffd194);
}
body.dark-theme .button-cta:after { background-image: linear-gradient(to right, var(--accent), #ffb74d); }
.button-cta:hover { color: var(--primary); }
body.dark-theme .button-cta:hover { color: #f0f0f0; } /* Lighter text on hover for dark theme button for better contrast */
.button-cta:hover:after { height: 5px; }
.button-cta:active { box-shadow: 0px 4px 8px 0px var(--current-box-shadow); }

/* SECTIONS & TITLES */
.section {
    padding: clamp(2.5em, 6vh, 7vh) clamp(1em, 4vw, 5vw);
    text-align: center; position: relative;
}
.section.alt-bg { background-color: var(--alt-bg-color); transition: background-color 0.3s; }

.section-title {
    font-size: clamp(1.1em, 5vw, 2em); font-weight: 900;
    margin-bottom: clamp(0.8em, 3vw, 1.8em); letter-spacing: -0.03em;
    color: var(--primary); max-width: 700px; margin-left: auto; margin-right: auto;
    transition: color 0.3s;
}

/* FIX FOR GRADIENT TITLE "CONTACT US" */
.gradient-title { /* Used for "Contact Us" */
    background: linear-gradient(90deg, #4c2802, #ff6b6b, #70e1f5);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; color: transparent;
    position: relative; /* Added for pseudo-element support */
    display: inline-block; /* For better text control */
    transition: background 0.3s;
    z-index: 1; /* Ensure text stays above the pseudo-element */
}

/* Add a subtle glow behind the text to improve visibility */
.gradient-title::before {
    content: attr(data-text); /* Uses the text content from data-text attribute */
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    color: rgba(255, 255, 255, 0.1); /* Very subtle white */
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    filter: blur(4px);
}

body.dark-theme .gradient-title {
    background: linear-gradient(90deg, #ffae42, #00e5ff, #ffffff); /* Brighter gradient for dark mode */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

body.dark-theme .gradient-title::before {
    color: rgba(255, 255, 255, 0.15); /* Slightly stronger for dark mode */
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    filter: blur(5px);
}

/* CARDS (General) */
.service-card, .team-card, .work-card {
    background: var(--card-bg); border-radius: clamp(0.8em,1.5vw,1.5vw);
    box-shadow: 0 0.5vh 2vw var(--current-box-shadow);
    padding: clamp(1.5em,2.5vh,2.5vh) clamp(0.8em,1.5vw,1.5vw);
    transition: transform 0.2s, box-shadow 0.3s, background 0.3s;
    display: flex; flex-direction: column; align-items: center;
    font-size: clamp(0.9em,1.8vw,1em);
}
.service-card:hover, .team-card:hover, .work-card:hover {
    transform: translateY(-0.4vh) scale(1.03);
    box-shadow: 0 1.5vh 4vw var(--current-box-shadow);
}
body.dark-theme .service-card:hover, body.dark-theme .team-card:hover, body.dark-theme .work-card:hover {
    box-shadow: 0 1.5vh 4vw rgba(0,0,0,0.4);
}

/* WORK SECTION SPECIFIC STYLING */
.services-list, .team-list { display:flex; flex-wrap:wrap; justify-content:center; gap:clamp(0.8em,2vw,2vw); }
.work-list-container {
    position: relative; overflow: hidden; padding: clamp(2em,4vh,4em) 0;
    width: 100%; max-width: 1100px; margin: 0 auto;
}
.work-list-container::before, .work-list-container::after {
    content: ""; position: absolute; top: 0; bottom: 0; width: 20%;
    z-index: 5; pointer-events: none; transition: background 0.3s;
}
.work-list-container::before { left:0; background:linear-gradient(to right, var(--alt-bg-color) 20%, transparent 100%); }
.work-list-container::after { right:0; background:linear-gradient(to left, var(--alt-bg-color) 20%, transparent 100%); }

.work-track { position:relative; width:100%; overflow:hidden; }
.work-list { display:flex; position:relative; padding:clamp(1em,2vh,2em) 0; }
.work-list-inner { display:flex; gap:clamp(1.5em,3vw,3vw); animation:slideLeftToRight 32s linear infinite; width:max-content; }
.work-list-container:hover .work-list-inner { animation-play-state:paused; }
@keyframes slideLeftToRight {0%{transform:translateX(-100%)}100%{transform:translateX(5%)}}

.work-card {
    background: var(--work-card-bg);
    flex: 0 0 auto; width: clamp(220px, 20vw, 300px);
}
.work-card img {
    width: 100%; max-width: 100%; height: clamp(120px,12vw,180px);
    object-fit: cover; border-radius: clamp(0.4em,0.8vw,0.8vw);
    transition: transform 0.3s;
}
.work-card:hover img { transform: scale(1.03); }

/* SERVICE & TEAM CARDS */
.service-card, .team-card {
    flex: 1 1 clamp(150px,16vw,350px); min-width: clamp(130px,22vw,230px);
    max-width: clamp(180px,38vw,380px); margin: clamp(0.8em,1.5vw,1.5vw) clamp(0.2em,0.4vw,0.4vw);
}
.team-card img {
    width: clamp(55px,10vw,100px); height: clamp(55px,10vw,100px);
    border-radius: 50%; margin-bottom: clamp(0.8em,1.5vh,1.5vh);
    object-fit: cover; border: 3px transparent var(--team-card-img-border);
    transition: border-color 0.3s;
}
.team-card h4 { margin:clamp(0.2em,0.6vh,0.6vh) 0 clamp(0.1em,0.3vh,0.3vh); font-size:clamp(1.05em,1.8vw,1.3em); }
.team-card p { color:var(--team-card-p-text); font-size:clamp(0.9em,1vw,1em); margin:0; transition:color 0.3s; }

/* CARD RESPONSIVENESS */
@media (max-width: 900px) { .work-card { width:clamp(180px,30vw,250px); } }
@media (max-width: 700px) { /* Mobile cards */
    .work-list-container { padding:clamp(1em,2vh,2em) 0; }
    .work-card { width:clamp(150px,60vw,200px); padding:clamp(1em,2vh,2em) clamp(0.7em,1.2vw,1.2vw); }
    .work-card img { height:clamp(90px,20vw,130px); }
    .services-list, .team-list { flex-direction:column; gap:clamp(0.8em,2.5vw,2.5vw); align-items:center; }
    .service-card, .team-card {
        min-width: clamp(80%,85%,95%); max-width: 95%;
        margin: clamp(0.8em,2vw,2vw) 0; padding: clamp(1.2em,3vw,2.2em);
        box-shadow: 0 3px 12px var(--current-box-shadow-services-mobile);
    }
}
@media (max-width: 400px) { /* Smaller mobile cards */
    .work-card { width:clamp(140px,70vw,180px); }
    .service-card, .team-card { min-width:92%; font-size:clamp(0.8em,1vw,0.9em); padding:clamp(0.7em,1.8vh,1.8vh) clamp(0.5em,0.8vw,0.8vw); }
}

/* CONTACT FORM */
.contact-form {
    background: var(--card-bg);
    padding: clamp(1.5em,4vw,2.5em);
    border-radius: clamp(0.8em,1.5vw,2vw); max-width: clamp(350px,85vw,600px);
    min-width: 320px; margin: 0 auto; display: flex; flex-direction: column;
    gap: clamp(1em,1.5em,1.5em); box-shadow: 0 0.8vh 2.5vw var(--current-box-shadow);
    font-size: clamp(1em,1.8vw,1.1em); border: 4px solid var(--accent);
    transition: box-shadow 0.3s, background-color 0.3s, border-color 0.3s;
}
.contact-form:hover { box-shadow:0 1.2vh 3vw var(--current-box-shadow); }
.contact-form input, .contact-form textarea {
    font-size: clamp(0.95em,1.8vw,1.1em); padding: clamp(0.8em,1.5vw,1.2em);
    border-radius: clamp(0.5em,0.8vw,1vw); border: 2px solid var(--input-border);
    outline: none; resize: none; width: 100%; box-sizing: border-box;
    color: var(--text); background-color: var(--input-bg);
    transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s, color 0.3s;
}
.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 1px var(--input-focus-border);
}
.contact-form textarea { min-height:clamp(6em,8vh,12vh); }
.contact-form button { margin-top:clamp(0.8em,1.5em,1.5em); }
@media (max-width:700px) { /* Mobile form */
    .contact-form { padding:clamp(2em,6vw,3em); gap:clamp(1.5em,3vw,2em); min-height:65vh; }
    .contact-form input { padding:clamp(1em,2.5vw,1.5em); margin-bottom:clamp(0.5em,1vw,0.8em); height:clamp(3.5em,8vw,4em); }
    .contact-form textarea { min-height:clamp(12em,25vh,18em); flex-grow:1; margin-bottom:clamp(1em,2vw,1.5em); }
    .contact-form button { margin-top:clamp(1.5em,3vw,2em); padding:clamp(0.8em,3vw,1.2em) clamp(2em,8vw,3em); font-size:clamp(1.1em,3vw,1.3em); }
}

/* FOOTER */
.footer {
    color: var(--footer-text); padding: clamp(1em,2em,2em) 0 clamp(0.6em,1em,1em);
    text-align: center; font-size: clamp(0.9em,1em,1em); margin-top: clamp(2vh,5vh,5vh);
    border-top: none; box-shadow: none; background: none; position: relative;
    transition: color 0.3s;
}
.footer-separator {
    width: clamp(200px,70vw,500px); max-width: 98vw; height: clamp(2px,2px,2px);
    background: var(--footer-separator); opacity: 0.88;
    margin: 0 auto clamp(0.6em,1em,1em) auto; border-radius: 3px;
    transition: background 0.3s;
}
.footer-content { display:flex; flex-direction:column; align-items:center; gap:clamp(0.2em,0.5em,0.5em); }

/* HEADER RESPONSIVENESS (Original fixed-height rules for top bar) */
@media (max-width: 1200px) { .header { max-width: 98vw; } }
@media (min-width: 600.02px) and (max-width: 900px) {
    .header .logo-img { width:clamp(18px,2vw,2.3em); height:clamp(18px,2vw,2.3em); }
    .header nav .nav-list { gap:clamp(0.2em,1vw,1vw); }
}
@media (min-width: 600.02px) and (max-width: 700px) {
    .header {
        min-width:0; left:0.5vw; transform:none; padding:0 0.8vw;
        border-radius:1.5em; height:clamp(40px,6vw,46px);
    }
    .header .logo-img { width:clamp(13px,1.5em,1.5em); height:clamp(13px,1.5em,1.5em); }
}

/* --- MOBILE NAVBAR BOTTOM, LOGO HIDDEN, ROUNDED TOP-ONLY --- */
@media (max-width: 600px) {
    body {
        padding-bottom: 50px;
    }
    .header {
        position: fixed; bottom: 0; top: auto; left: 1.12%; right: 0;
        width: 100vw;
        height: 50px;
        min-height: 0;
        max-height: none;
        border-radius: 1.2em 1.2em 0 0;
        padding: 0 0.8vw;
        box-shadow: var(--mobile-bottom-nav-shadow-val);
        display: flex;
        align-items: center;
        z-index: 1000;
        background: var(--header-bg-mobile-bottom);
        border: none;
        transform: none;
        overflow: hidden;
    }
    .header .logo-container { display: none !important; }

    .header nav {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100%;
        width: auto;
        margin: 0 auto 0 10%; /* MODIFIED: Shifted right by 10% */
    }

    .header .nav-list {
        display: flex;
        justify-content: center;
        align-items: center;
        width: auto;
        gap: clamp(1.5vw, 2vw, 2.5vw);
        flex-wrap: nowrap;
        padding: 0;
    }

    .header .nav-link {
        white-space: nowrap;
        font-size: clamp(0.8em, 2.2vw, 0.9em);
        padding: 0.3em 0.6em;
    }

    .header #theme-toggle {
        position: absolute;
        right: 0.8vw;
        top: 50%;
        transform: translateY(-50%);
        background: none; border: none; cursor: pointer; color: var(--text);
        padding: 0.3em 0.5em;
        font-size: clamp(0.9em, 2.5vw, 1.1em);
        transition: color 0.3s;
    }

    .section { padding: clamp(2em, 5vh, 6vh) clamp(0.8em, 3vw, 4vw); }
    .section-title { margin-bottom: clamp(0.6em, 2.5vw, 1.5em); }
    #services, #work, #team, #contact {
        padding-top: clamp(3em, 10vw, 4em);
        padding-bottom: clamp(3em, 10vw, 4em);
    }
    .nav-link::after { left:10%; right:10%; height:clamp(1px,0.3vw,2px); bottom:-0.4em; }
    .gradient-underline.active::after { left:10%; right:10%; height:clamp(2px,0.6vw,3px); bottom:-0.5em; }
}

@media (max-width: 400px) {
    body {
        padding-bottom: 42px;
    }
    .header {
        height: 42px;
    }
    .header #theme-toggle {
        right: 1.5vw;
        font-size: clamp(0.8em, 2vw, 1em);
    }
    .header .nav-link { font-size:0.8em; padding:0.2em 0.5em; }
    .header .nav-list { gap: 1.5vw; }

    .nav-link::after { bottom:-0.55em; }
    .gradient-underline.active::after { bottom:-0.7em; }
    .section-title { font-size:clamp(1em,4.5vw,1.8em); margin-bottom:clamp(0.5em,2vw,1.2em); }
}

/* Hero paragraph visibility (single corrected version) */
.hero p {
    font-family: 'Inter', Arial, sans-serif; font-size: clamp(1.1em, 2.5vw, 1.4em);
    margin-bottom: clamp(1.2em, 3vw, 1.8em); line-height: 1.5;
    opacity: 0;
    transition: opacity 0.8s ease-in-out 0.2s; /* Version with slight delay */
}
.hero p.fade-in-active {
    opacity: 0.95;
}

/* Fix for smooth scrolling (Corrected scroll-padding-bottom values) */
html { scroll-padding-top: 90px; }
@media (min-width: 600.02px) and (max-width: 700px) { html { scroll-padding-top: 60px; } }
@media (max-width: 600px) {
    html {
        scroll-padding-bottom: 70px;
        scroll-padding-top: 20px;
    }
}
@media (max-width: 400px) {
    html {
        scroll-padding-bottom: 62px;
    }
}
/* --- Not today Satan, I won't have this with that number --- */