/* Hero Section Styles */

/* Hero Header */
.hero-header {
    z-index: 80 !important;
    /* Header stays fixed, no transform */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 50px;
    z-index: 100;
    background: transparent;
    animation: fadeInDown 0.8s ease-out;
}

/* Hero brand - default inline display */
.hero-brand .brand-first,
.hero-brand .brand-second {
    display: inline;
    transition: all 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.hero-brand .brand-second {
    margin-left: 0.3em;
}

/* Hero brand transition when nav opens */
.hero-brand {
    transition: all 0.6s cubic-bezier(0.77, 0, 0.175, 1);
    font-size: 34px;
    font-weight: 400;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: "Teko", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.3s;
}

.hero-brand:hover {
    opacity: 0.7;
}

/* Nav open state - hero header */
body.navOpen .hero-header {
    z-index: 50 !important;
    left: 40px;
    top: 80px;
    transform: none;
    padding: 0;
    pointer-events: none;
    /* No transform - stays fixed */
}

body.navOpen .hero-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

body.navOpen .hero-brand .brand-first,
body.navOpen .hero-brand .brand-second {
    display: block;
    font-size: clamp(100px, 22vw, 280px);
    color: #000;
    letter-spacing: 8px;
    line-height: 0.85;
    font-weight: 500;
}

body.navOpen .hero-brand .brand-second {
    margin-left: 0;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
    scroll-snap-align: none;
    scroll-snap-stop: normal;
}

.hero-content {
    position: relative;
    z-index: 5;
    text-align: center;
    width: 100%;
    padding: 0;
    animation: fadeInUp 1.2s ease-out 0.3s both;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-title-container {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: clamp(150px, 28vw, 290px);
    text-align: center;
    margin: 0 auto;
    will-change: transform;
}

.hero-title {
    font-size: clamp(100px, 22vw, 240px);
    font-weight: 900;
    font-family: "Teko", sans-serif;
    line-height: 1;
    letter-spacing: 5px;
    color: #fdbb2b;
    text-transform: uppercase;
    text-shadow: 0 0 3px rgba(253, 187, 43, 0.2),
                 0 1px 2px rgba(0, 0, 0, 0.2);
    margin: 0;
    grid-column: 1;
    grid-row: 1;
    text-align: center;
    white-space: nowrap;
    opacity: 0;
    animation: titleAlternate 10s step-end infinite,
               subtlePulse 3s ease-in-out infinite;
    filter: none;
    will-change: filter, transform;
    transform: translateY(0);
    transition: transform 0.1s ease-out;
}

.hero-title:nth-child(1) {
    animation-delay: 0s;
}

.hero-title:nth-child(2) {
    animation-delay: 5.1s;
}

/* Glitch Layers */
.hero-title.layers {
    position: relative;
}

.hero-title.layers span {
    position: relative;
    display: inline-block;
}

.hero-title.layers::before,
.hero-title.layers::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    text-align: center;
    z-index: -1;
    /* Match all font properties exactly */
    font-size: clamp(100px, 22vw, 240px);
    font-weight: 900;
    font-family: "Teko", sans-serif;
    line-height: 1;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #fdbb2b;
    opacity: 0.8;
    /* Initial centered position - will be offset by movement animation */
    transform: translate(0, 0);
    pointer-events: none;
}

.hero-title.layers::before {
    color: #00ffff;
    animation: glitchLayerBefore 10s step-end infinite;
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
}

.hero-title.layers::after {
    color: #ff00ff;
    animation: glitchLayerAfter 10s step-end infinite;
    clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%);
}

/* Apply dramatic glitch animation that triggers title change */
.hero-title.glitch span {
    animation: dramaticGlitch 10s step-end infinite;
}

.hero-title:nth-child(1).glitch span {
    animation-delay: 0s;
}

.hero-title:nth-child(2).glitch span {
    animation-delay: 5.1s;
}

/* Hero Background */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.0);
    z-index: 1;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    will-change: transform;
    transform: translateZ(0);
    /* GPU acceleration for smooth parallax */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(21, 20, 21, 0.3) 50%, rgba(21, 20, 21, 0.7) 100%);
    z-index: 2;
}

