/* 1. RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding: 0 8%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 2. LANGUAGE LOGIC */
.lang.en { display: none; }
body.en-active .lang.de { display: none; }
body.en-active .lang.en { display: block; }
body.en-active a.lang.en { display: inline-block; }

/* 3. HEADER & NAVIGATION */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 80px 0 40px 0;
    border-bottom: 1px solid #5D768E;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1;
}

nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links { display: flex; gap: 30px; }
.nav-links a {
    text-decoration: none;
    color: #1a1a1a;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: opacity 0.3s;
}
.nav-links a:hover { opacity: 0.5; }

.lang-switch button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 5px;
    font-weight: 700;
    color: #ccc;
    transition: color 0.3s;
}
.lang-switch button.active { color: #5D768E; }
.separator { color: #5D768E; margin: 0 4px; font-weight: 900; }

.logo-track {
    display: inline-flex;
    align-items: center;
    gap: 70px;
    animation: scroll 40s linear infinite;
    /* Forces GPU rendering for smoother movement on mobile */
    will-change: transform;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

.client-logo {
    height: 45px;
    /* Prevents the browser from shrinking logos to fit the screen */
    flex-shrink: 0; 
    filter: grayscale(1) opacity(0.7);
    transition: all 0.4s;
}

@media (max-width: 600px) {
    .logo-track {
        gap: 40px; /* Closer together on small screens */
    }
    .client-logo {
        height: 35px; /* Slightly smaller for mobile viewports */
    }
}

/* 4. MAIN LAYOUT */
main {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

/* 5. HERO SECTION */
.hero { padding: 100px 0 60px 0; }
.hero-container { display: flex; align-items: center; justify-content: space-between; gap: 60px; }
.hero-text { flex: 1.2; }
.hero-image { flex: 0.8; display: flex; justify-content: flex-end; }
.hero-image img { width: 100%; max-width: 400px; height: auto; }

h1 { font-size: 3rem; font-weight: 700; line-height: 1.1; margin-bottom: 30px; letter-spacing: -0.02em; }
h1 .accent { color: #5D768E; font-weight: 400; margin: 0 5px; }
.intro { font-size: 1.4rem; color: #444; }

/* 6. LOGO CAROUSEL */
.logo-carousel { overflow: hidden; padding: 30px 0; white-space: nowrap; border-bottom: 1px solid #5D768E; }
.logo-track { display: inline-flex; align-items: center; gap: 70px; animation: scroll 50s linear infinite; }
.client-logo { height: 45px; filter: grayscale(1) opacity(0.7); transition: all 0.4s; }
.client-logo:hover { filter: grayscale(0) opacity(1); transform: scale(1.05); }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* 7. SERVICES & PORTFOLIO */
.services, .portfolio { padding: 100px 0; border-top: 1px solid #5D768E; }

/* Updated Section Headings */
h2 { 
    font-size: 2.2rem; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    margin-bottom: 50px; 
    color: #1a1a1a; 
    font-weight: 700; 
}

.service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 80px; }
.service-grid ul { list-style: none; }
.service-grid li { font-size: 1.1rem; padding: 14px 0; border-bottom: 1px solid #f9f9f9; }

.portfolio-request p { font-size: 1.25rem; margin-bottom: 35px; color: #444; }

/* Shared Button Components */
.button-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 20px 0;
}

.portfolio-btn {
    display: inline-block; 
    padding: 14px 30px; 
    border: 1px solid #5D768E; 
    color: #1a1a1a; 
    text-decoration: none; 
    text-transform: uppercase;
    font-size: 0.8rem; 
    font-weight: 700; 
    letter-spacing: 0.15em; 
    transition: all 0.3s;
}
.portfolio-btn:hover { background-color: #5D768E; color: #ffffff; }

/* Micro-text Right-click hint */
.btn-hint {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #5D768E;
    font-size: 0.75rem; 
    font-weight: 400;
    line-height: 1;
    margin-top: 12px; 
    opacity: 0.8;
    transform: scale(0.6); 
    transform-origin: left center;
    white-space: nowrap;
}

.btn-hint.en { display: none; }
body.en-active .btn-hint.de { display: none; }
body.en-active .btn-hint.en { display: block; }

/* 8. CONTACT SECTION */
.contact { padding: 100px 0; border-top: 1px solid #5D768E; }
.email-chain { 
    font-family: monospace; 
    color: #1a1a1a; 
    font-size: 1.4rem; 
    margin-bottom: 30px; 
    line-height: 1.4; 
    white-space: nowrap; 
}

.contact-message { font-size: 1.25rem; line-height: 1.4; margin-bottom: 20px; color: #444; }
.contact-meta { font-size: 1.1rem; color: #444; margin-top: 15px; }

/* 9. LEGAL PAGE SPECIFIC */
.legal-content { max-width: 800px; margin: 60px auto; flex: 1; }
.legal-section { margin-bottom: 80px; }
.legal-section h1 { font-size: 2.2rem; margin-bottom: 40px; border-left: 4px solid #5D768E; padding-left: 20px; }
.legal-section h2 { color: #1a1a1a; margin: 40px 0 15px 0; font-size: 1.5rem; border: none; padding: 0; }
.table-container { width: 100%; overflow-x: auto; margin: 30px 0; }
.legal-table { width: 100%; min-width: 500px; border-collapse: collapse; font-size: 0.9rem; }
.legal-table th { background-color: #f9f9f9; padding: 15px; border-bottom: 2px solid #5D768E; }
.legal-table td { padding: 15px; border-bottom: 1px solid #eee; color: #666; }

/* 10. FOOTER & BACK TO TOP */
footer { 
    padding: 60px 0; 
    border-top: 1px solid #5D768E; 
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

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

.footer-left { display: flex; flex-direction: column; gap: 10px; }
.footer-left p { font-size: 0.8rem; color: #999; }
.legal-nav a { color: #999; text-decoration: none; font-size: 0.8rem; transition: color 0.3s; }
.legal-nav a:hover { color: #1a1a1a; }

#backToTop {
    background-color: #ffffff;
    cursor: pointer;
    display: inline-block;
    padding: 14px 30px;
    border: 1px solid #5D768E; 
    color: #1a1a1a;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    transition: all 0.3s;
    font-family: inherit;
}
#backToTop:hover { background-color: #5D768E; color: #ffffff; }

/* 11. RESPONSIVE */
@media (max-width: 900px) {
    body { padding: 0 5%; }
    header { flex-direction: column; gap: 20px; padding: 40px 0; align-items: flex-start; }
    nav { width: 100%; justify-content: space-between; }
    .hero-container { flex-direction: column-reverse; }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; margin-bottom: 30px; }
    .service-grid { grid-template-columns: 1fr; }
    .email-chain { white-space: normal; }
    .footer-container { flex-direction: column; align-items: flex-start; gap: 30px; }
}