/*
 * Offer picture: the hero picture of an offer in the organic «tropic» frame. A blob behind, a gold ring, the photo, the badge.
 * The «Bildstil» picks the frame: is-natural (photo), is-flyer, is-studio, is-cutout, is-motif and is-burst.
 */
.wp-block-andrea-brudelin-offer-picture {
	--ab-picture-radius: 2rem;
	--ab-picture-blob-gradient: var(--wp--preset--gradient--blush);
	position: relative;
	isolation: isolate;
	width: min(88%, 25rem);
	margin-inline: auto;
	padding-bottom: 1rem;
}

@media (min-width: 900px) {
	.wp-block-andrea-brudelin-offer-picture {
		width: min(100%, 28rem);
	}
}

.wp-block-andrea-brudelin-offer-picture.is-blob-lagoon {
	--ab-picture-blob-gradient: var(--wp--preset--gradient--lagoon);
}

.wp-block-andrea-brudelin-offer-picture.is-natural,
.wp-block-andrea-brudelin-offer-picture.is-cutout {
	--ab-picture-radius: 50% 50% 2rem 42% / 28% 28% 2rem 14%;
}

.wp-block-andrea-brudelin-offer-picture.is-cutout {
	width: min(84%, 21rem);
}

@media (min-width: 900px) {
	.wp-block-andrea-brudelin-offer-picture.is-cutout {
		width: min(100%, 23.5rem);
	}
}

/* The blob behind the photo and the gold ring around it. */
.wp-block-andrea-brudelin-offer-picture:not(.is-burst)::before {
	content: "";
	position: absolute;
	inset: 12% -10% -2% 18%;
	z-index: 0;
	border-radius: 58% 42% 46% 54% / 44% 52% 48% 56%;
	background: var(--ab-picture-blob-gradient);
	box-shadow: 0 30px 60px -30px rgb(29 88 69 / 0.6);
}

.wp-block-andrea-brudelin-offer-picture.is-natural::before,
.wp-block-andrea-brudelin-offer-picture.is-cutout::before {
	inset: 16% -9% 0 22%;
}

.wp-block-andrea-brudelin-offer-picture:not(.is-burst)::after {
	content: "";
	position: absolute;
	inset: -0.9rem 0.9rem 1.9rem -0.9rem;
	z-index: 1;
	border: 1px solid var(--wp--custom--line-strong);
	border-radius: var(--ab-picture-radius);
	pointer-events: none;
}

.ab-offer-picture__photo {
	position: relative;
	z-index: 2;
	overflow: hidden;
	aspect-ratio: 2 / 3;
	border-radius: var(--ab-picture-radius);
	background: var(--wp--preset--color--sand);
	box-shadow: var(--wp--preset--shadow--photo);
}

.is-portrait .ab-offer-picture__photo {
	aspect-ratio: 3 / 4;
}

.is-natural .ab-offer-picture__photo,
.is-cutout .ab-offer-picture__photo {
	aspect-ratio: 11 / 20;
}

.is-studio .ab-offer-picture__photo {
	background: var(--wp--preset--color--studio);
}

.is-cutout .ab-offer-picture__photo,
.is-motif .ab-offer-picture__photo {
	background: var(--ab-picture-gradient);
}

.ab-offer-picture__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 28%;
}

.is-flyer .ab-offer-picture__photo img,
.is-studio .ab-offer-picture__photo img {
	object-position: 50% 0;
}

.is-cutout .ab-offer-picture__photo img {
	position: relative;
	z-index: 2;
	object-position: 50% 100%;
}

/* The glow behind a cut-out portrait, and the small sun beside a cut-out, flyer or motif. */
.is-cutout .ab-offer-picture__photo::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: radial-gradient(42% 26% at 50% 24%, rgb(255 255 255 / 0.55) 0%, rgb(255 255 255 / 0) 100%);
}

.is-cutout::after,
.is-flyer::after,
.is-motif::after {
	box-sizing: border-box;
}

.wp-block-andrea-brudelin-offer-picture.is-cutout > .ab-offer-picture__photo::after,
.wp-block-andrea-brudelin-offer-picture.is-flyer > .ab-offer-picture__photo::after,
.wp-block-andrea-brudelin-offer-picture.is-motif > .ab-offer-picture__photo::after {
	content: none;
}

/* The studio credit stands upright along the photo's edge. */
.ab-offer-picture__credit {
	position: absolute;
	top: 1.25rem;
	right: 0.375rem;
	z-index: 3;
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.06em;
	white-space: nowrap;
	color: color-mix(in srgb, var(--wp--preset--color--cream) 88%, transparent);
	text-shadow: 0 0 4px rgb(0 0 0 / 0.9);
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	pointer-events: none;
}

/* The family's drawing, white on the gradient. */
.ab-offer-picture__motif {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	color: #fff;
}

.is-motif .ab-offer-picture__photo::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(55% 38% at 50% 40%, rgb(255 255 255 / 0.5), transparent 70%);
}

