/* stylelint-disable no-descending-specificity -- Artwork families occupy separate component trees; disabled and pending overrides intentionally follow their state rules. */

/* Owner-approved timing defaults; settled source artwork and geometry remain authoritative. */
:root {
	--nh-motion-state: 160ms;
	--nh-motion-press: 80ms;
	--nh-motion-arrow: 160ms;
	--nh-motion-image: 240ms;
	--nh-motion-open: 220ms;
	--nh-motion-close: 160ms;
	--nh-motion-ease: cubic-bezier(0.2, 0, 0, 1);
}

:is(.nh-button, .wp-block-button__link, .nh-text-button, .nh-menu-toggle,
.nh-header-contact a, .nh-navigation a, .nh-navigation button, .nh-navigation summary,
.nh-footer a, .nh-footer button, .nh-social-link, .nh-home-vk,
.nh-vacancy-intro a[href], .nh-partner-mail-copy a[href], .nh-contact-card a[href],
.nh-review-provider-button, .nh-home-property-link a, .wp-block-post-excerpt__more-link,
.nh-strip-controls button, .nh-gallery-tabs button, .nh-gallery-select, [data-nh-property-select],
.nh-enquiry-fields input, .nh-enquiry-consent input[type='checkbox'],
.nh-enquiry-submit-row, .nh-enquiry-submit-label, .wpcf7-submit, .nh-dialog-close) {
	--nh-state-duration: var(--nh-motion-state);

	transition: color var(--nh-state-duration) var(--nh-motion-ease),
		background-color var(--nh-state-duration) var(--nh-motion-ease),
		border-color var(--nh-state-duration) var(--nh-motion-ease),
		opacity var(--nh-state-duration) var(--nh-motion-ease);
}

:is(.nh-button, .wp-block-button__link, .nh-text-button, .nh-menu-toggle,
.nh-header-contact a, .nh-navigation a, .nh-navigation button, .nh-navigation summary,
.nh-footer a, .nh-footer button, .nh-social-link, .nh-home-vk,
.nh-vacancy-intro a[href], .nh-partner-mail-copy a[href], .nh-contact-card a[href],
.nh-review-provider-button, .nh-home-property-link a, .wp-block-post-excerpt__more-link,
.nh-strip-controls button, .nh-gallery-tabs button, .nh-gallery-select, [data-nh-property-select],
.nh-enquiry-consent input[type='checkbox'], .wpcf7-submit, .nh-dialog-close):active,
.nh-enquiry-submit-row:has(.wpcf7-submit:active) {
	--nh-state-duration: var(--nh-motion-press);
}

.nh-enquiry-fields input::placeholder {
	transition: opacity var(--nh-motion-state) var(--nh-motion-ease);
}

.nh-enquiry-fields input {
	transition-property: background-color, border-color;
}

.nh-button-outline:disabled {
	background: transparent;
	color: var(--nh-mint);
	cursor: default;
}

.nh-motion-control:disabled,
.nh-gallery-tabs button:disabled,
.nh-gallery-select:disabled,
[data-nh-property-select]:disabled {
	cursor: default;
}

/* Validation and disabled/pending semantics must never wait for decoration. */
:is(.nh-button, .nh-strip-controls button, .nh-gallery-tabs button, .nh-gallery-select,
[data-nh-property-select], .wpcf7-submit):disabled,
.nh-motion-control:disabled,
.nh-enquiry-fields input.wpcf7-not-valid,
.nh-enquiry-fields input.wpcf7-not-valid::placeholder,
.nh-enquiry-submit-row:has(.wpcf7-submit:disabled),
.submitting :is(.nh-enquiry-submit-row, .nh-enquiry-submit-label, .wpcf7-submit),
.nh-motion-control:is(:disabled, [aria-disabled='true']) .nh-motion-layer,
.nh-motion-control:has(.wpcf7-submit:disabled) .nh-motion-layer,
.submitting .nh-motion-layer {
	transition: none;
}

.nh-navigation summary::after {
	transition: transform var(--nh-motion-arrow) var(--nh-motion-ease);
}

