
:root {
    --dark: #21140e;
    --brown: #493022;
    --stone: #76513a;
    --sand: #c18a55;
    --orange: #ff8a36;
    --fire: #ffc15c;
    --cream: #f4dfbd;
    --muted: #c9a982;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    overflow: hidden;
    background: var(--dark);
    font-family: "Vazirmatn", sans-serif;
}

.scene {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(
        180deg,
        #a95e3d 0%,
        #c47a4b 29%,
        #805039 57%,
        #34231a 100%
    );
}

/* SKY */

.sky {
    position: absolute;
    inset: 0;
    z-index: -8;
    overflow: hidden;
    background: linear-gradient(
        180deg,
        #a85c43 0%,
        #d28a55 36%,
        #b66d45 70%,
        #72452f 100%
    );
}

.sun {
    position: absolute;
    top: 13%;
    left: 50%;
    width: 95px;
    height: 95px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: #ffd18a;
    box-shadow:
        0 0 35px rgba(255, 205, 125, .75),
        0 0 100px rgba(255, 168, 86, .45);
}

.sun-glow {
    position: absolute;
    top: 0;
    left: 50%;
    width: 650px;
    height: 430px;
    transform: translateX(-50%);
    background: radial-gradient(
        ellipse,
        rgba(255, 191, 113, .32),
        transparent 70%
    );
    filter: blur(25px);
}

.cloud {
    position: absolute;
    width: 180px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 202, 155, .12);
    filter: blur(13px);
    animation: cloudMove 35s linear infinite;
}

.cloud-one {
    top: 22%;
    left: -200px;
}

.cloud-two {
    top: 36%;
    left: -350px;
    width: 260px;
    animation-delay: -17s;
    opacity: .6;
}

@keyframes cloudMove {
    from { transform: translateX(0); }
    to { transform: translateX(130vw); }
}

.birds {
    position: absolute;
    top: 24%;
    left: 20%;
    width: 120px;
    height: 50px;
}

.birds span {
    position: absolute;
    width: 18px;
    height: 9px;
    border-top: 2px solid rgba(55, 35, 27, .65);
    border-radius: 50%;
    transform: rotate(-15deg);
}

.birds span::after {
    content: "";
    position: absolute;
    top: -2px;
    left: 10px;
    width: 18px;
    height: 9px;
    border-top: 2px solid rgba(55, 35, 27, .65);
    border-radius: 50%;
    transform: rotate(30deg);
}

.birds span:nth-child(1) {
    top: 8px;
    left: 10px;
}

.birds span:nth-child(2) {
    top: 25px;
    left: 57px;
    transform: scale(.7) rotate(-15deg);
}

.birds span:nth-child(3) {
    top: 0;
    left: 90px;
    transform: scale(.55) rotate(-15deg);
}

/* MOUNTAINS */

.mountains {
    position: absolute;
    right: -5%;
    left: -5%;
    bottom: 25%;
    width: 110%;
    pointer-events: none;
}

.mountains-back {
    z-index: -7;
    height: 43%;
    background: #8a513b;
    clip-path: polygon(
        0 100%, 0 68%, 9% 43%, 17% 68%,
        28% 20%, 40% 66%, 53% 32%,
        64% 68%, 77% 17%, 89% 63%,
        100% 35%, 100% 100%
    );
    opacity: .65;
}

.mountains-middle {
    z-index: -6;
    height: 35%;
    background: #6e4231;
    clip-path: polygon(
        0 100%, 0 66%, 13% 32%, 24% 69%,
        38% 25%, 50% 67%, 65% 20%,
        79% 65%, 91% 29%, 100% 59%,
        100% 100%
    );
}

