/* Layout, components and WordPress core classes for the LeoMarshell theme. */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }

/* scroll-behavior is set site-wide in assets/vendor/custom-customizer.css,
   which - unlike this file - loads on the reproduced kit pages too. */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
	font-family: var(--lm-font-sans);
	font-size: var(--lm-text-base);
	line-height: var(--lm-leading-normal);
	color: var(--lm-body);
	background: var(--lm-surface);
	-webkit-font-smoothing: antialiased;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
	color: var(--lm-ink);
	font-weight: 700;
	line-height: var(--lm-leading-tight);
	letter-spacing: -0.02em;
}
h1 { font-size: var(--lm-text-4xl); }
h2 { font-size: var(--lm-text-3xl); }
h3 { font-size: var(--lm-text-2xl); }
h4 { font-size: var(--lm-text-xl); }
h5, h6 { font-size: var(--lm-text-lg); }

a { color: var(--lm-accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--lm-accent-hover); }

blockquote {
	border-left: 3px solid var(--lm-accent);
	padding: var(--lm-space-2) 0 var(--lm-space-2) var(--lm-space-6);
	font-family: var(--lm-font-serif);
	font-size: var(--lm-text-lg);
	color: var(--lm-ink);
}
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }
pre { background: var(--lm-navy-900); color: #e6edf6; padding: var(--lm-space-4); border-radius: var(--lm-radius); overflow-x: auto; }
code { background: var(--lm-surface-alt); padding: 0.15em 0.4em; border-radius: var(--lm-radius-sm); }
pre code { background: none; padding: 0; }

/* ---------- Utilities ---------- */
.lm-container { width: 100%; max-width: var(--lm-container); margin-inline: auto; padding-inline: var(--lm-space-6); }
.lm-container--narrow { max-width: var(--lm-container-narrow); }
.lm-section { padding-block: var(--lm-space-24); }
.lm-stack > * + * { margin-top: var(--lm-space-4); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0;
	margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
	position: fixed !important; top: var(--lm-space-4); left: var(--lm-space-4);
	width: auto; height: auto; clip: auto; z-index: 999;
	background: var(--lm-surface); color: var(--lm-ink);
	padding: var(--lm-space-3) var(--lm-space-4); border-radius: var(--lm-radius-sm);
	box-shadow: var(--lm-shadow-lg);
}
:focus-visible { outline: 2px solid var(--lm-accent); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.lm-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--lm-space-2);
	padding: var(--lm-space-3) var(--lm-space-6);
	font-size: var(--lm-text-sm); font-weight: 600;
	border: 1px solid transparent; border-radius: var(--lm-radius-sm);
	cursor: pointer; text-decoration: none;
	transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
/* Navy on gold measures about 7:1; white on gold is roughly 2:1 and fails AA. */
.lm-btn--primary { background: var(--lm-accent); color: var(--lm-ink); }
.lm-btn--primary:hover { background: var(--lm-accent-hover); color: var(--lm-ink); }
.lm-btn--primary:focus-visible { outline: 2px solid var(--lm-ink); outline-offset: 2px; }
.lm-btn--secondary { background: transparent; color: var(--lm-ink); border-color: var(--lm-line); }
.lm-btn--secondary:hover { border-color: var(--lm-ink); color: var(--lm-ink); }

/* ---------- Header ---------- */
.lm-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: saturate(150%) blur(10px);
	border-bottom: 1px solid var(--lm-line);
}
.lm-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--lm-space-8); min-height: var(--lm-header-height); }
.lm-brand { display: flex; align-items: center; gap: var(--lm-space-3); text-decoration: none; }
.lm-brand__name { font-size: var(--lm-text-lg); font-weight: 700; color: var(--lm-ink); letter-spacing: -0.02em; }
.lm-brand__tagline { display: block; font-size: var(--lm-text-xs); color: var(--lm-muted); font-weight: 400; letter-spacing: 0; }

