/*! Cakery Popup. Instelbare waarden komen als custom properties binnen op
 *  .cnl, zodat dit bestand statisch blijft. Laadt bewust geen fonts. */

/* The class is in there twice. The Elementor kit sets h1 to h3 and p with a
   class plus an element (.elementor-kit-000 h1), and that beats a single class.
   Without this doubling the kit would decide the colour and the typeface here.
   Your own settings in the widget still come first: Elementor writes those with
   the wrapper included and so more specifically still. */

/* The class is in there twice. A theme rule like ".elementor button" is a class
   plus an element and so beats a single class; which of the two wins would
   otherwise depend on the order the stylesheets load in. */

.cnl {
	--cnl-gold: #A9A083;
	--cnl-gold-deep: #877E63;
	--cnl-ink: #2A2117;
	--cnl-ink-soft: #867C6D;
	--cnl-card: #FFFDF8;
	--cnl-line: rgba(42, 33, 23, .14);
	--cnl-veil: rgba(30, 22, 13, .42);
	--cnl-cut: 18px;
	--cnl-cut-small: 7px;
	--cnl-frame: rgba(169, 160, 131, .4);
	--cnl-ratio: 1fr 1.05fr;
	--cnl-max: 880px;
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 24px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .5s ease, visibility .5s;
}

.cnl.is-open {
	opacity: 1;
	visibility: visible;
}

.cnl__veil {
	position: absolute;
	inset: 0;
	background: var(--cnl-veil);
	backdrop-filter: blur(6px);
}

.cnl__box {
	--c: var(--cnl-cut);
	position: relative;
	display: grid;
	grid-template-columns: var(--cnl-ratio);
	width: min(var(--cnl-max), 100%);
	overflow: hidden;
	background: var(--cnl-card);
	box-shadow: 0 40px 90px rgba(42, 33, 23, .24);
	color: var(--cnl-ink);
	transform: translateY(18px) scale(.985);
	transition: transform .55s cubic-bezier(.2, .7, .3, 1);
	clip-path: polygon(var(--c) 0, calc(100% - var(--c)) 0, 100% var(--c), 100% calc(100% - var(--c)),
		calc(100% - var(--c)) 100%, var(--c) 100%, 0 calc(100% - var(--c)), 0 var(--c));
}

.cnl.is-open .cnl__box { transform: none; }

.cnl--nomedia .cnl__box { grid-template-columns: 1fr; }

/* ---------- Foto ---------- */

.cnl__media {
	position: relative;
	min-height: 420px;
	margin: 0;
	overflow: hidden;
	background: #EDE6D9;
}

/* The class is in there twice on purpose. Elementor sets .elementor img to
   height:auto, with exactly the same specificity as a single class; which of the
   two wins then depends on the order the stylesheets come in. That order is not
   fixed, so we give this one the last word here. */
.cnl__media.cnl__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Laat de foto naar de tekst toe uitlopen, zodat er geen harde naad staat. */
.cnl__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(245, 242, 233, 0) 70%, rgba(255, 253, 248, .55) 100%);
}

/* ---------- Tekst ---------- */

.cnl__body {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 52px 50px 46px;
}

.cnl__body::before {
	--ci: 11px;
	content: "";
	position: absolute;
	inset: 18px;
	border: 1px solid var(--cnl-frame);
	pointer-events: none;
	clip-path: polygon(var(--ci) 0, calc(100% - var(--ci)) 0, 100% var(--ci), 100% calc(100% - var(--ci)),
		calc(100% - var(--ci)) 100%, var(--ci) 100%, 0 calc(100% - var(--ci)), 0 var(--ci));
}
.cnl__kicker.cnl__kicker {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	color: var(--cnl-gold-deep);
	font-size: 10px;
	letter-spacing: .3em;
	text-transform: uppercase;
}

.cnl__kicker svg {
	flex: none;
	width: 11px;
	height: 11px;
}
.cnl__title.cnl__title {
	max-width: var(--cnl-title-w, none);
	margin: 15px 0 0;
	font-family: "Myorie", Georgia, serif;
	font-size: clamp(27px, 3vw, 36px);
	font-weight: 400;
	line-height: 1.18;
}
.cnl__txt.cnl__txt {
	max-width: var(--cnl-txt-w, 34ch);
	margin: 14px 0 0;
	color: var(--cnl-ink-soft);
	font-size: 14.5px;
	line-height: 1.7;
}

/* ---------- Formulier ---------- */

.cnl__form {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin-top: 26px;
}

.cnl__form input[type="email"] {
	--ci: var(--cnl-cut-small);
	flex: 1;
	min-width: 180px;
	padding: 16px 18px;
	background: transparent;
	color: var(--cnl-ink);
	border: none;
	box-shadow: inset 0 0 0 1px var(--cnl-line);
	font-family: inherit;
	font-size: 14px;
	clip-path: polygon(var(--ci) 0, calc(100% - var(--ci)) 0, 100% var(--ci), 100% calc(100% - var(--ci)),
		calc(100% - var(--ci)) 100%, var(--ci) 100%, 0 calc(100% - var(--ci)), 0 var(--ci));
}

