/* Shared brand mark styling - used in the header, the footer and standalone. */

/* box-sizing:border-box was missing everywhere in this plugin. Without it,
   any element combining padding with a width/max-width renders LARGER than
   intended, since padding adds on top instead of being included within
   that width. Confirmed on the footer: max-width:1280px + 40px padding on
   each side rendered at 1360px, not 1280px. Applied broadly here (loaded
   on every page via the same proven enqueue_block_assets hook) rather than
   auditing every individual selector for this same latent bug. */
[class*="ims-"],
[class*="ims-"]::before,
[class*="ims-"]::after {
	box-sizing: border-box;
}

.ims-brand-mark {
	display: inline-flex;
	align-items: flex-start;
	gap: 6px;
	text-decoration: none;
}

.ims-brand-mark .ims-brand-mark__dots {
	display: flex;
	gap: 5px;
	flex-shrink: 0;
}

.ims-brand-mark .ims-brand-mark__dots span {
	display: block;
	border-radius: 3px;
}

/* Brand colours, left to right */
.ims-brand-mark .ims-brand-mark__dots span:nth-child(1) {
	background: #43a047;
}

.ims-brand-mark .ims-brand-mark__dots span:nth-child(2) {
	background: #fb5b3f;
}

.ims-brand-mark .ims-brand-mark__dots span:nth-child(3) {
	background: #4a90e2;
}

.ims-brand-mark .ims-brand-mark__words {
	display: flex;
	flex-direction: column;
	line-height: 1;
}

.ims-brand-mark .ims-brand-mark__name {
	font-family: 'Montserrat', -apple-system, sans-serif;
	font-weight: 800;
	color: #ffffff;
	line-height: 1;
}

.ims-brand-mark .ims-brand-mark__tagline {
	font-family: 'Montserrat', -apple-system, sans-serif;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.6);
}

/* Sizes. The dot offset keeps the squares optically centred on the
   wordmark rather than on the whole two-line block. */
.ims-brand-mark.size-small .ims-brand-mark__dots span {
	width: 8px;
	height: 8px;
	border-radius: 2px;
}
.ims-brand-mark.size-small .ims-brand-mark__dots {
	margin-top: 3px;
}
.ims-brand-mark.size-small .ims-brand-mark__name {
	font-size: 18px;
}
.ims-brand-mark.size-small .ims-brand-mark__tagline {
	font-size: 7px;
	margin-top: 2px;
}

.ims-brand-mark.size-medium .ims-brand-mark__dots span {
	width: 15px;
	height: 15px;
}
.ims-brand-mark.size-medium .ims-brand-mark__dots {
	margin-top: 3.5px;
}
.ims-brand-mark.size-medium .ims-brand-mark__name {
	font-size: 23px;
}
.ims-brand-mark.size-medium .ims-brand-mark__tagline {
	font-size: 8.5px;
	margin-top: 3px;
}

.ims-brand-mark.size-large .ims-brand-mark__dots span {
	width: 18px;
	height: 18px;
	border-radius: 5px;
}
.ims-brand-mark.size-large .ims-brand-mark__dots {
	margin-top: 7px;
}
.ims-brand-mark.size-large .ims-brand-mark__name {
	font-size: 32px;
}
.ims-brand-mark.size-large .ims-brand-mark__tagline {
	font-size: 12px;
	margin-top: 4px;
}

/* Optional pulse, used in the footer only */
.ims-brand-mark.animate-dots .ims-brand-mark__dots span {
	animation: imsBrandDot 2s infinite;
}
.ims-brand-mark.animate-dots .ims-brand-mark__dots span:nth-child(2) {
	animation-delay: 0.2s;
}
.ims-brand-mark.animate-dots .ims-brand-mark__dots span:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes imsBrandDot {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.65;
		transform: scale(0.86);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ims-brand-mark.animate-dots .ims-brand-mark__dots span {
		animation: none;
	}
}
