/* Home page only (see inc/assets.php). Sizes are the live home page's own, measured at 375 and
   1280 wide. Written for a phone first; "@media (min-width: 900px)" blocks add the desktop layout. */

/* ---------- Hero: one picture, edge to edge ---------- */

.hugg-hero-image,
.hugg-hero-image img {
	display: block;
	width: 100%;
}

/* The home page's strip is slimmer than the one on product pages. */
.hugg-strip {
	padding: 13px 0 11px;
}

/* ---------- "I need relief from": concerns, then product cards ---------- */

.hugg-concerns-section {
	padding: 55px 0 30px;
}

.hugg-concerns {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px 4px;
	margin-bottom: 34px;
}

.hugg-concern {
	display: grid;
	justify-items: center;
	align-content: start;
	gap: 8px;
	padding: 0;
	border: 0;
	color: inherit;
	background: none;
	font: inherit;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	cursor: pointer;
}

.hugg-concern__icon {
	display: grid;
	place-items: center;
	width: 55px;
	height: 55px;
	border: 1px solid var(--hugg-black);
	border-radius: 50%;
	transition: background-color 0.15s, border-color 0.15s;
}

.hugg-concern__icon img {
	width: 36px;
	height: 36px;
	object-fit: contain;
}

.hugg-concern[aria-pressed="true"] .hugg-concern__icon {
	border-color: var(--hugg-green);
	background: var(--hugg-green-soft);
	box-shadow: 0 0 0 2px var(--hugg-green);
}

/* On a phone the cards sit closer to the screen edge than the text does (169 px wide on live). */
.hugg-products {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 9px;
	margin: 0 -11px;
	padding: 0;
	list-style: none;
}

.hugg-products [hidden] {
	display: none;
}

.hugg-product {
	display: grid;
	gap: 6px;
	height: 100%;
	padding: 25px 20px;
	border-radius: 20px;
	background: #fbf9f4;
	text-decoration: none;
}

.hugg-product img {
	width: 100%;
	margin-bottom: 6px;
}

.hugg-product .hugg-rating {
	font-size: var(--hugg-text-xs);
}

.hugg-product .hugg-rating__stars {
	font-size: 13px;
	letter-spacing: 1px;
}

.hugg-product__name {
	font-size: var(--hugg-text-xs);
	font-weight: 600;
	text-transform: uppercase;
}

.hugg-product__for {
	font-size: 11px;
	font-weight: 400;
}

.hugg-product__button {
	align-self: end;
	margin-top: 8px;
	padding: 10px 8px;
	border-radius: var(--hugg-radius-s);
	color: var(--hugg-white);
	background: var(--hugg-black);
	font-size: 11px;
	text-align: center;
	text-transform: uppercase;
}

@media (min-width: 900px) {
	.hugg-concerns-section {
		padding: 75px 0;
	}

	.hugg-concerns {
		grid-template-columns: repeat(6, 1fr);
		gap: 30px 0;
		margin-bottom: 50px;
	}

	.hugg-concern {
		gap: 14px;
		font-size: var(--hugg-text-s);
	}

	.hugg-concern__icon {
		width: 100px;
		height: 100px;
	}

	.hugg-concern__icon img {
		width: 65px;
		height: 65px;
	}

	.hugg-products {
		grid-template-columns: repeat(3, 1fr);
		gap: 20px;
		margin: 0;
	}

	.hugg-product {
		padding: 30px;
	}

	.hugg-product .hugg-rating {
		font-size: var(--hugg-text-s);
	}

	.hugg-product__name {
		font-size: 20px;
	}

	.hugg-product__for {
		font-size: var(--hugg-text-s);
	}

	.hugg-product__button {
		font-size: var(--hugg-text-s);
	}
}

/* ---------- Quality band ---------- */

.hugg-quality {
	padding-bottom: 40px;
	color: var(--hugg-white);
	background: var(--hugg-black);
	text-align: center;
}

.hugg-quality__portrait img {
	width: 260px;
	margin: 0 auto;
}

.hugg-quality__caption {
	max-width: 34ch;
	margin: 12px auto 16px;
	font-size: var(--hugg-text-s);
	font-weight: 400;
}

.hugg-quality h2 {
	font-size: 20px;
	font-weight: 400;
}

.hugg-quality h2 em {
	display: block;
	color: var(--hugg-green);
	font-style: normal;
}

.hugg-quality__text p {
	margin-top: 12px;
	font-size: var(--hugg-text-s);
	font-weight: 400;
}

/* Desktop: words on the left; the portrait stands at the right, its feet on the band's bottom
   edge, rising above the band into the space the product cards leave free. */
