:root {
    --cream: #FBF1E7;
    --paper: #F6E8D8;
    --blush: #E8637A;
    --blush-deep: #D4485F;
    --wine: #7A2E3E;
    --peach: #F5B895;
    --gold: #C99A4B;
    --ink: #3A2E35;
    --dim: #8B7267;
    --line: #E4CDB7;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--cream);
    background-image: radial-gradient(circle at 100% 0%, rgba(232,99,122,0.08), transparent 40%), radial-gradient(circle at 0% 100%, rgba(201,154,75,0.10), transparent 40%);
    color: var(--ink);
    font-family: 'Karla',sans-serif;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
}

.script {
    font-family: 'Caveat',cursive;
}

.display {
    font-family: 'Playfair Display',serif;
}

h1, h2, h3 {
    font-family: 'Playfair Display',serif;
    font-weight: 600;
    color: var(--wine);
    letter-spacing: -0.01em;
}

.eyebrow-script {
    font-family: 'Caveat',cursive;
    font-size: 1.6rem;
    color: var(--blush-deep);
    display: inline-block;
    transform: rotate(-2deg);
}

/* torn paper edge, used as a section divider */
.torn {
    height: 26px;
    width: 100%;
    background: linear-gradient(135deg, var(--cream) 25%, transparent 25%) 0 0/16px 16px, linear-gradient(-135deg, var(--cream) 25%, transparent 25%) 0 0/16px 16px;
    background-color: var(--paper);
}

    .torn.flip {
        transform: scaleY(-1);
    }

/* ---------- NAV ---------- */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(251,241,231,0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    max-width: 1180px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Playfair Display',serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--wine);
}

    .logo .heart {
        color: var(--blush);
        font-size: 1.2rem;
    }

.nav-links {
    display: flex;
    gap: 34px;
    align-items: center;
}

    .nav-links a {
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--dim);
        position: relative;
        transition: color .2s;
    }

        .nav-links a:hover {
            color: var(--wine);
        }

        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 0;
            width: 0;
            height: 2px;
            background: var(--blush);
            transition: width .3s;
            border-radius: 2px;
        }

        .nav-links a:hover::after {
            width: 100%;
        }

.nav-cta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn {
    font-weight: 700;
    font-size: 0.92rem;
    padding: 11px 22px;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .2s, box-shadow .2s, background .2s;
}

    .btn:hover {
        transform: translateY(-2px) rotate(-0.5deg);
    }

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

.btn-primary {
    background: var(--blush);
    color: #fff;
    box-shadow: 0 6px 0 var(--blush-deep);
}

    .btn-primary:hover {
        box-shadow: 0 8px 0 var(--blush-deep);
    }

.btn-ghost {
    background: transparent;
    border-color: var(--wine);
    color: var(--wine);
}

    .btn-ghost:hover {
        background: var(--wine);
        color: #fff;
    }

.burger {
    display: none;
    background: none;
    border: none;
    color: var(--wine);
    font-size: 1.6rem;
    cursor: pointer;
}

/* ---------- HERO — the open envelope ---------- */
.hero {
    position: relative;
    padding: 80px 0 60px;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 60px;
    align-items: center;
}

.hero .eyebrow-script {
    margin-bottom: 6px;
}

.hero h1 {
    font-size: clamp(2.5rem,5vw,4rem);
    line-height: 1.08;
    margin-bottom: 22px;
    font-style: italic;
}

    .hero h1 em {
        font-style: normal;
        color: var(--blush-deep);
    }

.hero p.sub {
    font-size: 1.12rem;
    color: var(--dim);
    max-width: 480px;
    margin-bottom: 32px;
    line-height: 1.65;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 36px;
}

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

.hero-stamp {
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
}

    .hero-stamp div strong {
        display: block;
        font-family: 'Playfair Display';
        font-size: 1.4rem;
        color: var(--wine);
    }

    .hero-stamp div span {
        font-size: 0.8rem;
        color: var(--dim);
    }

/* the "letter" visual */
.letter {
    position: relative;
    background: #fff;
    border-radius: 4px;
    padding: 36px 34px;
    box-shadow: 0 30px 60px -20px rgba(122,46,62,0.35), 0 2px 0 var(--line);
    transform: rotate(2deg);
    max-width: 420px;
    margin: 0 auto;
}

    .letter::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 4px;
        background-image: repeating-linear-gradient(transparent, transparent 27px, var(--line) 28px);
        opacity: 0.5;
        pointer-events: none;
    }

    .letter .to {
        font-family: 'Caveat';
        font-size: 1.7rem;
        color: var(--blush-deep);
        margin-bottom: 14px;
    }

    .letter p {
        font-family: 'Caveat';
        font-size: 1.35rem;
        line-height: 1.5;
        color: var(--ink);
    }

