/*
 * The site promotion: the strip above the header and the banner under it. Colours come from the
 * promotion's settings through custom properties; the defaults are the child theme's orange
 * (#FF4500) and dark. The Elementor kit styles every h2, p and a globally, so the elements are
 * qualified with the block classes.
 */

/* ---------- Strip ---------- */
/*
 * Two ways to show the messages. Still (the default of this block, and what a visitor who asked for less
 * motion gets): one copy of the messages, centred, wrapping onto more lines on a narrow screen so none is
 * cut. Scrolling (--animated): the messages repeated in two identical groups on one line, the track moving
 * by one group, so there is no gap at the loop.
 */
.wedev-promo-strip {
	--wedev-promo-strip-bg: #ff4500;
	--wedev-promo-strip-ink: #000;
	display: block;
	box-sizing: border-box;
	overflow: hidden;
	padding: 10px 0;
	background: var(--wedev-promo-strip-bg);
	color: var(--wedev-promo-strip-ink);
	font-family: Montserrat, sans-serif;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.04em;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

.wedev-promo-strip:hover,
.wedev-promo-strip:focus-visible {
	color: var(--wedev-promo-strip-ink);
	text-decoration: none;
}

.wedev-promo-strip:focus-visible {
	outline: 2px solid var(--wedev-promo-strip-ink);
	outline-offset: -4px;
}

.wedev-promo-strip__track {
	display: flex;
	justify-content: center;
	width: 100%;
}

.wedev-promo-strip__group {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	min-width: 0;
	gap: 4px 0;
}

.wedev-promo-strip__item {
	padding: 0 14px;
}

/* A star between the messages, when they fit side by side. */
@media (min-width: 768px) {
	.wedev-promo-strip__item + .wedev-promo-strip__item::before {
		content: "\2605";
		margin-right: 28px;
	}
}

/* Scrolling: one line, never wrapped; every message is followed by a star. */
.wedev-promo-strip--animated .wedev-promo-strip__track {
	justify-content: flex-start;
	width: max-content;
	animation: wedev-promo-strip-scroll 45s linear infinite;
}

.wedev-promo-strip--animated .wedev-promo-strip__group {
	flex-wrap: nowrap;
	flex-shrink: 0;
}

.wedev-promo-strip--animated .wedev-promo-strip__item {
	white-space: nowrap;
}

.wedev-promo-strip--animated .wedev-promo-strip__item + .wedev-promo-strip__item::before {
	content: none;
	margin: 0;
}

.wedev-promo-strip--animated .wedev-promo-strip__item::after {
	content: "\2605";
	margin-left: 28px;
}

.wedev-promo-strip--animated:hover .wedev-promo-strip__track {
	animation-play-state: paused;
}

@keyframes wedev-promo-strip-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

/* Less motion: the scrolling strip becomes the still one, with a single copy of the messages. */
@media (prefers-reduced-motion: reduce) {
	.wedev-promo-strip--animated .wedev-promo-strip__track {
		justify-content: center;
		width: 100%;
		animation: none;
	}

	.wedev-promo-strip--animated .wedev-promo-strip__group {
		flex-wrap: wrap;
		flex-shrink: 1;
	}

	.wedev-promo-strip--animated .wedev-promo-strip__item {
		white-space: normal;
	}

	.wedev-promo-strip--animated .wedev-promo-strip__group[aria-hidden="true"],
	.wedev-promo-strip--animated .wedev-promo-strip__item--copy,
	.wedev-promo-strip--animated .wedev-promo-strip__item::after {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) and (min-width: 768px) {
	.wedev-promo-strip--animated .wedev-promo-strip__item + .wedev-promo-strip__item::before {
		content: "\2605";
		margin-right: 28px;
	}
}

/*
 * The strip sits inside the theme's header (#header-bar), above its dark top band, so the two move as one:
 * - Phones and tablets (up to 1024px): the header is fixed and slides away when scrolling down and back when
 *   scrolling up. The strip goes with it, and leaves with the first scroll (html.wedev-promo-scrolled, set
 *   by the script that follows the strip) so it does not come back every time the header does.
 * - Desktop: the header is sticky. The strip scrolls away and the header stays.
 * --wedev-promo-strip-h is the strip's height; the script keeps it right when the strip wraps onto more lines.
 */
:root {
	--wedev-promo-strip-h: 37px;
}

body.wedev-promo-strip-on #header-bar {
	display: flex;
	flex-direction: column;
}

body.wedev-promo-strip-on #header-bar .wedev-promo-strip {
	order: -1;
	flex-shrink: 0;
}

