/* ---------------------------------------------------------------------------
 * HG Jobs - front-end styles
 * Restyled to match the Hollins & Gee homepage: Anton headlines, Archivo body,
 * IBM Plex Mono labels, warm paper background, red accents and drawing-style
 * corner ticks. Scoped to .hg-jobs / .hg-job-single so the theme is untouched.
 * ------------------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Archivo:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

.hg-jobs,
.hg-job-single {
	--hg-red: #D0021B;
	--hg-red-dk: #A80016;
	--hg-ink: #15120E;
	--hg-paper: #F3EFE8;
	--hg-paper-2: #ECE6DB;
	--hg-oak: #B07A43;
	--hg-muted: #6E675E;
	--hg-line: #D8D0C3;
	--hg-black: #111111;

	color: var(--hg-ink);
	font-family: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.hg-jobs *,
.hg-job-single * { box-sizing: border-box; }

/* ===================== LISTING GRID ===================== */

.hg-jobs {
	display: grid;
	gap: 28px;
	margin: 0 0 40px;
}

.hg-jobs-cols-1 { grid-template-columns: 1fr; }
.hg-jobs-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hg-jobs-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 900px) {
	.hg-jobs-cols-2,
	.hg-jobs-cols-3 { grid-template-columns: 1fr; }
}

.hg-jobs-empty {
	font-family: 'IBM Plex Mono', monospace;
	text-transform: uppercase;
	letter-spacing: .14em;
	font-size: 13px;
	color: #6E675E;
	border: 1px dashed #D8D0C3;
	padding: 22px;
	text-align: center;
}

/* ===================== CARD ===================== */

.hg-job {
	position: relative;
	background: #fff;
	border: 1px solid var(--hg-line);
	padding: 0 0 22px;
	display: flex;
	flex-direction: column;
	transition: transform .18s ease, box-shadow .18s ease;
	isolation: isolate;
}

/* Drawing-style corner ticks, in the trade colour. */
.hg-job::before,
.hg-job::after {
	content: "";
	position: absolute;
	width: 14px;
	height: 14px;
	z-index: 3;
	pointer-events: none;
	border-color: var(--hg-red);
}
.hg-job::before {
	top: -1px; left: -1px;
	border-top: 3px solid;
	border-left: 3px solid;
}
.hg-job::after {
	bottom: -1px; right: -1px;
	border-bottom: 3px solid;
	border-right: 3px solid;
}

/* Trade colours match the map pins: joinery red, painting black. */
.hg-job--painting::before,
.hg-job--painting::after { border-color: var(--hg-black); }

.hg-job--clickable { cursor: pointer; }
.hg-job--clickable:hover {
	transform: translateY(-3px);
	box-shadow: 0 26px 50px -30px rgba(21, 18, 14, .55);
}

.hg-job__link {
	position: absolute;
	inset: 0;
	z-index: 1;
	text-indent: -9999px;
	overflow: hidden;
	background: transparent;
}

/* ===================== MEDIA ===================== */

.hg-job__media {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	background: var(--hg-paper-2);
}

.hg-job__image,
.hg-job__map {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

/* Keep the embedded map interactive above the stretched card link. */
.hg-job__map {
	z-index: 2;
	border-left: 1px solid var(--hg-line);
}

.hg-job__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .4s ease;
}
.hg-job--clickable:hover .hg-job__image img { transform: scale(1.03); }

.hg-job__image-placeholder {
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(135deg, #e7e0d4 0 14px, #ece6db 14px 28px);
}

.hg-job__map iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.hg-job__map-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'IBM Plex Mono', monospace;
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--hg-muted);
	background: var(--hg-paper-2);
	text-align: center;
	padding: 12px;
}

/* ===================== DETAILS ===================== */

.hg-job__details {
	padding: 24px 24px 0;
	flex: 1 1 auto;
}

.hg-job__title {
	font-family: 'Anton', Impact, sans-serif;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: .005em;
	line-height: 1;
	font-size: clamp(1.35rem, 2.2vw, 1.75rem);
	margin: 0 0 14px;
	color: var(--hg-ink);
}

.hg-job__title::after {
	content: "";
	display: block;
	width: 42px;
	height: 3px;
	background: var(--hg-red);
	margin-top: 12px;
}
.hg-job--painting .hg-job__title::after { background: var(--hg-black); }

.hg-job__line {
	margin: 0 0 7px;
	font-size: 15.5px;
	color: var(--hg-ink);
}

