/*
 * Home page (hero 4B "Your name on it" and the sections under it). Product cards come from shop.css.
 *
 * Bottle-label geometry is taken from the approved mockups (design/mockups/Final-Home-*.dc.html) and
 * expressed as percentages of the photo, so the label stays on the bottle at every size. Label type sizes
 * use cqh (1% of the photo's height) for the same reason.
 */

/* ============================================================ hero */
.hero {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	height: calc(100svh - var(--promo-h));
	min-height: 560px;
	max-height: 1100px;
	/* clip, not hidden: a hidden box can still be scrolled, and focusing the name field scrolled the photo away. */
	overflow: hidden;
	overflow: clip;
	background: #c5b59c;
	isolation: isolate;
}

.hero__media {
	position: absolute;
	top: 0;
	left: 50%;
	z-index: -1;
	height: max(100%, calc(100vw * 2532 / 1170));
	aspect-ratio: 1170 / 2532;
	transform: translateX(-50%);
	container-type: size;
}

.hero__media picture,
.hero__media img {
	width: 100%;
	height: 100%;
}

.hero__media img {
	object-fit: cover;
}

/* The printed label. Phone photo: box 84×240 at (171, 254) on a 390×844 frame. */
.bottle-label {
	--rot: -23.3deg;
	position: absolute;
	left: 43.85%;
	top: 30.09%;
	width: 21.54%;
	height: 28.44%;
	transform: rotate(var(--rot));
	transform-origin: 50% 50%;
	color: #2b2521;
	mix-blend-mode: multiply;
	opacity: 0.94;
	filter: blur(0.25px);
	pointer-events: none;
	text-align: center;
	text-transform: uppercase;
	line-height: 1;
	font-family: var(--font-sans);
	--sub: 0.498cqh;
	--prod: 0.711cqh;
	--size: 0.474cqh;
	--rule: 1.659cqh;
	--name: var(--name-m, 1.18cqh);
}

.bottle-label > span {
	position: absolute;
	left: 0;
	right: 0;
}

