/*
 * Travel Job Map – front-end styles.
 * Every position/size below is in Figma pixels on a 1920×1080 stage;
 * the whole stage is scaled to fit its container by map.js.
 */
.tjm {
	--tjm-ocean: #99def8;
	--tjm-red: #c94e2f;
	--tjm-brown: #8c351f;
	--tjm-cream: #f4ebd0;
	--tjm-white: #ffffff;
	/* Plugin-only family names, so a theme's own "Lexend" or "Shantell Sans" can never stand in. */
	--tjm-hand: "TJM Shantell Sans", "Shantell Sans", "Comic Sans MS", cursive;
	--tjm-display: "TJM Lexend", "Lexend", "Arial Black", sans-serif;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	font-synthesis: none;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

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

/* ---------- Scaled stage ---------- */
.tjm-viewport {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--tjm-ocean);
}

.tjm-stage {
	position: absolute;
	top: 0;
	left: 0;
	width: 1920px;
	height: 1080px;
	transform-origin: 0 0;
	background: var(--tjm-ocean);
	overflow: hidden;
}

/* Shield the canvas from theme styles (headings, buttons, lists, images). */
.tjm .tjm-stage h2,
.tjm .tjm-stage p,
.tjm .tjm-stage ul,
.tjm .tjm-stage li,
.tjm .tjm-stage button,
.tjm .tjm-stage img,
.tjm .tjm-stage figure,
.tjm .tjm-stage figcaption {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	float: none;
	text-transform: none;
	text-shadow: none;
	text-indent: 0;
	text-align: left;
	text-decoration: none;
	word-spacing: normal;
	hyphens: manual;
	list-style: none;
	box-shadow: none;
	border-radius: 0;
	min-height: 0;
	min-width: 0;
	max-height: none;
	max-width: none;
}

.tjm .tjm-stage button {
	appearance: none;
	-webkit-appearance: none;
	border: 0 !important;
	border-radius: 0 !important;
	min-height: 0 !important;
	text-transform: none !important;
	outline-offset: 4px;
}

.tjm .tjm-stage .tjm-label,
.tjm .tjm-stage .tjm-label:hover,
.tjm .tjm-stage .tjm-label:focus {
	background: var(--tjm-white) !important;
	color: var(--tjm-brown) !important;
	padding: 12px !important;
	font-size: 60px !important;
	line-height: 70px !important;
	height: auto !important;
	width: auto !important;
}

.tjm .tjm-stage .tjm-pin,
.tjm .tjm-stage .tjm-card {
	background: none !important;
	padding: 0 !important;
}

.tjm .tjm-stage .tjm-card:focus-visible {
	outline: 4px solid var(--tjm-red);
}

.tjm-view {
	position: absolute;
	inset: 0;
	opacity: 1;
	transition: opacity 0.25s ease;
}

.tjm-view.is-leaving {
	opacity: 0;
}

/* Absolutely positioned layer. Rotation follows Figma: positive = counter-clockwise. */
.tjm-abs {
	position: absolute;
	transform-origin: 0 0;
	margin: 0;
}

.tjm-img {
	display: block;
	max-width: none;
	pointer-events: none;
	user-select: none;
}

/* ---------- Text styles (from Figma) ----------
 * Typeface, weight and spacing are locked with !important so theme rules
 * (".entry-content h2", "button { font: inherit }", global styles…) can't replace them.
 * Sizes stay overridable because map.js shrinks over-long text inline. */
.tjm .tjm-stage .tjm-hand {
	font-family: var(--tjm-hand) !important;
	font-weight: 700 !important;
	font-style: normal !important;
	letter-spacing: -0.03em !important;
	text-transform: none !important;
	font-variation-settings: "BNCE" 0, "INFM" 0, "SPAC" 0 !important;
	font-feature-settings: normal !important;
	color: var(--tjm-brown);
	word-break: break-word;
}

.tjm .tjm-stage .tjm-display {
	font-family: var(--tjm-display) !important;
	font-weight: 900 !important;
	font-style: normal !important;
	letter-spacing: -0.03em !important;
	text-transform: none !important;
	font-feature-settings: normal !important;
	line-height: normal !important;
	color: var(--tjm-red);
}

/* Read by screen readers, not shown. */
.tjm .tjm-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ---------- "A World of Opportunities" title on the world map: the page-title font, a size down ---------- */
.tjm .tjm-stage .tjm-world-title {
	color: var(--tjm-red) !important;
	font-size: 96px !important;
	line-height: 1.15 !important;
	white-space: nowrap !important;
}

