/* Ad Lead Popup — dark cinematic theme.
   All selectors are scoped to #rlp-popup so Flatsome's global form/button
   styles can't leak in. Change the colors below to re-theme. */

#rlp-popup {
	--rlp-bg: #0e0e10;
	--rlp-surface: #16161a;
	--rlp-ink: #f4efe6;
	--rlp-muted: #a49e93;
	--rlp-line: rgba(244, 239, 230, 0.14);
	--rlp-line-strong: rgba(244, 239, 230, 0.28);
	--rlp-gold: #c9a45c;
	--rlp-gold-hi: #e2c486;
	--rlp-error: #ff7a6b;
	--rlp-radius: 16px;
	--rlp-serif: "Playfair Display", "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--rlp-sans: inherit;

	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	font-family: var(--rlp-sans);
	-webkit-font-smoothing: antialiased;
}
#rlp-popup[hidden] { display: none; }
#rlp-popup *, #rlp-popup *::before, #rlp-popup *::after { box-sizing: border-box; }

html.rlp-lock, html.rlp-lock body { overflow: hidden !important; }

/* Backdrop */
#rlp-popup .rlp__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 6, 8, 0.72);
	-webkit-backdrop-filter: blur(6px) saturate(80%);
	backdrop-filter: blur(6px) saturate(80%);
	opacity: 0;
	transition: opacity 0.45s ease;
}
#rlp-popup.is-open .rlp__backdrop { opacity: 1; }

/* Dialog */
#rlp-popup .rlp__dialog {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
	width: min(880px, 100%);
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow: hidden;
	background: var(--rlp-surface);
	color: var(--rlp-ink);
	border: 1px solid var(--rlp-line);
	border-radius: var(--rlp-radius);
	box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.4);
	opacity: 0;
	transform: translateY(16px) scale(0.97);
	transition: opacity 0.5s cubic-bezier(.2,.8,.2,1), transform 0.6s cubic-bezier(.2,.8,.2,1);
	outline: none;
}
#rlp-popup.is-open .rlp__dialog { opacity: 1; transform: none; }

/* Close */
#rlp-popup .rlp__close {
	all: unset;
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	color: var(--rlp-muted);
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--rlp-line);
	cursor: pointer;
	transition: color 0.2s, background 0.2s, transform 0.2s;
}
#rlp-popup .rlp__close:hover { color: var(--rlp-ink); background: rgba(255, 255, 255, 0.09); transform: rotate(90deg); }
#rlp-popup .rlp__close:focus-visible { outline: 2px solid var(--rlp-gold); outline-offset: 2px; }

/* Media panel (viewfinder) */
#rlp-popup .rlp__media {
	position: relative;
	min-height: 460px;
	background-color: #0b0b0d;
	background-image:
		radial-gradient(120% 80% at 20% 15%, rgba(201, 164, 92, 0.28), transparent 55%),
		radial-gradient(90% 70% at 85% 90%, rgba(120, 60, 40, 0.35), transparent 60%),
		linear-gradient(160deg, #1c1a17 0%, #0b0b0d 70%);
	background-size: cover;
	background-position: center;
	overflow: hidden;
}
/* Film grain + vignette over everything in the media panel */
#rlp-popup .rlp__media::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.65) 100%),
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
	pointer-events: none;
}
#rlp-popup .rlp__media.has-image {
	background-image: var(--rlp-img);
	background-position: var(--rlp-focus, center);
}
#rlp-popup .rlp__media.has-image::before {
	background:
		linear-gradient(180deg, rgba(0,0,0,.25) 0%, transparent 30%, transparent 60%, rgba(0,0,0,.6) 100%),
		radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.55) 100%);
}
/* Letterbox bars that open on reveal */
#rlp-popup .rlp__media::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		linear-gradient(#000, #000) top / 100% 50% no-repeat,
		linear-gradient(#000, #000) bottom / 100% 50% no-repeat;
	transition: background-size 0.9s cubic-bezier(.7,0,.2,1) 0.15s;
}
#rlp-popup.is-open .rlp__media::after { background-size: 100% 0%, 100% 0%; }

