/* =================================================================
 * /match — Property-Match Quiz Funnel
 * Scoped to .fc-quiz to avoid leaking into the rest of the site.
 * ================================================================= */

body.fc-quiz-page {
	background: var(--cream);
	overflow-x: hidden;
}

.fc-quiz {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--cream);
	color: var(--ink);
	position: relative;
}

/* ---------- Top bar ---------- */
.fc-quiz-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px clamp(16px, 4vw, 40px);
	background: var(--navy);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	position: sticky;
	top: 0;
	z-index: 10;
}
.fc-quiz-brand { display: inline-flex; align-items: center; }
.fc-quiz-brand img { height: 75px; width: auto; display: block; object-fit: contain; }

.fc-quiz-exit {
	width: 40px; height: 40px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.7);
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	transition: all .15s ease;
}
.fc-quiz-exit:hover {
	background: rgba(255, 255, 255, 0.12);
	color: var(--white);
	border-color: rgba(255, 255, 255, 0.2);
}

/* ---------- Step viewport ---------- */
.fc-quiz-viewport {
	flex: 1 0 auto;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 40px) clamp(140px, 18vw, 200px);
	position: relative;
	min-height: calc(100vh - 64px - 88px);
}

.fc-step {
	width: 100%;
	max-width: 880px;
	animation: fcStepIn .32s cubic-bezier(.2,.7,.3,1) both;
}
.fc-step[hidden] { display: none; }

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

.fc-step-inner { display: flex; flex-direction: column; gap: 28px; }

.fc-step-head { text-align: center; }
.fc-step-counter {
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--copper);
	display: inline-block;
	margin-bottom: 14px;
}
.fc-step-question {
	font-size: clamp(26px, 3.4vw, 40px);
	font-weight: 300;
	line-height: 1.15;
	letter-spacing: -0.015em;
	color: var(--navy);
	max-width: 720px;
	margin: 0 auto;
}
.fc-step-subtitle {
	font-size: 15px;
	color: var(--ink-2);
	margin: 14px auto 0;
	max-width: 520px;
	line-height: 1.5;
}

/* ---------- Option base ---------- */
.fc-option {
	position: relative;
	cursor: pointer;
	border: 0;
	background: var(--white);
	color: var(--navy);
	font-family: inherit;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
	overflow: hidden;
}
.fc-option:focus-visible {
	outline: 2px solid var(--copper);
	outline-offset: 2px;
}
.fc-option-check {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 1.5px solid var(--line-strong);
	background: var(--white);
	color: var(--white);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all .18s ease;
}
.fc-option-check svg { opacity: 0; transform: scale(.4); transition: opacity .18s ease, transform .18s ease; }
.fc-option.is-selected .fc-option-check {
	background: var(--copper);
	border-color: var(--copper);
}
.fc-option.is-selected .fc-option-check svg { opacity: 1; transform: scale(1); }

/* ---------- SVG cards (step 1: property type) ---------- */
.fc-options-svg {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}
@media (min-width: 720px) {
	.fc-options-svg { grid-template-columns: repeat(4, 1fr); }
	.fc-options-svg .fc-option.is-wide { grid-column: span 4; }
}
.fc-svg-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding: 28px 18px 24px;
	border: 1.5px solid var(--line);
	border-radius: var(--r-md);
	min-height: 160px;
	justify-content: center;
}
.fc-svg-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-card);
	border-color: var(--line-strong);
}
.fc-svg-card.is-selected {
	border-color: var(--copper);
	background: linear-gradient(180deg, var(--white) 0%, rgba(183,110,60,.04) 100%);
	box-shadow: 0 0 0 3px rgba(183,110,60,.12), var(--shadow-card);
}
.fc-svg-card-icon {
	color: var(--navy);
	display: inline-flex;
	transition: color .18s ease;
}
.fc-svg-card.is-selected .fc-svg-card-icon { color: var(--copper); }
.fc-svg-card-icon svg { width: 56px; height: 56px; }
.fc-svg-card-label {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0;
	color: var(--navy);
}
.fc-svg-card.is-wide {
	flex-direction: row;
	min-height: 88px;
	justify-content: center;
	padding: 16px 22px;
}
.fc-svg-card.is-wide .fc-svg-card-icon svg { width: 32px; height: 32px; }

