/* 
   HEADER STYLES - Navigation, mobile menu, cursor
   Loading: Always (all pages)
*/

/* --- ENGINE STYLES --- */
#stage-liquid-system {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

#echo-text-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
    z-index: 0;
}

.echo-word {
    position: absolute;
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.6;
    white-space: nowrap;
    font-weight: 700;
    mix-blend-mode: color-dodge;
}

.echo-word.large {
    font-family: var(--font-head);
    font-size: 6vh;
    opacity: 0.12;
    color: #fff;
    mix-blend-mode: overlay;
    z-index: -1;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.global-grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    z-index: -1;
    pointer-events: none;
}

/* --- NAVIGATION --- */
.brand-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 90px;
    padding: 0 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    background: transparent;
    pointer-events: none;
}

.brand-nav * {
    pointer-events: auto;
}

.logo-link {
    display: block;
    height: 28px;
    flex-shrink: 0;
    transition: transform 0.3s;
}



.logo-image {
    height: 100%;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
}

.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    color: #E8E0D5;
    transition: opacity 0.3s ease;
    position: relative;
    opacity: 0.7;
    text-shadow:
        0 0 3px rgba(0, 0, 0, 0.9),
        0 0 6px rgba(0, 0, 0, 0.7),
        0 0 10px rgba(0, 0, 0, 0.5),
        0 1px 2px rgba(0, 0, 0, 1);
}

.nav-link:hover,
.nav-link.active-page {
    opacity: 1;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: #E8E0D5;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active-page::after {
    width: 100%;
}

.nav-dot {
    font-size: 8px;
    opacity: 0.5;
}

/* --- CTA BUTTON --- */
.cta-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: 50px;
    border: 1px solid #E8E0D5;
    color: #E8E0D5;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
}

.cta-button:hover {
    background-color: #C67B5C;
    border-color: #C67B5C;
}

.cta-button:hover .cta-text {
    color: #1C222E;
}

.cta-text {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- PAGE TRANSITION --- */
.page-transition-curtain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s;
}

.loader-logo {
    width: 190px;
    height: auto;
    filter: brightness(0) invert(1);
    animation: breathe 3s ease-in-out infinite;
}

.soundwave {
    display: flex;
    gap: 6px;
    align-items: center;
    height: 30px;
    margin-top: 20px;
}

.soundwave span {
    display: block;
    width: 3px;
    height: 100%;
    background-color: var(--accent);
    border-radius: 4px;
    animation: wave 1s ease-in-out infinite;
}

.soundwave span:nth-child(1) {
    animation-delay: 0.0s;
}

.soundwave span:nth-child(2) {
    animation-delay: 0.1s;
}

.soundwave span:nth-child(3) {
    animation-delay: 0.2s;
}

.soundwave span:nth-child(4) {
    animation-delay: 0.3s;
}

.soundwave span:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes wave {

    0%,
    100% {
        height: 20%;
        opacity: 0.5;
    }

    50% {
        height: 100%;
        opacity: 1;
    }
}

@keyframes breathe {

    0%,
    100% {
        opacity: 0.9;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* --- MOBILE MENU --- */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(160deg, #1C222E 0%, #0F1115 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 8vw 100px;
    clip-path: circle(0% at calc(100% - 40px) 40px);
    transition: clip-path 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}



.mobile-menu-overlay.active {
    clip-path: circle(150% at calc(100% - 40px) 40px);
}

.mobile-links {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-link {
    font-family: var(--font-head);
    font-size: clamp(2.5rem, 12vw, 4rem);
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 20px 0;
    line-height: 1;
    opacity: 0;
    transform: translateX(-40px);
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
    border-bottom: 1px solid rgba(232, 224, 213, 0.08);
}

.mobile-link:first-child {
    border-top: 1px solid rgba(232, 224, 213, 0.08);
}

/* Hover underline effect */
.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--secondary));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-link:hover::after,
.mobile-link:focus::after {
    width: 100%;
}

.mobile-link:hover,
.mobile-link:focus {
    color: var(--accent);
    transform: translateX(10px);
}

.num {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--accent);
    opacity: 0.6;
    letter-spacing: 0.05em;
    transition: opacity 0.3s ease;
}

