/**
 * home.css — homepage-only styles. Enqueued only on is_front_page().
 */

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */

.hero {
	--hero-image-mobile: none;
	--hero-image-desktop: none;
	background-color: var(--color-cream);
	background-image: var(--hero-image-mobile);
	background-size: cover;
	background-position: center;
	padding-block: var(--space-6);
	text-align: center;
	position: relative;
}

/* Measured breakpoint (see template-parts/hero.php and the Homepage
   Hero Image Performance Audit), not a guess: tested the hero's own
   real rendered box size -- both width and height, since
   background-size: cover needs both -- at 390/768/1023/1024/1100/1280px
   viewports. Below 768px the smaller 'large' (1024x576) WordPress
   size stays sharp at every width/DPR combination tested; from
   768px up the box already needs more resolution than 'large' can
   give, so the original 'full' source (already used everywhere
   before this change) takes over from here. */
@media (min-width: 768px) {
	.hero {
		background-image: var(--hero-image-desktop);
	}
}

/* A text-readability scrim, only present once a hero image exists —
   a flat translucent black wash, not a "huge gradient". */
.hero--has-image::before {
	content: "";
	position: absolute;
	inset: 0;
	background-color: rgba(17, 17, 17, 0.45);
}

.hero--has-image .hero__inner {
	position: relative;
	z-index: 1;
}

.hero--has-image .hero__heading {
	color: var(--color-white);
}

.hero__heading {
	font-size: clamp(1.75rem, 4vw, 3rem);
	/* Wide enough that the headline's own explicit line break (see
	   clockshop_v2_get_hero_headline()) is what wraps it onto two
	   lines — not this max-width fighting it. Uppercase glyphs are
	   visually wider than mixed-case at the same ch count, so this
	   needs headroom beyond the raw character count. */
	max-width: 32ch;
	margin-inline: auto;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.hero__cta {
	margin-top: var(--space-4);
}

/* ---------------------------------------------------------------
   Shared homepage section chrome
   --------------------------------------------------------------- */

.home-section {
	padding-block: var(--space-6);
}

.home-section:nth-of-type(even) {
	background-color: var(--color-cream);
}

.home-section__heading {
	text-align: center;
	margin-bottom: var(--space-5);
}

.home-section__heading .home-section__eyebrow {
	display: block;
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--color-gold-text);
	margin-bottom: var(--space-2);
}

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

.home-section__empty-note {
	text-align: center;
	color: var(--color-text-muted);
	font-style: italic;
}

/* ---------------------------------------------------------------
   Shop by Category
   --------------------------------------------------------------- */

.category-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-4);
}

.category-card__link {
	display: block;
	text-align: center;
	color: var(--color-black);
}

.category-card__image {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background-color: var(--color-cream);
	border: 1px solid var(--color-border);
	margin-bottom: var(--space-2);
}

.category-card__image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.category-card__name {
	display: block;
	font-weight: 600;
	letter-spacing: 0.02em;
}

@media (min-width: 700px) {
	.category-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ---------------------------------------------------------------
   Featured / Recently Added product rows (reuse .products-grid,
   defined once in shop.css, and template-parts/product-card.php)
   --------------------------------------------------------------- */

/* (Grid rules live in shop.css so the shop archive and these two
   homepage rows render products identically — see that file.) */

/* ---------------------------------------------------------------
   Positioning / Trust sections
   --------------------------------------------------------------- */

.positioning__content {
	max-width: 65ch;
	margin-inline: auto;
	text-align: center;
}

.trust-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-4);
	max-width: 900px;
	margin-inline: auto;
}

.trust-list__item {
	text-align: center;
	padding: var(--space-4);
	border: 1px solid var(--color-border);
}

.trust-list__item h3 {
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

@media (min-width: 700px) {
	.trust-list {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ---------------------------------------------------------------
   Contact / Visit CTA
   --------------------------------------------------------------- */

.contact-cta {
	text-align: center;
}

.contact-cta__details {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-4);
	margin-top: var(--space-4);
}