@import url('reset.css');
@import url('https://fonts.googleapis.com/css2?family=Josefin+Slab:wght@300&display=swap');

@keyframes fadeIn {
	0%   { opacity: 0; }
	100% { opacity: 1; }
}
@keyframes scaleIn {
	0%   { transform: scale(1); }
	100% { transform: scale(1.2); }
}
@keyframes blurOut {
	to {
		filter: blur(4px) grayscale(100%);
		transform: scale(.9);
		opacity: .2;
	}
}
@keyframes returnFromBlur {
	0% {
		filter: blur(4px) grayscale(100%);
		transform: scale(.9);
		opacity: .2;
	}
	100% {
		filter: none;
		transform: none;
		opacity: 1;
	}
}
@keyframes slideFooter {
	0% {
		bottom: 0;
		opacity: 0;
	}
	100% {
		bottom: .75em;
		opacity: 1;
	}
}
@keyframes slideFooterHalted {
	0% {
		bottom: 0;
		opacity: 0;
	}
	50% {
		bottom: 0;
		opacity: 0;
	}
	100% {
		bottom: .75em;
		opacity: 1;
	}
}


* {
	box-sizing: border-box;
}


html {
	background: #000;
	height: 100%;
}

body {
	height: 100%;
	font-family: Avenir, Helvetica, sans-serif;
	color: #fff;
	line-height: 1.4;
}

a {
	color: #56bc8a;
	text-decoration: none;
}
a:hover,
a:active {
	color: #5cc993;
	text-decoration: underline;
}

h1 {
	font-size: 3em;
	font-family: "Josefin Slab", Georgia, serif;
}
h2 {
	font-size: 2em;
	font-family: "Josefin Slab", Georgia, serif;
}

em {
	font-style: italic;
}

small {
	font-size: 70%;
}

[type="checkbox"] {
	margin-right: 1ex;
}

article p + p {
	margin-top: .7em;
}

.swipe {
	overflow: hidden;
	visibility: hidden;
	position: relative;
	height: 100%;
}
.swipe-wrap {
	overflow: hidden;
	position: relative;
	height: 100%;
}

.slide {
	position: relative;
	height: 100%;
	max-height: 100%;
	padding: 3em 4em;
	float: left;
	width: 100%;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;

	&.cover {
		background: #000;
	}
	&.not-in-front {
		visibility: hidden;
	}

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

	> p {
		margin-top: -20vh;
		max-width: 40em;
		padding-bottom: 1.4em;
	}
	> .title {
		color: hsl(0, 0%, 30%);
		position: absolute;
		bottom: .75em;
		font-family: Avenir, Helvetica, sans-serif;
		font-size: .82em;
	}
}
.about-is-open .slide img,
.home.about-is-open .slide.cover {
	animation: .4s ease-in-out forwards blurOut;
}
.about-is-closed .slide img,
.home.about-is-closed .slide.cover {
	animation: .4s ease-in-out forwards returnFromBlur;
}

.previous,
.next {
	visibility: hidden;
	height: 100%;
	position: fixed;
	width: 30%;
	top: 0;
	left: 0;
	cursor: pointer;
	transition: opacity .4s ease-in-out;

	.initialized & {
		visibility: visible;
	}
	.about-is-open & {
		opacity: 0;
	}

	&::after {
		content: "";
		pointer-events: none;
		position: relative;
		top: 50%;
		display: block;
		width: 3em;
		height: 3em;
		margin: -1.5em 1.5em 0 1.5em;
		float: left;
		border-top: 1px solid hsl(0, 0%, 20%);
		border-left: 1px solid hsl(0, 0%, 20%);
		transform: rotate(-45deg);
		transition: border-color .8s ease-in-out;
	}

	&:hover::after {
		border-color: hsl(0, 0%, 60%);
		transition: border-color .3s ease-in-out;
	}
	&:active::after {
		border-color: hsl(0, 0%, 100%);
	}
}
.next {
	left: auto;
	right: 0;

	.at-end & {
		display: none;
	}
	&::after {
		float: right;
		transform: rotate(135deg);
	}
}

.fullscreen {
	width: 50px;
	height: 50px;
	display: none;
	position: fixed;
	top: 5px;
	right: 5px;
	cursor: pointer;
	text-align: right;
	transition: opacity .4s ease-in-out;

	svg {
		transition: all 1.5s ease-in-out;
	}
	path {
		stroke: hsl(0, 0%, 30%);
		transition: stroke .8s ease-in-out;
	}
	&:hover path {
		stroke: hsl(0, 0%, 60%);
		transition: stroke .4s ease-in-out;
	}
	&:active path {
		stroke: hsl(0, 0%, 100%);
	}

	.is-fullscreen & svg {
		transform: rotate(-180deg);
	}
	.initialized & {
		display: block;
	}
	.about-is-open & {
		opacity: 0;
	}
}

