/* =========================================================
   GLOBAL
========================================================= */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-ink);
}

/* =========================================================
   HERO
========================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 10%, rgba(232, 168, 124, .18), transparent 30%),
        radial-gradient(circle at 90% 90%, rgba(226, 125, 96, .12), transparent 35%),
        var(--color-bg);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
}

.hero::before {
    width: 750px;
    height: 750px;
    top: -250px;
    left: -180px;
    background: rgba(232, 167, 124, .514);
}

.hero::after {
    width: 650px;
    height: 650px;
    right: -180px;
    bottom: -180px;
    background: rgba(226, 124, 96, .685);
}

.hero-inner {
    width: min(1200px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    text-align: center;
}

.hero-photo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.photo-card {
    width: min(100%, 420px);
    overflow: hidden;
    border-radius: 22px;
    background: white;
    box-shadow: 0 18px 45px rgba(58, 46, 42, .12);
}

.photo-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: contain;
    background: #f3ede7; /* fills the letterboxed space around non-matching aspect ratios */
}

.hero-text {
    max-width: 600px;
}

.hero-label {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--accent);
    font-size: .9rem;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.hero-text h1 {
    margin: 0 0 1.6rem;
    font-family: "Playfair Display", serif;
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1.08;
    color: var(--color-ink);
}

.hero-text p {
    max-width: 580px;
    margin: 0 auto 3rem;
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--muted);
}

.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 999px;
    background: var(--accent);
    color: black;
    text-decoration: none;
    font-weight: 600;
    transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}

.hero-button:hover {
    transform: translateY(-3px);
    background: #cf6f52;
    box-shadow: 0 8px 20px rgba(226, 125, 96, .2);
}

/* =========================================================
   TIMELINE SECTION
   Warm off-white paper with very soft, diffuse ambient glows.
   No hard edges, no visible "bubbles", no top-to-bottom fade —
   just an organic scatter of low-opacity warm light so the
   timeline/cards remain the dominant visual layer.
========================================================= */
.timeline-section {
    scroll-margin-top: -4rem;
    width: 100%;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: 8rem;
    background-color: #FBF9F5;
    background-image:
        radial-gradient(ellipse 900px 700px at 12% 8%, rgba(232, 168, 124, .07), transparent 60%),
        radial-gradient(ellipse 800px 900px at 88% 22%, rgba(226, 125, 96, .05), transparent 62%),
        radial-gradient(ellipse 1000px 800px at 22% 78%, rgba(226, 125, 96, .045), transparent 65%),
        radial-gradient(ellipse 850px 750px at 82% 92%, rgba(232, 168, 124, .06), transparent 60%),
        radial-gradient(ellipse 1200px 900px at 55% 48%, rgba(232, 168, 124, .03), transparent 70%);
}

.timeline-header {
    max-width: 650px;
    margin-inline: auto;
    margin-bottom: 7rem;
    text-align: center;
}

.timeline-header::before {
    content: "";
    display: block;
    width: 42px;
    height: 2px;
    margin: 0 auto 1.5rem;
    border-radius: 999px;
    background: var(--accent);
    opacity: .7;
}

