@import url("reset.css");
@import url("https://fonts.googleapis.com/css2?family=Exo+2:wght@900&display=swap");

:root {
  --bgd-logo-color: #D9D9D9;
  --navy: #070e16;
  --white: #f4f1e8;
  --gold: #c9a227;
  --max: 1120px;
}

body {
	--main-width: clamp(60rem, 100vi - 80px,  1400px);
	--main-ratio: calc(var(--main-width) / 1400);
	margin: 0;
	font-family: system-ui, "Segoe UI", sans-serif;
	font-size: 18px;
	line-height: 1.5;
	color: #060203;
	background: #ddd;
}

main {
	font-size: calc(0.0235 * var(--main-width));
	width: var(--main-width);
	margin: auto;
	background: #fff;
	box-shadow: 0 0 100px #0003;
	box-shadow: 0px 0px 100px #0003;
}

.visuallyhidden {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
}

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
	clip-path: none;
	height: auto;
	margin: 0;
	overflow: visible;
	position: static;
	width: auto;
}

.quick-links {
	top: 2px;
	width: 0;
	height: 0;
	position: absolute;
	z-index: 100;
}

.quick-links ul {
	margin: 0;
	padding: 0;
	list-style-type: none;
}

.quick-links a:any-link {
	position: absolute;
	top: 0;
	left: -9000em;
	display: block;
	width: 200px;
	padding: 5px 10px;
	text-align: center;
	text-decoration: none;
}

.quick-links a:any-link:is(:hover, :focus, :active) {
	left: 0;
	background: var(--gold);
	color: var(--navy);
}

section {
	position: relative;
	min-height: calc(0.5 * var(--main-width));
    isolation: isolate;
	&.railway {
		&::before {
			content: "";
			position: absolute;
			z-index: -1;
			inset: calc(0.133 * var(--main-width)) 0 auto 0;
			aspect-ratio: 140 /39;
			background:
 				linear-gradient(#ffd400, #ffd400) no-repeat 0 calc(30 * var(--main-ratio)) / 100% calc(26 * var(--main-ratio)),
				url("/_gfx/railway_bgd.jpg") no-repeat 50% 65% / 100% 300%;
			pointer-events: none;
		}

		> img._map {
			margin-left: calc(240 * var(--main-ratio));
			width: calc(965 * var(--main-ratio));
		}

		> img._figures {
			margin-left: calc(190 * var(--main-ratio));
			width: calc(1070 * var(--main-ratio));
			margin-bottom: calc(40 * var(--main-ratio));
		}
	}
	&.stock {
		&::before {
			content: "";
			position: absolute;
			z-index: -1;
			inset: calc(128 * var(--main-ratio)) 0 auto 0;
			aspect-ratio: 140 / 26;
			background:
				linear-gradient(#ffd400, #ffd400) no-repeat 0 calc(30 * var(--main-ratio)) / 100% calc(26 * var(--main-ratio)),
				url("/_gfx/stock_bgd.jpg") no-repeat 50% 65% / cover;
			pointer-events: none;
		}

		> div.yellow-box.rail-stock {
			position: relative;
			margin-top: calc(230 * var(--main-ratio));
			margin-left: calc(185 * var(--main-ratio));
			width: calc(440 * var(--main-ratio));
			z-index: 1;
		}
		> div.yellow-box.bus-stock {
			position: relative;
			margin-top: calc(80 * var(--main-ratio));
			margin-left: calc(800 * var(--main-ratio));
			width: calc(465 * var(--main-ratio));
		}
	}
	&:nth-child(n+3) {
		display: none;
	}
}

h2 {
	box-sizing: border-box;
	container-type: inline-size;
	display: block;
	position: relative;
	margin: 0;
	padding: 0.6em 0 0.6em 38%;
	color: #fff;
	background: #E40313;
	font-family: "Exo 2", system-ui, sans-serif;
	font-size: calc(0.034 * var(--main-width));
	font-weight: 900;

	.railway & {
		padding-block: 1.5em;
		line-height: 0.92;
	}

	&::after {
		content: "";
		width: calc(0.36 * var(--main-width));
		position: absolute;
		top: -0.49px;
		left: -0.49px;
		bottom: calc(-0.36 * var(--main-width));
		pointer-events: none;
		background-color: var(--bgd-logo-color);
		background-image: url("/_gfx/logo-lka.svg");
		background-repeat: no-repeat;
		background-size: calc(0.16 * var(--main-width)) calc(0.16 * var(--main-width));
		background-position: left calc(0.14 *  var(--main-width)) top calc(-0.01 *  var(--main-width));
		clip-path: polygon(0 0, 100% 0%, 100% calc(100% - 0.36 * var(--main-width)), 0 100%);
	}
	section:is(.railway) & {
		&::after {
			background-position: left calc(0.14 * var(--main-width)) top calc(0.04 * var(--main-width));
		}
	}

	section:is(.ecology, .engagement) & {
		padding-left: inherit;
		padding-right: 38%;
		text-align: right;
		&::after {
			left: inherit;
			right: -0.49px;
			background-position: right calc(0.14 * var(--main-width)) top  calc(-0.02 * var(--main-width));
			clip-path: polygon(0 0, 100% 0%, 100% 100%, 0 calc(100% - 0.36 * var(--main-width)));
		}
	}
}

.yellow-box {
	box-sizing: border-box;
	background-color: #fdcb0c;
	padding: 20px 36px;
	p {
		padding: 0px;
		margin:0px;
	}
	section.railway & {
		width: calc(0.693 * var(--main-width));
		margin-left: calc(0.17 * var(--main-width));
		margin-top: calc(0.2 * var(--main-width));
	}
}
