/**
 * Horta Purper - Home (M3).
 *
 * Hero, category strip, section headers, featured wrapper, story, testimonials
 * and deliveries. Ported faithfully from the prototype using the M1 tokens.
 * The products grid + product card come from woocommerce.css (M2).
 */

/* ==========================================================================
   Section header (shared)
   ========================================================================== */
.section {
	padding-top: 68px;
	padding-bottom: 72px;
}

.section-title {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 28px;
	margin-bottom: 30px;
}

.text-link {
	font-size: 14px;
	white-space: nowrap;
}

.text-link span {
	margin-left: 16px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
	background: var(--color-sage);
	overflow: hidden;
}

.hero-inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: 445px;
	align-items: center;
	position: relative;
	isolation: isolate;
}

.hero-copy {
	padding: 52px 0;
	position: relative;
	z-index: 3;
}

.hero-copy h1 {
	margin-right: -60px;
	color: var(--color-primary);
	position: relative;
}

.hero-copy p {
	font-size: 19px;
	max-width: 410px;
	margin: 24px 0 30px;
	line-height: 1.6;
}

.hero-picture {
	position: absolute;
	inset: 0 auto 0 50%;
	width: 100vw;
	margin: 0;
	transform: translateX(-50%);
	z-index: 0;
}

.hero-picture::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		var(--color-sage) 0%,
		rgba(234, 240, 229, 0.98) 30%,
		rgba(234, 240, 229, 0.76) 47%,
		rgba(234, 240, 229, 0.16) 67%,
		rgba(234, 240, 229, 0) 78%
	);
	pointer-events: none;
	z-index: 1;
}

.hero-picture img {
	width: 100%;
	height: 100%;
	position: absolute;
	inset: 0;
	object-fit: cover;
	object-position: 66% center;
	z-index: 0;
}

.hero-picture figcaption {
	position: absolute;
	right: 15px;
	bottom: 10px;
	font-size: 10px;
	background: rgba(255, 255, 255, 0.88);
	border-radius: 4px;
	padding: 3px 8px;
	color: var(--color-muted);
	z-index: 2;
}

/* ==========================================================================
   Category strip
   ========================================================================== */
.category-strip {
	border-bottom: 1px solid var(--color-border);
	background: var(--color-surface-soft);
}

.category-strip .wrap {
	display: flex;
	justify-content: space-around;
	padding-top: 23px;
	padding-bottom: 23px;
	gap: 15px;
}

.category-strip a {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
}

.category-strip a:hover {
	text-decoration: none;
	color: var(--color-primary);
}

.category-strip svg {
	width: 27px;
	height: 27px;
}

/* ==========================================================================
   Story (on green)
   ========================================================================== */
.story {
	background: var(--color-primary);
	color: #fff;
}

.story-inner {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	column-gap: 70px;
	row-gap: 48px;
	padding-top: 64px;
	padding-bottom: 70px;
}

.story .section-label {
	color: var(--color-on-green-soft);
}

.story h2 {
	font-size: 42px;
}

.story-copy p:not(.section-label) {
	margin: 23px 0;
	max-width: 485px;
}

.story-highlights {
	display: flex;
	flex-direction: column;
	gap: 20px;
	justify-content: center;
}

.story-highlights article {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 18px 20px;
	border: 1px solid var(--color-on-green-border);
	border-radius: 12px;
	background: var(--color-on-green-surface);
}

.story-highlights svg {
	width: 26px;
	height: 26px;
	color: var(--color-on-green-icon);
	flex-shrink: 0;
	margin-top: 2px;
}

.story-highlights h3 {
	font-size: 16px;
}

.story-highlights p {
	font-size: 13px;
	color: var(--color-on-green-muted);
	margin-top: 4px;
}

