/* Loaded on every page: design values, fonts, reset, type, header, footer, buttons.
   Anything used by one kind of page belongs in that kind's file (landing.css, ...).
   Written for a phone first; "@media (min-width: 900px)" blocks add the desktop layout. */

/* ---------- Design values: the one place a colour or size is written down ---------- */

:root {
	/* Colours, measured from the live site. */
	--hugg-green: #54ba83;        /* brand green: highlighted words, selected pack, guarantee band */
	--hugg-green-soft: #d9eed6;   /* selected pack background */
	--hugg-green-pale: #e1f1de;   /* detail bars */
	--hugg-green-mist: #f1fff1;   /* questions background */
	--hugg-amber: #ffc25e;        /* button and badges, light end */
	--hugg-amber-deep: #d28f1f;   /* button, dark end */
	--hugg-sunset: #f97841;       /* checkout step buttons, left end */
	--hugg-sunset-deep: #eb3d7b;  /* checkout step buttons, right end */
	--hugg-beige: #efebdf;        /* quiet section background */
	--hugg-black: #000;
	--hugg-ink: #333;             /* borders of unselected cards */
	--hugg-grey: #888;            /* crossed-out prices */
	--hugg-white: #fff;
	--hugg-line: #d8d8d8;         /* hairlines */

	/* Type. The heading sizes grow on a desktop (see the end of this block). */
	--hugg-font: "Campton", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--hugg-text-xs: 12px;
	--hugg-text-s: 14px;
	--hugg-text-m: 16px;
	--hugg-text-l: 18px;
	--hugg-h1: 23px;
	--hugg-h2: 26px;

	/* Space and shape. */
	--hugg-gutter: 25px;          /* page edge to content */
	--hugg-gap: 12px;
	--hugg-section: 45px;         /* space above and below a section */
	--hugg-radius: 10px;          /* cards */
	--hugg-radius-s: 7px;         /* buttons */
	--hugg-pill: 30px;            /* labels and bars with fully rounded ends */
	--hugg-width: 1200px;         /* widest the content gets on a desktop */
}

@media (min-width: 900px) {
	:root {
		--hugg-h1: 32px;
		--hugg-h2: 38px;
		--hugg-gutter: 15px;
		--hugg-section: 60px;
	}
}

/* ---------- Fonts: only the characters the site uses, about 14 KB each ---------- */

@font-face {
	font-family: "Campton";
	src: url("../fonts/campton-400.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "Campton";
	src: url("../fonts/campton-400-italic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Campton";
	src: url("../fonts/campton-500.woff2") format("woff2");
	font-weight: 500;
	font-display: swap;
}

@font-face {
	font-family: "Campton";
	src: url("../fonts/campton-600.woff2") format("woff2");
	font-weight: 600;
	font-display: swap;
}

@font-face {
	font-family: "Campton";
	src: url("../fonts/campton-600-italic.woff2") format("woff2");
	font-weight: 600;
	font-style: italic;
	font-display: swap;
}

/* ---------- Reset and type ---------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	color: var(--hugg-black);
	background: var(--hugg-white);
	font-family: var(--hugg-font);
	font-size: var(--hugg-text-m);
	font-weight: 500;
	line-height: 1.3;
	overflow-x: hidden;
}

h1,
h2,
h3,
p {
	margin: 0;
}

h1,
h2,
h3 {
	font-weight: 600;
	line-height: 1.3;
}

h1 {
	font-size: var(--hugg-h1);
	line-height: 1.15;
}

/* Headings break into lines of even length, so no word is left alone on the last line
   ("Is", "by": mobile UI log H5). Browsers that cannot do this break as before. */
h1,
h2,
.hugg-heading {
	text-wrap: balance;
}

h2 {
	font-size: var(--hugg-h2);
}

h3 {
	font-size: var(--hugg-text-l);
}

img,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
}

.hugg-wrap {
	max-width: var(--hugg-width);
	margin: 0 auto;
	padding: 0 var(--hugg-gutter);
}

/* For screen readers only. */
.hugg-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
}

/* ---------- Announcement bar ----------
   Live: 39 px tall on a phone (12 px text), 42 px on a desktop (14 px text). */

.hugg-announce {
	padding: 11px 25px 10px;
	color: var(--hugg-white);
	background: var(--hugg-black);
	font-size: var(--hugg-text-xs);
	font-weight: 400;
	line-height: 18px;
	text-align: center;
	text-transform: uppercase;
}

@media (min-width: 900px) {
	.hugg-announce {
		padding: 14px 15px 10px;
		font-size: var(--hugg-text-s);
		line-height: 18.2px;
	}
}

/* ---------- Header ----------
   Live: a short white bar (64 px on a phone, 74 px on a desktop). On a desktop the round logo is
   100 px, starts 10 px below the bar's top edge and hangs out of the bar over whatever comes next,
   as on live. On a phone it is 48 px and sits inside the bar (owner, 21 Nov 2026: the 100 px logo
   took over a quarter of the screen's width and hung over the first picture). */

