/* v6.26 UX refinements for the OnePage. Loaded last, so it only adds small,
 * targeted rules on top of the existing motion and responsive layers. */

/* Horizontal overscroll is contained here instead of a non-passive touchmove
 * listener, so iOS can start vertical scrolling without waiting on JavaScript. */
html, body { overscroll-behavior-x: none; }

/* Calmer line breaks: no single orphaned word under large headings. */
.sw-motion-v591 :is(.h2, .h3, .display, .projectmeta h3) { text-wrap: balance; }
.sw-motion-v591 :is(.lead, .section-lead, .sectioncopy, .step p, .cin-content p) { text-wrap: pretty; }

/* Services now carry a real section headline like every other section. */
.sw-motion-v591 .services .services-title {
	position: relative;
	z-index: 3;
	margin: 18px 0 0;
	max-width: 11ch;
	color: #fff;
	font-size: clamp(2.6rem, 5.2vw, 5.4rem) !important;
}
.sw-motion-v591 .services .services-title span { color: rgba(255, 255, 255, .42); }
.sw-motion-v591 .services .services-title + .section-lead { margin-top: 22px; }
@media (max-width: 650px) {
	.sw-motion-v591 .services .services-title { font-size: clamp(2.35rem, 11vw, 3.4rem) !important; }
}

/* The closing headline uses the same two-tone treatment as the others. */
.sw-motion-v591 .cin-content .h2 span { color: rgba(255, 255, 255, .5); }

/* Contact form: optional phone hint, inline validation and a sending state. */
.sw-motion-v591 .sw-phone-hint { color: rgba(255, 255, 255, .42); font-weight: 400; }
.sw-motion-v591 :is(.field, .quick-field) :is(input, select, textarea):user-invalid {
	border-color: #ff4d57 !important;
	box-shadow: 0 0 0 3px rgba(255, 77, 87, .16) !important;
}
.sw-motion-v591 .sw-field-error {
	display: block;
	margin-top: 6px;
	color: #ff7a82;
	font-size: .78rem;
	line-height: 1.4;
}
.sw-motion-v591 .sw-form-alert {
	grid-column: 1 / -1;
	margin: 0 0 4px;
	padding: 12px 14px;
	border: 1px solid rgba(255, 77, 87, .4);
	border-radius: 10px;
	background: rgba(255, 77, 87, .1);
	color: #ffd9dc;
	font-size: .86rem;
	line-height: 1.5;
}
.sw-motion-v591 form[aria-busy="true"] button[type="submit"] {
	cursor: progress;
	opacity: .72;
}
.sw-motion-v591 .success:focus { outline: none; }

/* Footer contact links can be long; never let them overflow on phones. */
.sw-motion-v591 .footgrid .col a[href^="mailto:"] { overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
	.sw-motion-v591 :is(.field, .quick-field) :is(input, select, textarea) { transition: none !important; }
}

/* Drawn arrow icons replace text glyphs (see ux-refinements.js), so they sit
 * optically centred next to the label and inside round controls. */
