/* --- Custom Fonts --- */
@font-face {
    font-family: 'Kalieb Luxury';
    src: url('fonts/Kalieb-Luxury.ttf') format('truetype');
    font-weight: 400;
    letter-spacing: 1.5px;
}

/* --- Global Styles --- */
html {
    scroll-behavior: smooth;
}

body {
    background-color: #0d1b15;
    color: #f3f4f6;
    font-family: 'segoe ui', sans-serif;
    /* padding-bottom: 70px; */
}

@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }
}

/* .serif {
    font-family: 'Playfair Display', serif;
} */

/* --- Hero Section --- */
/* .hero-gradient {
    background: linear-gradient(to bottom, rgba(13, 27, 21, 0.85), #0d1b15), url('../images/mountain-bg.png');
    background-size: 100% 55%;
    background-repeat: no-repeat;
    background-position: center bottom;
} */

.hero-gradient {
    background: linear-gradient(to bottom,
            rgba(13, 27, 21, 0.85),
            #0d1b15), url('../images/mountain-bg.png');

    background-size: 100% 55%;
    background-repeat: no-repeat;
    background-position: center bottom;

    animation: mountainCinematic 10s ease-in-out infinite alternate;
}

@keyframes mountainCinematic {
    0% {
        background-size: 100% 55%;
        background-position: 48% bottom;
    }

    100% {
        background-size: 150% 80%;
        background-position: 52% bottom;
    }
}

@media (max-width: 768px) {
    .hero-gradient {
        /* On mobile, we zoom slightly to keep peaks prominent */
        background-size: 180% auto;
        background-position: center 30%;
        background-attachment: scroll;
        /* Prevents jumping on mobile scroll */
        margin-top: 110px;
    }

}

.figma-headline {
    color: #FFBA00;
    font-size: clamp(60px, 10vw, 100px);
    font-family: 'Kalieb Luxury', serif;
    font-weight: 400;
    line-height: 1;
    word-wrap: break-word;
}

.figma-subheadline {
    color: #f3f4f6;
    font-size: clamp(40px, 8vw, 100px);
    font-family: 'Kalieb Luxury', serif;
    font-weight: 400;
    line-height: 1.1;
}

section {
    scroll-margin-top: 120px;
}

/* --- Navigation & Z-Indexing --- */
#main-nav {
    z-index: 100 !important;
    position: fixed;
    top: 0;
    width: 100%;
}

/* Unified Mobile Menu */
#mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 90 !important;
    height: 100vh;
    width: 100vw;
    background-color: #0d1b15;
    pointer-events: auto !important;
    /* Critical for clicks */
    overflow-y: auto;
}

/* Close Button Styling */
#close-menu-btn {
    cursor: pointer !important;
    z-index: 110 !important;
    /* Higher than the menu background */
    pointer-events: auto !important;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

/* Prevent overlap with background text */
body.menu-open {
    overflow: hidden;
}

body.menu-open main,
body.menu-open section {
    visibility: hidden;
    /* Better than display:none to prevent layout jumps */
}

