:root {
	--black: #000;
	--black-01: #202020;
	--primary: #137d76;
	--accordion-separator: #1d1a16;
	--white: #fff;
	--beige: #f0eddb;
}

* {
	margin: 0;
	padding: 0;
	outline: none;
	box-sizing: border-box;
}

button {
	background: transparent;
	border: none;
}

button,
label {
	cursor: pointer;
}

ul {
	list-style: none;
}

a {
	text-decoration: none;
	color: inherit;
}

[type="radio"] {
	position: absolute;
	left: -9999px;
	opacity: 0;
}

::-webkit-scrollbar {
	width: 8px;
}

::-webkit-scrollbar-track {
	background: var(--black);
}

::-webkit-scrollbar-thumb {
	background: var(--primary);
}

::selection {
	background: var(--primary);
}

body {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	font: 1rem/1.6 "Roboto Mono", monospace;
	background: fixed var(--black) url(../img/website_dark.jpg) no-repeat top
		right / cover;
}

/* GENERIC
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.site-wrapper {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
	padding: 20px 0;
}

.site-header {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 10px;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px;

	a {
		display: block;
	}

	.logo {
		width: 150px;
		height: 150px;
	}

	.right {
		margin-left: auto;
	}
}

.accordion-wrapper {
	display: flex;
	flex-grow: 1;
	padding: 20px 0 40px;
}

.bottom {
	display: flex;
	justify-content: center;
}

/* OTHER
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.cta-wrapper {
	span {
		display: none;
	}
}

.cta {
	position: relative;
	font-weight: bold;
	border-radius: 25px;
	padding: 12px 24px;
	text-align: center;
	color: var(--black);
	min-width: 200px;
	background: var(--primary);
	border: 2px solid currentColor;
	transition: all 0.15s;

	&:hover {
		box-shadow: 0 2px 20px 20px rgba(255, 255, 255, 0.1);
	}
}

.blockquote-wrapper {
	position: relative;
	padding-top: 30px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	margin-top: 30px;

	svg {
		display: block;
		fill: rgba(255, 255, 255, 0.2);
		margin-bottom: 5px;
	}

	.blockquote {
		font-size: 1.1rem;
	}
}

/* ACCORDION
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.accordion {
	position: relative;
	width: calc(100% - 20px);
	max-width: 900px;
	min-height: 380px;
	max-height: 380px;
	margin: auto;
	background: var(--black-01);
	color: var(--white);

	label {
		text-align: center;
	}

	&,
	> li,
	.accordion-title {
		display: flex;
	}

	> li {
		&:not(:last-child) {
			border-right: 1px solid var(--accordion-separator);
		}
	}

	.accordion-title {
		flex-direction: column;
		justify-content: space-between;
		width: 70px;
		font-size: 1.4rem;
		font-weight: bold;
		padding: 20px 10px;
		background: var(--black);
		transition: color 0.15s;

		&:hover {
			color: var(--beige);
		}
	}

	.accordion-heading {
		display: inline-block;
		white-space: nowrap;
		transform-origin: bottom;
		transform: rotate(-90deg) translate(50%, 50%);
	}

	.accordion-content {
		display: none;
		flex-direction: column;
		overflow-y: auto;
		flex-grow: 1;
		padding: 20px;

		> * {
			margin: auto 0;
		}

		&.first {
			align-items: center;
		}

		> * + *:not(.blockquote-wrapper) {
			margin-top: 25px;
		}

		li {
			padding: 0;

			a,
			span {
				box-shadow: inset 0 -1px 0 var(--white);
				transition: all 0.15s cubic-bezier(0.29, 0.73, 0.74, 1.02);
			}

			a {
				&:hover {
					color: var(--black);
					box-shadow: inset 0 -20px 0 var(--white);
				}
			}

			& + li {
				margin-top: 15px;
			}
		}

		.nested {
			padding: 10px 0 0 10px;

			li {
				position: relative;
				padding-left: 25px;

				&::before {
					content: "";
					position: absolute;
					top: 15px;
					left: 0;
					width: 0;
					height: 0;
					border-style: solid;
					border-color: transparent #b8232d;
					border-width: 5px 0 5px 12px;
					transform: translateY(-50%);
				}

				& + li {
					margin-top: 5px;
				}
			}
		}
	}

	[data-radio="about"] {
		h1 {
			font-size: 1.2rem;
			line-height: 1.4;
			text-align: center;

			span {
				display: block;
				margin-bottom: 10px;
			}
		}

		.avatar {
			width: 200px;
			height: 200px;
			margin: 0;
		}
	}
}

*:has([value="About"]:checked) [data-radio="about"],
*:has([value="Services"]:checked) [data-radio="services"],
*:has([value="Contact"]:checked) [data-radio="contact"] {
	flex-grow: 1;
}

*:has([value="About"]:checked) [for="about"] + .accordion-content,
*:has([value="Services"]:checked) [for="services"] + .accordion-content,
*:has([value="Contact"]:checked) [for="contact"] + .accordion-content {
	display: flex;
}

*:has([value="About"]:checked) [for="about"],
*:has([value="Services"]:checked) [for="services"],
*:has([value="Contact"]:checked) [for="contact"] {
	color: var(--beige);
}

/* SOCIALS
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.socials {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	margin-top: 20px;

	a:hover {
		svg {
			fill: var(--beige);
			transform: translateY(-3px);
		}
	}

	svg {
		fill: var(--white);
		transition: all 0.25s;
	}

	&:has(a:hover) a:not(:hover) {
		svg {
			opacity: 0.2;
		}
	}
}

/* MQ
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@media screen and (max-width: 1024px) {
	body {
		background-repeat: repeat;
		background-image: radial-gradient(var(--black-01) 20%, transparent 0),
			radial-gradient(var(--black-01) 20%, transparent 0);
		background-size: 20px 20px;
		background-position: 0 0, 10px 10px;
	}

	.site-header {
		grid-template-columns: 1fr;
		justify-items: center;

		.right {
			margin-left: 0;
		}
	}

	.accordion {
		min-height: auto;
		max-height: unset;

		&,
		li {
			flex-direction: column;
		}

		li {
			&:not(:last-child) {
				border-right: none;
				border-bottom: 1px solid var(--accordion-separator);
			}
		}

		.accordion-title {
			flex-direction: row;
			width: auto;
		}

		.accordion-heading {
			transform: none;
		}

		.accordion-title,
		.accordion-content {
			padding: 30px;
		}
	}
}

@media screen and (max-width: 700px) {
	.accordion {
		.accordion-title,
		.accordion-content {
			padding: 20px;
		}

		.accordion-content {
			.avatar {
				width: 160px;
				height: 160px;
			}

			h2 {
				display: block;

				.separator {
					display: inline;
				}
			}
		}
	}
}

@media screen and (max-width: 500px) {
	.site-header {
		.logo {
			width: 120px;
			height: 120px;
		}
	}

	.cta {
		padding: 8px 14px;
	}
}

@media (hover: hover) {
	.cta-wrapper {
		position: relative;

		a {
			display: block;
		}

		span {
			display: block;
			position: absolute;
			top: calc(100% + 10px);
			left: 50%;
			transform: translateX(-50%);
			z-index: 1;
			max-width: 150%;
			width: 300px;
			font-size: 85%;
			line-height: 1.2;
			padding: 6px;
			text-align: center;
			background: var(--beige);
			border-radius: 10px;
			opacity: 0;
			pointer-events: none;
			transition: opacity 0.15s;
		}

		&:hover {
			span {
				opacity: 1;
			}
		}
	}

	.bottom {
		.cta-wrapper {
			span {
				top: auto;
				bottom: calc(100% + 10px);
			}
		}
	}
}
