:root {
    --bg-dark: #0f0f0f;
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    
    /* Brand Accents */
    --color-gold: #cba16a; /* Unified Hub Color */
    --color-archi: #5D6E5E; /* Sage from ProjektyPotrzeba */
    --color-print: #ff6b35; /* Orange from 3ddruk */
    --color-viz: #4da3ff;   /* Blue from generic tech/viz */
    
    --font-main: 'Montserrat', sans-serif;
    --font-heading: 'Cormorant Upright', serif;
    
    --transition-slow: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    --glass-tint: rgba(0, 0, 0, 0.65);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    font-family: var(--font-main);
    color: var(--text-main);
    overflow: hidden; /* Hide scrollbars for the split layout */
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* PRELOADER */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-text {
    font-family: var(--font-main);
    letter-spacing: 4px;
    font-size: 0.9rem;
    color: var(--color-gold);
    text-transform: uppercase;
}

.loader-line {
    width: 0;
    height: 1px;
    background: var(--color-gold);
    margin-top: 10px;
    animation: loadLine 1.5s ease-in-out forwards;
}

@keyframes loadLine {
    to { width: 100%; }
}

/* HEADER */
.main-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 50px;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none; /* Let clicks pass through to sections */
}

.main-header * {
    pointer-events: auto;
}

.logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    gap: 6px;
}

.logo img {
    width: 60px;
    height: auto;
}

.logo-title {
    font-family: var(--font-main);
    font-weight: 700;
    letter-spacing: 0.38rem;
    font-size: 0.95rem;
    text-transform: uppercase;
}

.header-contact a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    opacity: 0.8;
    transition: opacity 0.3s;
    text-transform: uppercase;
}

.header-contact a:hover {
    opacity: 1;
    color: var(--color-gold);
}

.header-contact {
    position: fixed;
    bottom: 40px;
    left: 40px;
    pointer-events: auto;
    z-index: 120;
}

.header-email-desktop {
    font-weight: 600;
    letter-spacing: 0.25rem;
}

/* LANG SWITCH */
.lang-switch {
    display: flex;
    gap: 15px;
    pointer-events: auto;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: auto;
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 0;
    display: flex;
    align-items: center;
}

.lang-btn svg {
    width: 100%;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.lang-btn:hover,
.lang-btn.active {
    opacity: 1;
    transform: scale(1.1);
}

/* MAIN SPLIT CONTAINER */
.split-container {
    flex: 1;
    display: flex;
    width: 100%;
    height: 100%;
}

.split-section {
    position: relative;
    flex: 1;
    height: 100%;
    border-right: none;
    overflow: hidden;
    transition: flex 0.5s ease;
    cursor: default; /* Changed from pointer since whole section isn't a link */
    display: flex;
    align-items: center;
    justify-content: center;
}

.split-section:last-child {
    border-right: none;
}

/* VIDEO BACKGROUND */
.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.video-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8; 
    transition: opacity 1s ease, transform 6s ease;
    filter: contrast(1.1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--glass-tint);
    transition: background 0.5s ease;
    z-index: 2;
    pointer-events: none;
}

/* CONTENT */
.content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 40px;
    max-width: 500px;
    transform: translateY(0);
    transition: transform var(--transition-slow);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.domain-badge {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    margin-bottom: 20px;
    text-transform: lowercase;
    transition: all 0.5s ease;
}

h2 {
    font-family: var(--font-main);
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    font-weight: 300;
    margin-bottom: 0; /* Removed initial margin */
    color: var(--text-main);
    line-height: 1.1;
    transition: margin-bottom 0.5s ease; /* Animate margin */
    white-space: nowrap;
    text-align: center;
}

.split-section:hover h2 {
    margin-bottom: 20px; /* Restore margin on hover */
}

p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ffffff;
    font-weight: 500;
    text-shadow: 0 2px 15px rgba(0,0,0,0.9);
    margin-bottom: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
    max-height: 0; /* Hide initially to save space */
    overflow: hidden;
}

.btn-explore {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--text-main);
    border: 0 solid rgba(255,255,255,0.2); /* Border width 0 initially */
    padding: 0 24px; /* Collapse vertical padding */
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    text-decoration: none;
    cursor: pointer;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.btn-group .btn-explore {
    /* Remove fixed padding to allow collapsing */
    min-width: 140px;
    justify-content: center;
}

/* HOVER & TOUCH STATES */
.split-section:hover,
.split-section.active-touch {
    flex: 1.5; /* Expand slightly */
}

.split-section:hover .video-bg video,
.split-section.active-touch .video-bg video {
    opacity: 1;
    transform: scale(1.05);
    filter: grayscale(0%) contrast(1); /* Colorize on hover */
}

.split-section:hover .overlay,
.split-section.active-touch .overlay {
    background: rgba(0, 0, 0, 0); /* Completely clear on hover */
}

.split-section:hover .content,
.split-section.active-touch .content {
    transform: translateY(0);
}

.split-section:hover .domain-badge,
.split-section.active-touch .domain-badge {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-gold);
    color: #fff;
}

.split-section:hover p {
    opacity: 1;
    transform: translateY(0);
    max-height: 150px; /* Reveal text - increased height for German */
    margin-bottom: 30px;
}

