/* The Kelly logo, [kelly_logo] (includes/brand.php). By default it holds the colour logo with the reversed one over
   it, unseen until the ground behind it turns to the brand's dark blues. */

.kelly-logo {
	position: relative;
	display: inline-block;
	vertical-align: middle;
	line-height: 0;
}

/* Two classes, to outrank the theme's and Elementor's img rules (height: auto, max-width: 100%), which would leave
   an SVG drawn only to its viewBox with no size inside the shrink-wrapped link */
.kelly-logo .kelly-logo__light,
.kelly-logo .kelly-logo__ink {
	display: block;
	width: auto;
	max-width: none;
	height: var(--kelly-logo-height, 40px);
	transition: opacity 0.5s ease, height 0.5s ease;
}

/* The name, for screen readers and search engines: the logo draws it */
.kelly-logo .kelly-logo__name {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* As the front page's h1 it takes no room of its own, and none of the theme's or the kit's h1 styles */
body h1.kelly-logo-heading {
	margin: 0;
	padding: 0;
	font: inherit;
	line-height: 0;
	letter-spacing: normal;
	text-transform: none;
}

.kelly-logo--on-auto .kelly-logo__ink {
	position: absolute;
	top: 0;
	left: 0;
	opacity: 0;
}

/* kellycontroller.com: its header is clear, over the home page's dark hero, and turns navy once it sticks */
.home .elementor-location-header .kelly-logo--on-auto .kelly-logo__light,
.elementor-sticky--effects .kelly-logo--on-auto .kelly-logo__light {
	opacity: 0;
}

.home .elementor-location-header .kelly-logo--on-auto .kelly-logo__ink,
.elementor-sticky--effects .kelly-logo--on-auto .kelly-logo__ink {
	opacity: 1;
}

/* Its size there, smaller on smaller screens, and on wide ones once the header sticks and shrinks */
.elementor-location-header .kelly-logo {
	--kelly-logo-height: 46px;
}

@media (min-width: 1025px) {
	.elementor-location-header .elementor-sticky--effects .kelly-logo {
		--kelly-logo-height: 36px;
	}
}

@media (max-width: 1024px) {
	.elementor-location-header .kelly-logo {
		--kelly-logo-height: 36px;
	}
}

@media (max-width: 767px) {
	.elementor-location-header .kelly-logo {
		--kelly-logo-height: 30px;
	}
}

@media (max-width: 359px) {
	.elementor-location-header .kelly-logo {
		--kelly-logo-height: 26px;
	}
}
