/* Devio Care: home hero. Flat brand-blue sky, clouds, nanny cutout on the right,
   service badges, header laid over the sky. Loaded after interactions.css. */

:root {
	--dc-sky: #2b72bf;        /* brand blue, lightened; white text stays above 4.5:1 */
	--dc-sky-deep: #1f62aa;
}

/*--------------------------------------------------------------
# Header over the sky (home only)
--------------------------------------------------------------*/
.home #masthead.site-header {
	background: var(--dc-sky);
}

@media screen and (min-width: 1024px) {
	/* Fixed from the start (same place as absolute at the top of the page), so
	   scrolling only slides it up by its top padding instead of switching its positioning. */
	.home #masthead.site-header {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		background: transparent;
		padding-top: var(--dc-space-l);
	}
	.home .main-navigation ul.nav-menu > li > a,
	.home .main-navigation ul.nav-menu > li.current-menu-item > a {
		color: #fff;
	}
	.home .main-navigation ul.nav-menu > li > a:after,
	.home .main-navigation ul.nav-menu > li > a i {
		color: #fff;
	}
	@media (hover: hover) and (pointer: fine) {
		.home .main-navigation ul.nav-menu > li:hover > a {
			color: rgba(255, 255, 255, 0.78);
		}
	}
	/* Last menu item (Contacts) becomes the header call to action, on every page. */
	.main-navigation ul.nav-menu > li:last-child > a {
		display: inline-flex;
		align-items: center;
		min-height: 48px;
		margin-left: var(--dc-space-s);
		padding: 0 var(--dc-space-l);
		border-radius: 999px;
		background: var(--dc-blue);
		color: #fff !important;
		font-weight: 700;
		transition: background-color 0.15s ease, color 0.15s ease, transform 0.16s var(--ease-out);
	}
	.home .main-navigation ul.nav-menu > li:last-child > a {
		background: #fff;
		color: var(--dc-blue) !important;
	}
	.main-navigation ul.nav-menu > li:last-child > a:active {
		transform: scale(0.97);
		transition-duration: 0.08s;
	}
	@media (hover: hover) and (pointer: fine) {
		.main-navigation ul.nav-menu > li:last-child:hover > a {
			background: var(--dc-blue-dark);
		}
		.home .main-navigation ul.nav-menu > li:last-child:hover > a {
			background: var(--dc-blue-light);
		}
	}
}
@media screen and (max-width: 1023px) {
	.home .menu-toggle span {
		background-color: #fff;
	}
}

/*--------------------------------------------------------------
# Sky
--------------------------------------------------------------*/
#featured-slider {
	position: relative;
	background: var(--dc-sky);
}
/* Bottom cloud bank (assets/images/hero-clouds.svg): white row in front of the
   photo, a paler row behind; the SVG crops its sides instead of squashing. */
#featured-slider > .cloud-bg.dc-hero-clouds {
	z-index: 3;
	left: 0;
	right: 0;
	bottom: -1px;
	width: 100%;
	height: 180px;
	max-width: none;
}
.dc-hero {
	position: relative;
	overflow: hidden;
	min-height: 0;
	padding: calc(104px + var(--dc-space-xxl)) 0 0; /* the 104px header lies over the sky */
	background: linear-gradient(180deg, var(--dc-sky) 0%, var(--dc-sky-deep) 100%);
}
.dc-hero__cloud {
	position: absolute;
	z-index: 0;
	background: url("../images/cloud.svg") no-repeat center / contain;
	pointer-events: none;
}
.dc-hero__cloud--soft-tl,
.dc-hero__cloud--soft-tr,
.dc-hero__cloud--soft-l,
.dc-hero__cloud--soft-r {
	opacity: 0.2;
}
.dc-hero__cloud--soft-tl {
	opacity: 0.06 !important; /* fainter than the others: it sits behind the logo */
	top: -46px;
	left: -110px;
	width: 300px;
	height: 180px;
}
.dc-hero__cloud--soft-tr {
	top: 16%;
	right: -70px;
	width: 190px;
	height: 114px;
}
.dc-hero__cloud--soft-l {
	top: 62%;
	left: -80px;
	width: 260px;
	height: 156px;
}
.dc-hero__cloud--soft-r {
	top: 42%;
	right: -60px;
	width: 240px;
	height: 144px;
}

/*--------------------------------------------------------------
# Layout
--------------------------------------------------------------*/
.dc-hero__grid::before,
.dc-hero__grid::after {
	display: none; /* .wrapper clearfix pseudo-elements would take grid cells */
}
.dc-hero__grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: end;
	gap: var(--dc-space-l);
}
.dc-hero__content {
	align-self: center;
	max-width: 560px;
	padding-bottom: calc(180px - var(--dc-space-xl)); /* stays above the 180px cloud bank */
	text-align: left;
}
.dc-hero__title {
	margin: 0 0 var(--dc-space-s);
	color: #fff;
	font-size: clamp(2.25rem, 4.4vw, 3.6rem);
	font-weight: 700;
	line-height: 1.06;
	letter-spacing: -0.02em;
	text-wrap: balance;
}
.dc-hero__text {
	max-width: 500px;
	margin: 0 0 var(--dc-space-l);
	color: rgba(255, 255, 255, 0.92);
	font-size: 16px; /* same as the .dc-lead under the inner pages' titles */
	line-height: 1.6;
}
.dc-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--dc-space-s);
}
.dc-hero__actions .btn {
	margin: 0;
}
.dc-hero__nounou {
	margin: var(--dc-space-l) 0 0;
	color: rgba(255, 255, 255, 0.85);
	font-size: 16px;
}
#featured-slider .dc-hero__nounou a {
	color: #fff;
	font-weight: 700;
}

