:root {
	--font-sans: "Noto Sans JP", sans-serif;
	--font-serif: "Noto Serif JP", serif;
	--color-main: black;
	--color-sub: rgb(108, 107, 125);
}

body {
	margin: 0;
	color: var(--color-main);
	font-size: 18px;
	font-family: var(--font-sans);
	overflow-x: hidden;
	background: #f9f9fa;
}

h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-serif);
	font-weight: normal;
	text-align: center;
}

img {
	width: 100%;
}

section {
	width: 100%;
	max-width: 800px;
	margin: auto;
	margin-block-end: 10rem;
	
	iframe {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 9;
		margin-inline: auto;
	}
}

h2 {
	font-size: 3em;
}

p,
small {
	width: 100%;
	padding-inline: 2em;
	margin-inline: 0;
	box-sizing: border-box;
	z-index: 10;
	text-align: justify;
	margin-block: 0.5em;
	line-height: 1.8em;
}

dl,
dt,
dd {
	margin: 0;
}

/* ボタン */

.button {
	text-decoration: none;
	background: linear-gradient(to right, rgb(255, 174, 192), rgb(197, 109, 219));
	color: white;
	font-weight: bold;
	padding: 10px;
	width: 270px;
	box-sizing: border-box;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: filter 0.3s;

	&:hover {
		filter: drop-shadow(0 0 6px rgb(169, 228, 255));
	}
}

.button-list {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	justify-content: center;
	margin-block: 16px;
}

/* Steamウィジェット */

.steam {
	max-width: 100%;
	overflow: scroll;
}

/* ヘッダ */

#header {
	color: var(--color-main);
	font-family: var(--font-serif);
	position: fixed;
	top: 0;
	z-index: 1000;
	width: 100%;
	display: flex;
	justify-content: center;
	padding: 10px 20px;
	box-sizing: border-box;
	background: white;

	nav {
		ul {
			list-style: none;
			display: flex;
			margin: 0;
			padding: 0;

			li {
				margin-left: 20px;

				a {
					color: var(--color-main);
					text-decoration: none;
					font-size: 18px;
					transition: color 0.3s;

					&:hover {
						color: var(--color-sub);
					}
				}
			}
		}
	}

	.menu-icon {
		display: none;
		cursor: pointer;
		z-index: 99999;

		.bar {
			width: 35px;
			height: 5px;
			background-color: var(--color-main);
			margin: 7px 0;
			transition: 0.4s;
		}
	}

	.change {
		.bar1 {
			transform: translateY(12px) rotate(-45deg);
		}

		.bar2 {
			opacity: 0;
		}

		.bar3 {
			transform: translateY(-12px) rotate(45deg);
		}
	}
}

@media screen and (orientation: portrait) {
	#header {
		padding: 0;
		nav {
			ul {
				flex-direction: column;
				background: white;
				position: fixed;
				top: 0;
				right: 0;
				height: 100%;
				width: 240px;
				max-width: 300px;
				z-index: 999;
				padding-top: 60px;
				transition: transform 0.3s ease, opacity 0.3s ease;
				transform: translateX(100%);
				opacity: 0;

				&.show {
					transform: translateX(0);
					opacity: 1;
				}

				li {
					margin: 0;

					a {
						color: var(--color-main);
						padding: 15px;
						display: block;
					}
				}
			}
		}

		.menu-icon {
			display: block;
			position: absolute;
			right: 20px;
			top: 15px;
		}
	}
}

/* セクション別設定*/

