:root {
    --pink-1: #ffd6e7;
    --pink-2: #ff8fb1;
    --rose: #e63b7a;
    --rose-deep: #c7285e;
    --wine: #3a0a1f;
    --cream: #fff8f3;
    --gold: #f5c26b;
    --mint-1: #d9f5e2;
    --mint-2: #b5e8c8;
    --mint-3: #8ed9ac;
    --mint-deep: #4fa97a;
    --sage: #6fb690;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: "Poppins", sans-serif;
    color: var(--wine);
    background:
        radial-gradient(1200px 800px at 10% 10%, #ffe3ec 0%, transparent 60%),
        radial-gradient(1000px 700px at 90% 20%, #e5f8ec 0%, transparent 60%),
        radial-gradient(1100px 800px at 50% 100%, #ffd6e7 0%, transparent 55%),
        linear-gradient(-45deg, #fff1f4, #ffe3ec, #eaf8ef, #ffd6e7, #d9f5e2);
    background-size:
        auto,
        auto,
        auto,
        400% 400%;
    animation: bgShift 22s ease infinite;
    overflow-x: hidden;
    min-height: 100vh;
}
@keyframes bgShift {
    0% {
        background-position:
            0 0,
            0 0,
            0 0,
            0% 50%;
    }
    50% {
        background-position:
            0 0,
            0 0,
            0 0,
            100% 50%;
    }
    100% {
        background-position:
            0 0,
            0 0,
            0 0,
            0% 50%;
    }
}

/* Floating hearts */
.hearts {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.heart {
    position: absolute;
    bottom: -40px;
    font-size: 1.4rem;
    opacity: 0.75;
    animation: rise linear infinite;
    filter: drop-shadow(0 0 6px rgba(230, 59, 122, 0.5));
    will-change: transform, opacity;
}
@keyframes rise {
    0% {
        transform: translateY(0) rotate(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-110vh) rotate(360deg);
        opacity: 0;
    }
}

section {
    position: relative;
    z-index: 1;
    padding: 110px 24px;
    text-align: center;
}

/* HERO */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding-top: 60px;
    padding-bottom: 60px;
}
.hero-inner {
    max-width: 900px;
    padding: 0 12px;
}
.kicker {
    text-transform: uppercase;
    letter-spacing: 0.4em;
    font-size: 0.78rem;
    color: var(--rose);
    margin-bottom: 22px;
    font-weight: 600;
}
.kicker::before,
.kicker::after {
    content: "";
    display: inline-block;
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--rose));
    vertical-align: middle;
    margin: 0 14px;
}
.kicker::after {
    background: linear-gradient(90deg, var(--rose), transparent);
}
.title {
    font-family: "Great Vibes", cursive;
    font-size: clamp(5rem, 14vw, 11rem);
    line-height: 1.05;
    background: linear-gradient(
        90deg,
        #ff4e8a,
        #ff8fb1,
        #8ed9ac,
        #f5c26b,
        #ff4e8a
    );
    background-size: 250% 250%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 8s linear infinite;
    filter: drop-shadow(0 10px 30px rgba(230, 59, 122, 0.2));
    padding: 0.1em;
}
@keyframes shimmer {
    to {
        background-position: 250% 0;
    }
}
.subtitle {
    font-family: "Dancing Script", cursive;
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin: 18px auto 40px;
    color: #6b1a3a;
    min-height: 2.4em;
    max-width: 720px;
}
.caret {
    animation: blink 1s steps(1) infinite;
    color: var(--rose);
    margin-left: 2px;
}
@keyframes blink {
    50% {
        opacity: 0;
    }
}
.cta {
    display: inline-block;
    padding: 16px 36px;
    border-radius: 999px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.05em;
    background: linear-gradient(
        135deg,
        var(--rose) 0%,
        #ff8fb1 55%,
        var(--mint-3) 100%
    );
    background-size: 200% 200%;
    box-shadow:
        0 14px 34px rgba(230, 59, 122, 0.4),
        0 4px 14px rgba(143, 217, 172, 0.35);
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        background-position 0.6s ease;
}
.cta:hover {
    transform: translateY(-3px) scale(1.04);
    background-position: 100% 0;
    box-shadow:
        0 20px 44px rgba(230, 59, 122, 0.5),
        0 8px 22px rgba(143, 217, 172, 0.45);
}
.scroll-hint {
    margin-top: 64px;
    font-size: 0.8rem;
    letter-spacing: 0.4em;
    opacity: 0.55;
    animation: bob 2.2s ease-in-out infinite;
    text-transform: uppercase;
}
@keyframes bob {
    50% {
        transform: translateY(8px);
    }
}

/* Section titles */
.section-title {
    font-family: "Dancing Script", cursive;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    color: var(--rose);
    margin-bottom: 48px;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: "";
    display: block;
    width: 70px;
    height: 3px;
    margin: 10px auto 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--rose), var(--mint-3));
}

/* Counter */
.counter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    max-width: 760px;
    margin: 0 auto;
}
@media (max-width: 560px) {
    .counter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.cbox {
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.7),
        rgba(217, 245, 226, 0.55)
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 22px;
    padding: 26px 12px;
    box-shadow:
        0 12px 30px rgba(230, 59, 122, 0.12),
        0 6px 18px rgba(79, 169, 122, 0.1);
    transition: transform 0.4s ease;
}
.cbox:hover {
    transform: translateY(-4px);
}
.cbox span {
    display: block;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 600;
    background: linear-gradient(135deg, var(--rose), var(--mint-deep));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
}
.cbox small {
    letter-spacing: 0.25em;
    text-transform: uppercase;
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 6px;
    display: block;
}
.counter-note {
    margin-top: 28px;
    font-family: "Dancing Script", cursive;
    font-size: 1.4rem;
    color: var(--rose-deep);
}

