/*
Theme Name: 森の中のデザイン事務所
Theme URI: https://morinonakanodesign.example/
Author: morinonakanodesign
Description: 「困っている人に、静かに手を差し伸べるデザイン事務所。」のためのワンページ・テーマ。縦書きのタイトル、森の緑を基調とした明朝体、ふんわりとしたパララックスフェード、BGMループ、水面表現を備えています。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: morinonaka
*/

/* ============================================================
   変数・基本設定
   ============================================================ */
:root {
	--ink:        #1f3b2c; /* 森の深緑(本文・見出し) */
	--ink-soft:   #4a6353; /* やわらかい緑(補足テキスト) */
	--accent:     #2f5740; /* アクセント */
	--bg:         #ffffff;
	--bg-soft:    #f6f6f0; /* ごく淡い生成り(注記など) */
	--rule:       #c7d0c7; /* 罫線 */
	--rule-soft:  #e3e7e1;
	--maxw:       760px;
	--ease-soft:  cubic-bezier(0.16, 1, 0.30, 1);
	--content-left: 20%; /* JS がヒーローテキストの左端 px を実測して上書き */
}

* { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	overflow-x: hidden; /* 何があっても横スクロールを発生させない多重防御 */
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 2.0;
	letter-spacing: 0.04em;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

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

a { color: var(--ink); text-decoration: none; transition: color 0.3s var(--ease-soft); }
a:hover { color: var(--accent); }

/* 縦線(左から20%・本文エリアの高さだけ。フッターにはかからない)
   カンプに合わせた濃さで表示するため var(--rule) を使用 */
.center-rule {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 20%; /* 縦線は固定位置(PC)。SPは @media 内で 8% に上書き */
	width: 1px;
	background: var(--rule);
	z-index: -1;
	pointer-events: none;
}

.site {
	position: relative;
	z-index: 1;
}

#main {
	position: relative;
}

.wrap {
	max-width: var(--maxw);
	margin: 0 0 0 var(--content-left, 20%); /* ヒーローテキスト左端の位置から本文・見出しを左揃えで開始 */
	padding: 0 28px 0 0;
}

/* ============================================================
   セクション共通
   ============================================================ */
.section {
	position: relative;
	padding: 96px 0;
}


/* セクション上部の区切り線(縦線と同色・幅80%・左揃え) */
.section--ruled::before {
	content: "";
	display: block;
	width: 80%;
	height: 1px;
	background: var(--rule-soft);
	margin: 0 0 72px;
}

.section__title {
	font-size: 28px;
	font-weight: 500;
	letter-spacing: 0.12em;
	margin: 0 0 36px;
	color: var(--ink);
}

.section__lead {
	margin: 0 0 40px;
	color: var(--ink-soft);
	font-size: 15px;
	line-height: 2.2;
}

.section__lead p { margin: 0;
					font-size: 20px; }

/* ============================================================
   ヒーロー(縦書きタイトル)
   ============================================================ */
.hero {
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 80px 0;
	position: relative;
}

