*,
*::after,
*::before {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
	overflow: hidden;
	overscroll-behavior: none;
}

body {
	--body-text: #f1d51d;
	--body-text-alt: #525252;
	--body-bg: #3d3d3d;
	--link-text: #6d6d6d;
	--link-text-hover: #fff;
	--content-title-text: #000;
	--content-subtitle-text: #f1d51d;
	--highlight-text: #ffc712;
	--content-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	color: #f1d51d;
	color: var(--body-text);
	background: #3d3d3d;
	background: var(--body-bg);
	font-size: 14px;
	scrollbar-width: thin;
	scrollbar-color: var(--body-text-alt) transparent;
}

/* Scrollbars */
*::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

*::-webkit-scrollbar-track {
	background: transparent;
}

*::-webkit-scrollbar-thumb {
	background-color: var(--body-text-alt);
	border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
	background-color: var(--link-text-hover);
}

a {
	text-decoration: none;
	color: #6d6d6d;
	color: var(--link-text);
	outline: none;
}

a:hover {
	color: #fff;
	color: var(--link-text-hover);
}

a:focus-visible,
button:focus-visible,
.content .pieces:focus-visible {
	outline: 2px solid var(--body-text-alt);
	outline-offset: 3px;
}

.hidden {
	position: absolute;
	overflow: hidden;
	width: 0;
	height: 0;
	pointer-events: none;
}

/* Icons */
.icon {
	display: block;
	width: 1.5em;
	height: 1.5em;
	margin: 0 auto;
	fill: currentColor;
}

/* Page Loader */
.js .loading::before {
	content: '';
	position: fixed;
	z-index: 10000;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #ccd8e4;
	background: var(--body-bg);
}

.js .loading::after {
	content: '';
	position: fixed;
	z-index: 10000;
	top: 50%;
	left: 50%;
	width: min(32vw, 150px);
	height: min(32vw, 150px);
	pointer-events: none;
	background: url(../img/aliv-logo.png) center / contain no-repeat;
	filter: drop-shadow(0 0 22px rgba(var(--body-text-alt-rgb, 50, 188, 21), 0.55));
	transform: translate(-50%, -50%) scale(0.85);
	animation: loaderAnim 1.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

@keyframes loaderAnim {
	0%, 100% {
		opacity: 0.6;
		transform: translate(-50%, -50%) scale(0.85);
	}
	50% {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1.1);
	}
}

@media (prefers-reduced-motion: reduce) {
	.js .loading::after {
		animation: none;
		opacity: 1;
		transform: translate(-50%, -50%) scale(1);
	}
}

/* Frame */
.frame {
	top: 0;
	left: 0;
	position: fixed;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	pointer-events: none;
	padding: 2em;
}

.no-js .frame {
	position: relative;
}

.frame a {
	pointer-events: auto;
}

.frame__title {
	font-family: var(--content-font);
	font-weight: 600;
	margin: 0;
	font-size: 2em;
	color: #e0e0e0;
}

.frame__logo {
	height: 2.5em;
	width: auto;
	display: block;
}

.pieces {
	display: flex;
	flex-wrap: wrap;
	background-size: 100% auto;
	background-repeat: no-repeat;
	background-position: 0 0;
}

/* Reset control */
.reset-btn {
	position: fixed;
	right: 1.5em;
	bottom: 1.5em;
	z-index: 20;
	width: 2.75em;
	height: 2.75em;
	border-radius: 50%;
	border: 1px solid var(--link-text);
	background: rgba(0, 0, 0, 0.3);
	color: var(--body-text);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.3s ease, visibility 0.3s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.reset-btn .icon {
	width: 1.3em;
	height: 1.3em;
	margin: 0;
}

.page-nav--open ~ .reset-btn {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.reset-btn:hover,
.reset-btn:focus-visible {
	border-color: var(--body-text-alt);
	color: var(--body-text-alt);
	transform: scale(1.05);
}

@media screen and (max-width: 40em) {
	.frame {
		padding: 1.5em;
	}
}

/* Modals */
.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2em;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal--open {
	opacity: 1;
	visibility: visible;
}

.modal__backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.75);
}

