/* P&C Inquiry Experience: the seller band and sticky bar on sold listing pages (includes/sold.php), 1.2.7.
 * Loaded only on sold listings while the band is on, so the two page-wide rules at the bottom (the consultation
 * button and #sidebar's jump offset) only apply there.
 * The band sits between the theme's dark photo band (.list-top-wrap) and the white listing body (.list-wrap),
 * so it is turquoise: it can't blend into either.
 * Motion: sold.php's inline script adds .is-armed (hidden start state), then .is-in when the band first peeks in and
 * .is-in2 when 40% of it is on screen. No script, or "reduce motion" switched on: no classes, everything shows, still.
 * Design: Operations/Client-Experience/sold-listing-build.md and mockups/sold-listing/.
 */

.pcx-sc, .pcx-sc-bar {
	--sc-midnight: #1B1E2A; --sc-turq: #55C3BB; --sc-turq-dk: #3FA79F; --sc-stone: #4D6370; --sc-pale: #B7DFE1;
	--sc-body: "Montserrat", system-ui, sans-serif; --sc-display: "Anton", Impact, "Arial Narrow", sans-serif;
	--sc-ease: cubic-bezier(.2, .8, .2, 1);
	font-family: var(--sc-body); -webkit-font-smoothing: antialiased;
}
.pcx-sc *, .pcx-sc *::before, .pcx-sc *::after, .pcx-sc-bar * { box-sizing: border-box; }
.pcx-sc :where(p, h2, form) { margin: 0; padding: 0; }

/* ---------- the band ---------- */
.pcx-sc {
	/* Full width, the same way the theme's .span-page does it for the band above. */
	position: relative; left: 50%; width: 100vw; margin-left: -50vw; overflow: hidden; isolation: isolate;
	background:
		radial-gradient(90% 120% at 100% 0%, rgba(255,255,255,.22), rgba(255,255,255,0) 60%),
		var(--sc-turq);
	color: var(--sc-midnight); font-size: 16px; line-height: 1.5; text-align: left;
}
.pcx-sc-in { position: relative; max-width: 1170px; margin: 0 auto; padding: 30px 20px 34px; }

/* Row of houses behind the content, in thin Midnight lines. */
.pcx-sc-art { position: absolute; z-index: -1; right: 0; bottom: -2px; width: 118%; max-width: 760px; color: var(--sc-midnight); opacity: .13; pointer-events: none; }
.pcx-sc-art svg { display: block; width: 100%; height: auto; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- heading ---------- */
.pcx-sc .pcx-sc-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sc-midnight); }
/* SOLD: Anton's capitals sit 2.5px below the top of a 15px line and end .5px below it, so 5px above and 8px below
   leave 7.5px either side of the letters. The letter spacing adds 1.5px after the D, hence 8.5px on the right. (1.2.10) */
.pcx-sc-tag { display: inline-block; font: 400 15px/1 var(--sc-display); letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--sc-midnight); padding: 5px 8.5px 8px 10px; border-radius: 3px; transform: rotate(-4deg); box-shadow: 0 3px 0 rgba(27,30,42,.18); }
.pcx-sc .pcx-sc-title { margin-top: 12px; font: 400 42px/1.02 var(--sc-display) !important; letter-spacing: .005em; text-transform: uppercase; color: var(--sc-midnight); }
/* One mask per word; the word inside rises into it. */
.pcx-sc-w { display: inline-block; overflow: hidden; vertical-align: top; padding: .04em .02em .08em; margin: -.04em -.02em -.08em; }
.pcx-sc-w > span { display: inline-block; }
/* "yours": white on a Midnight box, like the SOLD tag.
   Anton sits low in its line: the capitals start .18em below the top of a 1.02 line and end .03em below its bottom.
   A .9 line plus .21em of padding at the bottom only leaves an equal gap (about .12em) above and below the letters.
   The baseline stays level with the other words, so the first line just grows a little. (1.2.8) */
