/* munju.im - Anti-design aesthetic with zen-contemplative tone */
/* Colors: #1A1A28 #B8A898 #48A8A0 #C88870 #E8E4E0 #3A3A48 #6A9878 */
/* Font: Nunito (rounded sans-serif) */

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

html {
    scroll-behavior: auto; /* No smooth scroll - anti-design */
}

body {
    background-color: #1A1A28;
    color: #B8A898;
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    overflow-x: hidden;
}

/* SVG Filters (hidden) */
.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

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

/* ============================================
   SECTION BASE
   ============================================ */
.section-fragment,
.section-hero,
.section-silence {
    position: relative;
    margin-top: var(--section-margin, 0);
    overflow: hidden;
}

.section-fragment {
    background-color: var(--section-bg, #1A1A28);
}

/* ============================================
   HERO SECTION - Static Declaration
   ============================================ */
.section-hero {
    height: 100vh;
    background-color: #1A1A28;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    overflow: hidden;
}

.hero-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(60px, 15vw, 240px);
    color: #E8E4E0;
    line-height: 0.9;
    letter-spacing: -0.03em;
    white-space: nowrap;
    /* Text partially clipped by viewport */
    transform: translateX(-5%);
}

.hero-korean {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(30px, 6vw, 100px);
    color: #48A8A0;
    margin-top: 30px;
    letter-spacing: 0.05em;
    /* Rotated -5deg as per design */
}

/* ============================================
   SCATTERED GEOMETRIC ELEMENTS
   ============================================ */
.scattered-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.geo-fragment {
    position: absolute;
    display: block;
    opacity: 0.12;
    pointer-events: all;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.geo-fragment.scattered {
    transform: translate(var(--scatter-x, 0), var(--scatter-y, 0));
}

/* Triangle */
.geo-triangle {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 20px solid #B8A898;
    animation: drift-slow 30s ease-in-out infinite alternate;
}

/* Circle */
.geo-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #B8A898;
    animation: drift-slow 28s ease-in-out infinite alternate-reverse;
}

/* Line */
.geo-line {
    width: 30px;
    height: 2px;
    background-color: #B8A898;
    animation: drift-slow 32s ease-in-out infinite alternate;
}

@keyframes drift-slow {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(8px, -5px) rotate(3deg);
    }
    50% {
        transform: translate(-4px, 10px) rotate(-2deg);
    }
    75% {
        transform: translate(12px, 3px) rotate(5deg);
    }
    100% {
        transform: translate(-6px, -8px) rotate(-1deg);
    }
}

/* ============================================
   FRAGMENT SECTIONS
   ============================================ */

/* Fragment 1 - Short statement (20vh) */
#fragment-1 {
    min-height: 20vh;
    display: flex;
    align-items: center;
}

#fragment-1 .fragment-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Fragment 2 - Dense text (150vh) */
.section-dense {
    min-height: 150vh;
    display: flex;
    align-items: center;
}

.dense-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.body-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.1vw, 17px);
    line-height: 1.8;
    color: #B8A898;
}

/* Fragment 3 - Whispered text (short) */
#fragment-3 {
    min-height: 15vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

#fragment-3 .fragment-content {
    position: relative;
    z-index: 2;
}

.whispered-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 200;
    font-size: 13px;
    color: #B8A898;
    opacity: 0.7;
    letter-spacing: 0.05em;
}

/* Fragment 4 - Rotated large text */
.section-rotated {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rotated-content {
    position: relative;
    z-index: 2;
    padding: 60px 40px;
}

.display-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
}

/* Fragment 5 - Metadata style */
#fragment-5 {
    min-height: 30vh;
    display: flex;
    align-items: center;
}

#fragment-5 .fragment-content {
    position: relative;
    z-index: 2;
}

.metadata-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 200;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #B8A898;
    line-height: 2.4;
}

/* Fragment 6 - Philosophy */
.section-philosophy {
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.section-philosophy .fragment-content {
    position: relative;
    z-index: 2;
}

/* Fragment 7 - Short offset */
#fragment-7 {
    min-height: 10vh;
    display: flex;
    align-items: center;
}

#fragment-7 .fragment-content {
    position: relative;
    z-index: 2;
}

/* Fragment final */
#fragment-final {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#fragment-final .fragment-content {
    position: relative;
    z-index: 2;
}

/* ============================================
   TILT-3D PANELS
   ============================================ */
.section-tilt,
.section-tilt-alt {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 800px;
}

.tilt-3d-panel {
    position: relative;
    z-index: 2;
    transform: rotateX(3deg) rotateY(-2deg);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    padding: 60px 80px;
    max-width: 90%;
}

.tilt-3d-panel:hover {
    transform: rotateX(5deg) rotateY(-4deg);
}

.tilt-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(24px, 4vw, 64px);
    color: #E8E4E0;
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.tilt-text-small {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(16px, 2vw, 28px);
    color: #B8A898;
    text-align: center;
    letter-spacing: 0.1em;
}

/* ============================================
   SILENCE SECTION
   ============================================ */
.section-silence {
    height: 100vh;
    background-color: #1A1A28;
    display: flex;
    align-items: center;
    justify-content: center;
}

.silence-text {
    position: relative;
    z-index: 2;
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: 13px;
    color: #B8A898;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

/* ============================================
   SILENCE GRAIN TRANSITION
   ============================================ */
#silence-grain {
    transition: opacity 1.5s ease;
}

#silence-grain.faded {
    opacity: 0.05 !important;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: clamp(40px, 12vw, 120px);
    }

    .hero-korean {
        font-size: clamp(24px, 5vw, 60px);
    }

    #fragment-1 .fragment-text {
        font-size: clamp(20px, 5vw, 48px);
    }

    #fragment-1 .fragment-content {
        padding: 0 20px !important;
    }

    .dense-content {
        padding: 40px 20px !important;
    }

    .section-philosophy .fragment-content {
        padding: 60px 20px !important;
    }

    .tilt-3d-panel {
        padding: 30px 20px;
    }

    #fragment-5 .fragment-content {
        padding: 20px 30px !important;
    }

    #fragment-7 .fragment-content {
        margin-left: 20% !important;
    }

    .rotated-content {
        padding: 30px 20px;
    }
}
