/* ============================================
   misty.day - Japanese-minimal fog chronicle
   ============================================ */

/* --- CSS Custom Properties (Design Palette) --- */
:root {
    --color-fog-white: #F0F0F4;
    --color-mist-grey: #4A4A5A;
    --color-medium-mist: #5A5A6A;
    --color-light-mist: #7A7A8A;
    --color-retro-lilac: #B0A0C0;
    --color-bokeh-gold: #D0B880;
    --color-sharp-red: #C04040;

    --font-display: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
    --font-body: 'Lora', Georgia, serif;
    --font-annotation: 'Caveat', cursive;

    --size-display-clamp: clamp(2rem, 4.5vw, 3.8rem);
    --size-body-clamp: clamp(1rem, 1.3vw, 1.15rem);
}

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

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

body {
    background-color: var(--color-fog-white);
    color: var(--color-mist-grey);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--size-body-clamp);
    line-height: 1.9;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--color-retro-lilac);
    color: var(--color-fog-white);
}

/* --- Typography --- */
.display-heading {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: var(--size-display-clamp);
    color: var(--color-mist-grey);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 1.5rem;
}

.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--size-body-clamp);
    line-height: 1.9;
    color: var(--color-medium-mist);
    max-width: 36em;
}

.caveat-text {
    font-family: var(--font-annotation);
    font-weight: 400;
    color: var(--color-light-mist);
}

.annotation {
    font-size: 1.1rem;
    display: inline-block;
}

.red-accent {
    color: var(--color-sharp-red);
    font-weight: 600;
}

/* --- Fog Layers --- */
.fog-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.fog-layer {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    pointer-events: none;
}

.fog-layer-1 {
    background: radial-gradient(ellipse at 20% 50%, rgba(240, 240, 244, 0.18) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 30%, var(--color-bokeh-gold) 0%, transparent 50%);
    animation: fogDrift1 25s ease-in-out infinite alternate;
}

.fog-layer-2 {
    background: radial-gradient(ellipse at 60% 70%, rgba(176, 160, 192, 0.12) 0%, transparent 55%),
                radial-gradient(ellipse at 30% 20%, rgba(240, 240, 244, 0.15) 0%, transparent 60%);
    animation: fogDrift2 30s ease-in-out infinite alternate;
}

.fog-layer-3 {
    background: radial-gradient(ellipse at 40% 40%, rgba(240, 240, 244, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, var(--color-bokeh-gold) 0%, transparent 45%);
    animation: fogDrift3 35s ease-in-out infinite alternate;
}

.fog-layer-4 {
    background: radial-gradient(ellipse at 50% 60%, rgba(176, 160, 192, 0.08) 0%, transparent 50%);
    animation: fogDrift4 40s ease-in-out infinite alternate;
}

@keyframes fogDrift1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, -3%) scale(1.05); }
}

@keyframes fogDrift2 {
    0% { transform: translate(0, 0) scale(1.02); }
    100% { transform: translate(-4%, 4%) scale(0.98); }
}

@keyframes fogDrift3 {
    0% { transform: translate(0, 0) scale(0.98); }
    100% { transform: translate(3%, 5%) scale(1.04); }
}

@keyframes fogDrift4 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-6%, -2%) scale(1.02); }
}

/* --- Bokeh Circles --- */
.bokeh-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bokeh-circle {
    position: absolute;
    border-radius: 50%;
    background: var(--color-bokeh-gold);
    opacity: 0.08;
    will-change: transform;
}

.bokeh-1 {
    width: 280px;
    height: 280px;
    top: 10%;
    left: 5%;
    animation: bokehFloat1 20s ease-in-out infinite alternate;
}

.bokeh-2 {
    width: 180px;
    height: 180px;
    top: 60%;
    left: 75%;
    animation: bokehFloat2 25s ease-in-out infinite alternate;
}

.bokeh-3 {
    width: 350px;
    height: 350px;
    top: 30%;
    left: 50%;
    animation: bokehFloat3 30s ease-in-out infinite alternate;
}

.bokeh-4 {
    width: 120px;
    height: 120px;
    top: 80%;
    left: 20%;
    animation: bokehFloat4 18s ease-in-out infinite alternate;
}

.bokeh-5 {
    width: 220px;
    height: 220px;
    top: 45%;
    left: 85%;
    animation: bokehFloat1 22s ease-in-out infinite alternate;
}

.bokeh-6 {
    width: 160px;
    height: 160px;
    top: 15%;
    left: 65%;
    animation: bokehFloat2 28s ease-in-out infinite alternate;
}

