/*
 * Cato Employment — front-end & editor styles.
 *
 * Replicates the layout of the original SvelteKit single-page app. Class names
 * follow a cato- prefix instead of Tailwind utilities so the theme is easy to
 * maintain without a build step.
 */

:root {
	--color-white: #fff;
	--color-black: #121212;
	--color-alternate: #fbc491;
	--color-primary: #c8202d;
	--color-primary-500: #c8202d;
	--color-primary-600: #b41d29;
	--color-gray: #eeeeee;
	--color-gray-text: #868686;
	--color-border: #e5e7eb;
	/*
	 * Montserrat (via Google Fonts) is the primary typeface. It's a free,
	 * geometric humanist sans in the same family of proportions as Arboria
	 * — close enough to the original Svelte design without the Adobe
	 * Typekit domain-whitelist overhead. Helvetica Neue / Arial are kept
	 * as fallbacks for the brief moment before the webfont downloads.
	 */
	--font-body: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html,
body.cato-page {
	font-family: var(--font-body);
	color: var(--color-black);
	background: var(--color-gray);
	-webkit-font-smoothing: antialiased;
}

body.cato-page {
	margin: 0;
	padding: 0;
}

.cato-main,
.cato-site {
	display: block;
}

/* ------------------------------------------------------------------ */
/* Intro section                                                       */
/* ------------------------------------------------------------------ */

.cato-intro-section {
	background: var(--color-gray);
	color: var(--color-black);
	padding: 1.5rem 0 3rem;
}

@media (min-width: 768px) {
	.cato-intro-section {
		padding: 4rem 0 5rem;
	}
}

.cato-container {
	width: 100%;
	max-width: 1024px;
	margin: 0 auto;
	padding: 0 1.25rem;
	box-sizing: border-box;
}

.cato-logo-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin-bottom: 1.5rem;
	color: var(--color-gray-text);
}

@media (min-width: 1024px) {
	.cato-logo-row {
		margin-bottom: 4rem;
	}
}

.cato-logo-cato {
	width: 100%;
	max-width: 125px;
}

.cato-logo-brands {
	display: flex;
	width: 100%;
	max-width: 150px;
}

.cato-logo-brands > div {
	width: 50%;
	padding: 0 0.5rem;
	box-sizing: border-box;
}

@media (min-width: 768px) {
	.cato-logo-cato {
		max-width: 200px;
	}

	.cato-logo-brands {
		max-width: 200px;
	}
}

@media (min-width: 1024px) {
	.cato-logo-brands {
		max-width: 225px;
	}
}

.cato-logo-cato svg,
.cato-logo-brands svg,
.cato-logo-cato img,
.cato-logo-brands img {
	width: 100%;
	height: auto;
	display: block;
}

/*
 * Typography for the Cato theme in Montserrat.
 *
 * We deliberately don't try to match Arboria pixel-for-pixel — Montserrat
 * has wider glyphs and a larger cap-height, so matching means micro-tuning
 * every size in half-pixel increments for limited benefit. Instead we pick
 * natural Montserrat sizes that read well on their own, and fix any awkward
 * line-breaks with `text-wrap: balance` on headings plus a generous
 * `max-width` on the benefits grid so the longest bullet always fits on a
 * single line.
 */

.cato-heading {
	font-size: 1.875rem;
	line-height: 1.15;
	font-weight: 700;
	max-width: 42rem;
	margin: 0;
	/* Balance the two-line headline so it reads
	 *   "Join the Cato Arby's"
	 *   "and Popeyes Team!"
	 * instead of the greedy
	 *   "Join the Cato Arby's and"
	 *   "Popeyes Team!" */
	text-wrap: balance;
}

@media (min-width: 768px) {
	.cato-heading {
		font-size: 2.5rem;
		line-height: 1.1;
	}
}

@media (min-width: 1024px) {
	.cato-heading {
		font-size: 3rem;
		line-height: 1.1;
	}
}

.cato-intro-para {
	max-width: 42rem;
	margin: 1.25rem 0 1rem;
	font-size: 1rem;
	line-height: 1.5rem;
	opacity: 0.9;
}

@media (min-width: 768px) {
	.cato-intro-para {
		font-size: 1.125rem;
		line-height: 1.75rem;
	}
}

.cato-highlight {
	max-width: 42rem;
	margin: 1.25rem 0 1rem;
	font-size: 1rem;
	line-height: 1.5rem;
	font-weight: 700;
	font-style: italic;
	color: var(--color-primary-500);
}

@media (min-width: 768px) {
	.cato-highlight {
		font-size: 1.125rem;
		line-height: 1.75rem;
	}
}

.cato-why-label {
	max-width: 42rem;
	margin: 1.25rem 0 1rem;
	font-size: 1rem;
	line-height: 1.5rem;
	font-weight: 700;
}

@media (min-width: 768px) {
	.cato-why-label {
		font-size: 1.125rem;
		line-height: 1.75rem;
	}
}

