/* munju.club — surreal earth-toned observatory */

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    background-color: #F2EDE4;
    color: #5A5040;
    overflow-x: hidden;
    position: relative;
}

/* ===== GRAIN OVERLAY ===== */
#grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ===== FLOATING GEOMETRY ===== */
#floating-geometry {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.geo-float {
    position: absolute;
    opacity: 0.12;
    color: #6A6050;
}

.geo-1 {
    width: 160px;
    height: 160px;
    top: 8%;
    right: 12%;
    animation: geo-drift-1 28s ease-in-out infinite;
}

.geo-2 {
    width: 120px;
    height: 120px;
    top: 35%;
    left: 5%;
    animation: geo-drift-2 34s ease-in-out infinite;
}

.geo-3 {
    width: 200px;
    height: 180px;
    top: 55%;
    right: 8%;
    animation: geo-drift-3 40s ease-in-out infinite;
}

.geo-4 {
    width: 100px;
    height: 100px;
    top: 75%;
    left: 15%;
    animation: geo-drift-4 30s ease-in-out infinite;
}

.geo-5 {
    width: 140px;
    height: 140px;
    top: 20%;
    left: 60%;
    animation: geo-drift-5 36s ease-in-out infinite;
}

.geo-6 {
    width: 80px;
    height: 80px;
    top: 90%;
    right: 25%;
    animation: geo-drift-6 24s ease-in-out infinite;
}

.geo-7 {
    width: 150px;
    height: 100px;
    top: 45%;
    left: 35%;
    animation: geo-drift-7 32s ease-in-out infinite;
}

@keyframes geo-drift-1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(15px, -20px) rotate(5deg); }
    50% { transform: translate(-10px, 10px) rotate(-3deg); }
    75% { transform: translate(20px, 15px) rotate(7deg); }
}

@keyframes geo-drift-2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-20px, 25px) rotate(-6deg); }
    66% { transform: translate(15px, -15px) rotate(4deg); }
}

@keyframes geo-drift-3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-25px, 10px) rotate(-4deg); }
    50% { transform: translate(10px, -20px) rotate(6deg); }
    75% { transform: translate(20px, 15px) rotate(-2deg); }
}

@keyframes geo-drift-4 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, -10px) rotate(8deg); }
}

@keyframes geo-drift-5 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(10px, 20px) rotate(3deg); }
    66% { transform: translate(-15px, -10px) rotate(-5deg); }
}

@keyframes geo-drift-6 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-10px, 15px) rotate(-10deg); }
    50% { transform: translate(20px, 5px) rotate(15deg); }
    75% { transform: translate(-5px, -20px) rotate(-5deg); }
}

@keyframes geo-drift-7 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, -15px) rotate(4deg); }
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 {
    font-family: 'IBM Plex Mono', monospace;
    color: #2A2418;
}

.panel-label, .label-text {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    color: #8A7A68;
}

/* ===== HERO SECTION ===== */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.hero-content {
    text-align: center;
    position: relative;
}

.hero-title {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    font-size: clamp(2.4rem, 6vw, 5rem);
    color: #2A2418;
    letter-spacing: 0.25em;
    margin-bottom: 1.2rem;
    opacity: 0;
    transform: scale(0.9);
    animation: hero-emerge 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

.hero-subtitle {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.75rem, 1.2vw, 0.95rem);
    color: #8A7A68;
    letter-spacing: 0.35em;
    text-transform: lowercase;
    opacity: 0;
    animation: fade-up 1.2s cubic-bezier(0.22, 1, 0.36, 1) 1.4s forwards;
}

@keyframes hero-emerge {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(10px);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

@keyframes fade-up {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    opacity: 0;
    animation: fade-up 1s cubic-bezier(0.22, 1, 0.36, 1) 2.2s forwards;
}

.scroll-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: #8A7A68;
    letter-spacing: 0.2em;
    text-transform: lowercase;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, #8A7A68, transparent);
    animation: scroll-pulse 2s ease-in-out infinite 3s;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.3); }
}

/* ===== DEPTH LAYER SECTIONS ===== */
.depth-layer {
    position: relative;
    z-index: 3;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    gap: 4rem;
}

#observatory {
    padding-top: 8rem;
}

/* ===== CONTENT PANELS (z-1 elevated cards) ===== */
.content-panel {
    position: relative;
    background-color: #D8D0C0;
    padding: 3rem 3.5rem;
    max-width: 680px;
    width: 100%;
    box-shadow: 0 6px 20px rgba(60, 50, 30, 0.1);
    /* Zoom-focus initial state */
    transform: scale(0.85);
    filter: blur(4px);
    opacity: 0;
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.content-panel.revealed {
    transform: scale(1);
    filter: blur(0);
    opacity: 1;
}

/* Depth offsets for panels */
.content-panel[data-depth="1"] {
    margin-left: -5%;
}

.content-panel[data-depth="2"] {
    margin-left: 8%;
}

.content-panel[data-depth="3"] {
    margin-left: -3%;
    margin-top: 2rem;
}

/* Panel label */
.panel-label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
}

/* Panel heading */
.panel-heading {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    color: #2A2418;
    line-height: 1.2;
    margin-bottom: 1.4rem;
}

/* Panel text */
.panel-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    line-height: 1.85;
    color: #5A5040;
}

/* ===== TERRACOTTA ACCENT ===== */
.content-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background-color: #B08060;
    transition: height 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
}

.content-panel.revealed::before {
    height: 100%;
}

/* ===== TERMINUS SECTION ===== */
#terminus {
    padding-bottom: 8rem;
}

.terminus-mark {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    margin-top: 4rem;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.terminus-mark.visible {
    opacity: 1;
}

.terminus-mark .label-text {
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    text-transform: lowercase;
    color: #8A7A68;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .content-panel {
        padding: 2rem 1.8rem;
        margin-left: 0 !important;
    }

    .depth-layer {
        padding: 4rem 1.2rem;
        gap: 3rem;
    }

    .hero-title {
        letter-spacing: 0.15em;
    }

    .geo-float {
        opacity: 0.06;
    }

    .geo-3,
    .geo-5,
    .geo-7 {
        display: none;
    }
}

@media (max-width: 480px) {
    .content-panel {
        padding: 1.5rem 1.2rem;
    }

    .hero-subtitle {
        letter-spacing: 0.15em;
    }

    .geo-2,
    .geo-4,
    .geo-6 {
        display: none;
    }
}
