/*
 * サービス紹介LP（template-service-lp.php）専用スタイル。
 * functions.php がこのテンプレートの表示時と、ブロックエディター内でだけ読み込む。
 * 本文はブロック（パターン「サービス紹介LP（ひな形）」）で組み、見た目は svc- で始まるクラスに限定する。
 * 色・書体は style.css のデザイントークンを使う。
 */

/* ============================================================
   土台：全幅のセクションと、本文幅（1080px）に合わせた左右余白
   ============================================================ */
.svc-hero,
.svc-section,
.svc-final,
.svc-title {
	--svc-pad-inline: max(20px, calc((100% - 1080px) / 2));
	--svc-stage-bg: color-mix(in oklab, var(--sky) 22%, var(--surface));
	--svc-stage-line: color-mix(in oklab, var(--wp) 55%, var(--surface));
	--svc-note-line: color-mix(in oklab, var(--amber) 45%, var(--amber-bg));
	padding-inline: var(--svc-pad-inline);
}

/* クラシックテーマでは表示時にグループ内へ wp-block-group__inner-container が挟まるため、
   レイアウト上は存在しないものとして扱う（テンプレート表示時のみ。エディターには無い）。 */
.svc-lp .wp-block-group__inner-container {
	display: contents;
}
.page-template-template-service-lp .site-footer {
	margin-top: 0;
}

/* 段落・リストの既定余白を消し、各部品のクラスで余白を決める（詳細度0で上書きしやすくする） */
:where(.svc-hero, .svc-section, .svc-final) :where(p, ul, ol) {
	margin: 0;
}
:where(.svc-section, .svc-final) h2 {
	max-width: 32em;
	font-size: clamp(1.5rem, 1.2rem + 1.25vw, 2.05rem);
	line-height: 1.4;
	text-wrap: balance;
}
/* 見出しは文節の切れ目で折り返す（未対応ブラウザは通常の折り返し） */
:where(.svc-hero, .svc-section, .svc-final) :where(h1, h2, h3) {
	word-break: auto-phrase;
}
.svc-section {
	padding-block: 80px;
}
.svc-section + .svc-section {
	border-top: 1px solid var(--line-soft);
}
.svc-lead {
	max-width: 44em;
	margin-top: 16px;
	color: var(--ink-2);
	font-size: 1.0625rem;
	line-height: 1.9;
	text-wrap: pretty;
}
.svc-title {
	padding-block: 48px 0;
}

/* ボタン（相談フォームへのリンク） */
.svc-section .wp-block-buttons,
.svc-final .wp-block-buttons {
	margin-top: 36px;
}
:is(.svc-hero, .svc-section, .svc-final) .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-block-size: 56px;
	padding: 14px 32px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--wp), var(--wp-deep));
	color: #fff;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.5;
	text-decoration: none;
	transition: filter .15s ease, background-color .15s ease;
}
:is(.svc-hero, .svc-section, .svc-final) .wp-block-button__link:hover {
	filter: brightness(1.08);
}
:is(.svc-hero, .svc-final) .wp-block-button__link {
	background: var(--surface);
	color: var(--wp-deep);
}
:is(.svc-hero, .svc-final) .wp-block-button__link:hover {
	background: #E3F0F7;
	filter: none;
}
:is(.svc-hero, .svc-final) :focus-visible {
	outline-color: #fff;
}

/* ============================================================
   冒頭：誰の困りごとか・基本料金・相談ボタン
   ============================================================ */
.svc-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
	grid-template-areas: "copy ticket" "actions ticket";
	column-gap: 64px;
	padding-block: 64px 72px;
	background: var(--wp-deep);
	color: #fff;
}
.svc-hero-copy {
	grid-area: copy;
	align-self: end;
}
.svc-hero h1 {
	color: #fff;
	font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem);
	line-height: 1.3;
	text-wrap: balance;
}
.svc-hero-lead {
	max-width: 36em;
	margin-top: 20px;
	color: rgb(255 255 255 / .9);
	font-size: 1.0625rem;
	line-height: 1.9;
	text-wrap: pretty;
}
.svc-hero-actions {
	grid-area: actions;
	align-self: start;
	margin-top: 32px;
}
.svc-hero-note {
	margin-top: 14px;
	color: var(--sky);
	font-size: .9375rem;
	line-height: 1.7;
}