.bokeh-7 {
    width: 300px;
    height: 300px;
    top: 70%;
    left: 40%;
    animation: bokehFloat3 35s ease-in-out infinite alternate;
}

.bokeh-8 {
    width: 100px;
    height: 100px;
    top: 5%;
    left: 90%;
    animation: bokehFloat4 15s ease-in-out infinite alternate;
}

.bokeh-9 {
    width: 240px;
    height: 240px;
    top: 50%;
    left: 10%;
    animation: bokehFloat1 32s ease-in-out infinite alternate;
}

.bokeh-10 {
    width: 140px;
    height: 140px;
    top: 90%;
    left: 55%;
    animation: bokehFloat2 20s ease-in-out infinite alternate;
}

.bokeh-11 {
    width: 200px;
    height: 200px;
    top: 25%;
    left: 30%;
    background: var(--color-retro-lilac);
    opacity: 0.05;
    animation: bokehFloat3 27s ease-in-out infinite alternate;
}

.bokeh-12 {
    width: 260px;
    height: 260px;
    top: 65%;
    left: 70%;
    background: var(--color-retro-lilac);
    opacity: 0.04;
    animation: bokehFloat4 33s ease-in-out infinite alternate;
}

@keyframes bokehFloat1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -20px) scale(1.08); }
}

@keyframes bokehFloat2 {
    0% { transform: translate(0, 0) scale(1.05); }
    100% { transform: translate(-25px, 15px) scale(0.95); }
}

@keyframes bokehFloat3 {
    0% { transform: translate(0, 0) scale(0.95); }
    100% { transform: translate(20px, 25px) scale(1.1); }
}

@keyframes bokehFloat4 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-15px, -30px) scale(1.05); }
}

/* --- Red Accent Line --- */
.red-accent-line {
    position: fixed;
    top: 0;
    left: 3vw;
    width: 1px;
    height: 0;
    background: var(--color-sharp-red);
    z-index: 10;
    opacity: 0.4;
    transition: height 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    pointer-events: none;
}

/* --- Sections --- */
.fog-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    padding: 4rem 2rem;
}

.section-opening {
    min-height: 100vh;
    text-align: center;
}

.section-opening .display-heading {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.section-opening .annotation {
    font-size: 1.3rem;
    margin-top: 0.5rem;
}

.section-content {
    max-width: 900px;
    width: 100%;
    position: relative;
}

/* --- Blur-Focus Reveal --- */
.blur-reveal {
    filter: blur(8px);
    opacity: 0.3;
    transition: filter 1.2s cubic-bezier(0.25, 0.1, 0.25, 1),
                opacity 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: filter, opacity;
}

.blur-reveal.in-focus {
    filter: blur(0px);
    opacity: 1;
}

/* --- Text Blocks --- */
.text-block {
    position: relative;
    padding: 2rem 0;
}

.text-block-wide {
    max-width: 42em;
}

.text-block-centered {
    text-align: center;
}

.text-block-centered .body-text {
    margin-left: auto;
    margin-right: auto;
}

/* --- Margin Notes (annotations) --- */
.margin-note {
    position: absolute;
    font-size: 1rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    opacity: 0.6;
    transition: opacity 0.6s ease;
}

.margin-note-right {
    right: -3rem;
    top: 50%;
    transform: translateY(-50%);
}

.margin-note-left {
    left: -3rem;
    top: 50%;
    transform: translateY(-50%);
}

/* --- Chronicle Entries --- */
.chronicle-entries {
    margin-top: 2rem;
}

.chronicle-entry {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(176, 160, 192, 0.2);
    position: relative;
    border-color: var(--color-retro-lilac);
}

.chronicle-entry:last-child {
    border-bottom: 1px solid rgba(176, 160, 192, 0.2);
}

.chronicle-entry .annotation {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

/* --- Section-specific styles --- */
.section-stillness .display-heading {
    font-weight: 400;
}

.section-horizon {
    text-align: center;
}

.section-horizon .body-text {
    margin-left: auto;
    margin-right: auto;
}

.section-closing {
    min-height: 60vh;
    text-align: center;
}

.closing-mark {
    font-size: 2rem;
    color: var(--color-retro-lilac);
    margin-bottom: 1rem;
}

.section-closing .annotation {
    font-size: 1.1rem;
    letter-spacing: 0.1em;
}

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

    .margin-note {
        position: static;
        writing-mode: horizontal-tb;
        text-orientation: initial;
        display: block;
        margin-top: 1rem;
        transform: none;
    }

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

    .red-accent-line {
        left: 2vw;
    }

    .bokeh-circle {
        transform: scale(0.6);
    }
}

@media (max-width: 480px) {
    .fog-section {
        padding: 2rem 1rem;
    }

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