/*
 * WP Custom Layout 2.5.0, Motion & SVG (includes/motion.php). Loaded only where motion is switched on.
 * Colours come from --wpcl-motion-* variables printed by the module. Every animation stops under
 * prefers-reduced-motion, and footer animations run only while the footer is on screen (.is-playing).
 */

/* ---------- Header: glass on scroll ---------- */
.wpcl-motion-glass .wpcl-header-shell {
	transition: background-color .35s ease, box-shadow .35s ease, border-color .35s ease, backdrop-filter .35s ease;
	border-bottom: 1px solid transparent;
}
.wpcl-motion-glass.wpcl-is-scrolled .wpcl-header-shell {
	background: color-mix(in srgb, var(--wpcl-motion-glass) 72%, transparent) !important;
	-webkit-backdrop-filter: blur(18px) saturate(140%);
	backdrop-filter: blur(18px) saturate(140%);
	border-bottom-color: rgb(255 255 255 / .08);
	box-shadow: 0 12px 40px -18px rgb(0 0 0 / .7) !important;
}

/* Scroll progress: a thin accent line along the bottom of the header. */
.wpcl-motion .wpcl-motion-progress {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	transform-origin: 0 50%;
	transform: scaleX(var(--wpcl-motion-progress, 0));
	background: linear-gradient(90deg, var(--wpcl-motion-accent), var(--wpcl-motion-accent-2));
	box-shadow: 0 0 12px color-mix(in srgb, var(--wpcl-motion-accent) 60%, transparent);
	pointer-events: none;
}

/* ---------- Header: brand ---------- */
.wpcl-motion-brand .wpcl-brand-name { color: var(--wpcl-motion-brand) !important; letter-spacing: -0.01em; }
.wpcl-logo-svg { overflow: visible; }
.wpcl-logo-svg svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* Inline SVG logo animation hooks. A site's SVG opts in with these classes. */
.wpcl-motion-logo .wpcl-motion-draw {
	stroke-dasharray: 1;
	stroke-dashoffset: 1;
	animation: wpcl-motion-draw 1.6s cubic-bezier(.65, 0, .35, 1) .2s forwards;
}
.wpcl-motion-logo .wpcl-motion-fade { opacity: 0; animation: wpcl-motion-fade .8s ease .9s forwards; }
.wpcl-motion-logo .wpcl-motion-shimmer { animation: wpcl-motion-shimmer 7s ease-in-out 2.4s infinite; }
.wpcl-motion-logo .wpcl-motion-turn { transform-box: fill-box; transform-origin: center; animation: wpcl-motion-turn 9s ease-in-out infinite; }
.wpcl-motion-logo .wpcl-brand:hover .wpcl-motion-shimmer { animation-duration: 1.6s; }
@keyframes wpcl-motion-draw { to { stroke-dashoffset: 0; } }
@keyframes wpcl-motion-fade { to { opacity: 1; } }
@keyframes wpcl-motion-shimmer { 0%, 70% { transform: translateX(-160%); } 100% { transform: translateX(160%); } }
@keyframes wpcl-motion-turn { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.18); } }

/* ---------- Header: menu and button ---------- */
.wpcl-motion-nav .wpcl-nav-list > li > a { position: relative; }
.wpcl-motion-nav .wpcl-nav-list > li > a::after {
	content: "";
	position: absolute;
	left: 50%;
	right: 50%;
	bottom: 2px;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--wpcl-motion-accent), var(--wpcl-motion-accent-2));
	opacity: 0;
	transition: left .35s cubic-bezier(.22, 1, .36, 1), right .35s cubic-bezier(.22, 1, .36, 1), opacity .2s;
}
.wpcl-motion-nav .wpcl-nav-list > li > a:hover::after,
.wpcl-motion-nav .wpcl-nav-list > li > a:focus-visible::after,
.wpcl-motion-nav .wpcl-nav-list > li.current-menu-item > a::after,
.wpcl-motion-nav .wpcl-nav-list > li.current-menu-ancestor > a::after { left: 12%; right: 12%; opacity: 1; }

