/* Homepage opening block [kw_home_hero]: words on navy, a room photo with a print beside them.
   Sizes follow the block's own width (cqi), so it looks the same in a boxed page and a full-width one;
   browsers without container units use the viewport sizes given first. */

.kw-hero {
    container-type: inline-size;
    background: #1E2D4A;
    color: #F2E8D5;
    margin: 0;
}

.kw-hero .kw-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: clamp(420px, 42vw, 580px);
    min-height: clamp(420px, 50cqi, 580px);
}

/* The words */
.kw-hero .kw-hero__copy {
    display: flex;
    align-items: center;
    padding: 56px clamp(24px, 4.5vw, 64px);
    padding: 56px clamp(24px, 6cqi, 64px);
}

.kw-hero .kw-hero__words {
    width: 100%;
    max-width: 34rem;
    margin: 0 auto;
}

.kw-hero .kw-hero__eyebrow {
    margin: 0 0 16px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #E8C96E;
}

.kw-hero .kw-hero__title {
    margin: 0 0 18px;
    padding: 0;
    font-size: clamp(2.1rem, 1.1rem + 2.2vw, 3.2rem);
    font-size: clamp(2.1rem, 0.9rem + 2.9cqi, 3.2rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.01em;
    text-transform: none;
    text-wrap: balance;
    color: #F5F0E8;
}

.kw-hero .kw-hero__text {
    margin: 0 0 30px;
    max-width: 32em;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #F2E8D5;
}

.kw-hero .kw-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 28px;
    margin: 0;
}

.kw-hero .kw-hero__button {
    display: inline-block;
    padding: 0.95em 1.7em;
    border-radius: 2px;
    background: #B5562A; /* terracotta, dark enough for white text */
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.kw-hero .kw-hero__button:hover,
.kw-hero .kw-hero__button:focus {
    background: #9C4822;
    color: #fff;
}

.kw-hero .kw-hero__more {
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(245, 240, 232, 0.5);
    color: #F5F0E8;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
}

.kw-hero .kw-hero__more:hover,
.kw-hero .kw-hero__more:focus {
    border-bottom-color: #F5F0E8;
    color: #fff;
}

.kw-hero a:focus-visible {
    outline: 2px solid #E8C96E;
    outline-offset: 3px;
}

/* The photo */
.kw-hero .kw-hero__media {
    position: relative;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #E9E3DA;
}

.kw-hero .kw-hero__img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    object-fit: cover;
    /* Prints hang in the upper part of a room photo, so a wide crop keeps the top. */
    object-position: 50% 30%;
}

.kw-hero .kw-hero__caption {
    position: absolute;
    left: 16px;
    bottom: 16px;
    max-width: calc(100% - 32px);
    margin: 0;
    padding: 7px 12px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.93);
    color: #1E2D4A;
    font-size: 0.82rem;
    line-height: 1.35;
}

.kw-hero .kw-hero__caption a {
    color: #1E2D4A;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* No photo yet: the words fill the block. */
.kw-hero.kw-hero--words .kw-hero__inner {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
}

.kw-hero.kw-hero--words .kw-hero__copy {
    padding: 72px 24px;
}

/* Phones: the photo above the words. */
@media (max-width: 699px) {
    .kw-hero .kw-hero__inner {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    .kw-hero .kw-hero__media {
        order: -1;
        aspect-ratio: 4 / 3;
    }

    /* Browsers without aspect-ratio (before Safari 15) get the same shape this way. */
    @supports not (aspect-ratio: 4 / 3) {
        .kw-hero .kw-hero__media::before {
            content: "";
            display: block;
            padding-top: 75%;
        }
    }

    .kw-hero .kw-hero__copy {
        padding: 30px 20px 36px;
    }

    .kw-hero .kw-hero__words {
        max-width: none;
    }

    .kw-hero .kw-hero__title {
        font-size: 2rem;
    }

    .kw-hero .kw-hero__text {
        margin-bottom: 24px;
        font-size: 1rem;
    }

    .kw-hero .kw-hero__caption {
        left: 10px;
        bottom: 10px;
        max-width: calc(100% - 20px);
        padding: 5px 9px;
        font-size: 0.75rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ── Homepage layout ──────────────────────────────────────────────────────
   The opening block runs the full width of the screen, straight under the
   header. Its navy band is edge to edge; on very wide screens the words and
   photo stay within 1680px so the photo is not cropped to a thin strip.
   clip (not hidden) stops a sideways scroll from 100vw without breaking the
   sticky header. */
body.home {
    overflow-x: clip;
}

body.home .page-wrapper {
    padding-top: 0;
}

.kw-hero {
    width: auto;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.kw-hero .kw-hero__inner {
    max-width: 1680px;
    margin: 0 auto;
}

/* Flatsome caps a full-width row at 100%, which cancels its negative side
   margins and leaves the theme grid off centre: let it reach both edges. */
body.home .section-content > .row.row-full-width {
    max-width: none !important;
}

/* The intro asks for Fraunces, which the site never loads, so it showed in
   Times. Georgia instead (the site loads Playfair Display in bold only, too
   heavy for a paragraph). */
body.home .section .col-inner > p[style*="Fraunces"] {
    font-family: Georgia, 'Times New Roman', serif !important;
}

@media (max-width: 849px) {
    /* Phones: sections use the screen like the shop does (the page column
       keeps a 15px margin), instead of losing another 30px each side. */
    body.home .page-wrapper section.section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Theme tile names fit two to a row ("Motivational" no longer spills out). */
    body.home .box-category .box-text .header-title {
        font-size: 13px;
        letter-spacing: 0.04em;
        overflow-wrap: anywhere;
    }

    /* The intro paragraph (big serif words set inline in the
       page) takes half the screen on a phone: smaller words, less padding,
       so the theme grid comes into view sooner. */
    body.home .section .col-inner > p[style*="Fraunces"] {
        font-size: 1.12rem !important;
        line-height: 1.45 !important;
        margin-bottom: 0;
    }
    body.home section.section:has(.col-inner > p[style*="Fraunces"]) {
        padding-top: 24px !important;
        padding-bottom: 22px !important;
    }
    body.home section.section:has(.col-inner > p[style*="Fraunces"]) .col {
        padding-bottom: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kw-hero .kw-hero__button {
        transition: none;
    }
}
