/* ==========================================================================
   SHOES HUB — HOMEPAGE
   --------------------------------------------------------------------------
   Loaded only on the front page. Sections: hero, new arrivals, restocked, category tiles, reviews, FAQ.
   Tokens only; no hex colours, no font names, no fixed widths outside tokens.

   The hero is a grid stack: every slide sits in the same cell, so the tallest
   slide decides the height and switching slides never shifts the page.
   ========================================================================== */

/* ==========================================================================
   01 HERO
   ========================================================================== */

.hero {
	position: relative;
	background: var(--color-bg);
}

.hero__track {
	display: grid;
}

.hero__slide {
	grid-area: 1 / 1;
	position: relative;
	min-width: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--dur-slow) var(--ease),
		visibility 0s linear var(--dur-slow);
}

.hero__slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity var(--dur-slow) var(--ease);
}

/* ------ Default slide: full-bleed art behind centred copy ---------------- */

.hero__slide--default {
	position: relative;
	display: flex;
	align-items: center;
	overflow: hidden;
	min-height: clamp(400px, 50vw, 540px);
	padding-block: var(--space-7);
}

/* The art is 2.44:1, so a 41vw hero keeps it nearly uncropped on desktop.
   :has() means deleting the <img> also reverts the height automatically. */
.hero__slide--default:has(.hero__art) {
	min-height: clamp(380px, 36.5vw, 700px);
}

/* Art layer. An <img> rather than a CSS background so it is found by the
   preload scanner and can carry fetchpriority. */
.hero__art {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 66% top;
}

/* Soften the bottom edge into the white section below. */
.hero__slide--default::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	z-index: 1;
	height: 80px;
	background: linear-gradient(to bottom, rgb(255 255 255 / 0%), var(--color-bg));
	pointer-events: none;
}

.hero__inner {
	position: relative;
	z-index: 2;
	/* Left-aligned in the empty left half; wide enough for "SOMETHING" to
	   stay on one line, narrow enough to stop before the shoe. */
	max-width: 38rem;
	margin-inline: 0;
}

/* Keep the eyebrow and the copy below it on one optical left edge. */
.hero .eyebrow {
	margin-left: 4px;
}

.hero__lead h1,
.hero__lead p,
.hero__actions {
	margin-left: 2px;
}

.hero h1 {
	margin: 0 0 var(--space-4);
	color: var(--color-heading);
	font-family: var(--font-heading);
	font-size: clamp(2.5rem, 6.5vw, 4.875rem);
	font-weight: var(--font-weight-extrabold);
	line-height: 0.95;
	letter-spacing: -0.035em;
	text-transform: uppercase;
	text-wrap: balance;
}

.hero p {
	max-width: 44ch;
	margin: 0 0 var(--space-5);
	color: var(--color-text-muted);
	font-size: var(--text-md);
	text-wrap: pretty;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
}

/* Shorter label + slightly larger type, same footprint as before. */
.hero .btn--primary {
	min-width: 11rem;
	font-size: var(--text-base);
}

@media (max-width: 767px) {
	/* Start the copy near the top of the band, with the CTA a fixed 48px
	   below the paragraph. The next section gets a clear peek. */
	.hero__slide--default {
		align-items: stretch;
		padding-block: 0;
	}

	.hero__slide--default:has(.hero__art) {
		/* A definite height lets the inner column fill the band. */
		height: clamp(540px, 66dvh, 600px);
	}

	.hero__slide--default > .container {
		display: flex;
		height: 100%;
	}

	.hero__inner {
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		gap: var(--space-7);
		width: 100%;
		height: 100%;
		padding-top: 52px;
	}

	.hero h1 {
		font-size: clamp(3rem, 11.5vw, 3.125rem);
	}

	/* The flex gap owns the spacing now; drop the paragraph margin. */
	.hero p {
		margin-bottom: 0;
	}

	.hero__actions {
		justify-content: flex-start;
	}

	.hero__slide--default::before {
		content: "";
		position: absolute;
		inset: 0;
		z-index: 1;
		background: linear-gradient(
			to bottom,
			rgb(var(--color-bg-soft-rgb) / 84%) 0%,
			rgb(var(--color-bg-soft-rgb) / 74%) 40%,
			rgb(var(--color-bg-soft-rgb) / 42%) 62%,
			rgb(var(--color-bg-soft-rgb) / 10%) 80%,
			rgb(var(--color-bg-soft-rgb) / 0%) 94%
		);
		pointer-events: none;
	}

	/* Only soften the very bottom edge; the sole should stay visible. */
	.hero__slide--default::after {
		height: 24px;
	}
}