#main-visual {
	max-width: none;
	position: relative;

	#visual {
		width: 100%;
		height: auto;
		max-height: 100svh;
		object-fit: contain;
		object-position: 50% 0;
	}
	#logo {
		position: absolute;
		top: 7%;
		left: 50%;
		transform: translateX(-50%);
		width: 92%;
		max-width: 800px;
	}
	#main-info {
		p {
			padding: 0;
			margin: 0;
		}

		#release-date {
			text-align: center;
			font-size: 56px;
			color: #0e489f;
			font-family: var(--font-serif);
			a {
				border: #0e489f 1.2px solid;
				padding: 6px;
				text-decoration: none;
				filter: drop-shadow(0 0 8px white);
				&:visited {
					color: inherit;
				}
				&:hover {
					color: white;
					border-color: white;
					background-color: #0e489f99;
				}
			}
		}
		.main-links {
			display: flex;
			justify-content: center;
			gap: 16px;
			font-size: 15px;
			flex-direction: column;
			flex: 0;
			align-items: center;
			margin-block-start: 10px;
		}

		@media (min-aspect-ratio: 9 / 16) {
			transform: translateY(-24vh);

			.main-links {
				flex-direction: row;
			}
		}
	}
}

#caution {
	h2 {
		font-size: 2.4rem;
	}
}

#news {
	article {
		font-size: 0.9rem;
	}
}

#music {
	p {
		text-align: center;
	}
}

#movies {
	font-family: var(--font-serif);
	h3 {
		font-size: 1.5em;
	}
	dl {
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	dt {
		margin-block-start: 2em;
		font-size: 0.7em;
	}
	dd {
		font-size: 1.1em;
	}
}

#introduction {
	text-align: center;

	h2 {
		font-size: 2.3em;
	}
	p,
	blockquote {
		text-align: justify;
		margin-block: 1.3em;
		line-height: 2em;
	}
	blockquote {
		font-size: 1.4em;
		margin-inline: 0;
		margin-block: 3em;
	}
}

#story {
	text-align: center;
	font-family: var(--font-serif);

	p,
	blockquote {
		text-align: center;
		margin-block: 1.3em;
		line-height: 2em;
	}
	p {
		word-break: keep-all;
		overflow-wrap: break-word;
	}
	blockquote {
		font-size: 1.4em;
		margin-inline: 0;
	}
}

#characters {
	.character {
		position: relative;
		overflow: hidden;
		display: flex;
		flex-direction: column;
		align-items: center;
		margin-block: 3rem;

		img {
			width: 240%;
			max-width: 1200px;
			transform: translateX(5%);
			mask-image: linear-gradient(
				to bottom,
				rgba(0, 0, 0, 1) 40%,
				rgba(0, 0, 0, 0.4) 50%,
				rgba(0, 0, 0, 0.2) 70%,
				transparent 90%
			);
			position: absolute;
			filter: drop-shadow(-50px 10px 0 var(--color-shadow));
		}
		.character-name {
			font-family: var(--font-serif);
			position: absolute;
			top: min(70vh, 900px);
			width: 100%;
			padding-inline-end: 8vw;
			color: var(--color-name);

			h3 {
				font-size: 4em;
				margin: 0;
				text-align: end;
			}
			p {
				font-size: 2.4em;
				margin: 0;
				padding: 0;
				padding-inline-end: 0.2em;
				text-align: end;
			}
		}
		blockquote {
			writing-mode: vertical-rl;
			font-size: 1.6rem;
			position: absolute;
			margin: 0;
			top: 3rem;
			left: 10%;
			max-height: calc(70vh - 4rem);
			background: white;
			font-family: var(--font-serif);
			color: var(--color-name);
		}
		p {
			text-align: start;
			word-break: keep-all;
			overflow-wrap: break-word;
		}
		.caution-from-hatsune {
			color: rgb(213, 19, 38);
			font-weight: bold;
			text-align: end;
		}
		small {
			font-size: 1.1em;
			color: var(--color-sub);
			text-align: start;
		}
	}
	.character > p:first-of-type {
		margin-block-start: min(108vh, 1150px);
	}
	#hikaru {
		--color-name: #103772;
		--color-shadow: rgb(192, 212, 255);
	}
	#aoi {
		--color-name: #a12150;
		--color-shadow: rgb(255, 187, 228);
	}
	#mio {
		--color-name: #e65517;
		--color-shadow: rgb(255, 220, 164);
	}
	#hatsune {
		--color-name: #632b76;
		--color-shadow: rgb(193, 172, 228);
	}
	#haruka {
		--color-name: #0c525a;
		--color-shadow: rgb(156, 216, 206);
	}
	#natsuki {
		--color-name: rgb(150, 27, 27);
		--color-shadow: rgb(234, 137, 137);
	}
	#akiho {
		--color-name: rgb(25, 70, 116);
		--color-shadow: rgb(146, 176, 227);
	}
	#fuyu {
		--color-name: rgb(106, 104, 111);
		--color-shadow: rgb(170, 166, 175);
	}
	#kajiyama {
		--color-name: rgb(37, 62, 25);
		--color-shadow: rgb(148, 168, 127);
	}
	#tachibana {
		--color-name: rgb(81, 44, 44);
		--color-shadow: rgb(218, 165, 127);
	}

	.character.fade-in {
		img {
			transform: translateX(10%);
			filter: drop-shadow(-200px -20px 0 var(--color-shadow));
			transition: transform 1.2s, filter 1.2s;
		}
		blockquote {
			filter: blur(10px);
			opacity: 0;
			transition: filter 1s 0.5s, opacity 1s 0.5s;
		}
		.character-name {
			filter: blur(10px);
			opacity: 0;
			transition: filter 1s 0.9s, opacity 1s 0.9s;
		}

		&.fade-in-visible {
			img {
				transform: translateX(5%);
				filter: drop-shadow(-50px 10px 0 var(--color-shadow));
			}
			blockquote {
				filter: blur(0);
				opacity: 1;
			}
			.character-name {
				filter: blur(0) drop-shadow(0 0 6px white);
				opacity: 1;
			}
		}
	}
}

