/*
Theme Name: モブチャック
Description: モブチャックのテーマ（piyopiyo の子テーマ）。
Author: モブチャック
Template: piyopiyotheme
Requires at least: 7.1
Requires PHP: 8.3
Version: 0.1.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mobchuck
*/

/* ------------------------------------------------------------------
 * 申し込みのボタン（ボタンのブロックスタイル mc-line・mc-apply・mc-kit）
 * 角丸の札に、白い枠と薄い影。左にアイコン、右に「>」。
 * ------------------------------------------------------------------ */

.wp-block-button[class*="is-style-mc-"] .wp-block-button__link {
	display: inline-flex;
	gap: 0.4em;
	align-items: center;
	padding: 0.7em 0.9em 0.7em 1.4em;
	border: 4px solid #fff;
	border-radius: 20px;
	box-shadow: 2px 3px 4px rgb(0 0 0 / 10%);
	color: #fff;
	font-size: clamp(1rem, 0.6rem + 0.8vw, 1.5rem);
	font-weight: 900;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}

.wp-block-button[class*="is-style-mc-"] .wp-block-button__link::before,
.wp-block-button[class*="is-style-mc-"] .wp-block-button__link::after {
	flex: none;
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	content: "";
}

.wp-block-button[class*="is-style-mc-"] .wp-block-button__link::before {
	width: 1.5em;
	height: 1.5em;
}

.wp-block-button[class*="is-style-mc-"] .wp-block-button__link::after {
	width: 0.875em;
	height: 0.875em;
	background-image: url("assets/icons/chevron-right.svg");
}

.wp-block-button[class*="is-style-mc-"] .wp-block-button__link:hover {
	filter: brightness(0.94);
}

.wp-block-button[class*="is-style-mc-"] .wp-block-button__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--contrast);
	outline-offset: 2px;
}

.wp-block-button.is-style-mc-line .wp-block-button__link {
	background: #00a75b;
}

.wp-block-button.is-style-mc-line .wp-block-button__link::before {
	background-image: url("assets/icons/line.svg");
}

.wp-block-button.is-style-mc-apply .wp-block-button__link {
	background: #f6950d;
}

.wp-block-button.is-style-mc-kit .wp-block-button__link {
	background: #049cb8;
}

.wp-block-button.is-style-mc-apply .wp-block-button__link::before,
.wp-block-button.is-style-mc-kit .wp-block-button__link::before {
	background-image: url("assets/icons/form.svg");
}

/* ------------------------------------------------------------------
 * 画面には出さず、読み上げと検索に届ける文字
 * ------------------------------------------------------------------ */

.mc-visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
}

/* ------------------------------------------------------------------
 * ヘッダー
 * ------------------------------------------------------------------ */

.mc-header-buttons {
	flex-wrap: nowrap;
	gap: clamp(12px, 1.7vw, 32px);
}

/* メニューの帯: 項目を同じ幅で並べ、間に半透明の白い縦線を引く。 */
.mc-gnav .wp-block-navigation {
	font-size: 1.125rem;
	font-weight: 900;
	line-height: 1.4;
}

.mc-gnav .wp-block-navigation__container {
	gap: 0;
}

.mc-gnav .wp-block-navigation-item {
	position: relative;
	justify-content: center;
	min-width: 171px;
	min-height: 50px;
}

.mc-gnav .wp-block-navigation-item + .wp-block-navigation-item::before {
	position: absolute;
	top: 50%;
	left: 0;
	width: 1px;
	height: 18px;
	background: rgb(255 255 255 / 50%);
	content: "";
	transform: translateY(-50%);
}

.mc-gnav .wp-block-navigation-item__content {
	text-decoration: none;
}

.mc-gnav .wp-block-navigation-item__content:hover,
.mc-gnav .wp-block-navigation-item__content:focus-visible {
	text-decoration: underline;
}

/* ------------------------------------------------------------------
 * MV（トップの最初のセクション。パターン mobchuck/section-mv）
 * デザインの 1920×839 の枠に対する割合で重ねる。文字の大きさは枠の幅（cqw）に合わせて伸び縮みする。
 * ------------------------------------------------------------------ */