.nh-home-site-link img {
	transition: transform var(--nh-motion-image) var(--nh-motion-ease);
}

/* Separate inert layers cross-fade the real source files, including three-state arrows. */
.nh-motion-art-host,
.nh-motion-logo,
.nh-motion-arrow {
	position: relative;
}

.nh-button .nh-button-arrow.nh-motion-art-host,
.nh-dialog-close.nh-motion-art-host {
	background-size: 0 0;
}

.nh-motion-art,
.nh-motion-layer {
	position: absolute;
	inset: 0;
	display: block;
	pointer-events: none;
}

.nh-motion-layer {
	background-position: center;
	background-size: contain;
	background-repeat: no-repeat;
	transition: opacity var(--nh-motion-arrow) var(--nh-motion-ease);
}

.nh-motion-art-logo .nh-motion-layer,
.nh-motion-art-close .nh-motion-layer {
	transition-duration: var(--nh-state-duration, var(--nh-motion-state));
}

.nh-motion-idle {
	background-image: var(--nh-art-idle);
	opacity: 1;
}

.nh-motion-hover {
	background-image: var(--nh-art-hover);
	opacity: 0;
}

.nh-motion-pressed {
	background-image: var(--nh-art-pressed, var(--nh-art-hover));
	opacity: 0;
}

.nh-motion-control:is(:hover, :active):where(:not(:disabled, [aria-disabled='true'])) .nh-motion-idle,
.nh-motion-control:active:where(:not(:disabled, [aria-disabled='true'])) .nh-motion-hover {
	opacity: 0;
}

/* Identical hover/pressed artwork stays on one layer: cross-fading two copies
 * reduces their combined opacity midway through a press. */
.nh-motion-control:is(:hover, :active):where(:not(:disabled, [aria-disabled='true'])) .nh-motion-art-same-press .nh-motion-hover {
	opacity: 1;
}

.nh-motion-art-same-press .nh-motion-pressed {
	display: none;
}

/* The large VK pill's normal/hover wordmark is the same source artwork.
 * Keep that one opaque layer; cross-fading identical transparent SVGs dims it. */
.nh-motion-control:hover:not(:active) .nh-motion-art-same-hover .nh-motion-idle {
	opacity: 1;
}

.nh-motion-art-same-hover .nh-motion-hover {
	display: none;
}

/* Generic cost arrows have different source stroke sizes. Rotate the idle
 * geometry while revealing the exact hover asset over its opaque disc. */
.nh-motion-art-turning {
	transition: transform var(--nh-motion-arrow) var(--nh-motion-ease);
	transform: rotate(0deg);
}

.nh-motion-control:is(:hover, :active):where(:not(:disabled, [aria-disabled='true'])) .nh-motion-art-turning {
	transform: rotate(-45deg);
}

.nh-motion-control:is(:hover, :active):where(:not(:disabled, [aria-disabled='true'])) .nh-motion-art-turning .nh-motion-idle {
	opacity: 1;
}

.nh-motion-art-turning .nh-motion-hover {
	transform: rotate(45deg);
}

.nh-motion-control:active:where(:not(:disabled, [aria-disabled='true'])) .nh-motion-art-turning .nh-motion-hover {
	opacity: 1;
}

.nh-motion-art-turning .nh-motion-pressed {
	display: none;
}

/* These source paths are exact rotations. Keep the original arrow while rotating
 * its own artwork, then cross-fade only a genuinely different pressed color. */
.nh-motion-art-directional {
	transform: rotate(0deg);
	transition: transform var(--nh-motion-arrow) var(--nh-motion-ease);
}

.nh-motion-control:is(:hover, :active):where(:not(:disabled, [aria-disabled='true'])) .nh-motion-art-directional {
	transform: rotate(var(--nh-art-turn, -45deg));
}

.nh-motion-control:hover:where(:not(:disabled, [aria-disabled='true'])) .nh-motion-art-directional .nh-motion-idle {
	opacity: var(--nh-directional-idle, 1);
}