@media (min-width: 768px) {
	.hero__slide--default {
		padding-block: var(--space-9);
	}

	/* Small optical lift so the copy sits a touch above dead centre. */
	.hero__inner {
		transform: translateY(-16px);
	}

	.hero .eyebrow {
		margin-left: 6px;
	}

	.hero__lead h1,
	.hero__lead p,
	.hero__actions {
		margin-left: 3px;
	}

	.hero h1 {
		margin-bottom: var(--space-5);
	}
}

/* ------ Offer banner slides --------------------------------------------- */

.hero__slide--banner {
	min-height: clamp(400px, 48vw, 580px);
	background: var(--color-bg-soft);
}

.hero-banner {
	position: absolute;
	inset: 0;
	display: block;
}

.hero-banner__media {
	display: block;
	width: 100%;
	height: 100%;
}

.hero-banner__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ------ Slider controls -------------------------------------------------- */

/* Shown only after the script adds .hero--ready: without JavaScript there is
   nothing to control. Space is reserved up front so revealing the controls
   cannot shift the page below. */
.hero__controls {
	display: block;
	visibility: hidden;
	border-top: 1px solid var(--color-border);
}

.hero--ready .hero__controls {
	visibility: visible;
}

.hero__controls-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	min-height: var(--tap);
	padding-block: var(--space-2);
}

.hero__dots {
	display: flex;
	align-items: center;
}

.hero__dot {
	display: grid;
	place-items: center;
	width: var(--tap);
	height: var(--tap);
	padding: 0;
	border: 0;
	border-radius: var(--radius-pill);
	background: transparent;
	cursor: pointer;
}

.hero__dot span {
	width: 10px;
	height: 10px;
	border-radius: var(--radius-pill);
	background: var(--color-border-strong);
	transition: transform var(--dur) var(--ease),
		background-color var(--dur) var(--ease);
}

.hero__dot:hover span {
	background: var(--color-text-muted);
}

.hero__dot.is-active span {
	transform: scale(1.45);
	background: var(--color-secondary);
}

.hero__toggle {
	display: inline-grid;
	place-items: center;
	width: var(--tap);
	height: var(--tap);
	padding: 0;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-pill);
	background: var(--color-surface);
	color: var(--color-text-muted);
	font-size: 18px;
	cursor: pointer;
	transition: border-color var(--dur) var(--ease),
		color var(--dur) var(--ease);
}

.hero__toggle:hover {
	border-color: var(--color-text-muted);
	color: var(--color-text);
}

.hero__toggle[hidden] {
	display: none;
}

/* ==========================================================================
   02 PRODUCT SHOWCASE
   ========================================================================== */

/* Near-full-bleed like the reference, but slightly inset: the band spans the
   viewport and the content keeps a little more breathing room at the edges. */
/* Every homepage band below the hero uses the header's own gutters, so the
   left and right edges line up exactly with the logo and the header actions.
   The header itself is untouched. */
.site-main--home > .section .container {
	max-width: none;
	padding-inline: var(--gutter);
}

/* FAQ keeps its narrower centred column: stacking it full width made the
   heading and the questions drift too far apart. */
.site-main--home > .faq-section .container {
	max-width: var(--container);
}

/* Barely-off-white wash: separates Restocked from the white New Arrivals
   without the hard grey band the owner rejected. */
.showcase--tinted {
	background: var(--color-bg-mist);
}

.showcase__inner {
	display: grid;
	grid-template-areas:
		"head"
		"row"
		"controls";
	gap: var(--space-5);
}

.showcase__head {
	grid-area: head;
}

/* Homepage section titles: first, larger and all caps. The kicker sits
   underneath as a quiet sub-line. */
.site-main--home .showcase__head h2,
.site-main--home .section__head h2 {
	font-size: clamp(1.75rem, 5vw, 3rem);
	letter-spacing: -0.01em;
	text-transform: uppercase;
}

.site-main--home .section__kicker {
	margin: var(--space-1) 0 0;
	font-size: var(--text-sm);
}

.showcase__head h2 {
	margin: 0;
}

/* The Woo wrapper is the grid item; the scroller lives inside it. */
.showcase__inner > .woocommerce {
	grid-area: row;
	min-width: 0;
}

/* Horizontal row: cards sit on one line and the row scrolls. Touch devices
   swipe it; desktop uses the arrow buttons. Snap keeps cards aligned. The
   .woocommerce wrapper means the shop card styles apply unchanged. */
