/* ==========================================================================
   TEYLL — 制作の流れ /teyll/flow/（作り直し 2026-10-15。Figma 06 TEYLL の 1345:93709・SP 1396:100484。page-teyll-flow.php）
   STEP（6つの手順。左に番号の丸 112、右に白いカード）→ PERIOD（公開までの期間の目安・期間が変わる主なこと）
   - Figma のレイヤー名は p-teyll-flow__*。トップの FLOW（project-top.css の p-teyll-flow__*）と同じ名前になるので、
     このページは p-teyll-flow-steps・p-teyll-flow-period にした
   - 丸と丸は点線（teyll/border/input・6px おき）でつなぐ。スクロールに合わせて 01 → 06 へ伸ばす（animation-timeline に対応した
     ブラウザだけ。対応していない・動きを減らす設定では最初から全部見える）
   - 1279px 以下はカードの中を縦に（題の下に「TEYLL がすること」「ご用意いただくもの」）。SP は 767px 以下
   ========================================================================== */

.p-teyll-flow-steps__head {
	margin-bottom: 96px; /* Size=L の見出しの行 → 中身 96 */
}

/* ==========================================================================
   STEP
   ========================================================================== */
.p-teyll-flow-steps__list {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.p-teyll-flow-steps__step {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 40px;
}

/* 丸の中心から次の丸の中心までの点線（最後の手順はなし。次の丸の白い面が線の端を隠す） */
.p-teyll-flow-steps__step::before {
	content: "";
	position: absolute;
	top: 56px;
	left: 55px;
	width: 2px;
	height: calc(100% + 32px);
	background: repeating-linear-gradient(180deg, var(--teyll-border-input) 0 6px, transparent 6px 12px);
}

.p-teyll-flow-steps__step:last-child::before {
	display: none;
}

.p-teyll-flow-steps__circle {
	position: relative;
	z-index: 1;
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 112px;
	height: 112px;
	border-radius: 50%;
	background: var(--teyll-bg-canvas);
}

.p-teyll-flow-steps__circle::before {
	content: "";
	position: absolute;
	inset: 0;
	padding: 3px;
	border-radius: inherit;
	background: var(--teyll-gradient-ring);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.p-teyll-flow-steps__number {
	padding-bottom: 0.1em;
	margin-bottom: -0.1em;
	font: var(--text-teyll-en-step);
	background: var(--teyll-gradient-brand);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

.p-teyll-flow-steps__card {
	display: flex;
	flex: 1;
	align-items: flex-start;
	gap: 40px;
	min-width: 0;
	padding: 40px;
	border-radius: var(--radius-teyll-card);
	background: var(--teyll-bg-canvas);
}

.p-teyll-flow-steps__card-head {
	display: flex;
	flex: 0 0 232px;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
}

.p-teyll-flow-steps__title {
	font: var(--text-teyll-h2);
	letter-spacing: var(--ls-teyll);
}

.p-teyll-flow-steps__loop {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 10px;
	border-radius: var(--radius-full);
	background: var(--teyll-bg-green-pale);
	font: var(--text-teyll-label);
	letter-spacing: var(--ls-teyll-label);
}

.p-teyll-flow-steps__detail {
	display: flex;
	flex: 1;
	align-items: flex-start;
	gap: 24px;
	min-width: 0;
	margin: 0;
}

.p-teyll-flow-steps__do {
	display: flex;
	flex: 0 1 312px;
	flex-direction: column;
	gap: 8px;
	padding-top: 4px;
}

.p-teyll-flow-steps__prepare {
	display: flex;
	flex: 1 1 360px;
	flex-direction: column;
	gap: 8px;
	padding: 20px 24px;
	border-radius: 16px;
	background: var(--teyll-bg-subtle);
}

.p-teyll-flow-steps__label {
	font: var(--text-teyll-label);
	letter-spacing: var(--ls-teyll-label);
}

.p-teyll-flow-steps__do-text,
.p-teyll-flow-steps__prepare-text {
	margin: 0;
	letter-spacing: var(--ls-teyll);
	color: var(--teyll-text-secondary);
}

.p-teyll-flow-steps__do-text {
	font: var(--text-teyll-body);
}

.p-teyll-flow-steps__prepare-text {
	font: var(--text-teyll-body-s);
}

/* 点線をスクロールに合わせて伸ばす（Figma の注記の動き。下から浮かせる動きではない） */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.p-teyll-flow-steps__step::before {
			transform-origin: top;
			animation: teyll-flow-line linear both;
			animation-timeline: view();
			animation-range: entry 20% cover 60%;
		}
	}
}

@keyframes teyll-flow-line {
	from {
		transform: scaleY(0);
	}

	to {
		transform: scaleY(1);
	}
}

/* ==========================================================================
   PERIOD（期間の表（dl）・期間が変わる主なこと3つ・注）
   ========================================================================== */
.p-teyll-flow-period__body {
	display: flex;
	flex-direction: column;
	gap: 48px;
}

.p-teyll-flow-period__table {
	display: flex;
	margin: 0;
	padding: 40px 0;
	border-radius: var(--radius-teyll-card);
	background: var(--teyll-bg-canvas);
}

.p-teyll-flow-period__col {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	padding: 8px 40px;
}

.p-teyll-flow-period__col + .p-teyll-flow-period__col {
	border-left: 1px solid var(--teyll-border-default);
}

.p-teyll-flow-period__plan,
.p-teyll-flow-period__value {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 8px;
	margin: 0;
}

.p-teyll-flow-period__plan-name {
	font: var(--text-teyll-h4);
	letter-spacing: var(--ls-teyll);
}

.p-teyll-flow-period__plan-pages,
.p-teyll-flow-period__value-label {
	font: var(--text-teyll-body-s);
	letter-spacing: var(--ls-teyll);
	color: var(--teyll-text-secondary);
}

.p-teyll-flow-period__value-text {
	font: var(--text-teyll-h2);
	letter-spacing: var(--ls-teyll);
}

.p-teyll-flow-period__factors {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.p-teyll-flow-period__factors-title {
	font: var(--text-teyll-h3);
	letter-spacing: var(--ls-teyll);
}

.p-teyll-flow-period__factor-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.p-teyll-flow-period__factor {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 32px;
	border-radius: var(--radius-teyll-card);
	background: var(--teyll-bg-canvas);
}

.p-teyll-flow-period__factor-head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}

.p-teyll-flow-period__factor-icon {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--teyll-bg-purple-pale);
}

