/* bada.cafe — Sunset Warm Marble Cafe */

:root {
    --espresso-marble: #3a1c0e;
    --cinnabar-dusk: #c4512a;
    --amber-candle: #e8913a;
    --sunset-gold: #f0c060;
    --cream-marble: #f5e6d8;
    --rose-horizon: #d4867a;
    --twilight-sea: #2c3e5a;
    --warm-umber: #5c3d2e;
    --warm-bronze: #a07856;
    --sun-progress: 0;
    --elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

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

body {
    font-family: 'Source Serif 4', Georgia, serif;
    color: var(--warm-umber);
    background: var(--cream-marble);
    background-image:
        repeating-linear-gradient(125deg, transparent, transparent 40px, rgba(58, 28, 14, 0.03) 40px, rgba(58, 28, 14, 0.03) 41px),
        radial-gradient(ellipse at 20% 30%, rgba(196, 81, 42, 0.04), transparent 70%),
        radial-gradient(ellipse at 70% 60%, rgba(196, 81, 42, 0.03), transparent 60%),
        radial-gradient(ellipse at 30% 40%, rgba(240, 192, 96, 0.08), rgba(245, 230, 216, 0.3) 45%, rgba(212, 134, 122, 0.05) 100%);
    transition: background 0.5s ease;
    overflow-x: hidden;
}

/* ===== MARBLE SURFACE MIXIN ===== */
.marble-surface,
.marble-panel {
    background-color: var(--cream-marble);
    background-image:
        repeating-linear-gradient(125deg, transparent, transparent 40px, rgba(58, 28, 14, 0.03) 40px, rgba(58, 28, 14, 0.03) 41px),
        radial-gradient(ellipse at 30% 50%, rgba(196, 81, 42, 0.04), transparent 70%);
    filter: url(#marble-turbulence);
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.5),
        0 4px 12px rgba(58, 28, 14, 0.08),
        0 12px 40px rgba(58, 28, 14, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
}

/* ===== TYPOGRAPHY ===== */
.arrival-title,
.section-heading,
.evening-title {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    color: var(--espresso-marble);
    text-shadow: 0 1px 2px rgba(58, 28, 14, 0.15);
    letter-spacing: -0.01em;
}

.body-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    color: var(--warm-umber);
}

.arrival-korean,
.korean-display,
.korean-translation,
.nav-links a {
    font-family: 'Noto Sans KR', sans-serif;
}

/* ===== SEA HORIZON BAND ===== */
.sea-horizon-band {
    position: fixed;
    top: 61.8%;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #2c3e5a 0%, #d4867a 30%, #f0c060 50%, #d4867a 70%, #2c3e5a 100%);
    background-size: 200% 100%;
    z-index: 5;
    opacity: 0.15;
    pointer-events: none;
    animation: shimmer 12s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ===== NAVIGATION ===== */
.side-nav {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 100;
    transition: opacity 0.5s ease;
}

.side-nav.faded {
    opacity: 0.15;
}

.side-nav:hover {
    opacity: 1 !important;
}

.nav-logo {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--espresso-marble);
    text-shadow: 0 1px 2px rgba(58, 28, 14, 0.15);
    margin-bottom: 1rem;
}

.nav-cafe {
    font-weight: 600;
    font-size: 0.9em;
    opacity: 0.7;
}

.nav-links {
    list-style: none;
}

.nav-links li {
    margin-bottom: 0.5rem;
}

.nav-links a {
    font-size: clamp(0.75rem, 1.4vw, 0.9rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--warm-bronze);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--cinnabar-dusk);
}

/* ===== MOMENTS (SECTIONS) ===== */
.moment {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* ===== MOMENT 1: ARRIVAL ===== */
.moment-arrival {
    background: radial-gradient(ellipse at 30% 40%, rgba(240, 192, 96, 0.25) 0%, rgba(245, 230, 216, 0.6) 45%, rgba(212, 134, 122, 0.08) 100%);
    justify-content: flex-start;
    padding-left: 15%;
}

.arrival-content {
    position: relative;
    z-index: 10;
}

.arrival-title {
    font-size: clamp(4rem, 12vw, 8rem);
    line-height: 1;
    margin-bottom: 0.2em;
}

.arrival-korean {
    font-size: clamp(2.4rem, 7vw, 4.8rem);
    font-weight: 400;
    color: var(--warm-bronze);
    opacity: 0;
    animation: fadeInKorean 0.8s ease 0.8s forwards;
}

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

.arrival-panel {
    max-width: 420px;
    padding: 2rem 2.5rem;
    margin-top: 2rem;
    transform: translateX(80px) rotate(2deg) scale(0.9);
    opacity: 0;
    animation: elasticSlideIn 0.9s var(--elastic) 1.2s forwards;
}

@keyframes elasticSlideIn {
    to {
        transform: translateX(0) rotate(1.5deg) scale(1);
        opacity: 1;
    }
}

.panel-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(1rem, 1.6vw, 1.1rem);
    line-height: 1.72;
    color: var(--warm-umber);
    font-style: italic;
}