.mobile-link:hover .num {
    opacity: 1;
}

.mobile-footer {
    position: absolute;
    bottom: 40px;
    left: 8vw;
    right: 8vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: rgba(232, 224, 213, 0.4);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
    padding-top: 20px;
    border-top: 1px solid rgba(232, 224, 213, 0.06);
}

.mobile-menu-overlay.active .mobile-footer {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered link animations */
.mobile-menu-overlay.active .mobile-link {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu-overlay.active .mobile-link:nth-child(1) {
    transition: opacity 0.4s ease 0.05s, transform 0.4s ease 0.05s, color 0.3s ease;
}

.mobile-menu-overlay.active .mobile-link:nth-child(2) {
    transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s, color 0.3s ease;
}

.mobile-menu-overlay.active .mobile-link:nth-child(3) {
    transition: opacity 0.4s ease 0.15s, transform 0.4s ease 0.15s, color 0.3s ease;
}

.mobile-menu-overlay.active .mobile-link:nth-child(4) {
    transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s, color 0.3s ease;
}

.mobile-menu-trigger {
    cursor: pointer;
    width: 30px;
    display: none;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
    pointer-events: auto;
}

.mobile-only {
    display: none;
}

.line {
    height: 2px;
    background-color: #E8E0D5;
    transition: all 0.3s ease;
}

.l1 {
    width: 100%;
}

.l2 {
    width: 60%;
}

.mobile-menu-trigger.active .l1 {
    transform: rotate(45deg) translate(5px, 6px);
}

.mobile-menu-trigger.active .l2 {
    width: 100%;
    transform: rotate(-45deg) translate(0px, -1px);
}

/* --- FLOATING CONTACT BUTTON --- */
.floating-contact {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: none;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: var(--accent);
    color: #1C222E;
    border-radius: 50px;
    text-decoration: none;
    font-family: var(--font-head);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 20px rgba(198, 123, 92, 0.4);
    transition: all 0.3s ease;
}

.floating-contact svg {
    width: 20px;
    height: 20px;
}

.floating-contact:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(198, 123, 92, 0.5);
}

.floating-contact-text {
    display: inline;
}

/* Hide floating contact on contact page - it's redundant */
.page-kontakt .floating-contact,
body.page-template-page-kontakt .floating-contact,
body.page-id-kontakt .floating-contact {
    display: none !important;
}

/* --- CUSTOM CURSOR --- */
.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    opacity: 0.6;
    position: fixed;
    border-radius: 50%;
    z-index: 20002;
    pointer-events: none;
    display: none;
    transform: translate(-50%, -50%);
}

.cursor-outline {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(232, 224, 213, 0.3);
    position: fixed;
    border-radius: 50%;
    z-index: 20001;
    pointer-events: none;
    transition: width 0.2s, height 0.2s;
    display: none;
    transform: translate(-50%, -50%);
}

@media (pointer: fine) {

    .cursor-dot,
    .cursor-outline {
        display: block;
    }
}

body.hover-active .cursor-outline {
    width: 64px;
    height: 64px;
    background-color: rgba(198, 123, 92, 0.06);
    border-color: var(--accent);
    mix-blend-mode: exclusion;
}

/* --- RESPONSIVE HEADER --- */
@media (max-width: 1024px) {
    .nav-center.desktop-only {
        display: none;
    }

    .mobile-only {
        display: flex;
    }

    .cta-button {
        display: none;
    }

    .brand-nav {
        padding: 0 20px;
        height: 80px;
    }

    html,
    body,
    a,
    button {
        cursor: auto !important;
    }

    #canvas-container {
        background-color: var(--bg-color);
    }

    .hidden-html-layer {
        display: none;
    }

    #echo-text-layer {
        display: none;
    }
}

@media (max-width: 768px) {
    .floating-contact {
        display: flex;
        padding: 15px;
        bottom: 20px;
        right: 20px;
    }

    .floating-contact-text {
        display: none;
    }

    .floating-contact svg {
        width: 24px;
        height: 24px;
    }
}