/**
 * Corey Lead Flow — Modal + QR Landing Page styles.
 *
 * Pure CSS. No framework. Responsive for desktop, tablet and mobile.
 * All selectors are prefixed with "clf-" to avoid collisions.
 */

:root {
	--clf-bg: #020C1C;
	--clf-navy: #020C1C;
	--clf-gold: #D4AF37;
	--clf-gold-light: #E6C866;
	--clf-gold-dark: #B8962E;
	--clf-text: #FFFFFF;
	--clf-muted: rgba(255, 255, 255, 0.65);
	--clf-error: #FF6B6B;
	--clf-input-bg: rgba(255, 255, 255, 0.06);
	--clf-input-border: rgba(255, 255, 255, 0.16);
	--clf-input-placeholder: rgba(255, 255, 255, 0.35);
	--clf-radius: 10px;
}

/* Modal shell */
.clf-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow-y: auto;
	padding: 32px 16px;
}

.clf-modal:not(.clf-open) {
	display: none;
}

.clf-overlay {
	position: fixed;
	inset: 0;
	background: rgba(2, 12, 28, 0.88);
	animation: clfFadeIn 0.25s ease;
}

.clf-modal-box {
	position: relative;
	width: 100%;
	max-width: 520px;
	margin: auto;
	background: var(--clf-bg);
	border: 1px solid rgba(212, 175, 55, 0.35);
	border-radius: 16px;
	padding: 30px 32px 32px;
	color: var(--clf-text);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
	animation: clfSlideUp 0.3s ease;
}

.clf-modal-box *,
.clf-modal-box *::before,
.clf-modal-box *::after {
	box-sizing: border-box;
}

body.clf-modal-open {
	overflow: hidden;
}

/* Close button */
.clf-close {
	position: absolute;
	top: 14px;
	right: 16px;
	width: 36px;
	height: 36px;
	border: 0;
	background: transparent;
	color: var(--clf-muted);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
	transition: color 0.2s ease, background 0.2s ease;
}

.clf-close:hover {
	color: var(--clf-text);
	background: rgba(255, 255, 255, 0.08);
}

/* Progress bar */
.clf-progress {
	height: 6px;
	background: rgba(255, 255, 255, 0.12);
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 18px;
}

.clf-progress-bar {
	height: 100%;
	width: 50%;
	background: linear-gradient(90deg, var(--clf-gold) 0%, var(--clf-gold-light) 100%);
	border-radius: 3px;
	transition: width 0.35s ease;
}

/* Step indicator */
.clf-step-indicator {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-bottom: 22px;
}

.clf-step-dot {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.25);
	color: var(--clf-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.clf-step-dot.is-active {
	border-color: var(--clf-gold);
	background: var(--clf-gold);
	color: var(--clf-bg);
}

.clf-step-line {
	flex: 0 0 48px;
	height: 2px;
	background: rgba(255, 255, 255, 0.18);
}

/* Steps */
.clf-modal [hidden] {
	display: none !important;
}

.clf-step-3 {
	text-align: center;
	padding: 24px 0 12px;
}

/* Typography */
.clf-title {
	margin: 0 0 6px;
	color: var(--clf-gold);
	font-size: 26px;
	line-height: 1.25;
	font-weight: 700;
	text-align: center;
}

.clf-subtitle {
	margin: 0 0 20px;
	text-align: center;
	color: var(--clf-muted);
	font-size: 14px;
	line-height: 1.5;
	min-height: 1.5em;
}

.clf-success-msg {
	margin: 8px 0 0;
	color: var(--clf-muted);
	font-size: 16px;
}

/* Success animation */
.clf-success-icon {
	width: 72px;
	height: 72px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--clf-gold) 0%, var(--clf-gold-dark) 100%);
	color: var(--clf-bg);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 36px;
	font-weight: 700;
	line-height: 1;
	animation: clfSuccessPop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}

/* Fields */
.clf-field {
	margin-bottom: 16px;
}

.clf-label {
	display: block;
	margin-bottom: 6px;
	color: var(--clf-muted);
	font-size: 14px;
}

.clf-required {
	color: var(--clf-gold);
}

.clf-input {
	width: 100%;
	background: var(--clf-input-bg);
	border: 1px solid var(--clf-input-border);
	border-radius: var(--clf-radius);
	color: var(--clf-text);
	padding: 13px 14px;
	font-size: 15px;
	line-height: 1.4;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.clf-input::placeholder {
	color: var(--clf-input-placeholder);
}

.clf-input:focus {
	outline: none;
	border-color: var(--clf-gold);
	box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

textarea.clf-input {
	resize: vertical;
	min-height: 96px;
}

/* Select */
.clf-select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23D4AF37' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 38px;
	cursor: pointer;
}

.clf-select option {
	background: var(--clf-bg);
	color: var(--clf-text);
}

/* Radio & checkbox */
.clf-radio,
.clf-checkbox {
	display: flex;
	align-items: center;
	margin-bottom: 10px;
	color: var(--clf-text);
	font-size: 14px;
	cursor: pointer;
}

.clf-radio-input,
.clf-checkbox-input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.clf-radio span,
.clf-checkbox span {
	position: relative;
	padding-left: 28px;
}

.clf-radio span::before,
.clf-checkbox span::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	border: 1px solid var(--clf-input-border);
	background: var(--clf-input-bg);
	transition: background 0.2s ease, border-color 0.2s ease;
}

