/* LAYOUT */

* {
	box-sizing: inherit;
}

html {
	scroll-behavior: smooth;
	font-size: 125%;
	box-sizing: border-box;
}

body {
	color: #333;
	line-height: 1.5;
	margin: 0;
}

body > * {
	/* Limit inner content width to 800px. Using padding instead of max-width
	 * for this allows background images to stretch across the full viewport.
	 * It also allows overrides where necessary by resetting the padding.
	 */
	padding: 0 1rem;
	padding: 0 max(1rem, (100vw - 800px) / 2);
}

ul, ol {
	/* Indent lists slightly more than the padding on other elements.
	 * 1.5rem perfectly aligns ul dots, and also works well for ol where length < 100.
	 */
	margin-left: 1.5rem;
}

img {
	max-width: 100%;
	height: auto;
}

figcaption {
	font-size: 80%;
}

blockquote + figcaption {
	font-size: 100%;
}

blockquote + figcaption::before {
	content: '– ';
}

/* TOP-LEVEL (body > *) SELECTORS */

body > figure {
	position: relative;

	/* set margin equivalent to the padding on every other element, so that the padding may be used for other purposes */
	margin: 0 1rem;
	margin: 0 max(1rem, (100vw - 800px) / 2);

	padding: 1em 2em;
	clear: left;
}

body > figure > blockquote {
	margin: 0 0 1rem 1rem;
}

body > figure > blockquote::before {
	/* draw a quote on the left side */
	position: absolute;
	left: 0;
	display: block;
	content: '“';
	font: italic 400%/1 Georgia, "Times New Roman", serif;
	color: #C8C8C8;
}

body > figure > blockquote::after {
	/* draw a line on the left side, under the quote */
	content: '';
	position: absolute;
	left: 1rem;
	top: 3.5rem;
	bottom: 1rem;
	width: 4px;
	background-color: #C8C8C8;
}

body > figure > blockquote > :first-child {
	margin-top: 0;
}

body > figure > blockquote + figcaption {
	margin: 0 0 0 1rem;
}

body > .float-right {
	width: 400px;
	max-width: 50%;

	padding: 0;
	margin: .5em;
	margin-right: max(1rem, (100vw - 800px) / 2);
	float: right;
}

/* NAVIGATION */

.root-index::before {
	content: '';
	display: block;
	height: 85vh;
	background: url(/Hej-till-publiken-2024-06-29.jpg) center/cover;
	background-attachment: fixed;
	border-bottom: 2px solid black;
}

.site-header, .site-footer {
	/* these are required for positions "absolute", "sticky", and "fixed" */
	top: 0;
	left: 0;
	right: 0;

	/* simple background and border */
	background: #DCDCDC;
	border-bottom: 2px solid black;
}

.root-index .site-header {
	position: absolute;
}

@media screen and (min-height: 30rem) and (min-width: 30rem) {
	.site-header {
		position: sticky;
		z-index: 1;
	}

	.root-index .site-header {
		position: fixed;
	}
}

.site-footer {
	border-top: 2px solid black;
}

.site-nav {
	padding: 1rem 0;
}

.site-nav::after {
	content: '';
	display: block;
	clear: both;
}

.site-logo {
	float: left;
	display: block;
	width: 100%;
	max-width: 25rem;
}

.site-logo img {
	display: block; /* gets rid of text-based spaces and line-height (which effectively acts as a min-height) */
	width: 100%;
}

.main-menu {
	float: right;
	display: flex;
	list-style: none;
	margin: 1rem 0 -.5rem;
	padding: 0;
}

.main-menu li {
	padding: .5rem;
	padding-bottom: 0;
}

/* NAVIGATION: add flair to main menu links */

.main-menu a {
	display: block;
	position: relative;
}

.main-menu a::before {
	content: '';
	display: block;
	background: url(/icons/fermata.svg) center/contain no-repeat;
	position: absolute;
	bottom: 80%;
	left: 0;
	right: 0;
	height: 30%;
	opacity: 0;
	pointer-events: none;
	transition: all .3s cubic-bezier(0.25, 0.1, 0, 2.05);
}

.main-menu a:hover::before, .main-menu a:focus::before {
	bottom: 110%;
	opacity: .3;
}

.main-menu a[rel=self]::before {
	bottom: 110%;
	opacity: 1;
}

/* ANIMATIONS */

.fade-in-from-below {
	animation-name: fade-in-from-below;
	animation-duration: 0.7s;
	animation-timing-function: ease-in-out;
	animation-delay: 0.9s;
	animation-fill-mode: both;
}

@keyframes fade-in-from-below {
	0% {
		opacity: 0;
		transform: translateY(10%);
	}

	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

/* UTILITIES */

.responsive-iframe-container {
	overflow: hidden;
	padding-top: 56.25%; /* 16:9 aspect ratio */
	position: relative;
}

.responsive-iframe-container iframe {
	border: 0;
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 100%;
}

.ellipse {
	border-radius: 50%;
	shape-outside: margin-box;
}
