/*
 * Home hero — forest-deep band with copy on the LEFT and a single
 * staged product photo full-bleeding the RIGHT half of the viewport.
 *
 * Anatomy mirrors material/ecko-customer.PNG: copy hugs the centered
 * container's right edge so the headline visually lines up with the
 * nav/footer above, while the image escapes the 1280px max-width and
 * runs to the viewport's right edge.
 *
 * Implementation: two equal grid columns. Copy is justify-self: end
 * inside the left column with a max-width so it lands aligned to the
 * vertical center of the page. The right column is the image — no
 * card chrome, no border-radius, no shadow. Clean bleed.
 *
 * Stacks vertically below 900px.
 */

.ecko-home-hero {
    background-color: var(--forest-deep);
    color: var(--paper);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    overflow: hidden;
    position: relative;
    min-height: 560px;
}

.ecko-home-hero__copy {
    grid-column: 1;
    justify-self: end;
    width: 100%;
    max-width: 608px;
    padding: 72px 32px 72px 16px;
    align-self: center;
}

.ecko-home-hero__headline {
    color: var(--paper);
    margin: 0 0 12px;
}

.ecko-home-hero__sub {
    margin: 0 0 24px;
}

.ecko-home-hero__lede {
    font-size: 16px;
    line-height: 1.55;
    color: color-mix(in oklch, var(--paper) 85%, transparent);
    margin: 0 0 32px;
    max-width: 52ch;
}

/* Trust badges row */
.ecko-home-hero__badges {
    list-style: none;
    margin: 0 0 32px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.ecko-home-hero__badges li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: color-mix(in oklch, var(--paper) 90%, transparent);
}

.ecko-home-hero__badges svg {
    color: var(--kelly);
    flex-shrink: 0;
}

/* CTA row */
.ecko-home-hero__ctas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ecko-home-hero__cta-outlined {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    border: 2px solid var(--paper);
    color: var(--paper);
    background-color: transparent;
    cursor: pointer;
    transition: background-color 150ms cubic-bezier(0.16, 1, 0.3, 1),
                color 150ms cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 44px;
}

.ecko-home-hero__cta-outlined:hover,
.ecko-home-hero__cta-outlined:focus-visible {
    background-color: var(--paper);
    color: var(--forest-deep);
}

.ecko-home-hero__cta-outlined:focus-visible {
    outline: 2px solid var(--kelly);
    outline-offset: 2px;
}

/*
 * Visual — the right half of the section, full bleed to viewport.
 *
 * No max-width container. The image fills width AND height of its grid
 * cell. align-items: stretch on the section makes the cell as tall as
 * the section (which has min-height: 560px and grows with the copy
 * column's content).
 */
.ecko-home-hero__visual {
    grid-column: 2;
    position: relative;
    overflow: hidden;
}

/*
 * Doubled class selector to outrank Kadence's `img { height: auto }`
 * and `.wp-site-blocks img` defaults without resorting to !important.
 */
.ecko-home-hero__image.ecko-home-hero__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    max-width: none;
}

/*
 * Left-edge fade — the warehouse photo's dark background dissolves into
 * the forest-deep band so there's no seam between copy column and image
 * column.
 */
.ecko-home-hero__visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        var(--forest-deep) 0%,
        color-mix(in oklch, var(--forest-deep) 55%, transparent) 18%,
        transparent 42%
    );
    pointer-events: none;
}

/* Primary CTA sits on the --forest-deep hero surface; the default
   --ink focus outline fails WCAG 2.4.11 contrast on that background.
   Override to --kelly for >=3:1. */
.ecko-home-hero .ecko-btn-primary:focus-visible {
    outline-color: var(--kelly);
}

/* Stack below 900px — photo drops under the copy and runs full width. */
@media (max-width: 899px) {
    .ecko-home-hero {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    .ecko-home-hero__copy {
        grid-column: 1;
        justify-self: stretch;
        max-width: none;
        padding: 48px 16px;
    }

    .ecko-home-hero__visual {
        grid-column: 1;
        height: 320px;
    }

    .ecko-home-hero__visual::after {
        /* Fade from the top now (text sits above the photo when stacked). */
        background: linear-gradient(
            180deg,
            var(--forest-deep) 0%,
            transparent 32%
        );
    }
}

@media (prefers-reduced-motion: reduce) {
    .ecko-home-hero__cta-outlined {
        transition: none;
    }
}