/* ---------- Image cards (step 2: areas, multi-select) ---------- */
.fc-options-image {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}
@media (min-width: 600px) { .fc-options-image { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .fc-options-image { grid-template-columns: repeat(4, 1fr); } }

.fc-image-card {
	display: flex;
	flex-direction: column;
	padding: 0;
	border: 1.5px solid var(--line);
	border-radius: var(--r-md);
	overflow: hidden;
	min-height: 168px;
}
.fc-image-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-card);
	border-color: var(--line-strong);
}
.fc-image-card.is-selected {
	border-color: var(--copper);
	box-shadow: 0 0 0 3px rgba(183,110,60,.12), var(--shadow-card);
}
.fc-image-card-thumb {
	aspect-ratio: 16/10;
	width: 100%;
	display: block;
	position: relative;
	background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 50%, var(--copper-3) 130%);
}
.fc-image-card-thumb::after {
	content: '';
	position: absolute; inset: 0;
	background-image:
		linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
	background-size: 32px 32px;
}
.fc-image-card-thumb-c2 { background: linear-gradient(160deg, #1f3148 0%, #243447 50%, #6b3e1f 120%); }
.fc-image-card-thumb-c3 { background: linear-gradient(200deg, #354a60 0%, #1f2d3e 50%, #2c1d0e 120%); }
.fc-image-card-thumb-c4 { background: linear-gradient(180deg, #2a3e54 0%, #182433 60%, #4a2d18 120%); }
.fc-image-card-thumb-c5 { background: linear-gradient(120deg, #284058 0%, #1a2632 55%, #5c391d 120%); }
.fc-image-card-thumb-c6 { background: linear-gradient(145deg, #2e4258 0%, #1a2734 60%, #43281a 130%); }
.fc-image-card-thumb-c7 { background: linear-gradient(170deg, #354a60 0%, #1a2734 55%, #5a3a20 120%); }
.fc-image-card-thumb-c8 { background: linear-gradient(195deg, #2a3d50 0%, #1f2d3e 60%, #34230e 120%); }
.fc-image-card-thumb.has-image::after { display: none; }
.fc-image-card-label {
	padding: 12px 14px 14px;
	font-size: 14px;
	font-weight: 700;
	color: var(--navy);
	background: var(--white);
	flex: 1;
	display: flex;
	align-items: center;
}
.fc-multi-counter {
	font-size: 13px;
	color: var(--ink-2);
	text-align: center;
	margin: 0;
}
.fc-multi-counter[data-fc-counter]:not(.is-visible) { visibility: hidden; }

/* ---------- Text cards (single-select, vertical stack) ---------- */
.fc-options-text {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 560px;
	margin: 0 auto;
	width: 100%;
}
.fc-options-text[hidden],
.fc-currency-pane[hidden] { display: none; }
.fc-text-card {
	padding: 22px 56px 22px 28px;
	border: 1.5px solid var(--line);
	border-radius: var(--r-md);
	font-size: 17px;
	font-weight: 400;
	color: var(--navy);
	text-align: center;
	min-height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.fc-text-card:hover {
	border-color: var(--line-strong);
	background: var(--white);
	transform: translateY(-1px);
	box-shadow: var(--shadow-card);
}
.fc-text-card.is-selected {
	border-color: var(--copper);
	background: var(--white);
	box-shadow: 0 0 0 3px rgba(183,110,60,.12), var(--shadow-card);
}
.fc-text-card-muted { background: var(--cream-2); }

/* ---------- Currency toggle (step 3) ---------- */
.fc-currency-toggle {
	display: inline-flex;
	margin: 0 auto;
	padding: 4px;
	background: var(--cream-2);
	border-radius: 99px;
	border: 1px solid var(--line);
}
.fc-currency-tab {
	padding: 8px 24px;
	border-radius: 99px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: var(--ink-2);
	background: transparent;
	border: 0;
	cursor: pointer;
	transition: all .18s ease;
	min-width: 64px;
}
.fc-currency-tab.is-active {
	background: var(--navy);
	color: var(--white);
	box-shadow: 0 4px 12px -4px rgba(36,52,71,.4);
}

/* ---------- Lead form (step 9) ---------- */
.fc-lead { margin: 0 auto; max-width: 720px; width: 100%; }
.fc-lead-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}
@media (max-width: 640px) { .fc-lead-grid { grid-template-columns: 1fr; } }
.fc-lead-field { display: flex; flex-direction: column; gap: 6px; }
.fc-lead-field-full { grid-column: 1 / -1; }
.fc-lead-field label {
	font-size: 11px;
	color: var(--ink-2);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 700;
}
.fc-lead-hint {
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	color: var(--ink-3);
	margin-left: 6px;
}
.fc-lead-field input,
.fc-lead-field select,
.fc-lead-field textarea {
	width: 100%;
	background: var(--white);
	border: 1.5px solid var(--line-strong);
	border-radius: var(--r-sm);
	padding: 14px 16px;
	font-size: 15px;
	color: var(--ink);
	outline: none;
	font-family: inherit;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.fc-lead-field input:focus,
.fc-lead-field select:focus,
.fc-lead-field textarea:focus {
	border-color: var(--copper);
	box-shadow: 0 0 0 3px rgba(183,110,60,.12);
}
.fc-lead-field input.is-error,
.fc-lead-field select.is-error,
.fc-lead-field textarea.is-error {
	border-color: #c4452a;
}
.fc-lead-field textarea { resize: vertical; min-height: 90px; }
.fc-phone-row { display: grid; grid-template-columns: 145px 1fr; gap: 8px; }
.fc-phone-row select { text-overflow: ellipsis; padding-left: 12px; padding-right: 24px; }
@media (max-width: 900px) {
	.fc-phone-row { grid-template-columns: 130px 1fr; }
}
.fc-lead-trust {
	margin: 20px 0 0;
	font-size: 14px;
	color: var(--ink-2);
	display: flex;
	align-items: center;
	gap: 10px;
	line-height: 1.5;
}
.fc-lead-trust svg { color: var(--copper); flex-shrink: 0; }

/* ---------- Footer (prev / next + progress) ---------- */
.fc-quiz-foot {
	position: fixed;
	left: 0; right: 0;
	bottom: 0;
	background: var(--white);
	border-top: 1px solid var(--line);
	box-shadow: 0 -8px 24px -12px rgba(36,52,71,.12);
	z-index: 20;
}
.fc-quiz-foot-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px clamp(16px, 4vw, 40px);
	max-width: 1200px;
	margin: 0 auto;
	gap: 12px;
}
.fc-nav {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 22px;
	border-radius: var(--r-sm);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: all .18s ease;
}
.fc-nav-prev {
	background: transparent;
	color: var(--ink-2);
	border: 1.5px solid var(--line-strong);
}
.fc-nav-prev:hover { color: var(--navy); border-color: var(--navy); background: var(--white); }
.fc-nav[hidden] { display: none; }
.fc-nav-next {
	background: var(--navy);
	color: var(--white);
	border: 0;
}
.fc-nav-next:hover { background: var(--navy-3); }
.fc-nav-next:disabled,
.fc-nav-next[disabled] {
	opacity: .35;
	cursor: not-allowed;
	background: var(--navy);
}
.fc-nav-next.is-loading {
	pointer-events: none;
	opacity: .8;
}
.fc-nav-next.is-loading::after {
	content: '';
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255,255,255,.3);
	border-top-color: var(--white);
	border-radius: 50%;
	animation: fcSpin .8s linear infinite;
	margin-left: 4px;
}
@keyframes fcSpin { to { transform: rotate(360deg); } }

.fc-progress {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 clamp(16px, 4vw, 40px) 12px;
	display: grid;
	gap: 6px;
}
.fc-progress-track {
	height: 4px;
	background: var(--cream-2);
	border-radius: 99px;
	overflow: hidden;
}
.fc-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--copper) 0%, var(--copper-2) 100%);
	border-radius: 99px;
	transition: width .35s cubic-bezier(.2,.7,.3,1);
}
.fc-progress-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 11px;
	color: var(--ink-2);
}
.fc-progress-brand {
	font-weight: 900;
	color: var(--navy);
	letter-spacing: -0.01em;
}
.fc-progress-brand::after {
	content: '.';
	color: var(--copper);
}
.fc-progress-pct {
	font-family: var(--font-mono);
	font-weight: 500;
	letter-spacing: 0.06em;
}

/* ---------- Thank-you state ---------- */
.fc-step-thanks .fc-step-inner {
	text-align: center;
	align-items: center;
	padding: 40px 20px;
	gap: 20px;
}
.fc-thanks-icon {
	width: 84px; height: 84px;
	border-radius: 50%;
	background: rgba(45,122,79,.12);
	color: var(--success);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 12px;
}
.fc-step-thanks h1 {
	font-size: clamp(30px, 4vw, 44px);
	font-weight: 300;
	color: var(--navy);
	letter-spacing: -0.02em;
	margin: 0;
}
.fc-step-thanks p {
	color: var(--ink-2);
	font-size: 17px;
	line-height: 1.6;
	max-width: 540px;
	margin: 0 auto;
}
.fc-thanks-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
	margin-top: 12px;
}

/* ---------- Resume toast ---------- */
.fc-resume {
	position: fixed;
	top: 80px;
	right: clamp(16px, 4vw, 40px);
	background: var(--navy);
	color: var(--white);
	padding: 14px 18px;
	border-radius: var(--r-md);
	box-shadow: 0 12px 30px -8px rgba(0,0,0,.4);
	z-index: 30;
	display: flex;
	gap: 14px;
	align-items: center;
	max-width: 380px;
	animation: fcStepIn .3s ease both;
}
.fc-resume p { margin: 0; font-size: 13px; color: rgba(255,255,255,.85); }
.fc-resume p strong { color: var(--white); display: block; font-size: 14px; }
.fc-resume-actions { display: flex; gap: 6px; flex-shrink: 0; }
.fc-resume button {
	padding: 8px 12px;
	font-size: 12px;
	font-weight: 700;
	border-radius: var(--r-sm);
	cursor: pointer;
	border: 0;
	background: var(--copper);
	color: var(--white);
}
.fc-resume button.secondary { background: rgba(255,255,255,.1); }

/* ---------- Mobile tweaks ---------- */
@media (max-width: 640px) {
	.fc-quiz-top { padding: 10px 16px; }
	.fc-quiz-brand img { height: 60px; }
	.fc-quiz-viewport { padding-bottom: 180px; }
	.fc-step-inner { gap: 22px; }
	.fc-svg-card { min-height: 132px; padding: 22px 14px 20px; }
	.fc-svg-card-icon svg { width: 44px; height: 44px; }
	.fc-text-card { font-size: 16px; padding: 18px 48px 18px 20px; }
	.fc-nav { padding: 12px 16px; font-size: 13px; }
	.fc-phone-row { grid-template-columns: minmax(140px, 170px) 1fr; }
}