/* Field labels read like a spec sheet. */
.hg-job__line strong {
	font-family: 'IBM Plex Mono', monospace;
	font-weight: 500;
	font-size: 11.5px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--hg-muted);
}

.hg-job__more {
	display: inline-block;
	margin-top: 12px;
	font-family: 'IBM Plex Mono', monospace;
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--hg-red);
	font-weight: 500;
	opacity: .9;
	transition: opacity .15s ease;
}
.hg-job--clickable:hover .hg-job__more {
	opacity: 1;
	text-decoration: underline;
}

/* ===================== PROGRESS ===================== */

.hg-job__progress {
	padding: 18px 24px 0;
	margin-top: auto;
}

.hg-job__progress-top {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 8px;
}

.hg-job__progress-label {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 11.5px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--hg-muted);
}

.hg-job__progress-value {
	font-family: 'Anton', Impact, sans-serif;
	font-size: 17px;
	color: var(--hg-red);
	letter-spacing: .02em;
}
.hg-job--painting .hg-job__progress-value { color: var(--hg-ink); }

.hg-job__progress-bar {
	position: relative;
	height: 26px;
	background: var(--hg-paper-2);
	border: 1px solid var(--hg-line);
	overflow: hidden;
}

.hg-job__progress-fill {
	display: block;
	height: 100%;
	background: var(--hg-red);
	transition: width .5s ease;
}
.hg-job--painting .hg-job__progress-fill { background: var(--hg-black); }

/* ===================== SINGLE JOB PAGE ===================== */

.hg-job-single {
	background: var(--hg-paper);
	padding: clamp(40px, 7vw, 84px) 0;
	margin: 0;
}

.hg-job-single__inner {
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 clamp(20px, 5vw, 40px);
}

.hg-job-single__title {
	font-family: 'Anton', Impact, sans-serif;
	font-weight: 400;
	text-transform: uppercase;
	line-height: .98;
	font-size: clamp(2.1rem, 5vw, 3.6rem);
	margin: 0 0 10px;
	color: var(--hg-ink);
	max-width: 20ch;
}

.hg-job-single__title::after {
	content: "";
	display: block;
	width: 64px;
	height: 4px;
	background: var(--hg-red);
	margin-top: 18px;
}
.hg-job-single--painting .hg-job-single__title::after { background: var(--hg-black); }

.hg-job-single__media {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin: 30px 0 28px;
}

.hg-job-single__image,
.hg-job-single__map {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--hg-paper-2);
	border: 1px solid var(--hg-line);
}

.hg-job-single__image::before,
.hg-job-single__image::after {
	content: "";
	position: absolute;
	width: 16px;
	height: 16px;
	z-index: 2;
	pointer-events: none;
}
.hg-job-single__image::before {
	top: -1px; left: -1px;
	border-top: 3px solid var(--hg-red);
	border-left: 3px solid var(--hg-red);
}
.hg-job-single__image::after {
	bottom: -1px; right: -1px;
	border-bottom: 3px solid var(--hg-red);
	border-right: 3px solid var(--hg-red);
}

.hg-job-single__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hg-job-single__map iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.hg-job-single__details {
	margin-bottom: 24px;
	border-top: 1px solid var(--hg-line);
	padding-top: 20px;
}

.hg-job-single__details .hg-job__line {
	font-size: 17px;
	margin-bottom: 9px;
}

.hg-job-single__progress {
	max-width: 540px;
	margin-bottom: 36px;
	padding: 0;
}

.hg-job-single__content {
	font-size: 18px;
	line-height: 1.65;
	border-top: 1px solid var(--hg-line);
	padding-top: 26px;
	max-width: 68ch;
}

.hg-job-single__content img { max-width: 100%; height: auto; }

/* Gallery - extra images, shown only on the job page. */
.hg-job-single__gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 14px;
	margin: 0 0 32px;
}

.hg-job-single__gallery-fig {
	margin: 0;
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--hg-paper-2);
	border: 1px solid var(--hg-line);
}

.hg-job-single__gallery-fig img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .4s ease;
}
.hg-job-single__gallery-fig:hover img { transform: scale(1.04); }

@media (max-width: 900px) {
	.hg-job-single__media { grid-template-columns: 1fr; }
	.hg-job__media { grid-template-columns: 1fr; }
	.hg-job__map { border-left: 0; border-top: 1px solid var(--hg-line); }
}

@media (prefers-reduced-motion: reduce) {
	.hg-jobs *,
	.hg-job-single * { transition: none !important; }
}