@media (min-width: 1025px) {
	body.wedev-promo-strip-on #header-bar.azemad-primary-header {
		top: calc(-1 * var(--wedev-promo-strip-h));
	}
}

@media (max-width: 1024px) {
	/* The theme makes room for the fixed header with 94px; the strip is on top of it. */
	body.wedev-promo-strip-on {
		padding-top: calc(94px + var(--wedev-promo-strip-h));
	}

	body.wedev-promo-strip-on #header-bar.azemad-primary-header {
		transition: transform 0.5s ease-out, top 0.5s ease-out;
	}

	html.wedev-promo-scrolled body.wedev-promo-strip-on #header-bar.azemad-primary-header {
		top: calc(-1 * var(--wedev-promo-strip-h));
	}
}

/* ---------- Banner ---------- */
.wedev-promo-banner {
	--wedev-promo-bg: #0d0d0d;
	--wedev-promo-accent: #ff4500;
	container-type: inline-size;
	position: relative;
	isolation: isolate;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 100%;
	overflow: hidden;
	background:
		radial-gradient(ellipse 45% 70% at 100% 0%, color-mix(in srgb, var(--wedev-promo-accent) 55%, transparent) 0%, transparent 70%),
		radial-gradient(ellipse 40% 60% at 0% 100%, color-mix(in srgb, var(--wedev-promo-accent) 30%, transparent) 0%, transparent 70%),
		var(--wedev-promo-bg);
	color: var(--wedev-promo-text, #fff);
	font-family: Montserrat, sans-serif;
}

.wedev-promo-banner *,
.wedev-promo-banner *::before,
.wedev-promo-banner *::after {
	box-sizing: border-box;
}

.wedev-promo-banner__picture {
	position: absolute;
	inset: 0;
	z-index: -2;
	display: block;
}

.wedev-promo-banner__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Keeps the text legible on any image. */
.wedev-promo-banner--image::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(13, 13, 13, 0.45);
}

