/*
Theme Name: Yokohama Style
Theme URI: https://www.yokohama-style.jp/
Author: Yokohama Style
Description: 横浜スタイルの新WordPress環境向けに作成した、シンプルなクラシックテーマです。
Version: 1.1.0
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: yokohama-style
*/

/*
 * This stylesheet intentionally stays small. Global design tokens live in
 * theme.json so a future visual design can be applied without restructuring
 * the PHP templates.
 */

html {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a {
	text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

.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 {
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100000;
	display: block;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	clip: auto;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
	font-weight: 700;
}

.site {
	display: flex;
	min-height: 100vh;
	flex-direction: column;
}

.site-container {
	width: min(calc(100% - 2rem), 1200px);
	margin-inline: auto;
}

.content-container {
	max-width: 760px;
}

.site-header {
	background: var(--wp--preset--color--base);
	border-top: 4px solid var(--wp--preset--color--primary);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40);
	min-height: 84px;
}

.site-brand {
	min-width: min(100%, 220px);
}

.site-title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
}

.site-title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.site-description {
	margin: 0.2rem 0 0;
	color: var(--wp--preset--color--muted);
	font-size: 0.875rem;
}

.custom-logo-link,
.custom-logo {
	display: block;
}

.custom-logo {
	width: auto;
	max-height: 64px;
}

.primary-menu {
	display: flex;
	align-items: center;
	gap: 0.35rem 1.25rem;
	padding: 0;
	margin: 0;
	list-style: none;
}

.primary-menu a {
	display: block;
	padding-block: 0.65rem;
	color: var(--wp--preset--color--contrast);
	font-size: 0.9375rem;
	font-weight: 700;
	text-decoration: none;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
	color: var(--wp--preset--color--primary-dark);
	text-decoration: underline;
}

.site-main {
	flex: 1;
	min-height: 56vh;
	padding-block: var(--wp--preset--spacing--60);
}

.page-header {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding-bottom: var(--wp--preset--spacing--40);
}

.entry-header {
	margin-bottom: var(--wp--preset--spacing--50);
}

.entry-title {
	margin-top: 0;
}

.entry-meta {
	color: var(--wp--preset--color--muted);
}

.post-grid {
	gap: var(--wp--preset--spacing--40);
}

.post-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--40);
}

.post-card {
	height: 100%;
	padding: var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--medium);
}

.post-card__thumbnail {
	margin: calc(var(--wp--preset--spacing--40) * -1);
	margin-bottom: var(--wp--preset--spacing--30);
}

.post-card__thumbnail img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--wp--custom--radius--medium) var(--wp--custom--radius--medium) 0 0;
}

.post-card .entry-title {
	margin-top: 0;
}

.post-card .entry-title a {
	color: var(--wp--preset--color--contrast);
}

.read-more {
	font-weight: 700;
}

.wp-block-post-navigation-link a,
.wp-block-query-pagination a,
.wp-block-read-more {
	font-weight: 700;
}

.wp-block-query-pagination {
	margin-top: var(--wp--preset--spacing--50);
}

.pagination {
	margin-top: var(--wp--preset--spacing--50);
}

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

.pagination .page-numbers {
	display: inline-flex;
	min-width: 2.5rem;
	min-height: 2.5rem;
	align-items: center;
	justify-content: center;
	padding: 0.35rem 0.7rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--small);
}

.pagination .current {
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--primary-dark);
	border-color: var(--wp--preset--color--primary-dark);
}

.wp-block-image img,
.wp-block-post-featured-image img,
.entry-content img,
.entry-thumbnail img {
	max-width: 100%;
	display: block;
	height: auto;
}

.entry-thumbnail {
	margin-bottom: var(--wp--preset--spacing--50);
}

.entry-content::after {
	display: table;
	clear: both;
	content: "";
}

.alignleft {
	float: left;
	margin: 0.5rem 1.5rem 1rem 0;
}

.alignright {
	float: right;
	margin: 0.5rem 0 1rem 1.5rem;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text {
	color: var(--wp--preset--color--muted);
	font-size: 0.875rem;
}

.wp-block-table {
	overflow-x: auto;
}

.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}

.wp-block-table th,
.wp-block-table td {
	border: 1px solid var(--wp--preset--color--border);
	padding: 0.75rem;
	text-align: left;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
select,
textarea {
	max-width: 100%;
	padding: 0.75rem 0.9rem;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--small);
	font: inherit;
}

.search-form {
	display: flex;
	align-items: flex-end;
	gap: 0.5rem;
}

.search-form label {
	flex: 1;
}

.search-field {
	width: 100%;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
	min-height: 44px;
	padding: 0.7rem 1.15rem;
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--primary-dark);
	border: 0;
	border-radius: var(--wp--custom--radius--small);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.comments-area {
	padding-top: var(--wp--preset--spacing--50);
	margin-top: var(--wp--preset--spacing--60);
	border-top: 1px solid var(--wp--preset--color--border);
}

.comment-list {
	padding-left: 1.5rem;
}

.site-footer {
	margin-top: var(--wp--preset--spacing--70);
	background: var(--wp--preset--color--surface);
	border-top: 1px solid var(--wp--preset--color--border);
}

.site-footer__inner {
	min-height: 120px;
}

.site-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40);
}

.site-footer__title,
.site-footer__copyright {
	margin: 0;
}

.site-footer__title a {
	color: var(--wp--preset--color--contrast);
	font-weight: 700;
	text-decoration: none;
}

@media (max-width: 781px) {
	.site-header__inner,
	.site-footer__inner {
		align-items: flex-start;
		flex-direction: column;
	}

	.site-header__inner {
		min-height: 72px;
	}

	.post-grid {
		grid-template-columns: 1fr !important;
	}

	.post-list {
		grid-template-columns: 1fr;
	}

	.primary-menu {
		flex-wrap: wrap;
	}

	.search-form {
		align-items: stretch;
		flex-direction: column;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
