/*
 * Homepage-only layout.
 * Loaded only on is_front_page(); existing service and gallery styles remain untouched.
 */

body.home .mara-homepage {
    min-width: 0;
    overflow: hidden;
}

body.home .mara-homepage .mara-section__heading {
    align-items: end;
}

body.home .mara-homepage .mara-section__heading h2 {
    max-width: 18ch;
}

body.home .mara-home-gallery-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.home .mara-home-gallery-card {
    min-width: 0;
}

body.home .mara-home-gallery-card a {
    aspect-ratio: 2 / 3;
    background: var(--mara-sand);
    border-radius: 1rem;
    display: block;
    overflow: hidden;
    position: relative;
}

body.home .mara-home-gallery-card img,
body.home .mara-home-gallery-card__placeholder {
    height: 100%;
    width: 100%;
}

body.home .mara-home-gallery-card img {
    object-fit: cover;
    object-position: center;
    transition: filter .2s ease, transform .25s ease;
}

body.home .mara-home-gallery-card a:hover img,
body.home .mara-home-gallery-card a:focus-visible img {
    filter: saturate(1.08) brightness(.94);
    transform: scale(1.025);
}

body.home .mara-home-gallery-card__shade,
body.home .mara-home-product-card__shade {
    background: linear-gradient(180deg, transparent 38%, color-mix(in srgb, var(--mara-ink) 78%, transparent));
    inset: 0;
    pointer-events: none;
    position: absolute;
}

body.home .mara-home-gallery-card__title,
body.home .mara-home-product-card__title {
    bottom: 0;
    color: var(--mara-paper);
    display: block;
    font: 700 .9rem / 1.15 Raleway, Manrope, sans-serif;
    left: 0;
    padding: 1rem;
    position: absolute;
    right: 0;
    z-index: 1;
}

body.home .mara-home-gallery-card a:hover .mara-home-gallery-card__title,
body.home .mara-home-gallery-card a:focus-visible .mara-home-gallery-card__title {
    color: var(--mara-peach);
}

body.home .mara-home-gallery-card__placeholder {
    align-items: center;
    color: var(--mara-muted);
    display: flex;
    font-size: .82rem;
    font-weight: 800;
    justify-content: center;
    letter-spacing: .08em;
    text-transform: uppercase;
}

body.home .mara-home-service-section {
    background: var(--mara-paper);
}

body.home .mara-home-service-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.home .mara-home-service-card {
    border-radius: var(--mara-radius);
    min-width: 0;
    min-height: 24rem;
    overflow: hidden;
    padding: clamp(1.5rem, 3vw, 2.25rem);
}

body.home .mara-home-service-card--personal {
    background: linear-gradient(145deg, color-mix(in srgb, var(--mara-teal) 23%, var(--mara-paper)), color-mix(in srgb, var(--mara-peach) 56%, var(--mara-paper)));
}

body.home .mara-home-service-card--business {
    background: linear-gradient(145deg, color-mix(in srgb, var(--mara-peach) 54%, var(--mara-paper)), color-mix(in srgb, var(--mara-teal) 16%, var(--mara-paper)));
}

body.home .mara-home-service-card h3 {
    font-size: clamp(2rem, 3.2vw, 3rem);
    line-height: 1;
    margin: 0 0 1.7rem;
    max-width: 12ch;
}

body.home .mara-home-service-links {
    display: grid;
    gap: 0 1.4rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.home .mara-home-service-links a {
    border-top: 1px solid color-mix(in srgb, var(--mara-ink) 18%, transparent);
    color: var(--mara-ink);
    font-size: .88rem;
    font-weight: 800;
    line-height: 1.3;
    padding: .8rem 0;
    text-decoration: none;
    transition: color .18s ease;
}

body.home .mara-home-service-links a:hover,
body.home .mara-home-service-links a:focus-visible {
    color: var(--mara-orange);
    outline: none;
}

body.home .mara-home-shop-section {
    background: var(--mara-sand);
}

body.home .mara-home-shop-grid {
    align-items: center;
    display: grid;
    gap: clamp(2rem, 5vw, 4rem);
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
}

body.home .mara-home-shop-copy h2 {
    max-width: 10ch;
}

body.home .mara-home-shop-copy > p:not(.mara-eyebrow) {
    color: var(--mara-muted);
    line-height: 1.7;
    max-width: 31rem;
}

body.home .mara-home-product-grid {
    display: grid;
    gap: .8rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
}

body.home .mara-home-product-card {
    aspect-ratio: 1 / 1;
    background: var(--mara-paper);
    border-radius: 1rem;
    display: block;
    min-width: 0;
    overflow: hidden;
    position: relative;
}

body.home .mara-home-product-card__image,
body.home .mara-home-product-card__image img {
    display: block;
    height: 100%;
    width: 100%;
}

body.home .mara-home-product-card__image {
    background: var(--mara-paper);
}

body.home .mara-home-product-card__image img {
    object-fit: cover;
    object-position: center;
    transition: filter .2s ease, transform .25s ease;
}

body.home .mara-home-product-card:hover .mara-home-product-card__image img,
body.home .mara-home-product-card:focus-visible .mara-home-product-card__image img {
    filter: saturate(1.08) brightness(.94);
    transform: scale(1.025);
}

body.home .mara-home-product-card:hover .mara-home-product-card__title,
body.home .mara-home-product-card:focus-visible .mara-home-product-card__title {
    color: var(--mara-peach);
}

body.home .mara-home-blog-section {
    background: var(--mara-paper);
}

body.home .mara-home-blog-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.home .mara-home-blog-card {
    min-width: 0;
}

body.home .mara-home-blog-card img {
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: cover;
    width: 100%;
}

body.home .mara-homepage a:focus-visible,
body.home .mara-contact-prompt a:focus-visible {
    outline: 3px solid var(--mara-accent);
    outline-offset: 3px;
}

@media (max-width: 1100px) {
    body.home .mara-home-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 940px) {
    body.home .mara-home-shop-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    body.home .mara-homepage .mara-section__heading {
        align-items: start;
    }

    body.home .mara-home-gallery-grid {
        grid-template-columns: 1fr;
    }

    body.home .mara-home-gallery-card__title,
    body.home .mara-home-product-card__title {
        font-size: .86rem;
        padding: .8rem;
    }

    body.home .mara-home-service-grid {
        grid-template-columns: 1fr;
    }

    body.home .mara-home-service-card {
        min-height: auto;
    }

    body.home .mara-home-service-links {
        grid-template-columns: 1fr;
    }

    body.home .mara-home-product-grid {
        gap: .65rem;
    }

    body.home .mara-home-blog-grid {
        grid-template-columns: 1fr;
    }
}
