/* ==========================================================
   Sub pages — full-width layout
   ファーストビュー / 目次レール + 本文 / 関連 / 相談導線 / お問い合わせ
   トップページと同じ語彙：黒・白・青/緑、角ばった矩形、ワイプ、細い罫線。
   ========================================================== */

/* ---------- generated visual ---------- */
.lacunae-visual { display: block; width: 100%; height: 100%; }
.lv-draw { stroke-dasharray: 2600; stroke-dashoffset: 0; }
.js .lv-draw { animation: lvDraw 2.6s cubic-bezier(.6, 0, .2, 1) .35s both; }
@keyframes lvDraw { from { stroke-dashoffset: 2600; } to { stroke-dashoffset: 0; } }

/* ---------- buttons on dark ---------- */
.btn--light { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn--ghost { background: transparent; border-color: rgba(255, 255, 255, .6); color: var(--white); }
.btn--ghost:hover,
.btn--ghost:focus-visible { background: var(--white); border-color: var(--white); color: var(--ink); }

/* ==========================================================
   Sub hero
   ========================================================== */
.sub-hero {
	position: relative;
	isolation: isolate;
	display: grid;
	min-height: clamp(480px, 74svh, 860px);
	padding-top: var(--header);
	overflow: hidden;
	background: var(--ink-2);
	color: var(--white);
}
.sub-hero--md { min-height: clamp(400px, 58svh, 640px); }

.sub-hero__media { position: absolute; inset: 0; z-index: -1; }
.sub-hero__media img,
.sub-hero__media svg { width: 100%; height: 100%; object-fit: cover; }
.sub-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
}
.sub-hero--photo .sub-hero__media::after {
	background:
		linear-gradient(90deg, rgba(7, 16, 27, .9) 0%, rgba(7, 16, 27, .66) 40%, rgba(7, 16, 27, .12) 100%),
		linear-gradient(0deg, rgba(7, 16, 27, .55) 0%, rgba(7, 16, 27, 0) 45%);
}
.sub-hero--graphic .sub-hero__media::after {
	background: linear-gradient(90deg, rgba(7, 16, 27, .96) 0%, rgba(7, 16, 27, .8) 34%, rgba(7, 16, 27, 0) 64%);
}

/* 長いタイトル（記事など）は図形を控えめに */
.sub-hero--long.sub-hero--graphic .sub-hero__media::after {
	background: linear-gradient(90deg, rgba(7, 16, 27, .97) 0%, rgba(7, 16, 27, .88) 55%, rgba(7, 16, 27, .35) 100%);
}

/* 入場：青い矩形が横に抜ける（トップのスライダーと同じワイプ） */
.sub-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 5;
	background: var(--blue);
	transform: scaleX(0);
	transform-origin: right center;
	pointer-events: none;
}
.js .sub-hero::after { animation: subWipe .95s var(--ease-wipe) both; }
@keyframes subWipe {
	from { transform: scaleX(1); }
	to { transform: scaleX(0); }
}

.sub-hero__inner {
	display: flex;
	flex-direction: column;
	gap: 48px;
	padding: 22px var(--gutter) clamp(44px, 6vw, 92px);
}

.sub-hero__crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 0; }
.sub-hero__crumbs li {
	display: flex;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	color: rgba(255, 255, 255, .62);
}
.sub-hero__crumbs li + li::before { content: "/"; margin: 0 10px; color: rgba(255, 255, 255, .34); }
.sub-hero__crumbs a:hover { color: var(--white); }
.sub-hero__crumbs [aria-current] {
	max-width: 36ch;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: var(--white);
}

.sub-hero__body { margin-top: auto; max-width: 1180px; }
.sub-hero__kicker { color: var(--green); }
.sub-hero__kicker::before {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	margin-bottom: 20px;
	background: var(--blue);
}
.sub-hero__title {
	margin: 22px 0 0;
	font-size: clamp(50px, 8.2vw, 136px);
	font-weight: 500;
	line-height: .94;
	letter-spacing: -.065em;
	line-break: strict;
}
.sub-hero--md .sub-hero__title { font-size: clamp(44px, 6.6vw, 108px); }
.sub-hero--long .sub-hero__title,
.sub-hero--md.sub-hero--long .sub-hero__title {
	max-width: 1100px;
	font-size: clamp(30px, 4.2vw, 62px);
	line-height: 1.2;
	letter-spacing: -.035em;
}
.sub-hero__lead {
	max-width: 640px;
	margin-top: 26px;
	color: rgba(255, 255, 255, .8);
	font-size: clamp(14px, 1.1vw, 16px);
	line-height: 1.95;
}
.sub-hero__lead p { margin: 0; }
.sub-hero__lead p + p { margin-top: .8em; }
.sub-hero__meta { margin-top: 28px; }
.sub-hero__meta .post-meta { color: rgba(255, 255, 255, .72); margin: 0; }
.sub-hero__meta .post-meta span { color: var(--green); }
.sub-hero__meta .post-meta__updated,
.sub-hero__meta .post-meta__plain { color: var(--white) !important; }
.sub-hero__meta .tag-list { margin-top: 0; }
.sub-hero__meta .tag-list li { border-color: rgba(255, 255, 255, .34); color: var(--white); }
.sub-hero__meta .app-meta { color: rgba(255, 255, 255, .8); }
.sub-hero__meta .app-meta > span { border-color: rgba(255, 255, 255, .34); }
.sub-hero__meta .app-status--live { background: var(--white); color: var(--ink); }
.sub-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.sub-hero__actions .app-hero__note { margin: 0; color: var(--green); }
.sub-hero__icon .app-icon { width: 96px !important; height: 96px !important; margin-top: 26px; border-color: rgba(255, 255, 255, .2); }

