/*
Theme Name: itsuka
Description: いつかのこと（itukanokoto.com）2026年版。だれかの、いつかのこと。写真と少しの文章だけのサイト。
Version: 1.0.0
Requires PHP: 8.0
Text Domain: itsuka
*/

/* ------------------------------------------------------------
   トークン（デザイン資料 README のとおり。アクセント色なし）
------------------------------------------------------------ */
:root {
	--bg: #f3f1ed;
	--ph: #e4e1db;
	--ink: #2b2a28;
	--mute: #6f6b65;
	--faint: #a29e97;
	--sep: #a5a19a;
	--line: #c9c5be;
	--sel: #e2ddd4;
	--font-ja: 'Zen Old Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
	--font-en: 'EB Garamond', 'Zen Old Mincho', Georgia, serif;
}

html,
body {
	margin: 0;
	background: var(--bg);
}

body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	color: var(--ink);
	font-family: var(--font-ja);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

body.is-en {
	font-family: var(--font-en);
}

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

a:hover {
	color: var(--ink);
}

::selection {
	background: var(--sel);
}

img {
	display: block;
}

.ja {
	font-family: 'Zen Old Mincho', serif;
}

.en {
	font-family: 'EB Garamond', serif;
}

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

.site-main {
	flex: 1;
}

/* 写真の枠。16:9・角丸／影／枠なし */
.ph {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--ph);
}

.ph picture {
	display: block;
	width: 100%;
	height: 100%;
}

.ph img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ------------------------------------------------------------
   ヘッダー・フッター
------------------------------------------------------------ */
.site-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 24px;
	padding: 34px 48px;
}

.site-header__name {
	display: flex;
}

.is-top .site-header__name {
	visibility: hidden;
}

.site-header__name .ja {
	font-size: 12px;
	letter-spacing: .32em;
}

.site-header__name .en {
	font-style: italic;
	font-size: 15px;
	letter-spacing: .03em;
}

.site-nav {
	display: flex;
	gap: 26px;
	align-items: baseline;
	color: var(--mute);
}

.site-nav__about {
	font-family: 'EB Garamond', serif;
	font-size: 14px;
	letter-spacing: .06em;
}

.lang {
	display: flex;
	gap: 7px;
	align-items: baseline;
}

.lang a {
	color: var(--faint);
}

.lang a.is-current,
.lang a:hover {
	color: var(--ink);
}

.lang__ja {
	font-family: 'Zen Old Mincho', serif;
	font-size: 11px;
	letter-spacing: .1em;
}

.lang__en {
	font-family: 'EB Garamond', serif;
	font-size: 14px;
	letter-spacing: .02em;
}

.lang__sep {
	font-size: 11px;
	color: var(--sep);
}

.site-footer {
	display: flex;
	justify-content: center;
	padding: clamp(160px, 18vw, 260px) 24px 56px;
}

.site-footer a {
	color: var(--mute);
}

.site-footer a:hover {
	color: var(--ink);
}

.site-footer .ja {
	font-size: 11px;
	letter-spacing: .32em;
}

.site-footer .en {
	font-style: italic;
	font-size: 14px;
}

/* ------------------------------------------------------------
   トップ：ヒーロー
------------------------------------------------------------ */
.hero {
	height: min(84vh, 820px);
	display: flex;
	align-items: center;
	justify-content: center;
}

.hero__v {
	writing-mode: vertical-rl;
	height: 24em;
	font-size: 13px;
	white-space: nowrap;
}

.hero__v h1 {
	margin: 0 0 0 2.6em;
	font-weight: 400;
	font-size: 21px;
	letter-spacing: .5em;
	line-height: 1;
}

.hero__v p {
	margin: 0;
	padding-top: 5.2em;
	letter-spacing: .28em;
	color: var(--mute);
	line-height: 1;
}