.mc-mv {
	position: relative;
	max-width: 1920px;
	margin-inline: auto;
	overflow: hidden;
	background: url("assets/images/mv-bg.webp") center top / 100% auto no-repeat var(--wp--preset--color--surface);
	container-type: inline-size;
	aspect-ratio: 1920 / 839;
}

.mc-mv > * {
	position: absolute;
	margin: 0 !important;
}

.mc-mv .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
}

.mc-mv-copy-03 {
	top: 35.399%;
	left: 5.833%;
	width: 53.229%;
}

.mc-mv-copy-01 {
	top: 2.98%;
	left: 9.375%;
	width: 45.208%;
}

.mc-mv-copy-02 {
	top: 30.632%;
	left: 18.542%;
	width: 24.479%;
}

.mc-mv-sub {
	top: 66.031%;
	left: 7.135%;
	width: 49.115%;
	font-size: calc(25 / 1920 * 100cqw);
	font-weight: 900;
	letter-spacing: 0.08em;
	line-height: 1.6;
	white-space: nowrap;
}

.mc-mv-chara {
	top: 4.648%;
	left: 63.438%;
	width: 33.49%;
}

.mc-mv-buttons {
	top: 79.142%;
	left: 5.26%;
	flex-wrap: nowrap;
	gap: calc(28 / 1920 * 100cqw);
}

.mc-mv-balloon {
	top: 53.993%;
	left: 77.969%;
	width: 21.094%;
}

/* MV のボタンは大きい丸い札（ヘッダーのボタンと同じブロックスタイルで、大きさと角だけ変える）。 */
.mc-mv .wp-block-button[class*="is-style-mc-"] .wp-block-button__link {
	padding: 0.55em 0.55em 0.55em 1.1em;
	border-width: max(3px, calc(4 / 1920 * 100cqw));
	border-radius: 999px;
	font-size: calc(36 / 1920 * 100cqw);
}

/* 狭い画面では重ねずに縦に並べる（スマホの作り込みは後で。docs の D-22）。 */
@media (max-width: 781px) {
	.mc-mv {
		display: flex;
		flex-direction: column;
		gap: 16px;
		padding: 24px 16px 32px;
		background-size: cover;
		aspect-ratio: auto;
	}

	.mc-mv > * {
		position: static;
		width: 100%;
	}

	/* 重ねる順（HTML の順）と、縦に並べたときの読む順を合わせる。 */
	.mc-mv-copy-01 { order: 1; }
	.mc-mv-copy-02 { order: 2; }
	.mc-mv-copy-03 { order: 3; }
	.mc-mv-sub { order: 4; }
	.mc-mv-buttons { order: 5; }
	.mc-mv-chara { order: 6; }
	.mc-mv-balloon { order: 7; }

	.mc-mv-copy-02 {
		width: 60%;
		margin-inline: auto !important;
	}

	.mc-mv-sub {
		font-size: 0.9375rem;
		white-space: normal;
	}

	.mc-mv-chara,
	.mc-mv-balloon {
		width: 70%;
		margin-inline: auto !important;
	}

	.mc-mv-buttons {
		flex-direction: column;
		align-items: stretch;
	}

	.mc-mv .wp-block-button[class*="is-style-mc-"] .wp-block-button__link {
		justify-content: center;
		width: 100%;
		font-size: 1.125rem;
	}
}

/* ------------------------------------------------------------------
 * セクションの見出しのまとまり（見出し「セクション」・段落「リボン」・段落「吹き出し」）
 * ------------------------------------------------------------------ */

.mc-section-head {
	position: relative;
	z-index: 1;
	text-align: center;
}

.mc-section-head > * {
	margin-block: 0 !important;
}