/* 本文の入場（時間差） */
.js .sub-hero__body > * { animation: subIn .8s cubic-bezier(.2, .7, .2, 1) both; }
.js .sub-hero__body > :nth-child(1) { animation-delay: .45s; }
.js .sub-hero__body > :nth-child(2) { animation-delay: .53s; }
.js .sub-hero__body > :nth-child(3) { animation-delay: .61s; }
.js .sub-hero__body > :nth-child(4) { animation-delay: .69s; }
.js .sub-hero__body > :nth-child(5) { animation-delay: .77s; }
@keyframes subIn {
	from { opacity: 0; transform: translateY(26px); }
	to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
	.sub-hero { min-height: clamp(460px, 82svh, 720px); }
	.sub-hero--md { min-height: 420px; }
	.sub-hero__crumbs li:last-child { display: none; }
	.sub-hero__inner { padding-bottom: 44px; gap: 36px; }
	.sub-hero--graphic .sub-hero__media::after {
		background: linear-gradient(0deg, rgba(7, 16, 27, .96) 0%, rgba(7, 16, 27, .72) 55%, rgba(7, 16, 27, .2) 100%);
	}
	.sub-hero--photo .sub-hero__media::after {
		background: linear-gradient(0deg, rgba(7, 16, 27, .94) 0%, rgba(7, 16, 27, .6) 55%, rgba(7, 16, 27, .25) 100%);
	}
}

/* ==========================================================
   Body layout: rail + content
   ========================================================== */
.entry-layout {
	display: grid;
	grid-template-columns: minmax(260px, 1fr) minmax(0, 760px) minmax(0, .6fr);
	column-gap: clamp(32px, 5vw, 88px);
	padding: 0 var(--gutter);
}
.entry-layout > .entry-content {
	grid-column: 2;
	grid-row: 1;
	max-width: none;
	margin: 0;
	padding: clamp(52px, 6vw, 100px) 0 clamp(72px, 8vw, 128px);
}
.entry-rail {
	grid-column: 1;
	grid-row: 1;
	padding: clamp(52px, 6vw, 100px) clamp(20px, 3vw, 44px) 72px 0;
	border-right: 1px solid var(--line);
}
.entry-rail__inner { position: sticky; top: 32px; max-width: 300px; margin-left: auto; }
.toc { margin-top: 18px; border-top: 1px solid var(--ink); counter-reset: none; }
.toc li { border-bottom: 1px solid var(--line); }
.toc a {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr);
	gap: 6px;
	padding: 12px 0;
	font-size: 13px;
	line-height: 1.6;
	transition: color .18s;
}
.toc a:hover { color: var(--blue-text); }
.toc__no { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--blue-text); padding-top: 2px; }
.entry-rail__cta {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 28px;
	padding: 16px 18px;
	background: var(--ink);
	color: var(--white);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .06em;
	line-height: 1.6;
	transition: background-color .2s;
}
.entry-rail__cta:hover,
.entry-rail__cta:focus-visible { background: var(--blue); }

/* 見出しに番号（目次と対応） */
.entry-content--numbered { counter-reset: sec; }
.entry-content--numbered > h2::before {
	counter-increment: sec;
	content: counter(sec, decimal-leading-zero);
	display: block;
	margin-bottom: 10px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .16em;
	line-height: 1;
	color: var(--blue-text);
}
.entry-content h2 { scroll-margin-top: 24px; }

@media (max-width: 1100px) {
	.entry-layout { grid-template-columns: minmax(0, 1fr); padding: 0 20px; }
	.entry-layout > .entry-content { grid-column: 1; grid-row: 2; width: 100%; max-width: 760px; margin: 0 auto; }
	.entry-rail { grid-column: 1; grid-row: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 40px 0 0; border-right: 0; }
	.entry-rail__inner { position: static; max-width: none; }
	.entry-layout > .entry-content { padding-top: 48px; }
	.entry-rail__cta { display: none; }
}

/* ==========================================================
   Related (full width cards)
   ========================================================== */
