/**
 * NutraInsight homepage additions.
 *
 * These styles are intentionally scoped to .nt-home so Bone remains the source
 * of truth for global typography, colors, header, footer, and post styling.
 */

.nt-home {
	--nt-home-accent: var(--bone-primary-color, var(--primary-color, #304f48));
	--nt-home-accent-dark: #213f39;
	--nt-home-ink: var(--bone-heading-color, var(--heading-color, #333333));
	--nt-home-text: var(--bone-text-color, var(--body-color, #444444));
	--nt-home-muted: #777777;
	--nt-home-border: rgba(0, 0, 0, 0.09);
	--nt-home-soft: #f7f8f6;
	--nt-home-card: #ffffff;
	--nt-home-shadow: 0 8px 26px rgba(0, 0, 0, 0.08);
	color: var(--nt-home-text);
	overflow-x: hidden;
}

.nt-home *,
.nt-home *::before,
.nt-home *::after {
	box-sizing: border-box;
}

.nt-home-container {
	width: min(100% - 40px, 1120px);
	margin-inline: auto;
}

.nt-home a {
	text-decoration: none;
}

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

.nt-home .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.nt-home-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(440px, 58vh, 640px);
	padding: clamp(92px, 12vw, 150px) 0 clamp(54px, 8vw, 92px);
	overflow: hidden;
	background: var(--nt-home-accent-dark);
	color: #ffffff;
}

.nt-home-hero-media,
.nt-home-hero-media::after {
	position: absolute;
	inset: 0;
}

.nt-home-hero-media::after {
	content: "";
	background:
		linear-gradient(90deg, rgba(0, 0, 0, 0.68) 0%, rgba(0, 0, 0, 0.32) 56%, rgba(0, 0, 0, 0.16) 100%),
		linear-gradient(0deg, rgba(0, 0, 0, 0.44) 0%, rgba(0, 0, 0, 0.06) 54%);
}

.nt-home-hero-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nt-home-hero-content {
	position: relative;
	z-index: 1;
	max-width: 740px;
}

.nt-home-eyebrow,
.nt-home-section-kicker,
.nt-home-category-badge {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	border-radius: 999px;
	background: var(--nt-home-accent);
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	padding: 8px 13px;
	text-transform: uppercase;
}

.nt-home-hero h1 {
	color: inherit;
	font-size: clamp(36px, 4.2vw, 58px);
	line-height: 1.08;
	margin: 22px 0 18px;
	max-width: 720px;
}

.nt-home-hero p {
	color: rgba(255, 255, 255, 0.9);
	font-size: clamp(17px, 1.7vw, 21px);
	line-height: 1.55;
	max-width: 640px;
	margin: 0;
}

.nt-home-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 32px;
}

.nt-home-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-weight: 700;
	line-height: 1;
	padding: 14px 24px;
	transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.nt-home-button:hover,
.nt-home-button:focus {
	transform: translateY(-1px);
}

.nt-home-button-primary {
	background: var(--nt-home-accent);
	border-color: var(--nt-home-accent);
	color: #ffffff;
}

.nt-home-button-primary:hover,
.nt-home-button-primary:focus {
	background: var(--nt-home-accent-dark);
	border-color: var(--nt-home-accent-dark);
	color: #ffffff;
}

.nt-home-button-secondary {
	background: rgba(255, 255, 255, 0.96);
	border-color: rgba(255, 255, 255, 0.96);
	color: var(--nt-home-ink);
}

.nt-home-button-secondary:hover,
.nt-home-button-secondary:focus {
	background: #ffffff;
	color: var(--nt-home-accent-dark);
}

.nt-home-section {
	padding: clamp(46px, 6vw, 78px) 0;
}

.nt-home-section-heading {
	max-width: 760px;
	margin-bottom: clamp(24px, 4vw, 38px);
}

.nt-home-section-heading-inline {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	max-width: none;
}

.nt-home-section-kicker {
	margin-bottom: 14px;
}

.nt-home-section-heading h2,
.nt-home-about-layout h2,
.nt-home-newsletter-copy h2 {
	color: var(--nt-home-ink);
	font-size: clamp(30px, 3vw, 44px);
	line-height: 1.16;
	margin: 0;
}

.nt-home-section-heading p,
.nt-home-about-copy p,
.nt-home-newsletter-copy p {
	font-size: 17px;
	line-height: 1.7;
	margin: 14px 0 0;
	color: var(--nt-home-text);
}

.nt-home-featured-categories,
.nt-home-latest-grid,
.nt-home-recipe-grid {
	display: grid;
	gap: 26px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nt-home-featured-categories {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.nt-home-latest-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nt-home-recipe-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.nt-home-card,
.nt-home-article-card,
.nt-home-featured-post {
	background: var(--nt-home-card);
	border: 1px solid var(--nt-home-border);
	border-radius: 6px;
	box-shadow: var(--nt-home-shadow);
}

.nt-home-category-card,
.nt-home-recipe-card {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	padding: 28px;
	color: var(--nt-home-text);
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.nt-home-category-card:hover,
.nt-home-category-card:focus,
.nt-home-recipe-card:hover,
.nt-home-recipe-card:focus {
	transform: translateY(-3px);
	border-color: rgba(48, 79, 72, 0.24);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.11);
	color: var(--nt-home-text);
}

.nt-home-category-card-label {
	color: var(--nt-home-ink);
	font-size: 22px;
	font-weight: 800;
	line-height: 1.2;
	margin-bottom: 13px;
}

.nt-home-category-card-copy,
.nt-home-recipe-card p,
.nt-home-card-excerpt {
	color: var(--nt-home-text);
	line-height: 1.62;
	margin: 0;
}

.nt-home-category-card-meta {
	color: var(--nt-home-muted);
	font-size: 14px;
	font-weight: 700;
	margin-top: auto;
	padding-top: 24px;
}

.nt-home-topics-section,
.nt-home-recipe-section,
.nt-home-newsletter-section {
	background: var(--nt-home-soft);
}

.nt-home-topic-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}

.nt-home-topic-pill {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	min-height: 70px;
	border: 1px solid var(--nt-home-border);
	border-radius: 6px;
	background: #ffffff;
	color: var(--nt-home-ink);
	font-weight: 800;
	padding: 18px 20px;
	transition: border-color 180ms ease, transform 180ms ease;
}

.nt-home-topic-pill span {
	min-width: 0;
	overflow-wrap: anywhere;
}

.nt-home-topic-pill small {
	color: var(--nt-home-muted);
	font-size: 13px;
	font-weight: 700;
	text-align: right;
}

.nt-home-topic-pill:hover,
.nt-home-topic-pill:focus {
	transform: translateY(-2px);
	border-color: rgba(48, 79, 72, 0.28);
	color: var(--nt-home-accent-dark);
}

.nt-home-featured-post {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
	gap: clamp(26px, 4vw, 54px);
	align-items: center;
	padding: clamp(26px, 4vw, 42px);
}

.nt-home-featured-title {
	font-size: clamp(30px, 4vw, 46px);
	line-height: 1.18;
	margin: 18px 0 14px;
}

.nt-home-featured-title a,
.nt-home-card-title a,
.nt-home-recipe-card h3 {
	color: var(--nt-home-ink);
}

.nt-home-featured-post-content p {
	font-size: 18px;
	line-height: 1.68;
	margin: 20px 0 24px;
}

.nt-home-featured-post-image {
	display: block;
	overflow: hidden;
	border-radius: 4px;
	aspect-ratio: 4 / 3;
	background: var(--nt-home-soft);
}

.nt-home-featured-post-image img,
.nt-home-post-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 220ms ease;
}

.nt-home-featured-post-image:hover img,
.nt-home-post-thumb:hover img {
	transform: scale(1.03);
}

.nt-home-post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	color: var(--nt-home-muted);
	font-size: 14px;
	line-height: 1.4;
}

.nt-home-text-link,
.nt-home-read-more {
	color: var(--nt-home-accent);
	font-weight: 800;
}

.nt-home-text-link:hover,
.nt-home-text-link:focus,
.nt-home-read-more:hover,
.nt-home-read-more:focus {
	color: var(--nt-home-accent-dark);
}

.nt-home-article-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-height: 100%;
}

.nt-home-post-thumb {
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: var(--nt-home-soft);
}

.nt-home-card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	padding: 24px;
}

.nt-home-card-title {
	font-size: 23px;
	line-height: 1.28;
	margin: 16px 0 10px;
}

.nt-home-card-excerpt {
	margin-top: 16px;
}

.nt-home-read-more {
	margin-top: auto;
	padding-top: 20px;
}

.nt-home-recipe-card h3 {
	font-size: 24px;
	line-height: 1.25;
	margin: 18px 0 12px;
}

.nt-home-about-section {
	background: #ffffff;
}

.nt-home-about-layout,
.nt-home-newsletter-layout {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	gap: clamp(28px, 6vw, 80px);
	align-items: center;
}

.nt-home-about-copy p {
	margin-bottom: 24px;
}

.nt-home-newsletter-layout {
	border-top: 1px solid var(--nt-home-border);
	border-bottom: 1px solid var(--nt-home-border);
	padding: clamp(30px, 5vw, 54px) 0;
}

.nt-home-newsletter-form {
	display: flex;
	gap: 12px;
	width: 100%;
}

.nt-home-form-message {
	border-radius: 6px;
	font-weight: 700;
	line-height: 1.5;
	margin: 0 0 14px;
	padding: 12px 14px;
}

.nt-home-form-message-success {
	background: rgba(48, 79, 72, 0.1);
	color: var(--nt-home-accent-dark);
}

.nt-home-form-message-error {
	background: rgba(160, 45, 45, 0.1);
	color: #8c2a2a;
}

.nt-home-newsletter-form input[type="email"] {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 50px;
	border: 1px solid var(--nt-home-border);
	border-radius: 999px;
	background: #ffffff;
	color: var(--nt-home-text);
	font: inherit;
	padding: 0 20px;
}

.nt-home-newsletter-form input[type="email"]:focus {
	outline: 2px solid rgba(48, 79, 72, 0.22);
	outline-offset: 2px;
}

@media (max-width: 1100px) {
	.nt-home-featured-categories,
	.nt-home-recipe-grid,
	.nt-home-topic-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nt-home-latest-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nt-home-featured-post {
		grid-template-columns: 1fr;
	}

	.nt-home-featured-post-image {
		order: -1;
	}
}

@media (max-width: 760px) {
	.nt-home-container {
		width: min(100% - 24px, 1120px);
	}

	.nt-home-hero {
		min-height: 390px;
		padding: 70px 0 42px;
	}

	.nt-home-hero-media::after {
		background:
			linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.22) 100%),
			linear-gradient(90deg, rgba(0, 0, 0, 0.46) 0%, rgba(0, 0, 0, 0.18) 100%);
	}

	.nt-home-hero h1 {
		font-size: 34px;
		line-height: 1.12;
	}

	.nt-home-hero p {
		font-size: 16px;
	}

	.nt-home-hero-actions,
	.nt-home-newsletter-form {
		flex-direction: column;
		align-items: stretch;
	}

	.nt-home-button,
	.nt-home-newsletter-form input[type="email"] {
		width: 100%;
	}

	.nt-home-section-heading-inline,
	.nt-home-about-layout,
	.nt-home-newsletter-layout {
		display: block;
	}

	.nt-home-section-heading-inline .nt-home-text-link {
		display: inline-block;
		margin-top: 16px;
	}

	.nt-home-featured-categories,
	.nt-home-latest-grid,
	.nt-home-recipe-grid,
	.nt-home-topic-grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.nt-home-topic-pill {
		align-items: flex-start;
		flex-direction: column;
		gap: 8px;
		min-height: 0;
		padding: 16px 18px;
	}

	.nt-home-topic-pill small {
		text-align: left;
	}

	.nt-home-featured-post {
		padding: 22px;
	}

	.nt-home-featured-title,
	.nt-home-card-title,
	.nt-home-recipe-card h3 {
		overflow-wrap: anywhere;
	}

	.nt-home-card-body,
	.nt-home-category-card,
	.nt-home-recipe-card {
		padding: 22px;
	}

	.nt-home-about-copy,
	.nt-home-newsletter-form-wrap {
		margin-top: 22px;
	}
}

@media (max-width: 420px) {
	.nt-home-container {
		width: min(100% - 20px, 1120px);
	}

	.nt-home-hero {
		min-height: 360px;
		padding: 58px 0 34px;
	}

	.nt-home-hero h1 {
		font-size: 30px;
	}

	.nt-home-section-heading h2,
	.nt-home-about-layout h2,
	.nt-home-newsletter-copy h2 {
		font-size: 27px;
	}

	.nt-home-card-body,
	.nt-home-category-card,
	.nt-home-recipe-card,
	.nt-home-featured-post {
		padding: 18px;
	}
}
