/* Parts used on landing and buy pages. Loaded only on those pages (see inc/assets.php).
   Written for a phone first; "@media (min-width: 900px)" blocks add the desktop layout. */

/* ---------- First screen: photos and the buy box ---------- */

/* 80 px above, as on live: the logo hangs out of the header into this space. */
.hugg-hero {
	padding-top: 80px;
}

@media (min-width: 900px) {
	/* Live: 654 px of photos, 24 px, 492 px of buy box. */
	.hugg-hero {
		display: grid;
		grid-template-columns: minmax(0, 654fr) minmax(0, 492fr);
		align-items: start;
		gap: 24px;
	}
}

/* ---------- Picture card: a photo in a rounded frame ---------- */

.hugg-card {
	overflow: hidden;
	border: 1px solid var(--hugg-line);
	border-radius: var(--hugg-radius);
	background: var(--hugg-white);
}

/* ---------- Product photos: swiped on a phone, a grid of four on a desktop ---------- */

.hugg-gallery,
.hugg-slider {
	display: flex;
	gap: var(--hugg-gap);
	margin: 0 calc(-1 * var(--hugg-gutter));
	padding: 0 var(--hugg-gutter);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.hugg-gallery__item {
	flex: 0 0 92%;
	scroll-snap-align: center;
}

.hugg-slider__item {
	flex: 0 0 100%;
	scroll-snap-align: center;
	border: 0;
	border-radius: 0;
}

@media (min-width: 900px) {
	.hugg-gallery {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 20px;
		margin: 0;
		padding: 0;
		overflow: visible;
	}

	.hugg-slider {
		margin: 0;
		padding: 0;
	}

	.hugg-slider {
		gap: 40px;
	}

	.hugg-slider__item {
		flex: 0 0 auto;
		scroll-snap-align: start;
	}

	.hugg-slider__item img {
		width: auto;
		height: var(--hugg-slide-height, 546px);
	}

	/* Live: 50 px above the reports and nothing below; the voices follow directly. */
	.hugg-section:has(.hugg-slider) {
		padding: 50px 0 0;
	}

	/* The slider follows its heading directly, as on live. */
	.hugg-section:has(.hugg-slider) .hugg-heading {
		margin-bottom: 0;
	}
}

/* ---------- Report slider: arrows and pictures that play a voice note ---------- */

.hugg-slider-frame {
	position: relative;
}

/* Arrows are for a mouse; on a phone the row is swiped. */
.hugg-slider__arrow {
	display: none;
}

.hugg-slider__item--sound {
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

/* The picture being played is outlined in green. */
.hugg-slider__item--sound[aria-pressed="true"] {
	outline: 3px solid var(--hugg-green);
	outline-offset: 2px;
}

@media (min-width: 900px) {
	.hugg-slider__arrow {
		position: absolute;
		top: 50%;
		z-index: 2;
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		margin-top: -22px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		color: var(--hugg-white);
		background: var(--hugg-black);
		font-size: 20px;
		line-height: 1;
		cursor: pointer;
	}

	.hugg-slider__arrow--back {
		left: 0;
	}

	.hugg-slider__arrow--next {
		right: 0;
	}
}

/* ---------- Product title block ---------- */

.hugg-product-title {
	margin: 20px 0 18px;
}

@media (min-width: 900px) {
	.hugg-product-title {
		margin-top: 0;
	}
}

.hugg-product-title h1 {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 8px 0 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--hugg-line);
	letter-spacing: 0.01em;
}

.hugg-badge {
	padding: 4px 10px 1px;
	border: 1px solid var(--hugg-black);
	border-radius: var(--hugg-pill);
	background: var(--hugg-amber);
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hugg-product-title__promise {
	font-size: var(--hugg-text-s);
	font-weight: 400;
}

.hugg-product-title__promise em {
	font-weight: 600;
}

.hugg-rating {
	font-size: var(--hugg-text-s);
}

.hugg-rating__stars {
	margin-right: 6px;
	color: var(--hugg-amber);
	font-size: 19px;
	vertical-align: -2px;
	letter-spacing: 2px;
}

.hugg-rating--centre {
	margin-bottom: 6px;
	text-align: center;
}

/* ---------- Chips: an icon and a word, two to a row, with a hairline under the block ---------- */

.hugg-chips {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin: 0 0 40px;
	padding: 0 0 22px;
	border-bottom: 1px solid var(--hugg-line);
	list-style: none;
	font-weight: 600;
}

.hugg-chips li {
	display: flex;
	align-items: center;
	gap: 10px;
}

.hugg-chips img {
	flex: none;
	width: 50px;
	height: 50px;
}

/* ---------- Pack picker: one pack is always selected ---------- */

.hugg-packs {
	display: grid;
	gap: 30px;
	margin: 0;
	padding: 0;
	border: 0;
}

.hugg-pack {
	position: relative;
	display: grid;
	align-content: center;
	min-height: 110px;
	padding: 25px 20px 15px;
	border: 2px solid var(--hugg-ink);
	border-radius: var(--hugg-radius);
	background: var(--hugg-white);
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
}

/* The radio button itself is hidden; the whole card is the control. */
.hugg-pack input {
	position: absolute;
	opacity: 0;
}

.hugg-pack:has(input:checked) {
	border-color: var(--hugg-green);
	background: var(--hugg-green-soft);
}

.hugg-pack:has(input:focus-visible) {
	outline: 3px solid var(--hugg-black);
	outline-offset: 3px;
}

/* Labels sitting on the card's top edge. */
.hugg-pack__labels {
	position: absolute;
	top: -17px;
	left: 20px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.hugg-pack__tag {
	padding: 9px 12px 5px;
	border-radius: var(--hugg-pill);
	color: var(--hugg-white);
	background: var(--hugg-green);
	font-size: var(--hugg-text-s);
	font-weight: 600;
	line-height: 1;
	text-transform: uppercase;
}

.hugg-pack__flag {
	padding: 5px 14px 2px;
	border: 2px solid var(--hugg-black);
	border-radius: var(--hugg-pill);
	background: var(--hugg-amber);
	font-size: 11px;
	line-height: 1;
	text-transform: uppercase;
}

.hugg-pack__row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--hugg-gap);
}

.hugg-pack__what {
	display: grid;
	gap: 4px;
}

.hugg-pack__name {
	font-size: var(--hugg-text-l);
	font-weight: 600;
	text-transform: uppercase;
}

/* The deal in one line, directly under what the customer receives. */
.hugg-pack__offer {
	width: fit-content;
	padding: 4px 10px 1px;
	border-radius: 4px;
	color: var(--hugg-white);
	background: var(--hugg-black);
	font-size: var(--hugg-text-s);
	font-weight: 600;
}

.hugg-pack__extras {
	font-size: var(--hugg-text-s);
	font-style: italic;
	font-weight: 400;
}

.hugg-pack__prices {
	display: grid;
	justify-items: end;
	white-space: nowrap;
}

.hugg-pack__was {
	color: var(--hugg-grey);
	font-size: var(--hugg-text-s);
}

.hugg-pack__price {
	font-size: 20px;
	font-weight: 600;
}

.hugg-buy__action {
	margin-top: 26px;
}

/* Short reassurances under the button. */
.hugg-assurances {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 20px;
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
	font-size: var(--hugg-text-s);
}

.hugg-assurances li {
	display: flex;
	align-items: center;
	gap: 9px;
}

.hugg-assurances img {
	width: 25px;
	height: 25px;
}

/* ---------- Details and questions that open and close ---------- */

.hugg-question summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--hugg-gap);
	font-weight: 600;
	list-style: none;
	cursor: pointer;
}

