/*
 * The home page of a calculator site (Home): the question and the way in, the most looked-up
 * foods beside it, the sections, and how it works. After oview-site's site.css, which it reads.
 */

/* Home: the question on the cream, the most looked-up foods beside it, then the sections. */
.ov-home {
	display: grid;
	grid-template-columns: minmax(0, 1fr); /* ⚠️ a plain column grows to a slider's full row, and the page ran off the screen */
	gap: var(--space-2xl, 4rem);
}

.ov-home__hero {
	display: grid;
	gap: var(--space-xl, 3rem);
	align-items: center;
	padding-block: var(--space-2xl, 4rem);
	background: var(--base, #f4ede3);
	box-shadow: 0 0 0 100vmax var(--base, #f4ede3);
	clip-path: inset(0 -100vmax); /* the cream to the screen's edges, as the answer panel's */
}

.ov-home__intro h1 {
	margin: 0;
	font-size: var(--h1, 3rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.05;
	text-wrap: balance;
}

.ov-home__intro p {
	max-inline-size: 46ch;
	margin: var(--space-s, 1rem) 0 0;
	color: var(--text-dark-muted, #6b625a);
	font-size: var(--text-l, 1.125rem);
}

.ov-home__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-xs, 0.5rem);
	margin-block-start: var(--space-l, 2rem);
}

/* A button's icon: the text's colour, a little larger than its letters, drawn like the nav's. */
.ov-home__buttons > a {
	--icon-size: 1.15em;
	--icon-color: currentColor;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
}

/* ACSS turns a hovered link's icon primary; on a primary button that is its own colour. */
.ov-home__buttons > a {
	--icon-color-hover: currentColor;
}

.ov-home__buttons svg[data-icon] path {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ov-home__quick {
	border: var(--border, 1px solid #ddd);
	border-radius: var(--radius-m, 0.75rem);
	background: var(--ov-raised, var(--white, #fff));
	overflow: hidden;
}

.ov-home__quick h2 {
	margin: 0;
	padding: var(--space-s, 1rem) var(--space-m, 1.5rem);
	font-size: var(--text-l, 1.125rem);
}

.ov-home__quick ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ov-home__quick a {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: var(--space-s, 1rem);
	padding: var(--space-s, 1rem) var(--space-m, 1.5rem);
	border-block-start: 1px solid var(--base-light, #e8dfd0);
	color: var(--text-dark, #1d1a17);
	text-decoration: none;
	transition: background-color 0.15s;
}

.ov-home__quick a:hover {
	background: var(--primary-ultra-light, #fdf1ec);
}

.ov-home__quick-name {
	font-weight: 600;
}

.ov-home__quick-line {
	color: var(--primary, #b0552a);
	font-family: var(--font-mono, ui-monospace, monospace);
	font-size: var(--text-s, 0.875rem);
	white-space: nowrap;
}

.ov-home__section > h2 {
	margin: 0;
}

.ov-home__section .ov-page__links + .ov-page__links {
	margin-block-start: var(--space-l, 2rem);
}

.ov-home__all {
	color: var(--primary, #b0552a);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.ov-home__chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-xs, 0.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* How it works: three numbered cards, the numbers ACSS boxed icons. */
.ov-home__steps ol {
	--icon-size: 1rem;
	--icon-padding: 0.5rem;
	--icon-radius: var(--radius-circle, 50%);
	--icon-border-width: 0;
	--icon-background: var(--primary, #b0552a);
	--icon-color: var(--white, #fff);
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-m, 1.5rem);
	margin: var(--space-m, 1.5rem) 0 0;
	padding: 0;
	list-style: none;
}

.ov-home__steps li {
	padding: var(--space-m, 1.5rem);
	border: var(--border, 1px solid #ddd);
	border-radius: var(--radius-m, 0.75rem);
	background: var(--ov-raised, var(--white, #fff));
}

.ov-home__steps h3 {
	margin: var(--space-s, 1rem) 0 var(--space-2xs, 0.35rem);
	font-size: var(--text-l, 1.125rem);
}

.ov-home__steps p {
	margin: 0;
	color: var(--text-dark-muted, #6b625a);
}

@media (min-width: 64em) {
	.ov-home__hero {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: var(--space-2xl, 4rem);
	}
}

@media (max-width: 47.99em) {
	.ov-home__hero {
		padding-block: var(--space-l, 2rem);
	}

	.ov-home__buttons > a {
		flex: 1 1 auto;
	}

	.ov-home__steps ol {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--space-s, 1rem);
	}
}

