/* Query based on tailwind css */
/* https://tailwindcss.com/docs/responsive-design */
/* --mq-xs: '480px'; */
/* --mq-sm: '640px'; */
/* --mq-md: '768px'; */
/* --mq-ml: '992px'; */
/* --mq-lg: '1024px'; */
/* --mq-xl: '1280px'; */
/* --mq-xxl: '1536px'; */

:root {
	--space-xs: 5px;
	--space-s: 10px;
	--space-m: 20px;
	--space-l: 65px;
	--space-block: 30px;
	--space-gap: 10px;
	--space-bottom: 7vw;
	--max-width: 1600px;
	--max-text-width: 450px;
	--max-media-width: 900px;

	--border-radius: 5px;
	--anim-speed: 300ms;
	--anim-ease: ease-in-out;
	--color-black: rgb(20, 20, 20);
	--color-white: #fff;
	--color-gray: #a9a9a9;
	--image-shadow: rgba(149, 157, 165, 0.05) 0px 8px 24px;

	--plyr-color-main: var(--color-accent, #00b3ff);
}

@media (min-width: 992px) {
	:root {
		--max-text-width: 625px;
	}
}

/* ================================== */
/* Base */
/* ================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

::selection {
	background-color: var(--color-selection-bg, #000);
	color: var(--color-selection-fg, #fff);
}

html,
body {
	height: 100%;
	font-size: 16px;
}

body {
	margin: auto;
	background: var(--bg, #fff);
	color: var(--color-black);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: normal;
}

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

picture,
picture img {
	display: block;
	width: 100%;
	height: 100%;
	user-select: none;
}

.page picture {
	box-shadow: var(--image-shadow);
	border-radius: var(--border-radius);
	overflow: hidden;
}

/* ================================== */
/* Typography */
/* ================================== */

body {
	text-size-adjust: none;
	line-height: 1.25;
	font-family: 'Pangolin', Arial, Helvetica, sans-serif;;
	text-rendering: optimizeLegibility;
}

#header {
	font-size: 6vw;
	line-height: 1;
	font-family: 'Darumadrop', Arial, Helvetica, sans-serif;;
}

#page-title {
	font-size: 30px;
	line-height: 1;
	font-family: 'Darumadrop', Arial, Helvetica, sans-serif;;
	text-align: center;
}

.modal-nav {
	color: var(--color-gray);
	font-size: 18px;
	line-height: 1;
	font-family: 'Darumadrop', Arial, Helvetica, sans-serif;;
	user-select: none;
}

.book_title {
	font-size: inherit;
	text-transform: uppercase;
}

.caption,
.book_caption {
	font-size: 12px;
}

@media (min-width: 640px) {
	#header {
		font-size: 20px;
	}
}

@media (min-width: 992px) {
	body {
		font-size: 18px;
	}

	#header {
		font-size: 25px;
	}

	#page-title {
		font-size: 50px;
	}

	.modal-nav {
		font-size: 24px;
	}

	.caption,
	.book_caption {
		font-size: 15px;
		line-height: 1.15;
	}

	.illu_caption {
		font-size: 13px;
	}
}

/* ================================== */
/* Utility Classes */
/* ================================== */

.text-accent {
	color: var(--color-accent, #000);
}

/* ================================== */
/* Main Layout Styles */
/* ================================== */

#main {
	transition: opacity var(--anim-speed) var(--anim-ease);
}

#main.main-is-hidden {
	opacity: 0;
}

body.tpl-home #main {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
}

.page {
	padding: var(--space-m) 0;
	padding-bottom: var(--space-l);
}

#modal .page,
body.tpl-book .page {
	padding-top: calc(var(--space-l) * 1.5);
}

#page-title {
	margin-bottom: var(--space-m);
}

#modal #page-title,
body.tpl-book #page-title {
	margin-bottom: 0;
}

@media (max-width: 768px) {
	#modal #page-title,
	body.tpl-book #page-title {
		padding: 0 var(--space-m);
	}
}

@media (min-width: 992px) {
	.page {
		padding-bottom: calc(var(--space-l) * 2);
	}

	#modal .page,
	body.tpl-book .page {
		padding-top: calc(var(--space-l) * 2);
	}

	#page-title {
		margin-bottom: var(--space-l);
	}

	#modal #page-title,
	body.tpl-book #page-title {
		margin: auto;
		max-width: 80%;
	}
}

/* ================================== */
/* Modal Layout Styles */
/* ================================== */

#modal {
	display: block;
	position: fixed;
	top: 0;
	left: 0;
	opacity: 0;
	z-index: 2;
	transition: opacity var(--anim-speed) var(--anim-ease);
	background: var(--bg, #fff);
	width: 100%;
	height: 100%;
	max-height: 100vh;
	pointer-events: none;
}

#modal-wrapper {
	position: relative;
	width: 100%;
	height: 100%;
	overflow-x: hidden;
	overflow-y: scroll;
}

body.modal-is-open {
	overflow: hidden;
}

body.modal-is-open #modal {
	opacity: 1;
	pointer-events: all;
}

#modal-wrapper {
	transition: opacity var(--anim-speed) var(--anim-ease);
}

#modal-wrapper.modal-is-hidden {
	opacity: 0;
}

.modal-nav {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 3;
	padding: var(--space-m) 0 15px 0;
	width: 100%;
	color: var(--color-navigation, #000);
	user-select: none;
}

.modal-nav > a,
.modal-nav > .close-modal {
	display: block;
	margin-right: var(--space-block);
	margin-left: auto;
	width: fit-content;
}

@media (hover: hover) {
	.modal-nav > .close-modal {
		transition: color var(--anim-speed) var(--anim-ease);
	}
	.modal-nav > .close-modal:hover {
		color: var(--color-black);
	}
}

/* ================================== */
/* Error Page Styles */
/* ================================== */

body.tpl-error #main {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 100%;
}

body.tpl-error #main #page-title {
	margin-bottom: var(--space-m);
}

body.tpl-error #main a {
	color: inherit;
}
