/* ==========================================================================
   workfromanywhere.co — homepage (v2.0.0)
   Upload to: /wp-content/themes/wfa-theme/assets/css/wfa-home.css
   Loaded by front-page.php only. Job cards come from wfa-job-cards.css.

   Same system as the rest of the site: small-capital eyebrows, serif
   headings, thin line icons, square corners, ink and cream only.
   ========================================================================== */

.wfa-home--v2 {
	--hm-ink:     var(--wfa-text, #14171a);
	--hm-muted:   var(--wfa-muted, #5f6a70);
	--hm-paper:   var(--wfa-bg, #faf7f2);
	--hm-card:    var(--wfa-surface, #f2ede4);
	--hm-line:    var(--wfa-line, #e2dcd2);
	--hm-display: var(--wfa-display, "Fraunces", Georgia, "Times New Roman", serif);

	/* The job card stylesheet reads these. */
	--jc-ink:     var(--hm-ink);
	--jc-muted:   var(--hm-muted);
	--jc-paper:   var(--hm-paper);
	--jc-card:    var(--hm-card);
	--jc-line:    var(--hm-line);
	--jc-display: var(--hm-display);

	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	color: var(--hm-ink);
	font-family: var(--wfa-ui, "Public Sans", system-ui, sans-serif);
}

/* Lines up with the logo: the header's 40px gutter, 30px on phones. */
.wfa-home-wrap {
	padding: 0 40px;
}

@media (max-width: 768px) {
	.wfa-home-wrap {
		padding: 0 30px;
	}
}

.wfa-home-sec {
	padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.wfa-home-sec--rule > .wfa-home-wrap {
	position: relative;
}

.wfa-home-sec--rule > .wfa-home-wrap::before {
	content: "";
	position: absolute;
	top: calc(clamp(3.5rem, 7vw, 5.5rem) * -1);
	left: 40px;
	right: 40px;
	border-top: 1px solid var(--hm-line);
}

@media (max-width: 768px) {
	.wfa-home-sec--rule > .wfa-home-wrap::before {
		left: 30px;
		right: 30px;
	}
}

/* ---------- section heads ---------- */

.wfa-home-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem 2rem;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.wfa-home-head--center {
	justify-content: center;
	text-align: center;
}

.wfa-home-eyebrow {
	margin: 0 0 .9rem;
	font-size: .75rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--hm-muted);
}

.wfa-home-title {
	margin: 0;
	font-family: var(--hm-display);
	font-size: clamp(2rem, 3.8vw, 2.875rem);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -.015em;
	text-wrap: balance;
}

.wfa-home--v2 a.wfa-home-textlink {
	display: inline-flex;
	padding-bottom: .25rem;
	border-bottom: 1px solid currentColor;
	color: var(--hm-ink);
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
}

/* ---------- 1. latest roles ---------- */

.wfa-home--v2 .wfa-jobs.wfa-jobs--cards {
	display: grid;
	/* Eight cards: four across, two on tablets, one on phones, so the
	   rows always come out even. */
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.75rem 1.25rem;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

@media (max-width: 1100px) {
	.wfa-home--v2 .wfa-jobs.wfa-jobs--cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 599px) {
	.wfa-home--v2 .wfa-jobs.wfa-jobs--cards {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- 2. regions ---------- */

.wfa-home-regions {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--hm-line);
	border-bottom: 1px solid var(--hm-line);
}

.wfa-home-regions li {
	margin: 0;
}

.wfa-home-regions li + li {
	border-left: 1px solid var(--hm-line);
}

.wfa-home--v2 .wfa-home-regions a {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	height: 100%;
	padding: 1.75rem 1.25rem;
	color: var(--hm-ink);
	text-decoration: none;
	transition: background-color .2s ease;
}

.wfa-home--v2 .wfa-home-regions a:hover,
.wfa-home--v2 .wfa-home-regions a:focus-visible {
	background: var(--hm-card);
}

.wfa-home-regions__count {
	font-family: var(--hm-display);
	font-size: clamp(1.75rem, 2.6vw, 2.25rem);
	line-height: 1;
	letter-spacing: -.02em;
}

.wfa-home-regions__label {
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--hm-muted);
}

.wfa-home--v2 .wfa-home-regions a:hover .wfa-home-regions__label {
	color: var(--hm-ink);
	text-decoration: underline;
	text-underline-offset: 4px;
}

@media (max-width: 1000px) {
	.wfa-home-regions {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.wfa-home-regions li:nth-child(4) {
		border-left: 0;
	}

	.wfa-home-regions li:nth-child(n+4) {
		border-top: 1px solid var(--hm-line);
	}
}

@media (max-width: 560px) {
	.wfa-home-regions {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wfa-home-regions li + li {
		border-left: 0;
	}

	.wfa-home-regions li:nth-child(even) {
		border-left: 1px solid var(--hm-line);
	}

	.wfa-home-regions li:nth-child(n+3) {
		border-top: 1px solid var(--hm-line);
	}
}

/* ---------- 3. how it works ---------- */

.wfa-home-steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 3rem;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: wfa-step;
}

.wfa-home-steps li {
	margin: 0;
	counter-increment: wfa-step;
	text-align: center;
}

.wfa-home--v2 .wfa-home-ico {
	display: block;
	width: 2.75rem;
	height: 2.75rem;
	margin: 0 auto 1.25rem;
}

.wfa-home--v2 .wfa-home-steps__title {
	font-family: var(--wfa-ui, "Public Sans", system-ui, sans-serif);
	margin: 0 0 .6rem;
	font-size: .9375rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.wfa-home-steps__title::before {
	content: counter(wfa-step, decimal-leading-zero) "  ";
	color: var(--hm-muted);
}

.wfa-home-steps__text {
	margin: 0 auto;
	max-width: 32ch;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--hm-muted);
}

@media (max-width: 800px) {
	.wfa-home-steps {
		grid-template-columns: minmax(0, 1fr);
		gap: 2.5rem;
	}
}

/* ---------- 4. categories ---------- */

.wfa-home-tiles {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.25rem;
}

@media (max-width: 1000px) {
	.wfa-home-tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 520px) {
	.wfa-home-tiles {
		grid-template-columns: minmax(0, 1fr);
	}
}

.wfa-home--v2 a.wfa-home-tile {
	display: flex;
	flex-direction: column;
	gap: .6rem;
	padding: 1.75rem 1.5rem 1.5rem;
	background: var(--hm-card);
	color: var(--hm-ink);
	text-decoration: none;
	transition: transform .25s ease, box-shadow .25s ease;
}

.wfa-home--v2 a.wfa-home-tile:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 28px -18px rgba(20, 23, 26, .35);
}

.wfa-home-tile__icon {
	display: block;
	margin-bottom: .9rem;
}

.wfa-home-tile__icon .wfa-svc-caticon {
	display: block;
	width: 2.75rem;
	height: 2.75rem;
}

.wfa-home-tile__title {
	font-size: .9375rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.wfa-home-tile__text {
	font-size: .9375rem;
	line-height: 1.55;
	color: var(--hm-muted);
}

.wfa-home-tile__go {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	margin-top: auto;
	padding-top: .6rem;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.wfa-home--v2 a.wfa-home-tile:hover .wfa-home-tile__go {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* ---------- 5. guides ---------- */

.wfa-home-guides {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 800px) {
	.wfa-home-guides {
		grid-template-columns: minmax(0, 1fr);
	}
}

.wfa-home-guides li {
	margin: 0;
}

.wfa-home--v2 .wfa-home-guides a {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	color: var(--hm-ink);
	text-decoration: none;
}

.wfa-home-guides__media {
	display: block;
	aspect-ratio: 16 / 10;
	margin-bottom: .75rem;
	overflow: hidden;
	background: var(--hm-card);
}

.wfa-home-guides__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wfa-home-guides__title {
	font-family: var(--hm-display);
	font-size: 1.375rem;
	line-height: 1.25;
}

.wfa-home--v2 .wfa-home-guides a:hover .wfa-home-guides__title {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.wfa-home-guides__text {
	font-size: .9375rem;
	line-height: 1.55;
	color: var(--hm-muted);
}

/* ---------- 6. employers ---------- */

/* The section above already carries bottom space; do not double it. */
.wfa-home-sec--band {
	padding-top: 0;
}

.wfa-home-band {
	padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
	background: var(--hm-card);
	text-align: center;
}

.wfa-home-band__title {
	max-width: 22ch;
	margin: 0 auto 1rem;
	font-family: var(--hm-display);
	font-size: clamp(1.875rem, 3.6vw, 2.75rem);
	font-weight: 400;
	line-height: 1.12;
	letter-spacing: -.015em;
	text-wrap: balance;
}

.wfa-home-band__text {
	max-width: 38rem;
	margin: 0 auto 2rem;
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--hm-muted);
}

.wfa-home--v2 a.wfa-home-btn,
.wfa-home--v2 a.wfa-home-btn:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3.25rem;
	padding: .9rem 1.75rem;
	border: 1px solid var(--hm-ink);
	background: var(--hm-ink);
	color: var(--hm-paper);
	font-size: .8125rem;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}

.wfa-home--v2 a.wfa-home-btn:hover,
.wfa-home--v2 a.wfa-home-btn:focus-visible {
	background: var(--hm-paper);
	color: var(--hm-ink);
}

.wfa-home--v2 a:focus-visible {
	outline: 2px solid var(--hm-ink);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.wfa-home--v2 a.wfa-home-tile,
	.wfa-home--v2 a.wfa-home-btn,
	.wfa-home--v2 .wfa-home-regions a {
		transition: none;
	}

	.wfa-home--v2 a.wfa-home-tile:hover {
		transform: none;
	}
}