#rlp-popup .rlp__corner {
	position: absolute;
	width: 22px;
	height: 22px;
	border-color: rgba(244, 239, 230, 0.7);
	border-style: solid;
	border-width: 0;
	z-index: 1;
}
#rlp-popup .rlp__corner--tl { top: 22px; left: 22px; border-top-width: 1.5px; border-left-width: 1.5px; }
#rlp-popup .rlp__corner--tr { top: 22px; right: 22px; border-top-width: 1.5px; border-right-width: 1.5px; }
#rlp-popup .rlp__corner--bl { bottom: 22px; left: 22px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
#rlp-popup .rlp__corner--br { bottom: 22px; right: 22px; border-bottom-width: 1.5px; border-right-width: 1.5px; }

#rlp-popup .rlp__rec,
#rlp-popup .rlp__tc,
#rlp-popup .rlp__brand {
	position: absolute;
	z-index: 1;
	font: 500 11px/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	letter-spacing: 0.14em;
	color: rgba(244, 239, 230, 0.85);
	text-transform: uppercase;
}
#rlp-popup .rlp__rec { top: 34px; left: 52px; display: flex; align-items: center; gap: 7px; }
#rlp-popup .rlp__rec i {
	width: 8px; height: 8px; border-radius: 50%;
	background: #ff3b30; box-shadow: 0 0 10px #ff3b30;
	animation: rlp-blink 1.2s steps(1) infinite;
}
#rlp-popup .rlp__tc { bottom: 34px; left: 52px; font-variant-numeric: tabular-nums; }
#rlp-popup .rlp__brand { bottom: 34px; right: 52px; max-width: 45%; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--rlp-gold-hi); }
@keyframes rlp-blink { 50% { opacity: 0.15; } }

/* Body */
#rlp-popup .rlp__body {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 52px 48px 40px;
	overflow-y: auto;
	background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 40%), var(--rlp-surface);
}
#rlp-popup .rlp__view[hidden] { display: none; }
#rlp-popup .rlp__view > * { opacity: 0; transform: translateY(8px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.8,.2,1); }
#rlp-popup.is-open .rlp__view > * { opacity: 1; transform: none; }
#rlp-popup.is-open .rlp__view > *:nth-child(1) { transition-delay: 0.25s; }
#rlp-popup.is-open .rlp__view > *:nth-child(2) { transition-delay: 0.32s; }
#rlp-popup.is-open .rlp__view > *:nth-child(3) { transition-delay: 0.39s; }
#rlp-popup.is-open .rlp__view > *:nth-child(4) { transition-delay: 0.46s; }

#rlp-popup .rlp__eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	padding: 0;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--rlp-gold);
}
#rlp-popup .rlp__eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

#rlp-popup .rlp__title {
	margin: 0 0 12px;
	padding: 0;
	font-family: var(--rlp-serif);
	font-size: clamp(26px, 3.2vw, 34px);
	font-weight: 500;
	line-height: 1.12;
	letter-spacing: -0.01em;
	text-transform: none;
	color: var(--rlp-ink);
	outline: none;
}
#rlp-popup .rlp__sub {
	margin: 0 0 26px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--rlp-muted);
}

/* Form */
#rlp-popup .rlp__form { margin: 0; padding: 0; display: grid; gap: 14px; }

#rlp-popup .rlp__field { position: relative; margin: 0; }

#rlp-popup .rlp__input {
	display: block;
	width: 100%;
	max-width: none;
	height: 56px;
	min-height: 0;
	margin: 0;
	padding: 22px 16px 8px;
	font: inherit;
	font-size: 16px; /* 16px stops iOS zooming on focus */
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	color: var(--rlp-ink);
	background: rgba(255, 255, 255, 0.035);
	border: 1px solid var(--rlp-line);
	border-radius: 10px;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