/* ヒーロー(縦書きテキスト画像) */
.hero__title {
	display: block;
	margin: 0;
	position: relative;
	will-change: transform, filter;
}
.hero__title > img {
	display: block;
	max-height: 70vh;      /* 旧ブラウザ用フォールバック */
	max-height: 70svh;     /* iOS Safari のアドレスバー伸縮で画像サイズが変わらないように */
	width: auto;
	height: auto;
	/* 水面歪みフィルタは常時適用。揺らぎ強度の減衰は SVG <animate> 側で行う */
	filter: url(#waterWobble);
	/* 10秒かけてフェードイン(揺らぎは SVG 側で自然に静止) */
	opacity: 0;
	animation: heroWaterFadeIn 10s ease-out forwards;
}

@keyframes heroWaterFadeIn {
	0%   { opacity: 0; }
	100% { opacity: 1; }
}

/* 動きを抑える設定では揺らぎ・フェード演出を無効 */
@media (prefers-reduced-motion: reduce) {
	.hero__title > img {
		animation: none;
		opacity: 1;
		filter: none;
	}
}

/* ============================================================
   イントロ(ロゴ + 屋号 + 説明 + 外観写真)
   ============================================================ */
.brand {
	text-align: left;
	margin-bottom: 44px;
}

.brand__logo {
	display: block;
	max-width: 470px;
	width: 100%;
	margin: 0 0 14px;
}
.brand__logo > img {
	display: block;
	width: 100%;
	height: auto;
}

.brand__name {
	font-size: 19px;
	font-weight: 600;
	letter-spacing: 0.16em;
	margin: 0;
}

.lede {
	text-align: left;
	color: var(--ink-soft);
	font-size: 15px;
	line-height: 2.4;
	margin: 0 0 56px;
}

.lede p { margin: 0;
			font-size: 20px; }

.figure {
	margin: 0;
	overflow: hidden;
	max-width: 260px;
}

.figure img { width: 100%; will-change: transform; }

.figure--wide { max-width: 460px; }

/* ============================================================
   事務所について(写真 + プロフィール)
   ============================================================ */
.about__body {
	color: var(--ink-soft);
	font-size: 15px;
	line-height: 2.4;
	margin: 0 0 56px;
}

.about__body p { margin: 0; 
				font-size: 20px;}

.profile {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	flex-wrap: wrap;
	margin-top: 60px;
}

.profile__photo {
	flex: 0 0 220px;
	max-width: 220px;
}

.profile__photo img { width: 100%; will-change: transform; }

.profile__meta {
	flex: 1 1 280px;          /* basis は折り返さない値に。flex-grow で実幅は広がる */
	font-size: 13.5px;
	line-height: 2.4;
	color: var(--ink-soft);
	min-width: 0;             /* 画像が flex の最小幅を押し広げないように */
}

.profile__org {
	font-size: 13px;
	color: var(--ink-soft);
	margin: 0 0 14px;
	letter-spacing: 0.08em;
}

.profile__name {
	font-size: 20px;
	color: var(--ink);
	margin: 0 0 14px;
	letter-spacing: 0.22em;
}

/* 「代表」を氏名と別サイズで調整できるよう独立 class に */
.profile__role {
	font-size: 13px;          /* ← ここで「代表」だけサイズ調整 */
	letter-spacing: 0.18em;
	color: var(--ink-soft);
	vertical-align: middle;
}

.profile__birth {
	font-size: 12.5px;
	color: var(--ink-soft);
	margin: 0;
	letter-spacing: 0.06em;
}

.profile__label {
	font-size: 18px;
	letter-spacing: 0.28em;
	color: var(--accent);
	margin: 48px 0 28px; /* PROFILE 前後の余白を広げて上下にゆとり */
}

/* 経歴本文: 段落間(空行)を広めにとって添付デザインの上下幅に合わせる */
.profile__meta p { margin: 0; line-height: 2.6; }
/* 見出し系(屋号・氏名・生年・PROFILE)は行間をタイトに保つ */
.profile__org,
.profile__name,
.profile__birth,
.profile__label { line-height: 1.6; }

/* ============================================================
   できること(リスト)
   ============================================================ */
.can-list {
	list-style: none;
	margin: 8px 0 44px;
	padding: 0;
	max-width: 440px;
}

.can-list li {
	border: 1px solid var(--ink);
	border-radius: 2px;
	text-align: left;
	font-size: 20px;
	letter-spacing: 0.08em;
	padding: 18px 36px;
	margin-bottom: 14px;
	color: var(--ink);
	background: var(--bg);
	transition: background 0.4s var(--ease-soft), color 0.4s var(--ease-soft);
}

.can-list li:hover {
	background: var(--ink);
	color: #fff;
}

.tail-note {
	color: var(--ink-soft);
	font-size: 15px;
	line-height: 2.4;
	margin: 0;
}

.tail-note p { margin: 0; 
				font-size: 20px;}

/* ============================================================
   お問い合わせ
   ============================================================ */
.contact__lead {
	color: var(--ink-soft);
	font-size: 15px;
	line-height: 2.4;
	margin: 0 0 40px;
}

.contact__lead p { margin: 0;
					font-size: 20px; }

.contact-list {
	list-style: none;
	margin: 60px 0 0;
	padding: 0;
	max-width: 480px;
}

.contact-list li { margin-bottom: 16px; }

.contact-list a {
	display: block;
	border: 1px solid var(--ink);
	border-radius: 2px;
	text-align: left;
	padding: 18px 36px;
	font-size: 20px;
	letter-spacing: 0.24em;
	color: var(--ink);
	transition: background 0.4s var(--ease-soft), color 0.4s var(--ease-soft);
}

.contact-list a:hover {
	background: var(--ink);
	color: #fff;
}

/* ============================================================
   フッター
   ============================================================ */
.site-footer {
	text-align: center;
	background: #000;          /* 黒帯 */
	padding: 12px 20px;
}

.site-footer small {
	font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.02em;
	color: #fff;               /* 白文字 */
}

/* ============================================================
   画像ベース本文(PC/SP の picture 切替)
   ============================================================ */

/* 共通: 本文テキスト画像 */
.text-img {
	display: block;
	width: 100%;
	margin: 0;
}
.text-img > img,
img.text-img {
	display: block;
	width: 100%;
	height: auto;
}

/* PC/SP 出し分けユーティリティ */
.pc-only { display: block; }
.sp-only { display: none; }
@media (max-width: 680px) {
	.pc-only { display: none; }
	.sp-only { display: block; }
}

/* お問い合わせバナー(画像 + 透明クリック領域 3つ) */
.contact-banner {
	position: relative;
	display: block;
	max-width: 480px;
	margin: 0;
}
.contact-banner__img,
.contact-banner__img > img {
	display: block;
	width: 100%;
	height: auto;
}

.contact-banner__hit {
	position: absolute;
	left: 0;
	width: 100%;
	height: 33.333%;
	display: block;
	cursor: pointer;
	transition: background 0.3s var(--ease-soft);
}
.contact-banner__hit:hover { background: rgba(31, 59, 44, 0.06); }
.contact-banner__hit--tel  { top: 0; }
.contact-banner__hit--mail { top: 33.333%; }
.contact-banner__hit--ig   { top: 66.666%; }

/* ============================================================
   BGM トグル
   ============================================================ */
.sound-toggle {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 50;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 1px solid var(--rule);
	background: rgba(255, 255, 255, 0.86);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	color: var(--ink);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: transform 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft);
}

