/* MOSQUITO — static site styles (front end + editor). */

:root {
	--mq-yellow: var(--wp--preset--color--yellow, #FFD300);
	--mq-green: var(--wp--preset--color--green, #006547);
	--mq-red: var(--wp--preset--color--red, #E84211);
	--mq-base: var(--wp--preset--color--base, #151515);
	--mq-ease-out: cubic-bezier(.16, 1, .3, 1);
	--mq-ease-in-out: cubic-bezier(.65, 0, .35, 1);
	/* Docked label + thread geometry (shared with assets/js/sting.js). */
	--mq-dock-top: 20px;
	--mq-dock-h: 64px;
	--mq-thread: clamp(56px, 11vh, 112px);
}

@media (max-width: 600px) {
	:root {
		--mq-dock-top: 14px;
		--mq-dock-h: 52px;
	}
}

html {
	scroll-behavior: auto;
	-webkit-text-size-adjust: 100%;
}

body {
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

::selection {
	background: var(--mq-yellow);
	color: var(--mq-green);
}

:focus-visible {
	outline: 2px solid var(--mq-yellow);
	outline-offset: 3px;
}

.mq-onepage > * {
	margin-block: 0;
}

/* ---------- Sting button ---------- */

.wp-block-button.is-style-sting .wp-block-button__link {
	position: relative;
	isolation: isolate;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.95em 2.3em;
	overflow: hidden;
	background: var(--mq-green);
	color: var(--mq-yellow);
	border: 0;
	border-radius: 999px;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: clamp(14px, 5.6cqi, 22px);
	line-height: 1;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	transition: transform 0.35s var(--mq-ease-out), background-color 0.35s, color 0.35s;
}

/* No-JS hover: simple inversion. */
.wp-block-button.is-style-sting .wp-block-button__link:not(.is-enhanced):hover {
	background: var(--mq-yellow);
	color: var(--mq-green);
	box-shadow: inset 0 0 0 2px var(--mq-green);
}

/* Enhanced: the yellow "slit" of the logo opens from the centre and masks a
   green copy of the label, so the text inverts exactly where the fill is. */
.mq-sting__fill {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: inherit;
	background: var(--mq-yellow);
	color: var(--mq-green);
	border-radius: inherit;
	clip-path: inset(14% 50% 14% 50% round 999px);
	transition: clip-path 0.55s cubic-bezier(.7, 0, .2, 1);
	pointer-events: none;
}

.is-enhanced:hover .mq-sting__fill,
.is-enhanced:focus-visible .mq-sting__fill {
	clip-path: inset(0 0 0 0 round 999px);
}

.wp-block-button.is-style-sting .wp-block-button__link:active {
	transform: scale(0.97);
}

/* On the yellow label a yellow focus ring would vanish. */
.mq-label .wp-block-button.is-style-sting .wp-block-button__link:focus-visible {
	outline: 2px solid var(--mq-base);
	outline-offset: 4px;
}

/* ---------- Order section ---------- */

.mq-order {
	--r-title: clamp(0, calc((var(--mq-p, 1) - 0.52) * 3.4), 1);
	--r-kicker: clamp(0, calc((var(--mq-p, 1) - 0.6) * 3.4), 1);
	--r-form: clamp(0, calc((var(--mq-p, 1) - 0.66) * 3.4), 1);
	--r-thread: clamp(0, calc((var(--mq-p, 1) - 0.6) / 0.32), 1);
	position: relative;
	z-index: 1;
	padding-top: calc(var(--mq-dock-top) + var(--mq-dock-h) + 10px + var(--mq-thread) + 28px);
	padding-bottom: clamp(4rem, 10vw, 7.5rem);
	padding-left: 16px;
	padding-right: 16px;
}

/* The thread: the stinger's axis continues from the docked label into the order. */
.mq-order::before {
	content: "";
	position: absolute;
	left: 50%;
	top: calc(var(--mq-dock-top) + var(--mq-dock-h) + 10px);
	width: 1px;
	height: var(--mq-thread);
	margin-left: -0.5px;
	background: linear-gradient(to bottom, var(--mq-yellow), rgba(255, 211, 0, 0.15));
	transform-origin: 50% 0;
	transform: scaleY(var(--r-thread));
}

.mq-order__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--display);
	font-weight: 600;
	letter-spacing: 0.005em;
	color: var(--wp--preset--color--contrast);
	opacity: var(--r-title);
	transform: translateY(calc((1 - var(--r-title)) * 28px));
}

.mq-order__title:focus {
	outline: none;
}

.mq-order__kicker {
	margin-top: 0.85rem !important;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 500;
	font-size: clamp(0.95rem, 0.8rem + 0.6vw, 1.2rem);
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--mq-yellow);
	opacity: var(--r-kicker);
	transform: translateY(calc((1 - var(--r-kicker)) * 20px));
}

.mq-order .wp-block-fluentfom-guten-block,
.mq-order .fluentform,
.mq-order .mq-form {
	margin-top: clamp(2.25rem, 5vw, 3.5rem) !important;
	opacity: var(--r-form);
	transform: translateY(calc((1 - var(--r-form)) * 36px));
}

/* ---------- Footer ---------- */

.mq-footer {
	position: relative;
	z-index: 1;
	gap: 0.35rem 1.6rem !important;
	padding: 2.25rem 16px calc(2.25rem + env(safe-area-inset-bottom));
	border-top: 1px solid rgba(255, 255, 255, 0.07);
	font-size: 0.8125rem;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--muted);
	text-align: center;
}

.mq-footer p {
	margin: 0;
}

.mq-footer a {
	color: inherit;
	text-decoration: none;
	background: linear-gradient(var(--mq-yellow), var(--mq-yellow)) 0 100% / 0 1px no-repeat;
	transition: color 0.3s, background-size 0.45s var(--mq-ease-out);
}

.mq-footer a:hover,
.mq-footer a:focus-visible {
	color: var(--mq-yellow);
	background-size: 100% 1px;
}

/* ---------- Inner pages ---------- */

.mq-header {
	padding: 28px 16px 0;
}

.mq-page {
	padding-top: clamp(2rem, 6vw, 4rem);
	padding-bottom: clamp(3rem, 8vw, 6rem);
}

.mq-page .wp-block-post-title {
	font-size: clamp(2.25rem, 1.5rem + 3vw, 4rem);
}

/* ---------- Utilities ---------- */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.mq-order__title,
	.mq-order__kicker,
	.mq-order .wp-block-fluentfom-guten-block,
	.mq-order .fluentform,
	.mq-order .mq-form {
		opacity: 1;
		transform: none;
	}

	.mq-order::before {
		transform: none;
	}

	.mq-sting__fill {
		transition-duration: 0.01s;
	}
}