/* Gallery */
.grid {
    column-count: 3;
    column-gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}
@media (max-width: 900px) {
    .grid {
        column-count: 2;
    }
}
@media (max-width: 560px) {
    .grid {
        column-count: 1;
    }
}
.card {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 18px 40px rgba(230, 59, 122, 0.22),
        0 6px 20px rgba(79, 169, 122, 0.12);
    transform: translateY(24px);
    opacity: 0;
    transition:
        transform 0.9s ease,
        opacity 0.9s ease,
        box-shadow 0.5s ease;
    position: relative;
    background: #fff;
}
.card.visible {
    transform: none;
    opacity: 1;
}
.card:hover {
    box-shadow:
        0 24px 50px rgba(230, 59, 122, 0.3),
        0 10px 26px rgba(79, 169, 122, 0.18);
}
.card img {
    width: 100%;
    display: block;
    transition: transform 0.8s ease;
}
.card:hover img {
    transform: scale(1.06);
}
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 55%,
        rgba(58, 10, 31, 0.35)
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.card:hover::before {
    opacity: 1;
}
.card::after {
    content: "💗";
    position: absolute;
    bottom: 14px;
    right: 16px;
    font-size: 1.5rem;
    opacity: 0;
    transform: translateY(8px);
    transition: 0.4s;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}
.card:hover::after {
    opacity: 1;
    transform: none;
}

/* Reasons */
.reason-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    max-width: 1000px;
    margin: 0 auto;
}
.reason {
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.75),
        rgba(217, 245, 226, 0.5)
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 32px 22px;
    font-size: 2.2rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 12px 30px rgba(230, 59, 122, 0.13),
        0 6px 18px rgba(79, 169, 122, 0.12);
    transition:
        transform 0.4s ease,
        box-shadow 0.4s ease;
}
.reason:hover {
    transform: translateY(-8px) rotate(-0.8deg);
    box-shadow:
        0 20px 40px rgba(230, 59, 122, 0.2),
        0 10px 24px rgba(79, 169, 122, 0.18);
}
.reason p {
    font-size: 1rem;
    margin-top: 12px;
    line-height: 1.55;
    color: var(--wine);
}

/* Letter / Envelope */
.letter {
    padding-bottom: 160px;
}
.envelope {
    position: relative;
    width: min(420px, 85vw);
    height: 280px;
    margin: 30px auto 10px;
    cursor: pointer;
    perspective: 1200px;
}
.front,
.flap,
.back {
    position: absolute;
    inset: 0;
    border-radius: 12px;
}
.back {
    background: linear-gradient(135deg, #ffb3c6, #ff8fb1);
    z-index: 1;
}
.front {
    background: linear-gradient(135deg, #ff8fb1, var(--rose));
    box-shadow:
        0 24px 44px rgba(230, 59, 122, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    z-index: 3;
    overflow: hidden;
}
.front::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.55;
    background:
        linear-gradient(
            45deg,
            transparent 49.4%,
            rgba(255, 255, 255, 0.35) 50%,
            transparent 50.6%
        ),
        linear-gradient(
            -45deg,
            transparent 49.4%,
            rgba(255, 255, 255, 0.35) 50%,
            transparent 50.6%
        );
}
.front::after {
    content: "💖";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    background: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    z-index: 4;
}
.flap {
    background: linear-gradient(135deg, #ff6ea1, var(--rose-deep));
    transform-origin: top;
    z-index: 5;
    clip-path: polygon(0 0, 100% 0, 50% 68%);
    transition: transform 0.9s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.paper {
    position: absolute;
    left: 5%;
    right: 5%;
    top: 8%;
    background: linear-gradient(180deg, var(--cream), #fdeee3);
    border-radius: 10px;
    padding: 30px 28px;
    text-align: left;
    line-height: 1.7;
    color: #4a0f26;
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.18),
        inset 0 0 0 1px rgba(230, 59, 122, 0.1);
    z-index: 2;
    opacity: 0;
    transition:
        transform 1s cubic-bezier(0.2, 0.8, 0.3, 1) 0.25s,
        opacity 0.5s ease 0.25s;
    font-family: "Dancing Script", cursive;
    font-size: 1.2rem;
}
.paper h3 {
    font-family: "Great Vibes", cursive;
    font-size: 2.2rem;
    color: var(--rose);
    margin-bottom: 8px;
    line-height: 1.1;
}
.paper p {
    margin-top: 10px;
}
.paper .sign {
    margin-top: 18px;
    text-align: right;
    font-size: 1.35rem;
    color: var(--rose-deep);
}

.envelope.open .flap {
    transform: rotateX(180deg);
}
.envelope.open .paper {
    opacity: 1;
    transform: translateY(-240px);
    z-index: 6;
}

.tap-hint {
    margin-top: 34px;
    font-family: "Dancing Script", cursive;
    font-size: 1.2rem;
    opacity: 0.65;
    color: var(--rose-deep);
}

footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 36px 20px;
    font-family: "Dancing Script", cursive;
    font-size: 1.25rem;
    color: var(--rose);
    border-top: 1px solid rgba(230, 59, 122, 0.12);
    background: linear-gradient(180deg, transparent, rgba(217, 245, 226, 0.35));
}

@media (max-width: 560px) {
    section {
        padding: 80px 18px;
    }
    .hero {
        padding-top: 40px;
    }
    .paper {
        font-size: 1.05rem;
        padding: 22px 20px;
    }
    .envelope {
        height: 240px;
    }
    .envelope.open .paper {
        transform: translateY(-200px);
    }
}
