.ereo-hero {
    --ereo-hero-bg: #eef8f6;
    --ereo-hero-accent: #007a5a;
    --ereo-hero-text: #123c32;
    --ereo-hero-title-size: 56px;

    position: relative;
    overflow: hidden;
    background: var(--ereo-hero-bg);
    color: var(--ereo-hero-text);
    isolation: isolate;
}

/* Fixed reference-style soft curved background */
.ereo-hero--curve-layered {
    background:
        radial-gradient(120% 95% at 33% -42%, rgba(255,255,255,.98) 0 54%, rgba(255,255,255,.70) 55%, rgba(255,255,255,0) 72%),
        radial-gradient(105% 70% at 84% 100%, color-mix(in srgb, var(--ereo-hero-accent) 28%, white 72%) 0 38%, rgba(255,255,255,0) 64%),
        linear-gradient(105deg, #ffffff 0%, var(--ereo-hero-bg) 48%, color-mix(in srgb, var(--ereo-hero-accent) 16%, white 84%) 100%);
}

.ereo-hero--curve-layered::before,
.ereo-hero--curve-layered::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.ereo-hero--curve-layered::before {
    left: -18%;
    top: -58%;
    width: 74%;
    height: 150%;
    border-radius: 50%;
    background: rgba(255,255,255,.78);
}

.ereo-hero--curve-layered::after {
    right: -10%;
    bottom: -42%;
    width: 58%;
    min-width: 360px;
    max-width: 900px;
    aspect-ratio: 1.65;
    border-radius: 50% 50% 0 0;
    background: color-mix(in srgb, var(--ereo-hero-accent) 18%, white 82%);
    opacity: .95;
}

.ereo-hero__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    display: grid;
    grid-template-columns: minmax(320px, 40%) minmax(0, 60%);
    align-items: stretch;
    min-height: 420px;
    overflow: hidden;
}

.ereo-hero--height-compact .ereo-hero__inner { min-height: 330px; }
.ereo-hero--height-large .ereo-hero__inner { min-height: 540px; }

/* Keep text safely inside the text column */
.ereo-hero__content,
.ereo-hero__title,
.ereo-hero__description {
    box-sizing: border-box;
}

.ereo-hero__title,
.ereo-hero__description {
    max-width: 100%;
}


.ereo-hero__content {
    position: relative;
    z-index: 3;
    padding: clamp(36px, 5vw, 92px) clamp(26px, 3.6vw, 78px);
    max-width: 650px;
    min-width: 0;
    align-self: center;
}