@media (min-width: 900px) {
	.hugg-quality {
		position: relative;
		z-index: 1;
		padding: 60px 0;
		text-align: left;
	}

	.hugg-quality__inner {
		position: relative;
	}

	.hugg-quality__portrait {
		position: absolute;
		right: var(--hugg-gutter);
		bottom: -60px;
	}

	.hugg-quality__portrait img {
		width: 400px;
	}

	.hugg-quality__caption {
		display: none;
	}

	.hugg-quality__text {
		max-width: 740px;
	}

	.hugg-quality h2 {
		font-size: 38px;
	}

	.hugg-quality__text p {
		margin-top: 18px;
		font-size: 20px;
	}
}

/* ---------- Two halves: words and a picture or video ---------- */

.hugg-split__text {
	padding: 45px var(--hugg-gutter) 30px;
}

.hugg-split h2 {
	margin-bottom: 14px;
	font-size: 38px;
	line-height: 1.1;
}

.hugg-split h2 em {
	display: block;
	color: var(--hugg-green);
	font-style: normal;
}

.hugg-split__para {
	max-width: 46ch;
	margin-bottom: 26px;
	font-weight: 400;
}

.hugg-split .hugg-button {
	margin-left: 0;
}

.hugg-split__badges {
	width: 275px;
	margin-top: 34px;
}

.hugg-split__ticks {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
	margin-bottom: 10px;
	font-size: var(--hugg-text-s);
	font-weight: 400;
}

.hugg-split__media img {
	width: calc(100% - 2 * var(--hugg-gutter));
	margin: 0 auto;
}

.hugg-split__media video {
	width: 100%;
	aspect-ratio: 385 / 450;
	object-fit: cover;
	background: var(--hugg-beige);
}

.hugg-split--textured {
	background: var(--hugg-green-mist) url("../img/home/sugar-background.png") center / cover;
	text-align: center;
}

.hugg-split--textured .hugg-split__ticks {
	justify-content: center;
}

.hugg-split--textured .hugg-split__para,
.hugg-split--textured .hugg-button {
	margin-inline: auto;
}

@media (min-width: 900px) {
	.hugg-split {
		display: grid;
		grid-template-columns: 1fr 1fr;
		align-items: center;
	}

	/* The words line up with the page's 1200 px column; the picture may run to the screen edge. */
	.hugg-split__text {
		padding: 30px 0 30px max(var(--hugg-gutter), calc((100vw - var(--hugg-width)) / 2 + var(--hugg-gutter)));
	}

	.hugg-split h2 {
		font-size: 65px;
	}

	/* The green part of a heading stays on one line. */
	.hugg-split h2 em {
		white-space: nowrap;
	}

	.hugg-split__para {
		max-width: 40ch;
	}

	.hugg-split__media img {
		width: 100%;
		max-width: 600px;
		margin: 0;
	}

	.hugg-split--video .hugg-split__media video {
		height: 750px;
		aspect-ratio: auto;
	}

	.hugg-split--textured {
		text-align: left;
	}

	.hugg-split--textured .hugg-split__ticks {
		justify-content: flex-start;
	}

	.hugg-split--textured .hugg-split__para,
	.hugg-split--textured .hugg-button {
		margin-inline: 0;
	}

	/* The textured band is 475 px tall on live; its picture is a little taller and is cut at the top. */
	.hugg-split--textured {
		height: 475px;
		overflow: hidden;
	}

	.hugg-split--textured .hugg-split__media {
		align-self: end;
	}

	.hugg-split--textured .hugg-split__media img {
		max-width: 638px;
	}
}

/* ---------- Loved by experts: collage, green panel, collage ---------- */

.hugg-loved img {
	width: 100%;
}

.hugg-loved__panel {
	padding: 38px 30px;
	color: var(--hugg-white);
	background: var(--hugg-green);
	text-align: center;
}

.hugg-loved__panel .hugg-loved__seal {
	width: 70px;
	margin: 0 auto 24px;
}

.hugg-loved h2 {
	margin-bottom: 20px;
	font-size: 24px;
}

.hugg-loved blockquote {
	margin: 14px 0 16px;
	font-weight: 400;
	line-height: 1.4;
}

.hugg-loved .hugg-rating__stars {
	font-size: 18px;
}

@media (min-width: 900px) {
	.hugg-loved {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 10px;
		margin-top: 70px;
	}

	.hugg-loved > img {
		height: 100%;
		object-fit: cover;
	}

	.hugg-loved__panel {
		display: grid;
		align-content: center;
	}
}

/* ---------- Picture tiles ---------- */

.hugg-tile-gallery {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.hugg-tile-gallery img {
	width: 100%;
	border-radius: var(--hugg-radius);
}

@media (min-width: 900px) {
	.hugg-tile-gallery {
		grid-template-columns: repeat(4, 1fr);
		gap: 10px;
	}
}
