/**
 * DFL Crafted — full-bleed image beside statement copy, over an edge pattern.
 *
 * No JavaScript. Every value the panel controls is a custom property or a plain
 * declaration the generated widget CSS can override — nothing uses !important.
 */

.dfl-crafted {
	--dfl-cr-container: 100%;
	--dfl-cr-media-w: 50%;
	--dfl-cr-gap: 64px;
	--dfl-cr-valign: stretch;
	--dfl-cr-text-align: start;
	--dfl-cr-inner-pos: flex-start;
	--dfl-cr-image-h: 470px;
	--dfl-cr-eyebrow-gap: 20px;
	--dfl-cr-eyebrow-line-w: 60px;
	--dfl-cr-eyebrow-line-color: #c9a24d;
	--dfl-cr-pattern-w: 300px;
	--dfl-cr-pattern-x: 0px;
	--dfl-cr-pattern-y: 0px;
	--dfl-cr-pattern-rotate: 0deg;
	--dfl-cr-pattern-flip: 1;

	position: relative;
	width: 100%;
	background-color: #f7f5f0;
}

.dfl-crafted *,
.dfl-crafted *::before,
.dfl-crafted *::after {
	box-sizing: border-box;
}

/* Keeps the pattern from spilling past the section it belongs to. */
.dfl-crafted--clip {
	overflow: hidden;
}

.dfl-crafted__container {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: var(--dfl-cr-valign, stretch);
	gap: var(--dfl-cr-gap, 64px);
	width: 100%;
	max-width: var(--dfl-cr-container, 100%);
	margin-left: auto;
	margin-right: auto;
}

.dfl-crafted--media-right .dfl-crafted__container {
	flex-direction: row-reverse;
}

/* --------------------------------- Media --------------------------------- */

.dfl-crafted__media {
	flex: 0 0 var(--dfl-cr-media-w, 50%);
	max-width: var(--dfl-cr-media-w, 50%);
	min-width: 0;
	align-self: var(--dfl-cr-valign, stretch);
}

.dfl-crafted__image {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	/* The set height is the floor; a taller copy column stretches it. */
	min-height: var(--dfl-cr-image-h, 470px);
	overflow: hidden;
	line-height: 0;
}

/* Absolute so the photo's own proportions never drive the column height, and
   two classes deep because Elementor ships ".elementor img { height: auto }",
   which outranks a single-class selector. */
.dfl-crafted__image img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center center;
}

/* Overlay tint; the colour control also switches the content on. */
.dfl-crafted__image::after {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.dfl-crafted__image--empty {
	background-color: rgba(20, 16, 11, 0.06);
}

/* -------------------------------- Content -------------------------------- */

.dfl-crafted__content {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: var(--dfl-cr-inner-pos, flex-start);
	min-width: 0;
	padding: 70px 60px;
}

.dfl-crafted__inner {
	width: 100%;
	max-width: 420px;
	text-align: var(--dfl-cr-text-align, start);
}

/* When the image bleeds, only the copy keeps the container padding. */
.dfl-crafted--bleed .dfl-crafted__container {
	gap: 0;
}

.dfl-crafted--bleed .dfl-crafted__media {
	flex-basis: var(--dfl-cr-media-w, 50%);
}

.dfl-crafted--bleed .dfl-crafted__content {
	padding-left: max(60px, var(--dfl-cr-gap, 64px));
}

.dfl-crafted--bleed.dfl-crafted--media-right .dfl-crafted__content {
	padding-left: 60px;
	padding-right: max(60px, var(--dfl-cr-gap, 64px));
}

/* -------------------------------- Eyebrow -------------------------------- */

.dfl-crafted__eyebrow {
	display: flex;
	align-items: center;
	gap: var(--dfl-cr-eyebrow-gap, 20px);
	max-width: 100%;
	margin: 0 0 26px;
	color: #b08d45;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 2px;
	line-height: 1.4;
	text-transform: uppercase;
}

.dfl-crafted__eyebrow-text {
	display: block;
	min-width: 0;
}

.dfl-crafted__eyebrow-line {
	display: block;
	flex: 0 0 auto;
	width: var(--dfl-cr-eyebrow-line-w, 60px);
	height: 1px;
	background-color: var(--dfl-cr-eyebrow-line-color, #c9a24d);
}

/* --------------------------------- Copy ---------------------------------- */

/* The theme sets bare h1..h4 rules with heavy negative tracking and fixed pixel
   line-heights, so the headings here declare both explicitly. */
.dfl-crafted__heading {
	max-width: 100%;
	margin: 0 0 28px;
	color: #14100b;
	font-family: "Playfair Display", Georgia, serif;
	font-size: 46px;
	font-weight: 500;
	letter-spacing: normal;
	line-height: 1.15;
}

.dfl-crafted__heading em {
	color: #b08d45;
	font-style: normal;
}

.dfl-crafted__description {
	margin: 0 0 26px;
	color: #6b6358;
	font-size: 15px;
	line-height: 1.85;
}

.dfl-crafted__description p {
	margin: 0;
}

.dfl-crafted__description p + p {
	margin-top: 1em;
}

.dfl-crafted__statement {
	color: #14100b;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.7;
}

/* -------------------------------- Button --------------------------------- */

.dfl-crafted__button-wrap {
	display: flex;
	justify-content: var(--dfl-cr-text-align, start);
	margin-top: 34px;
}

.dfl-crafted__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 18px 34px;
	border: 1px solid #14100b;
	border-radius: 2px;
	background-color: rgba(0, 0, 0, 0);
	color: #14100b;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 2px;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: color 300ms ease, background-color 300ms ease, border-color 300ms ease;
}

.dfl-crafted__button:hover {
	text-decoration: none;
}

.dfl-crafted__button-icon {
	display: flex;
}

.dfl-crafted__button-icon i,
.dfl-crafted__button-icon svg {
	display: block;
	width: 1em;
	height: 1em;
	font-size: 1.2em;
	fill: currentColor;
}

.dfl-crafted__button:focus-visible,
.dfl-crafted__image:focus-visible {
	outline: 2px solid #b08d45;
	outline-offset: 3px;
}

/* -------------------------------- Pattern -------------------------------- */

.dfl-crafted__pattern {
	position: absolute;
	z-index: 1;
	width: var(--dfl-cr-pattern-w, 300px);
	max-width: 60%;
	line-height: 0;
	pointer-events: none;
	user-select: none;
}

.dfl-crafted__pattern img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	transform: rotate(var(--dfl-cr-pattern-rotate, 0deg)) scaleX(var(--dfl-cr-pattern-flip, 1));
}