.hugg-header {
	position: relative;
	z-index: 5;
	background: var(--hugg-white);
}

/* Phone: menu button 20 px from the left edge, cart 20 px from the right. */
.hugg-header__bar {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
	padding-inline: 20px;
}

/* Above the open menu: on a desktop width the menu keeps room at its top for the hanging logo, so
   the logo must sit over it. Underneath, the menu cut the logo in half and left a white gap. */
.hugg-header__logo {
	position: absolute;
	z-index: 21;
	top: 10px; /* centred on the menu and cart icons, which sit a touch below the bar's middle */
	left: 50%;
	width: 48px;
	height: 48px;
	transform: translateX(-50%);
}

.hugg-header__logo img {
	width: 48px;
	height: 48px;
}

/* The icons sit a touch below the bar's middle, as on live. */
.hugg-header__button {
	position: relative;
	display: grid;
	place-items: center;
	min-width: 26px;
	height: 44px;
	padding-top: 10px;
	list-style: none;
	cursor: pointer;
}

/* The menu and cart buttons are 26px wide; an invisible layer widens what a finger can hit to
   44px without moving the icons (mobile UI log H2). */
.hugg-header__button::after {
	content: "";
	position: absolute;
	inset: 0 -9px;
}

/* The cart icon's right edge is 20 px from the screen edge. */
.hugg-header__cart {
	justify-items: end;
	padding-top: 3px;
}

.hugg-header__button::-webkit-details-marker {
	display: none;
}

.hugg-header__links {
	display: none;
}

/* The menu opens as a panel under the header. */
.hugg-menu__panel {
	position: absolute;
	inset: 100% 0 auto;
	z-index: 20;
	display: grid;
	padding: 20px;
	border-bottom: 1px solid var(--hugg-line);
	background: var(--hugg-white);
	box-shadow: 0 12px 20px rgb(0 0 0 / 8%);
}

.hugg-menu__panel a {
	padding: 14px 0 12px;
	border-bottom: 1px solid var(--hugg-line);
	font-size: var(--hugg-text-s);
	text-decoration: none;
	text-transform: uppercase;
}

@media (min-width: 900px) {
	.hugg-header__bar {
		height: 74px;
		padding-inline: var(--hugg-gutter);
	}

	.hugg-header__logo {
		top: 10px;
		width: 100px;
		height: 100px;
	}

	.hugg-header__logo img {
		width: 100px;
		height: 100px;
	}

	.hugg-menu__panel {
		padding-top: 56px; /* room for the hanging logo */
	}
}

/* Desktop: product links left of the logo, the rest and the cart right of it, no menu button.
   From 1200px only: narrower, the five products and the other links do not fit beside the logo
   and ran under it (seen at 900 and 1024, mobile UI log S1), so the menu button stays. */
@media (min-width: 1200px) {
	.hugg-menu {
		display: none;
	}

	/* Links are 20 px apart and carry 5 px of their own padding, so their text starts on the column's edge. */
	.hugg-header__links {
		display: flex;
		align-items: center;
		gap: 20px;
		margin-left: -5px;
		padding-top: 10px;
		font-size: var(--hugg-text-s);
		line-height: 16px;
		text-transform: uppercase;
	}

	.hugg-header__links--right {
		margin-left: auto;
		margin-right: 0;
	}

	.hugg-header__links a {
		padding: 0 5px;
		text-decoration: none;
	}

	.hugg-header__links a:hover {
		text-decoration: underline;
	}

	/* The pill sits 3 px higher than its neighbours, as on live. */
	.hugg-header__links .hugg-menu__pill {
		position: relative;
		top: -3px;
		padding: 3px 8px 0;
		border-radius: 10px;
		background: #fbd28c;
	}

	.hugg-header__cart {
		width: 40px;
		margin-right: -5px;
	}
}

/* Pages without a layout of their own (cart, checkout, posts). On a desktop: room for the hanging logo. */
.hugg-plain {
	padding-top: 24px;
	padding-bottom: 60px;
}

@media (min-width: 900px) {
	.hugg-plain {
		padding-top: 70px;
	}
}

/* ---------- Button: the one call-to-action style ---------- */


.hugg-button {
	display: block;
	width: fit-content;
	max-width: 100%;
	margin: 0 auto;
	padding: 16px 40px 12px;
	border: 0;
	border-radius: var(--hugg-radius-s);
	color: var(--hugg-black);
	background: linear-gradient(135deg, var(--hugg-amber), var(--hugg-amber-deep));
	box-shadow: 5px 5px 0 var(--hugg-black);
	font: inherit;
	font-size: var(--hugg-text-l);
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: transform 0.12s, box-shadow 0.12s;
}

/* Pressing the button pushes it into its shadow. */
.hugg-button:active {
	transform: translate(3px, 3px);
	box-shadow: 2px 2px 0 var(--hugg-black);
}