@media screen and (orientation: landscape) {
	#characters .character {
		img {
			width: auto;
			height: auto;
			transform: none;
		}
		blockquote {
			max-height: 80vh;
		}
	}
}

#staff {
	article {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		margin-block-end: 4rem;

		h3 {
			font-family: var(--font-sans);
			font-size: 1em;
			color: var(--color-sub);
		}
		img {
			border-radius: 100%;
			width: 200px;
			height: 200px;
			object-fit: cover;
			object-position: top;
		}
		h4 {
			font-family: var(--font-serif);
			font-size: 2.1em;
			margin-block: 0.3em;
		}
		p {
			font-size: 0.9em;
		}
		.comment-label {
			font-weight: bold;
			margin-block-start: 2em;
			padding-inline: 3em;
		}
		blockquote {
			margin: 0;
			padding-inline: 3em;
			width: 100%;
			box-sizing: border-box;
			line-height: 1.8em;
			text-align: justify;
			font-size: 0.9em;
		}
	}
}

#specs {
	display: flex;
	flex-direction: column;
	align-items: center;

	dl {
		margin-inline: 10px;
	}
	dt {
		margin-block-start: 20px;
		color: var(--color-sub);
		font-size: 1rem;
	}
}

footer p {
	text-align: center;
	font-size: 0.8rem;
}

.fade-in {
	opacity: 0;
	transition: opacity 0.7s ease-in-out;
}

.fade-in.fade-in-visible {
	opacity: 1;
}

#scroll {
	height: 300vh;
	width: 100%;
	position: relative;

	#quote {
		writing-mode: vertical-rl;
		font-family: var(--font-serif);
		font-size: 1.3em;
		letter-spacing: 0.5em;
		width: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		margin: 0;

		position: sticky;
		top: 0;
		height: 100vh;
		animation: fadeout;
		animation-timeline: view();
		animation-range: contain 0% cover 100%;
	}
}

@keyframes fadeout {
	0% {
		opacity: 1;
		background: transparent;
	}
	30% {
		color: #fb809c;
		background: rgb(2, 7, 20);
		filter: blur(0);
	}
	50% {
		background: rgb(2, 7, 20);
		opacity: 1;
	}
	80% {
		background: transparent;
	}
	100% {
		opacity: 0;
		filter: blur(10px);
	}
}
