/**
 * Front page styles.
 */

/* Hero
--------------------------------------------- */

.tf-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: calc(100svh - 80px);
	overflow: hidden;
	background-color: #000000;
	background-image: var(--tf-hero-background-image);
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
}

/*
 * 左側のテキストを読みやすくする黒グラデーション。
 * 背景画像自体は加工せず、表示時にCSSで調整する。
 */
.tf-hero::before {
	position: absolute;
	inset: 0;
	z-index: 0;
	content: "";
	pointer-events: none;
	background:
		linear-gradient(
			90deg,
			rgba(0, 0, 0, 0.94) 0%,
			rgba(0, 0, 0, 0.9) 24%,
			rgba(0, 0, 0, 0.78) 40%,
			rgba(0, 0, 0, 0.52) 54%,
			rgba(0, 0, 0, 0.22) 68%,
			rgba(0, 0, 0, 0) 82%
		);
}

.tf-hero__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: center;
	padding-block: var(--tf-space-8);
}

.tf-hero__content {
	display: grid;
	grid-column: 1;
	justify-items: start;
	gap: var(--tf-space-5);
	max-width: 35rem;
}

.tf-hero__eyebrow {
	margin: 0;
	color: rgba(255, 255, 255, 0.74);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	line-height: 1.4;
	text-transform: uppercase;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.tf-hero__title {
	display: grid;
	margin: 0;
	color: #ffffff;
	font-size: clamp(2.75rem, 7vw, 6.5rem);
	font-weight: 700;
	letter-spacing: -0.04em;
	line-height: 0.82;
	text-shadow: 0 2px 14px rgba(0, 0, 0, 0.42);
}

.tf-hero__title-line {
	display: block;
}

.tf-hero__description {
	max-width: 34rem;
	margin: 0;
	color: rgba(255, 255, 255, 0.88);
	font-size: clamp(1rem, 2vw, 1.25rem);
	line-height: 1.8;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.tf-hero .tf-button--primary {
	color: #ffffff;
	background-color: rgba(0, 0, 0, 0.38);
	border-color: rgba(255, 255, 255, 0.84);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
    min-height: 3rem;
	padding: 0.75rem 1.5rem;
}

.tf-hero .tf-button--primary:hover {
	color: #111111;
	background-color: #ffffff;
	border-color: #ffffff;
}

.tf-hero .tf-button--primary:focus-visible {
	outline-color: #ffffff;
}

/* Mobile
--------------------------------------------- */

@media (max-width: 767px) {
	.tf-hero {
		align-items: end;
		min-height: calc(100svh - 70px);
		background-position: 68% center;
	}

	/*
	 * モバイルでは横方向より縦方向のグラデーションを強める。
	 * 上部の人物を見せつつ、下部のテキスト領域を暗くする。
	 */
	.tf-hero::before {
		background:
			linear-gradient(
				180deg,
				rgba(0, 0, 0, 0.16) 0%,
				rgba(0, 0, 0, 0.28) 34%,
				rgba(0, 0, 0, 0.68) 68%,
				rgba(0, 0, 0, 0.92) 100%
			);
	}

	.tf-hero__inner {
		grid-template-columns: minmax(0, 1fr);
		align-items: end;
		padding-top: clamp(15rem, 50vh, 30rem);
		padding-bottom: var(--tf-space-7);
	}

	.tf-hero__content {
		grid-column: 1;
		gap: var(--tf-space-4);
		max-width: 30rem;
	}

	.tf-hero__title {
		font-size: clamp(3rem, 17vw, 5.25rem);
		line-height: 0.84;
	}

	.tf-hero__description {
		max-width: 28rem;
		font-size: 1rem;
		line-height: 1.7;
	}

	.tf-hero .tf-button--primary {
		min-height: 2.875rem;
		padding-inline: 1.25rem;
	}
}

/* Small mobile
--------------------------------------------- */

@media (max-width: 420px) {
	.tf-hero {
		background-position: 72% center;
	}

	.tf-hero__inner {
		padding-top: clamp(13rem, 46vh, 24rem);
		padding-bottom: var(--tf-space-6);
	}

	.tf-hero__eyebrow {
		font-size: 0.6875rem;
		letter-spacing: 0.13em;
	}

	.tf-hero__title {
		font-size: clamp(2.75rem, 16vw, 4.5rem);
	}

	.tf-hero__description {
		font-size: 0.9375rem;
	}
}

/* Desktop
--------------------------------------------- */

@media (min-width: 768px) {
	.tf-hero {
		background-position: center center;
	}

	.tf-hero__inner {
		padding-block: var(--tf-space-9);
	}
}

/* Featured games
--------------------------------------------- */

.tf-featured-games {
	background-color: var(--tf-color-background);
}

.tf-games-grid {
	display: grid;
	gap: var(--tf-space-7);
}

.tf-game-card {
	overflow: hidden;
	border: 1px solid var(--tf-color-border);
	border-top: 4px solid var(--tf-game-accent, var(--tf-color-text));
	border-radius: var(--tf-radius-large);
	background-color: var(--tf-color-background);
	transition:
		transform var(--tf-transition-normal),
		box-shadow var(--tf-transition-normal);
}

.tf-game-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 45px rgba(0, 0, 0, 0.1);
}

.tf-game-card__link {
	display: block;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.tf-game-card__visual {
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background-color: var(--tf-color-surface);
}

.tf-game-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 500ms ease;
}

.tf-game-card:hover .tf-game-card__image {
	transform: scale(1.025);
}

.tf-game-card__placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	color: var(--tf-color-text-muted);
	background:
		linear-gradient(
			135deg,
			#e6e6e6 0%,
			#f6f6f6 50%,
			#dddddd 100%
		);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.16em;
}

