/* hwagryul.com - Translucent Frost Design */
/* Colors: #d4a847, #1e2430, #8a9bae, #f5f0e8, #c8cfd4, #7ba3c4, #e2e8ed, #2c3038 */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: #f5f0e8;
    color: #2c3038;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    line-height: 1.85;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* ===== SVG Filters ===== */
.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ===== Sections ===== */
.section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

/* ===== Condensation Overlay ===== */
.condensation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: url(#condensation);
    pointer-events: none;
    z-index: 1;
}

/* ===== Annotations ===== */
.annotation {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a9bae;
    position: absolute;
    z-index: 10;
    pointer-events: none;
    will-change: transform;
}

.annotation-left {
    left: 24px;
    bottom: 40px;
}

.annotation-right {
    right: 24px;
    bottom: 40px;
}

.annotation-center {
    left: 50%;
    transform: translateX(-50%);
    bottom: 40px;
}

.annotation-light {
    color: rgba(138, 155, 174, 0.7);
}

.annotation-offset-1 { bottom: 120px; }
.annotation-offset-2 { bottom: 200px; }
.annotation-offset-3 { bottom: 280px; }

/* ===== Typography ===== */
.section-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    letter-spacing: 0.04em;
    line-height: 1.2;
    color: #2c3038;
    margin-bottom: 1.5em;
}

.section-heading-light {
    color: #f5f0e8;
}

.subsection-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: 0.03em;
    line-height: 1.3;
    color: #2c3038;
    margin-top: 2em;
    margin-bottom: 1em;
}

.body-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    line-height: 1.85;
    letter-spacing: 0.01em;
    color: #2c3038;
    margin-bottom: 1.5em;
}

.body-text:last-child {
    margin-bottom: 0;
}

.body-text-light {
    color: rgba(245, 240, 232, 0.9);
}

/* ===== Lens Flares ===== */
.lens-flare {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
    will-change: transform, opacity;
}

/* ===== SECTION I: FOG ===== */
.section-fog {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f0e8;
    min-height: 100vh;
}

.fog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f0e8;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    z-index: 20;
    animation: fogClear 4s ease-out forwards;
}

@keyframes fogClear {
    0% {
        backdrop-filter: blur(40px);
        -webkit-backdrop-filter: blur(40px);
        opacity: 1;
    }
    100% {
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
        opacity: 0;
    }
}

.fog-content {
    position: relative;
    z-index: 15;
    text-align: center;
}

.fog-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 8vw;
    color: rgba(44, 48, 56, 0.3);
    letter-spacing: 0.06em;
    line-height: 1;
    animation: fogTitleReveal 4s ease-out forwards;
}

@keyframes fogTitleReveal {
    0% { opacity: 0.15; }
    50% { opacity: 0.2; }
    100% { opacity: 0.35; }
}

.flare-center {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(212, 168, 71, 0.15) 0%, rgba(123, 163, 196, 0.08) 40%, transparent 70%);
    z-index: 25;
    animation: flareDrift 4s ease-out forwards;
}

@keyframes flareDrift {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    30% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(30vw, -35vh) scale(0.8);
        opacity: 0.6;
    }
}

/* ===== SECTION II: GLASS ===== */
.section-glass {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f0e8;
    padding: 60px 24px;
}

.glass-panes {
    display: flex;
    align-items: stretch;
    gap: 0;
    max-width: 960px;
    width: 100%;
    min-height: 60vh;
    position: relative;
    z-index: 5;
}

.pane {
    background: rgba(226, 232, 237, 0.85);
    border: 1px solid #c8cfd4;
    box-shadow: 0 0 8px rgba(200, 207, 212, 0.4);
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease-out;
}

.pane-left {
    flex: 1;
    max-width: 480px;
}