.wp-block-heading.is-style-mc-section {
	margin: 0.15em 0 0.25em;
	color: #108a9c;
	font-family: var(--wp--preset--font-family--system);
	font-size: clamp(2.5rem, 1rem + 4.6vw, 6.25rem);
	font-weight: 900;
	letter-spacing: 0.02em;
	line-height: 1.15;
	text-align: center;
	/* 白い縁取り（8 方向）と、右下の灰色の影。 */
	text-shadow:
		0.05em 0 0 #fff, -0.05em 0 0 #fff, 0 0.05em 0 #fff, 0 -0.05em 0 #fff,
		0.035em 0.035em 0 #fff, -0.035em 0.035em 0 #fff, 0.035em -0.035em 0 #fff, -0.035em -0.035em 0 #fff,
		0.08em 0.1em 0 rgb(0 0 0 / 22%);
}

.wp-block-heading.is-style-mc-section mark {
	background: transparent;
	font-size: 0.62em;
}

p.is-style-mc-ribbon {
	width: fit-content;
	margin-inline: auto;
	padding: 0.2em 2.6em 0.28em;
	background: var(--wp--preset--color--teal-light);
	color: #fff;
	font-size: clamp(1.25rem, 0.8rem + 1vw, 2rem);
	font-style: italic;
	font-weight: 900;
	letter-spacing: 0.04em;
	line-height: 1.3;
	clip-path: polygon(0 0, 100% 0, calc(100% - 0.8em) 50%, 100% 100%, 0 100%, 0.8em 50%);
}

p.is-style-mc-bubble {
	position: relative;
	width: fit-content;
	margin-inline: auto;
	padding: 0.3em 0.9em;
	border-radius: 0.5em;
	background: linear-gradient(#ff7ba3, #f9487a);
	color: #fff;
	font-size: clamp(1rem, 0.7rem + 0.8vw, 1.6rem);
	font-weight: 900;
	line-height: 1.4;
	transform: translateX(-6.5em) rotate(-4deg);
}

p.is-style-mc-bubble::after {
	position: absolute;
	bottom: -0.45em;
	left: 1.1em;
	border-top: 0.5em solid #f9487a;
	border-right: 0.35em solid transparent;
	border-left: 0.35em solid transparent;
	content: "";
}

/* ------------------------------------------------------------------
 * 買取方法を選ぶ（パターン mobchuck/section-method）
 * 背景の雲と飾りは擬似要素。位置はデザインの 1920 の幅に対する割合。
 * ------------------------------------------------------------------ */

.mc-method {
	position: relative;
	padding-block: 10px 140px;
	container-type: inline-size;
}

.mc-method::before,
.mc-method::after {
	position: absolute;
	background-repeat: no-repeat;
	background-size: 100% 100%;
	content: "";
	pointer-events: none;
}

.mc-method::before {
	top: calc(165 / 1920 * 100cqw);
	left: calc(107 / 1920 * 100%);
	width: calc(1703 / 1920 * 100%);
	aspect-ratio: 1703 / 967;
	background-image: url("assets/images/method/bg-cloud.svg");
}

.mc-method::after {
	top: 0;
	left: calc(303 / 1920 * 100%);
	width: calc(1340 / 1920 * 100%);
	aspect-ratio: 1340 / 319;
	background-image: url("assets/images/method/deco-shapes.svg");
}

.mc-method-chara {
	position: absolute;
	z-index: 1;
	top: calc(72 / 1920 * 100cqw);
	left: calc(281 / 1920 * 100%);
	width: calc(384 / 1920 * 100%);
	margin: 0 !important;
}

.mc-method-chara img {
	display: block;
	width: 100%;
	height: auto;
}

.mc-method-cards {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
	gap: 60px 38px;
	margin-top: 80px !important;
}

.mc-method-cards > * {
	margin: 0 !important;
}

.mc-method-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 28px;
	align-items: center;
	padding: 60px 34px 50px;
	border: 11px solid var(--wp--preset--color--teal-deep);
	border-radius: 30px;
	background: #fff;
}

.mc-method-card > * {
	margin: 0 !important;
}

.mc-card-num {
	position: absolute;
	top: -42px;
	left: 27px;
	display: grid;
	place-items: center;
	width: 84px;
	height: 84px;
	margin: 0;
	background: url("assets/icons/num-badge.svg") center / contain no-repeat;
	color: #fff;
	font-size: 2.625rem;
	font-weight: 900;
	line-height: 1;
}