.pcx-sc-em > span { background: linear-gradient(var(--sc-midnight), var(--sc-midnight)) no-repeat 0 0 / 100% 100%; color: #fff; line-height: .9; padding: 0 .14em .21em; border-radius: 3px; }
.pcx-sc .pcx-sc-sub { margin-top: 12px; max-width: 34em; font-size: 15.5px; line-height: 1.5; font-weight: 500; color: rgba(27,30,42,.88); }

/* ---------- the address form ---------- */
.pcx-sc-form { margin-top: 20px !important; max-width: 580px; }
.pcx-sc-label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pcx-sc-row { display: flex; flex-direction: column; gap: 10px; }
.pcx-sc-field { position: relative; flex: 1; min-width: 0; }
.pcx-sc-field svg { position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; margin-top: -11px; fill: none; stroke: var(--sc-turq-dk); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
/* The theme styles every text box with font-size 1rem !important (20px) through a selector worth (0,5,1), so these
   rules go through the band's ID. 16px type also stops iPhones zooming in when the box is tapped. */
#pcx-sc input.pcx-sc-input {
	display: block; width: 100% !important; height: 58px !important; margin: 0 !important; padding: 0 16px 0 48px !important;
	font: 500 16px/58px var(--sc-body) !important; color: var(--sc-midnight) !important; background: #fff !important;
	border: 2px solid #fff !important; border-radius: 8px !important; box-shadow: 0 8px 22px rgba(27,30,42,.16) !important;
	-webkit-appearance: none; appearance: none; outline: none; transition: border-color .15s, box-shadow .15s;
}
#pcx-sc input.pcx-sc-input::placeholder { color: #6B7785; opacity: 1; }
#pcx-sc input.pcx-sc-input:focus { border-color: var(--sc-midnight) !important; box-shadow: 0 0 0 4px rgba(27,30,42,.14) !important; }

.pcx-sc button.pcx-sc-btn {
	position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	height: 58px; margin: 0; padding: 0 24px; border: 0; border-radius: 8px; cursor: pointer;
	background: var(--sc-midnight); color: #fff; font: 700 16.5px/1 var(--sc-body); letter-spacing: .01em; text-transform: none; white-space: nowrap;
	box-shadow: 0 10px 24px rgba(27,30,42,.3); transition: transform .15s, box-shadow .15s, background-color .15s;
}
.pcx-sc button.pcx-sc-btn:hover { background: #262A39; transform: translateY(-1px); box-shadow: 0 14px 30px rgba(27,30,42,.36); }
.pcx-sc button.pcx-sc-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.pcx-sc-arr { display: inline-flex; transition: transform .2s var(--sc-ease); }
.pcx-sc-btn:hover .pcx-sc-arr { transform: translateX(4px); }
.pcx-sc-btn svg, .pcx-sc-bar-go svg { width: 20px; height: 20px; fill: none; stroke: var(--sc-turq); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* A light sweep across the button (played after the entrance, see the motion rules). */
.pcx-sc-btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.3), rgba(255,255,255,0)); transform: skewX(-18deg); pointer-events: none; }

.pcx-sc .pcx-sc-proof { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--sc-midnight); }
.pcx-sc-stars { display: inline-flex; gap: 1px; }
.pcx-sc-stars svg { width: 14px; height: 14px; fill: var(--sc-midnight); }

/* ---------- the buyer link ---------- */
.pcx-sc .pcx-sc-more { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(27,30,42,.16); font-size: 14.5px; font-weight: 500; color: var(--sc-midnight); }
.pcx-sc a.pcx-sc-buy { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--sc-midnight) !important; text-decoration: underline !important; text-decoration-thickness: 1.5px !important; text-underline-offset: 4px; }
.pcx-sc a.pcx-sc-buy svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--sc-ease); }
.pcx-sc a.pcx-sc-buy:hover svg { transform: translateY(3px); }
.pcx-sc a.pcx-sc-buy:focus-visible { outline: 2px solid var(--sc-midnight); outline-offset: 3px; }

/* Staff preview note. */
.pcx-sc .pcx-sc-admin { margin-top: 14px; font-size: 12.5px; color: var(--sc-midnight); background: rgba(255,255,255,.7); border: 1px dashed rgba(27,30,42,.35); border-radius: 6px; padding: 8px 12px; }

