/* =========================================================================
   Homepage sections.
   ========================================================================= */

/* ---------- 1. Hero ---------- */

.hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(160deg, var(--cream) 0%, var(--white) 62%);
	padding-block: clamp(3rem, 7vw, 6rem);
}

.hero__inner {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	align-items: center;
	gap: clamp(2rem, 5vw, 4.5rem);
}

.hero__blob {
	position: absolute;
	top: -18%;
	right: -12%;
	width: 62vw;
	max-width: 820px;
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, rgba(193, 157, 86, 0.2), rgba(193, 157, 86, 0) 68%);
	pointer-events: none;
}

.hero__wheat {
	position: absolute;
	color: var(--gold);
	opacity: 0.12;
	pointer-events: none;
}

.hero__wheat--tl { top: 6%; left: -40px; transform: rotate(-24deg); }
.hero__wheat--br { bottom: -40px; right: 8%; transform: rotate(14deg); }

.hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 1.1rem;
	padding: 0.45rem 1rem 0.45rem 0.75rem;
	border: 1px solid rgba(193, 157, 86, 0.35);
	border-radius: var(--radius-pill);
	background: rgba(255, 255, 255, 0.7);
	font-size: var(--fs-eyebrow);
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--gold-deep);
}

.hero__title {
	margin: 0 0 1.25rem;
	/* Capped so "Handmade Bread," holds one line before the authored break. */
	font-size: clamp(2.4rem, 4.4vw, 3.9rem);
	line-height: 1.08;
}

.hero__text {
	max-width: 52ch;
	font-size: var(--fs-lead);
	color: var(--ink-soft);
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	margin-top: 2rem;
}

.hero__stats {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(1.5rem, 4vw, 3rem);
	margin: clamp(2.25rem, 5vw, 3.25rem) 0 0;
	padding-top: clamp(1.5rem, 3vw, 2rem);
	border-top: 1px solid var(--line);
}

.hero__stat { margin: 0; }

.hero__stat-value {
	font-family: var(--font-display);
	font-size: clamp(1.75rem, 3vw, 2.4rem);
	color: var(--ink);
	line-height: 1.1;
}

.hero__stat-label {
	margin: 0.2rem 0 0;
	font-size: 0.78rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-mute);
}

/* Hero media */

.hero__media {
	position: relative;
}

/* The hero artwork is a transparent cutout — no frame, no crop, no card.
   A soft drop-shadow does the lifting a container used to do. */
.hero__img {
	width: 100%;
	height: auto;
	max-width: 560px;
	margin-inline: auto;
	filter: drop-shadow(0 30px 45px rgba(35, 35, 35, 0.22));
	animation: breadman-hero-float 9s ease-in-out infinite;
}

@keyframes breadman-hero-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-14px); }
}

.hero__img-placeholder {
	display: grid;
	place-items: center;
	height: 100%;
	color: var(--gold);
	opacity: 0.4;
}

.hero__badge {
	position: absolute;
	top: 4%;
	left: 0;
	display: grid;
	place-content: center;
	justify-items: center;
	width: 118px;
	height: 118px;
	border-radius: 50%;
	background: var(--gold);
	color: var(--on-gold);
	box-shadow: 0 18px 40px rgba(193, 157, 86, 0.4);
	text-align: center;
	animation: breadman-float 5s ease-in-out infinite;
}

.hero__badge-top {
	font-family: var(--font-display);
	font-size: 1.9rem;
	line-height: 1;
}

.hero__badge-bottom {
	margin-top: 0.2rem;
	font-size: 0.62rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	opacity: 0.9;
}

.hero__chip {
	position: absolute;
	right: 0;
	bottom: 6%;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.85rem 1.2rem;
	background: var(--white);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	animation: breadman-float 6.5s ease-in-out infinite reverse;
}

.hero__chip .icon { color: var(--gold); flex: none; }
.hero__chip span { display: grid; line-height: 1.35; }
.hero__chip strong { font-size: 0.85rem; color: var(--ink); }
.hero__chip em { font-size: 0.72rem; font-style: normal; color: var(--ink-mute); }

@keyframes breadman-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-10px); }
}

@media (max-width: 900px) {
	.hero__inner { grid-template-columns: 1fr; }
	.hero__media { order: -1; max-width: 420px; margin-inline: auto; }
	.hero__img { max-width: 100%; }
	.hero__badge { left: -8px; top: 0; width: 92px; height: 92px; }
	.hero__chip { right: -8px; bottom: 2%; }
}

