/**
 * Experience archive — editorial stack header, grid
 *
 * @package HilaireExperiences
 */

.site-main--experience-archive {
	background: #ffffff;
	color: var(--hilaire-blue, #0a1b2a);
	padding-top: 0;
}

/* ─── Full-width hero banner (image only) ─────────────── */

.he-exp-archive-hero--banner {
	position: relative;
	width: 100%;
	min-height: 350px;
	height: 40vh;
	max-height: 40vh;
	overflow: hidden;
	background-color: var(--color-hilaire-navy-deep, #001524);
	background-image: var(--he-exp-hero-image);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	margin-bottom: 0;
}

/* Hero with title + excerpt overlay */
.he-exp-archive-hero--with-copy {
	position: relative;
	width: 100%;
	min-height: 350px;
	height: 40vh;
	max-height: 40vh;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	background-color: var(--color-hilaire-navy-deep, #001524);
	background-image: var(--he-exp-hero-image);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	margin-bottom: 0;
}

.he-exp-archive-hero--with-copy .he-exp-archive-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.35) 0%,
		rgba(0, 0, 0, 0.5) 45%,
		rgba(0, 0, 0, 0.72) 100%
	);
	pointer-events: none;
}

.he-exp-archive-hero--with-copy .he-exp-archive-hero__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	padding: clamp(2rem, 4vw, 2.75rem) 0;
	text-align: left;
}

.he-exp-archive-hero--with-copy .he-exp-archive-hero__title {
	margin: 0 0 0.65rem;
	font-family: var(--font-display);
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 500;
	line-height: 1.08;
	letter-spacing: 0.01em;
	color: #ffffff;
}

.he-exp-archive-hero--with-copy .he-exp-archive-hero__lead {
	margin: 0;
	max-width: 42rem;
	font-family: var(--font-body);
	font-size: clamp(0.875rem, 1.25vw, 1rem);
	font-weight: 400;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.9);
}

/* Legacy hero with overlay (archive fallback) */
.he-exp-archive-hero:not(.he-exp-archive-hero--banner):not(.he-exp-archive-hero--with-copy) {
	position: relative;
	width: 100%;
	min-height: 350px;
	height: 40vh;
	max-height: 40vh;
	display: flex;
	align-items: center;
	overflow: hidden;
	background-color: var(--color-hilaire-navy-deep, #001524);
	background-image: var(--he-exp-hero-image);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	margin-bottom: clamp(2rem, 3.5vw, 2.75rem);
}

.he-exp-archive-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.4) 0%,
		rgba(0, 0, 0, 0.55) 50%,
		rgba(0, 0, 0, 0.7) 100%
	);
	pointer-events: none;
}

.he-exp-archive-hero__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	padding: clamp(2rem, 4vw, 2.75rem) 0;
	text-align: left;
}

.he-exp-archive-hero__title {
	margin: 0 0 0.65rem;
	font-family: var(--font-display);
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 500;
	line-height: 1.08;
	letter-spacing: 0.01em;
	color: #ffffff;
}

.he-exp-archive-hero__lead {
	margin: 0;
	max-width: 42rem;
	font-family: var(--font-body);
	font-size: clamp(0.875rem, 1.25vw, 1rem);
	font-weight: 400;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.9);
}

/* ─── Navy filter bar (below hero) ────────────────────── */

.he-exp-archive-filters-bar {
	width: 100%;
	background: var(--hilaire-navy, #0a1b2a);
	padding: clamp(1.25rem, 2.5vw, 1.75rem) 0;
	margin-top: 0;
	margin-bottom: clamp(2rem, 3.5vw, 2.75rem);
}

.he-exp-archive-filters-bar__inner {
	width: 100%;
}

.he-exp-archive-filters-bar .he-exp-filters {
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
}

.he-exp-archive-filters-bar .he-exp-filters__label {
	font-family: var(--font-body);
	font-size: 0.625rem;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.65);
}

.he-exp-archive-filters-bar .he-exp-filters__select {
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	min-width: 0;
	padding: 0.5rem 2rem 0.5rem 0.75rem;
	border: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.38);
	border-radius: 0;
	background-color: transparent;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23FFFFFF' stroke-opacity='0.85' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	font-family: var(--font-body);
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.4;
	color: #ffffff;
	cursor: pointer;
	transition: border-color var(--transition-fast, 0.3s ease), background-color var(--transition-fast, 0.3s ease);
}

.he-exp-archive-filters-bar .he-exp-filters__select:hover,
.he-exp-archive-filters-bar .he-exp-filters__select:focus-visible {
	border-bottom-color: rgba(255, 255, 255, 0.65);
	background-color: rgba(255, 255, 255, 0.06);
	outline: none;
}

