/* HOSJJ theme — supplemental styles beyond theme.json */

/* Header navigation: understated links on crimson */
.hosjj-header .wp-block-navigation a {
	color: #f5e9e0;
	text-decoration: none;
	padding-bottom: 2px;
	border-bottom: 2px solid transparent;
	transition: color 120ms ease, border-color 120ms ease;
}
.hosjj-header .wp-block-navigation a:hover,
.hosjj-header .wp-block-navigation .current-menu-item > a {
	color: #ffffff;
	border-bottom-color: var(--wp--preset--color--accent);
}

/* Section cards on the homepage and events index */
.hosjj-card {
	background: var(--wp--preset--color--base-pure);
	border: 1px solid #e5ddd0;
	border-top: 3px solid var(--wp--preset--color--primary);
	border-radius: 4px;
	box-shadow: 0 1px 2px rgba(35, 33, 32, 0.06);
	transition: box-shadow 150ms ease, transform 150ms ease;
	height: 100%;
}
.hosjj-card:hover {
	box-shadow: 0 6px 18px rgba(35, 33, 32, 0.12);
	transform: translateY(-2px);
}
.hosjj-card a {
	text-decoration: none;
}
.hosjj-card h3 a:hover {
	color: var(--wp--preset--color--primary);
}

/* Document download rows on the Library page */
.hosjj-doc {
	background: var(--wp--preset--color--base-pure);
	border: 1px solid #e5ddd0;
	border-left: 3px solid var(--wp--preset--color--accent);
	border-radius: 4px;
	padding: 1.25rem 1.5rem;
}
.hosjj-doc h3 {
	margin-top: 0;
}

/* Gallery images: subtle frame */
.wp-block-gallery .wp-block-image img {
	border-radius: 3px;
}

/* Gallery images open in the native WordPress lightbox (enabled in theme.json).

   WordPress ships the lightbox trigger as a 20x20 button tucked into the image
   corner at opacity 0. In a photo archive people expect to click the photograph
   itself, so stretch the trigger across the whole image and leave it invisible —
   the cursor and the hover lift are the affordance. */
.wp-block-gallery .wp-block-image {
	position: relative;
}
.wp-block-gallery .wp-block-image img {
	transition: filter 160ms ease;
}
.wp-block-gallery .wp-lightbox-container:hover img {
	filter: brightness(1.05);
}
.wp-block-gallery .wp-lightbox-container button.lightbox-trigger,
.wp-block-gallery .wp-lightbox-container button.lightbox-trigger:hover {
	inset: 0;
	top: 0;
	right: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	border-radius: 3px;
	background: transparent;
	box-shadow: none;
	opacity: 0;
	cursor: zoom-in;
}
/* Keyboard users still need to see where focus is. */
.wp-block-gallery .wp-lightbox-container button.lightbox-trigger:focus-visible {
	opacity: 1;
	background: transparent;
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: -3px;
}

/* ---------------------------------------------------------------- year navigator
   Sticky pill bar on the Events index. Horizontally scrollable on narrow screens;
   the active year is highlighted by assets/js/yearnav.js. */
.hosjj-yearnav {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	gap: 0.35rem;
	margin: 1.75rem 0 2.25rem;
	padding: 0.65rem 0.5rem;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	/* No scroll-snap here: `scroll-snap-align: center` makes the browser centre a
	   pill on load, which scrolls the bar and clips the first year. */
	background: rgba(250, 248, 244, 0.93);
	-webkit-backdrop-filter: saturate(180%) blur(10px);
	backdrop-filter: saturate(180%) blur(10px);
	border-top: 1px solid #e5ddd0;
	border-bottom: 1px solid #e5ddd0;
}
.hosjj-yearnav::-webkit-scrollbar {
	display: none;
}
.hosjj-yearnav a {
	flex: 0 0 auto;
	padding: 0.35rem 0.75rem;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
	line-height: 1.4;
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.hosjj-yearnav a:hover {
	background: var(--wp--preset--color--surface);
	border-color: #e5ddd0;
}
.hosjj-yearnav a.is-active {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base-pure);
}

/* Year headings sit below the sticky bar when jumped to. */
.wp-block-heading[id^="year-"] {
	scroll-margin-top: 4.75rem;
	padding-bottom: 0.3rem;
	border-bottom: 2px solid var(--wp--preset--color--accent);
}

html {
	scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	.hosjj-yearnav a,
	.wp-block-gallery .wp-block-image img {
		transition: none;
	}
}

/* Essay prose rhythm on narrow template */
.hosjj-essay p {
	margin-bottom: 1.35em;
}

/* Hero */
.hosjj-hero {
	background:
		radial-gradient(ellipse at 50% -20%, rgba(168, 132, 44, 0.18), transparent 60%),
		linear-gradient(170deg, #4e0d14 0%, #7a1620 100%);
}
.hosjj-hero .hosjj-hero-kicker {
	color: var(--wp--preset--color--accent);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	font-weight: 600;
}

/* Page title band */
.hosjj-title-band {
	border-bottom: 1px solid #e5ddd0;
	background: var(--wp--preset--color--surface);
}

/* On small screens, unfloat side images so the text column stays readable */
@media (max-width: 600px) {
	main .wp-block-image.alignright,
	main .wp-block-image.alignleft {
		float: none;
		margin-left: auto;
		margin-right: auto;
		display: block;
		text-align: center;
	}
	main .wp-block-image.alignright img,
	main .wp-block-image.alignleft img {
		width: 100% !important;
		max-width: 320px;
		height: auto;
	}
}

/* Skip to content — WP outputs its own, keep focus visible */
a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}
