/* mujun.cafe — Cottagecore / Dark-mode Paradox Split */

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

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
}

/* ========================
   Mobile Toggle
   ======================== */
#mobile-toggle {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(90deg, #FFF8EE 50%, #121212 50%);
    padding: 12px 20px;
    text-align: center;
    border-bottom: 1px solid #C4A882;
}

.toggle-btn {
    padding: 8px 24px;
    border: 1px solid #C4A882;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s, color 0.3s;
}

.toggle-btn[data-view="analog"] {
    font-family: 'Playfair Display', serif;
    color: #3A2A1A;
    border-color: #C4A882;
    border-radius: 4px 0 0 4px;
}

.toggle-btn[data-view="digital"] {
    font-family: 'JetBrains Mono', monospace;
    color: #E0E0E0;
    border-color: #4A4A4A;
    background: #2A2A2A;
    border-radius: 0 4px 4px 0;
}

.toggle-btn.active[data-view="analog"] {
    background: #C4A882;
    color: #FFF8EE;
}

.toggle-btn.active[data-view="digital"] {
    background: #4A9EFF;
    color: #121212;
}

/* ========================
   Split Container
   ======================== */
#split-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

.half {
    flex: 1;
    min-height: 100vh;
    overflow-y: auto;
    padding: 40px;
}

/* ========================
   Analog Side (Left)
   ======================== */
#analog-side {
    background-color: #FFF8EE;
    opacity: 0;
    animation: fadeAnalog 0.3s ease-out 0.2s forwards;
}

@keyframes fadeAnalog {
    from { background-color: #FFFFFF; opacity: 0; }
    to { background-color: #FFF8EE; opacity: 1; }
}

/* Navigation - Analog */
#nav-analog {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #C4A882;
    margin-bottom: 60px;
}

#nav-analog a {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 16px;
    color: #3A2A1A;
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
}

#nav-analog a:hover {
    color: #8B6B4A;
}

#nav-analog a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #C4A882;
    transition: width 0.3s;
}

#nav-analog a:hover::after {
    width: 100%;
}

/* Analog Sections */
.section-analog {
    padding: 50px 20px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-analog.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-analog h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 32px;
    color: #3A2A1A;
    margin-bottom: 8px;
}

.section-analog p {
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.8;
    color: #5A4A3A;
    margin-top: 20px;
    max-width: 480px;
}

/* Analog Hero */
#hero-analog {
    text-align: center;
    padding: 80px 20px 60px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero-analog .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title-analog {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 48px;
    color: #3A2A1A;
    margin-top: 30px;
    letter-spacing: 0.02em;
}

.subtitle-analog {
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-size: 18px;
    color: #5A4A3A;
    margin-top: 12px;
    font-style: italic;
}

.wavy-underline {
    display: block;
    margin: 10px auto 0;
    opacity: 0.7;
}

/* Coffee Cup Analog */
.coffee-cup-analog {
    display: block;
    margin: 0 auto;
}

/* Steam Analog - Organic */
.steam-analog {
    opacity: 0;
    animation: steamOrganic 3s ease-in-out infinite;
}

.steam-1 { animation-delay: 0s; }
.steam-2 { animation-delay: 0.6s; }
.steam-3 { animation-delay: 1.2s; }

@keyframes steamOrganic {
    0% { opacity: 0; transform: translateY(0) translateX(0); }
    20% { opacity: 0.6; }
    50% { opacity: 0.4; transform: translateY(-20px) translateX(3px); }
    80% { opacity: 0.15; transform: translateY(-40px) translateX(-2px); }
    100% { opacity: 0; transform: translateY(-60px) translateX(1px); }
}

/* Flower & Vine Motifs */
.flower-motif {
    display: block;
    margin: 30px auto 0;
    opacity: 0.6;
}

.vine-motif {
    display: block;
    margin: 30px auto 0;
    opacity: 0.5;
}

/* Menu Items Analog */
.menu-items-analog {
    margin-top: 24px;
}

.menu-item-analog {
    padding: 16px 0;
    border-bottom: 1px solid #C4A882;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item-analog .item-name {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 20px;
    color: #3A2A1A;
}

.menu-item-analog .item-desc {
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-size: 15px;
    color: #8B6B4A;
    font-style: italic;
}

/* Closing Analog */
.closing-analog {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 20px;
    color: #3A2A1A;
    margin-top: 30px;
    text-align: center;
}

