/*
Theme Name: Black Hut Design
Description: Handcrafted-goods theme for Black Hut Design, using the brand logo and colors.
Author: Mark Plante
Version: 0.2.0
Requires PHP: 7.4
Text Domain: bhd
*/

/* ------------------------------------------------------------------ Fonts */
@font-face { font-family: "Bitter"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/bitter-700.woff2") format("woff2"); }
@font-face { font-family: "Bitter"; font-style: normal; font-weight: 800; font-display: swap; src: url("assets/fonts/bitter-800.woff2") format("woff2"); }
@font-face { font-family: "Bitter"; font-style: italic; font-weight: 600; font-display: swap; src: url("assets/fonts/bitter-600-italic.woff2") format("woff2"); }

/* ----------------------------------------------------------------- Tokens */
:root {
	--container-width: 1200px;
	--container-padding: 24px;
	--space-xs: 8px;
	--space-sm: 16px;
	--space-md: 32px;
	--space-lg: 48px;
	--space-xl: 64px;

	/* Brand colors (from the logo and the live site) */
	--color-bg: #f7f6f3;
	--color-surface: #ffffff;
	--color-text: #2e2e2e;
	--color-accent: #3a6b4f;
	--color-gold: #c89b3c;
	--color-cream: #fffdf6;
	--color-muted: #666666;
	--color-line: #e4e2dc;

	/* Supporting shades */
	--forest: #223d2e;        /* deeper green for hero and footer */
	--thread: #e2bd62;        /* gold "thread" on dark green */
	--ink-on-gold: #1f2a22;

	--radius: 10px;
	--font-display: "Bitter", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 17px;
	line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); }
a:hover { color: var(--color-text); }
:focus-visible { outline: 3px solid var(--color-gold); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 var(--space-sm); }
h1 { font-size: 2.4rem; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 var(--space-sm); }

.container { width: 100%; max-width: var(--container-width); margin: 0 auto; padding: 0 var(--container-padding); }
.section { padding: var(--space-lg) 0; }
.center { text-align: center; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }

/* ----------------------------------------------- The stitch (signature motif) */
/* A running stitch of thread, as a straight rule... */
.stitch-rule {
	display: block;
	width: 72px;
	height: 2px;
	margin: 10px 0 22px;
	background: repeating-linear-gradient(90deg, var(--color-gold) 0 10px, transparent 10px 18px);
}
/* ...and as a stitched border sewn just inside an edge. */
.stitched { position: relative; }
.stitched::before {
	content: "";
	position: absolute;
	inset: var(--stitch-inset, 14px);
	pointer-events: none;
	--t: var(--stitch-color, var(--thread));
	background:
		repeating-linear-gradient(90deg, var(--t) 0 10px, transparent 10px 18px) 0 0 / 100% 2px no-repeat,
		repeating-linear-gradient(90deg, var(--t) 0 10px, transparent 10px 18px) 0 100% / 100% 2px no-repeat,
		repeating-linear-gradient(0deg, var(--t) 0 10px, transparent 10px 18px) 0 0 / 2px 100% no-repeat,
		repeating-linear-gradient(0deg, var(--t) 0 10px, transparent 10px 18px) 100% 0 / 2px 100% no-repeat;
}

/* ----------------------------------------------------------------- Header */
.site-header { background: var(--color-surface); position: relative; z-index: 10; }
.site-header::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 3px;
	background: repeating-linear-gradient(90deg, var(--color-accent) 0 12px, transparent 12px 20px);
	opacity: .5;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding-top: 12px; padding-bottom: 15px; }
.site-logo img, .custom-logo { width: 96px; height: auto; }
.site-title { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; text-decoration: none; color: var(--color-text); }