/* 料金札（チケット制の半券に見立て、点線の切り取り線と左右の切り欠きを付ける） */
.svc-price-ticket {
	grid-area: ticket;
	align-self: center;
	padding: 28px 28px 0;
	background: var(--surface);
	border: 1px solid transparent;
	border-radius: var(--radius);
	color: var(--ink);
}
.svc-price-label {
	color: var(--wp-deep);
	font-size: .9375rem;
	font-weight: 700;
}
.svc-price {
	margin-top: 4px;
	color: var(--ink-2);
	font-size: 1rem;
	font-weight: 700;
}
.svc-price strong {
	margin-inline-end: .1em;
	color: var(--ink);
	font-size: clamp(2.5rem, 2.1rem + 1.6vw, 3.25rem);
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	letter-spacing: -.02em;
	line-height: 1.15;
}
.svc-price-sub {
	margin-top: 12px;
	color: var(--ink-2);
	font-size: .9375rem;
	line-height: 1.8;
}
.svc-price-foot {
	position: relative;
	margin: 22px -28px 0;
	padding: 14px 28px 18px;
	border-top: 1.5px dashed var(--line);
	color: var(--wp-deep);
	font-size: .9375rem;
	font-weight: 700;
}
.svc-price-foot::before,
.svc-price-foot::after {
	content: "";
	position: absolute;
	top: -11px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--wp-deep);
}
.svc-price-foot::before {
	left: -11px;
}
.svc-price-foot::after {
	right: -11px;
}

/* ============================================================
   対象となる状況と、作業前に確認する項目
   ============================================================ */
.svc-fit-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
	gap: 32px 48px;
	align-items: start;
	margin-top: 40px;
}
.svc-check-list {
	padding: 0;
	list-style: none;
}
.svc-check-list li {
	position: relative;
	margin: 0;
	padding: 16px 0 16px 36px;
	border-top: 1px solid var(--line);
	font-size: 1.0625rem;
	line-height: 1.7;
}
.svc-check-list li:last-child {
	border-bottom: 1px solid var(--line);
}
.svc-check-list li::before {
	content: "";
	position: absolute;
	top: 24px;
	left: 4px;
	width: 14px;
	height: 8px;
	border-bottom: 2px solid var(--wp);
	border-left: 2px solid var(--wp);
	transform: rotate(-45deg);
}
.svc-sheet {
	padding: 24px 28px 20px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.svc-sheet h3 {
	font-size: 1.125rem;
	line-height: 1.5;
}
.svc-sheet ul {
	margin-top: 12px;
	padding: 0;
	list-style: none;
}
.svc-sheet li {
	position: relative;
	margin: 0;
	padding: 10px 0 10px 30px;
	border-top: 1px dashed var(--line);
	font-size: 1rem;
	line-height: 1.7;
}
.svc-sheet li::before {
	content: "";
	position: absolute;
	top: 16px;
	left: 0;
	width: 15px;
	height: 15px;
	border: 1.5px solid var(--wp);
	border-radius: 3px;
}

/* 注意枠（すでに不具合がある場合・検証で問題が見つかった場合） */
.svc-caution {
	margin-top: 32px;
	padding: 18px 22px;
	background: var(--amber-bg);
	border: 1px solid var(--svc-note-line);
	border-radius: var(--radius-sm);
	color: #6b4410;
	font-size: 1rem;
	line-height: 1.8;
}
.svc-caution p + p {
	margin-top: 4px;
}
.svc-caution p,
.svc-survey p {
	max-width: 50em;
}

/* ============================================================
   作業の流れ：検証環境の工程を点線の囲みで区別する段階図
   ============================================================ */
.svc-flow,
.svc-faq {
	background: var(--surface);
}
.svc-steps {
	--svc-gap: 28px;
	counter-reset: svc-step;
	display: flex;
	align-items: center;
	gap: var(--svc-gap);
	margin-top: 48px;
}
.svc-step {
	counter-increment: svc-step;
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	padding: 26px 18px 20px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
}
.svc-step::before {
	content: counter(svc-step);
	position: absolute;
	top: -15px;
	left: 16px;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--wp);
	color: #fff;
	font-size: .875rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}
