/* ============================================
   COMPONENTS - Shared across all pages
   Nav, Footer, Cursor, Loader, Noise, Hamburger
   ============================================ */

/* Custom Cursor */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--acid);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.1s ease, width 0.2s, height 0.2s;
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--acid);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10001;
}

.cursor.hover {
    width: 60px;
    height: 60px;
    border-color: var(--honey);
}

/* Noise Texture Overlay */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Loading Screen */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.8s ease, visibility 0.8s;
}

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

.loader-text {
    font-family: var(--font-display);
    font-size: clamp(3rem, 15vw, 12rem);
    color: var(--acid);
    animation: glitch 0.5s infinite;
    letter-spacing: -0.02em;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

/* Page Transition (inner pages) */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: var(--acid);
    transform: scaleY(1);
    transform-origin: top;
    pointer-events: none;
}

.page-transition.is-active {
    animation: transitionReveal 0.8s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes transitionReveal {
    0% {
        transform: scaleY(1);
    }
    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    color: var(--white);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--white);
    text-decoration: none;
    position: relative;
}

.nav-links a::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    color: var(--acid);
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    transition: clip-path 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.nav-links a:hover::before,
.nav-links a.active::before {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* Hamburger Menu Button */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 200;
    position: relative;
}

.hamburger-line {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--white);
    margin: 6px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Footer */
footer {
    padding: 8rem 4rem 3rem;
    background: var(--acid);
    color: var(--black);
    position: relative;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 6rem;
}

.footer-brand h2 {
    font-family: var(--font-display);
    font-size: 5rem;
    line-height: 0.9;
    margin-bottom: 1rem;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    opacity: 0.7;
    max-width: 300px;
}

.footer-col h4 {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.footer-col a {
    display: block;
    color: var(--black);
    text-decoration: none;
    font-size: 1rem;
    padding: 0.4rem 0;
    transition: transform 0.3s ease;
}

.footer-col a:hover {
    transform: translateX(10px);
}

.social-row {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    width: 50px;
    height: 50px;
    background: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--acid);
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: rotate(-5deg) scale(1.1);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 2px solid var(--black);
}

.footer-bottom p {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

.footer-credit {
    opacity: 0.7;
}

.footer-credit a {
    color: var(--black);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.3s ease;
}

.footer-credit a:hover {
    opacity: 0.6;
}

/* Floating Background Elements */
.float-element {
    position: fixed;
    pointer-events: none;
    z-index: 50;
    font-family: var(--font-display);
    color: rgba(205, 255, 0, 0.1);
    font-size: 15rem;
    animation: float 20s ease infinite;
}

.float-1 {
    top: 20%;
    right: -5%;
    animation-delay: -5s;
}

.float-2 {
    bottom: 10%;
    left: -10%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-50px) rotate(5deg); }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 1.5rem;
    }

    /* Show hamburger */
    .nav-toggle {
        display: block;
    }

    /* Mobile menu overlay */
    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: var(--black);
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 150;
    }

    .nav-links.nav-open {
        transform: translateX(0);
    }

    .nav-links a {
        font-family: var(--font-display);
        font-size: 3rem;
        letter-spacing: 0.05em;
    }

    /* Override mix-blend-mode when mobile menu is open */
    nav.menu-open {
        mix-blend-mode: normal;
    }

    /* Prevent body scroll when menu is open */
    body.nav-is-open {
        overflow: hidden;
    }

    /* Hide custom cursor on mobile */
    .cursor,
    .cursor-dot {
        display: none;
    }

    footer {
        padding: 4rem 1.5rem 2rem;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