.mountains-front {
    z-index: -5;
    height: 25%;
    background: linear-gradient(180deg, #68402d, #3e2b20);
    clip-path: polygon(
        0 100%, 0 64%, 12% 34%, 24% 71%,
        37% 42%, 51% 77%, 67% 32%,
        82% 70%, 94% 38%, 100% 59%,
        100% 100%
    );
}

/* DISTANT MAMMOTH */

.mammoth {
    position: absolute;
    z-index: -4;
    width: 150px;
    height: 110px;
    opacity: .65;
    filter: drop-shadow(0 5px 8px rgba(40, 24, 17, .25));
}

.mammoth-distant {
    right: 22%;
    bottom: 29%;
    transform: scale(.75);
    transform-origin: bottom center;
    animation: mammothWalk 5s ease-in-out infinite;
}

.mammoth-body {
    position: absolute;
    bottom: 28px;
    left: 15px;
    width: 90px;
    height: 53px;
    border-radius: 48% 50% 35% 40%;
    background: #3a281f;
}

.mammoth-head {
    position: absolute;
    bottom: 48px;
    left: 86px;
    width: 42px;
    height: 48px;
    border-radius: 45% 55% 50% 35%;
    background: #3a281f;
    transform: rotate(-10deg);
}

.mammoth-ear {
    position: absolute;
    bottom: 60px;
    left: 81px;
    width: 28px;
    height: 23px;
    border-radius: 50%;
    background: #4b3022;
    transform: rotate(25deg);
}

.mammoth-tusk {
    position: absolute;
    bottom: 24px;
    left: 108px;
    width: 14px;
    height: 35px;
    border: 5px solid #d2b58d;
    border-top: 0;
    border-right: 0;
    border-radius: 0 0 0 100%;
    transform: rotate(-25deg);
}

.mammoth-leg {
    position: absolute;
    bottom: 0;
    width: 16px;
    height: 43px;
    border-radius: 5px;
    background: #302119;
    transform-origin: top center;
}

.leg-one { left: 25px; }
.leg-two { left: 48px; }
.leg-three { left: 82px; }
.leg-four { left: 100px; }

@keyframes mammothWalk {
    0%, 100% { margin-right: 0; }
    50% { margin-right: 9px; }
}

/* CAVE */

.cave-area {
    position: absolute;
    z-index: -2;
    left: 50%;
    bottom: 14%;
    width: min(760px, 82vw);
    height: 65%;
    transform: translateX(-50%);
}

.cave-rock {
    position: absolute;
    bottom: 0;
    width: 34%;
    height: 100%;
    background: linear-gradient(135deg, #64402c, #2a1c15 78%);
    box-shadow: inset 0 0 35px rgba(0, 0, 0, .35);
}

.cave-left {
    left: 0;
    clip-path: polygon(
        0 0, 45% 5%, 68% 22%, 83% 42%,
        100% 70%, 100% 100%, 0 100%
    );
    border-radius: 35% 30% 0 0;
}

.cave-right {
    right: 0;
    clip-path: polygon(
        55% 5%, 100% 0, 100% 100%,
        0 100%, 0 70%, 17% 42%, 32% 22%
    );
    border-radius: 30% 35% 0 0;
}

.cave-roof {
    position: absolute;
    top: 0;
    left: 50%;
    width: 46%;
    height: 48%;
    transform: translateX(-50%);
    border-radius: 50% 50% 0 0;
    background: linear-gradient(180deg, #6b4630, #38251a);
    clip-path: polygon(
        0 100%, 5% 50%, 20% 15%, 50% 0,
        80% 15%, 95% 50%, 100% 100%
    );
}

.cave-opening {
    position: absolute;
    z-index: 1;
    left: 50%;
    bottom: 0;
    width: 47%;
    height: 75%;
    transform: translateX(-50%);
    overflow: hidden;
    border-radius: 48% 48% 0 0;
    background: radial-gradient(
        ellipse at 50% 70%,
        #160e0a 0%,
        #0d0907 65%,
        #21150f 100%
    );
    box-shadow:
        inset 0 0 50px rgba(0, 0, 0, .9),
        0 0 35px rgba(255, 152, 71, .08);
}

.cave-darkness {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(8, 5, 4, .15),
        rgba(0, 0, 0, .6)
    );
}

/* CAVE WALL ART */

.cave-wall-art {
    position: absolute;
    inset: 13% 10% 15%;
    opacity: .7;
}

.cave-handprint {
    position: absolute;
    top: 18%;
    left: 17%;
    width: 32px;
    height: 38px;
    border: 4px solid #ad7047;
    border-radius: 50% 50% 40% 40%;
    transform: rotate(-15deg);
}

.cave-handprint::before {
    content: "";
    position: absolute;
    top: -24px;
    left: 0;
    width: 4px;
    height: 25px;
    background: #ad7047;
    box-shadow:
        9px -5px #ad7047,
        18px -2px #ad7047,
        27px 5px #ad7047;
    transform: rotate(-8deg);
}

.cave-animal {
    position: absolute;
    top: 40%;
    right: 14%;
    width: 95px;
    height: 45px;
    border-bottom: 5px solid #a86c43;
    border-radius: 50%;
    transform: rotate(-5deg);
}

.cave-animal::before {
    content: "";
    position: absolute;
    top: -8px;
    right: -5px;
    width: 28px;
    height: 26px;
    border-radius: 50%;
    background: #a86c43;
}

.cave-animal span,
.cave-animal i {
    position: absolute;
    bottom: -24px;
    width: 4px;
    height: 25px;
    background: #a86c43;
}

.cave-animal span { right: 15px; }
.cave-animal i { right: 62px; }

.cave-symbols {
    position: absolute;
    top: 15%;
    right: 50%;
    display: flex;
    gap: 13px;
}

.cave-symbols span {
    width: 5px;
    height: 23px;
    background: #ad7047;
    transform: rotate(20deg);
}

.cave-symbols span:nth-child(2) {
    transform: rotate(-25deg);
    height: 17px;
}

.cave-symbols span:nth-child(3) {
    height: 27px;
    transform: rotate(10deg);
}

.cave-edge {
    position: absolute;
    z-index: 2;
    bottom: 0;
    left: 50%;
    width: 49%;
    height: 8px;
    transform: translateX(-50%);
    background: #3b281d;
    border-radius: 50%;
}

/* CAMPFIRE */

.campfire {
    position: absolute;
    z-index: 1;
    bottom: 13%;
    left: 50%;
    width: 180px;
    height: 190px;
    transform: translateX(-50%);
}

.fire-glow {
    position: absolute;
    bottom: 15px;
    left: 50%;
    width: 270px;
    height: 220px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(
        ellipse,
        rgba(255, 139, 49, .33),
        rgba(255, 112, 35, .1) 45%,
        transparent 72%
    );
    filter: blur(20px);
    animation: fireGlow 2.5s ease-in-out infinite alternate;
}

@keyframes fireGlow {
    from { opacity: .6; transform: translateX(-50%) scale(.9); }
    to { opacity: 1; transform: translateX(-50%) scale(1.12); }
}

.fire {
    position: absolute;
    bottom: 43px;
    left: 50%;
    width: 95px;
    height: 115px;
    transform: translateX(-50%);
}

.flame {
    position: absolute;
    bottom: 0;
    left: 50%;
    display: block;
    width: 45px;
    height: 85px;
    border-radius: 50% 50% 45% 45%;
    transform-origin: bottom center;
    filter: blur(1px);
}

.flame-one {
    margin-left: -23px;
    background: linear-gradient(180deg, #ffdf86, #ff852f 65%, #c43c19);
    animation: flameDance 1.1s ease-in-out infinite alternate;
}

.flame-two {
    margin-left: -9px;
    width: 40px;
    height: 105px;
    background: linear-gradient(180deg, #fff0a3, #ffad45 60%, #e75b20);
    animation: flameDance 1.4s ease-in-out infinite alternate-reverse;
}

.flame-three {
    margin-left: -38px;
    width: 32px;
    height: 67px;
    background: linear-gradient(180deg, #ffc66d, #f05b24);
    animation: flameDance 1.3s ease-in-out infinite alternate;
}

.flame-four {
    margin-left: 8px;
    width: 29px;
    height: 62px;
    background: linear-gradient(180deg, #ffe69b, #ff7429);
    animation: flameDance .9s ease-in-out infinite alternate-reverse;
}

@keyframes flameDance {
    0% {
        transform: scaleX(.85) scaleY(.9) rotate(-5deg);
    }
    100% {
        transform: scaleX(1.08) scaleY(1.12) rotate(5deg);
    }
}

.firewood {
    position: absolute;
    bottom: 29px;
    left: 50%;
    width: 105px;
    height: 23px;
    transform: translateX(-50%);
}

.firewood span {
    position: absolute;
    top: 8px;
    left: 0;
    width: 105px;
    height: 13px;
    border-radius: 10px;
    background: linear-gradient(180deg, #5b3420, #29190f);
    transform: rotate(15deg);
}

.firewood span:nth-child(2) {
    transform: rotate(-15deg);
}

.firewood span:nth-child(3) {
    top: 0;
    left: 20px;
    width: 70px;
    transform: rotate(90deg);
}

/* PREHISTORIC TREES */

.tree {
    position: absolute;
    z-index: -1;
    bottom: 14%;
    width: 100px;
    height: 190px;
}

.tree-one {
    left: 8%;
    transform: scale(1.1);
}

.tree-two {
    right: 8%;
    transform: scale(.85);
}

.tree-three {
    right: 34%;
    bottom: 17%;
    transform: scale(.6);
    opacity: .8;
}

.tree-trunk {
    position: absolute;
    bottom: 0;
    left: 45%;
    width: 17px;
    height: 110px;
    border-radius: 10px;
    background: linear-gradient(90deg, #2b2117, #62412a, #332218);
    transform: rotate(-5deg);
}

.tree-leaves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 115px;
    border-radius: 45% 55% 40% 60%;
    background: radial-gradient(
        ellipse at 35% 30%,
        #8c7740,
        #4f492c 65%,
        #29291d
    );
    box-shadow:
        -22px 28px 0 -7px #625333,
        21px 25px 0 -9px #3c3d27,
        4px -10px 0 -12px #9b7944;
}

/* GROUND */

.ground {
    position: absolute;
    z-index: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 17%;
    background: linear-gradient(
        180deg,
        #69452d,
        #3e291c 55%,
        #24170f
    );
    clip-path: polygon(
        0 30%, 10% 16%, 20% 27%, 34% 10%,
        47% 23%, 61% 12%, 76% 24%,
        89% 11%, 100% 29%, 100% 100%,
        0 100%
    );
}

.ground-rock {
    position: absolute;
    bottom: 35%;
    background: linear-gradient(145deg, #a4774c, #4a3020);
    border-radius: 45% 55% 35% 40%;
    box-shadow: inset -8px -8px 12px rgba(0, 0, 0, .2);
}

.rock-one {
    left: 5%;
    width: 75px;
    height: 35px;
}

.rock-two {
    right: 9%;
    width: 95px;
    height: 45px;
}

.rock-three {
    left: 30%;
    width: 40px;
    height: 22px;
}

.rock-four {
    right: 31%;
    width: 55px;
    height: 30px;
}

.rock-five {
    left: 70%;
    width: 35px;
    height: 20px;
}

/* SMOKE */

.smoke {
    position: absolute;
    z-index: 2;
    bottom: 27%;
    left: 50%;
    width: 100px;
    height: 190px;
    transform: translateX(-50%);
    pointer-events: none;
}

.smoke-particle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(60, 47, 39, .32);
    filter: blur(9px);
    animation: smokeRise 5s linear infinite;
}

@keyframes smokeRise {
    0% {
        opacity: 0;
        transform: translate(-50%, 0) scale(.6);
    }
    20% { opacity: .45; }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + 30px), -180px) scale(4);
    }
}

/* EMBERS */

.embers {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ember {
    position: absolute;
    bottom: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffbb58;
    box-shadow: 0 0 8px #ff842e;
    animation: emberRise linear infinite;
}

@keyframes emberRise {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0) scale(.5);
    }
    15% { opacity: 1; }
    100% {
        opacity: 0;
        transform: translateY(-170px) translateX(var(--drift)) scale(0);
    }
}

/* ASH */

.ash {
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
}

.ash-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 218, 167, .6);
    animation: ashFloat linear infinite;
}

@keyframes ashFloat {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0);
    }
    15% { opacity: .65; }
    100% {
        opacity: 0;
        transform: translateY(-180px) translateX(35px);
    }
}