@media (max-width: 520px) {
	.hero__chip { display: none; }
	.hero__stats { gap: 1.25rem; }
}

/* ---------- 2. Category rail ---------- */

.section--cats {
	padding-bottom: clamp(2rem, 3vw, 3rem);
}

/* 11 categories + the View All tile = 12, so six across gives two even rows. */
.cat-rail {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 0.85rem;
}

@media (max-width: 1100px) {
	.cat-rail { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
	.cat-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.cat-tile {
	display: grid;
	justify-items: center;
	gap: 0.15rem;
	height: 100%;
	padding: 1.25rem 0.75rem 1.1rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	text-align: center;
	color: var(--ink);
	transition: transform 0.28s var(--ease), border-color 0.28s var(--ease),
		box-shadow 0.28s var(--ease), background 0.28s var(--ease);
}

.cat-tile:hover {
	transform: translateY(-6px);
	border-color: rgba(193, 157, 86, 0.45);
	background: var(--cream);
	box-shadow: var(--shadow);
	color: var(--ink);
}

.cat-tile__art {
	display: grid;
	place-items: center;
	width: 74px;
	height: 74px;
	margin-bottom: 0.55rem;
	border-radius: 50%;
	background: var(--gold-wash);
	color: var(--gold-deep);
	overflow: hidden;
	transition: background 0.28s var(--ease), transform 0.28s var(--ease);
}

.cat-tile:hover .cat-tile__art {
	background: var(--white);
	transform: scale(1.06);
}

/* Transparent cutouts sit best with a touch of padding and no crop. */
.cat-tile__art img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 8px;
	mix-blend-mode: multiply;
}

.cat-tile__art--all {
	background: var(--ink);
	color: var(--white);
}

.cat-tile--all:hover .cat-tile__art--all { background: var(--gold); }

.cat-tile__name {
	font-family: var(--font-display);
	font-size: 0.95rem;
	line-height: 1.25;
	color: var(--ink);
}

.cat-tile__count {
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-mute);
}

@media (max-width: 760px) {
	/* Mobile-app feel: one swipeable row rather than a wrapping grid. */
	.cat-rail {
		display: flex;
		gap: 0.65rem;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding-bottom: 0.75rem;
		margin-inline: calc(var(--gutter) * -1);
		padding-inline: var(--gutter);
		scrollbar-width: none;
	}

	.cat-rail::-webkit-scrollbar { display: none; }

	.cat-rail__item {
		flex: 0 0 132px;
		scroll-snap-align: start;
	}

	.cat-tile__art { width: 62px; height: 62px; }
}

/* ---------- 5. What we offer ---------- */

.section--offer {
	position: relative;
	background: var(--white);
}

.offer__decor {
	position: absolute;
	bottom: -2%;
	width: clamp(110px, 12vw, 190px);
	opacity: 0.9;
	pointer-events: none;
	line-height: 0;
}

.offer__decor img {
	width: 100%;
	height: auto;
	filter: drop-shadow(0 16px 26px rgba(35, 35, 35, 0.13));
}

.offer__decor--left { left: 1%; transform: scaleX(-1) rotate(-6deg); }
.offer__decor--right { right: 1%; transform: rotate(6deg); }

@media (max-width: 1180px) {
	.offer__decor { display: none; }
}

.offer-steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(1.5rem, 3vw, 2.5rem);
	counter-reset: offer;
}

.offer-step {
	position: relative;
	padding-top: 2.5rem;
}

.offer-step__num {
	font-family: var(--font-display);
	font-size: clamp(2.5rem, 4vw, 3.4rem);
	line-height: 1;
	color: var(--gold);
	opacity: 0.35;
}

.offer-step__rule {
	display: block;
	width: 100%;
	height: 1px;
	margin: 1.25rem 0 1.5rem;
	background: var(--line);
	position: relative;
}

.offer-step__rule::after {
	content: "";
	position: absolute;
	left: 0;
	top: -3px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--gold);
	transition: transform 0.4s var(--ease);
}

.offer-step:hover .offer-step__rule::after {
	transform: translateX(calc(100% * 6));
}

.offer-step__title { margin-bottom: 0.6rem; }

.offer-step__text {
	color: var(--ink-mute);
	margin: 0;
}