.p-teyll-flow-period__factor-icon--sky {
	background: var(--teyll-bg-sky-pale);
}

.p-teyll-flow-period__factor-icon--yellow {
	background: var(--teyll-bg-yellow-pale);
}

.p-teyll-flow-period__factor-icon--green {
	background: var(--teyll-bg-green-pale);
}

.p-teyll-flow-period__factor-title {
	font: var(--text-teyll-h4);
	letter-spacing: var(--ls-teyll);
}

.p-teyll-flow-period__factor-text {
	font: var(--text-teyll-body-s);
	letter-spacing: var(--ls-teyll);
	color: var(--teyll-text-secondary);
}

.p-teyll-flow-period__note {
	font: var(--text-teyll-caption);
	letter-spacing: var(--ls-teyll);
	color: var(--teyll-text-secondary);
}

/* ==========================================================================
   1279px 以下（手順のカードの中を縦に）
   ========================================================================== */
@media (max-width: 1279px) {
	.p-teyll-flow-steps__card {
		flex-direction: column;
		align-items: stretch;
		gap: 20px;
	}

	.p-teyll-flow-steps__card-head {
		flex-basis: auto;
	}
}

/* ==========================================================================
   1023px 以下（期間の表・3つのカード・手順の中身を縦に）
   ========================================================================== */
@media (max-width: 1023px) {
	.p-teyll-flow-steps__head {
		margin-bottom: 64px;
	}

	.p-teyll-flow-steps__detail {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
	}

	.p-teyll-flow-steps__do,
	.p-teyll-flow-steps__prepare {
		flex: none;
	}

	.p-teyll-flow-period__table {
		flex-direction: column;
		padding: 8px 32px;
	}

	.p-teyll-flow-period__col {
		padding: 20px 0;
	}

	.p-teyll-flow-period__col + .p-teyll-flow-period__col {
		border-top: 1px solid var(--teyll-border-default);
		border-left: 0;
	}

	.p-teyll-flow-period__factor-list {
		grid-template-columns: minmax(0, 1fr);
		max-width: 560px;
	}
}

/* ==========================================================================
   SP
   ========================================================================== */
@media (max-width: 767px) {
	/* STEP：左に丸 48（輪 2px）と点線、右に白いカード（角 32）。手順のあいだ 16 */
	.p-teyll-flow-steps__head {
		margin-bottom: 32px;
	}

	.p-teyll-flow-steps__list {
		gap: 0;
	}

	.p-teyll-flow-steps__step {
		gap: 12px;
		padding-bottom: 16px;
	}

	.p-teyll-flow-steps__step:last-child {
		padding-bottom: 0;
	}

	.p-teyll-flow-steps__step::before {
		top: 48px;
		left: 23px;
		height: auto;
		bottom: 0;
	}

	.p-teyll-flow-steps__circle {
		width: 48px;
		height: 48px;
	}

	.p-teyll-flow-steps__circle::before {
		padding: 2px;
	}

	.p-teyll-flow-steps__card {
		gap: 12px;
		padding: 20px 20px 24px;
	}

	.p-teyll-flow-steps__card-head {
		gap: 8px;
	}

	.p-teyll-flow-steps__detail {
		gap: 12px;
	}

	.p-teyll-flow-steps__do {
		gap: 4px;
		padding-top: 0;
	}

	.p-teyll-flow-steps__prepare {
		gap: 4px;
		padding: 12px 16px;
	}

	.p-teyll-flow-steps__do-text {
		font: var(--text-teyll-body-s);
	}

	/* PERIOD：表は白いカードの中で3行（行の間に線）。期間が変わる3つは縦に（アイコン 48 と題を横に） */
	.p-teyll-flow-period__body {
		gap: 32px;
	}

	.p-teyll-flow-period__table {
		padding: 8px 20px;
	}

	.p-teyll-flow-period__col {
		gap: 8px;
		padding: 16px 0;
	}

	.p-teyll-flow-period__factors {
		gap: 16px;
	}

	.p-teyll-flow-period__factor-list {
		gap: 16px;
		max-width: none;
	}

	.p-teyll-flow-period__factor {
		gap: 12px;
		padding: 24px;
	}

	.p-teyll-flow-period__factor-head {
		flex-direction: row;
		align-items: center;
		gap: 12px;
	}

	.p-teyll-flow-period__factor-icon {
		width: 48px;
		height: 48px;
	}
}
