/*
 * Site chrome and front page. Sizes and colours follow the design guide,
 * assets/static/images/varvikoodid.png (drawn at 1928px wide).
 */

body {
	background: #fafafa;
	font-family: 'Roboto', sans-serif;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	width: 100%;
}

/* Navbar */

.kd-navbar {
	background-color: #3c393d;
}

.nav-logo-pad {
	padding-top: 20px;
	padding-bottom: 20px;
	padding-left: 30px;
}

.navbar-dark .navbar-nav .nav-link {
	color: #fff;
	font-weight: 500;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
	color: #00a5ce;
}

.navbar-dark .navbar-nav .nav-link.active {
	color: #00a5ce;
	font-weight: 700;
}

@media (min-width: 992px) {
	.kd-navbar {
		height: 99px;
		padding: 0 63px 0 88px;
	}

	.kd-navbar .navbar-brand {
		margin: 0;
		padding: 0;
	}

	.kd-navbar .navbar-brand img {
		display: block;
		width: 240px;
		height: auto;
	}

	.kd-navbar .navbar-nav .nav-link {
		padding: 0 21px;
		font-size: 15.5px;
	}
}

/* Company search: the input and button share one height. */

.kd-search {
	display: flex;
	gap: 8px;
}

.kd-search .search-box,
.kd-search .btn-success {
	height: 60px;
	font-size: 18px;
	border-radius: 2px;
	box-shadow: 1px 2px 4px #888888;
}

.kd-search .search-box {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0 20px;
	border: 0;
	color: #373a3c;
}

.kd-search .search-box::placeholder {
	color: #b2b2b2;
	opacity: 1;
}

.kd-search .btn-success {
	flex: 0 0 auto;
	padding: 0 24px;
	border: 0;
	font-weight: 700;
	white-space: nowrap;
	color: #fff;
	background-color: #8dc63f;
}

.kd-search .btn-success:hover,
.kd-search .btn-success:focus {
	background-color: #7cb32f;
}

.kd-search--stacked {
	flex-direction: column;
	gap: 12px;
}

/* Front page hero (desktop and tablet). Positions are in design guide
   pixels; --u is one guide pixel, so the composition scales evenly below
   1928px. */

.kd-home {
	--u: min(1px, calc(100vw / 1928));
	position: relative;
	height: calc(99px + 897 * var(--u));
	overflow: hidden;
	background: #34a5dd;
	color: #fff;
	text-align: center;
}

/* Light blue diagonal along the bottom. */
.kd-home::before {
	content: "";
	position: absolute;
	inset: 0;
	background: #9edfff;
	clip-path: polygon(0 85.3%, 100% 69.6%, 100% 100%, 0 100%);
}

.kd-home__stage {
	position: absolute;
	top: 99px;
	left: 50%;
	width: calc(1928 * var(--u));
	height: calc(897 * var(--u));
	transform: translateX(-50%);
}

.kd-home__stage > * {
	position: absolute;
}

.kd-home__logo {
	top: calc(130 * var(--u));
	left: calc(640 * var(--u));
	width: calc(650 * var(--u));
	height: auto;
}

.kd-home__title {
	top: calc(255 * var(--u));
	left: 0;
	width: 100%;
	margin: 0;
	padding: 0;
	font-size: calc(49.5 * var(--u));
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	color: #fff;
}

.kd-home__lead {
	top: calc(362 * var(--u));
	left: calc(419 * var(--u));
	width: calc(1090 * var(--u));
	font-size: calc(24.5 * var(--u));
	font-weight: 300;
	line-height: calc(36 * var(--u));
}

.kd-home__lead p {
	margin: 0;
}

.kd-home__lead p + p {
	margin-top: calc(5 * var(--u));
}

.kd-home__search {
	top: calc(532 * var(--u));
	left: calc(641 * var(--u));
	width: calc(646 * var(--u));
	gap: calc(11 * var(--u));
}

.kd-home__search .search-box,
.kd-home__search .btn-success {
	height: calc(70 * var(--u));
}

.kd-home__search .search-box {
	padding: 0 calc(32 * var(--u));
	font-size: calc(24.5 * var(--u));
	font-weight: 300;
}

.kd-home__search .btn-success {
	flex-basis: calc(273 * var(--u));
	padding: 0;
	font-size: calc(21.5 * var(--u));
}

.kd-home__art--left {
	top: calc(465 * var(--u));
	left: calc(138 * var(--u));
	width: calc(341 * var(--u));
	height: auto;
}

.kd-home__art--right {
	top: calc(491 * var(--u));
	left: calc(1357 * var(--u));
	width: calc(436 * var(--u));
	height: auto;
}

/* Tablet: the same pieces stacked, illustrations side by side below. */
@media (max-width: 1199px) {
	.kd-home {
		--kd-nav: 99px;
		height: auto;
		padding: calc(var(--kd-nav) + 60px) 20px 40px;
	}

	.kd-home__stage {
		position: relative;
		top: 0;
		left: 0;
		display: grid;
		grid-template-columns: 1fr 1fr;
		justify-items: center;
		width: auto;
		height: auto;
		transform: none;
	}

	.kd-home__stage > * {
		position: static;
		grid-column: 1 / -1;
	}

	.kd-home__logo {
		width: min(650px, 80%);
	}

	.kd-home__title {
		margin-top: 40px;
		font-size: 34px;
	}

	.kd-home__lead {
		width: auto;
		max-width: 760px;
		margin-top: 24px;
		font-size: 19px;
		line-height: 1.5;
	}

	.kd-home__lead p + p {
		margin-top: 8px;
	}

	.kd-home__search {
		width: min(646px, 100%);
		margin-top: 36px;
		gap: 11px;
	}

	.kd-home__search .search-box,
	.kd-home__search .btn-success {
		height: 64px;
	}

	.kd-home__search .search-box {
		padding: 0 24px;
		font-size: 20px;
	}

	.kd-home__search .btn-success {
		flex-basis: auto;
		padding: 0 28px;
		font-size: 19px;
	}

	.kd-home__art {
		grid-column: auto;
		max-width: 90%;
		margin-top: 40px;
	}

	.kd-home__art--left,
	.kd-home__art--right {
		width: auto;
	}
}

@media (max-width: 991px) {
	.kd-home {
		--kd-nav: 66px;
	}
}

/* Phone layout of the front page (max 760px). */

.left-img-pad {
	margin-top: 2%;
}

.check-score-text {
	font-size: 3.90vh;
}

.about-score-text {
	font-size: 2vh;
	margin-bottom: 0;
}

.kd-mobile .rlogo {
	margin-top: 100px;
	margin-bottom: 20px;
}

.kd-mobile .kollane {
	position: absolute;
	margin-top: 20px;
	left: -30px;
}

.kd-mobile .roheline {
	position: absolute;
	margin-top: 80px;
	right: 0;
}

.kd-mobile .bot-marg {
	margin-bottom: 30px;
}

.kd-mobile .m-top-marg {
	margin-top: 10%;
}

@media (max-width: 414px) {
	.nav-logo-pad {
		padding-top: 10px;
		padding-bottom: 10px;
		padding-left: 10px;
	}

	.check-score-text {
		font-size: 3vh;
		font-weight: bold;
		margin-top: 3%;
		margin-bottom: 3%;
	}

	.kd-mobile .left-img-pad {
		margin-top: 100px;
	}
}

@media (max-width: 375px) {
	.check-score-text {
		font-size: 3.5vh;
	}

	.about-score-text {
		font-size: 2.5vh;
	}
}
