/* lower.quest - Neobrutalist Treasure Map */
/* Colors: #1A1A1A, #2A2A2A, #3366FF, #FFFBF0, #FFCC00, #FF3366 */
/* Fonts: Bungee 400, Space Grotesk 400/700, Lora italic 400 */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh;
    background: #FFFBF0;
    color: #1A1A1A;
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: hidden;
}

/* Noise overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    filter: url(#noise);
    opacity: 0.03;
    pointer-events: none;
    z-index: 100;
}

/* Descent Trail */
#descent-trail {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

#trail-path {
    stroke-dashoffset: 5000;
    animation: drawTrail 3s ease-out forwards;
}

@keyframes drawTrail {
    to { stroke-dashoffset: 0; }
}

.waypoint {
    opacity: 0;
    animation: waypointPop 0.3s ease forwards;
}

/* Strata Sections */
.strata {
    position: relative;
    z-index: 2;
    min-height: 80vh;
    padding: 80px 10vw;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.strata-cream {
    background: #FFFBF0;
}

.strata-blue {
    background: #3366FF;
}

.strata-yellow {
    background: #FFCC00;
}

.strata-pink {
    background: #FF3366;
}

.strata-dark {
    background: #1A1A1A;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Boulders */
.boulder {
    background: #FFFBF0;
    border: 3px solid #1A1A1A;
    padding: 32px 40px;
    max-width: 560px;
    box-shadow: 6px 6px 0 #1A1A1A;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.boulder.visible {
    opacity: 1;
    transform: translateY(0);
}

.strata-blue .boulder,
.strata-pink .boulder {
    background: #FFFBF0;
    color: #1A1A1A;
}

.strata-yellow .boulder {
    background: #FFFBF0;
    color: #1A1A1A;
}

.strata-dark .boulder {
    background: #2A2A2A;
    border-color: #FFCC00;
    box-shadow: 6px 6px 0 #FFCC00;
}

.boulder-1 { align-self: flex-start; }
.boulder-2 { align-self: flex-end; margin-top: -20px; }
.boulder-3 { align-self: flex-start; }
.boulder-4 { align-self: center; }
.boulder-5 { align-self: flex-end; }
.boulder-6 { align-self: flex-start; }
.boulder-7 { align-self: flex-end; }
.boulder-8 { align-self: flex-start; }
.boulder-9 { align-self: flex-start; }
.boulder-10 { align-self: flex-end; }
.boulder-x { align-self: center; text-align: center; max-width: 500px; }

.boulder-aside {
    max-width: 200px;
    padding: 16px 24px;
    border: 2px dashed #1A1A1A;
    box-shadow: none;
    background: transparent;
}

.strata-blue .boulder-aside {
    border-color: #FFFBF0;
}

.strata-yellow .boulder-aside {
    border-color: #1A1A1A;
    background: transparent;
}

/* Typography */
.display-title {
    font-family: 'Bungee', cursive;
    font-weight: 400;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.05;
}

.display-title.blue { color: #3366FF; }
.display-title.yellow { color: #FFCC00; }
.display-title.pink { color: #FF3366; }

.body-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    line-height: 1.7;
    color: #1A1A1A;
}

.body-text.light { color: #FFFBF0; }
.body-text.dark { color: #1A1A1A; }

.quest-label {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #FFFBF0;
    background: #1A1A1A;
    padding: 4px 12px;
    margin-top: 12px;
}

.quest-label.dark {
    color: #1A1A1A;
    background: #FFFBF0;
}

.quest-label.gold {
    color: #1A1A1A;
    background: #FFCC00;
}

.italic-note {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: #FFFBF0;
}

.italic-note.dark {
    color: #1A1A1A;
}

/* X Mark */
.x-mark {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.x-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 6px;
    background: #FF3366;
}

.x-line-1 {
    transform: translate(-50%, -50%) rotate(45deg);
}

.x-line-2 {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Bounce enter animation */
@keyframes bounceEnter {
    0% { opacity: 0; transform: translateY(30px) scale(0.95); }
    60% { opacity: 1; transform: translateY(-5px) scale(1.03); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes waypointPop {
    0% { opacity: 0; transform: scale(0); }
    80% { transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

/* Hover on boulders */
.boulder:hover {
    box-shadow: 10px 10px 0 #1A1A1A;
    transition: box-shadow 0.2s ease;
}

.strata-dark .boulder:hover {
    box-shadow: 10px 10px 0 #FFCC00;
}

/* Responsive */
@media (max-width: 768px) {
    .strata {
        padding: 60px 6vw;
    }
    .boulder {
        max-width: 100%;
    }
}
