/* memorial.wiki — Digital Monument */

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

:root {
    --white: #FFFFFF;
    --warm-white: #FAFAFA;
    --charcoal: #2C2C2C;
    --medium-gray: #666666;
    --dark-gray: #4A4A4A;
    --whisper-gray: #D0D0D0;
    --seam-gray: #E0E0E0;
    --gold-accent: #C9B98A;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--white);
    font-family: 'EB Garamond', serif;
    color: var(--dark-gray);
    overflow-x: hidden;
    position: relative;
}

/* Marble noise texture - very subtle */
#marble-texture {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s ease;
    background:
        repeating-radial-gradient(circle at 20% 30%, rgba(200,200,200,0.015) 0px, transparent 2px),
        repeating-radial-gradient(circle at 70% 60%, rgba(180,180,180,0.015) 0px, transparent 3px),
        repeating-radial-gradient(circle at 40% 80%, rgba(190,190,190,0.015) 0px, transparent 2px),
        repeating-radial-gradient(circle at 80% 20%, rgba(185,185,185,0.015) 0px, transparent 4px);
}

#marble-texture.visible {
    opacity: 1;
}

/* Light shift gradient at top and bottom */
body::before,
body::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    height: 120px;
    z-index: 2;
    pointer-events: none;
}

body::before {
    top: 0;
    background: linear-gradient(to bottom, var(--warm-white), transparent);
}

body::after {
    bottom: 0;
    background: linear-gradient(to top, var(--warm-white), transparent);
}

/* Center seam line */
#center-seam {
    position: fixed;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    z-index: 0;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

#center-seam.visible {
    opacity: 1;
}

#seam-svg {
    display: block;
    height: 100%;
}

#seam-line {
    stroke-dasharray: 5000;
    stroke-dashoffset: 5000;
    transition: stroke-dashoffset 2s ease;
}

#seam-line.drawn {
    stroke-dashoffset: 0;
}

/* Hero */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
}

#site-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 28px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--white);
    transition: color 1.5s ease;
}

#site-title.visible {
    color: var(--whisper-gray);
}

/* Scroll chevron */
#scroll-chevron {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#scroll-chevron.visible {
    animation: chevronBreathe 3s ease-in-out infinite;
}

@keyframes chevronBreathe {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* Memorial Entries */
#memorial-entries {
    position: relative;
    z-index: 3;
    padding-top: 20vh;
}

.memorial-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 60vh;
    justify-content: center;
    max-width: 520px;
    margin: 0 auto;
    padding: 0 24px;
    margin-bottom: 80vh;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.memorial-name {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 36px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--charcoal);
    text-shadow: 0 1px 0 var(--seam-gray);
    margin-bottom: 16px;
    position: relative;
    cursor: default;
}

.memorial-name::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    right: 50%;
    height: 1px;
    background: var(--gold-accent);
    transition: left 0.4s ease, right 0.4s ease;
}

.memorial-name:hover::after {
    left: 0;
    right: 0;
}

.memorial-dates {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 18px;
    letter-spacing: 0.08em;
    color: var(--medium-gray);
    margin-bottom: 20px;
}

.memorial-inscription {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 18px;
    letter-spacing: 0.08em;
    color: var(--medium-gray);
    line-height: 1.8;
}

/* End space */
#end-space {
    height: 100vh;
    position: relative;
    z-index: 3;
}

/* Responsive */
@media (max-width: 768px) {
    .memorial-name {
        font-size: 28px;
        letter-spacing: 0.15em;
    }

    .memorial-dates,
    .memorial-inscription {
        font-size: 16px;
    }

    .memorial-entry {
        margin-bottom: 50vh;
        min-height: 50vh;
    }

    #site-title {
        font-size: 22px;
    }
}