/* ===== MOMENT 2: THE VIEW ===== */
.moment-view {
    justify-content: flex-start;
    align-items: stretch;
}

.view-panel-left {
    width: 62%;
    min-height: 100vh;
    padding: 6rem 5rem 4rem 4rem;
    transform: rotate(-1.5deg);
    transform-origin: top left;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.view-panel-left .panel-inner {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-heading {
    font-size: clamp(2.8rem, 6vw, 5.2rem);
    margin-bottom: 1.5rem;
    line-height: 1.05;
}

.view-side-column {
    width: 38%;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.body-text + .body-text {
    margin-top: 1.2rem;
}

/* ===== WAVE BORDER ===== */
.wave-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 12px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 20px,
        rgba(44, 62, 90, 0.08) 20px,
        rgba(44, 62, 90, 0.08) 22px
    );
    overflow: hidden;
}

.wave-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cpath d='M0 6 Q15 0 30 6 T60 6 T90 6 T120 6 V12 H0 Z' fill='rgba(44,62,90,0.08)'/%3E%3C/svg%3E") repeat-x;
    background-size: 120px 12px;
    animation: waveScroll 60s linear infinite;
}

@keyframes waveScroll {
    to { transform: translateX(50%); }
}

/* ===== MOMENT 3: AROMA ===== */
.moment-aroma {
    justify-content: flex-end;
}

.aroma-scattered {
    position: absolute;
    top: 0;
    left: 0;
    width: 38%;
    height: 100%;
    pointer-events: none;
}

.marble-fragment {
    position: absolute;
    background-color: var(--cream-marble);
    background-image:
        repeating-linear-gradient(125deg, transparent, transparent 20px, rgba(58, 28, 14, 0.03) 20px, rgba(58, 28, 14, 0.03) 21px);
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.5),
        0 4px 12px rgba(58, 28, 14, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    opacity: 0;
    transform: translateY(40px) rotate(5deg) scale(0.9);
}

.marble-fragment.visible {
    animation: elasticBounce 0.9s var(--elastic) forwards;
}

.fragment-1 {
    width: 160px;
    height: 100px;
    top: 20%;
    left: 10%;
    transform: rotate(3deg);
    animation-delay: 0.1s;
}

.fragment-2 {
    width: 120px;
    height: 140px;
    top: 45%;
    left: 25%;
    transform: rotate(-2deg);
    animation-delay: 0.3s;
}

.fragment-3 {
    width: 180px;
    height: 80px;
    top: 70%;
    left: 5%;
    transform: rotate(4deg);
    animation-delay: 0.5s;
}

@keyframes elasticBounce {
    to {
        opacity: 1;
        transform: translateY(0) rotate(var(--frag-rot, 2deg)) scale(1);
    }
}

/* Aero Glass Panel */
.aero-panel {
    background: rgba(44, 62, 90, 0.92);
    backdrop-filter: blur(8px) saturate(1.2);
    -webkit-backdrop-filter: blur(8px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 12px 40px rgba(44, 62, 90, 0.3);
    position: relative;
    overflow: hidden;
}

.aero-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 50%);
    pointer-events: none;
}

.aroma-panel-right {
    width: 55%;
    max-width: 640px;
    padding: 4rem 3.5rem;
    margin-right: 5%;
    transform: rotate(1deg);
}

