/* memorial.wiki - The Archive of Remembrance */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #F5ECD7;
    color: #5C5347;
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.85;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

/* === Paper Texture Overlay === */
.paper-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0.4;
    background-image:
        radial-gradient(ellipse at 15% 25%, #EDE0C8 0%, transparent 2%),
        radial-gradient(ellipse at 72% 18%, #EDE0C8 0%, transparent 1.5%),
        radial-gradient(ellipse at 45% 65%, #EDE0C8 0%, transparent 2.5%),
        radial-gradient(ellipse at 88% 42%, #EDE0C8 0%, transparent 1.8%),
        radial-gradient(ellipse at 25% 80%, #EDE0C8 0%, transparent 2%),
        radial-gradient(ellipse at 60% 90%, #EDE0C8 0%, transparent 1.2%),
        radial-gradient(ellipse at 8% 55%, #EDE0C8 0%, transparent 1.6%),
        radial-gradient(ellipse at 92% 75%, #EDE0C8 0%, transparent 2.2%);
    mix-blend-mode: multiply;
}

/* === Marginalia Layer === */
.marginalia {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.margin-note {
    position: absolute;
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    color: #8B7D6B;
    opacity: 0.15;
    white-space: nowrap;
    will-change: transform;
}

/* === The Threshold === */
.threshold {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.threshold-content {
    text-align: center;
    opacity: 0;
    animation: thresholdFadeIn 2.5s ease-out forwards;
    animation-delay: 0.3s;
}

@keyframes thresholdFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.site-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 300;
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: #4A3728;
    letter-spacing: 0.08em;
    line-height: 1.2;
    filter: contrast(0.95) brightness(1.05);
    text-shadow: 0 0 1px rgba(74, 55, 40, 0.3);
}

.title-line {
    display: block;
}

.threshold-divider {
    width: 120px;
    height: 1px;
    background-color: #4A3728;
    opacity: 0.3;
    margin: 40px auto 20px;
}

.threshold-tagline {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 0.9rem;
    color: #8B7D6B;
    letter-spacing: 0.05em;
}

/* === The Archive === */
.archive {
    padding: 80px 0 120px;
}

/* === Memorial Entries === */
.memorial-entry {
    max-width: 520px;
    margin: 0 auto;
    padding: 0 24px;
    margin-bottom: 120px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

.memorial-entry.revealed {
    opacity: 1;
    transform: translateY(0);
}

.entry-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: #4A3728;
    line-height: 1.25;
    margin-bottom: 8px;
    filter: contrast(0.95) brightness(1.05);
    text-shadow: 0 0 1px rgba(74, 55, 40, 0.3);
}

.entry-date {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.8rem;
    color: #8B7D6B;
    letter-spacing: 0.12em;
    font-variant: small-caps;
    text-transform: lowercase;
    margin-bottom: 24px;
}

.entry-body p {
    margin-bottom: 1.2em;
    color: #5C5347;
    font-size: 1.1rem;
}

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

/* === Botanical Dividers === */
.botanical-divider {
    text-align: center;
    margin: 0 auto;
    padding: 0;
    margin-bottom: 120px;
    opacity: 0;
    transition: opacity 1.5s ease-out;
}

.botanical-divider.revealed {
    opacity: 1;
}

/* === The Colophon === */
.colophon {
    padding: 80px 0 0;
}

.fleuron {
    text-align: center;
    margin-bottom: 40px;
    opacity: 0;
    transition: opacity 1.5s ease-out;
}

.fleuron.revealed {
    opacity: 1;
}

.colophon-content {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 24px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

.colophon-content.revealed {
    opacity: 1;
    transform: translateY(0);
}

.colophon-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 400;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    color: #4A3728;
    margin-bottom: 20px;
    text-shadow: 0 0 1px rgba(74, 55, 40, 0.3);
}

.colophon-body p {
    margin-bottom: 1.2em;
    color: #5C5347;
}

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

/* === Final Botanical === */
.final-botanical {
    text-align: center;
    padding: 80px 0 100px;
    opacity: 0;
    transition: opacity 1.5s ease-out;
}

.final-botanical.revealed {
    opacity: 1;
}

/* === Design Color Accents === */
.entry-title:hover {
    color: #3A2A1A;
}

.botanical-divider svg path[stroke="#7A8B6F"] {
    stroke: #7A8B6F;
}

.botanical-divider svg path[stroke="#9B6B5A"] {
    stroke: #9B6B5A;
}

/* === Responsive === */
@media (max-width: 600px) {
    .memorial-entry,
    .colophon-content {
        padding: 0 20px;
    }

    .memorial-entry {
        margin-bottom: 80px;
    }

    .botanical-divider {
        margin-bottom: 80px;
    }

    .margin-note {
        display: none;
    }
}
