/*
 * 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;
    }
}

/* Homepage-only three-direction hero slideshow. */
body.home .mara-home-hero-slider {
    padding: clamp(2.5rem, 5vw, 4.6rem) 0 2.2rem;
}

body.home .mara-home-hero-slider__slides {
    min-width: 0;
}

body.home .mara-home-hero-slide {
    align-items: center;
    display: grid;
    gap: clamp(2rem, 6vw, 6rem);
    grid-template-columns: minmax(0, 1fr) minmax(18rem, .9fr);
    min-height: clamp(26rem, 40vw, 38rem);
}

body.home .mara-home-hero-slide[hidden] {
    display: none !important;
}

body.home .mara-home-hero-slide__copy {
    min-width: 0;
    padding: 1rem 0;
}

body.home .mara-home-hero-slide__copy h1,
body.home .mara-home-hero-slide__copy h2 {
    font-size: clamp(2.35rem, 4.2vw, 4.2rem);
    line-height: 1.02;
    max-width: 14ch;
}

body.home .mara-home-hero-slide__copy .mara-lead {
    margin: 1.25rem 0 0;
    max-width: 38rem;
}

body.home .mara-home-hero-slide__copy .mara-actions {
    margin-top: 1.7rem;
}

body.home .mara-home-hero-slide__visual {
    aspect-ratio: 4 / 3;
    background: var(--mara-sand);
    border-radius: 1rem;
    min-width: 0;
    overflow: hidden;
    position: relative;
}

body.home .mara-home-hero-slide__visual picture,
body.home .mara-home-hero-slide__visual img,
body.home .mara-home-hero-slide__fallback {
    display: block;
    height: 100%;
    width: 100%;
}

body.home .mara-home-hero-slide__visual img {
    object-fit: cover;
    object-position: center;
}

body.home .mara-home-hero-slide__fallback {
    align-items: center;
    background: linear-gradient(145deg, color-mix(in srgb, var(--mara-teal) 24%, var(--mara-paper)), color-mix(in srgb, var(--mara-peach) 54%, var(--mara-paper)));
    color: var(--mara-ink);
    display: flex;
    font: 800 .78rem / 1.2 Manrope, sans-serif;
    justify-content: center;
    letter-spacing: .14em;
    padding: 1.5rem;
    text-align: center;
    text-transform: uppercase;
}

body.home .mara-home-hero-slider__controls {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.3rem;
}

body.home .mara-home-hero-slider__dots {
    align-items: center;
    display: flex;
    gap: .48rem;
}

body.home .mara-home-hero-slider__dot {
    appearance: none;
    background: color-mix(in srgb, var(--mara-ink) 23%, var(--mara-paper));
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    height: .58rem;
    padding: 0;
    transition: background-color .18s ease, transform .18s ease, width .18s ease;
    width: .58rem;
}

body.home .mara-home-hero-slider__dot.is-active {
    background: var(--mara-teal-deep);
    width: 1.55rem;
}

body.home .mara-home-hero-slider__toggle {
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--mara-ink) 30%, transparent);
    border-radius: 999px;
    color: var(--mara-ink);
    cursor: pointer;
    font: 700 .72rem / 1 Manrope, sans-serif;
    min-height: 2.15rem;
    padding: .55rem .8rem;
}

body.home .mara-home-hero-slider__toggle:hover,
body.home .mara-home-hero-slider__toggle:focus-visible {
    background: color-mix(in srgb, var(--mara-teal) 14%, var(--mara-paper));
}

body.home .mara-home-hero-slider__dot:focus-visible,
body.home .mara-home-hero-slider__toggle:focus-visible {
    outline: 3px solid var(--mara-accent);
    outline-offset: 3px;
}

@media (max-width: 940px) {
    body.home .mara-home-hero-slide {
        gap: 2rem;
        grid-template-columns: minmax(0, 1fr) minmax(15rem, .88fr);
        min-height: 28rem;
    }

    body.home .mara-home-hero-slide__copy h1,
    body.home .mara-home-hero-slide__copy h2 {
        font-size: clamp(2rem, 5.5vw, 3.1rem);
    }
}

@media (max-width: 700px) {
    body.home .mara-home-hero-slider {
        padding: 1.35rem 0 1.4rem;
    }

    body.home .mara-home-hero-slide {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
        min-height: 0;
    }

    body.home .mara-home-hero-slide__visual {
        aspect-ratio: 4 / 5;
        border-radius: .9rem;
        max-height: min(68vh, 34rem);
        order: -1;
        width: 100%;
    }

    body.home .mara-home-hero-slide__visual img {
        object-position: center 35%;
    }

    body.home .mara-home-hero-slide__copy {
        padding: 0;
        width: 100%;
    }

    body.home .mara-home-hero-slide__copy .mara-eyebrow {
        margin-bottom: .55rem;
    }

    body.home .mara-home-hero-slide__copy h1,
    body.home .mara-home-hero-slide__copy h2 {
        font-size: clamp(1.95rem, 8vw, 2.65rem);
        max-width: 18ch;
    }

    body.home .mara-home-hero-slide__copy .mara-lead {
        font-size: .96rem;
        line-height: 1.65;
        margin-top: .75rem;
    }

    body.home .mara-home-hero-slide__copy .mara-actions {
        margin-top: 1rem;
    }

    body.home .mara-home-hero-slider__controls {
        justify-content: space-between;
        margin-top: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.home .mara-home-hero-slider__dot {
        transition: none;
    }
}