.ereo-hero__eyebrow {
    margin: 0 0 10px;
    color: var(--ereo-hero-accent);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.ereo-hero__title {
    margin: 0 0 16px;
    color: var(--ereo-hero-text);
    font-size: clamp(2rem, 3.35vw, var(--ereo-hero-title-size));
    line-height: 0.98;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.ereo-hero__description {
    margin: 0;
    max-width: 100%;
    color: color-mix(in srgb, var(--ereo-hero-text) 78%, black 22%);
    font-size: clamp(0.98rem, 1.2vw, 1.15rem);
    line-height: 1.65;
}

.ereo-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.ereo-hero__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.75em 1.35em;
    border-radius: 4px;
    border: 2px solid var(--ereo-hero-accent);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1;
    text-decoration: none !important;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.ereo-hero__button:hover,
.ereo-hero__button:focus { transform: translateY(-1px); }

.ereo-hero__button--primary,
.ereo-hero--buttons-both_filled .ereo-hero__button {
    background: var(--ereo-hero-accent);
    color: #fff !important;
}

.ereo-hero__button--secondary,
.ereo-hero--buttons-both_outline .ereo-hero__button {
    background: transparent;
    color: var(--ereo-hero-accent) !important;
}

.ereo-hero__button--secondary:hover,
.ereo-hero__button--secondary:focus,
.ereo-hero--buttons-both_outline .ereo-hero__button:hover,
.ereo-hero--buttons-both_outline .ereo-hero__button:focus {
    background: var(--ereo-hero-accent);
    color: #fff !important;
}

/* Media is pushed fully to the right edge, no large right gap */
.ereo-hero__media {
    position: relative;
    z-index: 2;
    align-self: stretch;
    justify-self: stretch;
    min-height: inherit;
    overflow: hidden;
    width: calc(100% + 130px);
    height: 100%;
    margin-right: -130px;
    margin-left: 0;
    border-top-left-radius: 42% 100%;
    border-bottom-left-radius: 42% 100%;
    box-shadow: -34px 0 0 color-mix(in srgb, var(--ereo-hero-accent) 70%, white 30%);
    background: transparent;
}

.ereo-hero__image,
.ereo-hero__image-placeholder,
.ereo-hero__slider,
.ereo-hero__slide {
    width: 100%;
    height: 100%;
    min-height: inherit;
}

.ereo-hero__image,
.ereo-hero__image-placeholder {
    object-fit: cover;
    object-position: center right;
    display: block;
}

.ereo-hero__slider {
    position: relative;
    overflow: hidden;
}

.ereo-hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .75s ease;
}

.ereo-hero__slide.is-active { opacity: 1; }

.ereo-hero__slide .ereo-hero__image {
    width: 100%;
    height: 100%;
}

.ereo-hero__image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d7eee9, #f4fbfa);
    color: var(--ereo-hero-accent);
    font-weight: 700;
}

/* Prevent text from overlapping the media column */
.ereo-hero__content > * {
    max-width: 100%;
}

.ereo-hero__description,
.ereo-hero__title {
    overflow-wrap: break-word;
    word-break: normal;
}

.ereo-hero--image-right .ereo-hero__content {
    padding-right: clamp(24px, 2.6vw, 52px);
    overflow: hidden;
}


/* Left image support */
.ereo-hero--image-left .ereo-hero__inner {
    grid-template-columns: minmax(0, 60%) minmax(320px, 40%);
}

.ereo-hero--image-left .ereo-hero__content {
    order: 2;
}

.ereo-hero--image-left .ereo-hero__media {
    order: 1;
    width: calc(100% + 130px);
    margin-left: -130px;
    margin-right: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 42% 100%;
    border-bottom-right-radius: 42% 100%;
    box-shadow: 34px 0 0 color-mix(in srgb, var(--ereo-hero-accent) 72%, white 28%);
}

@media (max-width: 900px) {
    .ereo-hero__inner,
    .ereo-hero--image-left .ereo-hero__inner {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .ereo-hero__content,
    .ereo-hero--image-left .ereo-hero__content {
        order: 1;
        max-width: none;
        padding: 36px 24px 28px;
        text-align: left;
    }

    .ereo-hero__media,
    .ereo-hero--image-left .ereo-hero__media {
        order: 2;
        min-height: 300px;
        width: 100%;
        margin: 0;
        border-radius: 0;
        border-top-left-radius: 34% 18%;
        border-top-right-radius: 34% 18%;
        box-shadow: 0 -22px 0 color-mix(in srgb, var(--ereo-hero-accent) 66%, white 34%);
    }

    .ereo-hero--curve-layered::before {
        left: -48%;
        top: -32%;
        width: 150%;
        height: 70%;
    }

    .ereo-hero--curve-layered::after {
        top: auto;
        bottom: -180px;
        right: -130px;
        width: 420px;
        min-width: 360px;
    }

    .ereo-hero__title {
        font-size: clamp(1.8rem, 8vw, calc(var(--ereo-hero-title-size) * .82));
    }
}

@media (max-width: 520px) {
    .ereo-hero__content { padding: 30px 18px 24px; }

    .ereo-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ereo-hero__media,
    .ereo-hero--image-left .ereo-hero__media { min-height: 240px; }

    .ereo-hero__title {
        font-size: clamp(1.55rem, 9vw, calc(var(--ereo-hero-title-size) * .68));
    }
}
