:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --accent-color: #f39e05; /* Updated orange color */
    --font-main: 'Outfit', sans-serif;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Hide default cursor */
}

h1, h2, h3, h4, h5, h6 {
    color: var(--accent-color) !important;
}

/* Utility class to prevent CSS transitions from fighting GSAP animations */
.no-transition {
    transition: none !important;
}
html {
    scroll-behavior: smooth;
}

body {
    background-color: #121212; /* Anthracite */
    color: var(--text-color);
    font-family: var(--font-main);
    width: 100vw;
    line-height: 1.6;
    cursor: none; /* Hide default cursor */
    overflow-x: hidden;
}

/* --- Dynamic Background (Removed) --- */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Custom Cursor */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.cursor-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--text-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor-outline {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: width 0.3s, height 0.3s, border-color 0.3s;
}

.cursor.hovering .cursor-dot {
    width: 0;
    height: 0;
}

.cursor.hovering .cursor-outline {
    width: 70px;
    height: 70px;
    border-color: var(--accent-color);
    background-color: rgba(243, 158, 5, 0.15); /* Accent color with opacity */
    backdrop-filter: blur(3px);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 40px 80px;
    display: flex;
    justify-content: center; /* Center the menu on the page */
    align-items: center;
    z-index: 100;
    transition: all 0.4s ease;
}

.header.scrolled {
    padding: 20px 80px;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.slide-logo {
    position: absolute;
    top: 60px; /* Moved slightly further down */
    right: 80px;
    height: 95px; /* 30% smaller than 135px */
    width: auto;
    z-index: 10;
}

.nav {
    display: flex;
    gap: 40px;
}

.nav a {
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.nav a.nav-jobs {
    color: var(--accent-color) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav a:hover::after {
    width: 100%;
}

/* Hero Slider (Timed Cards Opening) */
.hero-slider {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 10;
}

.slider-bgs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slider-bg-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.05); /* Will zoom out */
}

.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 100%);
    z-index: 2;
    pointer-events: none;
}

.slider-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 80px;
    z-index: 3;
    pointer-events: none; /* Let clicks pass to cards unless on btn */
}

.slider-content .content-block {
    max-width: 800px;
    margin-top: 50px;
    pointer-events: auto;
}

.slider-content .description {
    max-width: 550px; /* Prevent overlapping with thumbnails on laptops */
}

.slider-cards {
    position: absolute;
    bottom: 80px;
    right: 80px;
    display: flex;
    gap: 20px;
    z-index: 4;
}

.timed-card {
    position: relative;
    width: 220px;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    cursor: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background-size: cover;
    background-position: center;
}

.timed-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0; top: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
}

.timed-card-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 2;
    color: #fff;
}

.timed-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.card-progress-bg {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
}

.card-progress-fill {
    width: 0%;
    height: 100%;
    background: var(--accent-color);
}


.slide-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 80px;
    z-index: 2;
}

.content-block {
    max-width: 650px;
}

.headline {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: -1px;
    display: flex;
    flex-direction: column;
}

.line-wrap {
    overflow: hidden;
    display: block;
    padding-bottom: 10px;
    margin-bottom: -10px;
    padding-top: 10px;
    margin-top: -10px;
}

.line {
    display: block;
}

.description {
    font-size: 1.15rem;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.85);
}

.btn {
    display: inline-block;
    padding: 16px 45px;
    border: 1px solid var(--accent-color);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: color 0.3s;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    transform: translateX(-101%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: -1;
}

.btn:hover {
    color: var(--bg-color);
}

.btn:hover::before {
    transform: translateX(0);
}



/* --- Leistungen Section --- */
.services-section {
    padding: 120px 80px 200px; /* Increased bottom padding for more distance to footer */
    background-color: transparent; /* Changed from var(--bg-color) to show dynamic bg */
    position: relative;
    z-index: 5;
    overflow: hidden; /* Hide watermark overflow */
}

/* Watermarks behind Leistungen */
.services-watermarks {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; /* Behind the services container */
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
}

.services-watermark-logo {
    max-width: 40vw;
    max-height: 80vh;
    opacity: 0.05; /* Subtle watermark */
    filter: invert(1);
    mix-blend-mode: screen;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 60px;
    text-transform: uppercase;
    color: var(--text-color);
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.service-card {
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
    display: flex;
    flex-direction: column;
    /* Glassmorphism */
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    border-color: rgba(243, 158, 5, 0.4); /* subtle orange border on hover */
}

.service-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-img img {
    transform: scale(1.05);
}

.service-info {
    padding: 30px;
    flex-grow: 1;
}

.service-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.service-info p {
    font-weight: 300;
    line-height: 1.5;
    color: rgba(255,255,255,0.7);
}

/* --- Footer --- */
.footer {
    background-color: rgba(5, 5, 5, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 80px 80px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-logo {
    height: 60px;
    margin-bottom: 20px;
}

.footer-col h4 {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.footer-col p {
    color: rgba(255,255,255,0.6);
    line-height: 1.8;
    font-weight: 300;
}

.footer-col a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--accent-color);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
    font-weight: 300;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .slide-content h1 {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    /* Hide custom cursor on mobile */
    .cursor-dot, .cursor-outline {
        display: none !important;
    }
    
    /* Show default cursor on mobile */
    body {
        cursor: auto;
    }

    .header {
        padding: 20px;
    }

    .slide-logo {
        top: 20px;
        right: 20px;
        height: 80px; /* Larger on mobile too */
    }

    .nav {
        display: none; /* In a real app, implement a burger menu here */
    }

    .slide-content {
        padding: 20px;
        left: 20px;
    }

    .slide-content h1 {
        font-size: 2.5rem;
    }

    .slide-content .description {
        font-size: 1rem;
        max-width: 100%;
    }

    .slider-controls {
        bottom: 30px;
        right: 20px;
    }

    .next-preview {
        padding: 10px 15px;
        max-width: 200px;
    }

    #previewImg {
        width: 40px;
        height: 40px;
    }

    #previewTitle {
        font-size: 0.8rem;
    }

    .services-section {
        padding: 60px 20px 100px;
    }

    .section-title {
        font-size: 2rem;
    }

    .footer {
        padding: 60px 20px 20px;
    }

    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
}

/* Glowing Orange Button */
.btn-glowing-orange {
    display: inline-block;
    padding: 16px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    background: var(--accent-color);
    border-radius: 30px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.4), 0 0 40px rgba(255, 107, 0, 0.2);
    animation: glow-pulse 2s infinite alternate;
}

@keyframes glow-pulse {
    0% {
        box-shadow: 0 0 15px rgba(255, 107, 0, 0.5), 0 0 30px rgba(255, 107, 0, 0.3);
    }
    100% {
        box-shadow: 0 0 25px rgba(255, 107, 0, 0.8), 0 0 50px rgba(255, 107, 0, 0.5);
    }
}

.btn-glowing-orange::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    z-index: -1;
    transition: transform 0.6s ease;
}

