@charset "UTF-8";

/* ============================================================
   つくろう、未来の笑顔。 下層ページ 共通スタイル
   ------------------------------------------------------------
   1. Tokens / Theme
   2. Base / Layout
   3. KV
   4. Cards
   5. Top button
   6. Animation（カードフェード）
   7. Responsive（SP 〜959px / PC 960px〜）
   ============================================================ */

/* ----- 1. Tokens / Theme ----- */
.sfl {
	/* shell色（パターンごとにテーマクラスで上書き） */
	--sfl-shell: #ff8c00;
	/* カードのアクセント色（KVと分けたい場合にテーマクラスで上書き。未指定時は shell色を継承） */
	--sfl-card-accent: var(--sfl-shell);
	--sfl-card-bg: #fff6de;
	--sfl-card-desc: #958066;
	--sfl-top-btn: #e60012;
	--sfl-page-bg: #fff9ec;

	/* レイアウト（ガターは画面幅に応じて可変） */
	--sfl-side-pad: clamp(40px, 8.34vw, 120px);

	/* アニメーション */
	--sfl-fade-duration: 0.7s;
}

/* テーマ（shell色）。色は Figma 各パターンで要確定 */
.sfl--quality-safety { --sfl-shell: #ff8c00; }
.sfl--food-education { --sfl-shell: #ff7327; --sfl-card-accent: #ff5900; }
.sfl--food-joy       { --sfl-shell: #f03c00; --sfl-card-accent: #f03d00; }
.sfl--future-food    { --sfl-shell: #e50012; }

/* ----- 2. Base / Layout ----- */
.sfl {
	background-color: var(--sfl-page-bg);
	background-image: url(/tsunagu/smilefuture/image_renewal/lower/body-bg-pc.png);
	background-size: 100% auto;
	background-position: top -29px center;
	background-repeat: no-repeat;
	color: #333;
	font-family: "Noto Sans JP", sans-serif;
	overflow-x: hidden;
}

.sfl__inner {
	width: 100%;
	max-width: calc(1200px + var(--sfl-side-pad) * 2);
	margin-inline: auto;
	padding-inline: var(--sfl-side-pad);
	box-sizing: border-box;
}

.sfl img {
	max-width: 100%;
	height: auto;
}

.sfl-pc-only {
	display: block;
}	

@media screen and (max-width: 959px) {
	.sfl-pc-only {
		display: none;
	}
}

.sfl-sp-only {
	display: none;
}	

@media screen and (max-width: 959px) {
	.sfl-sp-only {
		display: block;
	}
}

/* ----- 3. KV ----- */
.sfl-kv {
	padding-top: 93px;
}

.sfl-kv__panel {
	position: relative;
	min-height: 480px;
	box-sizing: border-box;
	padding: clamp(36px, 4vw, 56px) clamp(36px, 5.5vw, 80px);
	background: var(--sfl-shell);
	border-radius: clamp(60px, 8vw, 120px);
}

.sfl-kv__text {
	max-width: min(820px, 75%);
	color: #fff;
}

.sfl-kv__title {
	margin: 0 0 36px;
	font-family: "Dela Gothic One", "Noto Sans JP", sans-serif;
	font-weight: 400;
	font-size: clamp(40px, 5vw, 72px);
	line-height: 1.2;
	letter-spacing: 0.05em;
}

.sfl-kv__lead {
	margin: 0;
	font-weight: 700;
	font-size: clamp(15px, 1.45vw, 20px);
	line-height: 1.8;
	letter-spacing: 0.05em;
}

/* 写真ゾーン：absolute でテキスト量から独立。1枚の透過画像を想定 */
.sfl-kv__photos {
	position: absolute;
	top: clamp(-80px, -5.5vw, -40px);
	right: clamp(-59px, -4.1vw, -16px);
	width: clamp(280px, 38vw, 549px);
	pointer-events: none;
}

.sfl-kv__photos img {
	display: block;
	width: 100%;
	height: auto;
}

/* ----- 4. Cards ----- */
.sfl-cards {
	padding-top: 60px;
}

.sfl-cards__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-auto-rows: 1fr;
	gap: clamp(40px, 4.16666667vw, 50px);
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sfl-card {
	position: relative;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	min-width: 0;
	padding: 28px;
	background: var(--sfl-card-bg);
	border: 2px solid var(--sfl-card-accent);
	border-radius: 40px;
}

.sfl-card__media {
	border-radius: 20px;
	overflow: hidden;
	aspect-ratio: 300 / 180;
	min-width: 0;
}

.sfl-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sfl-card__num {
	position: absolute;
	top: 18px;
	left: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: clamp(64px, 5.5vw, 80px);
	height: clamp(64px, 5.5vw, 80px);
	border-radius: 50%;
	background: var(--sfl-card-accent);
	color: #fff;
	font-family: "Imbue", serif;
	font-size: clamp(32px, 4.2vw, 40px);
	line-height: 1;
}

.sfl-card__body {
	display: flex;
	flex-direction: column;
	gap: 15px;
	flex: 1 1 auto;
	margin-top: 22px;
}

.sfl-card__heading {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.sfl-card__title {
	margin: 0;
	color: var(--sfl-card-accent);
	font-weight: 900;
	font-size: 22px;
	line-height: 1.4;
	letter-spacing: 0.05em;
}

.sfl-card__desc {
	margin: 0;
	color: var(--sfl-card-desc);
	font-weight: 400;
	font-size: 16px;
	line-height: 1.6;
}

.sfl-card__note {
	margin: 0;
	color: #7a7a7a;
	font-size: 12px;
	line-height: 1.5;
}

.sfl-card__action {
	margin: 34px 0 0;
}

.sfl-card__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 64px;
	border-radius: 999px;
	background: var(--sfl-card-accent);
	color: #fff;
	font-weight: 700;
	font-size: 18px;
	letter-spacing: 0.05em;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.sfl-card__btn:hover {
	opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
	.sfl-card {
		padding-top: 38px;
	}
}

/* ----- 5. Top button ----- */
.sfl-top {
	padding: 80px 0 100px;
	text-align: center;
}

.sfl-top__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 420px;
	min-height: 80px;
	padding: 0 40px;
	border-radius: 999px;
	background: var(--sfl-top-btn);
	color: #fff;
	font-weight: 700;
	font-size: 18px;
	letter-spacing: 0.16em;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.sfl-top__btn:hover {
	opacity: 0.85;
}

/* ----- 6. Animation（カードフェード：1枚ずつ 0.5秒間隔） ----- */
.sfl-card[data-sfl-card] {
	opacity: 0;
	transform: translateY(24px);
	transition:
		opacity var(--sfl-fade-duration) ease,
		transform var(--sfl-fade-duration) ease;
}

.sfl-card[data-sfl-card].is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.sfl-card[data-sfl-card] {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ----- 7. Responsive（SP 〜959px / PC 960px〜） ----- */
@media screen and (max-width: 959px) {
	.sfl {
		--sfl-side-pad: 25px;
		background-image: url(/tsunagu/smilefuture/image_renewal/lower/body-bg-sp.png);
	}

	.sfl-kv {
		padding-top: 72px;
	}

	.sfl-kv__title {
		font-size: clamp(39px, 10.5vw, 70px);
		margin-bottom: 16px;
	}

	.sfl-kv__lead {
		font-size: 15px;
		line-height: 1.9;
	}

	/* SP は写真を通常フローで縦並び（absolute 解除）。デザイン準拠でテキストの上に配置 */
	.sfl-kv__panel {
		display: flex;
		flex-direction: column;
		min-height: 0;
		padding: 72vw 26px 62px;
		border-radius: 80px;
	}

	.sfl-kv__text {
		max-width: 100%;
		order: 2;
	}

	.sfl-kv__photos {
		position: absolute;
		order: 1;
		width: 88.5vw;
		right: -7vw;
		top: -17vw;
	}

	.sfl-cards__grid {
		grid-template-columns: 1fr;
		grid-auto-rows: auto;
		gap: 21px;
	}

	.sfl-cards {
		padding-top: 40px;
	}

	.sfl-card__num {
		width: 80px;
		height: 80px;
		font-size: 32px;
	}

	.sfl-card__action {
		margin: 59px 0 0;
	}

	.sfl-top {
		padding: 63px 0 70px;
	}

	.sfl-top__btn {
		min-width: 0;
		width: 100%;
		max-width: 280px;
		min-height: 100px;
		padding: 0 20px;
		border-radius: 50px;
	}
}