.cato-benefits {
	list-style: disc;
	padding-left: 1.25rem;
	margin: 0;
	/* 56rem (Tailwind max-w-4xl) gives each 2-column cell ~430px so the
	 * longest bullet — "Outstanding career advancement opportunities" —
	 * stays on one line at 1rem Montserrat. Tailwind's max-w-3xl (48rem)
	 * wraps it, which looks visibly broken. */
	max-width: 56rem;
	font-size: 1rem;
	line-height: 1.5;
}

@media (min-width: 768px) {
	.cato-benefits {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 1rem;
	}
}

/* No explicit per-item margin — Tailwind relies on the list's line-height
 * and the grid row-gap above to space rows apart. */
.cato-benefits li {
	margin: 0;
}

.cato-benefits li::marker,
.cato-col-list li::marker {
	color: var(--color-primary-500);
}

/* ------------------------------------------------------------------ */
/* Hero image                                                          */
/* ------------------------------------------------------------------ */

.cato-hero-section {
	background: var(--color-gray);
}

.cato-hero {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

@media (min-width: 768px) {
	.cato-hero {
		aspect-ratio: 2 / 1;
	}
}

@media (min-width: 1024px) {
	.cato-hero {
		aspect-ratio: 21 / 9;
	}
}

.cato-hero img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 25%;
}

/* ------------------------------------------------------------------ */
/* Positions card                                                      */
/* ------------------------------------------------------------------ */

.cato-positions-section {
	background: var(--color-gray);
}

.cato-positions-outer {
	position: relative;
	z-index: 10;
	width: 100%;
	max-width: 1024px;
	margin: -5rem auto 0;
	padding: 0 1rem 5rem;
	box-sizing: border-box;
}

@media (min-width: 640px) {
	.cato-positions-outer {
		padding-left: 1.5rem;
		padding-right: 1.5rem;
	}
}

@media (min-width: 768px) {
	.cato-positions-outer {
		padding-bottom: 8rem;
	}
}

@media (min-width: 1024px) {
	.cato-positions-outer {
		padding-left: 2rem;
		padding-right: 2rem;
	}
}

.cato-positions-card {
	position: relative;
	background: #fff;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	padding: 1.5rem;
}

@media (min-width: 768px) {
	.cato-positions-card {
		padding: 2.5rem;
	}
}

@media (min-width: 1024px) {
	.cato-positions-card {
		padding: 3rem 6rem;
	}
}

.cato-positions-heading {
	font-size: 1.125rem;
	line-height: 1.5;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	color: var(--color-primary-500);
	margin: 0 0 2.5rem;
	text-wrap: balance;
}

@media (min-width: 640px) {
	.cato-positions-heading {
		font-size: 1.75rem;
		line-height: 1.2;
	}
}

@media (min-width: 768px) {
	.cato-positions-heading {
		font-size: 2rem;
		line-height: 1.15;
	}
}

@media (min-width: 1024px) {
	.cato-positions-heading {
		position: absolute;
		font-size: 1.5rem;
		line-height: 1;
		margin: 0;
		left: -0.75rem;
		top: 8rem;
		transform-origin: top left;
		transform: rotate(-90deg) translateX(-100%);
	}
}

@media (min-width: 1280px) {
	.cato-positions-heading {
		left: -1.5rem;
	}
}

/* Inner blocks container inside the positions card. */
.cato-positions-list {
	display: block;
}

.cato-positions-list > .cato-position + .cato-position,
.cato-positions-list > .wp-block-cato-position + .wp-block-cato-position > .cato-position,
.cato-positions-list > .wp-block-cato-position + .wp-block-cato-position {
	border-top: 2px solid var(--color-border);
}

.cato-position {
	padding: 1.5rem 0;
}

.cato-position:first-child,
.cato-positions-list > .wp-block-cato-position:first-child .cato-position {
	padding-top: 0;
}

@media (min-width: 768px) {
	.cato-position {
		padding: 2.5rem 0;
	}
}

.cato-position-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 1.5rem;
	line-height: 1.25;
	font-weight: 400;
	margin: 0 0 0.5rem;
	text-wrap: balance;
}

@media (min-width: 640px) {
	.cato-position-title {
		font-size: 1.75rem;
		line-height: 1.2;
	}
}

@media (min-width: 1024px) {
	.cato-position-title {
		font-size: 2.25rem;
		line-height: 1.15;
	}
}

.cato-position-desc {
	font-size: 1rem;
	line-height: 1.5rem;
	margin: 0.5rem 0 0;
	opacity: 0.8;
}

@media (min-width: 768px) {
	.cato-position-desc {
		font-size: 1.125rem;
		line-height: 1.75rem;
		margin-top: 1.25rem;
	}
}

.cato-duties-cols {
	display: flex;
	flex-direction: column;
}

@media (min-width: 1024px) {
	.cato-duties-cols {
		flex-direction: row;
	}
}

.cato-duties-col {
	width: 100%;
	padding: 0.5rem 0;
	box-sizing: border-box;
}

@media (min-width: 768px) {
	.cato-duties-col {
		padding: 1.25rem 0;
	}
}