.showcase .woocommerce ul.product-row {
	display: grid;
	grid-template-columns: none;
	grid-auto-flow: column;
	grid-auto-columns: 74%;
	gap: var(--space-3);
	margin: 0;
	padding-block: 4px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.showcase .woocommerce ul.product-row::-webkit-scrollbar {
	display: none;
}

.showcase .woocommerce ul.product-row > li {
	scroll-snap-align: start;
}

/* Button and arrows share one control area: below the row on phones, to the
   right of the heading from 768px. */
.showcase__controls {
	grid-area: controls;
}

.showcase__cta {
	width: 100%;
	/* Matches the hero button, which reads at 16px. */
	font-size: var(--text-base);
}

.showcase__arrows {
	display: none;
}

.showcase__arrow {
	display: inline-grid;
	place-items: center;
	width: var(--tap);
	height: var(--tap);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-pill);
	background: var(--color-surface);
	color: var(--color-text);
	transition: border-color var(--dur) var(--ease),
		opacity var(--dur) var(--ease);
}

.showcase__arrow:hover:not(:disabled) {
	border-color: var(--color-text);
}

.showcase__arrow:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.showcase__arrow[hidden] {
	display: none;
}

.showcase__arrow .icon {
	width: 20px;
	height: 20px;
}

@media (min-width: 480px) {
	.showcase .woocommerce ul.product-row {
		grid-auto-columns: 46%;
	}
}

/* ------ Product card ----------------------------------------------------- */

/* Cards use WooCommerce's content-product.php and the shop card styles from
   product-loop.css. Do not restyle them here, or the two views drift apart. */

@media (min-width: 768px) {
	.showcase__inner {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas:
			"head controls"
			"row row";
		align-items: start;
		gap: var(--space-5) var(--space-3);
	}

	.showcase__controls {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		gap: var(--space-2);
	}

	.showcase__cta {
		width: auto;
		/* Holds the old "View all new in" width now that the label is shorter. */
		min-width: 220px;
	}

	.showcase__arrows {
		display: flex;
		gap: var(--space-2);
	}

	.showcase .woocommerce ul.product-row {
		grid-auto-columns: calc((100% - (var(--space-5) * 2)) / 3);
		gap: var(--space-5);
	}
}

/* ==========================================================================
   03 SHOP BY CATEGORY
   ========================================================================== */

/* Keep the sticky header from covering the category heading when linked to. */
#shop-by-category {
	scroll-margin-top: calc(var(--header-h) + var(--space-4));
}

@media (min-width: 768px) {
	#shop-by-category {
		scroll-margin-top: calc(var(--header-h-desktop) + var(--space-4));
	}
}

/* White like the header; centred like the owner's reference. */
.category-section {
	background: var(--color-bg);
	color: var(--color-text);
	text-align: center;
}

.category-section .section__head {
	display: block;
	margin-bottom: 0;
	text-align: center;
}

.category-section .section__head h2 {
	color: var(--color-heading);
	font-size: clamp(1.75rem, 5vw, 3rem);
	font-weight: var(--font-weight-extrabold);
	letter-spacing: -0.01em;
}

.category-section .section__kicker {
	color: var(--color-accent-text);
}

.category-links {
	counter-reset: category;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-5) var(--space-3);
	max-width: 1000px;
	margin: var(--space-6) auto 0;
}

.category-links > li {
	counter-increment: category;
	flex: 0 0 calc(50% - (var(--space-3) / 2));
	min-width: 0;
}

/* Numbering comes from CSS counters, so hiding an item on small screens
   keeps the sequence unbroken (01–06 instead of 01–05, 07). */
.category-link__number::before {
	content: counter(category, decimal-leading-zero);
}

/* Seven items leave an orphan on phones; Chunky Sneakers returns at 768px. */
@media (max-width: 767px) {
	.category-link__item--chunky-sneakers {
		display: none;
	}
}

@media (min-width: 768px) {
	.category-links {
		gap: var(--space-6) var(--space-4);
	}

	.category-links > li {
		flex-basis: calc(25% - var(--space-3));
	}
}

.category-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-2);
	color: var(--color-text);
	text-align: center;
}

.category-link__media {
	display: grid;
	place-items: center;
	width: 88px;
	height: 88px;
	overflow: hidden;
	border-radius: var(--radius-pill);
	background: var(--color-text);
	color: var(--color-bg);
	transition: transform var(--dur) var(--ease),
		box-shadow var(--dur) var(--ease);
}

