/* imports */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;600&display=swap');

/* variables */
:root {
	--aspect-ratio: 0.667;
	--border-radius: 3px;
	--box-shadow: 0 8px 32px rgba(0,0,0,0.2), 0 2px 8px rgba(0,0,0,0.3);
	--color-accent: #d82914;
	--color-background: #141414;
	--color-text: #ffffff;
	--font-family-body: 'Poppins', sans-serif;
	--font-family-heading: 'Poppins', sans-serif;
	--gap: 2rem;
	--gutter: 2rem;
	--thumb-space: 1rem;
	--transition: 0.2s;
	--card-count: 2; /* how many cards per row */
}

/* typography */
a {
	color: var(--color-accent);
	font-family: var(--font-family-body);
}

button,
input {
	font-family: var(--font-family-body);
	font-weight: bold;
}

input[type="checkbox"] {
	accent-color: var(--color-accent);
}

caption,
label,
li,
p,
span,
td,
th {
	color: var(--color-text);
	font-family: var(--font-family-body);
}

figcaption {
	color: var(--color-text);
	font-family: var(--font-family-body);
	font-weight: bold;
	text-align: center;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--color-text);
	font-family: var(--font-family-heading);
}

/* style */
::-webkit-scrollbar { 
	display: none; 
}

body {
	background: var(--color-background);
	margin: 0;
	user-select: none;
	width: 100%;
}

dialog {
	background: var(--color-background);
	border: none;
	border-radius: var(--border-radius);
	box-sizing: border-box;
	padding: var(--gap);
	max-width: min(80vw, 50rem);
	z-index: 150;
}

dialog::backdrop {
  background-color: rgba(0,0,0,0.8);
}

dialog form {
	display: flex;
	flex-direction: column;
}

dialog form button {
	align-self: center;
	cursor: pointer;
}

footer {
	box-sizing: border-box;
	padding: var(--gap);
	text-align: center;
	width: 100%;
}

header {
	box-sizing: border-box;
	color: var(--color-text);
	display: flex;
	gap: var(--gap);
	justify-content: flex-end;
	padding: var(--gap);
	position: absolute;
		left: 0;
		right: 0;
		top: 0;
	z-index: 50;
}

main {
	margin-top: calc(((((100vw - (2 * var(--gutter)) - ((var(--card-count) - 1) * var(--thumb-space))) / var(--card-count)) / var(--aspect-ratio)) + 3rem + clamp(1.19rem, 0.41vw + 1.09rem, 1.41rem) - 10vh) * -1);
}

main section:first-child h2 {
	margin-top: 0;
}

#countdown {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	margin: 1rem auto;
	text-align: center;
	width: 60ch;
	max-width: 80vw;
}

#countdown p {
	margin: 0;
	text-shadow: 0 1px 4px rgb(0 0 0 / 40%), 0 2px 8px rgb(0 0 0 / 20%), 0 0 16px rgb(0 0 0 / 30%);
}

#hero {
	align-items: center;
	box-sizing: border-box;
	display: flex;
	height: 90vh;
	justify-content: center;
	overflow: hidden;
	padding-bottom: calc(((((100vw - (2 * var(--gutter)) - ((var(--card-count) - 1) * var(--thumb-space))) / var(--card-count)) / var(--aspect-ratio)) + 3rem + (clamp(1.19rem, 0.41vw + 1.09rem, 1.41rem)*1.414)) - 10vh);
	position: relative;
	user-select: none;
	width: 100%;
	z-index: -100;
}

#hero > img {
	display: block;
	filter: blur(5px) brightness(0.8);
	filter: blur(5px) brightness(0.8);
	height: 100%;
	mask-image: linear-gradient(to top,
		hsla(0, 0%, 0%, 0) 0%,
		hsla(0, 0%, 0%, 0.2) 5%,
		hsla(0, 0%, 0%, 0.8) 15%,
		hsla(0, 0%, 0%, 1.0) 25%
  	);
	-webkit-mask-image: linear-gradient(to top,
		hsla(0, 0%, 0%, 0) 0%,
		hsla(0, 0%, 0%, 0.2) 5%,
		hsla(0, 0%, 0%, 0.8) 15%,
		hsla(0, 0%, 0%, 1.0) 25%
  	);
	object-fit: cover;
	position: absolute;
		left: 0;
		right: 0;
		top: 0;
	width: 100%;
}

.hero-text {
	box-sizing: border-box;
	padding: var(--gap);
	position: relative;
	text-align: center;
	width: 100%;
	z-index: 100;
}

#hero-title,
#hero-header,
#hero-copy {
	margin: 0;
	text-shadow: 0 1px 4px rgb(0 0 0 / 40%), 0 2px 8px rgb(0 0 0 / 20%), 0 0 16px rgb(0 0 0 / 30%);
}

#hero-button {
	font-weight: bold;
	line-height: normal;
	margin: 1rem;
}

.button-1,
.button-2 {
	border: none;
	border-radius: var(--border-radius);
	display: inline-block;
	font-weight: bold;
	padding: 1em 2em;
	text-decoration: none;
}

.button-1 {
	background: var(--color-accent);
	box-shadow: var(--box-shadow);
	color: var(--color-text);
}

.button-2 {
	background: transparent;
	box-shadow: 0 0 0 2px var(--color-accent) inset;
	color: var(--color-accent);
}