.nav-toggle { display: none; background: none; border: 1px solid var(--color-line); border-radius: 6px; padding: 8px 12px; font-size: 1rem; cursor: pointer; color: var(--color-text); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-md); align-items: center; }
.main-nav li { position: relative; }
.main-nav a { color: var(--color-text); text-decoration: none; font-size: 0.98rem; font-weight: 600; padding: 6px 0; display: inline-block; }
.main-nav > ul > li > a {
	background: linear-gradient(var(--color-gold), var(--color-gold)) 0 100% / 0 2px no-repeat;
	transition: background-size .2s ease;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.current-menu-item > a,
.main-nav > ul > li.current-menu-ancestor > a { color: var(--color-accent); background-size: 100% 2px; }
.main-nav .sub-menu { display: none; position: absolute; top: 100%; left: -12px; min-width: 230px; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); padding: 8px 0; box-shadow: 0 8px 24px rgba(0,0,0,.08); flex-direction: column; align-items: stretch; gap: 0; }
.main-nav .sub-menu .sub-menu { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 0 12px; min-width: 0; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.main-nav .sub-menu a { display: block; padding: 6px 16px; font-size: 0.93rem; font-weight: 500; }
.main-nav .sub-menu a:hover { color: var(--color-accent); }

/* ------------------------------ Products menu: one wide panel, a column per category */
@media (min-width: 861px) {
	/* Reaches down to the bottom of the header, so the pointer never "falls off" the menu on the way to the panel. */
	.main-nav > ul > li.mega-menu { position: static; padding-bottom: 50px; margin-bottom: -50px; }

	.main-nav li.mega-menu > .sub-menu {
		display: none;
		position: absolute;
		z-index: 5; /* above the header's stitched bottom edge */
		top: 100%;
		left: 50%;
		transform: translateX(-50%);
		width: min(var(--container-width), calc(100vw - 48px));
		min-width: 0;
		padding: 30px 36px 14px;
		columns: 3;
		column-gap: 48px;
		background: var(--color-surface);
		border: 0;
		border-radius: 0 0 16px 16px;
		box-shadow: 0 22px 44px rgba(34, 61, 46, .2);
	}
	.main-nav li.mega-menu:hover > .sub-menu,
	.main-nav li.mega-menu:focus-within > .sub-menu { display: block; }

	/* Each top-level category is a block that stays together in its column */
	.main-nav li.mega-menu > .sub-menu > li { break-inside: avoid; margin: 0 0 22px; }
	.main-nav li.mega-menu > .sub-menu > li > a {
		display: block;
		padding: 0 0 8px;
		font-family: var(--font-display);
		font-weight: 800;
		font-size: 1.08rem;
		color: var(--color-accent);
	}
	.main-nav li.mega-menu > .sub-menu > li > a:hover { color: var(--color-text); }

	/* Subcategories: a plain list beside a line of stitching */
	.main-nav li.mega-menu .sub-menu .sub-menu {
		display: block;
		position: static;
		padding: 2px 0 2px 16px;
		margin: 0;
		min-width: 0;
		border: 0;
		box-shadow: none;
		background: repeating-linear-gradient(0deg, var(--color-gold) 0 6px, transparent 6px 12px) 0 0 / 2px 100% no-repeat;
	}
	.main-nav li.mega-menu .sub-menu .sub-menu a { padding: 5px 0; font-size: .96rem; font-weight: 500; color: var(--color-text); }
	.main-nav li.mega-menu .sub-menu .sub-menu a:hover { color: var(--color-accent); }
}

/* ---------------------------------------------------------------- Buttons */
.button, .wp-block-button__link {
	display: inline-block;
	background: var(--color-accent);
	color: #fff;
	text-decoration: none;
	padding: 12px 26px;
	border-radius: 8px;
	font-weight: 700;
	border: 2px solid var(--color-accent);
	cursor: pointer;
	transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.button:hover { background: #2d543d; border-color: #2d543d; color: #fff; transform: translateY(-1px); }
.button--gold { background: var(--color-gold); border-color: var(--color-gold); color: var(--ink-on-gold); }
.button--gold:hover { background: #d8ab4d; border-color: #d8ab4d; color: var(--ink-on-gold); }
.button--light { background: transparent; border-color: rgba(255, 253, 246, .55); color: var(--color-cream); }
.button--light:hover { background: rgba(255, 253, 246, .12); border-color: var(--color-cream); color: #fff; }
.button--ghost { background: transparent; color: var(--color-accent); }
.button--ghost:hover { background: var(--color-accent); color: #fff; }

/* ------------------------------------------------------------ Home: hero */
.home-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--forest);
	color: var(--color-cream);
}
/* A faint woven-cloth texture and a soft glow behind the photo */
.home-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(760px 460px at 82% 30%, rgba(255, 255, 255, .09), transparent 65%),
		repeating-linear-gradient(45deg, rgba(255, 255, 255, .022) 0 2px, transparent 2px 7px),
		repeating-linear-gradient(-45deg, rgba(255, 255, 255, .022) 0 2px, transparent 2px 7px);
}
.home-hero.stitched { --stitch-inset: 16px; }
.home-hero__grid {
	display: grid;
	grid-template-columns: .94fr 1.1fr;
	gap: clamp(32px, 4vw, 64px);
	align-items: center;
	padding-top: 84px;
	padding-bottom: 96px;
}
.home-hero h1 {
	font-size: clamp(2.6rem, 5.4vw, 4.4rem);
	line-height: 1.04;
	color: var(--color-cream);
	margin: 0 0 22px;
	text-wrap: balance;
}
.home-hero__lede { max-width: 33rem; font-size: 1.18rem; line-height: 1.65; color: rgba(255, 253, 246, .86); margin: 0 0 32px; }
.home-hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* The photo, like a print pinned to a booth table */
.home-hero__photo {
	position: relative;
	margin: 0;
	padding: 12px;
	background: var(--color-cream);
	border-radius: 6px;
	box-shadow: 0 26px 52px rgba(0, 0, 0, .4), 0 2px 0 rgba(0, 0, 0, .25);
	transform: rotate(1.6deg);
}
.home-hero__photo img { width: 100%; aspect-ratio: 1200 / 700; object-fit: cover; object-position: center top; border-radius: 2px; }

/* A price tag tied to the photo, linking to the piece in it */
.hang-tag {
	position: absolute;
	left: -26px;
	bottom: 34px;
	transform: rotate(-4deg);
	text-decoration: none;
	filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .32));
}
.hang-tag__inner {
	position: relative;
	display: block;
	padding: 12px 20px 12px 40px;
	background: var(--color-gold);
	color: var(--ink-on-gold);
	clip-path: polygon(20px 0, 100% 0, 100% 100%, 20px 100%, 0 50%);
}
.hang-tag__inner::before { content: ""; position: absolute; left: 15px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--color-cream); }
.hang-tag strong { display: block; font: 800 1.08rem/1.2 var(--font-display); }
.hang-tag small { display: block; font-size: .84rem; }
.hang-tag:hover .hang-tag__inner { background: #d8ab4d; }

/* One orchestrated moment: the photo settles into place on load */
@media (prefers-reduced-motion: no-preference) {
	.home-hero__photo { animation: settle .9s cubic-bezier(.2, .7, .2, 1) both; }
	@keyframes settle {
		from { opacity: 0; transform: translateY(18px) rotate(4deg); }
		to   { opacity: 1; transform: translateY(0) rotate(1.6deg); }
	}
}

/* -------------------------------------------------- Home: next-show ribbon */
.show-ribbon { position: relative; background: var(--color-cream); }
.show-ribbon::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 2px;
	background: repeating-linear-gradient(90deg, var(--color-gold) 0 10px, transparent 10px 18px);
}
.show-ribbon__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 32px; padding-top: 20px; padding-bottom: 22px; }
.show-ribbon__main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; flex: 1 1 520px; }
.show-ribbon__title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--forest); }
.show-ribbon__facts { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; }
.show-ribbon__facts li { padding: 0 22px; border-left: 1px solid #d9c98f; font-size: .98rem; }
.show-ribbon__facts li:first-child { padding-left: 0; border-left: 0; }
.show-ribbon__links { flex: 0 0 auto; margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.show-ribbon__links a:not(.button) { font-weight: 600; }
.show-ribbon .button { padding: 8px 18px; font-size: .92rem; }

/* ------------------------------------------------------- Home: sections */
.home-section { padding: 76px 0 12px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 30px; }
.section-head h2 { margin: 0; }
.section-head .stitch-rule { margin-bottom: 0; }
.section-head__link { font-weight: 700; }

/* Category tiles: little stitched patches */
.tile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tile {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	border-radius: 12px;
	overflow: hidden;
	isolation: isolate;
	background: #d8d4c8;
	color: #fff;
	text-decoration: none;
	--stitch-inset: 10px;
	--stitch-color: rgba(255, 253, 246, .8);
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 42%, rgba(22, 40, 30, .85)); }
.tile::before { z-index: 2; }
.tile__name { position: absolute; left: 24px; right: 24px; bottom: 24px; z-index: 3; font: 800 1.5rem/1.15 var(--font-display); color: #fff; }
.tile:hover { color: #fff; }
.tile:hover img { transform: scale(1.05); }

/* ---------------------------------------------------- Product cards (tags) */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--space-md); }
.product-grid--home { grid-template-columns: repeat(3, 1fr); }
.product-card {
	position: relative;
	background: var(--color-surface);
	border: 1px solid var(--color-line);
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(34, 61, 46, .14); }
.product-card__media { position: relative; }
.product-card__image { display: block; aspect-ratio: 4 / 3; background: #efede7; overflow: hidden; }
.product-card__image img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card__title { font-size: 1.15rem; margin: 0; line-height: 1.25; }
.product-card__title a { color: var(--color-text); text-decoration: none; }
.product-card__title a:hover { color: var(--color-accent); }

/* The price, as a paper price tag */
.price-tag {
	position: absolute;
	left: 0;
	bottom: 14px;
	padding: 7px 14px 7px 30px;
	background: radial-gradient(circle at 15px 50%, #fff 0 3px, transparent 3.5px), var(--color-gold);
	color: var(--ink-on-gold);
	font: 700 .88rem/1.2 system-ui, sans-serif;
	clip-path: polygon(11px 0, 100% 0, 100% 100%, 11px 100%, 0 50%);
}

.status { display: inline-block; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #e6f4ea; color: #216e39; align-self: flex-start; }
.status--custom { background: var(--color-cream); color: #8a6a1c; border: 1px solid #e6d3a0; }
.status--sold-out { background: #fbeaea; color: #8a1e1e; }

/* ------------------------------------------------------ Home: how to order */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.step { position: relative; }
.step__num {
	position: relative;
	z-index: 1;
	width: 46px;
	height: 46px;
	display: grid;
	place-items: center;
	margin-bottom: 16px;
	border-radius: 50%;
	background: var(--color-gold);
	color: var(--ink-on-gold);
	font: 800 1.25rem var(--font-display);
}
/* a stitched thread runs from one step to the next */
.step:not(:last-child)::before {
	content: "";
	position: absolute;
	top: 22px;
	left: 58px;
	right: -24px;
	height: 2px;
	background: repeating-linear-gradient(90deg, var(--color-gold) 0 10px, transparent 10px 18px);
}
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; color: #4a4a4a; max-width: 24rem; }

/* ---------------------------------------------------------- Home: about */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.about-grid p { max-width: 36rem; }
.pullquote {
	position: relative;
	margin: 0;
	padding: 6px 0 6px 30px;
	font: italic 600 clamp(1.5rem, 2.6vw, 2.15rem) / 1.3 var(--font-display);
	color: var(--forest);
}
.pullquote::before {
	content: "";
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 2px;
	background: repeating-linear-gradient(0deg, var(--color-gold) 0 10px, transparent 10px 18px);
}

/* ------------------------------------------------------ Home: closing band */
.cta-band {
	margin-top: 76px;
	padding: 64px 32px;
	background: var(--forest);
	color: var(--color-cream);
	border-radius: 16px;
	text-align: center;
	--stitch-inset: 14px;
}
.cta-band h2 { color: var(--color-cream); }
.cta-band p { max-width: 34rem; margin: 0 auto 28px; color: rgba(255, 253, 246, .85); }

/* ------------------------------------------------------- Category pills */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--space-md); padding: 0; list-style: none; }
.pills a { display: inline-block; padding: 6px 16px; border: 1px solid var(--color-line); border-radius: 999px; background: var(--color-surface); color: var(--color-text); text-decoration: none; font-size: .92rem; }
.pills a:hover, .pills .is-active a { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }

/* -------------------------------------------------------- Single product */
.single-product__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-lg); align-items: start; }
.single-product__featured img { width: 100%; border-radius: var(--radius); border: 1px solid var(--color-line); }
.single-product__gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; margin-top: 12px; }
.single-product__gallery img { border-radius: 8px; border: 1px solid var(--color-line); aspect-ratio: 1; object-fit: cover; width: 100%; }
.single-product__price { font: 800 1.5rem var(--font-display); color: var(--color-accent); margin: 8px 0 var(--space-sm); }
.single-product__badge { display: inline-block; background: var(--color-cream); border: 1px solid #e6d3a0; color: #8a6a1c; border-radius: 6px; padding: 4px 12px; font-size: .9rem; margin: 0 0 var(--space-sm); }
.single-product__materials { margin: var(--space-sm) 0 var(--space-md); padding-top: var(--space-sm); border-top: 1px solid var(--color-line); }
.single-product__materials strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--color-muted); }