@media (max-width: 820px) {
	.offer-steps { grid-template-columns: 1fr; gap: 0; }

	.offer-step {
		padding: 1.75rem 0 1.75rem 3.5rem;
		border-bottom: 1px solid var(--line);
	}

	.offer-step:last-child { border-bottom: 0; }

	.offer-step__num {
		position: absolute;
		left: 0;
		top: 1.6rem;
		font-size: 2rem;
	}

	.offer-step__rule { display: none; }
}

/* ---------- 4. About ---------- */

.about__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(2rem, 5vw, 4.5rem);
}

.about__media {
	position: relative;
	padding-bottom: 3rem;
	padding-right: 3rem;
}

.about__img { overflow: hidden; border-radius: var(--radius-lg); }

.about__img--main {
	aspect-ratio: 4 / 3.6;
	box-shadow: var(--shadow);
	background: var(--cream-2);
}

.about__img--main img { width: 100%; height: 100%; object-fit: cover; }

.about__img--inset {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 46%;
	aspect-ratio: 1;
	border: 6px solid var(--cream);
	box-shadow: var(--shadow);
	background: var(--cream-2);
}

.about__img--inset img { width: 100%; height: 100%; object-fit: cover; }

.about__stamp {
	position: absolute;
	top: 1.25rem;
	left: -1.25rem;
	display: grid;
	place-items: center;
	gap: 0.1rem;
	width: 92px;
	height: 92px;
	border-radius: 50%;
	background: var(--gold);
	color: var(--on-gold);
	font-size: 0.66rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-align: center;
	box-shadow: 0 14px 30px rgba(193, 157, 86, 0.35);
}

.about__list {
	display: grid;
	gap: 1.75rem;
	margin: 0 0 2.25rem;
}

.about__item {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

.about__item-mark {
	display: grid;
	place-items: center;
	flex: none;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--white);
	color: var(--gold-deep);
	box-shadow: var(--shadow-sm);
}

.about__item-title {
	font-size: 1.15rem;
	margin-bottom: 0.35rem;
}

.about__item-text {
	margin: 0;
	color: var(--ink-mute);
	font-size: 0.9375rem;
}

@media (max-width: 900px) {
	.about__grid { grid-template-columns: 1fr; }
	.about__media { padding-right: 2rem; padding-bottom: 2rem; }
	.about__stamp { width: 74px; height: 74px; left: -0.5rem; }
}

/* ---------- 6. Story ---------- */

.section--story { overflow: hidden; }

.story__wheat {
	position: absolute;
	right: -60px;
	top: 50%;
	transform: translateY(-50%) rotate(16deg);
	color: var(--gold);
	opacity: 0.1;
	pointer-events: none;
}

.story__grid {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
	align-items: center;
	gap: clamp(2rem, 5vw, 4.5rem);
}

.story__text {
	font-size: var(--fs-lead);
	color: rgba(255, 255, 255, 0.72);
}

.story__text p + p { margin-top: 1rem; }

.story__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	margin-top: 2.25rem;
}

.story__media { position: relative; }

.story__media img {
	width: 100%;
	aspect-ratio: 4 / 3.6;
	object-fit: cover;
	border-radius: var(--radius-lg);
}

.story__quote {
	position: absolute;
	left: -22px;
	bottom: -22px;
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	max-width: 280px;
	padding: 1.15rem 1.35rem;
	background: var(--gold);
	color: var(--on-gold);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
}

.story__quote .icon { flex: none; opacity: 0.7; }

.story__quote p {
	margin: 0;
	font-family: var(--font-display);
	font-size: 1.05rem;
	line-height: 1.35;
}

@media (max-width: 900px) {
	.story__grid { grid-template-columns: 1fr; }
	.story__media { order: -1; }
	.story__quote { left: 0; bottom: -18px; max-width: 240px; }
}

/* ---------- 7. Logo marquee ---------- */

.section--logos {
	padding-block: clamp(3rem, 6vw, 4.5rem);
	background: var(--white);
	overflow: hidden;
}

