/* @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Jost&display=swap'); */

body {
	position: absolute;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	font-family: Jost, sans-serif;
}

/* image crossfade */

.crossfade {
	position: absolute;
	width: 100%;
	height: 100%;
	object-fit: cover;
	overflow: hidden;
}

.crossfade img {
	position: absolute;
	width: 100%;
	height: 100%;
	object-fit: cover;

	--iteration-length: 4s;
	--number-of-images: 8;
	--total-duration: calc(1s*var(--full-fade-length)*var(--number-of-images));

	--tx: attr(data-tx px);
	--ty: attr(data-ty px);

	/* initial */
	opacity: 0; 
	/* animation */
	animation-name: anim;
	animation-iteration-count: infinite;
	animation-duration: 32s;

	/* overflow: visible; */
	/* transform-origin: bottom; */
}

/*
- calc(32/4) --animation duration
- 4 seconds per iteration
- start 0.5 iterations early
	
- 4s per iteration
- 8 iterations

- 8*4 = 32
- 1.5*4 = 6
- 0.5*4 = 2

- this works for 8 images
calc(-0.5 * var(--iteration-length))
calc(0.5 * var(--iteration-length))
calc(1.5 * var(--iteration-length))
calc(2.5 * var(--iteration-length))
calc(3.5 * var(--iteration-length))
calc(4.5 * var(--iteration-length))
calc(5.5 * var(--iteration-length))
calc(6.5 * var(--iteration-length))
*/

.crossfade > img:nth-child(1) { animation-delay: calc(-0.5 * var(--iteration-length)); }
.crossfade > img:nth-child(2) { animation-delay: calc(0.5 * var(--iteration-length)); }
.crossfade > img:nth-child(3) { animation-delay: calc(1.5 * var(--iteration-length)); }
.crossfade > img:nth-child(4) { animation-delay: calc(2.5 * var(--iteration-length)); }
.crossfade > img:nth-child(5) { animation-delay: calc(3.5 * var(--iteration-length)); }
.crossfade > img:nth-child(6) { animation-delay: calc(4.5 * var(--iteration-length)); }
.crossfade > img:nth-child(7) { animation-delay: calc(5.5 * var(--iteration-length)); }
.crossfade > img:nth-child(8) { animation-delay: calc(6.5 * var(--iteration-length)); }

/* this is also specific to 8 images */
@keyframes anim {
	0% {
		opacity: 0;
		transform: translate(0px, 0px) scale(1) ; 
	}

	6.25% {
		opacity: 1;
	}

	12.5% {
		opacity: 1;
	}

	18.75% {
		opacity: 0;
	}

	50% {
		transform: translate(var(--tx), var(--ty)) scale(1.5) ;
	}
}

/* overlay */

:root {
	/* transition: all ease-in-out 500ms; */
	/* scroll-behavior: smooth; */
	--image-height: 400px;
}

.h1 {
	font-size: 18pt;
	font-weight: 300;
}

.h2 {
	font-size: 16pt;
	font-weight: 700;
	text-transform: uppercase;
}

.h3 {
	font-size: 14pt;
	font-weight: 300;
}

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

a:hover {
	color: rgb(100, 100, 100);
}

.overlay {
	position: absolute;
	width: 100%;
	height: 100%;

	text-align: right;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-content: center;
	color: white;
	padding: 2em;
	box-sizing: border-box;
	overflow: hidden;

	background-color:rgba(29, 49, 75, 0.3);
	z-index: 101;
}

/* better resizing :) */
.title, nav > a { font-size: clamp(20px, 5vw, 5vh); }
.callout { font-size: clamp(20px, 10vw, 10vh); }
/* #request-art.request-art { font-size: clamp(10px, 5vw, 5vh); } */

.request-art {
	border: 2px solid white;
	background-color: transparent;
	color: white;
	padding: 0.5em 3em;
	text-transform: uppercase;
	font-family: Jost, sans-serif;
	font-size: clamp(14pt, 3vw, 32pt)
}

.request-art:hover {
	background-color: white;
	color: black;
}

nav {
	font-size: clamp(18pt, 6vw, 48pt);
	display: flex;
	flex-direction: column;
	letter-spacing: 0.2em;
	width: fit-content;
	margin-left: auto;
}

/* nav > a {
	padding: 0.25em;
} */

a { margin-top: 0.5; margin-bottom: 0.5; }
p { line-height: normal; margin: 0; }

footer.social {
	display: flex;
	justify-content: flex-end;
	text-align: right;
	gap: 1rem;
}

.more-links > summary {
	list-style: none;
	display: inline;
	vertical-align: top;
	user-select: none;
	cursor: pointer;
}

.more-links[open] > summary {
	display: inline-flex;
}

.more-links > summary::marker {
	display: none;
}

footer img {
	image-rendering: optimizeQuality;
}

button {
	background: transparent;
	border: 2px solid white;
	color: white;
	padding: 1em;
	font-family: Jost, sans-serif;
}