.entry-content > * { max-width: 780px; }
.page-header { padding: var(--space-lg) 0 var(--space-md); }
.page-header p { color: var(--color-muted); }
.pagination { margin-top: var(--space-lg); display: flex; gap: 8px; justify-content: center; }
.pagination .page-numbers { padding: 6px 14px; border: 1px solid var(--color-line); border-radius: 6px; background: #fff; text-decoration: none; color: var(--color-text); }
.pagination .current { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }

/* ---------------------------------- Order request form (ACF front-end form) */
.bhd-order-form { max-width: 760px; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); padding: var(--space-md); }
.bhd-order-form .acf-fields { border: 0; background: transparent; }
.bhd-order-form .acf-fields > .acf-field { border: 0; padding: 0 0 var(--space-sm) 0; }
.bhd-order-form .acf-label label { font-weight: 600; font-size: .95rem; color: var(--color-text); margin-bottom: 6px; }
.bhd-order-form .acf-label .description { color: var(--color-muted); font-size: .85rem; font-weight: 400; }
.bhd-order-form input[type="text"],
.bhd-order-form input[type="email"],
.bhd-order-form input[type="number"],
.bhd-order-form textarea,
.bhd-order-form select { width: 100%; font: inherit; color: var(--color-text); background: #fff; border: 1px solid #cfccc3; border-radius: 8px; padding: 10px 12px; box-shadow: none; }
.bhd-order-form input:focus, .bhd-order-form textarea:focus, .bhd-order-form select:focus { outline: 2px solid var(--color-accent); outline-offset: 1px; border-color: var(--color-accent); }
.bhd-order-form .acf-input-wrap { overflow: visible; }
.bhd-order-form .select2-container .select2-selection { border: 1px solid #cfccc3; border-radius: 8px; min-height: 44px; }
.bhd-order-form .acf-form-submit { margin-top: var(--space-sm); }
.bhd-order-form .acf-button, .bhd-order-form input[type="submit"] { background: var(--color-accent); color: #fff; border: 0; border-radius: 8px; padding: 12px 28px; font: inherit; font-weight: 600; cursor: pointer; }
.bhd-order-form .acf-button:hover, .bhd-order-form input[type="submit"]:hover { background: #2d543d; }
.bhd-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bhd-notice { max-width: 760px; border-radius: var(--radius); padding: var(--space-md); }
.bhd-notice--ok { background: #e6f4ea; border: 1px solid #b7dcc0; }
.bhd-notice--ok h2 { color: #216e39; }

/* ----------------------------------------------------------------- Footer */
.site-footer {
	position: relative;
	margin-top: var(--space-xl);
	padding: 40px 0 36px;
	background: var(--forest);
	color: rgba(255, 253, 246, .8);
	font-size: .94rem;
}
.site-footer::before {
	content: "";
	position: absolute;
	left: 0; right: 0; top: 0;
	height: 3px;
	background: repeating-linear-gradient(90deg, var(--thread) 0 12px, transparent 12px 20px);
	opacity: .8;
}
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-sm); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-footer a { color: var(--color-cream); text-decoration: none; }
.site-footer a:hover { color: var(--thread); text-decoration: underline; text-underline-offset: 4px; }

/* ------------------------------------------------------------- Responsive */
@media (max-width: 1000px) {
	.tile-grid { grid-template-columns: repeat(2, 1fr); }
	.product-grid--home { grid-template-columns: repeat(2, 1fr); }
	.about-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 860px) {
	h1 { font-size: 1.9rem; }
	.nav-toggle { display: block; }
	.main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-surface); border-bottom: 1px solid var(--color-line); padding: var(--space-sm) var(--container-padding); }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; align-items: flex-start; gap: 4px; }
	.main-nav .sub-menu { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 0 14px; min-width: 0; }
	.single-product__grid { grid-template-columns: 1fr; }

	.home-hero__grid { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 72px; }
	.home-hero__photo { max-width: 560px; margin: 8px auto 0; }
	.hang-tag { left: -8px; }
	.steps { grid-template-columns: 1fr; gap: 28px; }
	.step:not(:last-child)::before { display: none; }
	.show-ribbon__links { margin-left: 0; }
}
@media (max-width: 560px) {
	.product-grid--home { grid-template-columns: 1fr; }
	.tile-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
	.tile__name { left: 14px; right: 14px; bottom: 16px; font-size: 1.15rem; }
	.show-ribbon__facts li { padding: 0 14px; }
	.cta-band { padding: 48px 20px; }
}

/* ====================================================================
   Accessibility (WCAG 2.1 AA)
   ==================================================================== */

/* Text for screen readers only (visually hidden, still read aloud). */
.screen-reader-text,
.sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Keyboard focus: a dark ring with a white inner band, so it shows on light photos and dark green alike (3:1 or better). */
:focus-visible {
	outline: 3px solid var(--forest);
	outline-offset: 3px;
	box-shadow: 0 0 0 3px #fff;
}
.home-hero :focus-visible,
.site-footer :focus-visible,
.cta-band :focus-visible {
	outline-color: var(--thread);
	box-shadow: none;
}
.home-hero .hang-tag:focus-visible {
	outline-color: var(--forest);
	box-shadow: 0 0 0 3px #fff;
}
.skip-link:focus { box-shadow: none; }

/* Short, dark placeholder and asterisk colors so they pass contrast on white. */
.bhd-order-form .acf-label .acf-required,
.bhd-ml-form .acf-label .acf-required { color: #b42318; }
.bhd-order-form ::placeholder,
.bhd-ml-form ::placeholder { color: #5f5f5f; opacity: 1; }
.bhd-form-note { margin: 0 0 var(--space-sm); font-size: .95rem; color: var(--color-muted); }
.bhd-form-note a { color: var(--color-accent); }

/* Heading levels changed (h3 to h2 on shop pages) without changing how cards look. */
.product-card__title { font-weight: 700; letter-spacing: 0; }

/* Escape closes a drop-down menu (WCAG 1.4.13). It returns when the pointer leaves and comes back. */
@media (min-width: 861px) {
	.main-nav li.is-dismissed > .sub-menu { display: none !important; }
}

/* People who ask their device for less motion get none. */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
	.tile:hover img,
	.product-card:hover,
	.button:hover { transform: none; }
}

/* ====================================================================
   Home page: a large logo that sits half in the header, half in the hero
   ==================================================================== */
@media (min-width: 861px) {
	/* The logo's box keeps its normal size, so the header does not grow. */
	.home .site-header .site-logo { position: relative; z-index: 30; width: 96px; height: 96px; }

	/* A round "seal" in the header's own color, centered on the header's bottom edge (63px below the box's middle). */
	.home .site-header .site-logo::before {
		content: "";
		position: absolute;
		left: -10px;
		top: calc(50% + 63px);
		width: 236px;
		height: 236px;
		transform: translateY(-50%);
		border-radius: 50%;
		background: var(--color-surface, #fff);
		box-shadow: 0 12px 28px rgba(10, 24, 16, .35);
		/* the same gold stitching as the hero's border, sewn just inside the rim */
		outline: 2px dashed var(--color-gold);
		outline-offset: -9px;
	}

	/* The logo sits in the middle of the seal. */
	.home .site-header .site-logo img {
		position: absolute;
		left: 20px;
		top: calc(50% + 63px);
		transform: translateY(-50%);
		width: 176px;
		height: 176px;
		max-width: none;
	}

	/* Keyboard focus goes around the whole picture, not just the small box. */
	.home .site-header .site-logo a:focus-visible { outline: none; box-shadow: none; }
	.home .site-header .site-logo a:focus-visible img {
		outline: 3px solid var(--forest);
		outline-offset: 4px;
		border-radius: 12px;
		box-shadow: 0 0 0 3px #fff;
	}

	/* Make room under the logo so it never covers the headline. */
	.home .home-hero__grid { padding-top: 140px; }
}

/* ====================================================================
   Home page hero: slideshow of featured products (or one at random)
   ==================================================================== */

/* The slides sit on top of each other and fade; the frame is as tall as the tallest one. */
.hero-slides { display: grid; }
.hero-slide {
	grid-area: 1 / 1;
	position: relative;
	opacity: 0;
	visibility: hidden; /* hidden slides can't be tabbed to or read out */
	transition: opacity 1s ease, visibility 0s linear 1s;
}
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity 1s ease, visibility 0s; }
.home-hero__photo.no-fade .hero-slide { transition: none; }

/* The gold tag now belongs to its slide, so it is placed from the photo's edge, not the frame's. */
.hero-slide .hang-tag { left: -38px; bottom: 22px; }

/* Pause button and dots, tucked into the photo's lower right corner. */
.hero-controls {
	position: absolute;
	right: 22px;
	bottom: 22px;
	z-index: 5;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 5px 14px 5px 8px;
	border-radius: 999px;
	background: rgba(34, 61, 46, .9);
}
.hero-pause {
	position: relative;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--color-cream);
	cursor: pointer;
}
.hero-pause::before { /* pause: two bars */
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 11px;
	height: 12px;
	transform: translate(-50%, -50%);
	border-left: 3px solid currentColor;
	border-right: 3px solid currentColor;
}
.hero-pause.is-paused::before { /* play: a triangle */
	width: 0;
	height: 0;
	border-left: 11px solid currentColor;
	border-right: 0;
	border-top: 7px solid transparent;
	border-bottom: 7px solid transparent;
	transform: translate(-35%, -50%);
}
.hero-dots { display: flex; gap: 10px; }
.hero-dot {
	width: 16px;
	height: 16px;
	padding: 0;
	border: 2px solid var(--color-cream);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}
.hero-dot.is-active { background: var(--color-cream); }

@media (max-width: 860px) {
	.hero-slide .hang-tag { left: -20px; }
	.hero-controls { right: 14px; bottom: 14px; }
}
