/* ============================================
   mujun.works — Botanical Immersive Garden
   ============================================ */

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

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

body {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.9;
    color: #4A4838;
    background-color: #F6F2E6;
    overflow-x: hidden;
}

/* --- Retro Pattern Overlay (Herringbone) --- */
.retro-pattern-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.08;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            #D0C8B0 10px,
            #D0C8B0 11px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 10px,
            #D0C8B0 10px,
            #D0C8B0 11px
        );
    background-size: 22px 22px;
}

/* --- Garden Sections --- */
.garden-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    z-index: 1;
}

/* --- Botanical Frame --- */
.botanical-frame {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.vine-border {
    position: absolute;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.vine-border-top {
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
}

.vine-border-bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
}

.vine-border-left {
    top: 0;
    left: 0;
    width: 80px;
    height: 100%;
}

.vine-border-right {
    top: 0;
    right: 0;
    width: 80px;
    height: 100%;
}

.garden-section.is-visible .vine-border {
    opacity: 1;
}

.vine-stem {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 2s ease-out;
}

.garden-section.is-visible .vine-stem {
    stroke-dashoffset: 0;
}

.vine-leaf {
    transform: scale(0);
    transform-origin: center;
    transition: transform 0.6s ease;
}

.garden-section.is-visible .vine-leaf {
    transform: scale(1);
}

.garden-section.is-visible .vine-leaf.leaf-1 { transition-delay: 0.5s; }
.garden-section.is-visible .vine-leaf.leaf-2 { transition-delay: 0.7s; }
.garden-section.is-visible .vine-leaf.leaf-3 { transition-delay: 0.9s; }
.garden-section.is-visible .vine-leaf.leaf-4 { transition-delay: 1.1s; }
.garden-section.is-visible .vine-leaf.leaf-5 { transition-delay: 1.3s; }

.vine-flower {
    transform: scale(0);
    transform-origin: center;
    transition: transform 0.4s ease;
}

.garden-section.is-visible .vine-flower {
    transform: scale(1);
    transition-delay: 1.5s;
}

/* --- Section Content --- */
.section-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.garden-section.is-visible .section-content {
    opacity: 1;
    transform: translateY(0);
}

/* --- Typography --- */
.section-heading {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    color: #2A2818;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.garden-note {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: 1.15rem;
    color: #7A8A60;
    display: inline-block;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    flex-direction: column;
    text-align: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-note {
    font-size: 1.3rem;
    letter-spacing: 0.05em;
}

.hero-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6rem);
    color: #2A2818;
    letter-spacing: 0.05em;
    line-height: 1.1;
}

.bloom-accent {
    color: #C08070;
}

.hero-tagline {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: #4A4838;
    max-width: 520px;
    line-height: 1.9;
}

.scroll-invite {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease 2s forwards;
}

.scroll-arrow {
    animation: bobDown 2s ease-in-out infinite;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- About Section --- */
.about-section {
    min-height: 90vh;
}

.about-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.about-text-block {
    max-width: 640px;
}

.about-text-block p {
    margin-bottom: 1.2rem;
}

.about-text-block p:last-child {
    margin-bottom: 0;
}

.botanical-divider {
    margin-top: 2rem;
    opacity: 0.7;
}

/* --- Works Section --- */
.works-section {
    min-height: 100vh;
    padding-top: 100px;
    padding-bottom: 100px;
}

.works-content {
    max-width: 960px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.works-garden {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-top: 2.5rem;
    width: 100%;
}

.work-plant {
    position: relative;
    text-align: left;
    padding: 2rem;
    border: 1.5px solid #D0C8B0;
    border-radius: 2px;
    transition: border-color 150ms ease, transform 300ms ease;
    background: rgba(246, 242, 230, 0.6);
}

.work-plant:hover {
    border-color: #7A8A60;
    transform: translateY(-4px);
}

.plant-stem {
    position: absolute;
    top: -20px;
    left: 50%;
    width: 2px;
    height: 20px;
    background: linear-gradient(to bottom, transparent, #5A6A48);
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.garden-section.is-visible .plant-stem {
    opacity: 1;
}

.plant-bloom {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.work-season {
    font-size: 0.95rem;
}

.work-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #2A2818;
    transition: color 150ms ease;
}

.work-plant:hover .work-title {
    color: #C08070;
}

.work-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #4A4838;
}

.work-tag {
    font-family: 'Caveat', cursive;
    font-size: 0.95rem;
    color: #7A8A60;
    margin-top: 0.5rem;
}

/* Work plant growth states */
.work-plant[data-growth="growing"] {
    border-style: dashed;
}

.work-plant[data-growth="growing"] .plant-stem {
    height: 12px;
}

/* --- Process Section --- */
.process-section {
    min-height: 90vh;
}

.process-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.process-seasons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2.5rem;
    width: 100%;
    max-width: 960px;
}

.season-card {
    text-align: center;
    padding: 2rem 1.2rem;
    border: 1px solid transparent;
    border-radius: 2px;
    transition: border-color 150ms ease, transform 300ms ease;
}

.season-card:hover {
    border-color: #D0C8B0;
    transform: translateY(-3px);
}

.season-icon {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    transition: transform 300ms ease;
}

.season-card:hover .season-icon {
    transform: rotate(15deg);
}

.season-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #2A2818;
    margin-bottom: 0.75rem;
}

.season-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #4A4838;
}