.lm-nav__list { display: flex; align-items: center; gap: var(--lm-space-6); }
.lm-nav__list a { color: var(--lm-ink); font-size: var(--lm-text-sm); font-weight: 500; text-decoration: none; }
.lm-nav__list a:hover, .lm-nav__list .current-menu-item > a { color: var(--lm-accent); }
.lm-nav li { position: relative; }
.lm-nav .sub-menu {
	position: absolute; min-width: 200px; background: var(--lm-surface);
	border: 1px solid var(--lm-line); border-radius: var(--lm-radius); box-shadow: var(--lm-shadow);
	padding: var(--lm-space-2); display: none; z-index: 110;
}
.lm-nav li:hover > .sub-menu, .lm-nav li:focus-within > .sub-menu { display: block; }
.lm-nav .sub-menu li a { display: block; padding: var(--lm-space-2) var(--lm-space-3); border-radius: var(--lm-radius-sm); }
.lm-nav .sub-menu li a:hover { background: var(--lm-surface-alt); }

.lm-nav-toggle { display: none; background: none; border: 1px solid var(--lm-line); border-radius: var(--lm-radius-sm); padding: var(--lm-space-2) var(--lm-space-3); cursor: pointer; }

@media (max-width: 900px) {
	.lm-nav-toggle { display: inline-flex; }
	.lm-nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--lm-surface); border-bottom: 1px solid var(--lm-line); padding: var(--lm-space-4) var(--lm-space-6); }
	.lm-nav.is-open { display: block; }
	.lm-nav__list { flex-direction: column; align-items: flex-start; gap: var(--lm-space-3); }
	.lm-nav .sub-menu { position: static; display: block; border: 0; box-shadow: none; padding-left: var(--lm-space-4); }
	.lm-header__cta { display: none; }
}

/* ---------- Page head ---------- */
.lm-page-head { background: var(--lm-surface-alt); border-bottom: 1px solid var(--lm-line); padding-block: var(--lm-space-16); }
.lm-page-head__title { font-size: var(--lm-text-3xl); }
.lm-page-head__meta { margin-top: var(--lm-space-3); color: var(--lm-muted); font-size: var(--lm-text-sm); }
.lm-breadcrumbs { font-size: var(--lm-text-xs); color: var(--lm-muted); margin-bottom: var(--lm-space-3); }
.lm-breadcrumbs a { color: var(--lm-muted); }
.lm-breadcrumbs a:hover { color: var(--lm-accent); }

/* ---------- Layout with sidebar ---------- */
.lm-layout { display: grid; gap: var(--lm-space-12); padding-block: var(--lm-space-16); }
@media (min-width: 1000px) { .lm-layout--sidebar { grid-template-columns: minmax(0, 1fr) 320px; } }

/* ---------- Entries ---------- */
.lm-entry__content > * + * { margin-top: var(--lm-space-6); }
.lm-entry__content h2, .lm-entry__content h3 { margin-top: var(--lm-space-12); }
.lm-entry__content ul, .lm-entry__content ol { padding-left: var(--lm-space-6); }
.lm-entry__content li + li { margin-top: var(--lm-space-2); }
.lm-entry__thumb img { width: 100%; border-radius: var(--lm-radius-lg); }
.lm-entry__meta { display: flex; flex-wrap: wrap; gap: var(--lm-space-4); font-size: var(--lm-text-sm); color: var(--lm-muted); }

/* min() lets the column shrink below 300px when the container itself is
   narrower - on a 320px phone there is only 272px of room, and a hard 300px
   floor pushed every card, image and all, past the edge of the screen. */