/* ========================
   Divider
   ======================== */
#divider {
    width: 2px;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

#divider-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
}

#divider-line {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawDivider 1s ease-out 0.4s forwards;
}

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

/* Crossover Elements */
.crossover {
    position: absolute;
    left: -39px;
    width: 80px;
    z-index: 11;
}

.crossover-1 { top: 25%; }
.crossover-2 { top: 50%; }
.crossover-3 { top: 75%; }

/* ========================
   Digital Side (Right)
   ======================== */
#digital-side {
    background-color: #121212;
    opacity: 0;
    animation: fadeDigital 0.3s ease-out 0.2s forwards;
}

@keyframes fadeDigital {
    from { background-color: #000000; opacity: 0; }
    to { background-color: #121212; opacity: 1; }
}

/* Navigation - Digital */
#nav-digital {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #4A4A4A;
    margin-bottom: 60px;
}

#nav-digital a {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 14px;
    color: #A0A0A0;
    text-decoration: none;
    transition: color 0.3s;
}

#nav-digital a:hover {
    color: #4A9EFF;
}

#nav-digital a::before {
    content: '> ';
    color: #4A9EFF;
    opacity: 0;
    transition: opacity 0.3s;
}

#nav-digital a:hover::before {
    opacity: 1;
}

/* Digital Sections */
.section-digital {
    padding: 50px 20px;
    position: relative;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-digital.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-digital h2 {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 28px;
    color: #E0E0E0;
    margin-bottom: 8px;
}

.section-digital p,
.section-digital .digital-text {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.6;
    color: #A0A0A0;
    margin-top: 20px;
    max-width: 480px;
}

/* Digital Hero */
#hero-digital {
    text-align: center;
    padding: 80px 20px 60px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero-digital .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title-digital {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 40px;
    color: #E0E0E0;
    margin-top: 30px;
    letter-spacing: 0.04em;
}

.subtitle-digital {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 14px;
    color: #A0A0A0;
    margin-top: 12px;
}

/* Coffee Cup Digital */
.coffee-cup-digital {
    display: block;
    margin: 0 auto;
}

/* Steam Digital - Mathematical sine wave */
.steam-digital {
    opacity: 0;
    animation: steamDigital 4s linear infinite;
}

.steam-d1 { animation-delay: 0s; }
.steam-d2 { animation-delay: 1.33s; }
.steam-d3 { animation-delay: 2.66s; }

@keyframes steamDigital {
    0% { opacity: 0; transform: translateY(0) translateX(0); }
    10% { opacity: 0.7; }
    25% { transform: translateY(-10px) translateX(5px); }
    50% { opacity: 0.5; transform: translateY(-20px) translateX(-5px); }
    75% { transform: translateY(-30px) translateX(5px); opacity: 0.25; }
    100% { opacity: 0; transform: translateY(-40px) translateX(-5px); }
}

/* Cursor Blink */
.cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Dot Grid Background */
.dot-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, #2A2A2A 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.section-digital > *:not(.dot-grid-bg) {
    position: relative;
    z-index: 1;
}

/* Menu Items Digital */
.menu-items-digital {
    margin-top: 24px;
    position: relative;
    z-index: 1;
}

.menu-item-digital {
    padding: 14px 0;
    border-bottom: 1px solid #2A2A2A;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item-digital .item-key {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 16px;
    color: #4A9EFF;
}

.menu-item-digital .item-val {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 13px;
    color: #A0A0A0;
}

/* Closing Digital */
.closing-digital {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    color: #4A9EFF;
    margin-top: 30px;
}

/* ========================
   Mobile Responsive
   ======================== */
@media (max-width: 768px) {
    #mobile-toggle {
        display: flex;
        justify-content: center;
        gap: 0;
    }

    #split-container {
        flex-direction: column;
    }

    .half {
        min-height: 100vh;
        padding: 70px 24px 40px;
    }

    #divider {
        display: none;
    }

    #digital-side {
        display: none;
    }

    body.view-digital #analog-side {
        display: none;
    }

    body.view-digital #digital-side {
        display: block;
    }

    body.view-analog #analog-side {
        display: block;
    }

    body.view-analog #digital-side {
        display: none;
    }

    .title-analog {
        font-size: 36px;
    }

    .title-digital {
        font-size: 30px;
    }

    #nav-analog,
    #nav-digital {
        gap: 18px;
    }

    .crossover {
        display: none;
    }
}