/* --- Hamburger Icon Transformation --- */
.hamburger-icon {
    width: 22px;
    height: 16px;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon span {
    display: block;
    position: absolute;
    height: 1.5px;
    width: 100%;
    background: #eab308;
    border-radius: 2px;
    left: 0;
    transition: all 0.25s ease-in-out;
}

.line-1 {
    top: 0px;
}

.line-2 {
    top: 7px;
}

.line-3 {
    top: 14px;
}

.open .line-1 {
    top: 7px;
    transform: rotate(135deg);
}

.open .line-2 {
    opacity: 0;
    left: -40px;
}

.open .line-3 {
    top: 7px;
    transform: rotate(-135deg);
}

/* --- UI Components --- */
.nav-active {
    background-color: #FFBA00 !important;
    color: #0d1b15 !important;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.polaroid {
    background: #d4e6db;
    padding: 1rem 1rem 2.5rem 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s ease-in-out;


    border-radius: 12px;
}

/* .polaroid:hover {
    transform: scale(1.1) rotate(0deg) !important;
    z-index: 50;
} */

.polaroid.middle-card:hover {
    /* FIX: Retain the -translate-x-1/2 offset so it scales and rotates from dead center */
    transform: translate(-50%, 0) scale(1.1) rotate(4deg) !important;
    z-index: 50;
}


/* ==========================================================================
   MOUNTAIN COMPONENT LAYERING (FIXED RESPONSIVE VERTICAL ALIGNMENT)
   ========================================================================== */
.mountain-wrapper {
    position: relative;
    z-index: 10;
    pointer-events: none;
    overflow: hidden !important;
    margin-top: -80px !important;
    width: 100%;
}

.mountain-back,
.mountain-front {
    min-width: 110% !important;
    height: auto !important;
    display: block;
    position: relative;
    left: 50%;
}

/* .mountain-back {
    opacity: 0.7 !important;
    z-index: 10;
    transform: translateX(-50%);
}

.mountain-front {
    z-index: 11;
    margin-top: -170px !important;

    transform: translateX(-50%) translateY(0);
} */

.mountain-back {
    opacity: 0.7 !important;
    z-index: 10;

    transform: translateX(-50%);

    animation: mountainBackMove 10s ease-in-out infinite alternate;
    animation-delay: -2s;
    will-change: transform;
}

.mountain-front {
    z-index: 11;
    margin-top: -220px !important;

    transform: translateX(-50%) translateY(0);

    animation: mountainFrontMove 6s ease-in-out infinite alternate;
    will-change: transform;
}


/* FRONT MOUNTAIN */
@keyframes mountainFrontMove {
    0% {
        transform: translateX(calc(-50% - 12px)) translateY(0);
    }

    50% {
        transform: translateX(calc(-50% + 12px)) translateY(0);
    }

    100% {
        transform: translateX(calc(-50% - 12px)) translateY(0);
    }
}


/* BACK MOUNTAIN
   Slower + slightly delayed */
@keyframes mountainBackMove {
    0% {
        transform: translateX(calc(-50% - 7px)) translateY(0);
    }

    50% {
        transform: translateX(calc(-50% + 7px)) translateY(0);
    }

    100% {
        transform: translateX(calc(-50% - 7px)) translateY(0);
    }
}

/* THE OVERLAY: Fixed at the base container frame line */
.mountain-fade-overlay {
    position: absolute;
    bottom: -2px;
    /* Slight bleed down to prevent sub-pixel gaps */
    left: 0;
    width: 100%;
    height: 180px;
    background: linear-gradient(to bottom, rgba(13, 27, 21, 0) 0%, rgba(13, 27, 21, 0.7) 40%, #0d1b15 100%);
    z-index: 12;
}

@media (max-width: 1023px) {
    .mountain-wrapper {
        margin-top: -40px !important;
    }

    .mountain-back,
    .mountain-front {
        min-width: 150% !important;
    }

    .mountain-back {
        transform: translateX(-50%) translateY(20px) !important;
    }

    .mountain-front {
        margin-top: -60px !important;
        /* FIX: Ensures the image bottom never floats away from the mask baseline on tablet/mobile */
        transform: translateX(-50%) translateY(15px) !important;
    }

    .mountain-fade-overlay {
        height: 140px;
        /* Tall enough to absorb the scaled image height footprint */
    }
}

/* ==========================================================================
   SHOP SECTION (CLEAN HORIZON BASELINE RESTORATION)
   ========================================================================== */
#shop {
    position: relative;
    z-index: 32 !important;
    background-color: #0d1b15;
    /* Allows elements inside the -top-52 content tray to bleed upward cleanly */
    overflow: visible !important;
    margin-top: 0 !important;
    /* CRITICAL: Reset this so the background doesn't move */
}

@media (max-width: 1023px) {
    #shop {
        margin-top: -2px !important;
    }
}

@media (min-width: 1024px) {
    #shop {
        margin-top: 0 !important;
    }
}

/* ==========================================================================
   EDGE-TO-EDGE TREE BRANCH STYLING
   ========================================================================== */
.branch-floor-container {
    /* Ensures nothing inside this tracking block forces horizontal scrollbars */
    overflow: hidden;
}

.branch-floor-img {
    /* Forces the asset width past the viewport edges to hide cutting lines */
    min-width: 115% !important;
    height: auto !important;
    display: block;
    position: relative;
    /* Centers the oversized graphic on the layout frame line */
    left: 50%;
    transform: translateX(-50%);
}

@media (max-width: 768px) {
    .branch-floor-img {
        /* Zoom slightly closer into the branch textures on mobile screens */
        min-width: 130% !important;
    }
}

/* THE BOTTOM-ONLY BLEND MATRIX:
   Leaves the top peaks completely untouched, starting the fog transition 
   only at the lower half to smoothly dissolve the sharp bottom baseline. */
.mountain-fade-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    /* FIX: Pushed the transparent zone down to 65%. 
       The gradient stays 100% clear from the top peaks down to the middle, 
       then transitions rapidly into your solid background color by 92%. */
    background: linear-gradient(to bottom,
            rgba(13, 27, 21, 0) 0%,
            rgba(13, 27, 21, 0) 65%,
            /* Sharp and clear down to here */
            rgba(13, 27, 21, 0.7) 80%,
            /* Smooth gathering of mist */
            #0d1b15 92%,
            /* Hits 100% solid color before the image ends */
            #0d1b15 100%);
    z-index: 12;
}

@media (max-width: 1023px) {
    .mountain-fade-overlay {
        /* Adjusted mobile ramp to handle the shorter graphic height tracking */
        background: linear-gradient(to bottom,
                rgba(13, 27, 21, 0) 0%,
                rgba(13, 27, 21, 0) 55%,
                rgba(13, 27, 21, 0.8) 75%,
                #0d1b15 90%,
                #0d1b15 100%);
    }
}


.platform {
    background: linear-gradient(to bottom, rgb(23 54 40 / 60%), #103530), url('../images/mountain-bg2.png');

    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center bottom;
}