/* The quote request: a drawing sheet rising out of the night head onto the paper; the project types as tiles with their
   drawn symbols; three stations along a bowed span; what happens next on a night plate beside it. */
.qf { position: relative; z-index: 1; background: var(--paper); color: var(--navy); padding-block: 48px 64px; }
.qf__in { display: grid; gap: 32px; }
.qf__title { font-size: var(--fs-title); color: var(--navy); }
.qf__intro { margin-top: 14px; max-width: 46ch; color: var(--steel); font-size: var(--fs-lede); line-height: var(--lh-lede); }

/* the sheet */
.qf__sheet {
	position: relative; scroll-margin-top: 24px;
	background: var(--surface); border-radius: var(--r-lg);
	border: 1px solid var(--hair-paper);
	box-shadow: var(--sh-lg);
}
.qf__strip {
	position: relative; overflow: hidden;
	padding: 22px 20px 18px; border-radius: var(--r-lg) var(--r-lg) 0 0;
	background:
		radial-gradient(70% 140% at 50% 0%, color-mix(in srgb, var(--navy) 85%, transparent), transparent 75%),
		var(--night);
	color: var(--chalk);
}
.qf__deck { position: absolute; inset: 10px 0 auto; width: 100%; height: 30px; overflow: visible; }
.qf__deck path { fill: none; stroke: color-mix(in srgb, var(--gold) 70%, transparent); stroke-width: 1.5px; vector-effect: non-scaling-stroke; stroke-dasharray: 3 5; }
.qf__stations { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.qf__station { display: grid; justify-items: center; gap: 8px; font-size: var(--fs-small); line-height: 1.4; color: var(--mist); }
.qf__ring {
	display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
	background: var(--night); color: var(--gold-soft); font-weight: 700; font-size: .9375rem;
	border: 1.5px solid var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--night) 70%, transparent);
}
.qf__station:first-child .qf__ring { background: var(--gold); color: var(--night); }
.qf__station-name { font-weight: 500; }

.qf__form { padding: 24px 20px 28px; gap: 0; }
.qf__step { position: relative; margin: 0; padding: 0 0 28px; border: 0; min-width: 0; }
.qf__step + .qf__step { padding-top: 26px; border-top: 1px dashed color-mix(in srgb, var(--navy) 18%, transparent); }
.qf__legend { /* floated: a legend left in place sits inside its fieldset's top border */
	float: inline-start; width: 100%;
	display: flex; align-items: center; gap: 12px; padding: 0; margin-bottom: 18px;
	font: 700 var(--fs-name) / 1.35 var(--display); color: var(--navy);
}
.qf__legend .field__req { font: 700 1rem var(--text); }
.qf__num {
	display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%;
	font: 700 .9375rem/1 var(--text); color: var(--gold-ink);
	border: 1.5px solid var(--gold); background: var(--surface);
}
.qf__legend + * { clear: both; }
.qf__grid { display: grid; gap: 18px; }
.qf .field label { color: var(--navy); }

/* the project types: tiles, each with its drawn symbol */
.qtypes { display: grid; gap: 10px; }
.qtype { position: relative; display: block; cursor: pointer; }
.qtype__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.qtype__box {
	display: grid; grid-template-columns: 42px minmax(0, 1fr) 18px; align-items: center; gap: 12px;
	min-height: 64px; padding: 10px 14px 10px 10px; border-radius: var(--r-md);
	background: var(--paper); border: 1px solid var(--hair-paper);
	font-weight: 500; font-size: .9375rem; line-height: 1.5; color: var(--navy);
	transition:
		transform var(--t-answer) var(--ease-out),
		border-color var(--t-answer) var(--ease-out),
		background-color var(--t-answer) var(--ease-out),
		box-shadow var(--t-answer) var(--ease-out);
}
[dir="rtl"] .qtype__box { padding: 10px 10px 10px 14px; }
.qtype__key {
	display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-sm);
	background: var(--night); color: var(--gold-soft);
	transition: background-color var(--t-answer) var(--ease-out), color var(--t-answer) var(--ease-out);
}
.qtype__symbol { width: 24px; height: 24px; }
.qtype__symbol * { vector-effect: non-scaling-stroke; }
.qtype__tick {
	width: 18px; height: 18px; border-radius: 50%;
	border: 1.5px solid color-mix(in srgb, var(--navy) 30%, transparent); background: var(--surface);
	transition: border-color var(--t-answer) var(--ease-out), box-shadow var(--t-answer) var(--ease-out);
}
.qtype:hover .qtype__box { border-color: color-mix(in srgb, var(--navy) 45%, transparent); background: var(--surface); transform: translateY(-2px); box-shadow: var(--sh-sm); }
.qtype__input:focus-visible + .qtype__box { outline: 2px solid var(--navy); outline-offset: 2px; }
.qtype__input:checked + .qtype__box {
	background: color-mix(in srgb, var(--gold) 9%, var(--surface));
	border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold), var(--sh-sm);
}
.qtype__input:checked + .qtype__box .qtype__key { background: var(--gold); color: var(--night); }
.qtype__input:checked + .qtype__box .qtype__tick { border-color: var(--gold-ink); box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 9px var(--gold-ink); }