.timeline-label {
    display: block;
    margin-bottom: 1rem;
    color: var(--accent);
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.timeline-header h2 {
    margin: 0;
    font-family: "Playfair Display", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    color: var(--color-ink);
}

/* =========================================================
   TIMELINE
========================================================= */
.timeline {
    position: relative;
    width: min(100% - 3rem, 1000px);
    margin-inline: auto;
    --timeline-progress: 0%;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(to bottom, transparent, #e5dcd5 8%, #e5dcd5 92%, transparent);
    transform: translateX(-50%);
    z-index: 0;
}

.timeline::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: var(--timeline-progress);
    background: var(--accent);
    transform: translateX(-50%);
    z-index: 1;
    transition: height .1s linear;
}

/* Row1 = date, Row2 = dot + card */
.memory {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 4rem 1fr;
    grid-template-rows: auto auto;
    row-gap: 1.1rem;
    margin-bottom: 8rem;
}

.memory:last-child {
    margin-bottom: 0;
}

.memory-date {
    grid-row: 1;
    margin: 0;
    position: relative;
    color: var(--color-ink);
    font-family: "Playfair Display", serif;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.4;
    opacity: .85;
    transition: font-size .4s ease;
}

.memory-date::after {
    content: "";
    display: block;
    width: 28px;
    height: 2px;
    margin-top: .45rem;
    border-radius: 999px;
    background: var(--accent);
    opacity: .7;
    transition: width .3s ease, opacity .3s ease;
}

.memory-marker {
    grid-row: 2;
    grid-column: 2;
    align-self: start;
    justify-self: center;
    width: 16px;
    height: 16px;
    z-index: 10;
}

.memory-dot {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background: var(--color-bg);
    border: 3px solid var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(226, 125, 96, .08);
    transition: transform .35s ease, background .35s ease, box-shadow .35s ease;
}

.memory-content {
    grid-row: 2;
    position: relative;
    z-index: 2;
}

/* Odd = left side, Even = right side */
.memory:nth-child(odd) .memory-date {
    grid-column: 1;
    text-align: right;
}

.memory:nth-child(odd) .memory-date::after {
    margin-left: auto;
}

.memory:nth-child(odd) .memory-content {
    grid-column: 1;
    display: flex;
    justify-content: flex-end;
}

.memory:nth-child(even) .memory-date {
    grid-column: 3;
    text-align: left;
}

.memory:nth-child(even) .memory-content {
    grid-column: 3;
    display: flex;
    justify-content: flex-start;
}

/* Elbow connector */
.memory-content::before {
    content: "";
    position: absolute;
    top: 8px;
    width: 2rem;
    height: 1px;
    background: #e5dcd5;
    transition: width .35s ease, background .35s ease;
}

.memory:nth-child(odd) .memory-content::before {
    right: 0;
}

.memory:nth-child(even) .memory-content::before {
    left: 0;
}

/* =========================================================
   MEMORY CARD
========================================================= */
.memory-card {
    width: min(100%, 420px);
    background: #fffdfb;
    border: 1px solid rgba(58, 46, 42, .055);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 12px 35px rgba(58, 46, 42, .055), 0 2px 8px rgba(58, 46, 42, .04);
    transform: scale(1);
    transform-origin: center;
    transition: transform .4s ease, box-shadow .4s ease;
}

.memory-card img,
.memory-card video {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: contain;
    background: #f3ede7;
}

.memory-card-body {
    padding: 1.25rem 1.5rem 1.4rem;
}

.card-title {
    margin: 0 0 .5rem;
    font-family: "Playfair Display", serif;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--color-ink);
    text-align: center;
}

.memory-card .caption {
    margin: 0;
    padding: 0;
    text-align: center;
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.6;
}

.memory-card:hover {
    transform: scale(1.02);
    box-shadow: 0 18px 40px rgba(58, 46, 42, .10), 0 4px 12px rgba(58, 46, 42, .05);
}

.memory-content:has(.memory-card:hover)::before {
    width: 2.5rem;
    background: var(--accent);
}

.memory:has(.memory-card:hover) .memory-dot {
    transform: scale(1.15);
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(226, 125, 96, .12);
}

/* Active state — whole card scales (image, padding, text together) */
.memory.active .memory-card {
    transform: scale(1.08);
    box-shadow: 0 20px 45px rgba(58, 46, 42, .11), 0 5px 15px rgba(58, 46, 42, .05);
    z-index: 3;
}

.memory.active .memory-dot {
    transform: scale(1.25);
    background: var(--accent);
    box-shadow: 0 0 0 7px rgba(226, 125, 96, .12);
}

.memory.active .memory-content::before {
    width: 3rem;
    background: var(--accent);
}

.memory.active .memory-date {
    font-size: 1rem;
}