.tf-game-card__content {
	display: grid;
	justify-items: start;
	gap: var(--tf-space-4);
	padding: var(--tf-space-6);
}

.tf-game-card__category {
	margin: 0;
	color: var(--tf-game-accent, var(--tf-color-text-muted));
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.tf-game-card__title {
	margin: 0;
	color: var(--tf-color-text);
	font-size: clamp(1.5rem, 3vw, 2rem);
	line-height: 1.35;
}

.tf-game-card__description {
	margin: 0;
	color: var(--tf-color-text-muted);
	line-height: 1.8;
}

.tf-game-card__platforms {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tf-space-2);
	padding: 0;
	margin: var(--tf-space-2) 0 0;
	list-style: none;
}

.tf-game-card__platforms li {
	padding: 0.35rem 0.75rem;
	border: 1px solid var(--tf-color-border);
	border-radius: 999px;
	color: var(--tf-color-text-muted);
	font-size: 0.75rem;
	line-height: 1.4;
}

.tf-featured-games__empty {
	margin: 0;
	color: var(--tf-color-text-muted);
}

@media (min-width: 768px) {
	.tf-games-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* News
--------------------------------------------- */

.tf-news {
	background-color: var(--tf-color-surface);
}

.tf-news__archive-link {
	flex: 0 0 auto;
}

.tf-news-list {
	border-top: 1px solid var(--tf-color-border);
}

.tf-news-item {
	margin: 0;
	border-bottom: 1px solid var(--tf-color-border);
}

.tf-news-item__link {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: var(--tf-space-4);
	padding-block: var(--tf-space-5);
	color: inherit;
	text-decoration: none;
	transition:
		opacity var(--tf-transition-fast),
		padding-inline var(--tf-transition-fast);
}

.tf-news-item__link:hover {
	opacity: 0.62;
}

.tf-news-item__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--tf-space-3);
}

.tf-news-item__date {
	color: var(--tf-color-text-muted);
	font-size: 0.8125rem;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.06em;
	white-space: nowrap;
}

.tf-news-item__category {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: max-content;
	min-width: 0;
	padding: 0.3rem 0.75rem;
	border: 1px solid var(--tf-color-border);
	border-radius: 999px;
	color: var(--tf-color-text-muted);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
	white-space: nowrap;
}
.tf-news-item__title {
	grid-column: 1;
	margin: 0;
	color: var(--tf-color-text);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.7;
}

.tf-news-item__arrow {
	grid-column: 2;
	grid-row: 1 / span 2;
	color: var(--tf-color-text-muted);
	transition: transform var(--tf-transition-fast);
}

.tf-news-item__link:hover .tf-news-item__arrow {
	transform: translateX(0.25rem);
}

.tf-news__empty {
	margin: 0;
	color: var(--tf-color-text-muted);
}

/* News: tablet and desktop
--------------------------------------------- */

@media (min-width: 768px) {
	.tf-news-item__link {
		grid-template-columns:
			max-content
			minmax(0, 1fr)
			auto;
		align-items: center;
		column-gap: var(--tf-space-5);
	}

	.tf-news-item__meta {
		display: flex;
		grid-column: 1;
		grid-row: 1;
		align-items: center;
		gap: var(--tf-space-4);
		width: max-content;
		white-space: nowrap;
	}

	.tf-news-item__date {
		flex: 0 0 auto;
	}

	.tf-news-item__category {
		flex: 0 0 auto;
		width: max-content;
		min-width: 0;
		white-space: nowrap;
	}

	.tf-news-item__title {
		grid-column: 2;
		grid-row: 1;
		width: 100%;
		min-width: 0;
		margin: 0;
		text-align: left;
	}

	.tf-news-item__arrow {
		grid-column: 3;
		grid-row: 1;
	}
}

/* News: mobile
--------------------------------------------- */

@media (max-width: 767px) {
	.tf-news-item__link {
		padding-block: var(--tf-space-5);
	}

	.tf-news-item__title {
		padding-right: var(--tf-space-3);
	}

	.tf-news-item__category {
		min-width: 0;
	}
}

/* Responsive
--------------------------------------------- */

@media (min-width: 768px) {
	.tf-hero {
		padding-block: var(--tf-space-8);
	}

	.tf-hero__inner {
		grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	}

	.tf-games-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tf-news-item__link {
		/*grid-template-columns: 8rem minmax(0, 1fr);*/
		align-items: baseline;
		gap: var(--tf-space-6);
	}
}