.sw-icon {
	display: inline-block;
	flex: 0 0 auto;
	width: .95em;
	height: .95em;
	background: currentColor;
	-webkit-mask: var(--sw-icon) center / contain no-repeat;
	mask: var(--sw-icon) center / contain no-repeat;
	vertical-align: -.12em;
	transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1);
}
.sw-icon--ne { --sw-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 11.5 11.5 4.5M5.5 4.5h6v6' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.sw-icon--se { --sw-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 4.5 11.5 11.5M11.5 5.5v6h-6' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.sw-icon--e { --sw-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.btn .sw-icon { margin-left: 1px; }
.sw-icon-only { display: inline-grid !important; place-items: center; }
.service-arrow.sw-icon-only .sw-icon { width: 1.05rem; height: 1.05rem; }
@media (hover: hover) and (pointer: fine) {
	.btn:hover .sw-icon--ne, .web-showcase:hover .sw-icon--ne { transform: translate(2px, -2px); }
	.btn:hover .sw-icon--se, .quick-full:hover .sw-icon--se { transform: translate(2px, 2px); }
	.btn:hover .sw-icon--e { transform: translateX(3px); }
}

/* Round close and gallery buttons: drawn icons, exactly centred. */
.sw-motion-v591 :is(.close, .project-case-nav button) {
	display: inline-grid !important;
	place-items: center !important;
	padding: 0 !important;
	line-height: 0 !important;
}
.sw-motion-v591 :is(.close, .project-case-nav button) svg { display: block; }

/* Consent and human check: one consistent control. Both are the same boxed
 * row with the same custom checkbox, instead of one plain and one boxed. */
.sw-motion-v591 :is(#contactForm .check, #quickInquiryForm .quick-check) {
	display: grid !important;
	grid-template-columns: 20px minmax(0, 1fr) !important;
	align-items: center !important;
	column-gap: 12px !important;
	min-height: 52px;
	margin: 0 !important;
	padding: 13px 15px !important;
	border: 1px solid rgba(255, 255, 255, .14) !important;
	border-radius: 12px !important;
	background: rgba(255, 255, 255, .035) !important;
	color: rgba(255, 255, 255, .78) !important;
	font-size: .8rem !important;
	line-height: 1.45 !important;
	cursor: pointer;
	transition: border-color 180ms ease, background-color 180ms ease !important;
}
.sw-motion-v591 :is(#contactForm .check, #quickInquiryForm .quick-check):has(input:checked) {
	border-color: rgba(142, 224, 91, .42) !important;
	background: rgba(142, 224, 91, .07) !important;
	color: #fff !important;
}
.sw-motion-v591 :is(#contactForm .check, #quickInquiryForm .quick-check):has(input:focus-visible) {
	outline: 2px solid var(--red, #e20816);
	outline-offset: 2px;
}
.sw-motion-v591 :is(#contactForm .checks, #quickInquiryForm .quick-checks) {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 10px !important;
}
@media (max-width: 650px) {
	.sw-motion-v591 :is(#contactForm .checks, #quickInquiryForm .quick-checks) { grid-template-columns: 1fr !important; }
}
.sw-motion-v591 :is(#contactForm .check, #quickInquiryForm .quick-check) input[type="checkbox"] {
	-webkit-appearance: none !important;
	appearance: none !important;
	display: grid !important;
	place-items: center !important;
	width: 20px !important;
	height: 20px !important;
	min-width: 20px !important;
	min-height: 20px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1.5px solid rgba(255, 255, 255, .38) !important;
	border-radius: 6px !important;
	background: transparent !important;
	cursor: pointer;
	transition: background-color 150ms ease, border-color 150ms ease !important;
}
.sw-motion-v591 :is(#contactForm .check, #quickInquiryForm .quick-check) input[type="checkbox"]::after {
	content: "";
	width: 10px;
	height: 10px;
	background: #0a0a0b;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.3 4.8 9 10 3' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.3 4.8 9 10 3' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	transform: scale(.6);
	opacity: 0;
	transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), opacity 120ms ease;
}
.sw-motion-v591 :is(#contactForm .check, #quickInquiryForm .quick-check) input[type="checkbox"]:checked {
	border-color: var(--green, #8ee05b) !important;
	background: var(--green, #8ee05b) !important;
}
.sw-motion-v591 :is(#contactForm .check, #quickInquiryForm .quick-check) input[type="checkbox"]:checked::after {
	transform: scale(1);
	opacity: 1;
}
.sw-motion-v591 :is(#contactForm .check, #quickInquiryForm .quick-check) a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Hero glass box: one stable backdrop blur.
 * The button inside the glass panel no longer blurs again (nested
 * backdrop-filters flicker in Chrome and Safari), and the panel gets its own
 * compositing layer so the parallax image behind it does not tear it. */
.sw-motion-v591 .hero .hero-bottom .btn.line {
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
	background: rgba(255, 255, 255, .1) !important;
}
@media (min-width: 981px) {
	.sw-motion-v591 .hero .hero-bottom {
		transform: translateZ(0);
		-webkit-backface-visibility: hidden;
		backface-visibility: hidden;
	}
}

/* v6.32 scroll performance.
 * Stacked, large backdrop blurs behind the fixed navigation forced the browser
 * to re-blur everything underneath on every scroll frame. One lighter blur on
 * the bar itself looks the same and scrolls smoothly; on touch devices the
 * full-width backdrop strip becomes a plain gradient. */
.sw-motion-v591 .nav-backdrop {
	-webkit-backdrop-filter: blur(12px) !important;
	backdrop-filter: blur(12px) !important;
}
.sw-motion-v591 .header {
	-webkit-backdrop-filter: blur(16px) saturate(150%) !important;
	backdrop-filter: blur(16px) saturate(150%) !important;
}
@media (max-width: 980px), (hover: none) {
	.sw-motion-v591 .nav-backdrop {
		-webkit-backdrop-filter: none !important;
		backdrop-filter: none !important;
		background: linear-gradient(180deg, rgba(8, 8, 10, .72) 0%, rgba(8, 8, 10, .38) 60%, transparent 100%) !important;
	}
	.sw-motion-v591 .header {
		-webkit-backdrop-filter: blur(10px) saturate(140%) !important;
		backdrop-filter: blur(10px) saturate(140%) !important;
		background: linear-gradient(110deg, rgba(8, 8, 10, .86), rgba(24, 24, 28, .72) 48%, rgba(7, 7, 9, .84)) !important;
	}
	/* The full-screen menu is opaque; a blur behind it only costs frames. */
	.sw-motion-v591 .mobile {
		-webkit-backdrop-filter: none !important;
		backdrop-filter: none !important;
	}
	/* Hero glass on phones: solid tint instead of re-blurring the moving photo. */
	.sw-motion-v591 .hero .hero-bottom {
		-webkit-backdrop-filter: none !important;
		backdrop-filter: none !important;
		background: rgba(14, 14, 17, .78) !important;
	}
}

/* v6.33 hero on phones and tablets: the eyebrow stays at the top, headline
 * and glass box sit at the bottom, so the face in the photo stays free. The
 * gradient is lighter in the middle and darker where the text now sits. */
@media (max-width: 980px) {
	.sw-motion-v591 .hero .hero-in {
		justify-content: flex-start !important;
		padding-bottom: calc(clamp(24px, 4vw, 36px) + env(safe-area-inset-bottom, 0px)) !important;
	}
	.sw-motion-v591 .hero .display { margin-top: auto !important; }
	.sw-motion-v591 .hero::before {
		background-image: linear-gradient(180deg, rgba(6,6,8,.5) 0%, rgba(6,6,8,.12) 22%, rgba(6,6,8,.08) 46%, rgba(6,6,8,.6) 72%, rgba(6,6,8,.9) 100%), url("../images/embedded/f13bd53771fc39ea.webp") !important;
	}
}

/* v6.32 form controls: selects match the text fields exactly (height, radius,
 * padding) and use one drawn chevron instead of the platform widget. */
.sw-motion-v591 :is(.form, .quick-inquiry-form) select {
	-webkit-appearance: none !important;
	appearance: none !important;
	padding-right: 44px !important;
	background-repeat: no-repeat !important;
	background-position: right 16px center !important;
	background-size: 14px 14px !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 5.25 7 9.25l4-4' fill='none' stroke='%23ffffff' stroke-opacity='.7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
	cursor: pointer;
}
.sw-motion-v591 :is(.form, .quick-inquiry-form) :is(input:not([type="checkbox"]):not([type="hidden"]), select) {
	box-sizing: border-box !important;
	height: 56px !important;
	min-height: 56px !important;
	border-radius: 12px !important;
	line-height: 1.3 !important;
}
.sw-motion-v591 .form :is(input:not([type="checkbox"]):not([type="hidden"]), select, textarea) { padding-left: 16px !important; }
@media (prefers-color-scheme: light) {
	.sw-motion-v591 #quickInquiryOverlay select {
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 5.25 7 9.25l4-4' fill='none' stroke='%230a0a0b' stroke-opacity='.65' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
	}
}
#quickInquiryOverlay .quick-field :is(input:not([type="checkbox"]):not([type="hidden"]), select) { padding: 0 16px !important; }
#quickInquiryOverlay .quick-field select { padding-right: 44px !important; }

/* v6.32 phones and tablets: one gutter, no mid-word breaks, calmer stacks. */
@media (max-width: 980px) {
	.sw-motion-v591 .nav-backdrop { border-bottom: 0 !important; }
	.sw-motion-v591 .scale { padding-left: 0 !important; padding-right: 0 !important; }
	.sw-motion-v591 .scale-frame {
		width: calc(100% - 2 * var(--pad)) !important;
		margin: 0 auto !important;
	}
	.sw-motion-v591 .scale-copy .h2 {
		max-width: none !important;
		font-size: clamp(2.2rem, 9.4vw, 4.2rem) !important;
		overflow-wrap: normal !important;
		word-break: normal !important;
		-webkit-hyphens: manual;
		hyphens: manual;
	}
	.sw-person__copy .h2 { max-width: none; }
	.sw-person__media:has(.sw-person__placeholder) { aspect-ratio: 16 / 10; }
}
@media (max-width: 650px) {
	.sw-motion-v591 .process .steps .step:nth-child(n) {
		grid-template-columns: 1fr !important;
		gap: 10px !important;
		padding: 22px !important;
	}
	.sw-motion-v591 .process .stepnum { padding-top: 0 !important; }
	.sw-motion-v591 .scale-copy { left: 22px !important; right: 22px !important; }
}