.back {
	position: fixed;
	top: 5px;
	left: 5px;
	transform: rotate(180deg);

	path {
		stroke: hsl(0, 0%, 30%);
		transition: stroke .8s ease-in-out;
	}
	&:hover path {
		stroke: hsl(0, 0%, 60%);
		transition: stroke .4s ease-in-out;
	}
	&:active path {
		stroke: hsl(0, 0%, 100%);
	}
}

.playbutton {
	cursor: pointer;
	animation: 3s ease-in-out forwards fadeIn;
	path {
		transition: stroke .8s ease-in-out;
	}
	&:hover path {
		stroke: hsl(0, 0%, 60%);
		transition: stroke .4s ease-in-out;
	}
	&:active path {
		stroke: hsl(0, 0%, 100%);
	}
}

header {
	text-align: center;
	position: relative;
	will-change: opacity;
	z-index: 1;
	margin-top: 40px;
	text-shadow: 0 0 .4em #000;

	h1 {
		font-family: "Josefin Slab", Georgia, serif;
		position: relative;
		will-change: opacity;
		animation: 1s ease-in-out forwards fadeIn;
	}
	p {
		color: #ccc;
		font-size: 1.333em;
		font-variant: small-caps;
		text-transform: lowercase;
		text-indent: .8em;
		letter-spacing: .8em;
		position: relative;
		line-height: 1;
		will-change: opacity;
		animation: 2s ease-in-out forwards fadeIn;
	}

	@media (max-width: 480px) {
		h1 {
			font-size: 2em;
		}
		p {
			font-size: 1em;
		}
	}
}


footer {
	position: fixed;
	right: 1em;
	bottom: .75em;
	font-family: Avenir, Helvetica, sans-serif;
	display: none;
	animation: .5s ease-in-out forwards slideFooter;
	transition: opacity .2s ease-in-out;
	font-size: .82em;

	span:last-child {
		color: #ccc;
	}

	.cover & {
		animation: 3s ease-in-out forwards slideFooterHalted;
	}
	.initialized & {
		display: block;
	}
	.about-is-open & {
		opacity: 0;
	}
}


.cover nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	padding: 20px;
	width: 100%;
	max-width: 720px;
	box-sizing: border-box;
}

.thumb {
	width: 100%;
	height: 120px;
	display: flex;
	justify-content: center;
	align-items: center;
	box-shadow: inset 0 0 1px rgba(255, 255, 255, .5);
	text-decoration: none;
	text-align: center;
	position: relative;
	overflow: hidden;
	z-index: 1;
	animation: 2s ease-in-out forwards fadeIn;

	span {
		color: #fff;
		opacity: 0;
	}

	&::before {
		content: "";
		background: #000 no-repeat center center;
		background-size: cover;
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: -1;
		will-change: transform;
		animation: 2s ease-in-out forwards scaleIn;
	}
	&:hover,
	&:active {
		text-decoration: none;
		span {
			text-shadow: 0 0 .4em #000;
			opacity: 1;
			transition: all ease-in-out .8s;
		}
	}

	&.polaroid::before {
		background-image: url("polaroid.jpg");
	}
	&.travel::before {
		background-image: url("travel.jpg");
	}
	&.flamingos::before {
		background-image: url("flamingos.jpg");
	}
	&.wetfeet::before {
		background-image: url("wetfeet.jpg");
	}
}

.about {
	display: none;
	z-index: 2;
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	padding: 3em;
	color: #ccc;
	overflow: auto;

	.about-is-open & {
		display: block;
		animation: .4s ease-out fadeIn;
	}

	& > * {
		max-width: 33rem;
		margin: 0 auto;
	}
	& h2 {
		color: #fff;
	}
	& p {
		margin: 1em auto;
	}
}

.signature {
	font-weight: 500;
	margin-top: 2em;
}

.close {
	position: fixed;
	top: 2em;
	right: 2em;
	opacity: .4;
	transition: opacity .8s ease-in-out;
	&:hover {
		transition: opacity .4s ease-in-out;
		opacity: .8;
	}
	&:active {
		opacity: 1;
	}
}

#matomo-opt-out {
	font-size: 70%;
	color: #ccc;
	strong {
		font-weight: normal;
	}
}
