/* ==========================================================================
   TEYLL — カード類（Figma 02 Components の「TEYLL（作り直し 2026-10-15）」1317:1239。PC と -sp）
   - c-teyll-service-card（サービス。上の面はロゴの色の淡い色にイラスト）template-parts/teyll/service-card.php
   - c-teyll-works-card（実績。太い枠はロゴの色）template-parts/teyll/works-card.php
   - c-teyll-feature-card（選ばれる理由）template-parts/teyll/top-feature.php
   - c-teyll-plan-card（料金。おすすめは Ring の輪 3px と札）template-parts/teyll/plan-card.php
   - c-teyll-step（制作の流れの1手順。PC は丸 112 の下に文・SP は左に丸 64 と線）template-parts/teyll/step.php
   - c-teyll-cta-card（最後の大きな2枚。Contact＝Gradient/Action・Price＝Gradient/Deep）template-parts/teyll/cta.php
   横に並ぶカードは高さをそろえる（親の flex・grid の stretch）。カードの左端に色の縦線は付けない
   ========================================================================== */

/* ---------- c-teyll-service-card（PC 384×520・SP 280×404） ---------- */
.c-teyll-service-card {
	display: flex;
	flex: 0 0 384px;
	--teyll-card-tone: var(--teyll-bg-purple-pale);
}

.c-teyll-service-card--yellow {
	--teyll-card-tone: var(--teyll-bg-yellow-pale);
}

.c-teyll-service-card--green {
	--teyll-card-tone: var(--teyll-bg-green-pale);
}

.c-teyll-service-card--sky {
	--teyll-card-tone: var(--teyll-bg-sky-pale);
}

.c-teyll-service-card--indigo {
	--teyll-card-tone: var(--teyll-bg-indigo-pale);
}

.c-teyll-service-card__link {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: 520px;
	padding: 16px 16px 24px;
	border-radius: var(--radius-teyll-card);
	background: var(--teyll-bg-canvas);
	color: var(--teyll-text-primary);
	text-decoration: none;
}

.c-teyll-service-card__visual {
	position: relative;
	display: block;
	flex: none;
	height: 232px;
	overflow: hidden;
	border-radius: 24px;
	background: var(--teyll-card-tone);
}

.c-teyll-service-card__illust {
	position: absolute;
	top: 8px;
	left: 0;
	width: 100%;
	height: 216px;
	object-fit: contain;
	transition: transform 0.4s ease;
}

.c-teyll-service-card__link:hover .c-teyll-service-card__illust {
	transform: translateY(-6px);
}

.c-teyll-service-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	padding: 24px 8px 0;
}

.c-teyll-service-card__number {
	font: var(--text-teyll-en-label);
	letter-spacing: var(--ls-teyll-en-label);
	color: var(--teyll-text-secondary);
}

.c-teyll-service-card__title {
	font: var(--text-teyll-h3);
	letter-spacing: var(--ls-teyll);
}

.c-teyll-service-card__text {
	font: var(--text-teyll-body-s);
	letter-spacing: var(--ls-teyll);
	color: var(--teyll-text-secondary);
}

.c-teyll-service-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 8px;
}

.c-teyll-service-card__price {
	font: var(--text-teyll-label);
	letter-spacing: var(--ls-teyll-label);
}

/* ---------- c-teyll-works-card（PC 440×500・枠 8・SP 280×372・枠 6） ---------- */
.c-teyll-works-card {
	display: flex;
	flex: 0 0 440px;
	--teyll-card-frame: var(--teyll-accent-sky);
}

.c-teyll-works-card--purple {
	--teyll-card-frame: var(--teyll-accent-purple);
}

.c-teyll-works-card--yellow {
	--teyll-card-frame: var(--teyll-accent-yellow);
}

.c-teyll-works-card--green {
	--teyll-card-frame: var(--teyll-accent-green);
}

.c-teyll-works-card__link {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: 500px;
	padding: 20px 20px 28px;
	border: 8px solid var(--teyll-card-frame);
	border-radius: var(--radius-teyll-card);
	background: var(--teyll-bg-canvas);
	color: var(--teyll-text-primary);
	text-decoration: none;
}

.c-teyll-works-card__photo {
	display: block;
	flex: none;
	height: 260px;
	overflow: hidden;
	border-radius: 24px;
	background: var(--teyll-bg-subtle);
}

.c-teyll-works-card__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.c-teyll-works-card__link:hover .c-teyll-works-card__photo img {
	transform: scale(1.04);
}

.c-teyll-works-card__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 24px 8px 0;
}

.c-teyll-works-card__meta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.c-teyll-works-card__number {
	font: var(--text-teyll-en-label);
	letter-spacing: var(--ls-teyll-en-label);
	color: var(--teyll-text-secondary);
}

