/* bada.day - Cinematic Day at the Korean Sea */
/* Colors: #1A1A3E #FF6B6B #FFD93D #B8D4E3 #FFF9E6 #FF8E53 #7B2D8E #C0C7D1 */

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    line-height: 1.85;
    overflow-x: hidden;
    background: #1A1A3E;
    color: #FFF9E6;
}

/* ===== Sun Arc ===== */
#sun {
    position: fixed;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, #FFD93D 0%, #FF8E53 60%, rgba(255,142,83,0) 100%);
    box-shadow: 0 0 40px 20px rgba(255,217,61,0.4);
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* ===== Horizon Line ===== */
#horizon-line {
    position: fixed;
    top: 60vh;
    left: 0;
    width: 100%;
    height: 1px;
    background: #C0C7D1;
    opacity: 0.3;
    z-index: 5;
    pointer-events: none;
    transition: background 0.5s ease;
}

/* ===== Time Indicator ===== */
#time-indicator {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 50;
}

#time-display {
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(192,199,209,0.5);
}

/* ===== Time Sections ===== */
.time-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.section-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}

.content-left {
    text-align: left;
    margin-left: 15%;
    margin-right: auto;
}

/* ===== Wave Pulse ===== */
.wave-pulse {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5%;
    border-radius: 50% 50% 0 0;
    background: rgba(255,255,255,0.03);
    animation: waveBreathe 6s ease-in-out infinite;
}

@keyframes waveBreathe {
    0%, 100% { border-radius: 50% 50% 0 0; }
    50% { border-radius: 47% 53% 0 0; }
}

/* ===== Stars ===== */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle var(--twinkle-dur, 3s) ease-in-out infinite alternate;
    animation-delay: var(--twinkle-del, 0s);
}

@keyframes twinkle {
    0% { opacity: 0.2; }
    100% { opacity: 0.8; }
}

/* ===== Section Backgrounds ===== */
#predawn {
    background: linear-gradient(180deg, #1A1A3E 0%, #1A1A3E 55%, #2D1B4E 85%, #3D1F5E 100%);
}

#dawn {
    background: linear-gradient(180deg, #2D1B4E 0%, #6B2D5B 20%, #FF6B6B 50%, #FFD93D 80%, #FFF9E6 100%);
}

#morning {
    background: linear-gradient(180deg, #FFF9E6 0%, #E8F0F5 30%, #B8D4E3 60%, #A8C8D8 100%);
    color: #1A1A3E;
}

#noon {
    background: linear-gradient(180deg, #FFF9E6 0%, #FFFDF5 30%, #FFF9E6 70%, #B8D4E3 100%);
    color: #1A1A3E;
}

.sun-zenith {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,217,61,0.3) 0%, rgba(255,217,61,0.05) 50%, transparent 70%);
    pointer-events: none;
}

#afternoon {
    background: linear-gradient(180deg, #B8D4E3 0%, #FFD93D 40%, #FF8E53 70%, #FF6B6B 100%);
}

#sunset {
    background: linear-gradient(180deg, #FF6B6B 0%, #FF8E53 20%, #FFD93D 40%, #FF6B6B 55%, #7B2D8E 80%, #2D1B4E 100%);
}

#twilight {
    background: linear-gradient(180deg, #2D1B4E 0%, #6B2D5B 25%, #3D1F5E 50%, #1A1A3E 100%);
}

#night {
    background: linear-gradient(180deg, #1A1A3E 0%, #0D0D2E 50%, #1A1A3E 100%);
}

/* ===== Typography ===== */
.domain-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    color: #C0C7D1;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.domain-title.visible {
    opacity: 1;
}

.time-heading {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.sunset-heading {
    font-size: clamp(2.5rem, 6vw, 5rem);
}

.poetic-text {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    font-weight: 400;
    font-style: italic;
    line-height: 2;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 15px rgba(0,0,0,0.2);
}

.body-text {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    font-weight: 400;
    line-height: 1.85;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    opacity: 0.85;
}

.content-left .body-text {
    margin: 0 0 1.5rem;
}

.korean-text {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(1rem, 2vw, 1.4rem);
    opacity: 0.45;
    margin-top: 1rem;
    letter-spacing: 0.15em;
}

.time-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    opacity: 0.3;
    margin-top: 2rem;
    text-transform: uppercase;
}

.domain-end {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    color: #C0C7D1;
    margin-top: 3rem;
}

/* ===== Morning/Noon dark text overrides ===== */
#morning .time-heading,
#noon .time-heading {
    color: #1A1A3E;
    text-shadow: none;
}

#morning .body-text,
#noon .body-text {
    color: rgba(26,26,62,0.8);
}

#morning .korean-text,
#noon .korean-text {
    color: rgba(26,26,62,0.4);
}

#morning .time-label,
#noon .time-label {
    color: rgba(26,26,62,0.3);
}

#morning .poetic-text,
#noon .poetic-text {
    color: #1A1A3E;
    text-shadow: none;
}

/* ===== Shadow Length Animation ===== */
#noon .section-content {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

#afternoon .section-content {
    filter: drop-shadow(8px 8px 16px rgba(0,0,0,0.15));
}

#sunset .section-content {
    filter: drop-shadow(4px 4px 12px rgba(255,107,107,0.2));
}

/* ===== Fade Elements ===== */
.fade-el {
    opacity: 0;
    transition: opacity 1s ease;
}

.fade-el.visible {
    opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .section-content {
        padding: 1.5rem;
    }

    .content-left {
        margin-left: 5%;
        padding-right: 5%;
    }

    .poetic-text {
        line-height: 1.8;
    }

    #time-indicator {
        top: 16px;
        left: 16px;
    }

    .sunset-heading {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
}