.wax-seal {
    position: absolute;
    bottom: -22px;
    right: -18px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #e97b8f, var(--blush-deep));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    box-shadow: 0 8px 16px rgba(122,46,62,0.4);
    transform: rotate(-8deg);
}

.taped-photo {
    position: absolute;
    top: -24px;
    left: -30px;
    width: 110px;
    background: #fff;
    padding: 8px 8px 20px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.18);
    transform: rotate(-9deg);
    border-radius: 2px;
}

    .taped-photo .swatch {
        width: 100%;
        aspect-ratio: 1;
        background: linear-gradient(135deg,var(--peach),var(--blush));
        border-radius: 1px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.6rem;
    }

    .taped-photo span {
        display: block;
        text-align: center;
        font-family: 'Caveat';
        font-size: 1rem;
        margin-top: 6px;
        color: var(--dim);
    }

.sticky-note {
    position: absolute;
    bottom: 20px;
    left: -46px;
    width: 120px;
    padding: 14px;
    background: #FFF6C9;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    font-family: 'Caveat';
    font-size: 1.1rem;
    color: #5c4a1e;
    transform: rotate(6deg);
    line-height: 1.3;
}

/* ---------- Section shell ---------- */
section {
    padding: 80px 0;
    position: relative;
}

.section-head {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 52px;
}

    .section-head h2 {
        font-size: clamp(1.8rem,3.2vw,2.5rem);
        margin: 8px 0 12px;
        font-style: italic;
    }

    .section-head p {
        color: var(--dim);
        font-size: 1rem;
        line-height: 1.6;
    }

/* ---------- Features — index cards, pinned ---------- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 30px;
}

.feature-card {
    background: #fff;
    border-radius: 6px;
    padding: 32px 28px;
    position: relative;
    box-shadow: 0 14px 30px -14px rgba(58,46,53,0.18);
    transition: transform .3s ease;
}

    .feature-card:nth-child(2) {
        transform: rotate(-1.3deg);
    }

    .feature-card:nth-child(1) {
        transform: rotate(1deg);
    }

    .feature-card:nth-child(3) {
        transform: rotate(-0.6deg);
    }

    .feature-card:hover {
        transform: translateY(-6px) rotate(0deg);
    }

    .feature-card .pin {
        position: absolute;
        top: -10px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 1.3rem;
    }

    .feature-card h3 {
        font-size: 1.25rem;
        margin: 10px 0 10px;
    }

    .feature-card p {
        color: var(--dim);
        font-size: 0.93rem;
        line-height: 1.6;
        margin-bottom: 14px;
    }

    .feature-card ul {
        list-style: none;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .feature-card li {
        font-size: 0.76rem;
        background: var(--paper);
        padding: 5px 11px;
        border-radius: 999px;
        color: var(--wine);
        font-weight: 600;
    }

/* ---------- Chat rooms — postcards ---------- */
section.rooms {
    background: var(--paper);
}

.room-scroller {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 10px 4px 20px;
    scrollbar-width: none;
}

    .room-scroller::-webkit-scrollbar {
        display: none;
    }

.room-card {
    min-width: 210px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 10px 22px -10px rgba(58,46,53,0.25);
    position: relative;
    border: 1px solid var(--line);
}

    .room-card::after {
        content: '';
        position: absolute;
        top: 10px;
        right: 10px;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        border: 1.5px dashed var(--gold);
        opacity: 0.6;
    }

    .room-card .flag {
        font-size: 1.7rem;
        margin-bottom: 12px;
    }

    .room-card h4 {
        font-family: 'Playfair Display';
        font-size: 1.1rem;
        color: var(--wine);
        margin-bottom: 6px;
    }

    .room-card .count {
        font-size: 0.78rem;
        color: var(--blush-deep);
        font-weight: 600;
        margin-bottom: 16px;
    }

.trend-tag {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 0.65rem;
    background: var(--blush);
    color: #fff;
    padding: 3px 9px;
    border-radius: 999px;
    font-weight: 700;
}

