/* ============================================
   mujun.day -- Paper-Craft Pop-up Book
   ============================================ */

/* -- Reset & Base -- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.7;
    color: #3A3028;
    background: #E8E0F0;
    overflow-x: hidden;
}

/* -- Paper Texture Overlay (Subtle Fiber Grain) -- */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.02;
    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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
}

/* -- Typography -- */
h1, h2, h3 {
    font-family: 'Caveat', cursive;
    font-weight: 700;
}

.logotype {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(48px, 8vw, 96px);
    color: #3A3028;
    letter-spacing: -0.02em;
}

.tagline {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #3A3028;
    opacity: 0.6;
    margin-top: 8px;
}

.section-title {
    font-size: clamp(28px, 4vw, 52px);
    margin-bottom: 24px;
    color: #3A3028;
}

.section-body {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.8;
}

/* -- Labels -- */
.feature-label,
.step-title,
.showcase-label {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ============================================
   HERO / OPENING VIEWPORT
   ============================================ */
.hero-viewport {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background: #E8E0F0;
}

.paper-scene {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1000px;
    transform-style: preserve-3d;
}

/* -- Paper Layers -- */
.paper-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

/* Background Layer: Sky Blue */
.layer-background {
    transform: translateZ(-80px) scale(1.08);
    background: #D8E8F8;
    z-index: 1;
}

/* Midground Layer: Mint Green */
.layer-midground {
    transform: translateZ(-30px) scale(1.03);
    z-index: 2;
    display: flex;
    align-items: flex-end;
    pointer-events: none;
}

.mountains-svg {
    width: 100%;
    height: 60%;
    display: block;
}

/* Foreground Layer: Lavender */
.layer-foreground {
    transform: translateZ(0);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* -- Logo Label -- */
.logo-label {
    text-align: center;
    padding: 32px 48px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 4px;
    box-shadow:
        2px 3px 6px rgba(0, 0, 0, 0.08),
        -1px 0 0 rgba(255, 255, 255, 0.5);
    transform: rotate(-1.5deg);
    pointer-events: auto;
    opacity: 0;
    animation: labelBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

@keyframes labelBounce {
    0% {
        opacity: 0;
        transform: rotate(-1.5deg) scale(0.5) translateY(-30px);
    }
    60% {
        opacity: 1;
        transform: rotate(-1.5deg) scale(1.05) translateY(4px);
    }
    100% {
        opacity: 1;
        transform: rotate(-1.5deg) scale(1) translateY(0);
    }
}

/* -- Clouds -- */
.cloud {
    position: absolute;
}

.cloud-1 {
    top: 8%;
    left: 10%;
    width: 180px;
    animation: cloudDrift1 20s ease-in-out infinite;
}

.cloud-2 {
    top: 15%;
    right: 12%;
    width: 150px;
    animation: cloudDrift2 25s ease-in-out infinite;
}

.cloud-3 {
    top: 25%;
    left: 45%;
    width: 120px;
    animation: cloudDrift3 22s ease-in-out infinite;
}

@keyframes cloudDrift1 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(30px); }
}

@keyframes cloudDrift2 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-25px); }
}

@keyframes cloudDrift3 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(20px); }
}

/* -- Cut-out Windows in Foreground -- */
.cutout-window {
    position: absolute;
    pointer-events: none;
}

.cutout-circle {
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 0 0 2000px rgba(232, 224, 240, 0.3);
}

.cutout-1 {
    width: 120px;
    height: 120px;
    top: 20%;
    left: 8%;
    box-shadow: 0 0 0 2000px transparent;
    border: 3px dashed rgba(58, 48, 40, 0.12);
    border-radius: 50%;
}

.cutout-2 {
    width: 160px;
    height: 100px;
    bottom: 25%;
    right: 6%;
    border-radius: 20px;
    border: 3px dashed rgba(58, 48, 40, 0.12);
}

.cutout-3 {
    width: 80px;
    height: 80px;
    bottom: 35%;
    left: 15%;
    border: 3px dashed rgba(58, 48, 40, 0.12);
    border-radius: 50%;
}

/* -- Scroll Hint -- */
.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: hintBob 2s ease-in-out infinite;
    opacity: 0.5;
}

@keyframes hintBob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================================
   FOLD-REVEAL SECTIONS
   ============================================ */
.fold-section {
    position: relative;
    padding: 20px 24px;
    perspective: 1200px;
}

.fold-panel {
    transform-origin: top center;
    transform: rotateX(75deg);
    opacity: 0;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.5s ease-out,
                box-shadow 0.7s ease-out;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.fold-panel.open {
    transform: rotateX(0deg);
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* -- Paper Cards -- */
.paper-card {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 48px;
    border-radius: 6px;
    text-align: center;
    box-shadow:
        2px 0 4px rgba(0, 0, 0, 0.08),
        -1px 0 0 rgba(255, 255, 255, 0.5);
}

.paper-edge-shadow {
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.06), transparent);
    border-radius: 6px 0 0 6px;
}