.category-link__number {
	color: color-mix(in srgb, var(--color-bg) 80%, transparent);
	font-family: var(--font-heading);
	font-size: 2rem;
	font-weight: var(--font-weight-extrabold);
	line-height: 1;
	letter-spacing: -0.02em;
}

.category-link__name {
	max-width: 18ch;
	color: var(--color-text);
	font-family: var(--font-heading);
	font-size: var(--text-base);
	font-weight: var(--font-weight-semibold);
	line-height: var(--leading-snug);
	letter-spacing: 0.02em;
	text-transform: uppercase;
	text-wrap: balance;
	transition: color var(--dur) var(--ease);
}

.category-link:hover .category-link__media,
.category-link:focus-visible .category-link__media {
	transform: scale(1.04);
	box-shadow: 0 0 0 3px var(--color-accent-text);
}

.category-link:hover .category-link__name,
.category-link:focus-visible .category-link__name {
	color: var(--color-accent-text);
}

.category-link:focus-visible {
	outline: 2px solid var(--color-focus);
	outline-offset: 4px;
	border-radius: var(--radius-sm);
}

.category-section__footer {
	margin-top: var(--space-8);
	text-align: center;
}

.category-section__all {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	color: var(--color-accent-text);
	font-size: var(--text-sm);
	font-weight: var(--font-weight-semibold);
}

.category-section__all:hover {
	color: var(--color-accent-text-hover);
}

.category-section__all .icon {
	width: 1.1em;
	height: 1.1em;
}

@media (min-width: 768px) {
	.category-link__media {
		width: 100px;
		height: 100px;
	}

	.category-link__number {
		font-size: 2.5rem;
	}

	.category-link__name {
		font-size: var(--text-md);
	}
}

@media (min-width: 1024px) {
	.category-link__media {
		width: 112px;
		height: 112px;
	}

	.category-link__number {
		font-size: 2.75rem;
	}
}

/* ==========================================================================
   04 REVIEWS
   ========================================================================== */

/* Flat footer blue, full bleed; centred quote like the reference. */
.reviews {
	position: relative;
	overflow: hidden;
	padding-block: var(--space-8);
	background: var(--color-secondary);
	color: var(--color-on-secondary);
	text-align: center;
}

/* Every slide shares one grid cell so the tallest decides the height.
   The track fills the container (same width as the header/footer content)
   so the quote wraps into fewer, longer lines. */
.reviews__track {
	position: relative;
	display: grid;
	margin-inline: auto;
}

.reviews__slide {
	grid-area: 1 / 1;
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: var(--space-5);
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--dur-slow) var(--ease),
		visibility 0s linear var(--dur-slow);
}

.reviews__slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity var(--dur-slow) var(--ease);
}

.reviews__quote {
	margin: 0;
	padding: 0;
	border: 0;
}

.reviews__quote p {
	margin: 0;
	color: var(--color-on-secondary);
	font-family: var(--font-heading);
	font-size: clamp(1.125rem, 2.4vw, 1.75rem);
	font-weight: var(--font-weight-semibold);
	line-height: var(--leading-tight);
	letter-spacing: var(--tracking-tight);
	text-wrap: balance;
}

.reviews__author {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
	font-size: var(--text-sm);
}

.reviews__name {
	font-weight: var(--font-weight-bold);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.reviews__meta {
	color: color-mix(in srgb, var(--color-on-secondary) 65%, transparent);
}

.reviews__controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-4);
	margin-top: var(--space-7);
}

.reviews__controls[hidden] {
	display: none;
}

.reviews__arrow {
	display: inline-grid;
	place-items: center;
	width: var(--tap);
	height: var(--tap);
	border: 1px solid color-mix(in srgb, var(--color-on-secondary) 35%, transparent);
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--color-on-secondary);
	transition: border-color var(--dur) var(--ease),
		background-color var(--dur) var(--ease);
}

.reviews__arrow:hover,
.reviews__arrow:focus-visible {
	border-color: var(--color-on-secondary);
	background: color-mix(in srgb, var(--color-on-secondary) 10%, transparent);
}

.reviews__arrow .icon {
	width: 20px;
	height: 20px;
}

.reviews__dots {
	display: flex;
}

/* 24px hit area around a 6px dot. */
.reviews__dot {
	display: inline-grid;
	place-items: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	background: transparent;
}

.reviews__dot span {
	width: 6px;
	height: 6px;
	border-radius: var(--radius-pill);
	background: color-mix(in srgb, var(--color-on-secondary) 40%, transparent);
	transition: background-color var(--dur) var(--ease),
		transform var(--dur) var(--ease);
}