.mc-card-title {
	margin: 0;
	color: var(--wp--preset--color--contrast);
	font-size: 1.875rem;
	font-weight: 900;
	text-align: center;
}

.mc-method-card-body {
	gap: 20px;
}

.mc-method-card-image {
	flex: none;
	width: 136px;
	margin: 0;
}

.mc-method-card-image img {
	display: block;
	width: 100%;
	height: auto;
}

.mc-method-card-copy {
	flex: 1 1 220px;
	gap: 10px;
	min-width: 220px;
}

.mc-method-card-text {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 30px;
}

.mc-pill {
	margin: 0;
	padding: 10px 20px;
	border-radius: 20px;
	background: #ffed8e;
	color: #ff2856;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 32px;
	white-space: nowrap;
}

/* ------------------------------------------------------------------
 * カテゴリーから探す（パターン mobchuck/section-category）
 * 背景の雲と飾りは擬似要素の 1 枚の画像。キャラクターと見出しの位置はデザインの 1920 の幅に対する割合。
 * ------------------------------------------------------------------ */

.mc-category {
	position: relative;
	padding-block: calc(70 / 1920 * 100cqw) 25px;
	container-type: inline-size;
}

.mc-category::before {
	position: absolute;
	inset: 0;
	background: url("assets/images/category/category-bg.webp") center top / 100% auto no-repeat;
	content: "";
	pointer-events: none;
}

/* 見出しを、右のキャラクターの分だけ左へ寄せる。 */
.mc-category .mc-section-head {
	padding-right: calc(391 / 1920 * 100cqw);
}

.mc-category-chara {
	position: absolute;
	z-index: 1;
	top: 0;
	left: calc(1178.5 / 1920 * 100%);
	width: calc(391 / 1920 * 100%);
	margin: 0 !important;
}

.mc-category-chara img {
	display: block;
	width: 100%;
	height: auto;
}

.mc-category-cards {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	gap: 65px 40px;
	justify-content: center;
	margin-top: 70px !important;
}

.mc-category-cards > * {
	margin: 0 !important;
}

.mc-category-card {
	display: flex;
	flex-direction: column;
	gap: 30px;
	width: 440px;
	max-width: 100%;
	padding: 60px 55px;
	border: 11px solid var(--wp--preset--color--teal-deep);
	border-radius: 30px;
	background: #fff;
}

.mc-category-card > * {
	margin: 0 !important;
}

.mc-category-card-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 308 / 300;
}

.mc-category-card-title {
	margin: 0;
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--zen-maru-gothic);
	font-size: 1.625rem;
	font-weight: 900;
	text-align: center;
}

/* 説明の行。右向きの印は擬似要素（行の flex の項目になる）。 */
.mc-category-card-row {
	display: flex;
	gap: 8px;
	align-items: center;
	justify-content: space-between;
	margin-top: -4px !important;
}

.mc-category-card-row::after {
	flex: none;
	width: 42px;
	height: 42px;
	background: url("assets/icons/circle-chevron.svg") center / contain no-repeat;
	content: "";
}

.mc-category-card-text {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 30px;
	white-space: nowrap;
}

/* ------------------------------------------------------------------
 * フッター
 * ------------------------------------------------------------------ */

/* 左の列（ロゴ・会社の情報）は縮めてよい列にし、右のリンクの一覧と横に並ぶようにする。 */
.mc-footer-info {
	flex: 1 1 320px;
	min-width: 0;
}

.mc-footer-company {
	line-height: 1.7;
}

.mc-footer-heading {
	margin: 0;
	font-size: 1.3125rem;
	font-weight: 700;
}

.mc-footer-list {
	margin: 0;
	padding: 0;
	font-size: 1.125rem;
	line-height: 2.2;
	list-style: none;
}

.mc-footer-list-2col {
	column-gap: 42px;
	columns: 2;
}

.mc-copyright {
	margin: 0;
	padding: 0.5em 4.5em;
	border-radius: 999px;
	background: #fff;
	color: var(--wp--preset--color--accent-6);
	font-weight: 500;
}