@media (min-width: 1024px) {
	.cato-duties-col {
		width: 50%;
	}

	.cato-duties-col.cato-duties-col--duties {
		padding-right: 1rem;
	}

	.cato-duties-col.cato-duties-col--requirements {
		padding-left: 0.5rem;
		padding-right: 0.5rem;
	}
}

.cato-col-title {
	font-size: 1rem;
	line-height: 1.5rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	color: var(--color-primary-500);
	border-bottom: 2px solid var(--color-border);
	padding-bottom: 0.5rem;
	margin: 1.5rem 0 0.5rem;
}

@media (min-width: 768px) {
	.cato-duties-col--requirements .cato-col-title {
		margin-top: 1.5rem;
	}
}

.cato-col-list {
	list-style: disc;
	margin: 0 0 0 1rem;
	padding: 0;
	opacity: 0.8;
	line-height: 1.5;
}

.cato-col-list li {
	margin: 0.25rem 0;
}

/* ------------------------------------------------------------------ */
/* Apply buttons                                                       */
/* ------------------------------------------------------------------ */

.cato-apply-buttons {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	padding: 1.5rem 0;
}

@media (min-width: 768px) {
	.cato-apply-buttons {
		grid-template-columns: 1fr 1fr;
		padding: 2.5rem 0;
	}
}

.cato-apply-button {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	min-width: 230px;
	padding: 0.5rem 1rem;
	padding-top: 0.75rem;
	font-size: 1rem;
	line-height: 1.5rem;
	font-weight: 500;
	color: var(--color-primary-500);
	background: #fff;
	border: 2px solid var(--color-primary-500);
	cursor: pointer;
	transition: all 0.5s ease-in-out;
	text-decoration: none;
	font-family: inherit;
	text-align: center;
}

.cato-apply-button:hover,
.cato-apply-button:focus {
	background: var(--color-primary-500);
	color: #fff;
}

.cato-apply-button-inner {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	justify-content: flex-start;
	width: 100%;
}

.cato-apply-logo {
	background: #fff;
	border-radius: 9999px;
	padding: 0.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 4rem;
	box-sizing: border-box;
	flex-shrink: 0;
}

.cato-apply-logo svg,
.cato-apply-logo img {
	width: 100%;
	height: auto;
	display: block;
}

.cato-apply-arrow {
	width: 1rem;
	height: 1rem;
	margin-left: 0.5rem;
	margin-top: 0.25rem;
	transition: transform 0.3s ease-in-out;
	flex-shrink: 0;
}

.cato-apply-button:hover .cato-apply-arrow,
.cato-apply-button:focus .cato-apply-arrow {
	transform: translateX(0.5rem);
}

/* ------------------------------------------------------------------ */
/* Modal (front-end only)                                              */
/* ------------------------------------------------------------------ */

.cato-modal {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: none;
	align-items: center;
	justify-content: center;
}

.cato-modal.is-open {
	display: flex;
}

.cato-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 5vw 10vw 15vw;
	z-index: 40;
	box-sizing: border-box;
}

@media (min-width: 768px) {
	.cato-modal-overlay {
		padding-left: 20vw;
		padding-right: 20vw;
	}
}

.cato-modal-body {
	background: #fafafa;
	border-radius: 0.375rem;
	padding: 1rem;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	overflow-y: auto;
	max-height: 67vh;
	max-width: 500px;
	width: 90%;
	z-index: 50;
	font-family: var(--font-body);
	box-sizing: border-box;
}

@media (min-width: 768px) {
	.cato-modal-body {
		padding: 2rem;
	}
}

.cato-modal-close-wrapper {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 60;
}

.cato-modal-close {
	background: #fff;
	color: #000;
	font-weight: 700;
	border-radius: 9999px;
	width: 2.25rem;
	height: 2.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 1.5rem;
	border: 0;
	padding: 0;
	line-height: 1;
}

.cato-modal-title {
	text-align: center;
	font-size: 1.5rem;
	font-weight: 400;
	margin: 0 0 1.5rem;
}

@media (min-width: 640px) {
	.cato-modal-title {
		font-size: 1.875rem;
	}
}

@media (min-width: 768px) {
	.cato-modal-title {
		font-size: 1.875rem;
	}
}

@media (min-width: 1024px) {
	.cato-modal-title {
		font-size: 2.25rem;
	}
}

.cato-modal-link {
	display: block;
	background: #fff;
	padding: 0.75rem 1rem;
	margin-bottom: 0.5rem;
	color: #000;
	font-weight: 800;
	text-align: center;
	text-decoration: none;
	border: 1px solid rgba(0, 0, 0, 0.2);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	position: relative;
	transition: box-shadow 0.3s ease-in-out;
}

.cato-modal-link:hover {
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.cato-modal-link::before {
	content: '→';
	position: absolute;
	right: 1rem;
	top: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	transition: transform 0.3s ease-in-out;
}

.cato-modal-link:hover::before {
	transform: translateX(0.25rem);
}
