/* ==========================================================================
   Wildlight for Genesis — layout for Genesis Framework markup
   ========================================================================== */

:root {
	--wl-header-h: 76px;
	/* Left/right padding for the header bar, hero text and page edges. */
	--wl-edge-pad: clamp(1.5rem, 5vw, 4.5rem);
	--wl-content: min(760px, calc(100% - 2 * var(--wl-edge-pad)));
	--wl-wide: min(1360px, calc(100% - 2 * var(--wl-edge-pad)));
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.site-container {
	overflow-x: clip;
}

img,
video,
iframe {
	max-width: 100%;
}

img {
	height: auto;
}

/* Accessibility
-------------------------------------------------------------------------- */

.screen-reader-text,
.screen-reader-shortcut,
.genesis-skip-link a,
.site-description {
	position: absolute !important;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	width: 1px;
	height: 1px;
	overflow: hidden;
	border: 0;
	word-wrap: normal !important;
}

.screen-reader-shortcut:focus,
.genesis-skip-link a:focus {
	clip: auto !important;
	clip-path: none;
	width: auto;
	height: auto;
	display: block;
	padding: 1rem 1.5rem;
	z-index: 100000;
	background: #fff;
	color: #1b1b1a;
	box-shadow: 0 0 0 2px #1b1b1a;
}

.genesis-skip-link {
	margin: 0;
	padding: 0;
}

.genesis-skip-link li {
	list-style: none;
	width: 0;
	height: 0;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent, #4a5a52);
	outline-offset: 2px;
}

/* Header
-------------------------------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.94);
	-webkit-backdrop-filter: saturate(160%) blur(10px);
	backdrop-filter: saturate(160%) blur(10px);
	border-bottom: 1px solid var(--wp--preset--color--line, #e4e2dd);
}

.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.admin-bar .site-header {
		top: 0;
	}
}

.site-header > .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	min-height: var(--wl-header-h);
	padding: 0 var(--wl-edge-pad);
}

.title-area {
	margin: 0;
	flex-shrink: 0;
}

.site-title {
	margin: 0;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.site-title a {
	color: var(--wp--preset--color--contrast, #1b1b1a);
	text-decoration: none;
}

.site-title a:hover {
	color: var(--wp--preset--color--accent, #4a5a52);
}

.custom-logo-link {
	display: block;
}

.custom-logo-link img {
	display: block;
	max-height: 48px;
	width: auto;
}

/* Header menu
-------------------------------------------------------------------------- */

.nav-primary {
	position: static;
}

.genesis-nav-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.genesis-nav-menu li {
	position: relative;
	margin: 0;
}

.genesis-nav-menu a {
	display: block;
	padding: 0.5rem 0;
	font-size: var(--wp--preset--font-size--x-small, 0.75rem);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wp--preset--color--contrast, #1b1b1a);
}

.genesis-nav-menu a:hover {
	color: var(--wp--preset--color--accent, #4a5a52);
}

/* Current page: full-strength text with a thin underline. */
.genesis-nav-menu .current-menu-item > a,
.genesis-nav-menu .current-menu-ancestor > a,
.genesis-nav-menu .current-menu-parent > a {
	color: var(--wp--preset--color--contrast, #1b1b1a);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.6em;
}

.genesis-nav-menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: -1rem;
	z-index: 60;
	min-width: 210px;
	margin: 0;
	padding: 0.5rem 1rem;
	list-style: none;
	background: #fff;
	border: 1px solid var(--wp--preset--color--line, #e4e2dd);
}

.genesis-nav-menu li:hover > .sub-menu,
.genesis-nav-menu li:focus-within > .sub-menu,
.genesis-nav-menu li.sfHover > .sub-menu {
	display: block;
}

.genesis-nav-menu .sub-menu .sub-menu {
	top: -0.5rem;
	left: 100%;
}

.wl-menu-toggle {
	display: none;
	align-items: center;
	gap: 0.6rem;
	padding: 0.5rem 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--contrast, #1b1b1a);
	font: inherit;
	font-size: var(--wp--preset--font-size--x-small, 0.75rem);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	cursor: pointer;
}

.wl-menu-toggle__bars,
.wl-menu-toggle__bars::before,
.wl-menu-toggle__bars::after {
	display: block;
	width: 20px;
	height: 1px;
	background: currentColor;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.wl-menu-toggle__bars {
	position: relative;
}

.wl-menu-toggle__bars::before,
.wl-menu-toggle__bars::after {
	content: "";
	position: absolute;
	left: 0;
}

.wl-menu-toggle__bars::before {
	top: -6px;
}

.wl-menu-toggle__bars::after {
	top: 6px;
}

.nav-primary.is-open .wl-menu-toggle__bars {
	background: transparent;
}

.nav-primary.is-open .wl-menu-toggle__bars::before {
	transform: translateY(6px) rotate(45deg);
}

.nav-primary.is-open .wl-menu-toggle__bars::after {
	transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 959px) {
	.wl-menu-toggle {
		display: inline-flex;
	}

	.nav-primary .genesis-nav-menu {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		padding: 0.75rem var(--wl-edge-pad) 1.5rem;
		background: #fff;
		border-bottom: 1px solid var(--wp--preset--color--line, #e4e2dd);
	}

	.nav-primary.is-open .genesis-nav-menu {
		display: flex;
	}

	.genesis-nav-menu li {
		width: 100%;
	}

	.genesis-nav-menu a {
		padding: 0.7rem 0;
	}

	.genesis-nav-menu .sub-menu,
	.genesis-nav-menu .sub-menu .sub-menu {
		display: block;
		position: static;
		min-width: 0;
		padding: 0 0 0 1rem;
		border: 0;
	}
}

/* Main content area
-------------------------------------------------------------------------- */

.site-inner {
	padding-bottom: var(--wp--preset--spacing--60, 6rem);
}

.content-sidebar-wrap,
.content {
	width: 100%;
}

.entry {
	margin: 0;
}

.entry-header,
.entry-footer,
.archive-description,
.author-box,
.after-entry,
.breadcrumb,
.adjacent-entry-pagination,
.entry-comments,
.entry-pings,
.comment-respond,
.error404 .entry-content,
.search-no-results .entry-content {
	max-width: var(--wl-content);
	margin-left: auto;
	margin-right: auto;
}

.entry-header {
	padding-top: var(--wp--preset--spacing--50, 4rem);
	margin-bottom: 2rem;
}

.entry-title,
.archive-title {
	margin: 0 0 0.75rem;
}

.entry-title a {
	text-decoration: none;
	color: inherit;
}

.entry-meta {
	margin: 0;
	color: var(--wp--preset--color--muted, #6f6d68);
	font-size: var(--wp--preset--font-size--x-small, 0.75rem);
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.entry-meta a {
	color: inherit;
	text-decoration: none;
}

.entry-header .entry-meta {
	order: -1;
}

/* Block alignments inside page/post content */
.entry-content > * {
	max-width: var(--wl-content);
	margin-left: auto;
	margin-right: auto;
}

.entry-content > .alignwide {
	max-width: var(--wl-wide);
}

.entry-content > .alignfull {
	max-width: none;
	width: 100%;
}

.entry-content > .alignleft {
	float: left;
	margin-right: 1.5rem;
	margin-left: max(var(--wl-edge-pad), calc((100% - 760px) / 2));
}

.entry-content > .alignright {
	float: right;
	margin-left: 1.5rem;
	margin-right: max(var(--wl-edge-pad), calc((100% - 760px) / 2));
}

/* Full-width sections need inner padding on small screens */
.entry-content .alignfull.wl-section {
	padding-left: var(--wl-edge-pad);
	padding-right: var(--wl-edge-pad);
}

.entry-content .wl-section > :not(.alignfull):not(.alignwide) {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
}

.entry-content .wl-section > .alignwide {
	max-width: 1360px;
	margin-left: auto;
	margin-right: auto;
}

.entry-content .wl-section > .alignfull {
	margin-left: calc(-1 * var(--wl-edge-pad));
	margin-right: calc(-1 * var(--wl-edge-pad));
	max-width: none;
}

/* Full-bleed pages (front page + "Gallery (full width, no title)" template) */
.wl-full-width .site-inner {
	padding-bottom: 0;
}

.wl-full-width .entry-content > :first-child {
	margin-top: 0;
}

.wl-full-width .entry-content > :last-child {
	margin-bottom: 0;
}

/* Single journal post */
/* Full-width hero photo on journal posts (the post's featured image) */
.wl-single-image {
	max-width: none;
	margin: 0;
	overflow: hidden;
	background: var(--wp--preset--color--surface, #f5f4f1);
}

.single .entry-header {
	display: flex;
	flex-direction: column;
	padding-top: var(--wp--preset--spacing--40, 2rem);
}

.wl-single-image + .entry-meta,
.single .entry-header > .wl-single-image {
	order: -2;
}

.wl-single-image img {
	display: block;
	width: 100%;
	height: auto;
	max-height: min(80vh, 920px);
	object-fit: cover;
	object-position: 50% 45%;
}

.single .wl-single-image + .entry-header {
	padding-top: var(--wp--preset--spacing--50, 4rem);
}

.single .entry-footer {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--line, #e4e2dd);
}

.adjacent-entry-pagination {
	display: flex;
	justify-content: space-between;
	gap: 2rem;
	margin-top: 2.5rem;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
}

.adjacent-entry-pagination a {
	text-decoration: none;
}

/* Journal list: single column (blog page, categories, tags, search)
-------------------------------------------------------------------------- */

.wl-grid .content {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 4.5rem;
	max-width: 54rem;
	margin: 0 auto;
	padding-top: var(--wp--preset--spacing--50, 4rem);
}

.wl-grid .content > .archive-description,
.wl-grid .content > .posts-page-description,
.wl-grid .content > .breadcrumb,
.wl-grid .content > .archive-pagination,
.wl-grid .content > .search-form,
.wl-grid .content > .entry-content {
	grid-column: 1 / -1;
	max-width: none;
	margin: 0;
}

.wl-grid .archive-title {
	font-size: var(--wp--preset--font-size--xx-large, 3.25rem);
}

.wl-grid .entry {
	display: flex;
	flex-direction: column;
}

.wl-grid .entry-header {
	display: flex;
	flex-direction: column;
	max-width: none;
	margin: 0 0 0.5rem;
	padding: 0;
}

.wl-grid .entry-image-link {
	display: block;
	order: -2;
	overflow: hidden;
	margin-bottom: 1rem;
}

.wl-grid .entry-image-link img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	transition: transform 1.2s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.wl-grid .entry-image-link:hover img {
	transform: scale(1.04);
}

.wl-grid .entry-header .entry-meta {
	order: -1;
	margin-bottom: 0.35rem;
}

.wl-grid .entry-title {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-large, 2rem);
}

.wl-grid .entry-content > * {
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

.wl-grid .entry-content p {
	margin: 0;
	color: var(--wp--preset--color--muted, #6f6d68);
	font-size: var(--wp--preset--font-size--medium, 1.0625rem);
	line-height: 1.7;
}

.archive-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

.archive-pagination a {
	display: block;
	padding: 0.5rem 0.9rem;
	border: 1px solid var(--wp--preset--color--line, #e4e2dd);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
}

.archive-pagination .active a,
.archive-pagination a:hover {
	background: var(--wp--preset--color--contrast, #1b1b1a);
	border-color: var(--wp--preset--color--contrast, #1b1b1a);
	color: #fff;
}

/* Forms and comments
-------------------------------------------------------------------------- */

input,
select,
textarea {
	width: 100%;
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--wp--preset--color--line, #e4e2dd);
	border-radius: 0;
	background: #fff;
	color: inherit;
	font: inherit;
}

input[type="checkbox"],
input[type="radio"] {
	width: auto;
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--wp--preset--color--contrast, #1b1b1a);
	outline: none;
}

input[type="submit"],
button[type="submit"],
.search-form input[type="submit"] {
	width: auto;
	padding: 0.8em 1.7em;
	border: 1px solid var(--wp--preset--color--contrast, #1b1b1a);
	background: var(--wp--preset--color--contrast, #1b1b1a);
	color: #fff;
	font-size: var(--wp--preset--font-size--x-small, 0.75rem);
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	cursor: pointer;
}

input[type="submit"]:hover,
button[type="submit"]:hover {
	background: var(--wp--preset--color--accent, #4a5a52);
	border-color: var(--wp--preset--color--accent, #4a5a52);
}

.search-form {
	display: flex;
	gap: 0.5rem;
}

.comment-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	padding-left: 1.5rem;
	list-style: none;
}

.comment {
	padding: 1.25rem 0;
	border-top: 1px solid var(--wp--preset--color--line, #e4e2dd);
}

.comment-meta {
	font-size: var(--wp--preset--font-size--x-small, 0.75rem);
	color: var(--wp--preset--color--muted, #6f6d68);
}

/* Footer
-------------------------------------------------------------------------- */

.site-footer {
	border-top: 1px solid var(--wp--preset--color--line, #e4e2dd);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	color: var(--wp--preset--color--muted, #6f6d68);
}

.site-footer > .wrap {
	padding: 2rem var(--wl-edge-pad);
}

.site-footer p {
	margin: 0;
}

.site-footer a {
	color: inherit;
}

/* Inline photos in journal posts
-------------------------------------------------------------------------- */

.single .entry-content > .wp-block-image {
	margin-top: 2.5rem;
	margin-bottom: 2.5rem;
}

.single .entry-content > .wp-block-image figcaption {
	margin-top: 0.6rem;
	text-align: left;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	color: var(--wp--preset--color--muted, #6f6d68);
}

.single .entry-content > .wp-block-image.alignwide img,
.single .entry-content > .wp-block-image.alignfull img {
	width: 100%;
}

/* Video posts: wide video right under the title */
.single .entry-content > .wp-block-video.alignwide {
	margin-top: 0.5rem;
	margin-bottom: 2.5rem;
}

.single .entry-content > .wp-block-video video {
	display: block;
	width: 100%;
	height: auto;
	background: #111;
}

.single .entry-content > .wp-block-video figcaption {
	margin-top: 0.6rem;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	color: var(--wp--preset--color--muted, #6f6d68);
}