/* ─── Filters on dark hero (legacy) ───────────────────── */

.he-exp-archive-hero .he-exp-filters {
	margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
	margin-bottom: 0;
	padding: 0;
	background: transparent;
	border: 0;
}

.he-exp-filters__form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: flex-start;
	gap: clamp(1.25rem, 3vw, 2.5rem);
}

.he-exp-filters__field {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	min-width: min(100%, 220px);
	flex: 0 1 240px;
}

.he-exp-archive-hero .he-exp-filters__label {
	font-family: var(--font-body);
	font-size: 0.625rem;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.65);
}

.he-exp-archive-hero .he-exp-filters__select {
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	min-width: 0;
	padding: 0.5rem 2rem 0.5rem 0.75rem;
	border: 1px solid rgba(255, 255, 255, 0.38);
	border-radius: 0;
	background-color: transparent;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23FFFFFF' stroke-opacity='0.85' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	font-family: var(--font-body);
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.4;
	color: #ffffff;
	cursor: pointer;
	transition: border-color var(--transition-fast, 0.3s ease), background-color var(--transition-fast, 0.3s ease);
}

.he-exp-archive-hero .he-exp-filters__select:hover,
.he-exp-archive-hero .he-exp-filters__select:focus-visible {
	border-color: rgba(255, 255, 255, 0.65);
	background-color: rgba(255, 255, 255, 0.06);
	outline: none;
}

.he-exp-filters__select option {
	color: var(--hilaire-navy, #0a1b2a);
	background: #ffffff;
}

/* ─── Grid ─────────────────────────────────────────────── */

.experience-archive-grid {
	padding-top: 0;
	padding-bottom: clamp(3rem, 6vw, 5rem);
	background: #ffffff;
	margin-top: 0;
}

.he-exp-archive__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
}