.join-btn {
    width: 100%;
    padding: 9px;
    border-radius: 999px;
    border: 1.5px solid var(--wine);
    background: transparent;
    color: var(--wine);
    font-weight: 700;
    font-size: 0.83rem;
    cursor: pointer;
    transition: all .2s;
}

    .join-btn:hover {
        background: var(--wine);
        color: #fff;
    }

/* ---------- Hashtags — ribbon tags ---------- */
.hashtag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.tag-chip {
    padding: 9px 18px;
    border-radius: 4px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--wine);
    box-shadow: 2px 3px 0 var(--line);
    transition: all .2s;
}

    .tag-chip:hover {
        background: var(--blush);
        color: #fff;
        border-color: var(--blush);
        box-shadow: 2px 3px 0 var(--blush-deep);
        transform: translate(-1px,-1px);
    }

/* ---------- Trending — today's sparks ---------- */
.trend-list {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 16px;
}

.trend-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 16px 20px;
}

    .trend-item .rank {
        font-family: 'Playfair Display';
        color: var(--gold);
        font-weight: 700;
        font-size: 1.1rem;
    }

    .trend-item .name {
        font-weight: 700;
        color: var(--wine);
        flex: 1;
    }

/* ---------- Upload — the photo booth ---------- */
.upload-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.dropzone {
    border: 2px dashed var(--gold);
    border-radius: 8px;
    padding: 48px 30px;
    text-align: center;
    background: #fff;
    transition: all .25s;
    cursor: pointer;
}

    .dropzone:hover {
        border-color: var(--blush);
        background: #FFF8F1;
    }

    .dropzone .icon {
        font-size: 2.4rem;
        margin-bottom: 14px;
    }

.progress-track {
    height: 8px;
    border-radius: 999px;
    background: var(--paper);
    margin: 22px 0 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 68%;
    border-radius: 999px;
    background: var(--blush);
}

.link-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 8px 8px 18px;
    font-size: 0.85rem;
}

    .link-row span {
        flex: 1;
        color: var(--dim);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.chip-btn {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    background: var(--wine);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 700;
}

.upload-steps {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.upload-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-num {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--blush);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display';
    font-weight: 700;
    font-size: 0.95rem;
}

.upload-step h4 {
    font-family: 'Playfair Display';
    color: var(--wine);
    margin-bottom: 4px;
}

.upload-step p {
    color: var(--dim);
    font-size: 0.9rem;
}

/* ---------- Community — the scrapbook ---------- */
section.community {
    background: var(--paper);
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 20px;
}

.comm-card {
    background: #fff;
    border-radius: 6px;
    padding: 22px 16px;
    text-align: center;
    box-shadow: 0 10px 20px -10px rgba(58,46,53,0.2);
    transition: transform .25s;
}

    .comm-card:nth-child(odd) {
        transform: rotate(-1deg);
    }

    .comm-card:nth-child(even) {
        transform: rotate(1deg);
    }

    .comm-card:hover {
        transform: translateY(-5px) rotate(0deg);
    }

    .comm-card .emoji {
        font-size: 1.9rem;
        margin-bottom: 10px;
    }

    .comm-card h4 {
        font-size: 0.92rem;
        color: var(--wine);
        margin-bottom: 6px;
        font-family: 'Playfair Display';
    }

    .comm-card .members {
        font-size: 0.74rem;
        color: var(--dim);
        margin-bottom: 14px;
    }

    .comm-card button {
        width: 100%;
        padding: 8px;
        border-radius: 999px;
        border: none;
        background: var(--gold);
        color: #fff;
        font-weight: 700;
        font-size: 0.78rem;
        cursor: pointer;
    }

/* ---------- Gamification — the love calendar ---------- */
.game-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.leader-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 26px;
    box-shadow: 0 14px 30px -16px rgba(58,46,53,0.2);
}

.leader-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--line);
}

    .leader-row:last-child {
        border-bottom: none;
    }

.leader-rank {
    font-family: 'Playfair Display';
    font-weight: 700;
    width: 22px;
    color: var(--gold);
}

.leader-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--peach);
    display: flex;
    align-items: center;
    justify-content: center;
}

.leader-name {
    flex: 1;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--wine);
}

.leader-xp {
    font-size: 0.78rem;
    color: var(--blush-deep);
    font-weight: 700;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 14px;
}

