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

/* GLOBAL FONT */
* {
    font-family: "Comic Sans MS", "Comic Neue", "Arial Rounded MT Bold", Arial, sans-serif !important;
}

/* BASE FONT SCALING */
html { font-size: 1vw; }

/* GLOBAL */
body { overflow-x: hidden; }

/* SECTIONS */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    text-align: center;
    overflow: hidden;
}

/* BACKGROUNDS */
.background-1, .background-2 {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(0.7);
}

/* TITLE */
.title {
    position: absolute;
    top: 7vh;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2vw;
    color: white;
    z-index: 10;
    animation: neonPulse 2.5s ease-in-out infinite;
    text-shadow:
        0 0 1vw limegreen,
        0 0 2vw limegreen,
        0 0 3vw limegreen,
        0 0 4vw limegreen;
}

/* SOCIAL ICONS */
.social-links {
    position: fixed;
    bottom: 3vh;
    left: 2vw;
    display: flex;
    gap: 1vw;
    z-index: 999999;
}

.social-icon img {
    width: 3vw;
    height: 3vw;
}

/* MUTE BUTTON */
.mute-btn {
    position: fixed;
    bottom: 3vh;
    right: 2vw;
    font-size: 2vw;
    padding: 0.5vw 1vw;
    border-radius: 1vw;
    border: 0.2vw solid limegreen;
    background: rgba(0,0,0,0.4);
    color: white;
    cursor: pointer;
    z-index: 999999 !important;
}

/* COPY TEXT BOX */
.copy-text-box {
    position: absolute;
    top: 43vh;
    left: 50%;
    transform: translateX(-50%);
    padding: 1vw 1.5vw;
    font-size: 1vw;
    background: rgba(0,0,0,0.4);
    border: 0.2vw solid limegreen;
    border-radius: 1vw;
    color: white;
    z-index: 10;
}

/* PUMP BUTTON */
.pump-btn {
    position: absolute;
    top: 4vh;
    left: 2vw;
    z-index: 20;
}

.pump-btn img {
    width: 5vw;
    transition: transform 0.3s ease;
}

.pump-btn img:hover { transform: scale(1.25); }

/* MAP */
.map-fold-wrapper {
    position: absolute;
    top: 5vh;
    right: 1vw;
    width: 10vw;

    /* FIX: allow folds to expand downward */
    min-height: 28vw;
    overflow: visible;
    z-index: 9999;
}

.stonemap {
    width: 100%;
    transition: transform 0.3s ease;
}
.stonemap:hover { transform: scale(1.15); }

/* MAP FOLD VISIBILITY FIX */
.map-folds {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20vw;

    /* FIX: give folds visible space */
    height: 32vw;

    opacity: 0;
    pointer-events: none;
    z-index: 9999999;
    transition: opacity 0.35s ease;

}
.map-folds.open {
    opacity: 1;
    pointer-events: auto;
}

.map-fold {
    position: absolute;
    width: 9vw;
    aspect-ratio: 1 / 1.2;
    background: url("assets/mapfold.webp") center/contain no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3vw;
    transition: transform 0.3s ease;
}

.map-fold:nth-child(1) { top: 5vw; left: 50%; transform: translateX(-50%); }
.map-fold:nth-child(2) { top: 12vw; left: 50%; transform: translateX(-50%); }
.map-fold:nth-child(3) { top: 19vw; left: 50%; transform: translateX(-50%); }

.map-text {
    position: absolute;
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: normal;
    text-align: center;
    width: 80%;
    font-size: 1vw;
    color: white;
}

/* COIN (FINAL — FIXES SAFARI DOUBLE COIN) */
.coin {
    position: absolute;
    top: 18vh;
    left: 50%;
    width: 10vw;
    height: auto;
    z-index: 10;

    /* Safari ghost fix */
    backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change: transform;
    -webkit-transform: translateX(-50%) translateZ(0);
    transform: translateX(-50%) translateZ(0);

    transition: transform 0.3s ease;
}

.coin:hover {
    transform: translateX(-50%) scale(1.25);
    z-index: 999;
}

/* VIDEO */
.video-section {
    position: absolute;
    top: 55vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.video-section iframe {
    width: 25vw;
    height: calc(25vw * 0.56);
}

/* CHARACTERS */
.char {
    position: absolute;
    width: 20vw;
    height: auto;
    transition: transform 0.3s ease;
}

.char:hover { transform: scale(1.3); z-index: 999; }

.char-1 { top: 7vh; left: 7vw; }
.char-2 { top: 10vh; left: 40vw; }
.char-3 { top: 10vh; left: 70vw; }
.char-4 { top: 30vh; left: 22vw; }
.char-5 { top: 35vh; left: 55vw; }

/* FREE TEXT */
.free-text {
    position: absolute;
    top: 90%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.3vw;
    width: 40vw;
    color: white;
}

/* COMMUNITY CHAT link */
.highlight {
    color: #00ffea;
    animation: linkPulse 2.2s ease-in-out infinite;
}

/* BANNER */
.gru-banner {
    position: relative;
    width: 100%;
    height: 5vh;
    overflow: hidden;
    background: rgba(24, 130, 30, 0.951);
    display: flex;
    align-items: center;
    border: 0.5vw solid #334f2b;
    box-shadow:
        inset 0 0 1vw #000000cc,
        0 0 0.5vw #ffffffcc,
        0 0 0.6vw #4c9b31;
}

.gru-banner-track {
    display: inline-block;
    white-space: nowrap;
    animation: scrollBanner 18s linear infinite;
    font-size: 1.5vw;
    color: rgb(235, 237, 235);
    text-shadow: 0 0 0.5vw rgb(9, 10, 9);
}
.gru-banner-track span { margin-right: 3vw; }

/* KEYFRAMES */
@keyframes scrollBanner {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-50%); }
}

