/*
Theme Name: oku-michi
Theme URI: https://example.com/oku-michi/
Author: oku-michi
Author URI: https://example.com/
Description: シンプルで拡張しやすい WordPress テーマです。
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: oku-michi
*/

:root {
	--color-text: #242722;
	--color-muted: #687067;
	--color-background: #f7f6f1;
	--color-surface: #fff;
	--color-accent: #315b42;
	--color-border: #d9ddd6;
	--color-detail-button: #806d59;
	--color-detail-button-hover: #675645;
	--color-detail-button-text: #fff;
	--content-width: 62.5rem;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	color: var(--color-text);
	background: var(--color-background);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 1rem;
	line-height: 1.75;
}

a {
	color: var(--color-accent);
	text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
	text-decoration-thickness: 0.12em;
}

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

.site-header,
.site-footer {
	background: var(--color-surface);
}

.site-header {
	border-bottom: 1px solid var(--color-border);
}

.site-footer {
	margin-top: 4rem;
	border-top: 1px solid var(--color-border);
}

.site-header__inner,
.site-footer__inner,
.site-main {
	width: min(100% - 2rem, var(--content-width));
	margin-inline: auto;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	min-height: 5rem;
}

.site-title {
	margin: 0;
	font-size: 1.35rem;
	line-height: 1.2;
}

.site-title a {
	color: inherit;
	text-decoration: none;
}

.custom-logo {
	display: block;
	max-height: 3rem;
	width: auto;
}

.site-navigation ul {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-navigation a {
	color: inherit;
	text-decoration: none;
}

.site-main {
	min-height: 60vh;
	padding-block: 3rem;
}

.site-main--front {
	padding-top: clamp(2rem, 5vw, 4rem);
}

.page-header {
	margin-bottom: 2rem;
}

.page-title,
.entry-title {
	line-height: 1.35;
}

.post-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
	gap: 1.5rem;
}

.post-card,
.single-entry {
	padding: clamp(1.25rem, 3vw, 2rem);
	border: 1px solid var(--color-border);
	border-radius: 0.5rem;
	background: var(--color-surface);
}

.post-card {
	position: relative;
	transition:
		border-color 180ms ease,
		box-shadow 180ms ease,
		transform 180ms ease;
}

.post-card .entry-title {
	margin-top: 0;
	font-size: 1.35rem;
}

.post-card .entry-title a {
	color: inherit;
	text-decoration: none;
}

.post-card__type,
.entry-type {
	margin: 0 0 0.5rem;
	color: var(--color-accent);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.entry-type a {
	text-decoration: none;
}

.post-card__thumbnail {
	display: block;
	margin: clamp(-2rem, -3vw, -1.25rem);
	margin-bottom: 1.5rem;
	overflow: hidden;
	border-radius: 0.5rem 0.5rem 0 0;
}

.post-card__thumbnail img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.post-card__more {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	margin-top: 1.5rem;
	padding: 0.7rem 1rem;
	border: 1px solid var(--color-detail-button);
	border-radius: 0.3rem;
	color: var(--color-detail-button-text);
	background: var(--color-detail-button);
	font-weight: 600;
	text-decoration: none;
}

.post-card__more:hover,
.post-card__more:focus-visible {
	border-color: var(--color-detail-button-hover);
	color: var(--color-detail-button-text);
	background: var(--color-detail-button-hover);
}

.entry-meta {
	color: var(--color-muted);
	font-size: 0.9rem;
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content > *:last-child {
	margin-bottom: 0;
}

.home-section + .home-section {
	margin-top: clamp(3.5rem, 8vw, 6rem);
}

.home-section__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--color-border);
}

.home-section__title {
	margin: 0;
	padding-bottom: 0.65rem;
	border-bottom: 0.18rem solid var(--color-accent);
	font-size: clamp(1.5rem, 3vw, 2rem);
	line-height: 1.35;
}

.home-section__archive-link {
	flex-shrink: 0;
	font-size: 0.9rem;
	text-decoration: none;
}

.pagination {
	margin-top: 2rem;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.page-numbers {
	padding: 0.35rem 0.75rem;
	border: 1px solid var(--color-border);
	border-radius: 0.25rem;
	background: var(--color-surface);
	text-decoration: none;
}

.page-numbers.current {
	color: var(--color-surface);
	background: var(--color-accent);
}

.site-footer__inner {
	padding-block: 2rem;
	color: var(--color-muted);
	text-align: center;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	z-index: 100000;
	top: 0.5rem;
	left: 0.5rem;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	clip: auto;
	background: var(--color-surface);
}

@media (min-width: 64.0625rem) {
	.site-main {
		padding-inline: 3rem;
	}

	.post-card__title-link::after {
		position: absolute;
		z-index: 1;
		inset: 0;
		border-radius: inherit;
		content: "";
	}

	.post-card__thumbnail {
		pointer-events: none;
	}

	.post-card:hover,
	.post-card:focus-within {
		border-color: var(--color-accent);
		box-shadow: 0 0.75rem 1.75rem rgb(36 39 34 / 10%);
		transform: translateY(-0.2rem);
	}

	.post-card:focus-within {
		outline: 0.15rem solid var(--color-accent);
		outline-offset: 0.2rem;
	}

	.post-card__title-link:focus-visible {
		outline: none;
	}
}

@media (max-width: 64rem) {
	.post-card__more {
		display: flex;
	}
}

@media (max-width: 48rem) {
	.page-title,
	.single-entry .entry-title,
	.entry-content h1 {
		font-size: 1.75rem;
	}

	.home-section__title,
	.entry-content h2,
	.comments-title {
		font-size: 1.35rem;
	}

	.post-card .entry-title {
		font-size: 1.2rem;
	}

	.site-header__inner {
		align-items: flex-start;
		flex-direction: column;
		gap: 1rem;
		padding-block: 1.25rem;
	}

	.home-section__header {
		align-items: flex-start;
		flex-direction: column;
		gap: 0.5rem;
		padding-bottom: 0.75rem;
	}

	.home-section__title {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.post-card {
		transition: none;
	}
}
