/* ==========================================================
   Us, So Far — timeline homepage
   ========================================================== */

:root {
    --blush: #fff5f8;
    --blush-deep: #ffe6ef;
    --rose: #e5487a;
    --rose-soft: #ff8fb1;
    --wine: #8c2049;
    --gold: #d9a441;
    --ink: #4a3540;
}

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

body {
    font-family: 'Georgia', 'Didot', serif;
    color: var(--ink);
    background:
        radial-gradient(1000px 600px at 15% -10%, #fff 0%, rgba(255,255,255,0) 60%),
        radial-gradient(900px 700px at 100% 20%, #ffe9f2 0%, rgba(255,255,255,0) 65%),
        linear-gradient(160deg, var(--blush) 0%, var(--blush-deep) 55%, #f9e7f2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 0 20px 80px;
    overflow-x: hidden;
}

/* ---------- drifting petals ---------- */
.petals {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.petals span {
    position: absolute;
    top: -40px;
    font-size: 16px;
    opacity: 0;
    animation: drift linear infinite;
}

.petals span::before { content: "❀"; color: var(--rose-soft); }
.petals span:nth-child(even)::before { content: "❤"; color: #ffb3c9; }

.petals span:nth-child(1)  { left:  4%; font-size: 14px; animation-duration: 19s; animation-delay: 0s; }
.petals span:nth-child(2)  { left: 14%; font-size: 22px; animation-duration: 24s; animation-delay: 3s; }
.petals span:nth-child(3)  { left: 26%; font-size: 12px; animation-duration: 17s; animation-delay: 7s; }
.petals span:nth-child(4)  { left: 37%; font-size: 26px; animation-duration: 27s; animation-delay: 1s; }
.petals span:nth-child(5)  { left: 48%; font-size: 15px; animation-duration: 21s; animation-delay: 9s; }
.petals span:nth-child(6)  { left: 59%; font-size: 19px; animation-duration: 23s; animation-delay: 5s; }
.petals span:nth-child(7)  { left: 70%; font-size: 13px; animation-duration: 18s; animation-delay: 11s; }
.petals span:nth-child(8)  { left: 80%; font-size: 24px; animation-duration: 26s; animation-delay: 2s; }
.petals span:nth-child(9)  { left: 89%; font-size: 16px; animation-duration: 20s; animation-delay: 8s; }
.petals span:nth-child(10) { left: 96%; font-size: 18px; animation-duration: 22s; animation-delay: 13s; }

@keyframes drift {
    0%   { transform: translate3d(0, -40px, 0) rotate(0deg);      opacity: 0; }
    8%   { opacity: .55; }
    50%  { transform: translate3d(40px, 50vh, 0) rotate(180deg);  opacity: .55; }
    92%  { opacity: .35; }
    100% { transform: translate3d(-30px, 105vh, 0) rotate(360deg); opacity: 0; }
}

/* ---------- masthead ---------- */
.masthead {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 100px 0 70px;
    max-width: 760px;
    margin: 0 auto;
}

.masthead__title {
    font-size: clamp(2.8rem, 9vw, 5rem);
    font-weight: normal;
    line-height: 1.05;
    color: var(--wine);
    letter-spacing: .01em;
}

/* ---------- timeline shell ---------- */
.timeline {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 20px;
}

.timeline__spine {
    position: absolute;
    top: 0;
    bottom: 90px;
    left: 50%;
    width: 2px;
    margin-left: -1px;
    background: linear-gradient(180deg,
        rgba(255,143,177,0) 0%,
        rgba(255,143,177,.8) 8%,
        rgba(217,164,65,.55) 55%,
        rgba(255,143,177,.15) 100%);
}

/* ---------- nodes ---------- */
.node {
    position: relative;
    width: 50%;
    padding: 0 60px 90px 0;
    opacity: 0;
    transform: translateY(38px);
    transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.3,1);
}

.node.is-visible {
    opacity: 1;
    transform: none;
}

.node--right {
    margin-left: 50%;
    padding: 0 0 90px 60px;
    text-align: left;
}

.node--left {
    text-align: right;
}

.node__marker {
    position: absolute;
    top: 14px;
    width: 18px;
    height: 18px;
}

.node--left .node__marker  { right: -9px; }
.node--right .node__marker { left: -9px; }

.node__marker span {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--rose);
    box-shadow: 0 0 0 6px rgba(229,72,122,.12);
}

.node__marker span::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--rose);
    animation: beat 2.4s ease-in-out infinite;
}

@keyframes beat {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(.55); opacity: .5; }
}

.node__card {
    display: inline-block;
    max-width: 380px;
}

.node__date {
    text-transform: uppercase;
    letter-spacing: .28em;
    font-size: .7rem;
    color: var(--gold);
    margin-bottom: 10px;
}