.nh-motion-control:hover:where(:not(:disabled, [aria-disabled='true'])) .nh-motion-art-directional .nh-motion-hover {
	opacity: var(--nh-directional-hover, 0);
}

.nh-motion-control:active:where(:not(:disabled, [aria-disabled='true'])) .nh-motion-art-directional :is(.nh-motion-idle, .nh-motion-hover) {
	opacity: 0;
}

.nh-motion-art-directional .nh-motion-pressed {
	transform: rotate(var(--nh-pressed-correction, 45deg));
}

.nh-page-home .nh-hero-copy .nh-button-arrow,
.nh-button-primary .nh-button-arrow {
	--nh-art-idle: url('r2/bbcc1b487a514d164962b920.svg');
}

.nh-motion-control:hover:where(:not(:disabled, [aria-disabled='true'])) .nh-motion-hover,
.nh-motion-control:active:where(:not(:disabled, [aria-disabled='true'])) .nh-motion-pressed {
	opacity: 1;
}

.nh-motion-control:active:where(:not(:disabled, [aria-disabled='true'])) .nh-motion-hover {
	opacity: 0;
}

/* Submit-row decoration follows its actual input state, not the surrounding shell. */
.nh-enquiry-submit-row.nh-motion-control .nh-motion-idle {
	opacity: 1;
}

.nh-enquiry-submit-row.nh-motion-control :is(.nh-motion-hover, .nh-motion-pressed) {
	opacity: 0;
}

.nh-enquiry-submit-row.nh-motion-control:has(.wpcf7-submit:hover:not(:disabled)) .nh-motion-hover,
.nh-enquiry-submit-row.nh-motion-control:has(.wpcf7-submit:active:not(:disabled)) .nh-motion-pressed {
	opacity: 1;
}

.nh-enquiry-submit-row.nh-motion-control:has(.wpcf7-submit:is(:hover, :active):not(:disabled)) .nh-motion-idle,
.nh-enquiry-submit-row.nh-motion-control:has(.wpcf7-submit:active:not(:disabled)) .nh-motion-hover {
	opacity: 0;
}

.nh-enquiry-submit-row.nh-motion-control:has(.wpcf7-submit:hover:not(:disabled)) .nh-motion-art-directional .nh-motion-idle {
	opacity: 1;
}

.nh-enquiry-submit-row.nh-motion-control:has(.wpcf7-submit:hover:not(:disabled)) .nh-motion-art-directional .nh-motion-hover {
	opacity: 0;
}

.nh-enquiry-submit-row.nh-motion-control:has(.wpcf7-submit:active:not(:disabled)) .nh-motion-art-directional .nh-motion-idle {
	opacity: 0;
}

.nh-motion-control:is(:disabled, [aria-disabled='true']) .nh-motion-idle,
.nh-motion-control:has(.wpcf7-submit:disabled) .nh-motion-idle,
.submitting .nh-motion-control .nh-motion-idle {
	opacity: 1;
}

.nh-motion-control:is(:disabled, [aria-disabled='true']) :is(.nh-motion-hover, .nh-motion-pressed),
.nh-motion-control:has(.wpcf7-submit:disabled) :is(.nh-motion-hover, .nh-motion-pressed),
.submitting .nh-motion-control :is(.nh-motion-hover, .nh-motion-pressed) {
	opacity: 0;
}

.nh-button-arrow {
	--nh-art-idle: url('r2/af552516d84402505082a3d3.svg');
	--nh-art-hover: url('ui-states/arrow-cost-hover.svg');
}

:is(.nh-home-prompt, .nh-property-included-cta) .nh-button-arrow {
	--nh-art-idle: url('r2/9450121649e436dc5b561517.svg');
	--nh-art-hover: url('ui-states/arrow-white-hover.svg');
	--nh-art-pressed: url('ui-states/arrow-white-pressed.svg');
}

.nh-section-services .nh-button-arrow {
	--nh-art-idle: url('r2/9450121649e436dc5b561517.svg');
	--nh-art-hover: url('ui-states/arrow-detail-hover.svg');
	--nh-art-pressed: url('ui-states/arrow-detail-pressed.svg');
}