.hugg-button--wide {
	width: 100%;
	padding-inline: 16px;
}

/* On the smallest phones (under 360px) a long button ("TRY MANGO LEAF TONIC") fits on one line:
   smaller type and side padding (mobile UI log H4; at 18px it still needed ~290 of 270 px). */
@media (max-width: 359px) {
	.hugg-button {
		font-size: var(--hugg-text-m);
	}

	.hugg-button:not(.hugg-button--wide) {
		padding-right: 20px;
		padding-left: 20px;
	}
}

/* ---------- Section heading: centred, one phrase in green. Shown exactly as typed. ---------- */

.hugg-heading {
	margin-bottom: 30px;
	text-align: center;
}

.hugg-heading em {
	color: var(--hugg-green);
	font-style: normal;
}

.hugg-section {
	padding: var(--hugg-section) 0;
}

/* The last thing in a section adds no space of its own: the section's padding is the only gap. */
.hugg-section .hugg-wrap > :last-child {
	margin-bottom: 0;
}

.hugg-section--beige {
	background: var(--hugg-beige);
}

.hugg-section--pale {
	background: var(--hugg-green-mist);
}

/* ---------- Footer: the "ask" band, then columns of links ---------- */

/* Phone: heading and button on white, then the artwork edge to edge. */
.hugg-ask__inner {
	padding-inline: 0;
}

.hugg-ask__text {
	padding: 40px var(--hugg-gutter) 26px;
	text-align: center;
}

.hugg-ask h2 {
	margin-bottom: 18px;
	font-size: 40px;
	line-height: 1.1;
}

.hugg-ask h2 span {
	display: block;
}

.hugg-ask h2 em {
	color: var(--hugg-green);
	font-style: normal;
}

.hugg-ask__art img {
	width: 100%;
}

/* Desktop: one green band, text on the left, artwork on the right. */
@media (min-width: 900px) {
	.hugg-ask {
		background: var(--hugg-green);
	}

	.hugg-ask__inner {
		display: grid;
		grid-template-columns: 1fr 1fr;
		align-items: center;
		height: 280px;
		padding-inline: var(--hugg-gutter);
	}

	.hugg-ask__text {
		padding: 0;
		text-align: left;
	}

	.hugg-ask h2 {
		font-size: 50px;
	}

	.hugg-ask h2 span {
		color: var(--hugg-white);
	}

	.hugg-ask h2 em {
		color: var(--hugg-black);
	}

	.hugg-ask .hugg-button {
		margin-left: 0;
	}

	.hugg-ask__art {
		align-self: end;
		height: 280px;
	}

	.hugg-ask__art img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: 50% 42%;
	}
}

.hugg-footer__columns {
	padding-block: 34px 60px;
	font-size: var(--hugg-text-s);
}

.hugg-footer__column {
	border-bottom: 1px solid var(--hugg-black);
}

.hugg-footer__column summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 0 14px;
	font-size: var(--hugg-text-m);
	font-weight: 600;
	list-style: none;
	text-transform: uppercase;
	cursor: pointer;
}

.hugg-footer__column summary::-webkit-details-marker {
	display: none;
}

/* A small chevron that turns when the column is open. */
.hugg-footer__column summary::after {
	content: "";
	width: 9px;
	height: 9px;
	margin-right: 4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-3px) rotate(45deg);
}

.hugg-footer__column[open] summary::after {
	transform: translateY(2px) rotate(225deg);
}

.hugg-footer__column ul {
	margin: 0;
	padding: 0 0 14px;
	list-style: none;
}

/* Each link is a 44px-tall row, so it is easy to tap (the text alone was 17px: mobile UI log H1). */
.hugg-footer__column a {
	display: flex;
	align-items: center;
	min-height: 44px;
	text-decoration: none;
}

.hugg-footer__column a:hover {
	text-decoration: underline;
}

.hugg-footer__column p {
	padding-bottom: 18px;
	line-height: 1.5;
}

.hugg-footer__logo {
	display: block;
	width: 130px;
	margin-top: 40px;
}

/* Desktop: the columns side by side, always open, logo on the right. */
@media (min-width: 900px) {
	.hugg-footer__columns {
		display: grid;
		grid-template-columns: 0.6fr 1fr 1.25fr 1.7fr auto;
		align-items: start;
		gap: 30px;
		padding-block: 50px 60px;
	}

	.hugg-footer__column {
		border: 0;
	}

	.hugg-footer__column summary {
		padding: 0 0 20px;
		font-size: var(--hugg-text-l);
		pointer-events: none;
	}

	.hugg-footer__column summary::after {
		display: none;
	}

	.hugg-footer__column li {
		padding: 0 0 14px;
	}

	/* On a desktop the links keep live's spacing; the 44px rows are for fingers on a phone. */
	.hugg-footer__column a {
		display: inline;
		min-height: 0;
	}

	.hugg-footer__logo {
		width: 98px;
		margin-top: 30px;
	}
}