.wpcl-motion-nav .wpcl-desktop-cta { position: relative; overflow: hidden; isolation: isolate; }
.wpcl-motion-nav .wpcl-desktop-cta::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(105deg, transparent 30%, rgb(255 255 255 / .28) 50%, transparent 70%);
	transform: translateX(-120%);
	animation: wpcl-motion-sheen 6s ease-in-out 3s infinite;
}
.wpcl-motion-nav .wpcl-desktop-cta:hover::before { animation-duration: 1.2s; }
@keyframes wpcl-motion-sheen { 0%, 75% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* ---------- Header: mega menu ----------
   Two columns of links with optional descriptions (WordPress menu item descriptions, 2.5.2). Below the
   site's mobile breakpoint an inline rule from includes/motion.php turns it back into a plain list. */
.wpcl-motion-mega .wpcl-nav-list > li > .sub-menu {
	display: grid;
	grid-template-columns: repeat(2, minmax(250px, 1fr));
	gap: 4px;
	width: min(640px, 92vw);
	padding: 12px;
	border-radius: 20px;
	border-color: rgb(255 255 255 / .1);
	background: color-mix(in srgb, var(--wpcl-dropdown-bg) 90%, transparent);
	-webkit-backdrop-filter: blur(20px) saturate(140%);
	backdrop-filter: blur(20px) saturate(140%);
	box-shadow: 0 30px 80px -24px rgb(0 0 0 / .8), inset 0 1px 0 rgb(255 255 255 / .06);
	visibility: hidden;
	opacity: 0;
	transform: translateY(8px) scale(.98);
	transform-origin: 20% 0;
	transition: opacity .25s ease, transform .35s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .35s;
}
.wpcl-motion-mega .wpcl-nav-list > li:hover > .sub-menu,
.wpcl-motion-mega .wpcl-nav-list > li:focus-within > .sub-menu,
.wpcl-motion-mega .wpcl-nav-list > li.wpcl-submenu-open > .sub-menu {
	visibility: visible;
	opacity: 1;
	transform: none;
	transition-delay: 0s;
}
.wpcl-motion-mega .wpcl-nav-list .sub-menu > li > a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 12px;
	color: var(--wpcl-dropdown-text);
	transition: background-color .2s, transform .25s cubic-bezier(.22, 1, .36, 1);
}
.wpcl-motion-mega .wpcl-nav-list .sub-menu > li > a:hover,
.wpcl-motion-mega .wpcl-nav-list .sub-menu > li > a:focus-visible { background: color-mix(in srgb, var(--wpcl-dropdown-text) 7%, transparent); transform: translateX(2px); }
/* An item with a description: icon on the left, title over description. */
.wpcl-motion-mega .wpcl-nav-list .sub-menu > li > a:has(.wpcl-menu-desc) { display: grid; grid-template-columns: auto 1fr; align-items: start; column-gap: 12px; row-gap: 2px; line-height: 1.3; }
.wpcl-motion-mega .wpcl-nav-list .sub-menu > li > a:has(.wpcl-menu-desc)::before { grid-row: span 2; margin-top: 1px; }
.wpcl-motion-mega .wpcl-menu-desc { display: block; grid-column: 2; font-size: .8em; font-weight: 400; opacity: .68; letter-spacing: 0; text-transform: none; white-space: normal; }

/* Menu icons: a gradient glyph drawn through a CSS mask per icon name, so no SVG passes through the
   menu's HTML filter. */
.wpcl-motion-mega .sub-menu .wpcl-icon > a::before {
	content: "";
	flex: none;
	width: 22px;
	height: 22px;
	background: linear-gradient(135deg, var(--wpcl-motion-accent), var(--wpcl-motion-accent-2));
	-webkit-mask: var(--wpcl-icon) center / 20px 20px no-repeat;
	mask: var(--wpcl-icon) center / 20px 20px no-repeat;
	transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}