:is(.nh-home-admission-cta, .nh-company-admission-cta) .nh-button-arrow {
	--nh-art-idle: url('r2/65a8ed9997cb8cb64901383b.svg');
	--nh-art-hover: url('ui-states/arrow-list-hover.svg');
	--nh-art-pressed: url('ui-states/arrow-list-pressed.svg');
}

.nh-property-rate-action .nh-button-arrow {
	--nh-art-idle: url('r2/079c739b03353cead3a2ffbc.svg');
}

.nh-motion-arrow {
	display: block;
	flex: 0 0 17px;
	width: 17px;
	height: 17px;
	transform: rotate(90deg);
	pointer-events: none;
}

.nh-motion-arrow-vk {
	--nh-art-idle: url('r2/4084256202cdadee14a1c590.svg');
	--nh-art-hover: url('ui-states/arrow-vk-hover.svg');
	--nh-art-pressed: url('ui-states/arrow-vk-white.svg');

	margin-left: 20px;
}

.nh-motion-arrow-detail {
	--nh-art-idle: url('r2/9450121649e436dc5b561517.svg');
	--nh-art-hover: url('ui-states/arrow-detail-hover.svg');
	--nh-art-pressed: url('ui-states/arrow-detail-pressed.svg');
}

.nh-motion-arrow-submit {
	--nh-art-idle: url('r2/9450121649e436dc5b561517.svg');
	--nh-art-hover: url('ui-states/arrow-white-hover.svg');
	--nh-art-pressed: url('ui-states/arrow-white-pressed.svg');
}

.nh-motion-arrow-strip {
	--nh-art-idle: url('r2/2b39610998cbcb8d672028e1.svg');
	--nh-art-hover: url('r2/f85fe21922d17f0b6ba2e568.svg');

	width: 24px;
	height: 24px;
	transform: none;
}

.nh-strip-controls button:first-child .nh-motion-arrow-strip {
	transform: rotate(180deg);
}

:is(.nh-home-vk, .nh-home-property-link a, .wp-block-post-excerpt__more-link,
.nh-enquiry-submit-row).nh-motion-pseudo-arrow::after,
.nh-strip-controls button.nh-motion-pseudo-arrow::before {
	display: none;
}

.nh-dialog-close.nh-motion-art-host {
	--nh-art-idle: url('r2/44f1331df74b416b69d34914.svg');
	--nh-art-hover: url('ui-states/close-hover.svg');

	position: absolute;
}

.nh-motion-logo {
	display: block;
	line-height: 0;
}

.nh-motion-logo > .nh-motion-source {
	opacity: 0;
}

/* MAX's actual gradient states require opacity layers; gradients do not interpolate. */
:is(.nh-header, .nh-vacancy-socials, .nh-floating-controls) .nh-social-link[data-network='max'] {
	position: relative;
}

:is(.nh-header, .nh-vacancy-socials, .nh-floating-controls) .nh-social-link[data-network='max']:is(:hover, :active) {
	background-image: none;
}

:is(.nh-header, .nh-vacancy-socials, .nh-floating-controls) .nh-social-link[data-network='max']::before,
:is(.nh-header, .nh-vacancy-socials, .nh-floating-controls) .nh-social-link[data-network='max']::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--nh-state-duration) var(--nh-motion-ease);
}

