/**
 * Manager-directed card interaction layer.
 *
 * This sheet intentionally loads after every route stylesheet. It transfers
 * visual emphasis from hard-coded featured cards to the card a visitor is
 * exploring, while preserving the existing geometry and content ownership.
 * Informational cards remain informational; only real links enter the tab order.
 */

/* Every project card surface uses one calm, consistent transition language. */
body :is(
	.nrs-home-product-card,
	.nrs-home-advantage-card,
	.nrs-home-quality-card,
	.nrs-home-recommendations__featured,
	.nrs-home-recommendation-card,
	.nrs-contact-direct-card,
	.nrs-about-services-card,
	.nrs-services-capability,
	.nrs-ita-implementation-card,
	.nrs-ita-capability-card,
	.nrs-ce-mdr-standard-card,
	.nrs-ce-mdr-benefit-card,
	.nrs-qms-card,
	.nrs-clinical-result-card,
	.nrs-eeg3840-application-card,
	.nrs-eeg5000q-application-card,
	.nrs-eeg-portable-3840-application-card,
	.nrs-emg-nirs-wearable-device-application-card,
	.nrs-sca-wearable-warch-application-card,
	.nrs-eeg-accessories-product-card,
	.nrs-eeg-accessories-electrode-card,
	.nrs-eeg-accessories-material-card,
	.nrs-eeg-accessories-benefit-card,
	.nrs-emg-accessories-product-card,
	.nrs-emg-accessories-electrode-card,
	.nrs-emg-accessories-material-card,
	.nrs-emg-accessories-benefit-card,
	.nrs-information-related-card,
	.nrs-home-certification-card
) {
	transition-duration: var(--nrs-card-interaction-duration);
	transition-property: background, border-color, box-shadow, color, opacity, transform;
	transition-timing-function: var(--nrs-card-interaction-easing);
}

/* A stored "featured" flag may still control editorial order, but not a frozen visual state. */
body .nrs-home-product-card.nrs-home-product-card--featured {
	background: var(--nrs-card-surface-rest);
}

body .nrs-home-product-card--featured h3.nrs-home-product-card__title {
	color: var(--base-colour-black);
}

body .nrs-home-product-card--featured .nrs-product-category-card__media {
	background: rgba(246, 249, 250, 0.78);
}

/* Remove the permanently solid middle card from every staggered highlight group. */
body .nrs-home-advantage-card--support {
	background: rgba(255, 255, 255, 0.24);
}

body :is(
	.nrs-services-capability--manufacturing,
	.nrs-ita-implementation-card--development,
	.nrs-ce-mdr-standard-card--risk
) {
	background: var(--nrs-card-glass-rest);
}

body :is(
	.nrs-eeg3840-application-card--solid,
	.nrs-eeg5000q-application-card--solid,
	.nrs-eeg-portable-3840-application-card--solid
) {
	background: rgba(255, 255, 255, 0.5);
	box-shadow: inset 0 0 0 1px rgb(255, 255, 255);
}

/* Real linked cards expose the same emphasis to keyboard users. */
body .nrs-home-product-card:focus-within {
	border-color: rgba(31, 93, 141, 0.24);
	background: var(--nrs-card-product-hover);
	box-shadow: var(--nrs-card-interaction-shadow);
}

body .nrs-home-product-card:focus-within h3.nrs-home-product-card__title {
	color: var(--primary-700);
}

body .nrs-home-product-card:focus-within .nrs-product-category-card__media {
	background: rgba(255, 255, 255, 0.72);
}

body :is(
	a.nrs-eeg-accessories-product-card,
	a.nrs-eeg-accessories-electrode-card,
	a.nrs-eeg-accessories-material-card,
	a.nrs-emg-accessories-product-card,
	a.nrs-emg-accessories-electrode-card,
	a.nrs-emg-accessories-material-card,
	a.nrs-information-related-card,
	a.nrs-home-certification-card
):focus-visible {
	outline: 3px solid var(--nrs-card-focus-ring);
	outline-offset: 4px;
	background: var(--nrs-card-surface-hover);
	box-shadow: var(--nrs-card-interaction-shadow);
}