.modal__panel {
	position: relative;
	width: 100%;
	max-width: 36em;
	max-height: 85vh;
	overflow-y: auto;
	padding: 2.5em;
	background: var(--body-bg);
	border: 1px solid var(--body-text-alt);
	color: #e0e0e0;
	transform: scale(0.94) translateY(10px);
	transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal--open .modal__panel {
	transform: scale(1) translateY(0);
}

.modal__panel--wide {
	max-width: 62em;
}

.modal__panel--media {
	max-width: 44em;
}

.modal__banner {
	display: block;
	width: calc(100% + 5em);
	max-width: none;
	height: auto;
	margin: 0 -2.5em 1.5em;
	filter: brightness(0.8);
}

.modal__close {
	position: absolute;
	top: 0.75em;
	right: 0.75em;
	width: 2.4em;
	height: 2.4em;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	color: var(--link-text-hover);
	font-size: 1.8em;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	z-index: 1;
	transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.modal__close:hover,
.modal__close:focus-visible {
	color: var(--body-text-alt);
	background: rgba(0, 0, 0, 0.7);
	transform: scale(1.1);
	filter: drop-shadow(0 0 8px rgba(var(--body-text-alt-rgb, 50, 188, 21), 0.7));
}

.modal__title {
	margin: 0 2.5em 1em 0;
	padding-bottom: 0.5em;
	font-family: var(--content-font);
	font-size: 1.75em;
	font-weight: normal;
	color: var(--body-text-alt);
	border-bottom: 1px solid rgba(var(--body-text-alt-rgb, 50, 188, 21), 0.35);
}

.modal__body p {
	margin: 0;
	line-height: 1.6;
}

/* Contact */
.contact-list {
	list-style: none;
	margin: 1.5em 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75em;
}

.contact-list__link {
	display: flex;
	align-items: center;
	gap: 0.75em;
	font-size: 1.1em;
	color: #e0e0e0;
	transition: color 0.2s ease, transform 0.2s ease;
}

.contact-list__link .icon {
	width: 1.5em;
	height: 1.5em;
	margin: 0;
	color: var(--body-text-alt);
	flex-shrink: 0;
}

.contact-list__link:hover,
.contact-list__link:focus-visible {
	color: var(--body-text-alt);
	transform: translateX(4px);
}

/* Tabs */
.tabs__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin: 0 0 1.5em;
	padding: 0 0 1.25em;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.tabs__tab {
	font-family: inherit;
	font-size: 0.85em;
	background: none;
	border: 1px solid var(--link-text);
	color: #e0e0e0;
	padding: 0.5em 1em;
	cursor: pointer;
}

.tabs__tab:hover,
.tabs__tab:focus-visible {
	border-color: var(--body-text-alt);
	color: var(--body-text-alt);
}

.tabs__tab--active,
.tabs__tab--active:hover,
.tabs__tab--active:focus-visible {
	background: var(--body-text-alt);
	border-color: var(--body-text-alt);
	color: var(--body-bg);
}

.tabs__panels {
	height: 22em;
	overflow-y: auto;
	padding-right: 0.5em;
}

.tabs__panel {
	display: none;
}

.tabs__panel--active {
	display: block;
}

.service-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.6em 1.5em;
	margin: 0;
	padding: 0;
	list-style: none;
}

.service-grid li {
	position: relative;
	padding-left: 1.1em;
	line-height: 1.4;
}

.service-grid li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.5em;
	width: 0.4em;
	height: 0.4em;
	border-radius: 50%;
	background: var(--body-text-alt);
}

@media screen and (max-width: 40em) {
	.service-grid {
		grid-template-columns: 1fr;
	}

	.modal {
		padding: 1em;
	}

	.modal__panel {
		max-height: 90vh;
		padding: 1.75em;
	}

	.modal__banner {
		width: calc(100% + 3.5em);
		margin: 0 -1.75em 1.5em;
	}

	.tabs__tab {
		font-size: 0.75em;
		padding: 0.4em 0.75em;
	}

	.tabs__panels {
		height: 50vh;
	}
}