.aero-heading {
    color: var(--sunset-gold);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.aero-text {
    color: var(--cream-marble);
}

/* ===== MOMENT 4: TWILIGHT ===== */
.moment-twilight {
    justify-content: center;
    padding: 4rem;
}

.twilight-panel {
    max-width: 650px;
    padding: 4rem 3.5rem;
    margin-left: 15%;
    transform: rotate(-1deg);
    position: relative;
}

.korean-display {
    font-family: 'Zilla Slab Highlight', 'Zilla Slab', serif;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    color: var(--espresso-marble);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.korean-translation {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(0.9rem, 1.6vw, 1.05rem);
    font-style: italic;
    color: var(--warm-bronze);
    margin-bottom: 2rem;
}

/* ===== MOMENT 5: EVENING ===== */
.moment-evening {
    background: var(--twilight-sea);
    background-image: radial-gradient(ellipse at 25% 30%, rgba(240, 192, 96, 0.15) 0%, transparent 50%);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.evening-content {
    text-align: center;
    z-index: 10;
}

.evening-title {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--sunset-gold);
    text-shadow: 0 2px 20px rgba(240, 192, 96, 0.3);
    margin-bottom: 2rem;
}

.evening-info {
    margin-top: 1rem;
}

.evening-detail {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(0.9rem, 1.4vw, 1.05rem);
    color: var(--cream-marble);
    opacity: 0.8;
    line-height: 1.8;
}

.evening-hours {
    font-style: italic;
    margin-top: 0.5rem;
    opacity: 0.6;
}

/* ===== CANDLES ===== */
.candle {
    position: absolute;
    width: 14px;
    height: 22px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: radial-gradient(ellipse at 50% 40%, #f0c060 0%, #e8913a 40%, #c4512a 70%, transparent 100%);
    box-shadow:
        0 0 40px 20px rgba(240, 192, 96, 0.12),
        0 0 80px 40px rgba(232, 145, 58, 0.06);
    z-index: 20;
    pointer-events: all;
    cursor: default;
    animation: flicker var(--flicker-dur, 3.2s) cubic-bezier(0.4, 0, 0.6, 1) infinite;
    animation-delay: var(--flicker-delay, 0s);
    transition: box-shadow 0.4s var(--elastic);
}

.candle:hover {
    box-shadow:
        0 0 80px 40px rgba(240, 192, 96, 0.2),
        0 0 160px 80px rgba(232, 145, 58, 0.1);
}

@keyframes flicker {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    25% { transform: scale(0.97) rotate(-1.5deg); opacity: 0.92; }
    50% { transform: scale(1.03) rotate(1deg); opacity: 0.88; }
    75% { transform: scale(0.96) rotate(-0.5deg); opacity: 0.95; }
}

/* Candle positions — Moment 1 (bottom-right cluster) */
.candle-1 { bottom: 15%; right: 8%; --flicker-dur: 3.1s; --flicker-delay: 0s; }
.candle-2 { bottom: 12%; right: 12%; --flicker-dur: 2.9s; --flicker-delay: 0.4s; }
.candle-3 { bottom: 18%; right: 5%; --flicker-dur: 3.6s; --flicker-delay: 0.8s; }

/* Candle positions — Moment 2 (side column) */
.candle-4 { top: 35%; right: 6%; --flicker-dur: 3.4s; --flicker-delay: 0.2s; }
.candle-5 { top: 65%; right: 10%; --flicker-dur: 2.8s; --flicker-delay: 0.7s; }

/* Candle positions — Moment 3 (many scattered) */
.candle-6 { top: 10%; left: 3%; --flicker-dur: 3.0s; --flicker-delay: 0.1s; }
.candle-7 { top: 25%; right: 3%; --flicker-dur: 4.0s; --flicker-delay: 0.5s; }
.candle-8 { top: 40%; left: 15%; --flicker-dur: 2.9s; --flicker-delay: 0.3s; }
.candle-9 { top: 55%; left: 8%; --flicker-dur: 3.5s; --flicker-delay: 0.9s; }
.candle-10 { top: 70%; right: 8%; --flicker-dur: 3.2s; --flicker-delay: 0.2s; }
.candle-11 { top: 85%; left: 20%; --flicker-dur: 4.2s; --flicker-delay: 0.6s; }
.candle-12 { top: 50%; right: 15%; --flicker-dur: 3.8s; --flicker-delay: 1.1s; }

/* Candle positions — Moment 4 */
.candle-13 { top: 20%; right: 10%; --flicker-dur: 3.3s; --flicker-delay: 0.4s; }
.candle-14 { top: 50%; left: 5%; --flicker-dur: 2.8s; --flicker-delay: 0.8s; }
.candle-15 { top: 75%; right: 15%; --flicker-dur: 3.7s; --flicker-delay: 0.1s; }
.candle-16 { top: 40%; right: 25%; --flicker-dur: 4.1s; --flicker-delay: 0.5s; }

/* Candle positions — Moment 5 */
.candle-17 { top: 20%; left: 15%; --flicker-dur: 3.0s; --flicker-delay: 0.3s; }
.candle-18 { top: 40%; right: 20%; --flicker-dur: 3.6s; --flicker-delay: 0.7s; }
.candle-19 { top: 60%; left: 25%; --flicker-dur: 2.9s; --flicker-delay: 0.2s; }
.candle-20 { top: 30%; right: 8%; --flicker-dur: 4.0s; --flicker-delay: 0.9s; }
.candle-21 { top: 70%; left: 10%; --flicker-dur: 3.4s; --flicker-delay: 0.5s; }

/* ===== ANIMATED ENTRANCE STATES ===== */
[data-animate] {
    opacity: 0;
}

[data-animate='slide-right'] {
    transform: translateX(80px) rotate(5deg) scale(0.9);
}

[data-animate='slide-left'] {
    transform: translateX(-80px) rotate(-5deg) scale(0.9);
}

[data-animate='slide-up'] {
    transform: translateY(60px) rotate(-2deg) scale(0.95);
}

[data-animate].visible {
    opacity: 1;
    transform: translateX(0) rotate(var(--panel-rot, 0deg)) scale(1);
    transition: transform 0.9s var(--elastic), opacity 0.9s ease;
}

.arrival-panel[data-animate].visible {
    --panel-rot: 1.5deg;
}

.view-panel-left[data-animate].visible {
    --panel-rot: -1.5deg;
}

.aroma-panel-right[data-animate].visible {
    --panel-rot: 1deg;
}

.twilight-panel[data-animate].visible {
    --panel-rot: -1deg;
}

/* ===== FRUTIGER AERO GLOSS (links) ===== */
.nav-links a {
    position: relative;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== SCROLL-DRIVEN BODY TRANSITIONS ===== */
body.phase-arrival {
    background-color: var(--cream-marble);
}

body.phase-view {
    background-image:
        repeating-linear-gradient(125deg, transparent, transparent 40px, rgba(58, 28, 14, 0.03) 40px, rgba(58, 28, 14, 0.03) 41px),
        radial-gradient(ellipse at 30% 40%, rgba(240, 192, 96, 0.12) 0%, rgba(245, 230, 216, 0.4) 45%, rgba(212, 134, 122, 0.08) 100%);
}

body.phase-aroma {
    background-image:
        repeating-linear-gradient(125deg, transparent, transparent 40px, rgba(58, 28, 14, 0.03) 40px, rgba(58, 28, 14, 0.03) 41px),
        radial-gradient(ellipse at 30% 40%, rgba(212, 134, 122, 0.12) 0%, rgba(245, 230, 216, 0.3) 40%, rgba(44, 62, 90, 0.06) 100%);
}

body.phase-twilight {
    background-image:
        repeating-linear-gradient(125deg, transparent, transparent 40px, rgba(58, 28, 14, 0.02) 40px, rgba(58, 28, 14, 0.02) 41px),
        radial-gradient(ellipse at 30% 40%, rgba(212, 134, 122, 0.15) 0%, rgba(245, 230, 216, 0.2) 30%, rgba(44, 62, 90, 0.1) 100%);
}

body.phase-evening {
    background-color: var(--twilight-sea);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .side-nav {
        top: 1rem;
        left: 1rem;
    }

    .moment-arrival {
        padding-left: 8%;
    }

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

    .view-panel-left {
        width: 100%;
        transform: rotate(0deg);
        padding: 4rem 2rem;
    }

    .view-side-column {
        display: none;
    }

    .moment-view {
        flex-direction: column;
    }

    .aroma-scattered {
        display: none;
    }

    .aroma-panel-right {
        width: 90%;
        margin-right: auto;
        margin-left: auto;
    }

    .twilight-panel {
        margin-left: 5%;
        margin-right: 5%;
        padding: 3rem 2rem;
    }

    .sea-horizon-band {
        opacity: 0.08;
    }

    .nav-links {
        display: none;
    }
}
