@use 'utils/minireset';
@use '@splidejs/splide/dist/css/splide-core.min';
@use 'partials/fonts';
@use 'partials/variables' as *;
@use 'partials/animations';

// ----------------------------------------------------------------------------
// GENERALITIES
// ----------------------------------------------------------------------------

// Fonts and colors

body {
	font-family: var(--text-font-family);
	font-size: var(--text-font-size);
	line-height: var(--text-line-height);
	color: var(--black);
	background-color: var(--feldgrau);
}

h1 {
	font-family: var(--title-font-family);
	font-size: var(--h1-font-size);
	line-height: var(--h1-line-height);
}

h2 {
	font-family: var(--text-font-family);
	font-size: var(--h2-font-size);
	line-height: var(--h2-line-height);
	margin: 0 0 4rem 0;
}

h3 {
	font-family: var(--text-font-family);
	font-size: var(--h3-font-size);
	line-height: var(--h3-line-height);
	margin: 2rem 0 1rem 0;
}

p {
	text-align: justify;
}

strong {
	font-weight: var(--bold-font-weight);
}

em {
	font-style: italic;
}

@media screen and (min-width: $desktop-media-query) {

	.body--white-background {
		background-color: var(--white);
	}
}

// Link style

a {
	color: var(--black);
	text-decoration: none;
	transition: text-decoration 200ms ease-in-out;

	&:hover,
	&:focus,
	&:active {
		text-decoration: underline;
	}

	&:focus-visible {
		outline: 1px dashed var(--black);
		outline-offset: 2px;
		animation: expand-outline 200ms ease-in-out;
	}
}

// General layout

body {
	min-height: 100vh;
	overflow-x: hidden;
}

@media screen and (min-width: $desktop-media-query) {

	body {
		overflow-y: hidden;
	}
}

// ----------------------------------------------------------------------------
// HEADER
// ----------------------------------------------------------------------------

// Logo

.logo {
	width: 100%;
	padding: var(--logo-padding);
	display: flex;
	justify-content: center;

	&--fixed-center {
		z-index: 2;
		width: auto;
		padding: 0;
		position: fixed;
		top: 1rem;
		right: calc(50vw - (var(--logo-width) / 2));
		display: block;
	}

	.logo__link {
		width: var(--logo-width);
		height: var(--logo-height);
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.logo__icon {
		width: 100%;
		height: 100%;

		&--black {
			stroke: var(--black);
			transition: stroke 400ms ease-in-out;
		}

		&--white {
			stroke: var(--white);
			transition: stroke 400ms ease-in-out;
		}

		&--rotate-horizontal-bottom {
			animation: rotate-horizontal-bottom 800ms ease-in-out infinite;
		}
	}
}

@media screen and (min-width: $desktop-media-query) {

	.logo {

		&--fixed-right {
			z-index: 2;
			width: auto;
			padding: 0;
			position: fixed;
			top: 1rem;
			right: 1.5rem;
			display: block;
		}
	}
}

// Sidebar

.sidebar {
	width: 100%;
	padding: var(--sidebar-padding);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: flex-start;
	background-color: transparent;
	transition: background-color 400ms ease-in-out;

	.sidebar__nav {
		max-width: 100%;
	}

	.sidebar__nav-item {

		+ .sidebar__nav-item {
			margin: 0.5rem 0 0 0;
		}
	}

	.sidebar__nav-link {
		display: inline-block;
		max-width: 100%;
		overflow-x: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		color: var(--black);
		transition: color 400ms ease-in-out;
	}

	.sidebar__social {
		width: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		margin: 1rem 0 0 0;
	}

	.sidebar__social-link {
		width: var(--icon-size);
		height: var(--icon-size);
		display: flex;
		justify-content: center;
		align-items: center;

		+ .sidebar__social-link {
			margin: 0 0 0 1rem;
		}
	}

	.sidebar__instagram-icon,
	.sidebar__email-icon {
		width: 100%;
		height: 100%;
		fill: var(--black);
		transition: fill 400ms ease-in-out;
	}
}

@media screen and (min-width: $desktop-media-query) {

	.sidebar {

		&--fixed {
			z-index: 1;
			overflow-y: auto;
			position: fixed;
			top: 0;
			bottom: 0;
			left: 0;
		}
		
		&--slimmed {
			width: 15%;
			min-width: 15rem;

			.sidebar__nav-link {
				color: var(--transparent-black);
			}

			.sidebar__instagram-icon,
			.sidebar__email-icon {
				fill: var(--transparent-black);
			}

			&:hover {
				background-color: var(--transparent-feldgrau);

					
				.sidebar__nav-link {
					color: var(--black);
				}

				.sidebar__instagram-icon,
				.sidebar__email-icon {
					fill: var(--black);
				}
			}
		}

		&--white-background {

			&:hover {
				background-color: var(--transparent-white);
			}
		}

		.sidebar__social {
			width: auto;
			justify-content: flex-start;
		}
	}
}

// ----------------------------------------------------------------------------
// MAIN
// ----------------------------------------------------------------------------

// Slider section

.splide {

	&__image {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
}

// Exhibition section

.exhibition-section {
	display: none;
}

@media screen and (min-width: $desktop-media-query) {

	.exhibition-section {
		display: block;
		width: 100vw;
		height: 100vh;
	}

	.exhibition {
		opacity: 0;
		width: 100%;
		height: 100%;
		transition: opacity 400ms ease-in-out;

		&--visible {
			opacity: 1;
		}
	}
}