.logo-marquee {
	position: relative;
	overflow: hidden;
	/* Soft white fade on both edges instead of a hard cut. */
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.logo-marquee__track {
	display: flex;
	width: max-content;
	animation: breadman-marquee 46s linear infinite;
}

.logo-marquee:hover .logo-marquee__track {
	animation-play-state: paused;
}

.logo-marquee__set {
	display: flex;
	align-items: center;
	gap: clamp(2.5rem, 6vw, 5rem);
	padding-inline: clamp(1.25rem, 3vw, 2.5rem);
}

.logo-marquee__item { flex: none; }

.logo-marquee__item img {
	height: 46px;
	width: auto;
	max-width: 160px;
	object-fit: contain;
	filter: grayscale(1);
	opacity: 0.5;
	transition: filter 0.3s var(--ease), opacity 0.3s var(--ease);
}

.logo-marquee__item img:hover {
	filter: grayscale(0);
	opacity: 1;
}

@keyframes breadman-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.logo-marquee__track { animation: none; }
	.logo-marquee {
		overflow-x: auto;
		-webkit-mask-image: none;
		mask-image: none;
	}
}

/* ---------- 8. Testimonials ---------- */

.section--testimonials {
	position: relative;
	overflow: hidden;
}

/* Full-bleed bakery banner sitting along the bottom of the band. */
.testimonials__backdrop {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	pointer-events: none;
	line-height: 0;
}

.testimonials__backdrop img {
	width: 100%;
	/* Natural ratio, never cropped — forcing a shorter box sliced the tops off
	   the baguettes and wheat and made the artwork read as a pasted-in strip. */
	height: auto;
	display: block;
}

/* The banner is taller than this padding on purpose: its transparent upper
   half rides up behind the testimonial card, so only the bread shows below. */
.section--testimonials.has-backdrop {
	padding-bottom: clamp(120px, 14vw, 260px);
}

.section--testimonials .container { position: relative; z-index: 2; }

@media (max-width: 900px) {
	.testimonials__backdrop { opacity: 0.75; }
}

.testimonials {
	position: relative;
	z-index: 2;
	max-width: 760px;
	margin-inline: auto;
}

.testimonials__viewport {
	display: grid;
}

.testimonial {
	grid-area: 1 / 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	margin: 0;
	padding: clamp(2rem, 4vw, 3rem);
	background: var(--white);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
	text-align: center;
	opacity: 0;
	visibility: hidden;
	transform: translateY(14px);
	transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}

/* Slides share one grid cell, so a true cross-fade leaves both quotes legible
   at once. Delay the incoming slide until the outgoing one has cleared. */
.testimonial.is-active {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition-delay: 0.26s;
}

.testimonial__mark {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin: -3.75rem auto 1.25rem;
	border-radius: 50%;
	background: var(--gold);
	color: var(--on-gold);
	box-shadow: 0 12px 28px rgba(193, 157, 86, 0.35);
}

.testimonial__stars {
	display: flex;
	justify-content: center;
	gap: 0.2rem;
	color: var(--gold);
	margin-bottom: 1.1rem;
}

.testimonial__stars .icon { fill: currentColor; }

.testimonial__quote {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(1.05rem, 1.8vw, 1.3rem);
	line-height: 1.6;
	color: var(--ink);
}

.testimonial__author {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 1.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
}

.testimonial__avatar {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--gold-wash);
	color: var(--gold-deep);
	font-family: var(--font-display);
	font-size: 1.15rem;
}

.testimonial__author span:last-child {
	display: grid;
	text-align: left;
	line-height: 1.35;
}

.testimonial__author strong { color: var(--ink); font-size: 0.95rem; }

.testimonial__author em {
	font-style: normal;
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-mute);
}

.testimonials__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.25rem;
	margin-top: 2rem;
}

/* The controls now overlap the bread banner, so give them their own ground —
   the small dots in particular vanish against the crust without it. */
.section--testimonials.has-backdrop .testimonials__nav {
	width: max-content;
	margin-inline: auto;
	padding: 0.4rem 0.9rem;
	border-radius: var(--radius-pill);
	background: rgba(252, 248, 244, 0.82);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.testimonials__dots {
	display: flex;
	align-items: center;
	gap: 0.15rem;
}

/* The visible dot is 8px, but the button itself is 24x24 so it satisfies
   WCAG 2.2 target size (2.5.8) without changing the design. */
.testimonials__dot {
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	cursor: pointer;
}

.testimonials__dot::before {
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--line-strong);
	transition: width 0.3s var(--ease), background 0.3s var(--ease);
}

.testimonials__dot.is-active::before {
	width: 20px;
	border-radius: var(--radius-pill);
	background: var(--gold);
}

/* ---------- 9. Blog ---------- */

.section--blog { background: var(--white); }

/* The category rail already opened the page's second act — the featured band
   reads better tucked up against it than floating a full section below. */
.section--featured { padding-top: clamp(2.5rem, 5vw, 4rem); }