/* CONTENT */

.content {
    position: absolute;
    z-index: 4;
    top: 46%;
    left: 50%;
    width: min(570px, 90%);
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--cream);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 17px;
    border: 1px solid rgba(255, 212, 165, .24);
    border-radius: 30px;
    color: #f0c99c;
    background: rgba(45, 27, 18, .48);
    font-size: 13px;
    backdrop-filter: blur(8px);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff9b48;
    box-shadow: 0 0 10px rgba(255, 155, 72, .8);
    animation: statusBlink 1.5s ease-in-out infinite;
}

@keyframes statusBlink {
    50% { opacity: .3; }
}

.content h1 {
    margin-top: 5px;
    font-size: clamp(100px, 16vw, 180px);
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: 5px;
    color: #fff0d5;
    text-shadow:
        0 5px 0 rgba(81, 47, 27, .45),
        0 0 25px rgba(255, 176, 96, .3),
        0 0 70px rgba(255, 128, 52, .22);
}

.stone-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 13px;
    margin-top: -5px;
    color: #e4b98a;
    font-size: 14px;
}

.stone-divider span {
    width: 42px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d59a60);
}

.stone-divider span:last-child {
    transform: rotate(180deg);
}

.content h2 {
    margin-top: 22px;
    color: #ffebcb;
    font-size: clamp(25px, 4vw, 35px);
    font-weight: 700;
    text-shadow: 0 0 20px rgba(255, 172, 94, .2);
}