.bottle-label__name {
	top: 21%;
	height: 18%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bottle-label__name > span {
	max-width: 78%;
	font-family: var(--font-label);
	font-weight: 600;
	font-size: var(--name);
	line-height: 1.04;
	letter-spacing: 0.12em;
	overflow-wrap: anywhere;
}

.bottle-label__rule {
	top: 42%;
	left: 50% !important;
	right: auto !important;
	width: var(--rule);
	height: 1px;
	margin-left: calc(var(--rule) / -2);
	background: currentColor;
}

.bottle-label__sub {
	top: 45%;
	font-size: var(--sub);
	letter-spacing: 0.24em;
}

.bottle-label__product {
	top: 60%;
	font-size: var(--prod);
	font-weight: 600;
	letter-spacing: 0.18em;
}

.bottle-label__size {
	top: 86%;
	font-size: var(--size);
	letter-spacing: 0.2em;
}

.hero__content {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 0 var(--gutter) 26px;
}

.hero__content::before {
	content: "";
	position: absolute;
	inset: -80px 0 0;
	z-index: -1;
	background: linear-gradient(180deg, rgb(197 181 156 / 0), rgb(197 181 156 / 0.55));
	pointer-events: none;
}

.hero__eyebrow,
.hero__lead,
.hero__more {
	display: none;
}

.hero__title {
	font-size: clamp(34px, 9.8vw, 80px);
	line-height: 1;
	letter-spacing: -0.035em;
	max-width: 12ch;
}

.hero__try {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.hero__try-label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.hero__try-row {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.hero .hero__input {
	min-height: 48px;
	padding: 0 18px;
	border: 1px solid var(--ink);
	border-radius: var(--radius-pill);
	background: rgb(243 238 232 / 0.7);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.hero .hero__input:focus {
	background: rgb(243 238 232 / 0.92);
}

.hero__cta {
	min-height: 48px;
	font-size: 14px;
	letter-spacing: 0.02em;
	text-transform: none;
}

/* Portrait tablets use the tall photo too; slide it up so the bottle sits in the open area above the text. */
@media (min-width: 600px) and (max-aspect-ratio: 1/1) {
	.hero__media {
		top: calc((100% - 300px) / 2);
		transform: translate(-50%, -44%);
	}

	.hero__title {
		font-size: clamp(40px, 7vw, 64px);
	}

	.hero__try-row {
		flex-direction: row;
	}

	.hero .hero__input {
		flex: 1;
	}
}

@media (min-width: 700px) and (min-aspect-ratio: 1/1) {
	.hero {
		justify-content: center;
		min-height: 640px;
	}

	/* Wide photo: 2700×1500, right-aligned so the bottle stays in view. */
	.hero__media {
		left: auto;
		right: 0;
		top: 50%;
		height: max(100%, calc(100vw / 1.8));
		aspect-ratio: 1.8 / 1;
		transform: translateY(-50%);
	}

	/* Desktop photo: box 130×380 at (1247, 436) on a 1620×900 frame. */
	.bottle-label {
		--rot: -22.2deg;
		left: 76.98%;
		top: 48.44%;
		width: 8.02%;
		height: 42.22%;
		--sub: 0.722cqh;
		--prod: 1cqh;
		--size: 0.667cqh;
		--rule: 2.222cqh;
		--name: var(--name-d, 1.39cqh);
	}

	/* Left edge lines up with the page grid (header nav, "Shop the line") at every width, including > 1440px. */
	.hero__content {
		width: 100%;
		padding: calc(var(--header-h) + 20px) var(--gutter) 40px max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
		gap: 22px;
	}

	.hero__content > * {
		max-width: min(760px, 58vw);
	}

	.hero__content::before {
		content: none;
	}

	.hero__eyebrow,
	.hero__lead,
	.hero__more {
		display: block;
	}

	.hero__more {
		align-self: flex-start;
	}

	.hero__title {
		max-width: none;
		font-size: clamp(48px, 5.6vw, 80px);
		line-height: 0.98;
	}

	.hero__lead {
		max-width: 500px;
		font-size: 18px;
		line-height: 1.5;
		color: #2e2723;
	}

	.hero__try-label {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip: auto;
	}

	.hero__try-row {
		flex-direction: row;
		max-width: 540px;
	}

	.hero .hero__input {
		flex: 1;
		min-height: 52px;
	}

	.hero__cta {
		flex: 0 0 auto;
		min-height: 52px;
		padding-inline: 26px;
	}
}

/* ============================================================ section heads */
.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 18px;
}

.section-head--end {
	align-items: flex-end;
}

@media (min-width: 900px) {
	.section-head {
		margin-bottom: 32px;
	}
}

/* ============================================================ shop the line */
.home-cats.section {
	padding-block: 48px;
}

@media (min-width: 900px) {
	.home-cats.section {
		padding-block: 96px;
	}
}

.cat-tiles {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 900px) {
	.cat-tiles {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 12px;
	}
}

.cat-tile {
	display: flex;
	flex-direction: column;
	gap: 8px;
	text-decoration: none;
}

.cat-tile:hover {
	color: var(--ink);
}

.cat-tile__media {
	position: relative;
	display: block;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: var(--sand);
}

.cat-tile__media.tint-violet {
	background: var(--sand);
}

.cat-tile__media.tint-rapid {
	background: var(--tan);
}

.cat-tile__media.tint-blush {
	background: var(--blush);
}

.cat-tile__media.tint-caramel {
	background: var(--caramel);
}

.cat-tile__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 8%;
	mix-blend-mode: multiply;
	transition: transform 0.5s var(--ease);
}

.cat-tile:hover img {
	transform: scale(1.03);
}

.cat-tile__label {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.13em;
	text-transform: uppercase;
}

.cat-tile__shop {
	display: none;
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media (min-width: 900px) {
	.cat-tile {
		gap: 14px;
	}

	.cat-tile__label {
		font-size: 12px;
	}

	.cat-tile__shop {
		display: inline;
	}
}

/* ============================================================ results lookbook */
.home-looks {
	padding: 8px 0 48px;
}

.home-looks__title {
	font-size: clamp(30px, 3.9vw, 56px);
	line-height: 1.02;
	letter-spacing: -0.035em;
}

.look-row {
	display: flex;
	gap: 10px;
	margin: 0 0 18px;
	padding: 0 var(--gutter);
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--gutter);
	scrollbar-width: none;
}

.look-row::-webkit-scrollbar {
	display: none;
}

.look-row li {
	flex: 0 0 150px;
	scroll-snap-align: start;
}

.look {
	display: flex;
	flex-direction: column;
	gap: 8px;
	text-decoration: none;
}

.look:hover {
	color: var(--ink);
}

.look img {
	width: 100%;
	aspect-ratio: 2 / 5;
	object-fit: cover;
	object-position: right center;
	background: var(--sand);
}

.look__label {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: 0.13em;
	text-transform: uppercase;
}

@media (min-width: 900px) {
	.home-looks {
		padding: 0 0 104px;
	}

	.look-row {
		display: grid;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: 20px;
		max-width: var(--max);
		margin: 0 auto;
		overflow: visible;
	}

	.look__label {
		flex-direction: row;
		justify-content: space-between;
		font-size: 12px;
	}
}

/* ============================================================ pro band */
.home-pro {
	position: relative;
	display: flex;
	flex-direction: column;
}

.home-pro__media img {
	width: 100%;
	height: 460px;
	object-fit: cover;
	object-position: 60% center;
}

.home-pro__card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: -60px var(--gutter) 0;
	padding: 26px;
	background: var(--bg);
}

.home-pro__card h2 {
	font-size: clamp(28px, 3.1vw, 44px);
	line-height: 1.04;
}

.home-pro__card .text-link {
	align-self: flex-start;
}

@media (min-width: 700px) {
	.home-pro__media img {
		height: clamp(520px, 53vw, 760px);
		object-position: center;
	}

	.home-pro__card {
		position: absolute;
		left: var(--gutter);
		bottom: 40px;
		width: 460px;
		margin: 0;
		padding: 36px;
		gap: 14px;
	}
}

/* ============================================================ essentials */
.home-essentials .woocommerce {
	width: 100%;
}

/* ============================================================ how it works */
.home-how {
	padding-block: 44px;
	background: var(--sand);
}

.home-how__grid {
	display: grid;
	gap: 22px;
}

.home-how__intro {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.home-how__intro h2 {
	font-size: clamp(30px, 3.1vw, 44px);
	line-height: 1.02;
}

.home-how__steps {
	display: grid;
	gap: 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.home-how__steps li {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-top: 14px;
	border-top: 1px solid var(--ink);
}

.home-how__steps h3 {
	font-size: clamp(19px, 1.6vw, 22px);
}

.home-how__steps p {
	font-size: 16px;
	color: #4a423c;
}

@media (min-width: 900px) {
	.home-how {
		padding-block: 88px;
	}

	.home-how__grid {
		grid-template-columns: 1.1fr 3fr;
		gap: 40px;
		align-items: start;
	}

	.home-how__steps {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 40px;
	}

	.home-how__steps li {
		padding-top: 18px;
	}
}

/* The home page's footer sits straight under the sand band. */
.home .site-footer {
	margin-top: 0;
}