.paper-fold-crease {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(0, 0, 0, 0.04) 20%,
        rgba(0, 0, 0, 0.06) 50%,
        rgba(0, 0, 0, 0.04) 80%,
        transparent
    );
}

/* Card color variants */
.peach-card { background: #F8E0D8; }
.lemon-card { background: #F8F0D0; }
.sky-card { background: #D8E8F8; }
.mint-card { background: #D8F0E0; }
.lavender-card { background: #E8E0F0; }

/* ============================================
   FEATURES SECTION
   ============================================ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 32px;
}

.feature-item {
    text-align: center;
    padding: 24px 16px;
}

.feature-cutout {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
}

.feature-cutout svg {
    width: 100%;
    height: 100%;
}

.feature-label {
    font-size: 14px;
    margin-bottom: 8px;
    color: #3A3028;
}

.feature-text {
    font-size: clamp(13px, 0.9vw, 15px);
    line-height: 1.6;
    color: #3A3028;
    opacity: 0.8;
}

/* ============================================
   PROCESS SECTION
   ============================================ */
.process-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 32px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.process-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-align: left;
    padding: 20px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05), -1px 0 0 rgba(255, 255, 255, 0.4);
}

.step-number {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 32px;
    color: #3A3028;
    opacity: 0.25;
    line-height: 1;
    flex-shrink: 0;
}

.step-title {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 22px;
    margin-bottom: 4px;
    color: #3A3028;
}

.step-text {
    font-size: clamp(13px, 0.9vw, 15px);
    line-height: 1.6;
    color: #3A3028;
    opacity: 0.8;
}

/* ============================================
   SHOWCASE SECTION
   ============================================ */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.showcase-item {
    perspective: 600px;
}

.showcase-paper {
    position: relative;
    height: 200px;
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    box-shadow:
        2px 2px 6px rgba(0, 0, 0, 0.08),
        -1px -1px 0 rgba(255, 255, 255, 0.4);
    transition: transform 0.4s ease-out, box-shadow 0.4s ease-out;
    overflow: hidden;
}

.showcase-paper:hover {
    transform: translateY(-4px) rotateX(3deg);
    box-shadow:
        2px 6px 16px rgba(0, 0, 0, 0.12),
        -1px -1px 0 rgba(255, 255, 255, 0.4);
}

.lavender-paper { background: #E8E0F0; }
.peach-paper { background: #F8E0D8; }
.lemon-paper { background: #F8F0D0; }
.sky-paper { background: #D8E8F8; }

.showcase-cutout-circle {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.showcase-cutout-star {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    background: rgba(255, 255, 255, 0.45);
}

.showcase-cutout-rounded {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 45px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.showcase-label {
    position: relative;
    z-index: 2;
    color: #3A3028;
    font-size: 13px;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
    flex-wrap: wrap;
}

.paper-button {
    display: inline-block;
    padding: 14px 32px;
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 20px;
    color: #3A3028;
    background: rgba(255, 255, 255, 0.5);
    border: 2px dashed rgba(58, 48, 40, 0.2);
    border-radius: 4px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.06);
}

.paper-button:hover {
    transform: translateY(-2px) rotate(-1deg);
    box-shadow: 3px 4px 8px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.7);
}

.paper-button-alt {
    background: rgba(216, 240, 224, 0.5);
    border-color: rgba(58, 48, 40, 0.15);
}

.paper-button-alt:hover {
    background: rgba(216, 240, 224, 0.7);
}

/* ============================================
   FOOTER
   ============================================ */
.paper-footer {
    padding: 40px 24px;
    text-align: center;
    background: #F8F0D0;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.04);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-logo {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 24px;
    color: #3A3028;
}

.footer-divider {
    color: #3A3028;
    opacity: 0.3;
}

.footer-text {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #3A3028;
    opacity: 0.5;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .process-steps {
        grid-template-columns: 1fr;
    }

    .showcase-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .paper-card {
        padding: 40px 24px;
    }

    .cutout-1 {
        width: 80px;
        height: 80px;
        top: 15%;
        left: 5%;
    }

    .cutout-2 {
        width: 100px;
        height: 70px;
        bottom: 20%;
        right: 4%;
    }

    .cutout-3 {
        width: 55px;
        height: 55px;
        bottom: 30%;
        left: 10%;
    }

    .cloud-1 { width: 120px; }
    .cloud-2 { width: 100px; }
    .cloud-3 { width: 80px; }
}

@media (max-width: 480px) {
    .showcase-grid {
        grid-template-columns: 1fr;
    }

    .logo-label {
        padding: 24px 32px;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}