.split-section:hover .btn-explore {
    opacity: 1;
    transform: translateY(0);
    border-width: 1px; /* Restore border */
    padding: 12px 24px; /* Restore padding */
    max-height: 60px; /* Restore height */
    border-color: var(--color-gold);
    background: rgba(203, 161, 106, 0.1);
}

.split-section:hover .btn-explore:hover {
    background: var(--color-gold);
    color: #000;
    border-color: var(--color-gold);
}

/* Specific Brand Colors on Hover */
#sec-archi:hover .domain-badge { 
    color: #fff; 
    border-color: var(--color-archi); 
    background: rgba(93, 110, 94, 0.4); 
    box-shadow: 0 0 15px rgba(93, 110, 94, 0.3);
}
#sec-archi:hover .btn-explore { border-color: var(--color-archi); background: rgba(93, 110, 94, 0.1); color: #fff; }
#sec-archi:hover .btn-explore:hover { background: var(--color-archi); color: #fff; }

#sec-print:hover .domain-badge { 
    color: #fff; 
    border-color: var(--color-print); 
    background: rgba(255, 107, 53, 0.4); 
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
}
#sec-print:hover .btn-explore { border-color: var(--color-print); background: rgba(255, 107, 53, 0.1); color: #fff; }
#sec-print:hover .btn-explore:hover { background: var(--color-print); color: #fff; }

#sec-viz:hover .domain-badge { 
    color: #fff; 
    border-color: var(--color-viz); 
    background: rgba(77, 163, 255, 0.4); 
    box-shadow: 0 0 15px rgba(77, 163, 255, 0.3);
}
#sec-viz:hover .btn-explore { border-color: var(--color-viz); background: rgba(77, 163, 255, 0.1); color: #fff; }
#sec-viz:hover .btn-explore:hover { background: var(--color-viz); color: #fff; }


/* FOOTER */
.main-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 50px;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    pointer-events: none;
}

.footer-email-mobile {
    display: none;
}

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

.main-footer a {
    color: inherit;
    text-decoration: none;
    pointer-events: auto;
    transition: color 0.3s;
}

.main-footer a:hover {
    color: var(--color-gold);
}

.separator { margin: 0 10px; }

/* INTERACTION HINT HAND */
.interaction-hint {
    position: absolute;
    top: 20%; /* Moved even higher to avoid overlapping with text */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 50;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.interaction-hint svg {
    width: 48px; /* Slightly larger */
    height: 48px;
    color: var(--color-gold);
    filter: drop-shadow(0 0 15px rgba(0,0,0,0.6));
    animation: handPoint 1.5s ease-in-out infinite;
}

.interaction-hint span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0,0,0,1);
}

.floating-socials {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 130;
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    background: var(--glass-tint);
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

.social-icon:hover {
    background: var(--color-gold);
    color: #000;
    border-color: var(--color-gold);
    transform: translateY(-2px);
}

@keyframes handPoint {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.1); }
}

/* Hide hint ONLY when specific section is hovered */
.split-section:hover .interaction-hint {
    opacity: 0;
    transform: translate(-50%, 20px);
}

/* RESPONSIVE */
@media (max-width: 900px) {
    body, html {
        overflow: hidden !important;
        height: 100dvh;
        position: fixed;
        width: 100%;
    }

    .main-header {
        padding: 20px 20px;
        justify-content: center; /* Center lang switch since logo is gone */
    }

    .logo {
        display: none;
    }
    
    .header-contact {
        display: none;
    }

    .logo img {
        width: 46px;
    }

    .logo-title {
        font-size: 0.75rem;
        letter-spacing: 0.25rem;
    }
    
    .lang-switch {
        gap: 10px;
    }
    
    .lang-btn {
        width: 24px;
    }

    .footer-email-mobile {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .interaction-hint {
        top: auto;
        bottom: 15px;
        left: auto;
        right: 15px;
        transform: none;
        flex-direction: row;
        opacity: 0.7;
    }

    .interaction-hint svg {
        width: 32px;
        height: 32px;
        filter: drop-shadow(0 0 5px rgba(0,0,0,0.8));
    }
    
    .interaction-hint span {
        display: none; 
    }

    .floating-socials {
        display: none;
    }

    .split-container {
        flex-direction: column;
        height: 100dvh;
        overflow: hidden;
    }
    
    .split-section {
        flex: 1; /* Force exactly 1/3 height */
        border-right: none;
        border-bottom: none;
        cursor: default;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 33.333%;
        overflow: hidden;
    }

    .content {
        padding: 15px;
    }

    h2 {
        font-size: clamp(1rem, 5vw, 2rem);
        margin-bottom: 10px;
        white-space: nowrap;
    }

    .domain-badge {
        padding: 4px 12px;
        font-size: 0.7rem;
        margin-bottom: 10px;
    }

    p {
        font-size: 0.9rem;
        margin-bottom: 0;
        max-height: 0;
    }
    
    .btn-group {
        gap: 8px;
    }
    
    .btn-group .btn-explore {
        min-width: 100px;
        padding: 0 15px; /* Collapsed vertical padding */
        font-size: 0.7rem;
    }

    /* Mobile Interaction States */
    .split-section:hover p,
    .split-section.active-touch p {
        margin-bottom: 15px;
        max-height: 120px;
    }

    .split-section:hover .btn-explore,
    .split-section.active-touch .btn-explore {
        padding: 10px 15px;
        max-height: 60px;
        border-width: 1px;
    }

    .video-bg video {
        opacity: 0.8; 
    }
}
