/* ============================================
   GRAND OLE TIME — Memorial Site
   A celebration of Clara's life
   ============================================ */

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

:root {
    --cream: #FFF8F0;
    --cream-dark: #F5EDE0;
    --brown: #3D2B1F;
    --brown-light: #5C4433;
    --brown-muted: #7A6652;
    --gold: #C9A96E;
    --gold-light: #D4BC8B;
    --terra: #C4725A;
    --terra-light: #D4917D;
    --white: #FFFCF8;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-accent: 'Cormorant Garamond', Georgia, serif;

    --container-width: 1200px;
    --narrow-width: 740px;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--brown);
    background-color: var(--cream);
    line-height: 1.7;
    font-weight: 300;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.container.narrow {
    max-width: var(--narrow-width);
}

/* --- Section Base --- */
.section {
    padding: 8rem 0;
    position: relative;
}

.section-number {
    font-family: var(--font-accent);
    font-size: 0.9rem;
    color: var(--gold);
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    font-weight: 500;
}

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 1rem;
    color: var(--brown);
}

.section-subtitle {
    font-family: var(--font-accent);
    font-size: 1.25rem;
    color: var(--brown-muted);
    font-style: italic;
    margin-bottom: 3rem;
    font-weight: 400;
}

/* --- Animation States --- */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--brown);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(61, 43, 31, 0.45) 0%,
        rgba(61, 43, 31, 0.55) 40%,
        rgba(61, 43, 31, 0.75) 100%
    );
    z-index: 2;
}

.hero-image-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 30% 20%;
    transform: scale(1.1);
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--cream);
    padding: 0 2rem;
}

.hero-kicker {
    font-family: var(--font-accent);
    font-size: 1rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    margin-bottom: 1.5rem;
    color: var(--gold-light);
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 9rem);
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    transform: translateY(30px);
    letter-spacing: 0.02em;
}

.hero-divider {
    width: 60px;
    height: 1px;
    background: var(--gold);
    margin: 2rem auto;
    opacity: 0;
    transform: scaleX(0);
}

.hero-tagline {
    font-family: var(--font-accent);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    font-style: italic;
    opacity: 0;
    transform: translateY(20px);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
}

.scroll-indicator span {
    font-family: var(--font-accent);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-light);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: var(--gold);
    transform-origin: top;
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ============================================
   INTRODUCTION
   ============================================ */
.intro {
    background: var(--cream);
    padding: 10rem 0;
}

.intro-text p {
    font-family: var(--font-accent);
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    line-height: 1.85;
    color: var(--brown-light);
    margin-bottom: 1.5rem;
}

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

/* ============================================
   MEMORIES / GALLERY
   ============================================ */
.memories {
    background: var(--cream);
    padding-bottom: 6rem;
}

.gallery {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.gallery-item {
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.gallery-image-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: var(--cream-dark);
    aspect-ratio: 4 / 3;
}

.gallery-item--large .gallery-image-wrap {
    aspect-ratio: 16 / 9;
}

.gallery-row--tall .gallery-image-wrap {
    aspect-ratio: 3 / 4;
}


.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.03);
}

.gallery-caption {
    font-family: var(--font-accent);
    font-size: 1rem;
    color: var(--brown-muted);
    margin-top: 0.75rem;
    font-style: italic;
}

.gallery-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.gallery-row--three {
    grid-template-columns: 1fr 1fr 1fr;
}

/* Placeholder for missing images */
.gallery-placeholder {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--cream-dark);
    border: 2px dashed var(--gold-light);
    border-radius: 4px;
    color: var(--brown-muted);
    text-align: center;
    padding: 2rem;
}

.gallery-placeholder span {
    font-family: var(--font-accent);
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.gallery-placeholder small {
    font-family: var(--font-body);
    font-size: 0.75rem;
    opacity: 0.6;
}

.placeholder-active .gallery-placeholder {
    display: flex;
}

.placeholder-active .gallery-image {
    display: none;
}

/* ============================================
   STORY SECTIONS
   ============================================ */
.story-section {
    background: var(--cream);
}

.story {
    margin-top: 1rem;
}

.story-image-wrap {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto 3rem;
    padding: 0 2rem;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
}

.story-image-wrap .gallery-placeholder {
    aspect-ratio: 16 / 10;
    position: relative;
    display: none;
}

.story-image-wrap.placeholder-active .gallery-placeholder {
    display: flex;
}

.story-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: center 20%;
    border-radius: 4px;
}