.ab-offer-picture__symbol {
	position: absolute;
	top: 46.5%;
	left: 50%;
	display: grid;
	width: 4rem;
	height: 4rem;
	place-items: center;
	border: 1px solid rgb(255 255 255 / 0.7);
	border-radius: 50%;
	background: color-mix(in srgb, var(--wp--preset--color--pearl) 85%, transparent);
	box-shadow: var(--wp--preset--shadow--lift);
	color: var(--wp--preset--color--ocean);
	transform: translate(-50%, -50%);
}

.ab-offer-picture__symbol .ab-icon {
	width: 1.75rem;
	height: 1.75rem;
}

/* The badge: a pearl card with an icon, at the photo's edge (beneath it on a studio photo). */
.ab-offer-picture__badge {
	position: absolute;
	right: -0.25rem;
	bottom: -0.5rem;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	max-width: 15.5rem;
	margin: 0;
	padding: 0.75rem 1rem;
	border: 1px solid var(--wp--custom--line-strong);
	border-radius: var(--wp--custom--radius--soft);
	background: color-mix(in srgb, var(--wp--preset--color--pearl) 93%, transparent);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	box-shadow: var(--wp--preset--shadow--lift);
	font-size: 0.8rem;
	line-height: 1.35;
	color: var(--wp--preset--color--ink);
}

.ab-offer-picture__badge .ab-icon {
	flex: none;
	width: 1.6rem;
	height: 1.6rem;
	color: var(--wp--preset--color--lip);
}

.is-natural .ab-offer-picture__badge .ab-icon,
.is-cutout .ab-offer-picture__badge .ab-icon {
	color: var(--wp--preset--color--ocean);
}

.ab-offer-picture__badge strong {
	display: block;
	font-size: var(--wp--preset--font-size--tiny);
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--navy);
}

.is-natural .ab-offer-picture__badge {
	top: 58%;
	right: -2.5rem;
	bottom: auto;
	display: none;
}

.is-studio .ab-offer-picture__badge {
	position: relative;
	right: auto;
	bottom: auto;
	width: fit-content;
	margin: 1.1rem -0.25rem 0 auto;
}

@media (min-width: 640px) {
	.is-natural .ab-offer-picture__badge {
		display: flex;
	}
}

@media (min-width: 900px) {
	.is-natural .ab-offer-picture__badge {
		top: 60%;
		right: -3.5rem;
	}

	.is-studio .ab-offer-picture__badge {
		margin-right: -2.5rem;
	}

	.is-cutout .ab-offer-picture__badge,
	.is-flyer .ab-offer-picture__badge,
	.is-motif .ab-offer-picture__badge {
		right: -2.5rem;
		bottom: -0.25rem;
	}
}

/* Burst: a cut-out portrait on a sunset arch with a gold sun; the hat and the raised arm reach over the arch. */
.wp-block-andrea-brudelin-offer-picture.is-burst {
	aspect-ratio: 4 / 5;
	width: min(84%, 21.5rem);
	margin: 4.5rem auto 1.75rem;
	padding-bottom: 0;
}

@media (min-width: 640px) {
	.wp-block-andrea-brudelin-offer-picture.is-burst {
		width: min(100%, 23.5rem);
	}
}

@media (min-width: 900px) {
	.wp-block-andrea-brudelin-offer-picture.is-burst {
		width: min(100%, 26rem);
		margin: 5rem 1.25rem 1.5rem auto;
	}
}

.ab-offer-picture__ring {
	position: absolute;
	inset: -0.9rem 0.9rem 0.9rem -0.9rem;
	z-index: 0;
	border: 1px solid var(--wp--custom--line-strong);
	border-radius: 999px 999px 2rem 2rem;
	pointer-events: none;
}

.ab-offer-picture__stage {
	position: absolute;
	inset: 0;
	z-index: 1;
	overflow: hidden;
	border-radius: 999px 999px 2rem 2rem;
	background: var(--wp--preset--gradient--stage);
	box-shadow: 0 44px 80px -36px rgb(59 29 89 / 0.75), 0 18px 40px -28px rgb(217 106 132 / 0.6);
}

.ab-offer-picture__stage-sun {
	position: absolute;
	top: 23%;
	left: 57%;
	width: 82%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--wp--preset--gradient--stage-sun);
	transform: translate(-50%, -50%);
}

.ab-offer-picture__stage svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	color: var(--wp--preset--color--gold-pale);
}

.ab-offer-picture__cut {
	position: absolute;
	inset: -14% 0 0;
	z-index: 2;
	overflow: hidden;
	border-radius: 0 0 2rem 2rem;
	pointer-events: none;
}

.ab-offer-picture__cut img {
	position: absolute;
	bottom: 0;
	left: 50%;
	width: auto;
	max-width: none;
	height: 100%;
	transform: translateX(-50%);
	-webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 4.5%);
	mask-image: linear-gradient(180deg, transparent 0%, #000 4.5%);
}

.is-burst .ab-offer-picture__badge {
	right: -0.5rem;
	bottom: -1.25rem;
}

.is-burst .ab-offer-picture__badge .ab-icon {
	color: var(--wp--preset--color--gold-2);
}

@media (min-width: 900px) {
	.is-burst .ab-offer-picture__badge {
		right: -1rem;
		bottom: 2.25rem;
	}
}

@media (min-width: 1100px) {
	.is-burst .ab-offer-picture__badge {
		right: -2.25rem;
	}
}