.description {
    max-width: 430px;
    margin: 12px auto 0;
    color: #e0c19e;
    font-size: 14px;
    line-height: 2.1;
}

.coordinates {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 19px;
    color: #d2aa80;
    font-size: 12px;
}

.coordinates i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffb365;
    box-shadow: 0 0 8px #ff9b48;
}

/* BUTTONS */

.actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
}

.home-button,
.back-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 11px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: .3s ease;
}

.home-button {
    color: #351e12;
    background: linear-gradient(135deg, #ffd69a, #e9a65e);
    box-shadow: 0 5px 24px rgba(255, 153, 70, .2);
}

.home-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 153, 70, .35);
}

.button-arrow {
    font-size: 17px;
    transition: transform .3s ease;
}

.home-button:hover .button-arrow {
    transform: translate(3px, -3px);
}

.back-button {
    color: #f0d5b3;
    border: 1px solid rgba(255, 205, 153, .3);
    background: rgba(53, 33, 22, .55);
}

.back-button:hover {
    border-color: #e6ad70;
    background: rgba(106, 67, 39, .45);
}

/* FOOTER */

.bottom-info {
    position: absolute;
    z-index: 4;
    right: 0;
    bottom: 21px;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    color: #d5b18a;
    font-size: 11px;
}

.era-info {
    color: #ffd19a;
    font-weight: 700;
}