/* A new page gets keyboard focus so screen readers start there; it isn't clickable, so no focus ring. */
.tjm .tjm-stage .tjm-view:focus,
.tjm .tjm-stage .tjm-view h2:focus {
	outline: none;
}

/* Interests sit on the notebook's lines; the list wrapper only adds meaning for screen readers. */
.tjm-interest-list {
	position: absolute;
	inset: 0;
}

/* ---------- Map labels (white card, 12px padding, Shantell 60/70) ---------- */
.tjm .tjm-stage .tjm-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	background: var(--tjm-white);
	font-size: 60px !important;
	line-height: 70px !important;
	white-space: nowrap !important;
	border: 0;
	text-decoration: none;
	cursor: pointer;
}

.tjm-pin {
	display: block;
	width: 100px;
	height: 100px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.tjm-pin--static {
	cursor: default;
}

.tjm-pin img {
	width: 100%;
	height: 100%;
}

/* ---------- Hover / focus highlight (shared look) ---------- */
.tjm-hit,
.tjm-group,
.tjm-label,
.tjm-pin,
.tjm-region {
	transition: translate 0.18s ease, filter 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.tjm-hit:focus {
	outline: none;
}

/* Labels: white card turns red with white text and lifts. */
.tjm .tjm-stage .tjm-label.is-hot {
	background: var(--tjm-red) !important;
	color: var(--tjm-white) !important;
	translate: 0 -6px;
	box-shadow: 0 10px 22px rgba(140, 53, 31, 0.35) !important;
}

/* Pins lift with a shadow. */
.tjm-pin.is-hot {
	translate: 0 -10px;
	filter: drop-shadow(0 10px 6px rgba(140, 53, 31, 0.45));
}

/* Continents on the world map glow white. */
.tjm-svgmap {
	pointer-events: none;
}

.tjm-svgmap svg {
	display: block;
	overflow: visible;
}

.tjm-region {
	pointer-events: auto;
	cursor: pointer;
}

.tjm-region.is-hot {
	filter: url(#tjm-glow);
}

/* Polaroid groups lift off the map; their caption turns red. */
.tjm-group {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.tjm-group .tjm-card {
	pointer-events: auto;
	z-index: 3;
}

.tjm-group.is-hot {
	z-index: 10 !important; /* above the other polaroids (1–5) and the pin (6), below the buttons (20) */
	translate: 0 -12px;
	filter: drop-shadow(0 18px 16px rgba(60, 30, 20, 0.28));
}

.tjm .tjm-stage .tjm-group.is-hot .tjm-caption {
	color: var(--tjm-red);
}

/* Album test: polaroids behind the featured one fan out when it's hovered. */
.tjm-stack {
	position: absolute;
	inset: 0;
	pointer-events: none;
	transition: translate 0.25s ease, rotate 0.25s ease;
}

.tjm-group.is-hot .tjm-stack {
	translate: var(--fan-x) var(--fan-y);
	rotate: var(--fan-r);
}

.tjm-stack .tjm-polaroid {
	box-shadow: 0 3px 10px rgba(60, 30, 20, 0.24);
}

/* ---------- Full screen: the whole map as large as the screen allows, on black like a video ---------- */
.tjm:fullscreen {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: #000;
}

.tjm:fullscreen .tjm-viewport {
	width: min(100vw, calc(100vh * 16 / 9));
}

.tjm:-webkit-full-screen {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: #000;
}

.tjm:-webkit-full-screen .tjm-viewport {
	width: min(100vw, calc(100vh * 16 / 9));
}

/* ---------- On-canvas Home / Back / Full screen buttons ---------- */
.tjm-hud {
	position: absolute;
	inset: 0;
	z-index: 20;
	pointer-events: none;
}

.tjm-hud[hidden] {
	display: none;
}

.tjm .tjm-stage .tjm-navbtn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px !important; /* 10% under the original 64px, so they don't compete with the title */
	height: 58px !important;
	padding: 0 !important;
	background: var(--tjm-white) !important;
	color: var(--tjm-brown) !important;
	cursor: pointer;
	pointer-events: auto;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}

.tjm .tjm-stage .tjm-navbtn.is-hot {
	background: var(--tjm-red) !important;
	color: var(--tjm-white) !important;
	translate: 0 -4px;
	box-shadow: 0 10px 22px rgba(140, 53, 31, 0.35) !important;
}

/* ---------- Enlarged photo (lightbox) ---------- */
.tjm .tjm-stage .tjm-zoom {
	cursor: zoom-in;
}

.tjm .tjm-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4vmin;
	box-sizing: border-box;
	background: rgba(24, 14, 10, 0.86);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.tjm .tjm-lightbox[hidden] {
	display: none !important;
}

.tjm .tjm-lightbox.is-open {
	opacity: 1;
}

.tjm .tjm-lightbox-figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 100%;
	margin: 0;
	padding: clamp(10px, 1.8vmin, 22px) clamp(10px, 1.8vmin, 22px) 0;
	background: var(--tjm-white);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
	rotate: -1deg;
}

.tjm .tjm-lightbox-img {
	display: block;
	width: auto;
	height: auto;
	max-width: calc(92vw - 120px);
	max-height: 72vh;
	margin: 0;
	border: 0;
}

.tjm .tjm-lightbox.is-portrait .tjm-lightbox-img {
	background: var(--tjm-cream);
	max-height: 64vh;
}

.tjm .tjm-lightbox-caption {
	min-height: 1.3em;
	margin: 0;
	padding: 0.35em 0.5em 0.55em;
	font-family: var(--tjm-hand);
	font-weight: 700;
	font-size: clamp(20px, 3.6vmin, 44px);
	line-height: 1.25;
	letter-spacing: -0.03em;
	color: var(--tjm-brown);
	text-align: center;
}

.tjm .tjm-lightbox-count {
	position: absolute;
	bottom: 2vmin;
	left: 50%;
	translate: -50% 0;
	margin: 0;
	font-family: var(--tjm-hand);
	font-weight: 700;
	font-size: 20px;
	color: var(--tjm-white);
}

.tjm .tjm-lightbox .tjm-lightbox-btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--tjm-white);
	color: var(--tjm-brown);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	appearance: none;
}