.hugg-question summary::-webkit-details-marker {
	display: none;
}

.hugg-question summary::after {
	content: "+";
	font-size: 20px;
	font-weight: 400;
	line-height: 1;
}

.hugg-question[open] summary::after {
	content: "–";
}

.hugg-question__answer {
	font-size: var(--hugg-text-s);
	font-weight: 400;
	line-height: 1.5;
}

.hugg-question__answer > * + * {
	margin-top: 10px;
}

/* Under the picker: soft green bars. */
.hugg-details {
	display: grid;
	gap: 15px;
	margin-top: 26px;
}

.hugg-details .hugg-question {
	border-radius: 25px;
	background: var(--hugg-green-pale);
}

.hugg-details summary {
	padding: 14px 20px 11px;
	font-size: var(--hugg-text-s);
	font-weight: 400;
}

.hugg-details summary em {
	font-style: normal;
	font-weight: 600;
}

.hugg-details .hugg-question__answer {
	padding: 0 20px 18px;
}

.hugg-plain-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* The questions section: a lightly textured background, plain lines, a photo that runs to the edge. */
.hugg-questions-section {
	padding-bottom: 0;
	overflow-x: clip; /* the photo may reach past the column to the screen edge, never beyond it */
	background: var(--hugg-green-mist) url("../img/shared/faq-background.png") center / cover;
}