.svc-step h3 {
	font-size: 1.0625rem;
	line-height: 1.5;
}
.svc-step p {
	margin-top: 8px;
	color: var(--ink-2);
	font-size: .9375rem;
	line-height: 1.75;
}
.svc-stage-zone {
	--svc-zone-gap: 20px;
	position: relative;
	display: flex;
	flex: 2.4 1 0;
	flex-wrap: wrap;
	gap: 26px var(--svc-zone-gap);
	min-width: 0;
	padding: 16px;
	background: var(--svc-stage-bg);
	border: 1.5px dashed var(--svc-stage-line);
	border-radius: var(--radius);
}
.svc-stage-zone .svc-step {
	--svc-gap: var(--svc-zone-gap);
}
.svc-stage-label {
	flex: 1 0 100%;
	color: var(--wp-deep);
	font-size: .9375rem;
	font-weight: 700;
	line-height: 1.5;
}
.svc-step:not(:last-child)::after,
.svc-stage-zone:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 50%;
	right: calc(var(--svc-gap) / -2 - 5px);
	width: 10px;
	height: 10px;
	border-top: 2px solid var(--wp);
	border-right: 2px solid var(--wp);
	transform: translateY(-50%) rotate(45deg);
}
.svc-steps + .svc-caution {
	margin-top: 36px;
}

/* ============================================================
   料金：基本料金に含む作業と、別途お見積もりになる作業
   ============================================================ */
.svc-scope {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin-top: 40px;
}
.svc-scope-in,
.svc-scope-out {
	padding: 24px 28px 22px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-top: 4px solid var(--wp);
	border-radius: var(--radius-sm);
}
.svc-scope-out {
	border-top-color: var(--amber);
}
.svc-scope h3 {
	font-size: 1.125rem;
	line-height: 1.5;
}
.svc-scope ul {
	margin-top: 12px;
	padding: 0;
	list-style: none;
}
.svc-scope li {
	position: relative;
	margin: 0;
	padding: 9px 0 9px 28px;
	border-top: 1px solid var(--line-soft);
	font-size: 1rem;
	line-height: 1.7;
}
.svc-scope-in li::before {
	content: "";
	position: absolute;
	top: 17px;
	left: 2px;
	width: 12px;
	height: 7px;
	border-bottom: 2px solid var(--wp);
	border-left: 2px solid var(--wp);
	transform: rotate(-45deg);
}
.svc-scope-out li::before,
.svc-scope-out li::after {
	content: "";
	position: absolute;
}
.svc-scope-out li::before {
	top: 21px;
	left: 1px;
	width: 13px;
	border-top: 2px solid var(--amber);
}
.svc-scope-out li::after {
	top: 16px;
	left: 6.5px;
	height: 13px;
	border-left: 2px solid var(--amber);
}
.svc-survey {
	margin-top: 20px;
	padding: 20px 24px;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	color: var(--ink-2);
	font-size: 1rem;
	line-height: 1.85;
}
.svc-survey strong {
	color: var(--ink);
}
.svc-survey p + p {
	margin-top: 6px;
}

/* ============================================================
   よくあるご質問（コアの「詳細」ブロック）
   ============================================================ */
.svc-faq h2 + .wp-block-details {
	margin-top: 32px;
}
.svc-faq .wp-block-details {
	max-width: 880px;
	margin-inline: auto;
	margin-bottom: 0;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
}
.svc-faq .wp-block-details + .wp-block-details {
	margin-top: 8px;
}
.svc-faq summary {
	position: relative;
	min-block-size: 44px;
	padding: 16px 52px 16px 48px;
	cursor: pointer;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.6;
	list-style: none;
}
.svc-faq summary::-webkit-details-marker {
	display: none;
}
.svc-faq summary::before {
	content: "Q";
	content: "Q" / "";
	position: absolute;
	top: 16px;
	left: 20px;
	color: var(--wp);
	font-weight: 800;
}
.svc-faq summary::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 22px;
	width: 10px;
	height: 10px;
	margin-top: -7px;
	border-right: 2px solid var(--wp);
	border-bottom: 2px solid var(--wp);
	transform: rotate(45deg);
	transition: transform .2s ease;
}
.svc-faq .wp-block-details[open] summary::after {
	margin-top: -2px;
	transform: rotate(-135deg);
}
.svc-faq .wp-block-details > :not(summary) {
	margin: 0;
	padding: 0 24px 18px 48px;
	color: var(--ink-2);
	font-size: 1rem;
	line-height: 1.85;
}
@media (prefers-reduced-motion: no-preference) {
.svc-faq .wp-block-details::details-content {
	height: 0;
	overflow: clip;
	transition: height .25s ease, content-visibility .25s allow-discrete;
}
.svc-faq .wp-block-details[open]::details-content {
	height: auto;
}
}