.lm-card-grid { display: grid; gap: var(--lm-space-8); grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.lm-card {
	display: flex; flex-direction: column;
	background: var(--lm-surface); border: 1px solid var(--lm-line);
	border-radius: var(--lm-radius-lg); overflow: hidden;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.lm-card:hover { border-color: #c6d2e0; box-shadow: var(--lm-shadow); transform: translateY(-2px); }
.lm-card__thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.lm-card__body { padding: var(--lm-space-6); display: flex; flex-direction: column; gap: var(--lm-space-3); flex: 1; }
.lm-card__title { font-size: var(--lm-text-xl); }
.lm-card__title a { color: inherit; text-decoration: none; }
.lm-card__title a:hover { color: var(--lm-accent); }
.lm-card__excerpt { font-size: var(--lm-text-sm); }
.lm-card__footer { margin-top: auto; padding-top: var(--lm-space-3); font-size: var(--lm-text-xs); color: var(--lm-muted); }

/* ---------- Job listings ---------- */
.lm-job-list { display: grid; gap: var(--lm-space-4); }
.lm-job {
	display: grid; gap: var(--lm-space-4); align-items: center;
	grid-template-columns: minmax(0, 1fr) auto;
	padding: var(--lm-space-6);
	border: 1px solid var(--lm-line); border-radius: var(--lm-radius-lg); background: var(--lm-surface);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.lm-job:hover { border-color: #c6d2e0; box-shadow: var(--lm-shadow-sm); }
.lm-job__title { font-size: var(--lm-text-lg); }
.lm-job__title a { color: inherit; text-decoration: none; }
.lm-job__title a:hover { color: var(--lm-accent); }
.lm-job__meta { display: flex; flex-wrap: wrap; gap: var(--lm-space-4); margin-top: var(--lm-space-2); font-size: var(--lm-text-sm); color: var(--lm-muted); }
.lm-job__meta-item { display: inline-flex; align-items: center; gap: var(--lm-space-1); }
@media (max-width: 640px) { .lm-job { grid-template-columns: 1fr; } }

.lm-tag {
	display: inline-flex; align-items: center;
	padding: var(--lm-space-1) var(--lm-space-3);
	font-size: var(--lm-text-xs); font-weight: 600;
	background: var(--lm-accent-soft); color: var(--lm-accent-hover);
	border-radius: 999px; text-decoration: none;
}
.lm-tag-list { display: flex; flex-wrap: wrap; gap: var(--lm-space-2); }

/* ---------- Sidebar / widgets ---------- */
.lm-sidebar { display: grid; gap: var(--lm-space-8); align-content: start; }
.lm-widget { border: 1px solid var(--lm-line); border-radius: var(--lm-radius-lg); padding: var(--lm-space-6); background: var(--lm-surface-alt); }
.lm-widget__title { font-size: var(--lm-text-lg); margin-bottom: var(--lm-space-4); }
.lm-widget ul { display: grid; gap: var(--lm-space-2); }
.lm-widget a { color: var(--lm-body); text-decoration: none; font-size: var(--lm-text-sm); }
.lm-widget a:hover { color: var(--lm-accent); }

/* ---------- Search form ---------- */
.lm-search { display: flex; gap: var(--lm-space-2); }
.lm-search__field, .lm-field input, .lm-field textarea, .lm-field select {
	width: 100%; padding: var(--lm-space-3) var(--lm-space-4);
	border: 1px solid var(--lm-line); border-radius: var(--lm-radius-sm);
	background: var(--lm-surface); color: var(--lm-ink); font-size: var(--lm-text-sm);
}
.lm-search__field:focus, .lm-field input:focus, .lm-field textarea:focus {
	outline: none; border-color: var(--lm-accent); box-shadow: 0 0 0 3px var(--lm-accent-soft);
}
/* The search button takes "Submit Requirement"'s approved gold gradient
   (--lm-btn-gold-* custom properties, declared site-wide in
   custom-customizer.css's .cst-sm) instead of the flat --lm-accent orange.
   Scoped to .lm-search rather than changing .lm-btn--primary itself, which
   the job-apply and contact forms' submit buttons also use and were not
   asked to change. */
.lm-search .lm-btn--primary {
	background: linear-gradient(var(--lm-btn-gold-angle, 59deg), var(--lm-btn-gold-stops));
	color: var(--lm-btn-gold-label, #6a4a09);
	border: none;
	border-radius: 6px;
	box-shadow: var(--lm-btn-gold-rim, inset 0 0 0 1px rgba(120, 86, 14, 0.45));
}
.lm-search .lm-btn--primary:hover {
	color: var(--lm-btn-gold-label, #6a4a09);
	filter: brightness(0.94);
}

/* ---------- Forms ---------- */
.lm-form { display: grid; gap: var(--lm-space-6); }
.lm-field { display: grid; gap: var(--lm-space-2); }
.lm-field label { font-size: var(--lm-text-sm); font-weight: 600; color: var(--lm-ink); }
.lm-field__hint { font-size: var(--lm-text-xs); color: var(--lm-muted); }
.lm-field__error { font-size: var(--lm-text-xs); color: var(--lm-error); }
.lm-field--invalid input, .lm-field--invalid textarea { border-color: var(--lm-error); }
.lm-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lm-notice { padding: var(--lm-space-4) var(--lm-space-6); border-radius: var(--lm-radius); font-size: var(--lm-text-sm); }
.lm-notice--success { background: var(--lm-success-bg); color: var(--lm-success); border: 1px solid currentColor; }
.lm-notice--error { background: var(--lm-error-bg); color: var(--lm-error); border: 1px solid currentColor; }

/* ---------- Job application form ---------- */
.lm-job-apply { margin-top: var(--lm-space-12); }
.lm-job-apply__card {
	max-width: 640px; margin-inline: auto;
	padding: 1.75rem;
	background: var(--lm-surface-alt);
	border: 1px solid var(--lm-line-soft); border-radius: var(--lm-radius);
}
.lm-job-apply__title { font-size: 1.25rem; line-height: 1.3; color: var(--lm-ink); }
.lm-job-apply__for {
	margin-top: var(--lm-space-2);
	font-size: var(--lm-text-xs); line-height: 1.5; color: var(--lm-muted);
}
.lm-job-apply__for strong { color: var(--lm-body); }
/* Lighter than the rest of the line, as the reference design has it. */
.lm-job-apply__ref { margin-left: var(--lm-space-2); font-size: 0.75rem; color: #98a5b8; }
.lm-job-apply .lm-notice { margin-top: var(--lm-space-4); }

/* Not .lm-form: the markup comes from lm_form_open(), which prints the class
   given to it and nothing else, so the grid is set on the element itself. */
.lm-job-apply__form { display: grid; gap: 1.25rem; margin-top: var(--lm-space-6); }
.lm-job-apply__form .lm-field label { font-size: var(--lm-text-xs); }
.lm-job-apply__form .lm-field input,
.lm-job-apply__form .lm-field textarea {
	padding: 0.5rem 0.875rem; font-size: 0.875rem;
	border-color: var(--lm-line-soft);
}
.lm-job-apply__form .lm-field textarea { min-height: 104px; resize: vertical; }
/* The resume field takes the gold "Attach" control the Workforce Request form
   uses (.lm-file-upload in custom-customizer.css), in place of the browser's
   own "Choose File" button. The real input covers the span at opacity 0, so it
   keeps the click and the validation; these rules only have to undo the
   generic .lm-field input styling above, which would otherwise draw a second
   bordered box around it. */
.lm-job-apply__form .lm-file-upload {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 16px;
	height: 52px;
	border-radius: 10px;
	border: 1.5px solid transparent;
	background:
		linear-gradient( #fcefdb, #fcefdb ) padding-box,
		linear-gradient( var( --lm-gold-text-angle, 59deg ), var( --lm-gold-text-stops, #c49c3f 0%, #e6d181 55%, #b58b2d 100% ) ) border-box;
	box-sizing: border-box;
}
.lm-job-apply__form .lm-file-upload__icon { flex-shrink: 0; }
.lm-job-apply__form .lm-file-upload__label {
	font-size: 13px;
	font-weight: 600;
	color: #0b1739;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.lm-job-apply__form .lm-file-upload input[type="file"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	opacity: 0;
	cursor: pointer;
	background: transparent;
}
.lm-job-apply__form .lm-file-upload:focus-within {
	box-shadow: 0 0 0 3px var(--lm-accent-soft);
}

.lm-job-apply__form .lm-field__hint { font-size: 0.6875rem; }
.lm-field__hint.is-error { color: #c62828; font-weight: 600; }
.lm-job-apply__form .lm-field--submit { margin-top: var(--lm-space-1); }
/* The submit is a widget-free button element, so width has to be asked for. */
.lm-job-apply__form .lm-btn { width: 100%; padding-block: 0.625rem; }

@media (max-width: 640px) {
	.lm-job-apply__card { padding: var(--lm-space-6) var(--lm-space-4); }
	.lm-job-apply__ref { display: block; margin-left: 0; }
}

/* ---------- Pagination ---------- */
.lm-pagination { margin-top: var(--lm-space-12); }
/* Sized to match the Find Jobs listing's pagination (.jobs-page in
   template-parts/pages/find-jobs/section-2.php) - min-width 38px, 9px/12px
   padding, 7px corners, 13.5px 600-weight type - instead of its own larger
   40px boxes at the body text size. */
.lm-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 38px; padding: 9px 12px; box-sizing: border-box;
	border: 1px solid var(--lm-line); border-radius: 7px;
	margin-right: var(--lm-space-2); text-decoration: none; color: var(--lm-ink);
	font-size: 13.5px; font-weight: 600;
}
.lm-pagination .page-numbers:hover { border-color: var(--lm-accent); color: var(--lm-accent); }
.lm-pagination .page-numbers.current { background: var(--lm-navy-900); border-color: var(--lm-navy-900); color: #fff; }

/* ---------- Comments ---------- */
.lm-comments { margin-top: var(--lm-space-16); padding-top: var(--lm-space-12); border-top: 1px solid var(--lm-line); }
.lm-comments .comment-list { display: grid; gap: var(--lm-space-8); list-style: none; padding: 0; }
.lm-comments .children { list-style: none; padding-left: var(--lm-space-8); margin-top: var(--lm-space-6); display: grid; gap: var(--lm-space-6); }
.lm-comments .avatar { border-radius: 50%; }

/* ---------- Footer ---------- */
.lm-footer { background: var(--lm-navy-900); color: #b9c6d8; padding-block: var(--lm-space-16) var(--lm-space-8); margin-top: var(--lm-space-24); }
.lm-footer h2, .lm-footer h3, .lm-footer .lm-widget__title { color: #fff; }
.lm-footer a { color: #b9c6d8; text-decoration: none; }
.lm-footer a:hover { color: #fff; }
.lm-footer__cols { display: grid; gap: var(--lm-space-12); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.lm-footer .lm-widget { background: transparent; border: 0; padding: 0; }
.lm-footer__bottom {
	margin-top: var(--lm-space-12); padding-top: var(--lm-space-6);
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	display: flex; flex-wrap: wrap; gap: var(--lm-space-4); justify-content: space-between;
	font-size: var(--lm-text-xs);
}

/* ---------- WordPress core ---------- */
.alignleft { float: left; margin: 0 var(--lm-space-6) var(--lm-space-4) 0; }
.alignright { float: right; margin: 0 0 var(--lm-space-4) var(--lm-space-6); }
.aligncenter { margin-inline: auto; }
.alignwide { width: min(100vw - 3rem, 1180px); margin-inline: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.wp-caption { max-width: 100%; }
.wp-caption-text, .wp-element-caption { font-size: var(--lm-text-xs); color: var(--lm-muted); margin-top: var(--lm-space-2); text-align: center; }
.sticky .lm-card { border-color: var(--lm-accent); }
.gallery { display: grid; gap: var(--lm-space-4); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