/* Hero Footer */
.hero-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 50px;
    z-index: 10;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-scroll {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.hero-scroll-text {
    font-size: 12px;
    font-weight: 400;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.hero-scroll-arrow {
    font-size: 20px;
    color: var(--secondary-color);
    animation: bounce 2s infinite;
}

/* About Hero Styles */
.about-hero {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.about-hero-bg {
    background: rgba(26, 26, 26, 0.7);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.about-hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.about-hero-title {
    font-size: clamp(48px, 10vw, 140px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 2px;
    color: #fdbb2b;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(253, 187, 43, 0.5);
    margin: 0;
}

/* Hero Animations */
@keyframes titleAlternate {
    0% {
        opacity: 1;
    }
    49% {
        opacity: 1;
    }
    49.5% {
        opacity: 0;
    }
    99.5% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes subtlePulse {
    0%, 100% {
        text-shadow: 0 0 3px rgba(253, 187, 43, 0.2),
                     0 1px 2px rgba(0, 0, 0, 0.2);
    }
    50% {
        text-shadow: 0 0 4px rgba(253, 187, 43, 0.25),
                     0 1px 2px rgba(0, 0, 0, 0.2);
    }
}

@keyframes dramaticGlitch {
    0%, 47% {
        clip-path: none;
        transform: translate(0, 0);
        filter: hue-rotate(0deg);
    }
    47.5% {
        clip-path: polygon(
            0% 0%,
            100% 0%,
            100% 48%,
            0% 48%
        );
        transform: translate(2px, -1px);
        filter: hue-rotate(90deg) brightness(1.2);
    }
    48% {
        clip-path: polygon(
            0% 52%,
            100% 52%,
            100% 100%,
            0% 100%
        );
        transform: translate(-3px, 2px);
        filter: hue-rotate(-90deg) brightness(0.8);
    }
    48.5% {
        clip-path: polygon(
            0% 25%,
            100% 25%,
            100% 75%,
            0% 75%
        );
        transform: translate(4px, -2px);
        filter: hue-rotate(180deg) brightness(1.5);
    }
    49% {
        clip-path: polygon(
            0% 10%,
            100% 10%,
            100% 40%,
            0% 40%
        );
        transform: translate(-5px, 3px);
        filter: hue-rotate(-180deg) brightness(0.5);
    }
    49.2% {
        clip-path: polygon(
            0% 60%,
            100% 60%,
            100% 90%,
            0% 90%
        );
        transform: translate(3px, -1px);
        filter: hue-rotate(45deg) brightness(1.3);
    }
    49.4% {
        clip-path: none;
        transform: translate(-2px, 1px);
        filter: hue-rotate(-45deg) brightness(0.9);
    }
    49.5%, 97% {
        clip-path: none;
        transform: translate(0, 0);
        filter: hue-rotate(0deg);
    }
    97.5% {
        clip-path: polygon(
            0% 0%,
            100% 0%,
            100% 48%,
            0% 48%
        );
        transform: translate(2px, -1px);
        filter: hue-rotate(90deg) brightness(1.2);
    }
    98% {
        clip-path: polygon(
            0% 52%,
            100% 52%,
            100% 100%,
            0% 100%
        );
        transform: translate(-3px, 2px);
        filter: hue-rotate(-90deg) brightness(0.8);
    }
    98.5% {
        clip-path: polygon(
            0% 25%,
            100% 25%,
            100% 75%,
            0% 75%
        );
        transform: translate(4px, -2px);
        filter: hue-rotate(180deg) brightness(1.5);
    }
    99% {
        clip-path: polygon(
            0% 10%,
            100% 10%,
            100% 40%,
            0% 40%
        );
        transform: translate(-5px, 3px);
        filter: hue-rotate(-180deg) brightness(0.5);
    }
    99.2% {
        clip-path: polygon(
            0% 60%,
            100% 60%,
            100% 90%,
            0% 90%
        );
        transform: translate(3px, -1px);
        filter: hue-rotate(45deg) brightness(1.3);
    }
    99.4% {
        clip-path: none;
        transform: translate(-2px, 1px);
        filter: hue-rotate(-45deg) brightness(0.9);
    }
    99.5%, 100% {
        clip-path: none;
        transform: translate(0, 0);
        filter: hue-rotate(0deg);
    }
}

@keyframes glitchLayerBefore {
    0%, 47%, 49.5%, 97%, 99.5%, 100% {
        transform: translate(0, 0);
        opacity: 0;
    }
    47.5% {
        transform: translate(-3px, 0);
        opacity: 0.8;
    }
    48% {
        transform: translate(3px, 0);
        opacity: 0.8;
    }
    48.5% {
        transform: translate(-4px, 0);
        opacity: 0.9;
    }
    49% {
        transform: translate(4px, 0);
        opacity: 0.9;
    }
    49.2% {
        transform: translate(-2px, 0);
        opacity: 0.7;
    }
    49.4% {
        transform: translate(2px, 0);
        opacity: 0.6;
    }
    97.5% {
        transform: translate(-3px, 0);
        opacity: 0.8;
    }
    98% {
        transform: translate(3px, 0);
        opacity: 0.8;
    }
    98.5% {
        transform: translate(-4px, 0);
        opacity: 0.9;
    }
    99% {
        transform: translate(4px, 0);
        opacity: 0.9;
    }
    99.2% {
        transform: translate(-2px, 0);
        opacity: 0.7;
    }
    99.4% {
        transform: translate(2px, 0);
        opacity: 0.6;
    }
}

@keyframes glitchLayerAfter {
    0%, 47%, 49.5%, 97%, 99.5%, 100% {
        transform: translate(0, 0);
        opacity: 0;
    }
    47.5% {
        transform: translate(3px, 0);
        opacity: 0.8;
    }
    48% {
        transform: translate(-3px, 0);
        opacity: 0.8;
    }
    48.5% {
        transform: translate(4px, 0);
        opacity: 0.9;
    }
    49% {
        transform: translate(-4px, 0);
        opacity: 0.9;
    }
    49.2% {
        transform: translate(2px, 0);
        opacity: 0.7;
    }
    49.4% {
        transform: translate(-2px, 0);
        opacity: 0.6;
    }
    97.5% {
        transform: translate(3px, 0);
        opacity: 0.8;
    }
    98% {
        transform: translate(-3px, 0);
        opacity: 0.8;
    }
    98.5% {
        transform: translate(4px, 0);
        opacity: 0.9;
    }
    99% {
        transform: translate(-4px, 0);
        opacity: 0.9;
    }
    99.2% {
        transform: translate(2px, 0);
        opacity: 0.7;
    }
    99.4% {
        transform: translate(-2px, 0);
        opacity: 0.6;
    }
}

@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hero-header {
        padding: 30px 20px;
    }

    .hero-brand {
        font-size: 12px;
        letter-spacing: 2px;
    }

    .hero-title {
        font-size: clamp(44px, 15vw, 96px);
        letter-spacing: 1px;
    }

    .hero-footer {
        padding: 30px 20px;
    }

    .hero-scroll-text {
        font-size: 10px;
        letter-spacing: 2px;
    }
}