#rlp-popup .rlp__input:hover { border-color: var(--rlp-line-strong); }
#rlp-popup .rlp__input:focus {
	outline: none;
	border-color: var(--rlp-gold);
	background: rgba(255, 255, 255, 0.05);
	box-shadow: 0 0 0 4px rgba(201, 164, 92, 0.16);
	color: var(--rlp-ink);
}
#rlp-popup .rlp__input:-webkit-autofill {
	-webkit-text-fill-color: var(--rlp-ink);
	-webkit-box-shadow: 0 0 0 100px #1e1d1c inset;
	caret-color: var(--rlp-ink);
}

#rlp-popup .rlp__label {
	position: absolute;
	top: 18px;
	left: 17px;
	margin: 0;
	padding: 0;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	color: var(--rlp-muted);
	pointer-events: none;
	transform-origin: left top;
	transition: transform 0.2s ease, color 0.2s ease;
}
#rlp-popup .rlp__input:focus + .rlp__label,
#rlp-popup .rlp__input:not(:placeholder-shown) + .rlp__label {
	transform: translateY(-9px) scale(0.76);
	color: var(--rlp-gold);
	letter-spacing: 0.04em;
}
#rlp-popup .rlp__input:not(:focus):not(:placeholder-shown) + .rlp__label { color: var(--rlp-muted); }

#rlp-popup .rlp__opt { opacity: 0.6; }
#rlp-popup .rlp__field.is-invalid .rlp__input { border-color: var(--rlp-error); }
#rlp-popup .rlp__field.is-invalid .rlp__input:focus { box-shadow: 0 0 0 4px rgba(255, 122, 107, 0.15); }
#rlp-popup .rlp__err {
	display: block;
	min-height: 0;
	margin: 6px 2px 0;
	font-size: 12.5px;
	line-height: 1.3;
	color: var(--rlp-error);
}
#rlp-popup .rlp__err:empty { display: none; }

/* Honeypot */
#rlp-popup .rlp__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Primary button */
#rlp-popup .rlp__submit {
	all: unset;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-sizing: border-box;
	width: 100%;
	height: 56px;
	margin-top: 6px;
	border-radius: 10px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #17130b;
	background: linear-gradient(180deg, var(--rlp-gold-hi), var(--rlp-gold));
	box-shadow: 0 10px 30px -10px rgba(201, 164, 92, 0.6), inset 0 1px 0 rgba(255,255,255,0.35);
	cursor: pointer;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s;
}
#rlp-popup .rlp__submit::after { /* sheen */
	content: "";
	position: absolute;
	top: 0; bottom: 0; left: -60%;
	width: 40%;
	background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent);
	transform: skewX(-20deg);
	transition: left 0.7s ease;
}
#rlp-popup .rlp__submit:hover { transform: translateY(-1px); box-shadow: 0 16px 36px -12px rgba(201, 164, 92, 0.75), inset 0 1px 0 rgba(255,255,255,0.35); }
#rlp-popup .rlp__submit:hover::after { left: 120%; }
#rlp-popup .rlp__submit:active { transform: translateY(0); }
#rlp-popup .rlp__submit:focus-visible { outline: 2px solid var(--rlp-gold-hi); outline-offset: 3px; }
#rlp-popup .rlp__arrow { transition: transform 0.25s ease; }
#rlp-popup .rlp__submit:hover .rlp__arrow { transform: translateX(4px); }

#rlp-popup .rlp__spinner {
	display: none;
	width: 18px; height: 18px;
	border: 2px solid rgba(23, 19, 11, 0.25);
	border-top-color: #17130b;
	border-radius: 50%;
	animation: rlp-spin 0.7s linear infinite;
}
#rlp-popup .rlp__form.is-loading .rlp__submit { pointer-events: none; filter: saturate(0.8); }
#rlp-popup .rlp__form.is-loading .rlp__submit-label,
#rlp-popup .rlp__form.is-loading .rlp__arrow { display: none; }
#rlp-popup .rlp__form.is-loading .rlp__spinner { display: block; }
@keyframes rlp-spin { to { transform: rotate(360deg); } }