.hero__h {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.hero__h h1 {
	margin: 0;
	font-weight: 400;
	font-style: italic;
	font-size: 32px;
	letter-spacing: .02em;
}

.hero__h p {
	margin: 0;
	font-size: 15px;
	letter-spacing: .06em;
	color: var(--mute);
}

/* ------------------------------------------------------------
   トップ：一覧（写真＋タイトル）。4つの並び方をくり返す
------------------------------------------------------------ */
.list {
	display: flex;
	flex-direction: column;
	gap: clamp(160px, 20vw, 300px);
	padding: 0 7vw;
}

.item {
	display: flex;
	align-items: flex-end;
	gap: 30px;
	transition: opacity .8s ease;
}

.item:hover {
	opacity: .78;
}

.item .ph {
	flex: 1;
	width: 100%;
}

.item__t {
	writing-mode: vertical-rl;
	white-space: nowrap;
	font-size: 15px;
	letter-spacing: .26em;
	line-height: 1;
}

.item:nth-child(4n+1) { margin-left: 0;   width: 60%; flex-direction: row; }
.item:nth-child(4n+2) { margin-left: 52%; width: 44%; flex-direction: row-reverse; }
.item:nth-child(4n+3) { margin-left: 14%; width: 72%; flex-direction: row; }
.item:nth-child(4n+4) { margin-left: 36%; width: 40%; flex-direction: row-reverse; }

/* 英語：タイトルは写真の下に横書き */
.is-en .item {
	flex-direction: column;
	align-items: flex-start;
}

.is-en .item:nth-child(4n+2),
.is-en .item:nth-child(4n+4) {
	flex-direction: column;
	align-items: flex-end;
}

.is-en .item .ph {
	flex: none;
}

.is-en .item__t {
	writing-mode: horizontal-tb;
	font-style: italic;
	font-size: 18px;
	letter-spacing: .01em;
	line-height: 1.4;
}

/* ------------------------------------------------------------
   1篇のページ
------------------------------------------------------------ */
.post {
	display: flex;
	flex-direction: column;
	padding-top: 72px;
}

.post__ph1 {
	display: flex;
	justify-content: center;
	padding: 0 7vw;
}

.post__ph1 .ph {
	width: min(1120px, 100%);
}

.post__text {
	display: flex;
	justify-content: center;
	padding: clamp(104px, 13vw, 200px) 24px;
}

/* 日本語：縦書き。1行＝1つの <p> */
.post__body {
	writing-mode: vertical-rl;
	height: 26em;
	font-size: 16px;
	line-height: 2.35;
	letter-spacing: .1em;
}

.post__body h1 {
	margin: 0 0 0 2.4em;
	padding-top: 2.5em;
	font-weight: 500;
	font-size: 19px;
	letter-spacing: .26em;
	line-height: 2;
}

.post__body p {
	margin: 0;
}

/* 英語：横書き */
.is-en .post__text {
	padding: clamp(96px, 12vw, 180px) 28px;
}

.is-en .post__body {
	writing-mode: horizontal-tb;
	height: auto;
	width: min(27em, 100%);
	display: flex;
	flex-direction: column;
	gap: 36px;
}

.is-en .post__body h1 {
	margin: 0;
	padding: 0;
	font-weight: 400;
	font-style: italic;
	font-size: 26px;
	letter-spacing: .005em;
	line-height: 1.4;
}

.is-en .post__lines {
	font-size: 18px;
	line-height: 1.75;
	letter-spacing: 0;
	text-wrap: pretty;
}

.post__ph2 {
	display: flex;
	justify-content: flex-end;
	padding-right: 9vw;
}

.post__ph3 {
	display: flex;
	justify-content: flex-start;
	padding-left: 9vw;
	margin-top: clamp(104px, 13vw, 200px);
}

.post__ph2 .ph,
.post__ph3 .ph {
	width: min(560px, 44%);
}

/* まえ／つぎ */
.post-nav {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 32px;
	padding: clamp(140px, 16vw, 240px) 7vw 0;
}

.post-nav > div {
	display: flex;
}

.post-nav__next {
	justify-content: flex-end;
	text-align: right;
}

.post-nav a {
	display: flex;
	flex-direction: column;
	gap: 10px;
	color: var(--mute);
}

.post-nav__next a {
	align-items: flex-end;
}

.post-nav a:hover {
	color: var(--ink);
}

.post-nav__label {
	font-size: 11px;
	letter-spacing: .3em;
}

.post-nav__title {
	font-size: 14px;
	letter-spacing: .22em;
}

.is-en .post-nav__title {
	font-style: italic;
	font-size: 17px;
	letter-spacing: .01em;
}

/* ------------------------------------------------------------
   about
------------------------------------------------------------ */
.about {
	min-height: 78vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 96px 28px;
}

.about__v {
	writing-mode: vertical-rl;
	height: 27em;
	font-size: 15px;
	line-height: 2.5;
	letter-spacing: .12em;
	white-space: nowrap;
}

.about__v p {
	margin: 0;
	padding-top: 2em;
}

.about__v .lead {
	margin: 0 0 0 2em;
	padding-top: 0;
	letter-spacing: .24em;
}

.about__v .end {
	margin-left: 2em;
}

.about__v .note {
	font-size: 12px;
	color: var(--mute);
}

.about__h {
	width: min(26em, 100%);
	display: flex;
	flex-direction: column;
	gap: 36px;
	font-size: 18px;
	line-height: 1.8;
}

.about__h p {
	margin: 0;
}

.about__h .lead {
	font-style: italic;
	font-size: 21px;
}

.about__h .note {
	font-size: 15px;
	color: var(--mute);
}

/* ------------------------------------------------------------
   404
------------------------------------------------------------ */
.nf {
	min-height: 78vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 64px;
	padding: 48px 7vw;
}

.nf .ph {
	width: min(640px, 100%);
}

.nf__text {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 28px;
	padding: 0 28px;
	text-align: center;
}

.nf__line {
	margin: 0;
	font-size: 14px;
	letter-spacing: .2em;
}

.is-en .nf__line {
	font-style: italic;
	font-size: 19px;
	letter-spacing: .01em;
}

.nf__link {
	padding-bottom: 4px;
	border-bottom: 1px solid var(--line);
	font-size: 12px;
	letter-spacing: .2em;
	color: var(--mute);
}

/* ------------------------------------------------------------
   ふつうの固定ページ（about 以外。お問い合わせなど）
------------------------------------------------------------ */
.plain-page {
	display: flex;
	justify-content: center;
	padding: clamp(96px, 12vw, 180px) 28px 0;
}

.plain-page__inner {
	width: min(32em, 100%);
	font-size: 15px;
	line-height: 2.1;
	letter-spacing: .06em;
}

.plain-page__inner h1 {
	margin: 0 0 48px;
	font-weight: 500;
	font-size: 18px;
	letter-spacing: .2em;
}

/* ------------------------------------------------------------
   スマホ（768px 未満）
------------------------------------------------------------ */
@media (max-width: 767px) {
	.site-header {
		padding: 22px;
	}

	.hero {
		height: 74vh;
	}

	.list {
		gap: 112px;
		padding: 0;
	}

	.item:nth-child(n) {
		flex-direction: column;
		align-items: stretch;
		gap: 18px;
		width: auto;
		margin: 0;
	}

	.item:nth-child(4n+2) { margin-left: 64px; }
	.item:nth-child(4n+4) { margin-right: 64px; }

	.item .ph {
		flex: none;
	}

	.item__t,
	.is-en .item__t {
		writing-mode: horizontal-tb;
		white-space: normal;
		padding: 0 22px;
		font-size: 14px;
		letter-spacing: .22em;
		line-height: 1.6;
	}

	.is-en .item__t {
		font-size: 17px;
		letter-spacing: .01em;
	}

	.item:nth-child(4n+1) .item__t,
	.item:nth-child(4n+4) .item__t { text-align: left; }
	.item:nth-child(4n+2) .item__t,
	.item:nth-child(4n+3) .item__t { text-align: right; }

	.post {
		padding-top: 56px;
	}

	.post__ph1 {
		padding: 0;
	}

	/* 本文が12行をこえる篇は、スマホでは横書きにする */
	.post__text--long {
		padding: clamp(96px, 12vw, 180px) 28px;
	}

	.post__text--long .post__body {
		writing-mode: horizontal-tb;
		height: auto;
		width: min(24em, 100%);
		display: flex;
		flex-direction: column;
		gap: 48px;
	}

	.post__text--long .post__body h1 {
		margin: 0;
		padding: 0;
		font-size: 18px;
		letter-spacing: .2em;
		line-height: 1.4;
	}

	.post__text--long .post__lines {
		font-size: 15px;
		line-height: 2.25;
		letter-spacing: .06em;
		text-wrap: pretty;
	}

	.post__ph2 {
		padding-right: 0;
	}

	.post__ph3 {
		padding-left: 0;
	}

	.post__ph2 .ph,
	.post__ph3 .ph {
		width: 82%;
	}

	.post-nav {
		padding: clamp(140px, 16vw, 240px) 22px 0;
	}

	.nf {
		padding: 48px 0;
	}
}