/* ============================================================
   最後の相談案内とご依頼の流れ
   ============================================================ */
.svc-final {
	padding-block: 80px;
	background: radial-gradient(900px 500px at 85% 0%, rgb(58 160 204 / .18), transparent 65%), linear-gradient(160deg, var(--panel), #15384C);
	color: var(--ink-inv);
}
.svc-final h2 {
	color: #fff;
}
:where(.svc-final) p {
	max-width: 44em;
	margin-top: 16px;
	color: #cfdce4;
	font-size: 1.0625rem;
	line-height: 1.9;
}
.svc-final h3 {
	margin-top: 40px;
	color: #fff;
	font-size: 1.0625rem;
	line-height: 1.5;
}
.svc-order {
	counter-reset: svc-order;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin-top: 16px;
	padding: 0;
	list-style: none;
}
.svc-order li {
	counter-increment: svc-order;
	margin: 0;
	padding: 16px 18px 18px;
	border: 1px solid rgb(255 255 255 / .18);
	border-radius: var(--radius-sm);
	color: #dce7ee;
	font-size: .9375rem;
	line-height: 1.75;
}
.svc-order li::before {
	content: counter(svc-order);
	display: block;
	margin-bottom: 6px;
	color: var(--sky);
	font-size: 1.25rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}
.svc-final-note {
	color: var(--ink-inv-2);
	font-size: .9375rem;
}

/* ============================================================
   レスポンシブ
   ============================================================ */
/* 段階図は横に5工程を並べる幅が足りない画面で縦並びにする */
@media (max-width: 1100px) {
.svc-steps {
	flex-direction: column;
	align-items: stretch;
	max-width: 680px;
}
.svc-stage-zone {
	--svc-zone-gap: 26px;
	flex-direction: column;
	flex-wrap: nowrap;
}
.svc-stage-label {
	flex-basis: auto;
}
.svc-step:not(:last-child)::after,
.svc-stage-zone:not(:last-child)::after {
	top: auto;
	right: auto;
	bottom: calc(var(--svc-gap) / -2 - 5px);
	left: 50%;
	transform: translateX(-50%) rotate(135deg);
}
}
@media (max-width: 900px) {
.svc-hero {
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "copy" "ticket" "actions";
	padding-block: 40px 48px;
}
.svc-price-ticket {
	max-width: 480px;
	margin-top: 28px;
}
.svc-hero-actions {
	margin-top: 28px;
}
.svc-fit-grid,
.svc-scope {
	grid-template-columns: minmax(0, 1fr);
}
.svc-order {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 600px) {
.svc-section,
.svc-final {
	padding-block: 56px;
}
.svc-hero {
	padding-block: 32px 40px;
}
.svc-price-ticket {
	padding: 22px 22px 0;
}
.svc-price-foot {
	margin-inline: -22px;
	padding-inline: 22px;
}
.svc-sheet,
.svc-scope-in,
.svc-scope-out {
	padding: 20px 20px 18px;
}
.svc-faq summary {
	padding-right: 44px;
}
.svc-faq .wp-block-details > :not(summary) {
	padding: 0 18px 16px 48px;
}
:is(.svc-hero, .svc-section, .svc-final) .wp-block-button {
	width: 100%;
}
:is(.svc-hero, .svc-section, .svc-final) .wp-block-button__link {
	width: 100%;
	padding-inline: 20px;
}
.svc-order {
	grid-template-columns: minmax(0, 1fr);
}
}