.memory.active .memory-date::after {
    width: 40px;
    opacity: 1;
}

/* =========================================================
   DESKTOP / LARGE SCREENS
========================================================= */
@media (min-width: 900px) {
    .hero {
        padding: 4rem 3rem;
    }

    .hero-inner {
        flex-direction: row;
        text-align: left;
        gap: 5rem;
    }

    .hero-photo {
        flex: 0 0 420px;
    }

    .hero-text {
        flex: 1;
    }

    .hero-text p {
        margin-left: 0;
        margin-right: 0;
    }
}

@media (min-width: 1400px) {
    .hero-inner {
        gap: 7rem;
        width: min(1300px, 100%);
    }

    .photo-card {
        width: 450px;
    }

    .hero-text h1 {
        font-size: 5.5rem;
    }
}

/* =========================================================
   MOBILE TIMELINE
========================================================= */
@media (max-width: 899px) {
    .timeline-section {
        width: 100%;
        padding-block: 5rem;
        padding-inline: 1rem;
        border-radius: 0;
    }

    .timeline-header {
        margin-bottom: 5rem;
    }
    .timeline {
        width: min(100% - 2rem, 700px);
        margin-inline: auto;
    }

    .timeline::before,
    .timeline::after {
        left: 18px;
        transform: none;
    }

    .memory {
        grid-template-columns: 36px minmax(0, 1fr);
        grid-template-rows: auto auto;
        row-gap: .75rem;
        margin-bottom: 5rem;
    }

    .memory-date,
    .memory:nth-child(odd) .memory-date,
    .memory:nth-child(even) .memory-date {
        grid-column: 2;
        grid-row: 1;
        text-align: left;
    }

    .memory-date::after,
    .memory:nth-child(odd) .memory-date::after {
        margin-left: 0;
    }

    .memory-marker {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
    }

    .memory-content,
    .memory:nth-child(odd) .memory-content,
    .memory:nth-child(even) .memory-content {
        grid-column: 2;
        grid-row: 2;
        justify-content: flex-start;
    }

    .memory-content::before,
    .memory:nth-child(odd) .memory-content::before,
    .memory:nth-child(even) .memory-content::before {
        display: none;
    }

    .memory-card {
        width: 100%;
        transform-origin: left center;
    }

    .memory.active .memory-card {
        transform: scale(1.01);
    }
}



/* =========================================================
   LOGIN GATE
========================================================= */

.login-gate {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: radial-gradient(
        circle at center,
        #fdf6ef 0%,
        #f7e2ce 35%,
        #eeb98a 70%,
        #e08a5c 100%
    );
}

.login-card {
    width: min(100%, 380px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: .75rem;
    padding: 3rem 2rem;
    background: #fffdfb;
    border: 1px solid rgba(58, 46, 42, .055);
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(58, 46, 42, .08);
}

.login-card h1 {
    margin: .25rem 0 0;
    font-family: "Playfair Display", serif;
    font-size: 1.8rem;
    color: var(--color-ink);
}

.login-card p {
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: .95rem;
}

.login-card input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(58, 46, 42, .15);
    border-radius: 999px;
    font-size: 1rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color .25s ease;
}

.login-card input[type="password"]:focus {
    border-color: var(--accent);
}

.login-card .hero-button {
    border: none;
    cursor: pointer;
    margin-top: .5rem;
    width: 100%;
}

.login-error {
    margin: 0;
    color: #c0392b;
    font-size: .85rem;
}


/* =========================================================
   LINK-STYLE BUTTON (hero + login)
========================================================= */
.pill-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 14px 30px;
    border: none;
    border-radius: 999px;
    background: var(--accent);
    color: black;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}

.pill-button:hover {
    transform: translateY(-3px);
    background: #cf6f52;
    box-shadow: 0 8px 20px rgba(226, 125, 96, .2);
}

.pill-button .arrow {
    display: inline-block;
    transition: transform .3s ease;
}

.pill-button:hover .arrow {
    transform: translateX(4px);
}