.dfl-crafted--pattern-front .dfl-crafted__pattern {
	z-index: 3;
}

.dfl-crafted--pattern-right .dfl-crafted__pattern {
	right: var(--dfl-cr-pattern-x, 0px);
}

.dfl-crafted--pattern-left .dfl-crafted__pattern {
	left: var(--dfl-cr-pattern-x, 0px);
}

.dfl-crafted--pattern-top .dfl-crafted__pattern {
	top: var(--dfl-cr-pattern-y, 0px);
}

.dfl-crafted--pattern-bottom .dfl-crafted__pattern {
	bottom: var(--dfl-cr-pattern-y, 0px);
}

/* Middle anchors on the centre line, then shifts by the offset. */
.dfl-crafted--pattern-middle .dfl-crafted__pattern {
	top: 50%;
	transform: translateY(calc(-50% + var(--dfl-cr-pattern-y, 0px)));
}

/* ------------------------------- Responsive ------------------------------ */

@media (max-width: 1024px) {
	.dfl-crafted--pattern-hide-tablet .dfl-crafted__pattern {
		display: none;
	}

	.dfl-crafted--stack-tablet .dfl-crafted__container {
		flex-direction: column;
		align-items: stretch;
	}

	.dfl-crafted--stack-tablet.dfl-crafted--stack-media-last .dfl-crafted__container {
		flex-direction: column-reverse;
	}

	.dfl-crafted--stack-tablet .dfl-crafted__media {
		flex-basis: auto;
		width: 100%;
		max-width: 100%;
	}

	.dfl-crafted--stack-tablet .dfl-crafted__content,
	.dfl-crafted--bleed.dfl-crafted--stack-tablet .dfl-crafted__content {
		justify-content: flex-start;
		padding: 52px 40px;
	}

	.dfl-crafted--stack-tablet .dfl-crafted__inner {
		max-width: 100%;
	}
}

@media (max-width: 767px) {
	.dfl-crafted--pattern-hide-mobile .dfl-crafted__pattern {
		display: none;
	}

	.dfl-crafted--stack-mobile .dfl-crafted__container {
		flex-direction: column;
		align-items: stretch;
	}

	.dfl-crafted--stack-mobile.dfl-crafted--stack-media-last .dfl-crafted__container {
		flex-direction: column-reverse;
	}

	.dfl-crafted--stack-mobile .dfl-crafted__media {
		flex-basis: auto;
		width: 100%;
		max-width: 100%;
	}

	.dfl-crafted__content,
	.dfl-crafted--bleed .dfl-crafted__content,
	.dfl-crafted--bleed.dfl-crafted--media-right .dfl-crafted__content {
		padding: 44px 24px;
	}

	.dfl-crafted__inner {
		max-width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dfl-crafted__button {
		transition-duration: 1ms;
	}
}
