/*
 * Softwash — interaction & motion layer.
 * Loaded on the front end only (not the editor), so entrance states never hide
 * content in the editor. Entrance hiding is gated behind `.swt-js` so the page
 * is fully visible if JavaScript is unavailable, and all motion is disabled
 * under prefers-reduced-motion.
 */

/* Smooth in-page anchor scrolling (hero CTAs jump to #services / #contact). */
html {
	scroll-behavior: smooth;
}

/* --- Layout: stack header / sections / footer flush (no blockGap strips) --- */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Subtle hairline dividers between stacked full-width sections for definition. */
.swt-divide {
	border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* Separate the (dark) header and footer from adjacent (dark) sections. */
.wp-site-blocks > header {
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wp-site-blocks > footer {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Brand: footer links are white, with a Signal Yellow hover. */
.wp-site-blocks > footer a {
	color: var(--wp--preset--color--white);
	background-image: none;
}

.wp-site-blocks > footer a:hover {
	color: var(--wp--preset--color--signal-yellow);
}

/* Hero: tall, vertically-centred, with a faint Signal Yellow glow from top-centre.
   Padding/height live here (not inline) so they can shrink on mobile. */
.swt-hero {
	min-height: clamp( 560px, 82vh, 900px );
	padding-block: var( --wp--preset--spacing--70 );
	background-image: radial-gradient( 120% 75% at 50% 0%, rgba( 218, 236, 12, 0.1 ), rgba( 218, 236, 12, 0 ) 60% );
}

/* Belt-and-braces: never let a full-bleed child cause horizontal page scroll. */
.wp-site-blocks {
	overflow-x: clip;
}

/* Shorter, tighter hero on phones. */
@media (max-width: 600px) {
	.swt-hero {
		min-height: 64vh;
		padding-block: var( --wp--preset--spacing--50 );
	}
}

/* Tablet & phone: keep the header on one line — hide the CTA button (still reachable
   in the menu) and cap the logo so logo + menu toggle always fit. !important beats the
   block-library `.wp-block-buttons { display:flex }` rule. */
@media (max-width: 781.98px) {
	.swt-header-cta {
		display: none !important;
	}

	.wp-site-blocks > header .wp-block-site-logo,
	.wp-site-blocks > header .wp-block-site-logo img {
		max-width: 150px;
	}
}

/* Trust bar / header top-strip: one cohesive line with thin dividers between items. */
.swt-trustbar > * {
	margin: 0;
	padding-inline: 1.25rem;
}

.swt-trustbar > * + * {
	border-inline-start: 1px solid rgba( 26, 29, 33, 0.28 );
}

@media (max-width: 600px) {
	.swt-trustbar > * + * {
		border-inline-start: 0;
	}
}

/* --- Premium dark surfaces & depth --- */
.swt-card {
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.swt-card:hover {
	border-color: rgba(218, 236, 12, 0.45);
}

/* Clickable affordances. */
a,
.wp-block-button__link,
.wp-block-navigation-item__content {
	cursor: pointer;
}

/* --- Hover micro-interactions (150–300ms, color shift + subtle lift) --- */
.wp-block-button__link {
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	will-change: transform;
}

.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(218, 236, 12, 0.28);
}

.wp-block-navigation-item__content {
	transition: color 0.2s ease, opacity 0.2s ease;
}

.wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--signal-yellow);
}

/* Cards (service / feature / product columns get .swt-card). */
.swt-card {
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.swt-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 18px 40px rgba(26, 29, 33, 0.22);
}

/* Image zoom-on-hover containers get .swt-zoom. */
.swt-zoom {
	overflow: hidden;
}

.swt-zoom img {
	transition: transform 0.4s ease;
	will-change: transform;
}

.swt-zoom:hover img {
	transform: scale(1.05);
}

/* Animated underline for inline links inside body copy. */
.wp-block-post-content a,
.swt-underline a {
	background-image: linear-gradient(var(--wp--preset--color--signal-yellow), var(--wp--preset--color--signal-yellow));
	background-size: 0% 2px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size 0.25s ease;
	text-decoration: none;
}

.wp-block-post-content a:hover,
.swt-underline a:hover {
	background-size: 100% 2px;
}

/* --- Entrance animations (gated by .swt-js, revealed by IntersectionObserver) --- */
.swt-js .swt-animate {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.swt-js .swt-animate.is-visible {
	opacity: 1;
	transform: none;
}

/* Stagger children of a .swt-stagger container as it enters. */
.swt-js .swt-stagger > * {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.55s ease, transform 0.55s ease;
}

.swt-js .swt-stagger.is-visible > * {
	opacity: 1;
	transform: none;
}

.swt-js .swt-stagger.is-visible > *:nth-child(2) { transition-delay: 0.08s; }
.swt-js .swt-stagger.is-visible > *:nth-child(3) { transition-delay: 0.16s; }
.swt-js .swt-stagger.is-visible > *:nth-child(4) { transition-delay: 0.24s; }

/* When GSAP drives the reveals, disable the CSS transitions so they don't fight it. */
.swt-gsap .swt-animate,
.swt-gsap .swt-stagger > * {
	transition: none !important;
}

/* --- Respect users who prefer reduced motion: kill all motion. --- */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.swt-js .swt-animate,
	.swt-js .swt-stagger > * {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}

	.wp-block-button__link,
	.swt-card,
	.swt-zoom img {
		transition: none !important;
	}

	.wp-block-button__link:hover,
	.swt-card:hover {
		transform: none !important;
	}

	.swt-zoom:hover img {
		transform: none !important;
	}
}
