/* misty.day — dissolving atmospheric scroll
   Fonts (Google Fonts): Cormorant, Lora, Josefin Sans
   Palette:
     #f8f8f8 fog white      (background)
     #e0e0e0 mist silver    (gradient layers)
     #4a4a4a stone in fog   (primary text)
     #8a8a8a distance gray  (secondary text)
     #b0b0b0 horizon line   (barely-visible borders)
     #c8c8c8 gauze layer    (decorative gradients, dots)
     #6a6a8a misty lavender (single accent for links)
*/

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

html {
    scroll-behavior: smooth;
}

body {
    background: #f8f8f8;
    color: #4a4a4a;
    font-family: "Lora", Georgia, serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 2.0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* ---------- Moisture dots (condensation droplets) ---------- */
.moisture-dots {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.moisture-dots .dot {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #c8c8c8;
    opacity: 0.2;
    border-radius: 50%;
    filter: blur(0.4px);
}

.moisture-dots .dot.large {
    width: 3px;
    height: 3px;
    opacity: 0.18;
}

/* ---------- Content mask (page-level dissolve) ---------- */
.content-mask {
    position: relative;
    z-index: 1;
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem 6rem;
    overflow: hidden;
}

.fog-layer {
    position: absolute;
    inset: -10%;
    pointer-events: none;
    will-change: transform, opacity;
}

.fog-layer-1 {
    background: radial-gradient(ellipse at 30% 40%, rgba(224, 224, 224, 0.6), transparent 50%);
    animation: fog-drift-a 28s ease-in-out infinite alternate;
}

.fog-layer-2 {
    background: radial-gradient(ellipse at 70% 60%, rgba(200, 200, 200, 0.4), transparent 40%);
    animation: fog-drift-b 36s ease-in-out infinite alternate;
}

.fog-layer-3 {
    background: radial-gradient(ellipse at 50% 80%, rgba(192, 192, 192, 0.3), transparent 60%);
    animation: fog-drift-c 44s ease-in-out infinite alternate;
}

.fog-layer-4 {
    background: radial-gradient(ellipse at 80% 25%, rgba(248, 248, 248, 0.5), transparent 55%),
                radial-gradient(ellipse at 15% 70%, rgba(232, 232, 232, 0.35), transparent 45%);
    animation: fog-drift-a 52s ease-in-out infinite alternate-reverse;
}

@keyframes fog-drift-a {
    0%   { transform: translate3d(-2%, -1%, 0) scale(1.04); opacity: 0.95; }
    100% { transform: translate3d(2%, 2%, 0) scale(1.10);   opacity: 1; }
}

@keyframes fog-drift-b {
    0%   { transform: translate3d(1%, 1%, 0) scale(1.06);   opacity: 0.9; }
    100% { transform: translate3d(-3%, -2%, 0) scale(1.02); opacity: 1; }
}

@keyframes fog-drift-c {
    0%   { transform: translate3d(-1%, 2%, 0) scale(1.02);  opacity: 1; }
    100% { transform: translate3d(2%, -1%, 0) scale(1.08);  opacity: 0.92; }
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 600px;
    width: 100%;
    text-align: center;
    opacity: 0;
    animation: hero-emerge 2s ease-out 0.2s forwards;
}

@keyframes hero-emerge {
    0%   { opacity: 0; transform: translateY(8px); filter: blur(4px); }
    100% { opacity: 1; transform: translateY(0);   filter: blur(0); }
}

.hero-title {
    font-family: "Cormorant", "Garamond", serif;
    font-weight: 300;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.1;
    letter-spacing: 0.01em;
    color: #4a4a4a;
    margin: 1.5rem 0 1rem;
}

.hero-subtitle {
    font-family: "Cormorant", "Garamond", serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    line-height: 1.6;
    color: #8a8a8a;
    margin-bottom: 2rem;
}

.hero-whisper {
    margin-bottom: 0.5rem;
}

.hero-meta {
    margin-top: 1rem;
    color: #b0b0b0;
}

.scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0;
    animation: scroll-fade 3s ease-in-out 2.5s infinite;
}

.scroll-hint-text {
    font-family: "Josefin Sans", "Inter", sans-serif;
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: lowercase;
    color: #b0b0b0;
}

@keyframes scroll-fade {
    0%, 100% { opacity: 0; transform: translate(-50%, 0); }
    50%      { opacity: 0.7; transform: translate(-50%, 4px); }
}

/* ---------- Whisper / Annotation type ---------- */
.whisper {
    font-family: "Josefin Sans", "Inter", sans-serif;
    font-weight: 300;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: lowercase;
    color: #8a8a8a;
}

/* ---------- Sections ---------- */
.section {
    max-width: 600px;
    margin: 0 auto;
    padding: 6rem 1.5rem;
    color: #4a4a4a;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 1.6s ease-out, transform 1.6s ease-out;
}

.section.in-view {
    opacity: 1;
    transform: translateY(0);
}

.section-label {
    margin-bottom: 1.25rem;
    color: #b0b0b0;
}

.section-title {
    font-family: "Cormorant", "Garamond", serif;
    font-weight: 300;
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    line-height: 1.3;
    color: #4a4a4a;
    letter-spacing: 0.005em;
    margin-bottom: 2.5rem;
}

.prose {
    font-family: "Lora", Georgia, serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 2.0;
    color: #4a4a4a;
    margin-bottom: 1.75rem;
}

.prose:last-child {
    margin-bottom: 0;
}

/* ---------- Horizon line divider ---------- */
.horizon-divider {
    width: 60%;
    max-width: 360px;
    height: 1px;
    margin: 0 auto;
    background: linear-gradient(90deg, transparent, #b0b0b0 20%, #b0b0b0 80%, transparent);
    opacity: 0.7;
}

/* ---------- Entries (field notes) ---------- */
.entry {
    margin-bottom: 4rem;
}

.entry:last-child {
    margin-bottom: 0;
}

.entry-meta {
    margin-bottom: 0.75rem;
    color: #b0b0b0;
}

.entry-title {
    font-family: "Cormorant", "Garamond", serif;
    font-weight: 400;
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    line-height: 1.35;
    color: #4a4a4a;
    margin-bottom: 1rem;
    letter-spacing: 0.005em;
}

/* ---------- Archive list ---------- */
.archive-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.archive-item {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid transparent;
    background: linear-gradient(90deg, transparent, rgba(176, 176, 176, 0.35) 20%, rgba(176, 176, 176, 0.35) 80%, transparent) bottom / 100% 1px no-repeat;
}

.archive-item:last-child {
    background: none;
}

.archive-date {
    font-family: "Josefin Sans", "Inter", sans-serif;
    font-weight: 300;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    color: #8a8a8a;
    min-width: 6.5rem;
    flex-shrink: 0;
}

.archive-link {
    font-family: "Lora", Georgia, serif;
    font-weight: 400;
    font-size: 1rem;
    color: #6a6a8a;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.8s ease, border-color 0.8s ease, letter-spacing 0.8s ease;
}

.archive-link:hover {
    color: #4a4a4a;
    border-bottom-color: rgba(106, 106, 138, 0.4);
    letter-spacing: 0.005em;
}

/* ---------- Inline links ---------- */
.link {
    color: #6a6a8a;
    text-decoration: none;
    border-bottom: 1px solid rgba(106, 106, 138, 0.25);
    transition: color 0.8s ease, border-color 0.8s ease;
}

.link:hover {
    color: #4a4a4a;
    border-bottom-color: rgba(106, 106, 138, 0.55);
}

/* ---------- Dissolving sections (manual fallbacks; JS sets opacity) ---------- */
.section.dissolving {
    opacity: 0.9;
}

.section.dissolving-more {
    opacity: 0.75;
}

.section-fade {
    text-align: center;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.fade-text {
    color: #8a8a8a;
    font-style: italic;
}

.fade-text-soft {
    color: #b0b0b0;
    margin-top: 1rem;
}

.section-vanish {
    text-align: center;
    padding: 4rem 1.5rem 8rem;
}

.vanish-text {
    letter-spacing: 0.6em;
    color: #c8c8c8;
}

.colophon-text {
    color: #8a8a8a;
    font-size: 0.95rem;
    line-height: 1.9;
    text-align: left;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .fog-layer,
    .hero-inner,
    .scroll-hint {
        animation: none;
    }
    .hero-inner {
        opacity: 1;
        transform: none;
        filter: none;
    }
    .section {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------- Small screens ---------- */
@media (max-width: 540px) {
    .section {
        padding: 4.5rem 1.25rem;
    }
    .archive-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .archive-date {
        min-width: 0;
        flex-basis: 100%;
    }
}