/* sending */
.qf__send { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; padding-top: 4px; }
.qf__send .btn { min-width: 200px; }
.qf__form[data-state="sent"] .qf__status { color: var(--navy); }

/* what happens next */
.qf__next {
	position: relative; overflow: hidden; padding: 64px 24px 26px; border-radius: var(--r-md);
	background:
		radial-gradient(80% 90% at 50% 0%, color-mix(in srgb, var(--navy) 80%, transparent), transparent 75%),
		var(--night);
	color: var(--chalk); box-shadow: var(--sh-night);
}
.qf__next-deck { position: absolute; inset: 16px 20px auto; width: calc(100% - 40px); height: 44px; overflow: visible; }
.qf__next-deck path { fill: none; stroke: var(--gold); stroke-width: 1.5px; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.qf__next-deck .qf__next-pier { stroke: color-mix(in srgb, var(--gold) 55%, transparent); stroke-width: 1px; }
.qf__next-title { font-size: var(--fs-name); color: var(--chalk); }
.qf__next-text { margin-top: 10px; color: var(--mist); }
.qf__wa { margin-top: 20px; }
.qf__wa .wa__label { unicode-bidi: isolate; font-variant-numeric: tabular-nums; }

@media (min-width: 560px) {
	.qtypes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.qtypes__item:last-child:nth-child(odd) { grid-column: 1 / -1; }
	.qf__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.qf__grid .field--wide { grid-column: 1 / -1; }
}
@media (min-width: 768px) {
	.qf { padding-block: 64px var(--sp-2xl); }
	.qf__strip { padding: 26px 32px 22px; }
	.qf__deck { height: 36px; }
	.qf__station { grid-auto-flow: column; justify-content: center; align-items: center; gap: 12px; }
	.qf__form { padding: 32px 36px 36px; }
	.qf__step { padding-inline-start: 56px; padding-bottom: 32px; }
	.qf__step + .qf__step { padding-top: 30px; }
	.qf__step::before { /* the route between the stations */
		content: ""; position: absolute; inset-inline-start: 17px; top: 48px; bottom: 0;
		border-inline-start: 1.5px dashed color-mix(in srgb, var(--gold) 55%, transparent);
	}
	.qf__step + .qf__step::before { top: 78px; }
	.qf__step--you::before { display: none; }
	.qf__num { position: absolute; inset-inline-start: 0; }
	.qf__legend { min-height: 36px; }
	.qf__send { padding-inline-start: 56px; }
	.qf__next { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; align-items: end; padding: 70px 32px 30px; }
	.qf__next > :not(.qf__next-deck) { grid-column: 1; }
	.qf__next > p.reveal-item { grid-column: 2; grid-row: 1 / span 2; }
	.qf__wa { margin-top: 0; }
}
@media (min-width: 1100px) {
	.qf { padding-block: 0 var(--sp-2xl); }
	.qf__in { grid-template-columns: minmax(0, 4fr) minmax(0, 7.4fr); grid-template-rows: auto 1fr; column-gap: 64px; row-gap: 40px; align-items: start; }
	.qf__head { grid-column: 1; grid-row: 1; padding-top: 72px; }
	.qf__sheet { grid-column: 2; grid-row: 1 / span 2; margin-top: -112px; }
	.qf__next { grid-column: 1; grid-row: 2; display: block; padding: 72px 28px 30px; position: sticky; top: 32px; }
	.qf__wa { margin-top: 22px; }
	.qf__form { padding: 36px 44px 44px; }
	.qf__strip { padding: 28px 44px 24px; }
}

/* arrival: the sheet rises with the head; the deck draws; the stations light up in turn */
@media (prefers-reduced-motion: no-preference) {
	.js .qf__sheet { animation: qf-rise .8s var(--ease-in) .22s both; }
	.js .qf__deck { animation: qf-draw .9s var(--ease-in) .55s both; }
	.js .qf__station { animation: qf-fade .45s var(--ease-in) both; animation-delay: calc(.6s + var(--i) * 120ms); }
	html.js .qf__next:not(.is-in) .qf__next-deck { clip-path: inset(-4px 100% -4px 0); }
	html.js[dir="rtl"] .qf__next:not(.is-in) .qf__next-deck { clip-path: inset(-4px 0 -4px 100%); }
	html.js .qf__next .qf__next-deck { clip-path: inset(-4px 0 -4px 0); transition: clip-path .85s var(--ease-in) .08s; }
	html.js [data-reveal="qf-types"]:not(.is-in) .reveal-item { transform: translateY(10px); }
}
@keyframes qf-rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes qf-draw { from { opacity: 0; } }
@keyframes qf-fade { from { opacity: 0; transform: translateY(6px); } }