.related { border-top: 1px solid var(--line); }
.related__head { padding: 26px var(--gutter); border-bottom: 1px solid var(--line); }
.related__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.related-card {
	position: relative;
	display: flex;
	flex-direction: column;
	border-right: 1px solid var(--line);
	transition: background-color .2s;
}
.related-card:last-child { border-right: 0; }
.related-card:hover { background: var(--surface); }
.related-card:focus-within { outline: 2px solid var(--blue); outline-offset: -2px; }
.related-card a:focus-visible { outline: none; }
.related-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink-2); }
.related-card__media img,
.related-card__media svg { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.related-card:hover .related-card__media img,
.related-card:hover .related-card__media svg { transform: scale(1.04); }
.related-card__body { flex: 1; padding: 24px clamp(20px, 2.4vw, 36px) 64px; }
.related-card__no { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--blue-text); }
.related-card__title { margin: 10px 0 0; font-size: clamp(20px, 1.8vw, 28px); line-height: 1.3; letter-spacing: -.035em; }
.related-card__text { margin: 10px 0 0; font-size: 13px; line-height: 1.8; color: var(--muted-2); }
.related-card__arrow { position: absolute; right: clamp(20px, 2.4vw, 36px); bottom: 22px; font-size: 20px; }
@media (max-width: 900px) {
	.related__list { grid-template-columns: 1fr; }
	.related-card { border-right: 0; border-bottom: 1px solid var(--line); }
	.related-card:last-child { border-bottom: 0; }
	.related-card__media { aspect-ratio: 16 / 7; }
}

/* ==========================================================
   CTA band (full width)
   ========================================================== */
.cta-band {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--ink-2);
	color: var(--white);
}
.cta-band__media { position: absolute; inset: 0; z-index: -1; }
.cta-band__media svg { width: 100%; height: 100%; }
.cta-band__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(7, 16, 27, .96) 0%, rgba(7, 16, 27, .72) 45%, rgba(7, 16, 27, .2) 100%);
}
.cta-band__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	gap: 40px 64px;
	padding: clamp(72px, 9vw, 150px) var(--gutter);
}
.cta-band .kicker { color: var(--green); }
.cta-band__title {
	margin: 30px 0 0;
	font-size: clamp(54px, 8.4vw, 136px);
	font-weight: 500;
	line-height: .92;
	letter-spacing: -.07em;
}
.cta-band__text { max-width: 560px; margin: 26px 0 0; color: rgba(255, 255, 255, .76); font-size: 14px; line-height: 1.9; }
.cta-band__actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; min-width: 280px; }
.cta-band__link { align-self: flex-start; margin-top: 10px; color: var(--white); }
.cta-band__link:hover { color: var(--green); }
@media (max-width: 900px) {
	.cta-band__inner { grid-template-columns: 1fr; }
	.cta-band__actions { min-width: 0; align-items: flex-start; }
	.cta-band__media::after { background: linear-gradient(0deg, rgba(7, 16, 27, .96) 0%, rgba(7, 16, 27, .7) 60%, rgba(7, 16, 27, .35) 100%); }
}

/* ==========================================================
   Lists (archive / search)
   ========================================================== */
.entry-row { grid-template-columns: 360px minmax(0, 1fr) 64px; }
.entry-row__media { aspect-ratio: 16 / 10; background: var(--ink-2); }
.entry-row__media svg { width: 100%; height: 100%; }
.entry-row__body { align-self: center; }

/* ==========================================================
   Contact page
   ========================================================== */
.contact-page {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	border-bottom: 1px solid var(--line);
}
.contact-page__info {
	padding: clamp(52px, 6vw, 100px) var(--gutter);
	background: var(--surface);
	border-right: 1px solid var(--line);
}
.contact-page__info-inner { position: sticky; top: 32px; max-width: 520px; margin-left: auto; }
.contact-page__h {
	display: flex;
	align-items: baseline;
	gap: 14px;
	margin: 48px 0 14px;
	padding-top: 18px;
	border-top: 1px solid var(--ink);
	font-size: 20px;
	line-height: 1.4;
	letter-spacing: -.02em;
}
.contact-page__h:first-child { margin-top: 0; }
.contact-page__h .kicker { color: var(--blue-text); }
.contact-page__info p { margin: 0 0 14px; font-size: 14px; line-height: 1.9; color: var(--muted); }
.contact-topics li { border-bottom: 1px solid var(--line); }
.contact-topics a,
.contact-topics li > b { display: block; padding: 12px 0; }
.contact-topics li > small { display: block; margin-top: -8px; padding-bottom: 12px; }
.contact-topics b { display: block; font-size: 15px; font-weight: 600; transition: color .18s; }
.contact-topics small { display: block; font-size: 12px; color: var(--muted); }
.contact-topics a:hover b { color: var(--blue-text); }

.contact-page__form { padding: clamp(52px, 6vw, 100px) var(--gutter); }
.contact-page__form > * { max-width: 720px; }
.contact-page__form-title { margin: 14px 0 32px; font-size: clamp(28px, 3vw, 44px); line-height: 1.2; letter-spacing: -.045em; }
.contact-page__form .contact-page__content { margin: 0; padding: 0; }
.contact-page__note { margin-top: 24px; font-size: 12px; color: var(--muted); }
.contact-page__note a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 960px) {
	.contact-page { grid-template-columns: 1fr; }
	.contact-page__info { border-right: 0; border-bottom: 1px solid var(--line); }
	.contact-page__info-inner { position: static; max-width: 720px; margin: 0; }
	.contact-page__info { order: 2; }
}
.sub-hero__icon .app-icon--text { background: var(--blue); }