.card {
	aspect-ratio: var(--aspect-ratio);
	background: var(--color-background);
	border-radius: var(--border-radius);
	box-shadow: var(--box-shadow);
	color: var(--color-text);
	overflow: hidden;
	position: relative;
	scroll-snap-align: start;
	scroll-margin: var(--gutter);
	text-align: center;
	transition: var(--transition);
	width: calc((100vw - (2 * var(--gutter)) - ((var(--card-count) - 1) * var(--thumb-space))) / var(--card-count));
}

.card:hover {
	transform: translateY(-0.5rem);
}

.card > div {
	align-items: center;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 2ch;
	position: absolute;
	  top: 0;
	  right: 0;
	  bottom: 0;
	  left: 0;
}

.card > div img {
	height: 2rem;
	-webkit-filter: drop-shadow(0 1px 2px black) drop-shadow(0 1px 8px black);
  	filter: drop-shadow(0 1px 2px black) drop-shadow(0 1px 8px black);
	margin-bottom: 0.5rem;
	object-fit: contain;
	max-width: 100%;
}

.card > div p {
	margin: 0;
	text-shadow: 0 1px 2px black, 0px 1px 8px black
}

.card > div .card-text-day {
	line-height: 1;
}

.card > div .card-text-month {
	line-height: 1;
	text-transform: uppercase;
}

.card > img {
	filter: contrast(0.9) brightness(0.8);
	height: 100%;
	object-fit: cover;
	width: 100%;
	transition: var(--transition);
}

.card.inactive {
	filter: grayscale(1) contrast(0.7) brightness(0.6);
}

.bold {
	font-weight: bold;
}

.hidden {
	display: none;
}

.shadow {
	text-shadow: 0 1px 4px rgb(0 0 0 / 40%), 0 2px 8px rgb(0 0 0 / 20%), 0 0 16px rgb(0 0 0 / 30%);
}

.icon {
	color: var(--color-text);
	cursor: pointer;
	transition: var(--transition);
}

.icon:hover {
	color: var(--color-accent);
}

.nav-left,
.nav-right {
	align-items: center;
	background: rgba(0,0,0,0.3);
	bottom: 2rem;
	color: var(--color-text);
	cursor: pointer;
	display: none;
	justify-content: center;
	opacity: 0;
	position: absolute;
	top: 1rem;
	transition: var(--transition);
	width: calc(var(--gutter) - var(--thumb-space));
	z-index: 100;
}

.nav-right {
	border-radius: var(--border-radius) 0 0 var(--border-radius);
	right: -5rem;
	transition: var(--transition);
}

.nav-left {
	border-radius: 0 var(--border-radius) var(--border-radius) 0;
	left: -5rem;
	transition: var(--transition);
}

.nav-left:hover,
.nav-right:hover {
	background: rgba(0,0,0,0.7);
}

.nav-left svg,
.nav-right svg {
	transition: var(--transition);
}

.nav-left:hover svg,
.nav-right:hover svg {
	transform: scale(1.3);
}

.nav-right.visible {
	right: 0;
}

.nav-left.visible {
	left: 0;
}

.slider-outer {
	position: relative;
}

.slider-mid {
	box-sizing: border-box;
	overflow-x: scroll;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	width: 100%;
}

.slider-inner {
	display: flex;
	gap: var(--thumb-space);
	padding: 1rem var(--gutter) 2rem var(--gutter);
	width: fit-content;
}

.slider-inner:hover .nav-left,
.slider-inner:hover .nav-right {
	opacity: 1.0;
}

.slider-title {
	margin: var(--gutter) var(--gutter) 0 var(--gutter);
	text-transform: capitalize;
}

.slider-title a {
	color: white;
	text-decoration: none;
}

.slider-title img {
	height: 2rem;
}

.unavailable {
	filter: contrast(0.7) brightness(0.4);
}

.text-size-xs,
.text-size-s,
.text-size-m,
.text-size-l,
.text-size-xl,
.text-size-2xl,
.text-size-3xl {
	line-height: 1.414;
}

.text-size-xs {
	font-size: clamp(0.71rem, -0.38vw + 0.8rem, 0.5rem);
}

.text-size-s {
	font-size: clamp(0.84rem, -0.24vw + 0.9rem, 0.71rem);
}

.text-size-m {
	font-size: clamp(1rem, 0vw + 1rem, 1rem);
}

.text-size-l {
	font-size: clamp(1.19rem, 0.41vw + 1.09rem, 1.41rem);
}

.text-size-xl {
	font-size: clamp(1.41rem, 1.07vw + 1.15rem, 2rem);
}

.text-size-2xl {
	font-size: clamp(1.68rem, 2.08vw + 1.16rem, 2.83rem);
}

.text-size-3xl {
	font-size: clamp(2rem, 3.64vw + 1.09rem, 4rem);
}

.text-size-4xl {
	font-size: clamp(2.38rem, 5.96vw + 0.89rem, 5.66rem);
}

/* ipad screens */
@media only screen and (min-width: 768px) {
	:root {
		--card-count: 3; /* how many cards per row */
	}
}

/* small pc */
@media only screen and (min-width: 1024px) {
	:root {
		--card-count: 4; /* how many cards per row */
		--gutter: 5rem;
	}
}

/* pc */
@media only screen and (min-width: 1366px) {
	:root {
		--card-count: 6; /* how many cards per row */
	}
}

/* big pc */
@media only screen and (min-width: 1920px) {
	:root {
		--card-count: 8; /* how many cards per row */
	}
}

/* landscape */
@media only screen and (orientation: landscape) {
	/*
	:root {
		--aspect-ratio: 1.5;
	}
	*/
}

/* non-touch devices */
@media (hover: hover) {
	.nav-left,
	.nav-right {
		display: flex;
	}
}
