/* Image variations preserve the design when the client replaces a photo.
 * Core owns the four corner fields; an explicit native value, including zero,
 * wins. The default scales the source 150px corner with a 656px image canvas. */
.wp-block-image.is-style-endomines-curve-top-left,
.wp-block-image.is-style-endomines-curve-top-right { container-type: inline-size; }
.wp-block-image.is-style-endomines-curve-top-left img,
.wp-block-image.is-style-endomines-curve-top-right img { border-radius: 0; }
.wp-block-image.is-style-endomines-curve-top-left img { border-top-left-radius: min(150px, calc(100cqw * var(--endomines-image-curve-ratio, .22865853658536585))); }
.wp-block-image.is-style-endomines-curve-top-right img { border-top-right-radius: min(150px, calc(100cqw * var(--endomines-image-curve-ratio, .22865853658536585))); }

/* One optional style for all four corners, shared by the editor and frontend.
 * Clip only media/player frames so captions remain outside the rounded image. */
:is(.wp-block-image, .wp-block-video, .wp-block-embed).is-style-endomines-rounded-all { --endomines-media-corner-radius: 15px; }
.wp-block-image.is-style-endomines-rounded-all img,
.wp-block-video.is-style-endomines-rounded-all video,
.wp-block-embed.is-style-endomines-rounded-all .wp-block-embed__wrapper,
.wp-block-embed.is-style-endomines-rounded-all iframe { border-radius: var(--endomines-media-corner-radius); }
.wp-block-embed.is-style-endomines-rounded-all .wp-block-embed__wrapper { overflow: hidden; }

/* Round hero: native Image owns the replaceable photo/crop; native Groups
 * own the round frame and dot's palette colour/radius. Only composition lives here.
 * The section clips the right and bottom; its top and left arcs stay inside. */
@media(min-width:1100.01px) {
 .endomines-round-hero-art + :is(.endomines-processing-hero-copy,.endomines-contacts-hero-copy,.endomines-reserves-hero-copy) {
  width:45%; margin-inline:0;
 }
}
.endomines-round-hero-art { aspect-ratio:900/618; }
.endomines-round-hero-art > .wp-block-group.endomines-round-hero-frame {
 position:absolute; top:0; left:12.6883333333%; width:109.1983333333%; aspect-ratio:1; overflow:hidden; margin:0;
}
.endomines-round-hero-frame > .wp-block-image.endomines-round-hero-photo {
 position:absolute; top:0; left:-11.619529%; width:91.576489%; max-width:none; margin:0; line-height:0;
}
.endomines-round-hero-photo img { display:block; width:100%; }
/* Replaced native photos fill the visible source-art canvas inside its round
 * mask (618 / 982.785), without zooming the subject below the section clip.
 * Saved image dimensions/object-position remain editable inline values. */
.endomines-round-hero-frame > .wp-block-image:not(.endomines-round-hero-photo) { width:100%; height:62.882522627%; margin:0; }
.endomines-round-hero-frame > .wp-block-image:not(.endomines-round-hero-photo) img { display:block; width:100%; height:100%; object-fit:cover; }

.endomines-round-hero-art > .wp-block-group.endomines-round-hero-dot {
 position:absolute; left:0; bottom:5.1779935275%; width:22.1111111111%; aspect-ratio:1; min-height:0; margin:0; pointer-events:none;
}
.endomines-reserves-hero-art.endomines-round-hero-art { aspect-ratio:738/618; }
.endomines-reserves-hero-art > .wp-block-group.endomines-round-hero-frame { left:0; width:133.168699187%; }
.endomines-reserves-hero-art .endomines-round-hero-frame > .wp-block-image.endomines-round-hero-photo { left:0; width:75.092721%; }
.endomines-reserves-hero-art > .wp-block-group.endomines-round-hero-dot {
 left:4.7425474255%; top:4.2071197411%; bottom:auto; width:26.9647696477%;
}

/* Two-column "hippu" layouts: a curve-top-right image in the first column and
 * a curve-top-left image in the second. When core Columns stacks the columns
 * on a narrow screen, the top image gets both upper corners rounded and the
 * image dropping below it gets none. Columns set not to stack keep the
 * desktop shapes. */
@media (max-width: 781px) {
    .wp-block-columns:not(.is-not-stacked-on-mobile):has(> .wp-block-column:nth-child(2) .wp-block-image.is-style-endomines-curve-top-left) > .wp-block-column:first-child .wp-block-image.is-style-endomines-curve-top-right img { border-top-left-radius: min(150px, calc(100cqw * var(--endomines-image-curve-ratio, .22865853658536585))); }
    .wp-block-columns:not(.is-not-stacked-on-mobile):has(> .wp-block-column:first-child .wp-block-image.is-style-endomines-curve-top-right) > .wp-block-column:nth-child(2) .wp-block-image.is-style-endomines-curve-top-left img { border-top-left-radius: 0; }
    /* Stacked, the column is wider than the image's saved desktop width
     * (656px), so the image must span the column like the text card below
     * it instead of stopping short. The saved aspect ratio and crop stay. */
    .wp-block-columns:not(.is-not-stacked-on-mobile):has(> .wp-block-column:first-child .wp-block-image.is-style-endomines-curve-top-right):has(> .wp-block-column:nth-child(2) .wp-block-image.is-style-endomines-curve-top-left) > .wp-block-column .wp-block-image:is(.is-style-endomines-curve-top-right, .is-style-endomines-curve-top-left) { width: 100%; max-width: 100%; }
    .wp-block-columns:not(.is-not-stacked-on-mobile):has(> .wp-block-column:first-child .wp-block-image.is-style-endomines-curve-top-right):has(> .wp-block-column:nth-child(2) .wp-block-image.is-style-endomines-curve-top-left) > .wp-block-column .wp-block-image:is(.is-style-endomines-curve-top-right, .is-style-endomines-curve-top-left) img { width: 100% !important; max-width: 100%; height: auto !important; }
}