.wpcl-motion-mega .sub-menu .wpcl-icon > a:hover::before { transform: rotate(-8deg) scale(1.12); }
.wpcl-motion-mega .sub-menu .wpcl-icon > a { gap: 12px; }
.wpcl-icon-app { --wpcl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 9h18M9 9v11'/%3E%3C/svg%3E"); }
.wpcl-icon-window { --wpcl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 8h18'/%3E%3C/svg%3E"); }
.wpcl-icon-link { --wpcl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1'/%3E%3Cpath d='M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1'/%3E%3C/svg%3E"); }
.wpcl-icon-cloud { --wpcl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18a4 4 0 0 1-.5-8 6 6 0 0 1 11.5 1.5A3.5 3.5 0 0 1 17.5 18z'/%3E%3C/svg%3E"); }
.wpcl-icon-compass { --wpcl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m15.5 8.5-2 5-5 2 2-5z'/%3E%3C/svg%3E"); }
.wpcl-icon-shield { --wpcl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E"); }
.wpcl-icon-chart { --wpcl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3C/svg%3E"); }
.wpcl-icon-rocket { --wpcl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 15c-2 2-2 5-2 5s3 0 5-2'/%3E%3Cpath d='M14 4c3-1 5 1 6 4-1 4-4 8-8 10l-4-4C10 10 12 6 14 4z'/%3E%3Ccircle cx='15' cy='9' r='1.5'/%3E%3C/svg%3E"); }
.wpcl-icon-spark { --wpcl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v4M12 17v4M3 12h4M17 12h4M6 6l2.5 2.5M15.5 15.5 18 18M6 18l2.5-2.5M15.5 8.5 18 6'/%3E%3C/svg%3E"); }

/* ---------- Footer: network scene ---------- */
.wpcl-motion-network {
	position: relative;
	width: min(1200px, 100%);
	margin: 0 auto clamp(40px, 6vw, 72px);
	aspect-ratio: 5 / 1;
}
.wpcl-motion-network > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wpcl-motion-stop-1 { stop-color: var(--wpcl-motion-accent); }
.wpcl-motion-stop-2 { stop-color: var(--wpcl-motion-accent-2); }
.wpcl-motion-network__link { fill: none; stroke: rgb(255 255 255 / .1); stroke-width: 1.2; }
.wpcl-motion-network__flow { fill: none; stroke: url(#wpcl-motion-flow); stroke-width: 2; stroke-linecap: round; stroke-dasharray: .08 .92; stroke-dashoffset: 1; animation: wpcl-motion-flow 3.4s cubic-bezier(.45, 0, .55, 1) infinite; animation-play-state: paused; }
.wpcl-motion-network__dot { fill: var(--wpcl-motion-accent); transform-box: fill-box; transform-origin: center; animation: wpcl-motion-dot 3.4s ease-in-out infinite; animation-play-state: paused; }
.wpcl-motion-network__core { fill: color-mix(in srgb, var(--wpcl-motion-brand, var(--wpcl-motion-accent-2)) 30%, #000); stroke: var(--wpcl-motion-accent); stroke-width: 1.5; }
.wpcl-motion-network__pulse { fill: none; stroke: var(--wpcl-motion-accent); transform-box: fill-box; transform-origin: center; animation: wpcl-motion-pulse 3.4s ease-out infinite; animation-play-state: paused; }
.wpcl-motion-network.is-playing :is(.wpcl-motion-network__flow, .wpcl-motion-network__dot, .wpcl-motion-network__pulse) { animation-play-state: running; }
.wpcl-motion-delay-1 { animation-delay: .55s !important; }
.wpcl-motion-delay-2 { animation-delay: 1.1s !important; }
.wpcl-motion-delay-3 { animation-delay: 1.65s !important; }
.wpcl-motion-delay-4 { animation-delay: 2.2s !important; }
.wpcl-motion-delay-5 { animation-delay: 2.75s !important; }
@keyframes wpcl-motion-flow { to { stroke-dashoffset: 0; } }
@keyframes wpcl-motion-dot { 0%, 100% { transform: scale(1); opacity: .75; } 50% { transform: scale(1.6); opacity: 1; } }
@keyframes wpcl-motion-pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.2); opacity: 0; } }

.wpcl-motion-network__labels { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.wpcl-motion-network__labels li { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, calc(-50% - 30px)); text-align: center; white-space: nowrap; font-size: .9rem; font-weight: 600; }
.wpcl-motion-network__labels li:not(.wpcl-motion-network__center) > :is(a, span) { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 12px; border-radius: 999px; color: inherit; text-decoration: none; background: rgb(255 255 255 / .03); border: 1px solid rgb(255 255 255 / .08); transition: border-color .25s, background-color .25s, color .25s; }
.wpcl-motion-network__labels a:hover, .wpcl-motion-network__labels a:focus-visible { border-color: color-mix(in srgb, var(--wpcl-motion-accent) 60%, transparent); background: color-mix(in srgb, var(--wpcl-motion-accent) 10%, transparent); color: var(--wpcl-motion-accent); }
.wpcl-motion-network__labels small { font-size: .68rem; font-weight: 500; opacity: .7; letter-spacing: .02em; }
/* The centre: the brand name under the core, or (2.5.2) the site's logo on the core with the name below. */
.wpcl-motion-network__labels li.wpcl-motion-network__center { display: flex; flex-direction: column; align-items: center; gap: 10px; transform: translate(-50%, calc(-50% + 56px)); pointer-events: none; }
.wpcl-motion-network__brand { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--wpcl-motion-brand, inherit); }
.wpcl-motion-network.has-logo li.wpcl-motion-network__center { transform: translate(-50%, -37px); }
.wpcl-motion-network__logo { display: block; width: 50px; height: 74px; filter: drop-shadow(0 8px 18px rgb(0 0 0 / .55)); }
.wpcl-motion-network__logo svg { display: block; width: 100%; height: 100%; }
.wpcl-motion-network.has-logo .wpcl-motion-network__core { fill: color-mix(in srgb, var(--wpcl-motion-accent) 6%, transparent); stroke-opacity: .55; }
@media (max-width: 760px) {
	.wpcl-motion-network { aspect-ratio: auto; }
	.wpcl-motion-network > svg { display: none; }
	.wpcl-motion-network__labels { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.wpcl-motion-network__labels li, .wpcl-motion-network__labels li.wpcl-motion-network__center, .wpcl-motion-network.has-logo li.wpcl-motion-network__center { position: static; transform: none; white-space: normal; }
	.wpcl-motion-network__labels li.wpcl-motion-network__center { grid-column: 1 / -1; flex-direction: row; justify-content: center; margin-bottom: 6px; }
	.wpcl-motion-network__labels li:not(.wpcl-motion-network__center) > :is(a, span) { display: flex; width: 100%; height: 100%; justify-content: center; border-radius: 14px; padding: 10px 12px; }
	.wpcl-motion-network__logo { width: 38px; height: 56px; }
}

/* ---------- Footer: wordmark ---------- */
/* 2.5.3: the outline is the #wpcl-motion-outline SVG filter round the filled letters (in the footer's text
   colour), so a variable font's overlapping glyph parts never show; the sweep is an unfiltered copy on top. */
.wpcl-motion-wordmark {
	position: relative;
	margin: clamp(32px, 5vw, 64px) auto 0;
	width: min(var(--wpcl-footer-max-width, 1200px), 100%);
	font-size: clamp(3.5rem, 15vw, 13rem);
	font-weight: 800;
	line-height: .82;
	letter-spacing: -0.06em;
	text-align: center;
	user-select: none;
}
.wpcl-motion-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.wpcl-motion-wordmark__outline { display: block; color: var(--wpcl-text, #fff); filter: url(#wpcl-motion-outline); opacity: .22; }
.wpcl-motion-wordmark::after {
	content: attr(data-text);
	position: absolute;
	inset: 0;
	color: transparent;
	background: linear-gradient(100deg, transparent 0%, transparent 35%, var(--wpcl-motion-accent) 48%, var(--wpcl-motion-accent-2) 56%, transparent 70%, transparent 100%) 120% 0 / 250% 100% no-repeat;
	-webkit-background-clip: text;
	background-clip: text;
	animation: wpcl-motion-sweep 9s ease-in-out infinite;
	animation-play-state: paused;
	opacity: .9;
}
.wpcl-motion-wordmark.is-playing::after { animation-play-state: running; }
@keyframes wpcl-motion-sweep { 0% { background-position: 120% 0; } 60%, 100% { background-position: -20% 0; } }

@media (prefers-reduced-motion: reduce) {
	.wpcl-motion *, .wpcl-motion *::before, .wpcl-motion *::after, .wpcl-motion-network *, .wpcl-motion-wordmark, .wpcl-motion-wordmark::after { animation: none !important; transition: none !important; }
	.wpcl-motion-logo .wpcl-motion-draw { stroke-dashoffset: 0; }
	.wpcl-motion-logo .wpcl-motion-fade { opacity: 1; }
	.wpcl-motion-network__flow { display: none; }
}