:is(.nh-header, .nh-vacancy-socials, .nh-floating-controls) .nh-social-link[data-network='max']::before {
	background: linear-gradient(#55abdd, #6939b1);
}

:is(.nh-header, .nh-vacancy-socials, .nh-floating-controls) .nh-social-link[data-network='max']::after {
	background: linear-gradient(#489dce, #5e2fa4);
}

:is(.nh-header, .nh-vacancy-socials, .nh-floating-controls) .nh-social-link[data-network='max']:hover::before,
:is(.nh-header, .nh-vacancy-socials, .nh-floating-controls) .nh-social-link[data-network='max']:active::after {
	opacity: 1;
}

:is(.nh-header, .nh-vacancy-socials, .nh-floating-controls) .nh-social-link[data-network='max']:active::before {
	/* Keep the opaque hover gradient below the darker pressed gradient. */
	opacity: 1;
}

:is(.nh-header, .nh-vacancy-socials, .nh-floating-controls) .nh-social-link[data-network='max'] .nh-motion-logo {
	z-index: 1;
}

/* Keep the existing grouped disclosure controller; only its source indicators cross-fade. */
.nh-motion-faq::after {
	display: none;
}

.nh-motion-indicator {
	position: absolute;
	top: 0;
	right: -96px;
	width: 24px;
	height: 24px;
	pointer-events: none;
}

.nh-partner-vacancies .nh-motion-indicator {
	right: -56px;
}

.nh-motion-art-faq .nh-motion-layer {
	background: var(--nh-mint);
	mask: url('ui-states/faq-plus.svg') center / contain no-repeat;
	transition: opacity var(--nh-motion-arrow) var(--nh-motion-ease),
		background-color var(--nh-motion-state) var(--nh-motion-ease);
}

.nh-motion-art-faq .nh-motion-hover {
	mask-image: url('ui-states/faq-minus.svg');
}

.nh-motion-art-faq .nh-motion-pressed {
	display: none;
}

.nh-faq details:where([open]:not([data-nh-expanded='false'])) .nh-motion-art-faq .nh-motion-idle {
	opacity: 0;
}

.nh-faq details:where([open]:not([data-nh-expanded='false'])) .nh-motion-art-faq .nh-motion-hover {
	opacity: 1;
}

:is(.nh-property-faq, .nh-partner-vacancies) .nh-faq details:hover .nh-motion-layer {
	background-color: var(--nh-teal);
}

:is(.nh-property-faq, .nh-partner-vacancies) .nh-faq details[data-nh-pressed='true'] .nh-motion-layer {
	background-color: var(--nh-mint);
	transition-duration: var(--nh-motion-arrow), var(--nh-motion-press);
}

/* Selector geometry is directional; rotate the arrow while its source colors cross-fade. */
.nh-motion-selector {
	--nh-art-idle: url('r2/4898a65c340d6a784f6ff8e6.svg');
	--nh-art-hover: url('ui-states/selector-open.svg');

	position: relative;
	grid-column: 2;
	grid-row: 1;
	place-self: end start;
	width: 17px;
	height: 17px;
	margin-left: 298px;
	margin-bottom: 26.5px;
	pointer-events: none;
	transform: rotate(90deg);
	transition: transform var(--nh-motion-arrow) var(--nh-motion-ease);
}

.nh-property-gallery .nh-gallery > .nh-motion-selector {
	position: absolute;
	display: none;
	top: 16.5px;
	right: 20px;
	margin: 0;
}

.nh-motion-select:has(> .nh-gallery-select:is(:hover, :focus):not(:disabled)) > .nh-motion-selector {
	transform: rotate(-90deg);
}

.nh-motion-select:has(> .nh-gallery-select:is(:hover, :focus):not(:disabled)) .nh-motion-art-selector .nh-motion-idle {
	opacity: 0;
}

.nh-motion-select:has(> .nh-gallery-select:is(:hover, :focus):not(:disabled)) .nh-motion-art-selector .nh-motion-hover {
	opacity: 1;
}

.nh-property-media.nh-motion-select::after,
.nh-property-gallery .nh-gallery.nh-motion-select::before {
	display: none;
}

@media (width <= 1000px) {
	.nh-property-media > .nh-motion-selector {
		grid-column: 1;
		grid-row: 2;
		margin-left: min(298px, calc(100% - 187px));
		margin-bottom: 16.5px;
	}
}

@media (width <= 700px) {
	.nh-page-home .nh-hero-copy .nh-button-arrow,
	.nh-button-primary .nh-button-arrow {
		--nh-art-idle: url('r2/af552516d84402505082a3d3.svg');
		--nh-art-turn: 0deg;
		--nh-directional-idle: 0;
		--nh-directional-hover: 1;
		--nh-pressed-correction: 0deg;
	}

	.nh-home-property-consultation .nh-button-arrow {
		--nh-art-idle: url('r2/0800cdff7807109464911920.svg');
	}

	:is(.nh-home-admission-cta, .nh-company-admission-cta) .nh-button-arrow {
		--nh-art-idle: url('r2/4c67e79b40898fc8711f51f1.svg');
		--nh-art-turn: 0deg;
		--nh-directional-idle: 0;
		--nh-directional-hover: 1;
		--nh-pressed-correction: 0deg;
	}

	.nh-property-viewing .nh-button-arrow {
		--nh-art-idle: url('r2/ea12c74419fa5d2f50524850.svg');
	}

	.nh-home-property-link .nh-motion-arrow-detail {
		flex-basis: 14px;
		width: 14px;
		height: 14px;
	}

	.nh-motion-indicator,
	.nh-partner-vacancies .nh-motion-indicator {
		right: -24px;
	}

	.nh-property-media > .nh-motion-selector {
		justify-self: end;
		margin-left: 0;
		margin-right: 20px;
	}

	.nh-property-gallery .nh-gallery > .nh-motion-selector {
		display: block;
	}
}

.nh-motion-control:is(:disabled, [aria-disabled='true']) :is(.nh-motion-layer, .nh-motion-art-directional, .nh-motion-art-turning),
.nh-motion-control:has(.wpcf7-submit:disabled) :is(.nh-motion-layer, .nh-motion-art-directional, .nh-motion-art-turning),
.submitting .nh-motion-control :is(.nh-motion-layer, .nh-motion-art-directional, .nh-motion-art-turning) {
	transition: none;
}

.nh-motion-control:is(:disabled, [aria-disabled='true']) :is(.nh-motion-art-directional, .nh-motion-art-turning),
.nh-motion-control:has(.wpcf7-submit:disabled) .nh-motion-art-directional,
.submitting .nh-motion-control .nh-motion-art-directional {
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	:root {
		--nh-motion-state: 0ms;
		--nh-motion-press: 0ms;
		--nh-motion-arrow: 0ms;
		--nh-motion-image: 0ms;
		--nh-motion-open: 0ms;
		--nh-motion-close: 0ms;
	}

	:is(.nh-button, .nh-motion-control, .wp-block-button__link, .nh-text-button, .nh-menu-toggle,
	.nh-header-contact a, .nh-navigation a, .nh-navigation button, .nh-navigation summary, .nh-footer a, .nh-footer button,
	.nh-gallery-tabs button, .nh-gallery-select, [data-nh-property-select], .nh-enquiry-fields input,
	.nh-enquiry-consent input[type='checkbox'], .nh-enquiry-submit-label, .wpcf7-submit,
	.nh-vacancy-intro a[href], .nh-partner-mail-copy a[href], .nh-contact-card a[href],
	.nh-motion-layer, .nh-motion-art-directional, .nh-motion-art-turning, .nh-motion-selector),
	.nh-enquiry-fields input::placeholder,
	.nh-navigation summary::after,
	:is(.nh-header, .nh-vacancy-socials, .nh-floating-controls) .nh-social-link[data-network='max']::before,
	:is(.nh-header, .nh-vacancy-socials, .nh-floating-controls) .nh-social-link[data-network='max']::after,
	.nh-home-site-link img {
		transition: none;
	}

	.nh-home-site-link:is(:hover, :focus-visible) img {
		transform: none;
	}
}

@media (forced-colors: active) {
	.nh-motion-layer {
		forced-color-adjust: none;
	}

	.nh-motion-art-logo .nh-motion-layer,
	.nh-motion-art-strip .nh-motion-layer {
		background-image: none;
		background-color: buttontext;
		mask: var(--nh-art-idle) center / contain no-repeat;
	}

	.nh-motion-art-close .nh-motion-layer {
		background-image: none;
		background-color: buttontext;
		mask: url('ui-states/close-hover.svg') center / contain no-repeat;
	}

	.nh-motion-art-faq .nh-motion-layer {
		background-color: buttontext;
	}
}