.cnl__form input::placeholder { color: rgba(42, 33, 23, .32); }

.cnl__form input:focus {
	outline: none;
	box-shadow: inset 0 0 0 1px rgba(169, 160, 131, .85);
}

/* Het lokvinkje voor bots: uit beeld, maar niet display:none, want dat vullen
   sommige bots juist niet in. */
.cnl__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.cnl__submit.cnl__submit {
	--ci: var(--cnl-cut-small);
	position: relative;
	overflow: hidden;
	padding: 16px 30px;
	background: linear-gradient(135deg, #C9BE9E 0%, var(--cnl-gold) 52%, #BCB08F 100%);
	color: #231C13;
	border: none;
	box-shadow: 0 8px 22px rgba(42, 33, 23, .16);
	font-family: inherit;
	font-size: 11px;
	letter-spacing: .2em;
	text-transform: uppercase;
	cursor: pointer;
	transition: transform .4s cubic-bezier(.2, .7, .3, 1), box-shadow .4s ease;
	clip-path: polygon(var(--ci) 0, calc(100% - var(--ci)) 0, 100% var(--ci), 100% calc(100% - var(--ci)),
		calc(100% - var(--ci)) 100%, var(--ci) 100%, 0 calc(100% - var(--ci)), 0 var(--ci));
}

/* Rustig van goud naar bruin, met lichtbeige tekst. Geen glansveeg en geen
   sprongetje: die trekken de aandacht naar het effect in plaats van naar de
   knop. Kleur en tekst staan in variabelen, dus je kunt er in Elementor
   overheen. */
.cnl__submit.cnl__submit:hover,
.cnl__submit.cnl__submit:focus-visible {
	background-color: var(--cnl-btn-hover-bg, #3A2C1F);
	background-image: none;
	color: var(--cnl-btn-hover-ink, #F5F0E3);
	box-shadow: 0 8px 20px rgba(42, 33, 23, .16);
}

.cnl__submit[disabled] {
	opacity: .6;
	cursor: default;
	transform: none;
}
.cnl__fine.cnl__fine {
	margin: 16px 0 0;
	color: rgba(42, 33, 23, .42);
	font-size: 11.5px;
	line-height: 1.6;
}
.cnl__error.cnl__error {
	margin: 10px 0 0;
	color: #9A3B33;
	font-size: 12px;
	line-height: 1.5;
}

.cnl__error:empty { display: none; }

.cnl__later.cnl__later {
	align-self: flex-start;
	margin-top: 18px;
	padding-bottom: 4px;
	background: none;
	border: none;
	border-bottom: 1px solid transparent;
	color: rgba(42, 33, 23, .45);
	font-family: inherit;
	font-size: 10.5px;
	letter-spacing: .2em;
	text-transform: uppercase;
	cursor: pointer;
	transition: color .35s ease, border-color .35s ease;
}

.cnl__later.cnl__later:hover,
.cnl__later.cnl__later:focus-visible {
	border-color: rgba(169, 160, 131, .7);
	color: var(--cnl-ink);
}

.cnl__close.cnl__close {
	--ci: var(--cnl-cut-small);
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 3;
	display: grid;
	width: 36px;
	height: 36px;
	place-items: center;
	background: rgba(255, 253, 248, .9);
	border: 1px solid var(--cnl-line);
	color: var(--cnl-ink);
	cursor: pointer;
	transition: background .35s ease, border-color .35s ease, transform .35s ease;
	clip-path: polygon(var(--ci) 0, calc(100% - var(--ci)) 0, 100% var(--ci), 100% calc(100% - var(--ci)),
		calc(100% - var(--ci)) 100%, var(--ci) 100%, 0 calc(100% - var(--ci)), 0 var(--ci));
}

.cnl__close svg { width: 14px; height: 14px; }

.cnl__close.cnl__close:hover {
	background: #FFFFFF;
	border-color: var(--cnl-gold);
	transform: rotate(90deg);
}

/* ---------- Bedankstand ---------- */

.cnl__done { display: none; }
.cnl.is-done .cnl__wrap { display: none; }
.cnl.is-done .cnl__done { display: block; }

.cnl__done .cnl__txt { margin-top: 12px; }

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
	.cnl__box {
		grid-template-columns: 1fr;
		max-height: 88vh;
		overflow-y: auto;
	}

	.cnl__media {
		min-height: 180px;
		aspect-ratio: 16 / 9;
	}

	.cnl__media::after {
		background: linear-gradient(180deg, rgba(255, 253, 248, 0) 55%, rgba(255, 253, 248, .6) 100%);
	}

	.cnl__body { padding: 32px 26px 30px; }
	.cnl__body::before { inset: 12px; }

	.cnl__form input[type="email"],
	.cnl__submit.cnl__submit { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.cnl,
	.cnl__box,
	.cnl__submit,
	.cnl__close,
	.cnl__later {
		transition: none;
	}

	.cnl__submit:hover,
	.cnl__close:hover { transform: none; }
}