@media (hover: hover) and (pointer: fine) {
	/* Product emphasis follows the pointer across Home, archives, and Related grids. */
	body .nrs-home-product-card:hover {
		border-color: rgba(31, 93, 141, 0.24);
		background: var(--nrs-card-product-hover);
		box-shadow: var(--nrs-card-interaction-shadow);
		transform: translateY(-6px);
	}

	body .nrs-home-product-card:hover h3.nrs-home-product-card__title {
		color: var(--primary-700);
	}

	body .nrs-home-product-card:hover .nrs-product-category-card__media {
		background: rgba(255, 255, 255, 0.72);
	}

	/* Staggered glass groups retain their layout, but the active surface becomes solid. */
	body :is(
		.nrs-home-advantage-card,
		.nrs-services-capability,
		.nrs-ita-implementation-card,
		.nrs-ce-mdr-standard-card
	):hover {
		background: var(--nrs-card-glass-hover);
		box-shadow: var(--nrs-card-interaction-shadow);
		transform: translateY(-6px);
	}

	/* The remaining information-card families receive a quieter lift and tint. */
	body :is(
		.nrs-home-quality-card,
		.nrs-home-recommendations__featured,
		.nrs-home-recommendation-card,
		.nrs-contact-direct-card,
		.nrs-about-services-card,
		.nrs-ita-capability-card,
		.nrs-ce-mdr-benefit-card,
		.nrs-qms-card,
		.nrs-clinical-result-card,
		.nrs-eeg-accessories-benefit-card,
		.nrs-emg-accessories-benefit-card
	):hover {
		background: var(--nrs-card-surface-hover);
		box-shadow: var(--nrs-card-interaction-shadow);
		transform: translateY(-5px);
	}

	/* Application lists use the same transferred white emphasis as the glass trios. */
	body :is(
		.nrs-eeg3840-application-card,
		.nrs-eeg5000q-application-card,
		.nrs-eeg-portable-3840-application-card,
		.nrs-emg-nirs-wearable-device-application-card,
		.nrs-sca-wearable-warch-application-card
	):hover {
		background: rgb(255, 255, 255);
		box-shadow: 0 16px 36px rgba(30, 64, 92, 0.13), inset 0 0 0 1px rgba(31, 93, 141, 0.10);
		transform: translateY(-4px);
	}

	/* Linked accessory, information, and certification cards get stronger affordance. */
	body :is(
		a.nrs-eeg-accessories-product-card,
		a.nrs-eeg-accessories-electrode-card,
		a.nrs-eeg-accessories-material-card,
		a.nrs-emg-accessories-product-card,
		a.nrs-emg-accessories-electrode-card,
		a.nrs-emg-accessories-material-card,
		a.nrs-information-related-card,
		a.nrs-home-certification-card
	):hover {
		border-color: rgba(31, 93, 141, 0.20);
		background: var(--nrs-card-surface-hover);
		box-shadow: var(--nrs-card-interaction-shadow);
		color: inherit;
		text-decoration: none;
		transform: translateY(-5px);
	}
}

@media (max-width: 600px) {
	body .nrs-home-advantage-card--support {
		background: rgb(246, 249, 250);
	}
}

/* Product brochure cards retain their Figma appearance while reflecting real transfer state. */
body [data-nrs-download-progress] > span {
	width: var(--nrs-download-progress, 0%);
	transition: width 180ms linear;
}

body [data-nrs-download-progress].is-indeterminate {
	overflow: hidden;
}

body [data-nrs-download-progress].is-indeterminate > span {
	width: 34%;
	animation: nrs-download-indeterminate 1.1s ease-in-out infinite;
}

body [data-nrs-download].is-downloading [data-nrs-download-trigger] {
	cursor: wait;
	opacity: 0.76;
}

body .nrs-product-details--no-download [class$="-details__nav-track"] {
	width: 401px;
	max-width: 100%;
}

@keyframes nrs-download-indeterminate {
	0% {
		transform: translateX(-120%);
	}
	100% {
		transform: translateX(320%);
	}
}

@media (prefers-reduced-motion: reduce) {
	body [data-nrs-download-progress] > span {
		transition: none;
	}

	body [data-nrs-download-progress].is-indeterminate > span {
		animation: none;
		transform: none;
	}

	body :is(
		.nrs-home-product-card,
		.nrs-home-advantage-card,
		.nrs-home-quality-card,
		.nrs-home-recommendations__featured,
		.nrs-home-recommendation-card,
		.nrs-contact-direct-card,
		.nrs-about-services-card,
		.nrs-services-capability,
		.nrs-ita-implementation-card,
		.nrs-ita-capability-card,
		.nrs-ce-mdr-standard-card,
		.nrs-ce-mdr-benefit-card,
		.nrs-qms-card,
		.nrs-clinical-result-card,
		[class*="-application-card"],
		.nrs-eeg-accessories-product-card,
		.nrs-eeg-accessories-electrode-card,
		.nrs-eeg-accessories-material-card,
		.nrs-eeg-accessories-benefit-card,
		.nrs-emg-accessories-product-card,
		.nrs-emg-accessories-electrode-card,
		.nrs-emg-accessories-material-card,
		.nrs-emg-accessories-benefit-card,
		.nrs-information-related-card,
		.nrs-home-certification-card
	) {
		transition-duration: 0.01ms;
	}

	body :is(
		.nrs-home-product-card,
		.nrs-home-advantage-card,
		.nrs-home-quality-card,
		.nrs-home-recommendations__featured,
		.nrs-home-recommendation-card,
		.nrs-contact-direct-card,
		.nrs-about-services-card,
		.nrs-services-capability,
		.nrs-ita-implementation-card,
		.nrs-ita-capability-card,
		.nrs-ce-mdr-standard-card,
		.nrs-ce-mdr-benefit-card,
		.nrs-qms-card,
		.nrs-clinical-result-card,
		[class*="-application-card"],
		.nrs-eeg-accessories-product-card,
		.nrs-eeg-accessories-electrode-card,
		.nrs-eeg-accessories-material-card,
		.nrs-eeg-accessories-benefit-card,
		.nrs-emg-accessories-product-card,
		.nrs-emg-accessories-electrode-card,
		.nrs-emg-accessories-material-card,
		.nrs-emg-accessories-benefit-card,
		.nrs-information-related-card,
		.nrs-home-certification-card
	):hover {
		transform: none !important;
	}
}
