/* =========================================================
   BFT HOME — Refinement pass
   ========================================================= */

/* Tighter vertical rhythm across homepage sections without touching
   the shared spacing used by the rest of the website. */
.home-page .section:not(.home-hero) {
    padding-block: clamp(54px, 7vw, 92px);
}

.home-page .section-heading {
    margin-bottom: clamp(28px, 3vw, 36px);
}

/* ---------------------------------------------------------
   Hero — give the copy more room and reduce the visual by ~15–20%
   on desktop. Mobile keeps the existing image-led composition.
   --------------------------------------------------------- */
@media (min-width: 821px) {
    .home-page .hero-slide__inner,
    .home-page .hero-slide__inner--reverse {
        grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
        gap: clamp(30px, 4vw, 62px);
    }

    .home-page .hero-slide__visual {
        max-width: 92%;
        justify-self: end;
    }

    .home-page .hero-slide__caption {
        right: -4px;
        min-width: 205px;
        padding: 17px 22px;
        gap: 14px;
    }

    .home-page .hero-slide__caption strong {
        font-size: 1.05rem;
    }
}

/* ---------------------------------------------------------
   Five-category premium rail
   Image first, title underneath. No descriptions here — the
   section stays light, shoppable and visually refined.
   --------------------------------------------------------- */
.home-category-rail {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(10px, 1.5vw, 20px);
    padding-bottom: 18px;
}

.home-category-rail::after {
    position: absolute;
    left: 1.5%;
    right: 1.5%;
    bottom: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(157, 92, 55, .65) 12%, rgba(190, 130, 70, .8) 50%, rgba(157, 92, 55, .65) 88%, transparent);
    box-shadow: 0 7px 18px rgba(184, 123, 63, .22);
    content: "";
}

.home-category-tile {
    position: relative;
    min-width: 0;
    display: block;
    text-align: center;
    color: var(--color-primary);
    text-decoration: none;
}

.home-category-tile__image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / .82;
    border: 1px solid rgba(61, 35, 24, .09);
    border-radius: 16px;
    background: #f3e8dc;
    box-shadow: 0 10px 22px rgba(61, 35, 24, .07);
}

.home-category-tile__image::after {
    position: absolute;
    inset: auto 8% -9px;
    height: 14px;
    border-radius: 50%;
    background: rgba(202, 139, 72, .24);
    filter: blur(8px);
    content: "";
    pointer-events: none;
}

.home-category-tile__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .4s ease;
}

.home-category-tile:hover .home-category-tile__image img {
    transform: scale(1.035);
}

.home-category-tile__name {
    display: block;
    margin-top: 13px;
    font-family: var(--font-display);
    font-size: clamp(.95rem, 1.35vw, 1.3rem);
    line-height: 1.1;
    font-weight: 600;
}

/* ---------------------------------------------------------
   Made for the moment — keep headlines to two lines without
   truncation. The font scales down instead of showing ellipsis.
   --------------------------------------------------------- */
.home-page .home-moments__grid {
    align-items: stretch;
}

.home-page .home-moment h3 {
    font-size: clamp(1.15rem, 1.5vw, 1.58rem);
    line-height: 1.08;
    min-height: 2.16em;
    overflow: visible;
}

@media (max-width: 820px) {
    .home-page .section:not(.home-hero) {
        padding-block: 50px;
    }

    .home-page .home-category-rail {
        gap: 8px;
        padding-bottom: 13px;
    }

    .home-page .home-category-tile__image {
        aspect-ratio: 1 / .9;
        border-radius: 12px;
    }

    .home-page .home-category-tile__name {
        margin-top: 9px;
        font-size: clamp(.62rem, 2vw, .82rem);
        line-height: 1.08;
    }

    .home-page .home-moments__intro {
        display: none;
    }

    .home-page .home-moment h3 {
        font-size: clamp(.9rem, 3vw, 1.12rem);
        line-height: 1.08;
        letter-spacing: -.015em;
    }
}