/* Hero buttons: white pill + white outline, like a sky with clouds. */
#featured-slider .btn.dc-btn-white {
	background: #fff;
	border-color: #fff;
	color: var(--dc-blue);
}
#featured-slider .btn.dc-btn-ghost {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.85);
	color: #fff;
}
#featured-slider .btn.dc-btn-white:focus-visible,
#featured-slider .btn.dc-btn-ghost:focus-visible {
	background: #fff;
	border-color: #fff;
	color: var(--dc-blue-dark);
	outline-color: rgba(255, 255, 255, 0.7);
}
@media (hover: hover) and (pointer: fine) {
	#featured-slider .btn.dc-btn-white:hover {
		background: var(--dc-blue-light);
		border-color: var(--dc-blue-light);
		color: var(--dc-blue-dark);
	}
	#featured-slider .btn.dc-btn-ghost:hover {
		background: rgba(255, 255, 255, 0.14);
		border-color: #fff;
		color: #fff;
	}
}

/*--------------------------------------------------------------
# Photo and badges
--------------------------------------------------------------*/
.dc-hero__visual {
	position: relative;
	align-self: end;
	justify-self: end;
	width: min(100%, 520px);
}
.dc-hero__photo {
	display: block;
	width: 100%;
	height: auto;
	max-height: 640px;
	object-fit: contain;
	object-position: bottom center;
}
.dc-hero__badges {
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	pointer-events: none;
}
.dc-hero__badge {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 104px;
	height: 104px;
	border-radius: 50%;
	background: #fff;
	color: var(--dc-blue);
	font-size: 34px;
	box-shadow: 0 18px 40px rgba(8, 28, 50, 0.22);
}
.dc-hero__badge::before {
	content: none !important;
}
.dc-hero__badge::after {
	content: "";
	position: absolute;
	top: -10px;
	left: -8px;
	width: 30px;
	height: 30px;
	background: url("../images/sparkle.svg") no-repeat center / contain;
}
.dc-hero__badge:nth-child(1) {
	top: 9%;
	right: -2%;
}
.dc-hero__badge:nth-child(2) {
	top: 33%;
	right: -10%;
}
.dc-hero__badge:nth-child(2) i {
	color: var(--dc-accent-dark);
}
.dc-hero__badge:nth-child(3) {
	top: 57%;
	right: -1%;
}
/* Small laptops: the wrapper reaches the screen edge, keep the middle badge on screen. */
@media (min-width: 1024px) and (max-width: 1279px) {
	.dc-hero__badge:nth-child(2) {
		right: -4%;
	}
}

/* Extra small sparkles scattered between the badges, as in the mock-up. */
.dc-hero__spark {
	position: absolute;
	z-index: 2;
	background: url("../images/sparkle.svg") no-repeat center / contain;
	pointer-events: none;
	animation: dc-pop 0.45s var(--ease-out) 0.5s both;
}
.dc-hero__spark--a {
	top: 27%;
	right: 15%;
	width: 18px;
	height: 18px;
}
.dc-hero__spark--b {
	top: 74%;
	right: 24%;
	width: 22px;
	height: 22px;
}

/* Entrance: badges pop in after the text, once, from 90% (never from nothing). */
@keyframes dc-pop {
	from {
		opacity: 0;
		transform: scale(0.9) translateY(6px);
	}
}
.dc-hero__badge {
	animation: dc-pop 0.45s var(--ease-out) both;
}
.dc-hero__badge:nth-child(1) { animation-delay: 0.3s; }
.dc-hero__badge:nth-child(2) { animation-delay: 0.38s; }
.dc-hero__badge:nth-child(3) { animation-delay: 0.46s; }
.dc-hero__photo {
	animation: dc-rise 0.6s var(--ease-out) 0.1s both;
}
/* Held on their first frame until the photo is decoded (inline script in the
   section); paused delays don't run, so the stagger plays out intact. */
.dc-js .dc-hero__visual:not(.dc-hero__visual--ready) .dc-hero__photo,
.dc-js .dc-hero__visual:not(.dc-hero__visual--ready) .dc-hero__badge,
.dc-js .dc-hero__visual:not(.dc-hero__visual--ready) .dc-hero__spark {
	animation-play-state: paused;
}

/*--------------------------------------------------------------
# Tablet & phone: text first, photo below it, clouds still in front
--------------------------------------------------------------*/
@media screen and (max-width: 1023px) {
	.dc-hero {
		padding-top: var(--dc-space-xxl);
	}
	.dc-hero__grid {
		grid-template-columns: 1fr;
		gap: var(--dc-space-xs);
	}
	.dc-hero__content {
		max-width: 620px;
		padding-bottom: 0;
	}
	.dc-hero__visual {
		justify-self: center;
		width: min(86%, 420px);
	}
}
@media screen and (max-width: 767px) {
	.dc-hero {
		padding-top: var(--dc-space-xl);
	}
	.dc-hero__cloud--soft-tl,
	.dc-hero__cloud--soft-tr,
	.dc-hero__cloud--soft-l,
	.dc-hero__cloud--soft-r {
		opacity: 0.12;
	}
	#featured-slider > .cloud-bg.dc-hero-clouds {
		height: 110px;
	}
	.dc-hero__actions .btn {
		flex: 1 1 100%;
		justify-content: center;
	}
	.dc-hero__badge {
		width: 72px;
		height: 72px;
		font-size: 28px;
	}
	.dc-hero__badge::after {
		width: 22px;
		height: 22px;
	}
	.dc-hero__badge:nth-child(2) {
		right: -6%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dc-hero__badge,
	.dc-hero__photo,
	.dc-hero__spark {
		animation: none;
	}
}