/* VIGNETTE */

.vignette {
    position: absolute;
    z-index: 3;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        ellipse at center,
        transparent 34%,
        rgba(28, 16, 10, .15) 72%,
        rgba(20, 11, 7, .6) 100%
    );
}

/* TABLET */

@media (max-width: 768px) {
    .content {
        top: 45%;
        width: 90%;
    }

    .cave-area {
        width: 95vw;
        height: 58%;
        bottom: 13%;
    }

    .mammoth-distant {
        right: 15%;
        bottom: 28%;
        transform: scale(.6);
    }

    .tree-one {
        left: -10px;
        transform: scale(.8);
    }

    .tree-two {
        right: -10px;
        transform: scale(.7);
    }

    .campfire {
        transform: translateX(-50%) scale(.85);
        transform-origin: bottom center;
    }

    .bottom-info {
        padding: 0 3%;
        font-size: 10px;
    }
}

/* MOBILE */

@media (max-width: 480px) {
    .sun {
        top: 10%;
        width: 70px;
        height: 70px;
    }

    .content {
        top: 43%;
        width: 92%;
    }

    .status {
        padding: 7px 13px;
        font-size: 11px;
    }

    .content h1 {
        margin-top: 12px;
        font-size: clamp(105px, 31vw, 145px);
    }

    .stone-divider {
        gap: 8px;
        font-size: 11px;
    }

    .stone-divider span {
        width: 27px;
    }

    .content h2 {
        margin-top: 17px;
        font-size: 25px;
    }

    .description {
        max-width: 320px;
        font-size: 12px;
        line-height: 2;
    }

    .coordinates {
        gap: 9px;
        margin-top: 15px;
        font-size: 10px;
    }

    .actions {
        gap: 8px;
        margin-top: 21px;
    }

    .home-button,
    .back-button {
        min-height: 44px;
        padding: 0 13px;
        gap: 7px;
        font-size: 11px;
    }

    .bottom-info {
        bottom: 12px;
        padding: 0 12px;
        font-size: 8px;
    }

    .cave-area {
        width: 125vw;
        height: 48%;
        bottom: 11%;
    }

    .cave-opening {
        width: 45%;
    }

    .campfire {
        bottom: 11%;
        transform: translateX(-50%) scale(.65);
        transform-origin: bottom center;
    }

    .mammoth-distant {
        right: 3%;
        bottom: 25%;
        transform: scale(.45);
    }

    .tree-one {
        left: -35px;
        bottom: 12%;
        transform: scale(.55);
    }

    .tree-two {
        right: -40px;
        bottom: 12%;
        transform: scale(.5);
    }

    .tree-three {
        display: none;
    }

    .ground {
        height: 14%;
    }

    .birds {
        left: 12%;
        transform: scale(.7);
    }
}

/* SHORT SCREENS */

@media (max-height: 650px) and (min-width: 481px) {
    .content {
        top: 44%;
        transform: translate(-50%, -50%) scale(.78);
    }

    .cave-area {
        height: 58%;
    }

    .bottom-info {
        bottom: 9px;
    }
}

@media (max-height: 560px) {
    .content {
        transform: translate(-50%, -50%) scale(.68);
    }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}