#rlp-popup .rlp__form-error { margin: 0; font-size: 13px; line-height: 1.4; color: var(--rlp-error); text-align: center; }
#rlp-popup .rlp__form-error:empty { display: none; }

#rlp-popup .rlp__privacy {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 2px 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: var(--rlp-muted);
	opacity: 0.8;
	text-align: center;
}
#rlp-popup .rlp__privacy::before {
	content: "";
	flex: none;
	width: 12px; height: 12px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 10V7a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1h1zm2 0h6V7a3 3 0 0 0-6 0v3z'/></svg>") center / contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 10V7a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1h1zm2 0h6V7a3 3 0 0 0-6 0v3z'/></svg>") center / contain no-repeat;
}

/* Success view */
#rlp-popup .rlp__view--success { text-align: center; display: flex; flex-direction: column; align-items: center; }
#rlp-popup .rlp__check { color: var(--rlp-gold); margin-bottom: 18px; }
#rlp-popup .rlp__check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: rlp-draw 0.8s ease forwards 0.1s; }
#rlp-popup .rlp__check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: rlp-draw 0.5s ease forwards 0.7s; }
@keyframes rlp-draw { to { stroke-dashoffset: 0; } }
#rlp-popup .rlp__ghost {
	all: unset;
	margin-top: 4px;
	padding: 14px 22px;
	border: 1px solid var(--rlp-line-strong);
	border-radius: 10px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--rlp-ink);
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s;
}
#rlp-popup .rlp__ghost:hover { border-color: var(--rlp-gold); background: rgba(201, 164, 92, 0.08); }
#rlp-popup .rlp__ghost:focus-visible { outline: 2px solid var(--rlp-gold); outline-offset: 2px; }

/* Mobile: bottom sheet with a short cinematic banner */
@media (max-width: 720px) {
	#rlp-popup { align-items: flex-end; padding: 0; }
	/* The whole sheet scrolls as one piece, so the picture can be tall. */
	#rlp-popup .rlp__dialog {
		display: block;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
		width: 100%;
		max-height: 94vh;
		max-height: 94dvh;
		border-radius: 20px 20px 0 0;
		border-bottom: 0;
		transform: translateY(100%);
		transition: opacity 0.3s ease, transform 0.55s cubic-bezier(.2,.8,.2,1);
	}
	#rlp-popup .rlp__media { min-height: 0; height: min(78vw, 48vh); height: min(78vw, 48dvh); }
	#rlp-popup .rlp__media.has-image { background-image: var(--rlp-img-m, var(--rlp-img)); background-position: var(--rlp-focus-m, var(--rlp-focus, center)); }
	#rlp-popup .rlp__corner { width: 16px; height: 16px; }
	#rlp-popup .rlp__corner--tl, #rlp-popup .rlp__corner--tr { top: 16px; }
	#rlp-popup .rlp__corner--bl, #rlp-popup .rlp__corner--br { bottom: 16px; }
	#rlp-popup .rlp__corner--tl, #rlp-popup .rlp__corner--bl { left: 16px; }
	#rlp-popup .rlp__corner--tr, #rlp-popup .rlp__corner--br { right: 16px; }
	#rlp-popup .rlp__corner--tr { display: none; } /* close button sits here */
	#rlp-popup .rlp__rec { top: 25px; left: 40px; }
	#rlp-popup .rlp__tc { bottom: 25px; left: 40px; }
	#rlp-popup .rlp__brand { bottom: 25px; right: 40px; }
	#rlp-popup .rlp__body { overflow: visible; padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); justify-content: flex-start; }
	/* Sticky so the close button stays reachable while scrolling. */
	#rlp-popup .rlp__close { position: sticky; top: 12px; right: auto; margin: 12px 12px -48px auto; background: rgba(0, 0, 0, 0.5); color: var(--rlp-ink); }
	#rlp-popup .rlp__sub { margin-bottom: 20px; font-size: 14.5px; }
	#rlp-popup .rlp__form { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	#rlp-popup *, #rlp-popup *::before, #rlp-popup *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
	}
}