.story-text p {
    font-family: var(--font-accent);
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    line-height: 1.85;
    color: var(--brown-light);
    margin-bottom: 1.5rem;
}

.story-quote {
    margin: 3rem 0;
    padding: 2.5rem 0;
    border-top: 1px solid var(--gold-light);
    border-bottom: 1px solid var(--gold-light);
    text-align: center;
}

.story-quote p {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-style: italic;
    line-height: 1.6;
    color: var(--brown);
    margin-bottom: 0.75rem;
}

.story-quote p:last-of-type {
    margin-bottom: 0;
}

.story-quote footer {
    font-family: var(--font-accent);
    font-size: 1rem;
    color: var(--brown-muted);
    font-style: italic;
    margin-top: 1.25rem;
}

/* ============================================
   INTERSTITIAL (Full-width quote)
   ============================================ */
.interstitial {
    position: relative;
    height: 70vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.interstitial-bg {
    position: absolute;
    inset: 0;
}

.interstitial-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.interstitial-overlay {
    position: absolute;
    inset: 0;
    background: rgba(61, 43, 31, 0.7);
    z-index: 1;
}

.interstitial-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 2rem;
}

.interstitial-text {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-style: italic;
    color: var(--cream);
    line-height: 1.5;
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   PHOTO BREAK (Full-width)
   ============================================ */
.photo-break {
    padding: 0;
    position: relative;
    height: 60vh;
    min-height: 350px;
    overflow: hidden;
}

.photo-break-wrap {
    position: absolute;
    inset: 0;
}

.photo-break-wrap .gallery-placeholder {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
}

.photo-break-wrap.placeholder-active .gallery-placeholder {
    display: flex;
}

.photo-break-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   DEDICATION
   ============================================ */
.dedication {
    background: var(--cream);
    padding: 10rem 0 8rem;
    text-align: center;
}

.dedication-content {
    max-width: 600px;
    margin: 0 auto;
}

.dedication-image-wrap {
    width: 200px;
    height: 200px;
    margin: 0 auto 3rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--gold-light);
}

.dedication-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dedication-heading {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--brown);
}

.dedication-text p {
    font-family: var(--font-accent);
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    line-height: 1.85;
    color: var(--brown-light);
    margin-bottom: 1.5rem;
}

.dedication-signature {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gold-light);
}

.dedication-signature p {
    font-family: var(--font-accent);
    font-size: 1.1rem;
    color: var(--brown-muted);
    font-style: italic;
}

.signature-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-style: normal !important;
    color: var(--brown);
    margin-top: 0.5rem;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--brown);
    color: var(--cream);
    padding: 3rem 0;
    text-align: center;
}

.footer-tagline {
    font-family: var(--font-accent);
    font-size: 1rem;
    font-style: italic;
    color: var(--gold-light);
    margin-bottom: 1.5rem;
}

.footer-nav {
    margin-bottom: 1.5rem;
}

.footer-nav a {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--cream-dark);
    text-decoration: none;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.footer-nav a:hover {
    opacity: 1;
}

.footer-copy {
    font-size: 0.75rem;
    opacity: 0.4;
}

/* ============================================
   PARALLAX HELPERS
   ============================================ */
.parallax-wrap {
    overflow: hidden;
}

.parallax-image {
    will-change: transform;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .section {
        padding: 5rem 0;
    }

    .intro {
        padding: 6rem 0;
    }

    .gallery-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-row--three {
        grid-template-columns: 1fr;
    }

    .story-image-wrap {
        padding: 0 1rem;
    }

    .container {
        padding: 0 1.5rem;
    }

    .hero-name {
        font-size: clamp(3rem, 15vw, 5rem);
    }

    .interstitial {
        height: 50vh;
    }

    .photo-break {
        height: 40vh;
    }

    .dedication {
        padding: 6rem 0 5rem;
    }

    .dedication-image-wrap {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 4rem 0;
    }

    .section-heading {
        font-size: 1.8rem;
    }

    .container {
        padding: 0 1.25rem;
    }

    .gallery {
        padding: 0 1.25rem;
    }

    .story-quote {
        margin: 2rem 0;
        padding: 1.5rem 0;
    }
}

/* ============================================
   PRINT STYLES (in case someone wants to print)
   ============================================ */
@media print {
    .hero { height: auto; min-height: auto; padding: 2rem 0; }
    .hero-overlay { display: none; }
    .scroll-indicator { display: none; }
    .parallax-image { transform: none !important; }
    .fade-up { opacity: 1 !important; transform: none !important; }
    body { background: white; }
}