.clf-radio span::before {
	border-radius: 50%;
}

.clf-checkbox span::before {
	border-radius: 4px;
}

.clf-radio-input:checked + span::before {
	border-color: var(--clf-gold);
	background: var(--clf-gold);
	box-shadow: inset 0 0 0 4px var(--clf-bg);
}

.clf-checkbox-input:checked + span::before {
	border-color: var(--clf-gold);
	background: var(--clf-gold);
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23020C1C' d='M4.5 9L1 5.5l1.4-1.4 2.1 2.1 5.1-5.1 1.4 1.4z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
}

.clf-radio-input:focus-visible + span::before,
.clf-checkbox-input:focus-visible + span::before {
	outline: 2px solid var(--clf-gold);
	outline-offset: 2px;
}

/* Error message */
.clf-error {
	min-height: 1.2em;
	margin: 0 0 10px;
	color: var(--clf-error);
	font-size: 14px;
	line-height: 1.4;
}

/* Buttons */
.clf-btn {
	font: inherit;
	cursor: pointer;
	border: 0;
	border-radius: var(--clf-radius);
	padding: 14px 20px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.clf-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.clf-btn-block {
	width: 100%;
}

.clf-btn-gold {
	background: linear-gradient(135deg, #cda86c 0%, #c1a86c 100%);
	color: var(--clf-bg);
}

.clf-btn-gold:hover:not(:disabled) {
	background: linear-gradient(185deg, #cda86c 0%, #c1a86c 100%);
}

.clf-btn-ghost {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: var(--clf-muted);
}

.clf-btn-ghost:hover:not(:disabled) {
	color: var(--clf-text);
	border-color: var(--clf-gold);
}

/* Loading spinner */
.clf-btn.is-loading {
	position: relative;
	color: transparent !important;
	pointer-events: none;
}

.clf-btn.is-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	border: 2px solid rgba(2, 12, 28, 0.25);
	border-top-color: var(--clf-bg);
	border-radius: 50%;
	animation: clfSpin 0.7s linear infinite;
}

.clf-btn-ghost.is-loading::after {
	border-color: rgba(255, 255, 255, 0.25);
	border-top-color: #ffffff;
}

/* Step two actions */
.clf-step-2-actions {
	display: flex;
	gap: 12px;
	margin-top: 22px;
}

.clf-step-2-actions .clf-btn {
	flex: 1;
}

/* Animations */
@keyframes clfFadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes clfSlideUp {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes clfSpin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes clfSuccessPop {
	0% {
		transform: scale(0);
		opacity: 0;
	}
	70% {
		transform: scale(1.08);
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

/* =========================================================
   QR Landing Page
   ========================================================= */
.clf-landing {
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	padding: 48px 20px;
	color: var(--clf-navy);
}

.clf-landing-header {
	text-align: center;
	margin-bottom: 40px;
}

.clf-landing-title {
	color: var(--clf-navy);
	font-size: clamp(26px, 4vw, 40px);
	line-height: 1.2;
	font-weight: 700;
	margin: 0 0 12px;
}

.clf-landing-subtitle {
	color: #55637a;
	font-size: clamp(15px, 2vw, 18px);
	line-height: 1.6;
	max-width: 640px;
	margin: 0 auto;
}

.clf-landing-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

@media (min-width: 600px) {
	.clf-landing-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 960px) {
	.clf-landing-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.clf-landing-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: #ffffff;
	border: 1px solid #e4e9f0;
	border-radius: 16px;
	padding: 26px 24px;
	text-decoration: none;
	color: var(--clf-navy);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.clf-landing-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 40px rgba(2, 12, 28, 0.12);
	border-color: var(--clf-gold);
}

.clf-landing-card:focus-visible {
	outline: 3px solid var(--clf-gold);
	outline-offset: 2px;
}

.clf-landing-card-num {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--clf-navy);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 700;
	margin-bottom: 8px;
}

.clf-landing-card-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--clf-navy);
	line-height: 1.3;
	padding-right: 20px;
}

.clf-landing-card-desc {
	font-size: 14px;
	color: #5a6a80;
	line-height: 1.5;
}

.clf-landing-card-arrow {
	position: absolute;
	top: 28px;
	right: 24px;
	color: var(--clf-gold);
	font-size: 20px;
	font-weight: 700;
	transition: transform 0.2s ease;
}

.clf-landing-card:hover .clf-landing-card-arrow {
	transform: translateX(4px);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.clf-modal-box,
	.clf-overlay,
	.clf-success-icon {
		animation: none;
	}

	.clf-progress-bar {
		transition: none;
	}

	.clf-landing-card,
	.clf-landing-card-arrow {
		transition: none;
	}
}

/* Tablet */
@media (max-width: 768px) {
	.clf-modal-box {
		max-width: 460px;
		padding: 28px 26px 28px;
	}
}

/* Mobile */
@media (max-width: 600px) {
	.clf-modal {
		padding: 16px 12px;
	}

	.clf-modal-box {
		padding: 26px 18px 22px;
		border-radius: 12px;
	}

	.clf-title {
		font-size: 22px;
	}

	.clf-btn {
		padding: 13px 16px;
		font-size: 15px;
	}

	.clf-step-2-actions {
		flex-direction: column;
	}

	.clf-contact-form {
		padding: 24px 18px;
	}
}

/* Contact form */
.clf-contact {
	width: 100%;
	max-width: 560px;
	margin: 0 auto;
}

.clf-contact-form {
/* 	background: #ffffff;
	border: 1px solid #e4e9f0;
	border-radius: 16px;
	padding: 32px 30px;
	box-shadow: 0 18px 40px rgba(2, 12, 28, 0.08); */
}

.clf-contact-form *,
.clf-contact-form *::before,
.clf-contact-form *::after {
	box-sizing: border-box;
}

.clf-contact .clf-label {
	color: #34435c;
}

.clf-contact .clf-input {
	background: #f7f9fc;
	border-color: #d8dfe8;
	color: var(--clf-navy);
}

.clf-contact .clf-input::placeholder {
	color: #9aa7ba;
}

.clf-contact .clf-input:focus {
	border-color: var(--clf-gold);
	box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22);
}

.clf-contact textarea.clf-input {
	min-height: 110px;
}

.clf-contact-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.clf-contact-success {
	display: flex;
	align-items: center;
	gap: 16px;
	background: #ffffff;
	border: 1px solid #e4e9f0;
	border-radius: 16px;
	padding: 28px 26px;
	color: var(--clf-navy);
	font-size: 16px;
	line-height: 1.5;
	box-shadow: 0 18px 40px rgba(2, 12, 28, 0.08);
}

.clf-contact-success[hidden] {
	display: none;
}

.clf-contact-success p {
	margin: 0;
}

.clf-contact-success .clf-success-icon {
	margin: 0;
	flex: 0 0 auto;
}

/* Property Valuation form */
.clf-valuation {
	width: 100%;
	max-width: 560px;
	margin: 0 auto;
}

/* The form element stays clean: no border, border-radius, box-shadow or padding. */
.clf-valuation-step *,
.clf-valuation-step *::before,
.clf-valuation-step *::after {
	box-sizing: border-box;
}

.clf-valuation .clf-label {
	color: #34435c;
}

.clf-valuation .clf-required {
	color: #cda86c;
}

.clf-valuation .clf-input {
	background: #f7f9fc;
	border-color: #d8dfe8;
	color: var(--clf-navy);
}

.clf-valuation .clf-input::placeholder {
	color: #9aa7ba;
}

.clf-valuation .clf-input:focus,
.clf-valuation .clf-input:active {
	border-color: #cda86c;
	box-shadow: 0 0 0 3px rgba(205, 168, 108, 0.22);
}

.clf-valuation textarea.clf-input {
	min-height: 110px;
}

.clf-valuation-title {
	margin: 0 0 6px;
	color: var(--clf-navy);
	font-size: 22px;
	line-height: 1.3;
}

.clf-valuation-subtitle {
	margin: 0 0 22px;
	color: #5b6b84;
	font-size: 15px;
	line-height: 1.5;
}

.clf-valuation-btn {
	background: #cda86c;
	color: #ffffff;
	width: 100%;
}

.clf-valuation-btn:hover:not(:disabled) {
	background: #bd9457;
	color: #ffffff;
}

.clf-valuation-skip {
	background: transparent;
	border: 1px solid #d8dfe8;
	color: #5b6b84;
}

.clf-valuation-skip:hover:not(:disabled) {
	background: #f1f3f7;
	color: #34435c;
}

.clf-valuation-actions {
	display: flex;
	gap: 12px;
	align-items: center;
}

.clf-valuation-actions .clf-valuation-btn {
	flex: 1 1 auto;
}

.clf-valuation-actions .clf-valuation-skip {
	flex: 0 0 auto;
}

.clf-valuation-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.clf-valuation-success {
	display: flex;
	align-items: center;
	gap: 16px;
	color: var(--clf-navy);
	font-size: 16px;
	line-height: 1.5;
}

.clf-valuation-success[hidden] {
	display: none;
}

.clf-valuation-success p {
	margin: 0;
}

.clf-valuation-success .clf-success-icon {
	margin: 0;
	flex: 0 0 auto;
}

@media (max-width: 600px) {
	.clf-valuation-actions {
		flex-direction: column;
	}

	.clf-valuation-actions .clf-valuation-btn,
	.clf-valuation-actions .clf-valuation-skip {
		width: 100%;
	}
}