.sound-toggle:hover { transform: scale(1.06); border-color: var(--accent); }
.sound-toggle svg { width: 20px; height: 20px; display: block; }
.sound-toggle .icon-on  { display: none; }
.sound-toggle .icon-off { display: block; }
.sound-toggle.is-playing .icon-on  { display: block; }
.sound-toggle.is-playing .icon-off { display: none; }

/* ゆるやかに脈打つ再生インジケータ */
.sound-toggle.is-playing::after {
	content: "";
	position: absolute;
	inset: -1px;
	border-radius: 50%;
	border: 1px solid rgba(47, 87, 64, 0.4);
	animation: sound-pulse 2.6s ease-out infinite;
}

@keyframes sound-pulse {
	0%   { transform: scale(1);    opacity: 0.6; }
	100% { transform: scale(1.5);  opacity: 0; }
}

/* ============================================================
   スクロール・リビール(ヒーローと同じ 10s 揺らぎフェードイン)
   - 各要素ごとに JS が #waterWobble をクローンしてユニーク ID を付与
     → 要素が画面に入った瞬間から scale 18→0 が独自に走り、
       ヒーローと同等の自然減衰が得られる
   - 移動(translateY)は無し
   - ヒーロー/フッターには [data-reveal] が付いていないため自動的に対象外
   ============================================================ */
[data-reveal] {
	opacity: 0;
}

[data-reveal].is-visible {
	animation: revealFadeIn 10s ease-out forwards;
	animation-delay: var(--reveal-delay, 0ms);
}

@keyframes revealFadeIn {
	0%   { opacity: 0; }
	100% { opacity: 1; }
}

/* ============================================================
   レスポンシブ(SP)
   ============================================================ */
@media (max-width: 680px) {
	body { font-size: 15px; }

	/* 縦線は左8%、見出し・本文は縦線の20px右から左揃えで開始
	   ※ パディングも vw ベースに統一(画面幅に比例し、改行位置が機種で変わらない) */
	.center-rule { left: 8%; }
	.wrap { margin: 0; padding: 0 5vw 0 calc(8% + 4vw); }

	.section { padding: 72px 0; }
	.section--ruled::before { width: 100%; margin-bottom: 52px; }

	/* ヒーローのタイトル画像(SP) */
	.hero__title > img {
		/* SP: viewport "幅" を主制約に。
		   vw はアドレスバー伸縮の影響を一切受けないため、
		   Chrome/Safari どちらでもスクロール中に拡大されない。 */
		max-width: 45vw;
		/* 念のため極端な縦長端末用の上限(通常は max-width が先に効く) */
		max-height: 75vh;
		max-height: 75svh;
	}

	/* ロゴ画像(SP) */
	.brand__logo { max-width: 240px; }

	/* お問い合わせのボタン(SP) */
	.contact-list { max-width: 100%; }
	.contact-list li { width: 72%; }
	.contact-list a {
		font-size: 3vw;
		letter-spacing: 0.18em;
		padding: 6px 24px;
	}

	/* プロフィールはSPでは縦積み(写真の下に経歴画像) */
	.profile { flex-direction: column; gap: 20px; }
	.profile__photo { flex: 0 0 auto; max-width: 260px; }
	.profile__meta { flex: 1 1 auto; }

	.figure, .figure--wide { max-width: 260px; }
}

/* ============================================================
   モーションを抑える設定への配慮
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	[data-reveal] {
		opacity: 1 !important;
		transform: none !important;
		filter: none !important;
		transition: none !important;
		animation: none !important;
	}
	.sound-toggle.is-playing::after { animation: none; opacity: 0; }
}