.hugg-questions .hugg-heading {
	margin-bottom: 10px;
}

.hugg-questions .hugg-question {
	border-bottom: 1px solid var(--hugg-ink);
}

.hugg-questions summary {
	padding: 18px 0 15px;
	font-weight: 500;
}

.hugg-questions .hugg-question[open] summary {
	font-style: italic;
	font-weight: 400;
}

.hugg-questions .hugg-question__answer {
	padding-bottom: 18px;
}

/* Phone: the photo sits under the questions, edge to edge, touching the section's bottom. */
.hugg-questions__image {
	width: calc(100% + 2 * var(--hugg-gutter));
	max-width: none;
	margin: 30px calc(-1 * var(--hugg-gutter)) 0;
}

/* Desktop: questions in the left half, the photo filling the right half down to the bottom edge. */
@media (min-width: 900px) {
	.hugg-questions-section {
		padding-top: 70px;
	}

	.hugg-questions {
		display: grid;
		grid-template-columns: 540px 1fr;
		align-items: end;
		gap: 60px;
	}

	.hugg-questions__list {
		align-self: start;
		padding-bottom: 15px;
	}

	.hugg-questions .hugg-heading {
		margin-bottom: 30px;
		text-align: left;
	}

	/* The photo reaches the right edge of the screen, as on live, when the screen is wider than the column. */
	.hugg-questions__image {
		width: 638px;
		max-width: none;
		margin: 0 calc((min(100vw, var(--hugg-width)) - 100vw) / 2) 0 auto;
	}
}

/* ---------- Review cards ---------- */