.c-teyll-works-card__title {
	font: var(--text-teyll-h3);
	letter-spacing: var(--ls-teyll);
}

.c-teyll-works-card__meta {
	font: var(--text-teyll-body-s);
	letter-spacing: var(--ls-teyll);
	color: var(--teyll-text-secondary);
}

/* ---------- c-teyll-feature-card（384×560・SP 縦に） ---------- */
.c-teyll-feature-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 560px;
	padding: 36px 36px 24px;
	border-radius: var(--radius-teyll-card);
	background: var(--teyll-bg-canvas);
}

.c-teyll-feature-card__en {
	width: fit-content;
	max-width: 100%;
	padding-bottom: 0.15em;
	margin-bottom: -0.15em;
	font: var(--text-teyll-en-price);
	background: var(--teyll-gradient-brand);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

.c-teyll-feature-card__title {
	font: var(--text-teyll-h3);
	letter-spacing: var(--ls-teyll);
}

.c-teyll-feature-card__text {
	font: var(--text-teyll-body-s);
	letter-spacing: var(--ls-teyll);
	color: var(--teyll-text-secondary);
}

.c-teyll-feature-card__illust {
	display: block;
	height: 260px;
	margin-top: auto;
	padding-top: 12px;
}

.c-teyll-feature-card__illust img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* ---------- c-teyll-plan-card（384×390・SP 縦に） ---------- */
.c-teyll-plan-card {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-height: 390px;
	padding: 32px 32px 28px;
	border-radius: var(--radius-teyll-card);
	background: var(--teyll-bg-canvas);
}

.c-teyll-plan-card.is-recommended {
	border: 3px solid transparent;
	background:
		linear-gradient(var(--teyll-bg-canvas), var(--teyll-bg-canvas)) padding-box,
		var(--teyll-gradient-ring) border-box;
}

.c-teyll-plan-card__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.c-teyll-plan-card__name {
	font: var(--text-teyll-h3);
	letter-spacing: var(--ls-teyll);
}

.c-teyll-plan-card__badge {
	display: inline-flex;
	padding: 2px 12px;
	border-radius: var(--radius-full);
	background: var(--teyll-gradient-action);
	font: var(--text-teyll-label);
	letter-spacing: var(--ls-teyll-label);
	color: var(--teyll-text-on-dark);
}

.c-teyll-plan-card__desc {
	min-height: calc(var(--fs-teyll-body-s) * 1.8 * 2); /* 2行の高さ（金額の位置をそろえる） */
	font: var(--text-teyll-body-s);
	letter-spacing: var(--ls-teyll);
	color: var(--teyll-text-secondary);
}

.c-teyll-plan-card__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px;
}

.c-teyll-plan-card__price-num {
	font: var(--text-teyll-en-price);
	color: var(--teyll-text-primary);
}

.c-teyll-plan-card__price-unit {
	font: var(--text-teyll-label);
	letter-spacing: var(--ls-teyll-label);
	color: var(--teyll-text-secondary);
}

.c-teyll-plan-card__list {
	margin-top: auto;
	padding-top: 14px;
}

.c-teyll-plan-card__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 0;
	border-top: 1px solid var(--teyll-border-default);
}

.c-teyll-plan-card__row-label {
	font: var(--text-teyll-body-s);
	letter-spacing: var(--ls-teyll);
	color: var(--teyll-text-secondary);
}

.c-teyll-plan-card__row-value {
	font: var(--text-teyll-label);
	letter-spacing: var(--ls-teyll-label);
	color: var(--teyll-text-primary);
}

/* ---------- c-teyll-step（PC：丸 112・Ring の輪 3px・番号は Brand・中央寄せ） ---------- */
.c-teyll-step {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	text-align: center;
}

.c-teyll-step__circle {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 112px;
	height: 112px;
	border-radius: 50%;
	background: var(--teyll-bg-canvas);
}

.c-teyll-step__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);
}

.c-teyll-step__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;
}

.c-teyll-step__body {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.c-teyll-step__title {
	font: var(--text-teyll-h4);
	letter-spacing: var(--ls-teyll);
}

.c-teyll-step__text {
	font: var(--text-teyll-body-s);
	letter-spacing: var(--ls-teyll);
	color: var(--teyll-text-secondary);
}

.c-teyll-step__loop {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	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);
	color: var(--teyll-text-primary);
}

/* ---------- c-teyll-cta-card（PC 588×360・SP 335×308） ---------- */
.c-teyll-cta-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 4px;
	width: 100%;
	min-height: 360px;
	padding: 48px 48px 44px;
	overflow: hidden;
	border-radius: var(--radius-teyll-panel);
	background: var(--teyll-gradient-action);
	background-size: 140% 100%;
	background-position: 0 0;
	color: var(--teyll-text-on-dark);
	text-decoration: none;
	isolation: isolate;
	transition: background-position 0.8s ease;
	--focus-color: var(--teyll-accent-indigo);
}