@keyframes neonPulse {
    0% {
        text-shadow: 0 0 0.5vw limegreen, 0 0 1vw limegreen, 0 0 2vw limegreen, 0 0 3vw limegreen;
        opacity: 0.9;
    }
    50% {
        text-shadow: 0 0 1.5vw limegreen, 0 0 3vw limegreen, 0 0 4vw limegreen, 0 0 5vw limegreen;
        opacity: 1;
    }
    100% {
        text-shadow: 0 0 0.5vw limegreen, 0 0 1vw limegreen, 0 0 2vw limegreen, 0 0 3vw limegreen;
        opacity: 0.9;
    }
}

@keyframes linkPulse {
    0% { text-shadow: 0 0 0.3vw #00ffea, 0 0 0.6vw #00ffea, 0 0 1vw #00ffea; opacity: 0.9; }
    50% { text-shadow: 0 0 0.8vw #00ffea, 0 0 1.5vw #00ffea, 0 0 2.2vw #00ffea; opacity: 1; }
    100% { text-shadow: 0 0 0.3vw #00ffea, 0 0 0.6vw #00ffea, 0 0 1vw #00ffea; opacity: 0.9; }
}

/* PORTRAIT MOBILE */
@media (max-width: 768px) and (orientation: portrait) {

    .title { font-size: 5.2vw; top: 7vh; }

    .coin {
        width: 32vw;
        top: 22vh;
    }

    .copy-text-box {
        top: 48vh;
        font-size: 3vw;
        padding: 2.5vw 3vw;
    }

    .video-section {
        top: 63vh;
    }

    .video-section iframe {
        width: 70vw;
        height: calc(70vw * 0.56);
    }

    .free-text {
        top: 86%;
        width: 90vw;
        font-size: 3.8vw;
        line-height: 1.4;
    }

    .map-fold-wrapper {
        width: 24vw;
        top: 6vh;
        right: 3vw;
    }

    .map-fold {
        width: 22vw;
        font-size: 3vw;
    }

    .map-text {
        font-size: 3vw;
        width: 85%;
    }

    .char { width: 38vw; }
}

/* LANDSCAPE MOBILE */
@media (orientation: landscape) and (max-height: 500px) {

    /* TITLE */
    .title {
        top: 4vh;
        font-size: 3vw;
    }

    /* COIN */
    .coin {
        top: 16vh;
        width: 14vw;
    }

    /* COPY TEXT BOX (CA BOX) */
    .copy-text-box {
        top: 30vh;
        font-size: 1.6vw;
        padding: 1vw 2vw;
        width: 70vw;
    }

    /* VIDEO */
    .video-section {
        top: 46vh;
    }

    .video-section iframe {
        width: 45vw;
        height: calc(45vw * 0.56);
    }

    /* FREE TEXT */
    .free-text {
        top: 74vh;
        font-size: 2vw;
        width: 80vw;
        line-height: 1.25;
    }

    /* MAP */
    .map-fold-wrapper {
        width: 14vw;
        top: 3vh;
        right: 2vw;
    }

    .map-fold {
        width: 11vw;
        font-size: 1vw;
    }

    .map-text {
        font-size: 1vw;
        width: 70%;
    }

    /* CHARACTERS — smaller in landscape */
    .char {
        width: 22vw;
    }

    /* BANNER */
    .gru-banner-track {
        font-size: 2.2vw;
    }
}


.cave-text {
    font-family: "Papyrus", "Trebuchet MS", serif;
    color: #f2e6c9;
    text-shadow:
        0px 1px 0px #3c2e13,
        0px 2px 0px #3c2e13,
        0px 3px 2px rgba(0,0,0,0.5),
        0px 0px 6px rgba(0,0,0,0.6);
    letter-spacing: 0.05em;
    font-weight: bold;
}

.stone-particle {
    position: fixed;
    pointer-events: none;
    width: 0.6vw;
    height: 0.6vw;
    background: url("assets/mapfold.webp") center/cover no-repeat;
    opacity: 0.9;
    transform: translate(-50%, -50%) rotate(0deg);
    animation: stoneFall 1.2s linear forwards;
}

@keyframes stoneFall {
    0% {
        transform: translate(-50%, -50%) translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) translateY(4vh) rotate(180deg);
        opacity: 0;
    }
}