@media (max-width: 520px) {
    .home-page .section:not(.home-hero) {
        padding-block: 44px;
    }

    /* Keep all five categories on one row even on narrow screens. */
    .home-page .home-category-rail {
        gap: 6px;
        padding-bottom: 10px;
    }

    .home-page .home-category-tile__image {
        border-radius: 9px;
        box-shadow: 0 5px 12px rgba(61, 35, 24, .06);
    }

    .home-page .home-category-tile__name {
        margin-top: 7px;
        font-size: .62rem;
        letter-spacing: -.01em;
    }

    .home-page .home-moment h3 {
        font-size: .88rem;
        line-height: 1.08;
        letter-spacing: -.02em;
    }
}

/* =========================================================
   BFT HOME — Refinement pass v2
   ========================================================= */

/* Hero: use one fixed visual frame for all three slides. The third
   slide's proportions are the reference frame. Give both copy and
   image a little breathing room from the viewport edges. */
@media (min-width: 821px) {
    .home-page .hero-slide__inner,
    .home-page .hero-slide__inner--reverse {
        padding-inline: clamp(18px, 2.4vw, 34px);
        gap: clamp(28px, 3.6vw, 56px);
    }

    .home-page .hero-slide__copy {
        padding-left: clamp(6px, 1vw, 14px);
    }

    .home-page .hero-slide__visual {
        width: min(100%, 600px);
        max-width: 600px;
        justify-self: end;
        padding-right: 18px;
        padding-bottom: 18px;
    }

    .home-page .hero-slide__image,
    .home-page .hero-slide__image--gift {
        width: 100%;
        aspect-ratio: 1.13 / 1;
    }

    .home-page .hero-slide__caption {
        right: 0;
        bottom: 0;
        min-width: 228px;
        min-height: 70px;
        padding: 17px 24px;
    }
}

/* Compact vertical rhythm specifically for the moments section. */
.home-page .home-moments {
    padding-block: clamp(42px, 5vw, 64px);
}

.home-page .home-moments .section-heading {
    margin-bottom: clamp(22px, 2.5vw, 30px);
}

@media (max-width: 820px) {
    .home-page .home-moments {
        padding-block: 38px;
    }

    .home-page .home-moments .section-heading {
        margin-bottom: 20px;
    }
}

@media (max-width: 520px) {
    .home-page .home-moments {
        padding-block: 32px;
    }

    .home-page .home-moments .section-heading {
        margin-bottom: 16px;
    }

    .home-page .home-moments__grid {
        gap: 10px;
    }

    .home-page .home-moment {
        min-height: 205px;
        padding: 16px;
    }
}

/* ---------------------------------------------------------
   Category rail — mobile becomes 3 + 2 + View All.
   Desktop remains exactly five categories in one row.
   --------------------------------------------------------- */
.home-category-tile--viewall {
    display: none;
}

.home-category-viewall__inner {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 18px;
    border: 1px solid rgba(61, 35, 24, .12);
    border-radius: 16px;
    background: #3d2318;
    box-shadow: 0 10px 22px rgba(61, 35, 24, .10);
    color: #fff;
}

.home-category-viewall__eyebrow {
    margin-bottom: auto;
    color: #e5b27b;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.home-category-viewall__inner strong {
    font-family: var(--font-display);
    font-size: clamp(1rem, 1.5vw, 1.35rem);
    line-height: 1.05;
    font-weight: 600;
}

.home-category-viewall__arrow {
    margin-top: 14px;
    font-size: 1.15rem;
    color: #e5b27b;
}

@media (max-width: 820px) {
    .home-page .home-category-rail {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px 10px;
    }

    .home-page .home-category-tile--viewall {
        display: block;
    }

    .home-page .home-category-viewall__inner {
        min-height: 0;
        aspect-ratio: 1 / .9;
        border-radius: 12px;
        padding: 12px;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .home-page .home-category-viewall__inner strong,
    .home-page .home-category-viewall__arrow {
        display: none;
    }

    .home-page .home-category-viewall__eyebrow {
        margin: 0;
        color: #e5b27b;
        font-size: .7rem;
        letter-spacing: .12em;
    }
}

@media (max-width: 520px) {
    .home-page .home-category-rail {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 9px 6px;
    }

    .home-page .home-category-tile__image {
        aspect-ratio: 1 / .82;
    }

    .home-page .home-category-viewall__inner {
        aspect-ratio: 1 / .82;
        border-radius: 9px;
        padding: 8px;
    }

    .home-page .home-category-viewall__eyebrow {
        font-size: .58rem;
    }
}