.reviews__dot.is-active span {
	background: var(--color-on-secondary);
	transform: scale(1.35);
}

.reviews :focus-visible {
	outline-color: var(--color-on-secondary);
}

@media (min-width: 768px) {
	.reviews {
		padding-block: var(--space-10);
	}

}

/* ==========================================================================
   05 FAQ
   ========================================================================== */

/* White, matching Shop by Category; two columns from 1024px. */
.faq-section {
	background: var(--color-bg);
	color: var(--color-text);
}

.faq-section__inner {
	display: grid;
	gap: var(--space-6);
}

.faq-section__intro h2 {
	margin: 0;
	color: var(--color-heading);
	font-size: clamp(1.75rem, 5vw, 3rem);
	font-weight: var(--font-weight-extrabold);
	line-height: var(--leading-tight);
	letter-spacing: -0.01em;
	text-transform: uppercase;
}

.faq-section__lead {
	max-width: 34ch;
	margin: var(--space-3) 0 0;
	color: var(--color-text-muted);
	font-size: var(--text-base);
	line-height: var(--leading-normal);
}

.faq-section__all {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	margin-top: var(--space-4);
	color: var(--color-accent-text);
	font-size: var(--text-sm);
	font-weight: var(--font-weight-semibold);
}

.faq-section__all:hover {
	color: var(--color-accent-text-hover);
}

.faq-section__all .icon {
	width: 1.1em;
	height: 1.1em;
}

/* ------ Accordion -------------------------------------------------------- */

.faq-list {
	border-top: 1px solid var(--color-border);
}

.faq-item {
	border-bottom: 1px solid var(--color-border);
}

.faq-item__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	padding-block: var(--space-4);
	color: var(--color-text);
	font-family: var(--font-heading);
	font-size: var(--text-base);
	font-weight: var(--font-weight-semibold);
	line-height: var(--leading-snug);
	letter-spacing: 0.02em;
	text-transform: uppercase;
	cursor: pointer;
	list-style: none;
	transition: color var(--dur) var(--ease);
}

.faq-item__question::-webkit-details-marker {
	display: none;
}

.faq-item__question:hover {
	color: var(--color-accent-text);
}

.faq-item__question:focus-visible {
	outline: 2px solid var(--color-focus);
	outline-offset: 2px;
	border-radius: var(--radius-xs);
}

/* Plus sign drawn from two bars; the upright bar folds away when open. */
.faq-item__icon {
	position: relative;
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	color: var(--color-text);
}

.faq-item__icon::before,
.faq-item__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 2px;
	margin: -1px 0 0 -7px;
	background: currentColor;
	border-radius: var(--radius-pill);
	transition: transform var(--dur) var(--ease),
		opacity var(--dur) var(--ease);
}

.faq-item__icon::after {
	transform: rotate(90deg);
}

.faq-item[open] .faq-item__icon::after {
	transform: rotate(90deg) scaleX(0);
	opacity: 0;
}

.faq-item[open] .faq-item__question {
	color: var(--color-accent-text);
}

.faq-item__answer {
	padding-bottom: var(--space-4);
	color: var(--color-text-muted);
	font-size: var(--text-base);
	line-height: var(--leading-normal);
}

.faq-item__answer > :first-child {
	margin-top: 0;
}

.faq-item__answer > :last-child {
	margin-bottom: 0;
}

.faq-item__answer p {
	max-width: 70ch;
}

.faq-item__answer a {
	color: var(--color-accent-text);
	text-decoration: underline;
	text-underline-offset: 2px;
}

@media (min-width: 768px) {
	.faq-item__question {
		font-size: var(--text-md);
		padding-block: var(--space-5);
	}
}

@media (min-width: 1024px) {
	.faq-section__inner {
		grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
		gap: var(--space-8);
		align-items: start;
	}

	.faq-section__intro {
		position: sticky;
		top: calc(var(--header-h-desktop) + var(--space-6));
	}
}

/* Respect reduced motion: no cross-fade, no dot scale. */
@media (prefers-reduced-motion: reduce) {
	.hero__slide,
	.hero__slide.is-active,
	.hero__dot span,
	.category-link__media,
	.category-link__name,
	.reviews__slide,
	.reviews__slide.is-active,
	.reviews__dot span,
	.faq-item__icon::before,
	.faq-item__icon::after {
		transition: none;
	}

	.showcase .woocommerce ul.product-row {
		scroll-behavior: auto;
	}
}