.hugg-reviews {
	display: flex;
	gap: 16px;
	margin: 0 calc(-1 * var(--hugg-gutter)) 30px;
	padding: 6px var(--hugg-gutter) 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.hugg-review {
	flex: 0 0 190px;
	margin: 0;
	scroll-snap-align: center;
	background: var(--hugg-white);
	box-shadow: 0 4px 14px rgb(0 0 0 / 18%);
	text-align: center;
}

/* Videos are filmed upright on phones. */
.hugg-review__media {
	width: 100%;
	aspect-ratio: 190 / 240;
	object-fit: cover;
	background: var(--hugg-beige);
}

.hugg-review__video {
	position: relative;
}

/* Round button in the corner of a review video: sound off (crossed) or on. */
.hugg-sound {
	position: absolute;
	right: 8px;
	bottom: 8px;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgb(0 0 0 / 55%) url("../img/icons/sound-off.svg") center / 16px no-repeat;
	cursor: pointer;
}

.hugg-sound[aria-pressed="true"] {
	background-image: url("../img/icons/sound-on.svg");
}

.hugg-review__quote {
	margin: 0;
	padding: 12px 12px 6px;
	font-size: var(--hugg-text-xs);
	font-weight: 600;
}

.hugg-review__quote em {
	color: var(--hugg-green);
	font-style: normal;
}

.hugg-review__name {
	padding: 0 12px 14px;
	font-size: var(--hugg-text-xs);
	font-weight: 400;
}

@media (min-width: 900px) {
	.hugg-reviews {
		justify-content: center;
		gap: 30px;
		margin-inline: 0;
		padding-inline: 0;
		overflow: visible;
	}

	.hugg-review {
		flex: 0 1 207px;
	}

	.hugg-review__media {
		aspect-ratio: 207 / 380;
	}

	.hugg-review__quote {
		font-size: var(--hugg-text-s);
	}

	/* The first heading after the buy box is the largest on the page. */
	.hugg-section--reviews .hugg-heading {
		margin-bottom: 50px;
		font-size: 45px;
		line-height: 1.1;
	}

	.hugg-reviews {
		margin-bottom: 60px;
	}
}

/* ---------- Moving strip: black band of short claims ---------- */

.hugg-strip {
	overflow: hidden;
	padding: 18px 0 15px;
	color: var(--hugg-white);
	background: var(--hugg-black);
	font-size: var(--hugg-text-s);
	font-weight: 500;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	white-space: nowrap;
}

.hugg-strip__track {
	display: inline-flex;
	gap: 34px;
	padding-left: 34px;
	animation: hugg-drift 45s linear infinite;
}

.hugg-strip__track span {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

/* A white disc with a black tick. */
.hugg-tick {
	display: inline-grid;
	place-items: center;
	width: 18px;
	height: 18px;
	margin-top: -3px;
	border-radius: 50%;
	color: var(--hugg-black);
	background: var(--hugg-white);
	font-size: 11px;
	font-style: normal;
	font-weight: 600;
}

.hugg-tick::before {
	content: "✓";
}

@keyframes hugg-drift {
	to {
		transform: translateX(-50%);
	}
}

/* ---------- Feature: heading, paragraph, picture, button ---------- */

.hugg-feature .hugg-heading {
	margin-bottom: 10px;
}

.hugg-feature__text {
	max-width: 60ch;
	margin: 0 auto 30px;
	font-weight: 400;
	text-align: center;
}

.hugg-feature__text em {
	font-style: normal;
	font-weight: 600;
}

.hugg-feature img {
	width: 100%;
	margin: 0 auto;
}

.hugg-feature .hugg-button {
	margin-top: 25px;
}

@media (min-width: 900px) {
	.hugg-section:has(> .hugg-feature) {
		padding-block: 75px;
	}

	.hugg-feature__text {
		font-size: var(--hugg-text-l);
	}
}

/* ---------- Tiles: a photo, then small pictures with captions ---------- */

.hugg-tiles__lead {
	position: relative;
	margin-bottom: 30px;
}

.hugg-tiles__lead img {
	display: block;
	width: 100%;
}

/* The heading sits on the photo's clear top band. */
.hugg-tiles__lead .hugg-heading {
	position: absolute;
	top: 20px;
	right: 0;
	left: 0;
	margin: 0;
}

.hugg-section:has(> .hugg-tiles__lead) {
	padding-top: 30px;
	padding-bottom: 0;
}

.hugg-tiles {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px 10px;
	margin: 0 0 30px;
	padding: 0;
	list-style: none;
	font-size: var(--hugg-text-s);
	text-align: center;
}

.hugg-tiles span {
	display: block;
	max-width: 11ch;
	margin: 0 auto;
}

.hugg-tiles img {
	width: 84px;
	height: 84px;
	margin: 0 auto 10px;
	object-fit: contain;
}

/* Ingredient names are short labels in capitals, under larger round photos. */
.hugg-tiles--caps img {
	width: 110px;
	height: 110px;
	margin-bottom: 20px;
}

.hugg-tiles--caps {
	font-size: var(--hugg-text-xs);
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.hugg-tiles--caps span {
	max-width: none;
}

@media (min-width: 900px) {
	/* Six to a row; a shorter row sits centred. */
	.hugg-tiles {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 22px 0;
		font-size: var(--hugg-text-m);
	}

	.hugg-section:has(> .hugg-tiles__lead) {
		padding-top: 75px;
	}

	.hugg-tiles li {
		flex: 0 0 16.666%;
	}

	.hugg-tiles--caps {
		font-size: var(--hugg-text-s);
	}

	.hugg-tiles img {
		width: 100px;
		height: 100px;
	}

	.hugg-tiles--caps img {
		width: 140px;
		height: 140px;
	}
}

/* ---------- Wall of review screenshots ---------- */

.hugg-wall {
	display: grid;
	gap: 10px;
	overflow: hidden;
}

.hugg-wall__row {
	display: flex;
	gap: 10px;
	width: max-content;
	animation: hugg-drift 70s linear infinite;
}

.hugg-wall__row--back {
	animation-direction: reverse;
}

.hugg-wall__row img {
	height: 125px;
	width: auto;
	border-radius: 6px;
}

.hugg-wall__more {
	margin-top: 30px;
}

@media (min-width: 900px) {
	.hugg-wall__row img {
		height: 200px;
	}
}

/* ---------- Routine: steps beside a video ---------- */

.hugg-steps {
	display: grid;
	gap: 22px;
	margin: 0 0 30px;
	padding: 0;
	list-style: none;
}

.hugg-steps li {
	display: grid;
	grid-template-columns: 78px 1fr;
	align-items: center;
	gap: 16px;
}

/* A square picture is held to 60px tall, centred in its column; a wide one fills the column. */
.hugg-steps img {
	width: auto;
	max-height: 60px;
	margin: 0 auto;
}

.hugg-steps p {
	font-size: var(--hugg-text-s);
	font-weight: 400;
}

.hugg-steps strong {
	font-size: var(--hugg-text-l);
	font-weight: 600;
}

.hugg-routine__badges {
	max-width: 260px;
	margin: 34px auto 0;
}

/* On a phone the video runs edge to edge. */
.hugg-routine__media {
	width: calc(100% + 2 * var(--hugg-gutter));
	max-width: none;
	margin: 30px calc(-1 * var(--hugg-gutter)) 0;
	aspect-ratio: 385 / 450;
	object-fit: cover;
	background: var(--hugg-beige);
}

/* Desktop: words in the left half of the column; the video fills the right half of the screen. */
@media (min-width: 900px) {
	.hugg-section:has(> .hugg-routine) {
		padding: 0;
	}

	.hugg-routine {
		display: grid;
		grid-template-columns: 1fr 1fr;
		align-items: center;
		max-width: none;
		padding: 0;
	}

	.hugg-routine__text {
		padding-left: max(var(--hugg-gutter), calc((100vw - var(--hugg-width)) / 2 + var(--hugg-gutter)));
	}

	.hugg-routine .hugg-heading {
		text-align: left;
	}

	.hugg-routine .hugg-button,
	.hugg-routine__badges {
		margin-left: 0;
	}

	.hugg-routine__media {
		width: 100%;
		height: 750px;
		margin: 0;
		aspect-ratio: auto;
	}
}

/* ---------- Guarantee band ---------- */

.hugg-guarantee {
	background: var(--hugg-green);
}

.hugg-guarantee__photo {
	display: none;
}

.hugg-guarantee__text {
	padding: 40px var(--hugg-gutter);
	text-align: center;
}

.hugg-guarantee__seal {
	width: 110px;
	margin: 0 auto 16px;
	animation: hugg-turn 18s linear infinite;
}

.hugg-guarantee h2 {
	font-size: 34px;
	line-height: 1.1;
}

.hugg-guarantee p {
	max-width: 44ch;
	margin: 14px auto 0;
	font-size: var(--hugg-text-s);
	font-weight: 400;
	line-height: 1.5;
}

@keyframes hugg-turn {
	to {
		transform: rotate(360deg);
	}
}

@media (min-width: 900px) {
	/* Edge to edge: photo on the left half, green on the right half. */
	.hugg-guarantee {
		display: grid;
		grid-template-columns: 1fr 1fr;
		min-height: 288px;
	}

	.hugg-guarantee h2 {
		font-size: 50px;
	}

	.hugg-guarantee p {
		font-size: var(--hugg-text-m);
	}

	/* The photo fills its half whatever the band's height; it never stretches the band. */
	.hugg-guarantee__photo {
		position: relative;
		display: block;
	}

	.hugg-guarantee__photo img {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.hugg-guarantee__text {
		position: relative;
		display: grid;
		align-content: center;
		padding: 40px 60px;
		text-align: left;
	}

	.hugg-guarantee p {
		margin-left: 0;
	}

	/* The seal sits on the line between the photo and the green half. */
	.hugg-guarantee__seal {
		position: absolute;
		top: 50%;
		left: -60px;
		width: 120px;
		margin: -60px 0 0;
	}

	.hugg-guarantee h2,
	.hugg-guarantee p {
		padding-left: 40px;
	}
}

/* ---------- Customer voices: plain and centred, as on live ---------- */

.hugg-voices-section {
	padding: 30px 0 10px;
}

.hugg-voices {
	display: grid;
	gap: 30px;
}

.hugg-voice {
	margin: 0;
	padding: 10px;
	text-align: center;
}

.hugg-voice audio {
	width: 100%;
	height: 54px;
	margin-bottom: 15px;
}

/* The words are black; the starred part is green, as on live. */
.hugg-voice blockquote {
	margin: 0 0 30px;
	line-height: 1.3;
}

.hugg-voice blockquote em {
	color: var(--hugg-green);
	font-style: normal;
}

.hugg-voice figcaption {
	font-size: var(--hugg-text-l);
	font-weight: 600;
	line-height: 32px;
}

.hugg-voice strong {
	display: block;
	color: var(--hugg-green);
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
	text-transform: uppercase;
}

@media (min-width: 900px) {
	.hugg-voices-section {
		padding: 60px 0 0;
	}

	/* Each clip takes a quarter of the row; fewer than four sit centred. */
	.hugg-voices {
		display: flex;
		justify-content: center;
		gap: 0;
	}

	.hugg-voice {
		flex: 0 0 25%;
	}
}

/* ---------- Lead form: a beige band with a scalloped top edge ---------- */

.hugg-lead {
	position: relative;
	margin-top: 60px;
	padding: 25px 0 50px;
	background: var(--hugg-beige);
}

/* The scalloped edge: a row of beige half-circles standing on the band's top edge. */
.hugg-lead::before {
	content: "";
	position: absolute;
	inset: -10px 0 auto;
	height: 11px;
	background: radial-gradient(circle at 10px 11px, var(--hugg-beige) 10px, transparent 10.5px) 0 0 / 20px 11px repeat-x;
}

.hugg-lead h2 {
	margin-bottom: 20px;
	font-size: var(--hugg-h2);
	text-align: center;
}

.hugg-lead h2 em {
	color: var(--hugg-green);
	font-style: normal;
}

.hugg-lead__form {
	display: grid;
	gap: 14px;
}

.hugg-lead__form input[type="tel"] {
	width: 100%;
	padding: 10px 12px 8px;
	border: 1px solid var(--hugg-line);
	border-radius: 6px;
	background: var(--hugg-white);
	font: inherit;
	font-weight: 400;
}

.hugg-lead__form .hugg-button {
	margin: 0;
	padding: 12px 22px 9px;
	font-size: var(--hugg-text-s);
	box-shadow: 3px 3px 0 var(--hugg-black);
}

.hugg-lead__note,
.hugg-lead__message {
	font-size: var(--hugg-text-xs);
	font-weight: 400;
}

.hugg-lead__message:empty {
	display: none;
}

.hugg-lead__message {
	font-size: var(--hugg-text-s);
	font-weight: 600;
}

@media (min-width: 900px) {
	.hugg-lead {
		margin-top: 80px;
	}

	.hugg-lead__inner {
		display: grid;
		grid-template-columns: 1fr 1fr;
		align-items: center;
	}

	.hugg-lead h2 {
		margin: 0;
		padding-right: 40px;
		text-align: left;
	}
}

/* ---------- Problem and product cards ----------
   Live: amber cards, six across on a desktop (175 x 198, 40 px between rows), that turn over to a
   beige side showing the product. */

.hugg-matches-section .hugg-heading {
	margin-bottom: 25px;
}

.hugg-matches {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px 10px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.4;
	text-align: center;
	text-transform: uppercase;
}

.hugg-match {
	display: grid;
	align-content: center;
	height: 100%;
	min-height: 150px;
	padding: 12px 6px;
	border-radius: var(--hugg-radius);
	background: #fbd28c;
	text-decoration: none;
}

.hugg-match img {
	width: 70px;
	height: 60px;
	margin: 0 auto 10px;
	object-fit: contain;
}

.hugg-match__front,
.hugg-match__back {
	display: block;
}

/* On a touch screen there is no hover, so the product is named under the problem. */
.hugg-match__back {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid rgb(0 0 0 / 25%);
	font-weight: 600;
	text-transform: none;
}

.hugg-match__back img {
	display: none;
}

/* With a mouse: the card shows the problem, and turns over to show the product. */
@media (hover: hover) and (min-width: 900px) {
	.hugg-matches-section {
		padding: 55px 0 95px;
	}

	.hugg-matches-section .hugg-heading {
		margin-bottom: 40px;
	}

	.hugg-matches {
		grid-template-columns: repeat(6, 1fr);
		gap: 40px 22px;
		font-size: 13px;
		line-height: 20px;
	}

	.hugg-match {
		position: relative;
		height: 198px;
		padding: 0;
		background: none;
		perspective: 900px;
	}

	.hugg-match__front,
	.hugg-match__back {
		position: absolute;
		inset: 0;
		display: grid;
		align-content: center;
		margin: 0;
		padding: 15px;
		border: 0;
		border-radius: var(--hugg-radius);
		background: #fbd28c;
		backface-visibility: hidden;
		transition: transform 0.6s;
	}

	.hugg-match__front img {
		margin-bottom: 15px;
	}

	.hugg-match__back {
		background: var(--hugg-beige);
		font-size: var(--hugg-text-s);
		font-weight: 500;
		transform: rotateY(180deg);
	}

	.hugg-match__back img {
		display: block;
		width: 70px;
		height: 89px;
	}

	.hugg-match:hover .hugg-match__front,
	.hugg-match:focus-visible .hugg-match__front {
		transform: rotateY(-180deg);
	}

	.hugg-match:hover .hugg-match__back,
	.hugg-match:focus-visible .hugg-match__back {
		transform: rotateY(0);
	}
}

/* ---------- Bar fixed to the bottom of the screen ---------- */

.hugg-sticky {
	position: fixed;
	inset: auto 0 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	padding: 10px var(--hugg-gutter) 14px;
	color: var(--hugg-white);
	background: var(--hugg-ink);
	font-size: var(--hugg-text-xs);
}

.hugg-sticky[hidden] {
	display: none;
}

.hugg-sticky .hugg-button {
	flex: none;
	margin: 0;
	padding: 12px 18px 9px;
	font-size: var(--hugg-text-s);
	box-shadow: 3px 3px 0 var(--hugg-black);
}

@media (min-width: 900px) {
	.hugg-sticky {
		justify-content: space-between;
		padding: 22px max(var(--hugg-gutter), calc((100% - var(--hugg-width)) / 2 + var(--hugg-gutter)));
		font-size: var(--hugg-text-m);
	}

	.hugg-sticky .hugg-button {
		padding: 16px 40px 12px;
		font-size: var(--hugg-text-m);
	}
}

/* Room at the end of the page so the bar never covers the footer's last line. */
body:has(.hugg-sticky) .hugg-footer {
	padding-bottom: 95px;
}

/* ---------- Closing: a phrase in very large type drifting behind the product ---------- */

.hugg-closing {
	position: relative;
	overflow: hidden;
	padding: 80px 0 15px;
	font-size: 30px;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
}

.hugg-closing__track {
	display: inline-flex;
	animation: hugg-drift 60s linear infinite;
}

/* A round dot between repeats. */
.hugg-closing__track span::after {
	content: "●";
	margin: 0 0.6em;
	font-size: 0.5em;
	vertical-align: middle;
}

.hugg-closing__track em {
	color: var(--hugg-green);
	font-style: normal;
}

/* The product stands in the middle, in front of the moving words. */
.hugg-closing__image {
	position: absolute;
	top: 0;
	left: 50%;
	width: 175px;
	transform: translateX(-50%);
}

@media (min-width: 900px) {
	.hugg-closing {
		padding: 120px 0 10px;
		font-size: 60px;
	}

	.hugg-closing__image {
		width: 250px;
	}
}

/* ---------- Pop-up ---------- */

.hugg-popup {
	width: min(1000px, calc(100% - 40px));
	max-height: calc(100% - 40px);
	padding: 50px 24px 30px;
	border: 0;
	border-radius: 25px;
	background: #fefefe;
	box-shadow: 0 5px 15px rgb(0 0 0 / 30%);
	overflow-y: auto;
}

.hugg-popup::backdrop {
	background: rgb(0 0 0 / 40%);
}

.hugg-popup__close {
	position: absolute;
	top: 5px;
	right: 22px;
	padding: 0;
	border: 0;
	color: #aaa;
	background: none;
	font-size: 40px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
}

.hugg-popup__panel + .hugg-popup__panel {
	margin-top: 30px;
}

.hugg-popup h2 {
	margin-bottom: 10px;
	font-size: 24px;
}

.hugg-popup h2 em {
	color: var(--hugg-green);
	font-style: normal;
}

.hugg-popup img {
	margin: 16px auto 0;
}

@media (min-width: 900px) {
	.hugg-popup {
		padding: 40px 80px;
	}

	.hugg-popup__close {
		right: 30px;
	}

	.hugg-popup__panel {
		display: grid;
		grid-template-columns: 5fr 7fr;
		align-items: center;
	}

	.hugg-popup img {
		width: auto;
		max-height: 214px;
		margin-top: 0;
	}
}

/* ---------- Visitors who ask their device for less motion get still strips and seals ---------- */

@media (prefers-reduced-motion: reduce) {
	.hugg-strip__track,
	.hugg-wall__row,
	.hugg-closing__track,
	.hugg-guarantee__seal {
		animation: none;
	}
}

/* ---------- Parts sheet only: a label above each sample ---------- */

.hugg-sample-label {
	margin: 36px 0 22px;
	padding: 6px 10px;
	border-left: 4px solid var(--hugg-black);
	background: var(--hugg-beige);
	font-size: var(--hugg-text-s);
}