.c-teyll-cta-card--price {
	background-image: var(--teyll-gradient-deep);
}

.c-teyll-cta-card:hover {
	background-position: 100% 0;
}

.c-teyll-cta-card__mark {
	position: absolute;
	top: -40px;
	right: -127px;
	z-index: -1;
	width: 387px;
	height: auto;
	transition: transform 1.2s ease;
}

.c-teyll-cta-card:hover .c-teyll-cta-card__mark {
	transform: rotate(8deg);
}

.c-teyll-cta-card__en {
	font: var(--text-teyll-en-hero);
	font-size: min(var(--fs-teyll-en-hero), 6.2vw); /* 狭い PC 幅（2枚が細い）でも CONTACT を1行に */
	letter-spacing: var(--ls-teyll-en-hero);
	white-space: nowrap;
}

.c-teyll-cta-card__title {
	font: var(--text-teyll-h2);
	letter-spacing: var(--ls-teyll);
}

.c-teyll-cta-card__text {
	max-width: min(400px, calc(100% - 80px)); /* 右下の丸い矢印にかからない幅（PC 1440 では 400） */
	margin-top: 20px;
	font: var(--text-teyll-body);
	letter-spacing: var(--ls-teyll);
}

.c-teyll-cta-card__arrow {
	position: absolute;
	right: 48px;
	bottom: 44px;
}

/* ---------- 1023px 以下 ---------- */


/* ---------- SP ---------- */
@media (max-width: 767px) {
	/* サービス（280×404） */
	.c-teyll-service-card {
		flex-basis: 280px;
	}

	.c-teyll-service-card__link {
		min-height: 404px;
		padding: 12px 12px 20px;
	}

	.c-teyll-service-card__visual {
		height: 160px;
	}

	.c-teyll-service-card__illust {
		top: 4px;
		height: 152px;
	}

	.c-teyll-service-card__body {
		gap: 8px;
		padding: 16px 4px 0;
	}

	/* 実績（280×372・枠 6） */
	.c-teyll-works-card {
		flex-basis: 280px;
	}

	.c-teyll-works-card__link {
		min-height: 372px;
		padding: 14px 14px 20px;
		border-width: 6px;
	}

	.c-teyll-works-card__photo {
		height: 168px;
		border-radius: 20px;
	}

	.c-teyll-works-card__body {
		gap: 8px;
		padding: 16px 4px 0;
	}

	/* 理由（幅いっぱい・縦に） */
	.c-teyll-feature-card {
		gap: 8px;
		min-height: 0;
		padding: 28px 24px 20px;
	}

	.c-teyll-feature-card__illust {
		height: 176px;
		margin-top: 12px;
		padding-top: 0;
	}

	/* 料金（幅いっぱい・縦に） */
	.c-teyll-plan-card {
		gap: 10px;
		min-height: 0;
		padding: 24px 24px 20px;
	}

	.c-teyll-plan-card__list {
		padding-top: 10px;
	}

	.c-teyll-plan-card__row {
		padding: 10px 0;
	}

	/* 手順（左に丸 64 と下へ続く線・右に題と文。最後の手順は線なし） */
	.c-teyll-step {
		flex-direction: row;
		align-items: stretch;
		gap: 16px;
		text-align: left;
	}

	.c-teyll-step::after {
		content: "";
		position: absolute;
		top: 64px;
		bottom: 0;
		left: 31px;
		width: 2px;
		background: var(--teyll-border-default);
	}

	.c-teyll-step:last-child::after {
		display: none;
	}

	.c-teyll-step__circle {
		width: 64px;
		height: 64px;
	}

	.c-teyll-step__body {
		align-items: flex-start;
		gap: 6px;
		padding: 18px 0 32px;
	}

	.c-teyll-step:last-child .c-teyll-step__body {
		padding-bottom: 0;
	}

	/* CTA のカード（335×308） */
	.c-teyll-cta-card {
		min-height: 308px;
		padding: 28px 24px 80px;
	}

	.c-teyll-cta-card__mark {
		top: -28px;
		right: -36px;
		width: 137px;
	}

	.c-teyll-cta-card__en {
		font-size: var(--fs-teyll-en-hero);
	}

	.c-teyll-cta-card__text {
		max-width: none; /* SP は丸い矢印が文の下（下の余白 80）なので、幅いっぱい */
		margin-top: 12px;
	}

	.c-teyll-cta-card__arrow {
		right: 24px;
		bottom: 24px;
		width: 48px;
		height: 48px;
	}

	.c-teyll-cta-card__arrow .c-teyll-arrow__icon {
		width: 20px;
		height: 20px;
	}
}