.btn-glowing-orange:hover {
    transform: scale(1.05);
    background: #ff7d1a;
}

.btn-glowing-orange:hover::before {
    transform: translateX(100%);
}

/* --- Service Popup Modal --- */
.service-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000; /* Increased to cover the header (z-index 1000/1001) */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.service-popup-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.service-popup-modal {
    position: absolute;
    width: 90vw;
    max-width: 800px;
    height: 80vh;
    max-height: 800px;
    background: rgba(20, 20, 20, 0.95);
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(255, 107, 0, 0.5), 0 0 60px rgba(255, 107, 0, 0.2);
    border: 1px solid rgba(255, 107, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* initial state for zoom out handled by JS */
    transform: scale(0.8);
    opacity: 0;
}

.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    line-height: 1;
    z-index: 10;
}

.popup-content {
    padding: 40px;
    overflow-y: auto;
    height: 100%;
    margin-top: 20px; /* Space for close button */
}

.popup-content h3 {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.popup-slider {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.popup-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.popup-slider-img {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    transform: translateY(-50%);
    pointer-events: none;
}

.popup-nav-btn {
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    backdrop-filter: blur(5px);
    pointer-events: auto;
}

.popup-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .popup-content {
        padding: 15px;
        margin-top: 40px; /* Space for close button */
    }
    .popup-close {
        position: fixed; /* Attach to screen, not modal */
        top: 15px;
        right: 15px;
        font-size: 2.5rem;
        z-index: 999999; /* Absolute highest */
        background: rgba(255, 107, 0, 0.9); /* Brand color to make it obvious */
        width: 45px;
        height: 45px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: 0 4px 15px rgba(0,0,0,0.8);
        border: 2px solid #fff;
    }
    .service-popup-modal {
        width: 95vw;
        height: 90vh;
    }
    .popup-slider {
        height: 200px;
    }
    .popup-content h3 {
        font-size: 2rem;
    }
}

/* --- Mobile Navigation & Hamburger --- */
.mobile-logo-link {
    display: none;
    z-index: 1001;
    position: relative;
}

.mobile-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: none; /* because we have custom cursor, but on mobile it's touch */
    z-index: 1001;
    position: relative;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {
    .header {
        padding: 20px 30px;
        justify-content: space-between;
    }
    
    .header.scrolled {
        padding: 15px 30px;
    }
    
    .mobile-logo-link {
        display: block;
        z-index: 1001;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100vw;
        height: 100vh;
        background: rgba(5, 5, 5, 0.98); /* Less transparent to ensure no bleed */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: flex !important; /* Force flex */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }
    
    .nav.nav-open {
        right: 0;
    }
    
    .nav a {
        font-size: 2rem !important; /* Force size */
        opacity: 1 !important; /* Override GSAP if needed */
        visibility: visible !important;
        text-align: center;
        width: 100%;
    }
    
    .slide-logo {
        display: none; /* Hide logo on mobile hero to save space */
    }
    
    .slider-content {
        padding: 0 20px !important;
        align-items: flex-start !important; /* Push text to top */
        padding-top: 15vh !important;
    }
    
    .slider-content .content-block {
        margin-top: 0 !important;
        max-width: 100%;
    }
    
    .headline {
        font-size: 2.8rem; /* Even smaller headline on mobile to fit */
        line-height: 1.1;
    }
    
    .hero-btn {
        margin-top: 20px;
    }
    
    .slider-cards {
        display: none !important; /* Hide preview cards on mobile to prevent overlap */
    }
    
    .slider-content {
        padding: 0 20px !important;
        align-items: center !important; /* Center text vertically */
        justify-content: center !important;
        padding-top: 0 !important;
    }
    
    .slider-content .content-block {
        margin-top: 0 !important;
        max-width: 100%;
        text-align: center;
    }
    
    .headline {
        font-size: 2.2rem; /* Reduced by 20% to prevent cutoff */
        line-height: 1.2;
    }
    
    .hero-btn {
        margin-top: 30px;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .services-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-slider {
        padding: 0; /* Removing side padding to use width 100vw */
    }
}