/* ---------- the sticky bar (phones) / card (wider screens) ---------- */
.pcx-sc-bar {
	position: fixed; z-index: 9989; left: 0; right: 0; bottom: 0; display: flex; align-items: stretch;
	background: var(--sc-midnight); color: #fff; box-shadow: 0 -10px 28px rgba(0,0,0,.28);
	padding-bottom: env(safe-area-inset-bottom);
	transform: translateY(115%); visibility: hidden;
	transition: transform .4s var(--sc-ease), visibility 0s linear .4s;
}
.pcx-sc-bar.is-on { transform: none; visibility: visible; transition: transform .4s var(--sc-ease), visibility 0s; }
html.pcx-cp-open .pcx-sc-bar { visibility: hidden; }
.pcx-sc-bar a.pcx-sc-bar-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 6px 12px 16px; color: #fff !important; text-decoration: none !important; }
.pcx-sc-bar-txt { flex: 1; min-width: 0; }
.pcx-sc-bar-txt b { display: block; font: 400 18px/1.1 var(--sc-display); letter-spacing: .02em; text-transform: uppercase; color: #fff; }
.pcx-sc-bar-txt span { display: block; margin-top: 3px; font-size: 12px; line-height: 1.3; color: rgba(255,255,255,.75); }
.pcx-sc-bar-go { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 11px 13px; border-radius: 6px; background: var(--sc-turq); color: var(--sc-midnight); font: 700 14px/1 var(--sc-body); }
.pcx-sc-bar-go svg { width: 18px; height: 18px; stroke: var(--sc-midnight); }
/* Narrow phones: the chip becomes an arrow button, so the heading stays on one line. */
@media (max-width: 419px) {
	.pcx-sc-bar a.pcx-sc-bar-link { padding-left: 14px; gap: 10px; }
	.pcx-sc-bar-go { width: 44px; height: 44px; padding: 0; justify-content: center; }
	.pcx-sc-bar-go-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.pcx-sc-bar-go svg { width: 22px; height: 22px; }
	.pcx-sc-bar-txt b { font-size: 17px; }
	.pcx-sc-bar button.pcx-sc-bar-x { width: 36px; }
}
.pcx-sc-bar a.pcx-sc-bar-link:hover .pcx-sc-bar-go svg { transform: translateX(3px); }
.pcx-sc-bar-go svg { transition: transform .2s var(--sc-ease); }
.pcx-sc-bar button.pcx-sc-bar-x { flex: none; width: 40px; margin: 0; padding: 0 10px 0 2px; border: 0; background: transparent; color: rgba(255,255,255,.6); cursor: pointer; }
.pcx-sc-bar button.pcx-sc-bar-x:hover { color: #fff; }
.pcx-sc-bar-x svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.pcx-sc-bar :focus-visible { outline: 2px solid var(--sc-turq); outline-offset: -2px; }

/* ---------- page-wide, on these pages only ---------- */
/* One ask at a time: the sticky bar takes over from the "Book a consultation" button. */
.pcx-cp-pill, .pcx-cp-pill.is-on { display: none !important; }
/* The theme's fixed header covers the top of the sidebar when the browser jumps without its script. */
#sidebar { scroll-margin-top: 120px; }

/* ---------- wider screens ---------- */
@media (min-width: 600px) {
	/* Address and button in one white bar. */
	.pcx-sc-row { flex-direction: row; gap: 6px; padding: 6px; background: #fff; border-radius: 10px; box-shadow: 0 10px 26px rgba(27,30,42,.16); }
	#pcx-sc input.pcx-sc-input { height: 54px !important; line-height: 54px !important; border-color: transparent !important; box-shadow: none !important; }
	#pcx-sc input.pcx-sc-input:focus { border-color: transparent !important; box-shadow: none !important; }
	.pcx-sc-row:focus-within { box-shadow: 0 0 0 4px rgba(27,30,42,.18), 0 10px 26px rgba(27,30,42,.16); }
	.pcx-sc button.pcx-sc-btn { height: 54px; box-shadow: none; }
	.pcx-sc .pcx-sc-title { font-size: 54px !important; }
}
@media (min-width: 768px) {
	.pcx-sc-in { padding: 44px 24px 44px; }
	.pcx-sc-art { width: 70%; }
	/* 440px keeps "What would yours sell for?" on one line beside the "Find out" chip. */
	.pcx-sc-bar { left: 24px; right: auto; bottom: 24px; width: 440px; max-width: calc(100vw - 48px); border-radius: 12px; padding-bottom: 0; box-shadow: 0 18px 40px rgba(0,0,0,.35); transform: translateY(calc(100% + 40px)); }
	.pcx-sc-bar a.pcx-sc-bar-link { padding: 16px 8px 16px 20px; }
	.pcx-sc-bar-txt b { font-size: 20px; }
}
@media (min-width: 992px) {
	.pcx-sc-in {
		display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); grid-template-areas: "head form" "more form";
		column-gap: 64px; align-items: center; padding: 60px 15px 58px;
	}
	.pcx-sc-head { grid-area: head; }
	.pcx-sc-form { grid-area: form; margin-top: 0 !important; }
	.pcx-sc .pcx-sc-more { grid-area: more; align-self: start; border-top: 0; padding-top: 0; }
	.pcx-sc .pcx-sc-admin { grid-column: 1 / -1; }
	.pcx-sc .pcx-sc-title { font-size: 64px !important; }
	.pcx-sc .pcx-sc-sub { font-size: 17px; }
	.pcx-sc-art { width: 60%; right: -2%; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
	/* Start state, only once the band's script has armed it. */
	.pcx-sc.is-armed .pcx-sc-tag { opacity: 0; transform: scale(1.7) rotate(-16deg); }
	.pcx-sc.is-armed .pcx-sc-eyebrow .pcx-sc-rise { opacity: 0; transform: translateX(-10px); }
	.pcx-sc.is-armed .pcx-sc-w > span { transform: translateY(108%); }
	.pcx-sc.is-armed .pcx-sc-em > span { background-size: 0% 100%; color: var(--sc-midnight); }
	.pcx-sc.is-armed .pcx-sc-rise { opacity: 0; transform: translateY(18px); }
	.pcx-sc.is-armed .pcx-sc-art path { stroke-dasharray: 1 1; stroke-dashoffset: 1; }

	/* Stage 1 (.is-in), as soon as the band peeks in, which on a phone is the bottom of the first screen:
	   the SOLD tag stamps down, the words rise one after another, "yours" gets its box. */
	.pcx-sc.is-in .pcx-sc-tag { opacity: 1; transform: rotate(-4deg); transition: transform .5s cubic-bezier(.3, 1.6, .5, 1), opacity .15s; }
	.pcx-sc.is-in .pcx-sc-eyebrow .pcx-sc-rise { opacity: 1; transform: none; transition: opacity .5s ease .2s, transform .6s var(--sc-ease) .2s; }
	.pcx-sc.is-in .pcx-sc-w > span { transform: none; transition: transform .75s var(--sc-ease) calc(260ms + var(--i, 0) * 80ms); }
	.pcx-sc.is-in .pcx-sc-em > span { background-size: 100% 100%; color: #fff; transition: transform .75s var(--sc-ease) calc(260ms + var(--i, 0) * 80ms), background-size .45s cubic-bezier(.6, 0, .2, 1) 950ms, color .2s ease 1.15s; }

	/* Stage 2 (.is-in2), once a good part of the band is on screen: the text, the form and the buyer line slide
	   up, the houses draw themselves, then a light sweeps the button and its arrow nudges (three times, then rests). */
	.pcx-sc.is-in2 .pcx-sc-rise { opacity: 1; transform: none; transition: opacity .6s ease calc(var(--d, 0) * 1ms), transform .7s var(--sc-ease) calc(var(--d, 0) * 1ms); }
	.pcx-sc.is-in2 .pcx-sc-art path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s cubic-bezier(.45, 0, .2, 1) calc(200ms + var(--d, 0) * 140ms); }
	.pcx-sc.is-in2 .pcx-sc-btn::after { animation: pcx-sc-sweep 4.2s ease 1.2s 3; }
	.pcx-sc.is-in2 .pcx-sc-arr { animation: pcx-sc-nudge 4.2s ease 1.2s 3; }

	/* Scroll-linked drift of the houses, where the browser supports it (Chrome, Edge, newer Safari). */
	@supports (animation-timeline: view()) {
		.pcx-sc-art svg { animation: pcx-sc-drift linear both; animation-timeline: view(); animation-range: cover; }
	}
}
@keyframes pcx-sc-sweep { 0% { left: -70%; } 28%, 100% { left: 130%; } }
@keyframes pcx-sc-nudge { 0%, 22%, 100% { transform: none; } 30% { transform: translateX(5px); } 38% { transform: none; } 46% { transform: translateX(3px); } 54% { transform: none; } }
@keyframes pcx-sc-drift { from { transform: translateX(5%); } to { transform: translateX(-5%); } }

@media (prefers-reduced-motion: reduce) {
	.pcx-sc *, .pcx-sc-bar, .pcx-sc-bar * { transition: none !important; animation: none !important; }
}