.he-exp-archive__count {
	margin: 0;
	font-family: var(--font-body);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: lowercase;
	color: var(--color-text-soft, #3a3a3a);
}

.he-exp-archive__sort {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	margin-left: auto;
}

.he-exp-archive__sort-label {
	font-family: var(--font-body);
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(10, 27, 42, 0.52);
	white-space: nowrap;
}

.he-exp-archive__sort-select {
	appearance: menulist;
	-webkit-appearance: menulist;
	min-width: 12.5rem;
	padding: 0.4rem 0.25rem 0.45rem 0;
	border: 0;
	border-bottom: 1px solid rgba(10, 27, 42, 0.22);
	border-radius: 0;
	background: transparent;
	font-family: var(--font-body);
	font-size: 0.8125rem;
	font-weight: 400;
	line-height: 1.4;
	color: var(--hilaire-blue, #0a1b2a);
	cursor: pointer;
	transition: border-color var(--transition-fast, 0.3s ease);
}

.he-exp-archive__sort-select:hover,
.he-exp-archive__sort-select:focus-visible {
	border-bottom-color: rgba(10, 27, 42, 0.5);
	outline: none;
}

.he-exp-archive__sort-select option {
	color: var(--hilaire-navy, #0a1b2a);
	background: #ffffff;
}

.experience-archive-grid .journal-header {
	display: none;
}

#he-exp-archive-grid {
	transition: opacity var(--transition-fast, 0.3s ease);
}

#he-exp-archive-grid.is-loading {
	opacity: 0.45;
	pointer-events: none;
}

.he-exp-archive__empty-message {
	grid-column: 1 / -1;
	margin: 0;
	padding: 2rem 0;
	font-family: var(--font-body);
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--color-text-soft, #3a3a3a);
}

/* ─── Fully clickable cards ──────────────────────────── */

.journal-card--experience {
	height: 100%;
}

.journal-card--experience .journal-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

.journal-card--experience .journal-card__link:focus-visible {
	outline: 2px solid var(--hilaire-navy, #0a1b2a);
	outline-offset: 3px;
}

.journal-card--experience .journal-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 200px;
	padding: 0 0 20px;
	background: var(--hilaire-white, #ffffff);
}

.journal-card--experience .journal-card__title {
	margin: 16px 20px 12px;
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--hilaire-blue, #0a1b2a);
	transition: color var(--transition-fast, 0.3s ease);
}

.journal-card--experience .journal-card__facts {
	list-style: none;
	margin: 0 20px 14px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.journal-card--experience .journal-card__fact {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-family: var(--font-body);
	font-size: 0.8125rem;
	line-height: 1.45;
	color: rgba(10, 27, 42, 0.68);
}

.journal-card--experience .journal-card__fact-icon {
	display: inline-flex;
	flex-shrink: 0;
	margin-top: 0.1rem;
	color: rgba(10, 27, 42, 0.42);
}

.journal-card--experience .journal-card__price {
	margin: 0 20px 14px;
	padding-top: 2px;
	font-family: var(--font-body);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.4;
	text-align: right;
	color: var(--hilaire-blue, #0a1b2a);
}

.journal-card--experience:hover .journal-card__title,
.journal-card--experience:focus-within .journal-card__title {
	color: var(--hilaire-blue-mid, #132a3d);
}

.journal-card--experience .journal-card__action {
	display: block;
	width: calc(100% - 40px);
	margin: auto 20px 0;
	padding: 0.9rem 1.25rem;
	background: var(--hilaire-navy, #0a1b2a);
	font-family: var(--font-body);
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-align: center;
	text-transform: uppercase;
	color: #ffffff;
	transition: background-color var(--transition-fast, 0.3s ease);
}

.journal-card--experience:hover .journal-card__action,
.journal-card--experience:focus-within .journal-card__action {
	background: var(--hilaire-blue-mid, #132a3d);
}

.journal-card--experience .journal-card__media {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	aspect-ratio: 4 / 3;
}

.journal-card--experience .experience-ref-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 10;
	padding: 4px 8px;
	border-radius: 2px;
	font-family: var(--font-body);
	font-size: 10px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #ffffff;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	pointer-events: none;
}

.journal-card--experience .journal-card__img--hero {
	position: relative;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.journal-card--experience:hover {
	border-color: rgba(10, 30, 60, 0.15);
}

.journal-card--experience:hover .journal-card__img--hero {
	transform: scale(1.03);
}

.journal-card--experience .journal-card__img--hero {
	transition: transform var(--transition-hover, 0.8s cubic-bezier(0.25, 0.1, 0.25, 1));
}

@media (prefers-reduced-motion: reduce) {
	.journal-card--experience .journal-card__img--hero {
		transition: none;
	}

	.journal-card--experience:hover .journal-card__img--hero {
		transform: none;
	}
}

@media (max-width: 991px) {
	.experience-archive-grid .journal-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ─── Mobile compression (< 768px) ─────────────────────── */

@media (max-width: 767px) {
	.he-exp-archive-hero--banner,
	.he-exp-archive-hero--with-copy,
	.he-exp-archive-hero:not(.he-exp-archive-hero--banner):not(.he-exp-archive-hero--with-copy) {
		min-height: 0;
		height: auto;
		max-height: none;
		aspect-ratio: 16 / 9;
	}

	.he-exp-archive-filters-bar {
		padding: 0.85rem 0;
		margin-bottom: 0.75rem;
	}

	.he-exp-archive-filters-bar .he-exp-filters__form,
	.he-exp-filters__form {
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
	}

	.he-exp-archive-filters-bar .he-exp-filters__field,
	.he-exp-filters__field {
		flex: none;
		width: 100%;
		max-width: none;
		gap: 0.25rem;
	}

	.he-exp-archive-filters-bar .he-exp-filters__select,
	.he-exp-archive-hero .he-exp-filters__select {
		padding: 0.35rem 1.75rem 0.35rem 0.6rem;
		font-size: 0.8125rem;
		line-height: 1.3;
	}

	.he-exp-archive-hero:not(.he-exp-archive-hero--banner) {
		align-items: flex-end;
		margin-bottom: 0.75rem;
		aspect-ratio: auto;
	}

	.he-exp-archive-hero__inner {
		padding: 0.85rem 0 0.75rem;
	}

	.he-exp-archive-hero__title {
		margin-bottom: 0.35rem;
		font-size: 1.625rem;
		line-height: 1.1;
	}

	.he-exp-archive-hero__lead {
		font-size: 0.75rem;
		line-height: 1.4;
		max-width: 100%;
	}

	.he-exp-archive-hero .he-exp-filters {
		margin-top: 0.65rem;
	}

	.experience-archive-grid {
		padding-top: 0;
	}

	.he-exp-archive__toolbar {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.45rem;
		margin-bottom: 0.75rem;
	}

	.he-exp-archive__count {
		font-size: 0.75rem;
	}

	.he-exp-archive__sort {
		width: 100%;
		margin-left: 0;
		gap: 0.4rem;
	}

	.he-exp-archive__sort-select {
		flex: 1;
		width: 100%;
		min-width: 0;
		padding: 0.3rem 0.25rem 0.35rem 0;
		font-size: 0.75rem;
	}

	.experience-archive-grid .journal-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.he-exp-archive-hero__title {
		font-size: 1.5rem;
	}

	.he-exp-archive-hero__inner {
		padding: 0.75rem 0 0.65rem;
	}
}