.node__date span {
    color: #cdb08a;
    letter-spacing: .12em;
}

.node__title {
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    font-weight: normal;
    color: var(--wine);
    margin-bottom: 12px;
}

.node__blurb {
    line-height: 1.75;
    color: #7d6070;
    font-size: 1rem;
    margin-bottom: 26px;
}

/* nodes with no blurb still need air under the title */
.node__title + .polaroid,
.node__title + .ghosts,
.node__title + .btn {
    margin-top: 16px;
}

/* ---------- the button ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, #e5487a 0%, #c9235a 100%);
    color: #fff;
    text-decoration: none;
    font-size: 1.05rem;
    letter-spacing: .03em;
    box-shadow: 0 10px 26px rgba(201, 35, 90, .32);
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(201, 35, 90, .4);
    filter: brightness(1.06);
}

.btn:active { transform: translateY(-1px); }

.btn:focus-visible {
    outline: 2px solid var(--wine);
    outline-offset: 4px;
}

/* locked until its date */
.btn--locked {
    background: #e7d3dc;
    color: #8e7180;
    box-shadow: none;
    cursor: not-allowed;
}

.btn--locked:hover {
    transform: none;
    box-shadow: none;
    filter: none;
}

.btn--locked.is-nudged { animation: nudge .4s ease; }

@keyframes nudge {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-5px); }
    75%      { transform: translateX(5px); }
}

.btn-note {
    margin-top: 14px;
    font-style: italic;
    font-size: .88rem;
    color: #a8869a;
}


/* ---------- polaroid ---------- */
.polaroid {
    position: relative;
    display: inline-block;
    background: #fff;
    padding: 14px 14px 52px;
    border-radius: 4px;
    box-shadow: 0 18px 40px rgba(140,32,73,.18);
    transform: rotate(-3deg);
    transition: transform .45s cubic-bezier(.2,.7,.3,1), box-shadow .45s ease;
}

.node--left .polaroid { transform: rotate(3deg); }

.polaroid:hover {
    transform: rotate(0deg) scale(1.035);
    box-shadow: 0 26px 60px rgba(140,32,73,.26);
}

.polaroid img {
    display: block;
    width: 260px;
    height: 300px;
    object-fit: cover;
    object-position: center 55%;
    border-radius: 2px;
    background: #f3e2ea;
}

.polaroid figcaption {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    text-align: center;
    font-style: italic;
    color: #b0788f;
    font-size: .95rem;
}

/* ---------- coming soon ---------- */
.node--soon .node__title,
.node--soon .node__date { opacity: .65; }

.node--soon .node__marker span {
    border-style: dashed;
    border-color: var(--rose-soft);
    box-shadow: none;
}

.node--soon .node__marker span::after { animation-duration: 4s; opacity: .35; }

.ghosts {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    margin-top: 6px;
}

.node--left .ghosts { justify-content: flex-end; }

.ghost {
    width: 92px;
    height: 40px;
    border-radius: 999px;
    border: 1px dashed rgba(229,72,122,.45);
    background: rgba(255,255,255,.35);
    animation: shimmer 3.6s ease-in-out infinite;
}

.ghost:nth-child(2) { opacity: .66; animation-delay: .5s; }
.ghost:nth-child(3) { opacity: .38; animation-delay: 1s; }

@keyframes shimmer {
    0%, 100% { transform: translateY(0);    }
    50%      { transform: translateY(-6px); }
}

.fade-out {
    text-align: center;
    padding-top: 10px;
}

.fade-out span {
    display: block;
    width: 5px;
    height: 5px;
    margin: 12px auto;
    border-radius: 50%;
    background: var(--rose-soft);
}

.fade-out span:nth-child(2) { opacity: .6; width: 4px; height: 4px; }
.fade-out span:nth-child(3) { opacity: .3; width: 3px; height: 3px; }

.fade-out p {
    margin-top: 22px;
    font-style: italic;
    color: #c095a8;
    letter-spacing: .1em;
}

/* ---------- mobile ---------- */
@media (max-width: 860px) {
    body { padding: 0 18px 60px; }

    .masthead { padding: 64px 0 44px; }

    .timeline__spine {
        left: 22px;
        margin-left: 0;
        bottom: 80px;
    }

    .node,
    .node--right,
    .node--left {
        width: 100%;
        margin-left: 0;
        padding: 0 0 70px 58px;
        text-align: left;
    }

    .node--left .node__marker,
    .node--right .node__marker { left: 14px; right: auto; }

    .node__card { max-width: 100%; }

    .node--left .polaroid { transform: rotate(-2deg); }

    .polaroid img {
        width: min(260px, 68vw);
        height: min(300px, 78vw);
    }

    .btn { padding: 15px 28px; font-size: 1rem; }

    .node--left .ghosts { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; }
    .node { opacity: 1; transform: none; }
}