.wedev-promo-banner__tape {
	position: relative;
	z-index: 1;
	overflow: hidden;
	padding: 0.55cqw 0;
	background: var(--wedev-promo-accent);
	color: var(--wedev-promo-tape-text, #000);
	font-size: clamp(11px, 1.3cqw, 16px);
	font-weight: 900;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	white-space: nowrap;
}

.wedev-promo-banner__content {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: clamp(14px, 2.4cqw, 40px);
	padding: clamp(28px, 5cqw, 90px) 24px;
	text-align: center;
}

.wedev-promo-banner__heading,
.wedev-promo-banner__offer {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.wedev-promo-banner .wedev-promo-banner__kicker {
	margin: 0 0 0.8cqw;
	color: var(--wedev-promo-text, #fff);
	font-size: clamp(13px, 1.6cqw, 24px);
	font-weight: 700;
	letter-spacing: 0.15em;
	line-height: 1.2;
	text-transform: uppercase;
}

.wedev-promo-banner .wedev-promo-banner__title {
	margin: 0;
	color: var(--wedev-promo-text, #fff);
	font-family: inherit;
	font-size: clamp(40px, 10.5cqw, 190px);
	font-weight: 900;
	letter-spacing: -0.01em;
	line-height: 0.92;
	text-transform: uppercase;
}

.wedev-promo-banner .wedev-promo-banner__button {
	display: inline-block;
	padding: 0.8cqw 2.4cqw;
	border-radius: 4px;
	background: var(--wedev-promo-accent);
	color: var(--wedev-promo-button-text, #000);
	font-size: clamp(13px, 1.7cqw, 28px);
	font-weight: 900;
	letter-spacing: 0.04em;
	line-height: 1.25;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.15s ease;
}

/*
 * The whole banner is clickable through a cover link (a sibling of the button, so hovering the empty part of the
 * banner does not count as hovering the button). The button sits above it and changes colour only under the pointer.
 */
.wedev-promo-banner__cover {
	position: absolute;
	inset: 0;
	z-index: 2;
}

.wedev-promo-banner a.wedev-promo-banner__button {
	position: relative;
	z-index: 3;
}

.wedev-promo-banner a.wedev-promo-banner__button:hover,
.wedev-promo-banner a.wedev-promo-banner__button:focus-visible {
	background: #fff;
	color: #000;
}

.wedev-promo-banner a.wedev-promo-banner__button:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

.wedev-promo-banner .wedev-promo-banner__note {
	margin: 1.2cqw 0 0;
	color: color-mix(in srgb, var(--wedev-promo-text, #fff) 90%, #000);
	font-size: clamp(11px, 1.1cqw, 17px);
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
}

/* The conditions link stays above the banner-wide link of the button. */
.wedev-promo-banner .wedev-promo-banner__conditions {
	position: relative;
	z-index: 3;
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	white-space: nowrap;
}

.wedev-promo-banner .wedev-promo-banner__conditions:hover,
.wedev-promo-banner .wedev-promo-banner__conditions:focus-visible {
	color: var(--wedev-promo-accent);
}

.wedev-promo-banner--home {
	min-height: clamp(320px, 38vw, 720px);
}

/* The shop's banner has no strip of repeated text below it, so it leaves its own space before the page. */
.wedev-promo-banner--shop {
	margin-bottom: 16px;
}

/* The shop's banner: lower, title and offer side by side. */
@media (min-width: 768px) {
	.wedev-promo-banner--shop {
		margin-bottom: 28px;
	}

	.wedev-promo-banner--shop .wedev-promo-banner__content {
		flex-direction: row;
		gap: 5cqw;
		padding: clamp(16px, 2.2cqw, 40px) clamp(24px, 8cqw, 160px);
	}

	.wedev-promo-banner--shop .wedev-promo-banner__heading {
		align-items: flex-end;
		text-align: right;
	}

	.wedev-promo-banner--shop .wedev-promo-banner__offer {
		align-items: flex-start;
		text-align: left;
	}

	.wedev-promo-banner--shop .wedev-promo-banner__title {
		font-size: clamp(28px, 4.5cqw, 84px);
		white-space: nowrap;
	}

	.wedev-promo-banner--shop .wedev-promo-banner__note {
		margin-top: 1cqw;
	}
}

/* Phones: the tape and the text are larger relative to the width. */
@media (max-width: 767px) {
	.wedev-promo-banner__tape {
		padding: 6px 0;
		font-size: 11px;
	}

	.wedev-promo-banner__content {
		gap: 16px;
		padding: 28px 16px;
	}

	.wedev-promo-banner .wedev-promo-banner__kicker {
		margin-bottom: 8px;
		font-size: 13px;
	}

	.wedev-promo-banner .wedev-promo-banner__title {
		font-size: clamp(40px, 17cqw, 96px);
	}

	.wedev-promo-banner--shop .wedev-promo-banner__title {
		font-size: clamp(36px, 13cqw, 72px);
	}

	.wedev-promo-banner .wedev-promo-banner__button {
		padding: 10px 18px;
		font-size: 14px;
	}

	.wedev-promo-banner .wedev-promo-banner__note {
		margin-top: 12px;
		font-size: 11px;
	}

	.wedev-promo-banner--home {
		min-height: 0;
	}
}