.tjm .tjm-lightbox .tjm-lightbox-btn[hidden] {
	display: none;
}

.tjm .tjm-lightbox .tjm-lightbox-btn:hover,
.tjm .tjm-lightbox .tjm-lightbox-btn:focus-visible {
	background: var(--tjm-red);
	color: var(--tjm-white);
	outline: 3px solid var(--tjm-white);
	outline-offset: 3px;
}

.tjm .tjm-lightbox-btn svg {
	display: block;
	width: 34px;
	height: 34px;
	pointer-events: none;
}

.tjm .tjm-lightbox-close {
	top: max(16px, 2vmin);
	right: max(16px, 2vmin);
}

.tjm .tjm-lightbox-prev,
.tjm .tjm-lightbox-next {
	top: 50%;
	translate: 0 -50%;
}

.tjm .tjm-lightbox-prev {
	left: max(16px, 2vmin);
}

.tjm .tjm-lightbox-next {
	right: max(16px, 2vmin);
}

@media (prefers-reduced-motion: reduce) {
	.tjm .tjm-lightbox {
		transition: none;
	}
}

/* ---------- Welcome card: a notebook page over the dimmed world map ---------- */
.tjm .tjm-stage .tjm-welcome {
	position: absolute;
	inset: 0;
	z-index: 30;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(36, 20, 14, 0.55);
}