/* --- Journal Section --- */
.journal-section {
    min-height: 90vh;
}

.journal-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.journal-entries {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 2.5rem;
    width: 100%;
    max-width: 640px;
    text-align: left;
}

.journal-entry {
    padding: 1.5rem 2rem;
    border-left: 2px solid #D0C8B0;
    transition: border-color 150ms ease;
}

.journal-entry:hover {
    border-color: #C08070;
}

.entry-date {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.entry-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #2A2818;
    margin-bottom: 0.5rem;
    transition: color 150ms ease;
}

.journal-entry:hover .entry-title {
    color: #C08070;
}

.entry-excerpt {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #4A4838;
}

/* --- Gate Section (Contact) --- */
.gate-section {
    min-height: 80vh;
}

.gate-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.gate-invitation {
    max-width: 520px;
    font-size: 1.05rem;
    line-height: 1.9;
    color: #4A4838;
}

.gate-links {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.gate-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
    padding: 1.5rem 2.5rem;
    border: 1.5px solid #D0C8B0;
    border-radius: 2px;
    transition: border-color 150ms ease, transform 300ms ease;
}

.gate-link:hover {
    border-color: #7A8A60;
    transform: translateY(-3px);
}

.gate-link-label {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #2A2818;
    position: relative;
}

.gate-link-label::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background-color: #C08070;
    transition: width 300ms ease;
}

.gate-link:hover .gate-link-label::after {
    width: 100%;
}

.gate-link-note {
    font-size: 0.9rem;
}

.garden-footer {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-note {
    font-size: 1rem;
    opacity: 0.7;
}

/* --- Cross-Hatch Texture for Alternating Sections --- */
.about-section::before,
.process-section::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 8px,
            #D0C8B0 8px,
            #D0C8B0 9px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 8px,
            #D0C8B0 8px,
            #D0C8B0 9px
        );
    background-size: 18px 18px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .garden-section {
        padding: 60px 24px;
    }

    .works-garden {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .process-seasons {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .gate-links {
        flex-direction: column;
        gap: 1.5rem;
    }

    .vine-border-left,
    .vine-border-right {
        display: none;
    }

    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
}

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

    .garden-section {
        padding: 50px 18px;
    }

    .work-plant {
        padding: 1.5rem;
    }

    .gate-link {
        padding: 1.2rem 1.8rem;
    }
}

/* --- Smooth Scroll Sections Staggered Entry --- */
.garden-section:nth-child(2) .section-content { transition-delay: 0.1s; }
.garden-section:nth-child(3) .section-content { transition-delay: 0.15s; }
.garden-section:nth-child(4) .section-content { transition-delay: 0.1s; }
.garden-section:nth-child(5) .section-content { transition-delay: 0.15s; }
.garden-section:nth-child(6) .section-content { transition-delay: 0.1s; }

/* --- Selection Color --- */
::selection {
    background-color: #C08070;
    color: #F6F2E6;
}
