/*
 * Homepage section styles (patterns home-protect, home-credibility, home-facts, home-how, home-editorial,
 * home-featured; spec home-header-footer.md 3.3 to 3.9). Tokens only; mobile at max-width 781px (D7).
 * Kept in the theme, not in the pattern markup, so a saved homepage keeps receiving theme CSS fixes and
 * nothing depends on the editor being allowed to save <style> (review I2). Width comes from the shared
 * .di-container (R11, D39); no section sets its own.
 * Enqueued on the front page (inc/setup.php di_enqueue_home_assets) and loaded in the editor.
 */

/* ---------- home-protect ---------- */
.di-home-protect {
	padding: 0 0 var(--wp--custom--layout--section);
}
.di-home-protect__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 16px;
	margin-bottom: 32px;
}
.di-home-protect__head h2 {
	margin: 0;
}
.di-home-protect__head p {
	margin: 0;
	max-width: 460px;
	color: var(--wp--preset--color--slate);
}
.di-home-protect .di-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4,minmax(0,1fr));
	gap: 12px;
}
.di-home-protect .di-tile {
	min-height: 0;
	height: 100%;
	box-sizing: border-box;
	justify-content: flex-start;
	gap: 12px;
	padding: 0 0 18px;
	overflow: hidden;
}
.di-home-protect .di-tile img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3/2;
	object-fit: cover;
	background: var(--wp--preset--color--accent-soft);
}
.di-home-protect .di-tile__title {
	font-size: 22px;
	line-height: 1.2;
	padding: 0 16px;
}
.di-home-protect .di-tile__note {
	font-size: 15px;
	line-height: 1.4;
	padding: 0 16px;
}
@media (max-width: 781px) {
	.di-home-protect {
		padding-bottom: var(--wp--custom--layout--section-mobile);
	}
	.di-home-protect .di-grid {
		grid-template-columns: repeat(2,minmax(0,1fr));
	}
	.di-home-protect .di-tile__title {
		font-size: 20px;
	}
}

/* ---------- home-credibility ---------- */
.di-home-credibility {
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 28px 0;
}
.di-home-credibility ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4,minmax(0,1fr));
	gap: 20px 32px;
}
.di-home-credibility li {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	min-width: 0;
}
.di-home-credibility li>div {
	min-width: 0;
	overflow-wrap: anywhere;
}
.di-home-credibility .di-icon {
	color: var(--wp--preset--color--accent);
	margin-top: 2px;
}
.di-home-credibility p {
	margin: 0;
}
.di-home-credibility .di-home-credibility__title {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
}
.di-home-credibility .di-home-credibility__desc {
	font-size: 16px;
	line-height: 1.4;
	margin-top: 4px;
	color: var(--wp--preset--color--slate);
}
@media (max-width: 781px) {
	.di-home-credibility ul {
		grid-template-columns: 1fr 1fr;
		gap: 20px 16px;
	}
}