.pane-right {
    flex: 1;
    max-width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mullion-vertical {
    width: 1px;
    background-color: #c8cfd4;
    box-shadow: 0 0 8px rgba(200, 207, 212, 0.4);
    flex-shrink: 0;
}

.pane-frost {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(226, 232, 237, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 3;
    transition: backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease, opacity 0.3s ease;
}

.city-silhouette-glass {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: flex-end;
    z-index: 2;
}

.skyline-svg {
    width: 100%;
    height: 100%;
}

.flare-glass-tl {
    width: 120px;
    height: 120px;
    top: 15%;
    left: 10%;
    background: radial-gradient(circle, rgba(212, 168, 71, 0.1) 0%, rgba(123, 163, 196, 0.06) 50%, transparent 70%);
}

/* ===== SECTION III: LIGHT ===== */
.section-light {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f0e8;
    min-height: 120vh;
    padding: 80px 24px;
}

.pane-wide {
    max-width: 560px;
    width: 100%;
    z-index: 5;
}

.pane-inner {
    position: relative;
    z-index: 4;
}

.korean-watermark {
    position: absolute;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    color: rgba(44, 48, 56, 0.04);
    pointer-events: none;
    z-index: 2;
    user-select: none;
}

.watermark-hwa {
    font-size: 180px;
    top: 10%;
    left: 5%;
}

.watermark-gyul {
    font-size: 150px;
    bottom: 15%;
    right: 8%;
}

.flare-light-tl {
    width: 100px;
    height: 100px;
    top: 8%;
    left: 20%;
    background: radial-gradient(circle, rgba(212, 168, 71, 0.08) 0%, transparent 60%);
    animation: flarePulse 8s ease-in-out infinite;
}

.flare-light-br {
    width: 140px;
    height: 140px;
    bottom: 12%;
    right: 18%;
    background: radial-gradient(circle, rgba(212, 168, 71, 0.06) 0%, rgba(123, 163, 196, 0.04) 40%, transparent 70%);
    animation: flarePulse 8s ease-in-out infinite;
    animation-delay: 4s;
}

@keyframes flarePulse {
    0%, 100% { opacity: 0.05; }
    50% { opacity: 0.12; }
}

.margin-annotations {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.margin-annotations .annotation {
    position: absolute;
}

.marginalia-marks {
    position: absolute;
    left: 60px;
    top: 30%;
    pointer-events: none;
    z-index: 10;
}

.mark {
    width: 12px;
    height: 20px;
    display: block;
    margin-bottom: 60px;
}

/* ===== SECTION IV: CITY ===== */
.section-city {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 80px 24px;
    position: relative;
    background-color: #1e2430;
}

.city-bg-transition {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #f5f0e8 0%, #1e2430 30%);
    z-index: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.city-bg-transition.active {
    opacity: 1;
}

.city-panes {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 560px;
    width: 100%;
    position: relative;
    z-index: 5;
}

.pane-city-1,
.pane-city-2 {
    background: rgba(245, 240, 232, 0.08);
    border-color: rgba(200, 207, 212, 0.2);
}

.city-silhouette-full {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 400px;
    z-index: 1;
    pointer-events: none;
}

.skyline-svg-full {
    width: 100%;
    height: 100%;
}

/* City window blinking animations */
.city-window {
    animation: windowBlink 4s ease-in-out infinite;
}

.cw-1 { animation-delay: 0s; }
.cw-2 { animation-delay: 0.5s; }
.cw-3 { animation-delay: 1.2s; }
.cw-4 { animation-delay: 0.3s; }
.cw-5 { animation-delay: 2.1s; }
.cw-6 { animation-delay: 1.7s; }
.cw-7 { animation-delay: 0.8s; }
.cw-8 { animation-delay: 2.5s; }
.cw-9 { animation-delay: 1.0s; }
.cw-10 { animation-delay: 3.2s; }
.cw-11 { animation-delay: 1.5s; }
.cw-12 { animation-delay: 2.8s; }
.cw-13 { animation-delay: 0.7s; }
.cw-14 { animation-delay: 3.5s; }
.cw-15 { animation-delay: 1.8s; }
.cw-16 { animation-delay: 2.3s; }
.cw-17 { animation-delay: 0.4s; }

@keyframes windowBlink {
    0%, 40%, 100% { opacity: 0.7; }
    20% { opacity: 0.15; }
    60% { opacity: 0.9; }
    80% { opacity: 0.3; }
}

.flare-city-cool {
    width: 180px;
    height: 180px;
    top: 20%;
    right: 15%;
    background: radial-gradient(circle, rgba(123, 163, 196, 0.12) 0%, rgba(123, 163, 196, 0.04) 40%, transparent 70%);
    animation: flarePulse 8s ease-in-out infinite;
    animation-delay: 2s;
}

/* ===== SECTION V: RESOLUTION ===== */
.section-resolution {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-color: #f5f0e8;
    min-height: 80vh;
    padding: 80px 24px;
    position: relative;
}

.resolution-content {
    text-align: center;
    position: relative;
    z-index: 10;
}

.resolution-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 3.6rem;
    color: #2c3038;
    letter-spacing: 0.04em;
    line-height: 1.3;
    margin-bottom: 0.6em;
}

.resolution-subtext {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    color: #8a9bae;
    letter-spacing: 0.02em;
}

.resolution-flares {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.flare-resolve-1 {
    width: 160px;
    height: 160px;
    top: 30%;
    left: 20%;
    background: radial-gradient(circle, rgba(212, 168, 71, 0.1) 0%, transparent 60%);
    opacity: 0;
}

.flare-resolve-2 {
    width: 120px;
    height: 120px;
    top: 25%;
    right: 25%;
    background: radial-gradient(circle, rgba(123, 163, 196, 0.1) 0%, transparent 60%);
    opacity: 0;
}

.flare-resolve-3 {
    width: 200px;
    height: 200px;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(212, 168, 71, 0.12) 0%, rgba(123, 163, 196, 0.06) 40%, transparent 70%);
    opacity: 0;
}

.flare-resolve-1.converge,
.flare-resolve-2.converge,
.flare-resolve-3.converge {
    animation: flareConverge 6s ease-in-out forwards;
}

.flare-resolve-2.converge {
    animation-delay: 0.5s;
}

.flare-resolve-3.converge {
    animation-delay: 1s;
}

@keyframes flareConverge {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(1);
    }
    40% {
        opacity: 0.8;
    }
    70% {
        opacity: 1;
        transform: translate(0, 0) scale(1.3);
    }
    100% {
        opacity: 0;
        transform: translate(0, 0) scale(0.5);
    }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .glass-panes {
        flex-direction: column;
    }

    .mullion-vertical {
        width: 100%;
        height: 1px;
    }

    .pane-left,
    .pane-right {
        max-width: 100%;
    }

    .pane-right {
        min-height: 300px;
    }

    .marginalia-marks {
        display: none;
    }

    .annotation {
        display: none;
    }

    .fog-title {
        font-size: 12vw;
    }

    .resolution-text {
        font-size: 2.4rem;
    }

    .korean-watermark {
        display: none;
    }
}

@media (min-width: 1200px) {
    .annotation {
        display: block;
    }

    .marginalia-marks {
        display: block;
    }
}

@media (max-width: 1199px) and (min-width: 901px) {
    .annotation {
        display: block;
    }

    .marginalia-marks {
        display: none;
    }
}