.story-gallery {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.story-photo {
	margin: 0;
	border: 1px dashed #9ab28d;
	background: var(--color-on-green-surface);
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 10px;
	padding: 16px;
	aspect-ratio: 3 / 4;
}

.story-photo--has-image {
	padding: 0;
	border-style: solid;
	border-color: var(--color-on-green-border);
}

.story-photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.story-photo:first-child img {
	object-position: center 62%;
}

.story-photo.main {
	grid-row: auto;
}

.story-photo span {
	font-size: 10px;
	letter-spacing: 1.4px;
	color: var(--color-on-green-muted);
}

.story-photo p {
	font-size: 13px;
	color: var(--color-on-green-muted);
	max-width: 220px;
}

.story-quote {
	grid-column: 1 / -1;
	border-top: 1px solid var(--color-on-green-border);
	padding-top: 32px;
	margin: 0;
}

.story-quote p {
	font: 500 22px/1.4 var(--font-display);
	max-width: 760px;
	margin: 0;
}

.story-quote cite {
	display: block;
	margin-top: 14px;
	font-style: normal;
	font-size: 13px;
	color: var(--color-on-green-muted);
}

.story-disclaimer {
	grid-column: 1 / -1;
	color: var(--color-on-green-muted);
	margin: 0;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonials {
	background: var(--color-surface-soft);
	padding-top: var(--testimonial-spacing-top, 68px);
	padding-bottom: var(--testimonial-spacing-bottom, 72px);
}

.testimonial-grid {
	display: grid;
	grid-template-columns: repeat(var(--testimonial-columns, 3), minmax(0, 1fr));
	gap: 24px;
	margin-top: 36px;
}

.testimonial {
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 26px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.testimonial-quote {
	font: 500 17px/1.45 var(--font-display);
	color: var(--color-text);
	margin: 0;
}

.testimonial-quote p {
	margin: 0;
}

.testimonial-person {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: auto;
}

.testimonial-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--color-sage);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 9px;
	color: var(--color-muted);
	text-align: center;
	flex-shrink: 0;
	line-height: 1.2;
	overflow: hidden;
}

.testimonial-avatar-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.testimonial-name {
	font-size: 14px;
	font-weight: 700;
}

.testimonial-role {
	font-size: 12px;
	color: var(--color-muted);
}

.testimonial-date {
	font-size: 12px;
	color: var(--color-muted);
}

.testimonial-note {
	font-size: 12px;
	color: var(--color-muted);
	margin: 0;
	max-width: 640px;
}

.testimonial-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-top: 24px;
}

.testimonial-source {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--color-primary);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}

.testimonial-source:hover {
	text-decoration: underline;
}

.testimonial-stars,
.testimonial-summary > span:first-child {
	color: #8a6b12;
	letter-spacing: 2px;
}

.testimonial-summary {
	display: flex;
	align-items: baseline;
	gap: 9px;
	margin: 0;
	color: var(--color-muted);
	font-size: 13px;
}

.testimonial-summary strong {
	color: var(--color-text);
	font-size: 20px;
}

.testimonial-verified {
	display: inline-flex;
	align-items: center;
	width: max-content;
	margin-top: 5px;
	padding: 3px 7px;
	border-radius: 999px;
	background: var(--color-sage);
	color: var(--color-primary);
	font-size: 10px;
	font-weight: 700;
}

.testimonials--align-center,
.testimonials--align-center .section-title {
	text-align: center;
}

.testimonials--align-center .section-title,
.testimonials--align-center .testimonial-summary {
	justify-content: center;
}

.testimonials--align-right,
.testimonials--align-right .section-title {
	text-align: right;
}

.testimonials--align-right .section-title,
.testimonials--align-right .testimonial-summary {
	justify-content: flex-end;
}

.testimonials--align-center .testimonial-person {
	justify-content: center;
}

.testimonials--align-right .testimonial-person {
	justify-content: flex-end;
}

.testimonials--align-center .testimonial-verified {
	margin-inline: auto;
}

.testimonials--align-center .testimonial-note {
	margin-inline: auto;
}

.testimonials--align-right .testimonial-verified {
	margin-left: auto;
}

.testimonials--align-right .testimonial-note {
	margin-left: auto;
}

.testimonials--list .testimonial-grid {
	grid-template-columns: minmax(0, 1fr);
}

.testimonial-carousel-controls {
	display: flex;
	gap: 8px;
}

.testimonial-carousel-controls button {
	width: 44px;
	height: 44px;
	border: 1px solid var(--color-border);
	border-radius: 50%;
	background: #fff;
	color: var(--color-primary);
	font-size: 20px;
	cursor: pointer;
}

.testimonial-carousel-controls button:hover {
	background: var(--color-sage);
}

.testimonial-carousel-controls button:focus-visible,
.testimonial-grid[tabindex]:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 3px;
}

.testimonial-carousel-controls button:disabled {
	cursor: default;
	opacity: 0.45;
}

.testimonials--carousel .testimonial-grid {
	grid-template-columns: none;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - var(--testimonial-gap-total, 48px)) / var(--testimonial-columns, 3));
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	scroll-snap-type: inline mandatory;
	scrollbar-color: var(--color-muted) var(--color-surface-soft);
	scrollbar-width: thin;
	padding-bottom: 12px;
}