.tjm .tjm-stage .tjm-welcome-page {
	position: relative;
	width: 1000px;
	padding: 70px 80px 64px 150px;
	rotate: 1.2deg;
	background-color: var(--tjm-white);
	/* red margin line + blue rules, as on the persona notebook */
	background-image: linear-gradient(90deg, transparent 108px, #c94e2f 108px, #c94e2f 110px, transparent 110px),
		repeating-linear-gradient(var(--tjm-white) 0 68px, #99def8 68px 70px);
	box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.tjm .tjm-stage .tjm-welcome-tape {
	position: absolute;
	top: -30px;
	left: 46%;
}

.tjm .tjm-stage .tjm-welcome-title {
	color: var(--tjm-red) !important;
	font-size: 92px !important;
	line-height: 1.05 !important;
}

.tjm .tjm-stage .tjm-welcome-text {
	margin-top: 22px !important;
	color: var(--tjm-brown) !important;
	font-size: 44px !important;
	line-height: 70px !important;
}

.tjm .tjm-stage .tjm-welcome-go {
	display: inline-flex !important;
	align-items: center;
	gap: 16px;
	margin-top: 40px !important;
	padding: 20px 40px !important;
	background: var(--tjm-red) !important;
	color: var(--tjm-white) !important;
	font-family: var(--tjm-display) !important;
	font-weight: 900 !important;
	font-size: 40px !important;
	line-height: 1 !important;
	cursor: pointer;
	box-shadow: 0 8px 18px rgba(140, 53, 31, 0.35) !important;
	transition: translate 0.18s ease, box-shadow 0.18s ease;
}

.tjm .tjm-stage .tjm-welcome-go svg {
	width: 44px;
	height: 44px;
}

.tjm .tjm-stage .tjm-welcome-go:hover,
.tjm .tjm-stage .tjm-welcome-go:focus-visible {
	translate: 0 -4px;
	box-shadow: 0 14px 26px rgba(140, 53, 31, 0.45) !important;
	outline: 4px solid var(--tjm-brown);
	outline-offset: 4px;
}

.tjm .tjm-stage .tjm-welcome-stay {
	display: block !important;
	margin-top: 22px !important;
	color: var(--tjm-brown) !important;
	font-size: 30px !important;
	text-decoration: underline !important;
	text-underline-offset: 6px;
	cursor: pointer;
}

.tjm .tjm-stage .tjm-welcome-stay:hover,
.tjm .tjm-stage .tjm-welcome-stay:focus-visible {
	color: var(--tjm-red) !important;
	outline: none;
}

/* The map's own title would repeat the card's. */
.tjm .tjm-stage.has-welcome .tjm-world-title {
	visibility: hidden;
}

/* After "or explore here": the full-screen button pulses a few times. */
.tjm .tjm-stage .tjm-navbtn.tjm-nudge {
	animation: tjm-nudge 1.3s ease-in-out 3;
}

@keyframes tjm-nudge {
	0%, 100% { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), 0 0 0 0 rgba(201, 78, 47, 0.55); }
	50% { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), 0 0 0 18px rgba(201, 78, 47, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.tjm .tjm-stage .tjm-navbtn.tjm-nudge {
		animation: none;
		outline: 4px solid var(--tjm-red);
	}

	.tjm .tjm-stage .tjm-welcome-go {
		transition: none;
	}
}

.tjm .tjm-stage .tjm-navbtn[hidden] {
	display: none !important;
}

.tjm-navbtn svg {
	display: block;
	width: 36px;
	height: 36px;
	pointer-events: none;
}

/* ---------- Polaroids ---------- */
.tjm-polaroid {
	background: var(--tjm-white);
	/* light shadow, so overlapping white polaroids stay separate */
	box-shadow: 0 2px 8px rgba(60, 30, 20, 0.16);
}

.tjm-photo {
	background: var(--tjm-cream);
	overflow: hidden;
}

.tjm-photo img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.tjm-portrait img {
	object-fit: contain;
}

.tjm-card {
	display: block;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	text-align: left;
}

/* ---------- Location view ---------- */
.tjm .tjm-stage .tjm-loc-title {
	font-size: 130px !important;
	white-space: nowrap !important;
}

.tjm .tjm-stage .tjm-loc-features {
	font-size: 50px !important;
	line-height: 60px !important;
	white-space: nowrap !important;
}

.tjm .tjm-stage .tjm-featured-name {
	font-size: 50px !important;
	line-height: normal !important;
	white-space: nowrap !important;
}

.tjm .tjm-stage .tjm-role {
	font-size: 45px !important; /* one size for every persona title; fits all current titles on two lines */
	line-height: 52px !important;
}

/* ---------- Persona view ---------- */
.tjm .tjm-stage .tjm-job-title {
	width: 561px !important;
	font-size: 130px !important;
}


.tjm .tjm-stage .tjm-description {
	width: 903px !important;
	font-size: 60px !important;
	line-height: 70px !important;
}

.tjm .tjm-stage .tjm-if-you-like {
	width: 611px !important;
	font-size: 100px !important;
}

.tjm-notebook {
	background: var(--tjm-white);
}

.tjm-notebook svg {
	display: block;
}

.tjm .tjm-stage .tjm-interest {
	font-size: 75px !important;
	line-height: 75px !important;
	white-space: nowrap !important;
}

.tjm-checkbox {
	border: 8px solid var(--tjm-brown);
	border-radius: 8px;
}

.tjm .tjm-stage .tjm-then {
	width: 686px !important;
	font-size: 60px !important;
	line-height: 72px !important;
	color: var(--tjm-red);
}

/* ---------- Featured-site gallery ---------- */
.tjm .tjm-stage .tjm-site-title {
	width: 860px !important;
	font-size: 100px !important;
	text-wrap: balance;
}

.tjm .tjm-stage .tjm-site-caption {
	font-size: 46px !important;
	line-height: 51px !important;
}

/* Pin hover: darker red version fades in over the normal pin. */
.tjm-pin {
	position: absolute;
}

.tjm-pin .tjm-pin-hot {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.18s ease;
}

.tjm-pin.is-hot .tjm-pin-hot {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.tjm-view,
	.tjm-hit,
	.tjm-group,
	.tjm-label,
	.tjm-pin,
	.tjm-region,
	.tjm-stack {
		transition: none;
	}
}