/* ---------- home-facts ---------- */
.di-home-facts {
	padding: var(--wp--custom--layout--section) 0;
}
.di-home-facts h2 {
	margin: 0 0 12px;
}
.di-home-facts .di-lede {
	max-width: 620px;
	margin: 0 0 40px;
	font-size: 18px;
	line-height: 1.55;
}
.di-home-facts__grid {
	display: grid;
	grid-template-columns: repeat(3,minmax(0,1fr));
	gap: 40px;
}
.di-home-facts article {
	border-top: 2px solid var(--wp--preset--color--accent);
	padding-top: 20px;
}
.di-home-facts .di-stat {
	margin: 0 0 12px;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 56px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--wp--preset--color--ink);
}
.di-home-facts article>p:not(.di-stat):not(.di-source) {
	margin: 0 0 16px;
	line-height: 1.5;
	text-wrap: pretty;
}
.di-home-facts .di-source {
	margin: 0;
	font-size: 16px;
	line-height: 1.4;
	color: var(--wp--preset--color--slate);
}
.di-home-facts .di-source a {
	color: var(--wp--preset--color--slate);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.di-home-facts .di-source a:hover {
	color: var(--wp--preset--color--accent);
}
.di-home-facts .di-link-arrow {
	margin-top: 36px;
}
@media (max-width: 781px) {
	.di-home-facts {
		padding: var(--wp--custom--layout--section-mobile) 0;
	}
	.di-home-facts__grid {
		grid-template-columns: 1fr;
		gap: 36px;
	}
	.di-home-facts .di-stat {
		font-size: 44px;
	}
}

/* ---------- home-how ---------- */
.di-home-how {
	padding: 0 0 var(--wp--custom--layout--section);
}
.di-home-how h2 {
	margin: 0 0 40px;
}
.di-home-how ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3,minmax(0,1fr));
	gap: 40px;
}
.di-home-how li {
	display: flex;
	gap: 18px;
}
.di-home-how h3 {
	margin: 4px 0 10px;
	font-size: 28px;
	line-height: 1.2;
}
.di-home-how li p {
	margin: 0;
	color: var(--wp--preset--color--slate);
	line-height: 1.5;
	text-wrap: pretty;
}
@media (max-width: 781px) {
	.di-home-how {
		padding-bottom: var(--wp--custom--layout--section-mobile);
	}
	.di-home-how ol {
		grid-template-columns: 1fr;
		gap: 36px;
	}
}

/* ---------- home-editorial ---------- */
.di-home-editorial {
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: var(--wp--custom--layout--section) 0;
}
.di-home-editorial .di-container {
	display: flex;
	flex-wrap: wrap;
	gap: 48px;
	align-items: flex-start;
}
.di-home-editorial__left {
	flex: 1 1 380px;
	min-width: 0;
}
.di-home-editorial__right {
	flex: 1 1 400px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
}
.di-home-editorial h2 {
	margin: 0 0 16px;
}
.di-home-editorial__left>p:not(.di-eyebrow) {
	margin: 0 0 16px;
	line-height: 1.55;
}
.di-home-editorial img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16/9;
	object-fit: cover;
	border-radius: 8px;
	background: var(--wp--preset--color--accent-soft);
}
.di-home-editorial dl {
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
	gap: 24px 32px;
	font-size: 16px;
}
.di-home-editorial dt {
	color: var(--wp--preset--color--slate);
	margin-bottom: 4px;
}
.di-home-editorial dd {
	margin: 0;
	font-weight: 600;
	font-size: 18px;
}
@media (max-width: 781px) {
	.di-home-editorial {
		padding: var(--wp--custom--layout--section-mobile) 0;
	}
}

/* ---------- home-featured ---------- */
.di-home-featured {
	padding: var(--wp--custom--layout--section) 0;
}
.di-home-featured__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 16px;
	margin-bottom: 32px;
}
.di-home-featured__head h2 {
	margin: 0;
}
.di-home-featured__all {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--wp--preset--color--accent);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 4px;
}
.di-home-featured__grid {
	display: grid;
	grid-template-columns: repeat(3,minmax(0,1fr));
	gap: 40px;
}
.di-home-featured .di-card-article {
	gap: 14px;
}
.di-home-featured .di-card-article img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3/2;
	object-fit: cover;
	border-radius: 8px;
	background: var(--wp--preset--color--accent-soft);
}
.di-home-featured .di-card-article__eyebrow {
	font-size: 16px;
}
.di-home-featured .di-card-article__title {
	font-size: 26px;
	line-height: 1.2;
	text-wrap: pretty;
}
.di-home-featured .di-card-article__excerpt {
	line-height: 1.5;
}
.di-home-featured .di-card-article__meta {
	margin-top: auto;
	align-items: center;
	font-size: 16px;
}
@media (max-width: 781px) {
	.di-home-featured {
		padding: var(--wp--custom--layout--section-mobile) 0;
	}
	.di-home-featured__grid {
		grid-template-columns: 1fr;
		gap: 36px;
	}
}