.badge {
    aspect-ratio: 1;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 1.4rem;
}

    .badge span.label {
        font-size: 0.6rem;
        color: var(--dim);
        font-weight: 600;
    }

.game-copy .stamp-row {
    display: flex;
    gap: 26px;
    margin-top: 24px;
    flex-wrap: wrap;
}

    .game-copy .stamp-row div strong {
        font-family: 'Playfair Display';
        font-size: 1.5rem;
        display: block;
        color: var(--wine);
    }

    .game-copy .stamp-row div span {
        font-size: 0.8rem;
        color: var(--dim);
    }

/* ---------- CTA band — the invitation ---------- */
.cta-band {
    border-radius: 12px;
    padding: 64px 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: var(--wine);
    color: #fff;
}

    .cta-band::before {
        content: '';
        position: absolute;
        inset: 0;
        opacity: 0.15;
        background-image: radial-gradient(circle, #fff 1px, transparent 1px);
        background-size: 22px 22px;
    }

    .cta-band h2 {
        color: #fff;
        font-size: clamp(1.8rem,3.4vw,2.7rem);
        margin-bottom: 16px;
        position: relative;
        font-style: italic;
    }

    .cta-band p {
        opacity: 0.85;
        margin-bottom: 28px;
        max-width: 480px;
        margin-inline: auto;
        position: relative;
    }

    .cta-band .hero-ctas {
        position: relative;
        justify-content: center;
    }

    .cta-band .btn-primary {
        background: #fff;
        color: var(--wine);
        box-shadow: 0 6px 0 var(--peach);
    }

    .cta-band .btn-ghost {
        border-color: #fff;
        color: #fff;
    }

        .cta-band .btn-ghost:hover {
            background: #fff;
            color: var(--wine);
        }

/* ---------- Footer — sealed with love ---------- */
footer {
    border-top: 1px solid var(--line);
    padding: 56px 0 110px;
    background: var(--paper);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(4,1fr);
    gap: 30px;
    margin-bottom: 36px;
}

    .footer-grid h5 {
        font-family: 'Playfair Display';
        font-size: 0.85rem;
        color: var(--wine);
        margin-bottom: 16px;
    }

    .footer-grid ul {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

        .footer-grid ul a {
            font-size: 0.9rem;
            color: var(--dim);
            transition: color .2s;
        }

            .footer-grid ul a:hover {
                color: var(--blush-deep);
            }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px dashed var(--line);
    font-size: 0.82rem;
    color: var(--dim);
}

.social-row {
    display: flex;
    gap: 14px;
}

    .social-row a {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: #fff;
        border: 1px solid var(--line);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all .2s;
    }

        .social-row a:hover {
            background: var(--blush);
            color: #fff;
            border-color: var(--blush);
        }

/* ---------- Mobile bottom nav ---------- */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    background: rgba(251,241,231,0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    padding: 10px 14px 16px;
}

    .mobile-nav ul {
        list-style: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .mobile-nav li {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        font-size: 0.65rem;
        color: var(--dim);
        font-weight: 600;
    }

        .mobile-nav li.active {
            color: var(--blush-deep);
        }

.fab {
    position: fixed;
    bottom: 86px;
    right: 22px;
    z-index: 61;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--blush);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    box-shadow: 0 10px 24px rgba(212,72,95,0.5);
    border: none;
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .btn:hover {
        transform: none;
    }
}

/* ---------- Responsive ---------- */
@media (max-width:1000px) {
    .feature-grid {
        grid-template-columns: repeat(2,1fr);
    }

    .community-grid {
        grid-template-columns: repeat(3,1fr);
    }

    .trend-list {
        grid-template-columns: repeat(2,1fr);
    }
}

@media (max-width:860px) {
    .nav-links {
        display: none;
    }

    .burger {
        display: block;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .letter {
        margin-top: 50px;
    }

    .upload-wrap, .game-wrap {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2,1fr);
    }

    .mobile-nav {
        display: block;
    }

    body {
        padding-bottom: 70px;
    }
}

@media (max-width:600px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .community-grid {
        grid-template-columns: repeat(2,1fr);
    }

    .trend-list {
        grid-template-columns: 1fr;
    }

    section {
        padding: 56px 0;
    }

    .cta-band {
        padding: 46px 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .sticky-note, .taped-photo {
        display: none;
    }

    .letter {
        transform: rotate(0);
    }
}
