/**
 * The Collection — shop gateway panels (BugHerd task 6).
 *
 * Three equal-width editorial image panels replacing the product grid on
 * the main shop page only (enqueued from inc/collection-gateway.php when
 * is_shop()). Category titles are always visible; on hover-capable
 * devices the supporting text + CTA reveal on hover/keyboard focus with a
 * slight darken/zoom. On touch/stacked layouts everything is always
 * visible. Respects prefers-reduced-motion.
 *
 * Palette (GeneratePress global colors):
 *   --accent     #5c2030 oxblood
 *   --contrast-2 #b89968 gold
 *   --base-2     #f4ecdf cream
 *   --contrast   #1b1b1b near-black
 *
 * No element here carries the Woo `.button` class on purpose — the legacy
 * ghost-pill rule in style.css repaints `.button` with !important.
 */

.lc-gateway-lede {
	font-family: "Cormorant Garamond", "EB Garamond", Georgia, serif;
	font-size: 1.35em;
	font-style: italic;
	color: var(--contrast, #1b1b1b);
	text-align: center;
	max-width: 34em;
	margin: 0.25em auto 1.75em;
}

.lc-gateway {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
	margin: 0 0 60px;
}

@media (min-width: 768px) {
	.lc-gateway {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ---- Panel shell ------------------------------------------------------ */

.lc-panel {
	position: relative;
	display: block;
	overflow: hidden;
	background-color: var(--contrast, #1b1b1b);
	min-height: 420px;
	text-decoration: none;
}

@media (min-width: 768px) {
	.lc-panel {
		min-height: clamp(480px, 62vh, 640px);
	}
}

a.lc-panel,
a.lc-panel:hover,
a.lc-panel:focus {
	text-decoration: none;
}

.lc-panel__media {
	position: absolute;
	inset: 0;
	display: block;
}

.lc-panel__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s ease;
}

/* Portrait art crops: keep the interesting half in frame. */
.lc-panel--clip-ins .lc-panel__media img {
	object-position: 40% 50%;
}

.lc-panel--stylist .lc-panel__media img {
	object-position: 50% 35%;
}

.lc-panel--tools .lc-panel__media img {
	object-position: 50% 60%;
}

/* Legibility scrim — darkens further on hover/focus. Content sits at the
   top of the panel, so the gradient is darkest there. */
.lc-panel__scrim {
	position: absolute;
	inset: 0;
	display: block;
	background: linear-gradient(
		to bottom,
		rgba(20, 12, 10, 0.82) 0%,
		rgba(20, 12, 10, 0.45) 38%,
		rgba(20, 12, 10, 0.08) 70%,
		rgba(20, 12, 10, 0.18) 100%
	);
	transition: background-color 0.45s ease;
	background-color: rgba(20, 12, 10, 0);
}

/* ---- Panel content ---------------------------------------------------- */

/* Top-anchored so every panel's title rests at the same height whatever
   the length of the (hover-hidden) copy below it. */
.lc-panel__content {
	position: absolute;
	inset: 0 0 auto 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 30px 26px 28px;
}

.lc-panel__eyebrow {
	font-family: "Montserrat", sans-serif;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--contrast-2, #b89968);
}

.lc-panel__eyebrow--lock::before {
	content: "\1F512\FE0E"; /* lock glyph, text presentation */
	margin-right: 7px;
	font-size: 12px;
}

.lc-panel__title {
	font-family: "Cormorant Garamond", "EB Garamond", Georgia, serif;
	font-size: clamp(28px, 2.4vw, 36px);
	font-weight: 500;
	line-height: 1.15;
	color: #fdfaf4;
}

.lc-panel__reveal {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
}

.lc-panel__text {
	font-family: "Montserrat", sans-serif;
	font-size: 14px;
	line-height: 1.6;
	color: rgba(253, 250, 244, 0.92);
	max-width: 34em;
}

.lc-panel__text--methods {
	font-family: "Cormorant Garamond", "EB Garamond", Georgia, serif;
	font-size: 17px;
	font-style: italic;
	color: var(--contrast-2, #b89968);
}

.lc-panel__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* ---- CTAs (gold pill treatment, item 4's accessible pairing) ---------- */

.lc-panel__cta {
	display: inline-block;
	font-family: "Montserrat", sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 50px;
	padding: 11px 26px;
	border: 2px solid var(--contrast-2, #b89968);
	transition: background-color 0.25s ease, color 0.25s ease;
}

.lc-panel__cta--gold {
	background-color: var(--contrast-2, #b89968);
	color: var(--contrast, #1b1b1b);
}

.lc-panel__cta--ghost {
	background-color: transparent;
	color: #fdfaf4;
}

.lc-panel--link:hover .lc-panel__cta--gold,
.lc-panel--link:focus-visible .lc-panel__cta--gold,
a.lc-panel__cta--gold:hover,
a.lc-panel__cta--gold:focus-visible {
	background-color: var(--accent, #5c2030);
	color: var(--base-2, #f4ecdf);
}

a.lc-panel__cta--ghost:hover,
a.lc-panel__cta--ghost:focus-visible {
	background-color: rgba(253, 250, 244, 0.16);
}

.lc-panel--link:focus-visible,
.lc-panel__cta:focus-visible {
	outline: 3px solid var(--contrast-2, #b89968);
	outline-offset: 2px;
}

/* ---- Hover / focus behaviour (hover-capable devices only) ------------- */

@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
	.lc-panel__reveal {
		opacity: 0;
		transform: translateY(10px);
		transition: opacity 0.4s ease, transform 0.4s ease;
	}

	.lc-panel:hover .lc-panel__reveal,
	.lc-panel:focus-within .lc-panel__reveal {
		opacity: 1;
		transform: translateY(0);
	}

	.lc-panel:hover .lc-panel__media img,
	.lc-panel:focus-within .lc-panel__media img {
		transform: scale(1.05);
	}

	.lc-panel:hover .lc-panel__scrim,
	.lc-panel:focus-within .lc-panel__scrim {
		background-color: rgba(20, 12, 10, 0.28);
	}
}

/* ---- Reduced motion --------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.lc-panel__media img,
	.lc-panel__scrim,
	.lc-panel__reveal,
	.lc-panel__cta {
		transition: none;
	}

	.lc-panel:hover .lc-panel__media img,
	.lc-panel:focus-within .lc-panel__media img {
		transform: none;
	}

	.lc-panel__reveal {
		transform: none;
	}
}