.testimonials--carousel .testimonial {
	scroll-snap-align: start;
}

/* ==========================================================================
   Deliveries
   ========================================================================== */
.delivery-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
	margin-top: 36px;
}

.delivery-grid article {
	padding-right: 25px;
	border-right: 1px solid var(--color-border);
}

.delivery-grid article:last-child {
	border-right: 0;
}

.delivery-number {
	font: 500 28px var(--font-display);
	color: #718969;
	display: block;
	margin-bottom: 20px;
}

.delivery-grid h3 {
	font-size: 18px;
}

.delivery-grid p {
	font-size: 14px;
	margin-top: 15px;
}

.delivery-grid p.small {
	font-size: 12px;
}

.delivery-note {
	font-size: 12px;
	border-top: 1px solid var(--color-border);
	padding-top: 24px;
	margin-top: 32px;
	color: var(--color-muted);
}

.delivery-note a {
	text-decoration: underline;
	color: var(--color-primary);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1000px) {
	.hero-inner {
		grid-template-columns: 1.05fr 1fr;
	}

	.hero-copy h1 {
		margin-right: -20px;
	}

	.hero-copy p {
		max-width: 340px;
	}

	.story-inner {
		gap: 35px;
	}
}

@media (max-width: 650px) {
	.section {
		padding-top: 42px;
		padding-bottom: 42px;
	}

	.section-title {
		align-items: flex-start;
		flex-direction: column;
		gap: 16px;
		margin-bottom: 24px;
	}

	.hero-inner {
		display: flex;
		flex-direction: column;
		align-items: stretch;
	}

	.hero-copy {
		padding: 34px 0 30px;
	}

	.hero-copy h1 {
		font-size: 42px;
		letter-spacing: -1.7px;
		margin-right: 0;
	}

	.hero-copy p {
		font-size: 16px;
		line-height: 1.55;
		max-width: 325px;
		margin: 18px 0 23px;
	}

	.hero-picture {
		position: relative;
		inset: auto;
		width: auto;
		height: 245px;
		margin: 0 -18px;
		transform: none;
	}

	.hero-picture::after {
		display: none;
	}

	.hero-picture img {
		object-position: center 55%;
	}

	.hero-picture figcaption {
		font-size: 9px;
	}

	.category-strip .wrap {
		overflow-x: auto;
		justify-content: flex-start;
		gap: 28px;
		padding-top: 20px;
		padding-bottom: 20px;
	}

	.category-strip a {
		flex-direction: column;
		gap: 5px;
		min-width: 68px;
		font-size: 11px;
	}

	.category-strip svg {
		width: 24px;
		height: 24px;
	}

	.story-inner {
		grid-template-columns: 1fr;
		gap: 28px;
		padding-top: 42px;
		padding-bottom: 42px;
	}

	.story h2 {
		font-size: 34px;
	}

	.story-copy p:not(.section-label) {
		font-size: 15px;
	}

	.story-gallery {
		grid-template-columns: 1fr;
		grid-template-rows: none;
	}

	.story-photo.main {
		grid-row: auto;
	}

	.story-photo {
		aspect-ratio: 4 / 3;
	}

	.testimonial-footer {
		align-items: flex-start;
		flex-direction: column;
	}

	.story-quote p {
		font-size: 19px;
	}

	.testimonial-grid {
		grid-template-columns: 1fr;
	}

	.testimonials {
		padding-top: var(--testimonial-mobile-spacing-top, 42px);
		padding-bottom: var(--testimonial-mobile-spacing-bottom, 42px);
	}

	.testimonials--carousel .testimonial-grid {
		grid-auto-columns: min(88%, 340px);
	}

	.delivery-grid {
		grid-template-columns: 1fr;
		gap: 24px;
		margin-top: 25px;
	}

	.delivery-grid article {
		border-right: 0;
		border-bottom: 1px solid var(--color-border);
		padding: 0 0 24px;
	}

	.delivery-number {
		float: left;
		margin: 0 18px 45px 0;
		font-size: 22px;
	}

	.delivery-grid article:last-child {
		border: 0;
	}

	.delivery-grid h3 {
		font-size: 17px;
	}

	.delivery-grid p {
		font-size: 13px;
	}

	.delivery-note {
		margin-top: 10px;
	}
}
