/* ==========================================================================
   JOYGAMES INTERACTIVE
   Also loaded in the block editor, where WordPress scopes it to the canvas.
   ========================================================================== */

/* Tokens ------------------------------------------------------------------ */

:root {
	--c-navy: #0e1a2b;
	--c-navy-deep: #0b1424;
	--c-navy-raised: #15253b;
	--c-paper: #faf7f2;
	--c-sand: #f3eee6;
	--c-white: #fff;
	--c-line: #e2dacd;
	--c-line-strong: #cfc5b4;
	--c-ink: #0e1a2b;
	--c-text: #1d2838;
	--c-muted: #4a5568;
	--c-on-dark: #f3eee6;
	--c-on-dark-muted: #a6b0c2;
	--c-accent: #e9773e;
	--c-accent-hover: #f08a55;
	--c-accent-ink: #a8461a;
	--c-accent-soft: #f2a06a;
	--c-accent-tint: #fbe6d9;
	--c-error: #b42318;

	--font-sans: var(--wp--preset--font-family--sans, "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	--font-mono: var(--wp--preset--font-family--mono, "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);

	--fs-display: clamp(2.25rem, 1.2rem + 2.8vw, 3.5rem);
	--fs-h1: clamp(2.25rem, 1.7rem + 2.2vw, 3.375rem);
	--fs-h2: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
	--fs-h3: clamp(1.125rem, 1.06rem + 0.25vw, 1.25rem);
	--fs-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
	--fs-body: 1.0625rem;
	--fs-small: 0.9375rem;
	--fs-mono: 0.75rem;

	--container: 1200px;
	--measure: 760px;
	--gutter: clamp(1rem, 4vw, 2.5rem);
	--space-section: clamp(4rem, 8vw, 7.5rem);
	--radius: 14px;
	--radius-sm: 10px;
	--header-h: 72px;
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);

	--dots-light: radial-gradient(circle at 1px 1px, rgba(14, 26, 43, 0.12) 1px, transparent 1.5px);
	--dots-dark: radial-gradient(circle at 1px 1px, rgba(243, 238, 230, 0.09) 1px, transparent 1.5px);
}

/* Base -------------------------------------------------------------------- */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
	margin: 0;
	background: var(--c-paper);
	color: var(--c-text);
	font-family: var(--font-sans);
	font-size: var(--fs-body);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

img,
video {
	max-width: 100%;
	height: auto;
}

h1,
h2,
h3,
h4 {
	margin: 0;
	color: var(--c-ink);
	font-family: var(--font-sans);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.022em;
	text-wrap: balance;
}

p {
	margin: 0;
	text-wrap: pretty;
}

a {
	color: var(--c-accent-ink);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 2px solid var(--c-accent-ink);
	outline-offset: 3px;
	border-radius: 3px;
}

::selection {
	background: var(--c-accent-tint);
	color: var(--c-ink);
}

p:empty {
	display: none;
}

.site-main:focus {
	outline: none;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 1rem;
	z-index: 100;
	padding: 0.75rem 1rem;
	border-radius: var(--radius-sm);
	background: var(--c-navy);
	color: var(--c-paper);
	font-weight: 600;
	text-decoration: none;
}

.skip-link:focus {
	top: 1rem;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
	word-wrap: normal !important;
}

/* Buttons ----------------------------------------------------------------- */

.wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.jg-button,
.wp-block-button .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6em;
	min-height: 48px;
	padding: 0.75rem 1.35rem;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	background: var(--c-accent);
	color: var(--c-navy-deep);
	font-family: var(--font-sans);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.005em;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.jg-button:hover,
.wp-block-button .wp-block-button__link:hover {
	background: var(--c-accent-hover);
	color: var(--c-navy-deep);
	transform: translateY(-1px);
}

.jg-button:active,
.wp-block-button .wp-block-button__link:active {
	transform: none;
}

.wp-block-button.jg-button-secondary .wp-block-button__link {
	border-color: var(--c-line-strong);
	background: transparent;
	color: var(--c-ink);
}

.wp-block-button.jg-button-secondary .wp-block-button__link:hover {
	border-color: var(--c-ink);
	background: transparent;
}

.jg-section--dark .wp-block-button.jg-button-secondary .wp-block-button__link {
	border-color: rgba(243, 238, 230, 0.3);
	color: var(--c-on-dark);
}

.jg-section--dark .wp-block-button.jg-button-secondary .wp-block-button__link:hover {
	border-color: var(--c-on-dark);
}

.jg-button--small {
	min-height: 42px;
	padding: 0.55rem 1rem;
	font-size: 0.9375rem;
}

.jg-button[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.jg-button[aria-busy="true"] {
	cursor: progress;
	opacity: 0.8;
}

.jg-arrow {
	flex: none;
	width: 16px;
	height: 16px;
	transition: transform 0.2s var(--ease);
}

a:hover > .jg-arrow,
.jg-button:hover .jg-arrow {
	transform: translateX(2px);
}

/* Wordmark ---------------------------------------------------------------- */

.wordmark {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	color: var(--c-ink);
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.wordmark__mark {
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	transition: transform 0.35s var(--ease);
}

.wordmark:hover .wordmark__mark {
	transform: rotate(-6deg);
}

.wordmark__text {
	display: flex;
	flex-direction: column;
	gap: 0.32rem;
}

.wordmark__name {
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.wordmark__sub {
	color: var(--c-muted);
	font-family: var(--font-mono);
	font-size: 0.64rem;
	font-weight: 500;
	letter-spacing: 0.25em;
}

.wordmark--footer {
	color: var(--c-on-dark);
}

/* The mark's navy tile needs an edge on dark backgrounds. */
.wordmark--footer .wordmark__mark {
	box-shadow: 0 0 0 1px rgba(243, 238, 230, 0.18);
}

.wordmark--footer .wordmark__sub {
	color: var(--c-on-dark-muted);
}

/* Header and navigation --------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid transparent;
	background: var(--c-paper);
	background: color-mix(in srgb, var(--c-paper) 94%, transparent);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	backdrop-filter: saturate(1.4) blur(10px);
	transition: border-color 0.2s var(--ease);
}

.site-header.is-scrolled,
.site-header.is-open {
	border-bottom-color: var(--c-line);
}

.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.admin-bar .site-header {
		top: 0;
	}
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	max-width: calc(var(--container) + 2 * var(--gutter));
	height: var(--header-h);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 2rem;
}

.site-nav__list {
	display: flex;
	gap: 1.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__list a {
	position: relative;
	display: block;
	padding: 0.5rem 0;
	color: var(--c-ink);
	font-size: 0.98rem;
	font-weight: 500;
	text-decoration: none;
}

.site-nav__list a::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0.2rem;
	left: 0;
	height: 2px;
	background: var(--c-accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s var(--ease);
}

.site-nav__list a:hover::after,
.site-nav__list a[aria-current="page"]::after {
	transform: scaleX(1);
}

.nav-toggle {
	display: none;
	align-items: center;
	gap: 0.6rem;
	min-height: 44px;
	margin-right: -0.75rem;
	padding: 0.5rem 0.75rem;
	border: 0;
	border-radius: 8px;
	background: none;
	color: var(--c-ink);
	font: 600 0.95rem/1 var(--font-sans);
	cursor: pointer;
}

.nav-toggle__icon {
	position: relative;
	width: 18px;
	height: 12px;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after,
.nav-toggle__icon span {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle__icon::before {
	top: 0;
}

.nav-toggle__icon span {
	top: 5px;
}

.nav-toggle__icon::after {
	top: 10px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before {
	transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon span {
	opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after {
	transform: translateY(-5px) rotate(-45deg);
}

@media (max-width: 879.98px) {
	/* Without JavaScript the menu stays visible and wraps under the wordmark. */
	html:not(.js) .site-header__inner {
		flex-wrap: wrap;
		height: auto;
		padding-block: 1rem;
	}

	html:not(.js) .site-nav {
		flex-wrap: wrap;
		width: 100%;
		gap: 1rem 1.5rem;
	}

	.js .nav-toggle {
		display: inline-flex;
	}

	.js .site-nav {
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 1.5rem;
		max-height: calc(100vh - var(--header-h));
		overflow-y: auto;
		padding: 0.5rem var(--gutter) 2rem;
		border-bottom: 1px solid var(--c-line);
		background: var(--c-paper);
		box-shadow: 0 24px 48px -28px rgba(14, 26, 43, 0.35);
	}

	.js .site-header.is-open .site-nav {
		display: flex;
		animation: jg-drop 0.22s var(--ease);
	}

	.js .site-nav__list {
		flex-direction: column;
		gap: 0;
	}

	.js .site-nav__list a {
		padding: 1rem 0;
		border-bottom: 1px solid var(--c-line);
		font-size: 1.25rem;
	}

	.js .site-nav__list a::after {
		display: none;
	}

	.js .site-nav__list a[aria-current="page"] {
		color: var(--c-accent-ink);
	}

	.js .site-nav__cta {
		width: 100%;
	}
}

@keyframes jg-drop {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
	background: var(--c-navy-deep);
	color: var(--c-on-dark-muted);
	font-size: var(--fs-small);
}

.site-footer a {
	color: var(--c-on-dark);
	text-decoration: none;
}

.site-footer a:hover {
	text-decoration: underline;
}

.site-footer :focus-visible {
	outline-color: var(--c-accent-soft);
}

.site-footer__inner {
	display: grid;
	gap: 2.5rem;
	max-width: calc(var(--container) + 2 * var(--gutter));
	margin: 0 auto;
	padding: clamp(3.5rem, 6vw, 5rem) var(--gutter) 3rem;
}

@media (min-width: 640px) {
	.site-footer__inner {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.site-footer__brand {
		grid-column: 1 / -1;
	}
}

@media (min-width: 1024px) {
	.site-footer__inner {
		grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
	}

	.site-footer__brand {
		grid-column: auto;
	}
}

.site-footer__brand p {
	max-width: 34ch;
	margin-top: 1rem;
}

.site-footer__cta a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--c-accent-soft);
	font-weight: 600;
}

.site-footer__title {
	margin-bottom: 1rem;
	color: var(--c-on-dark-muted);
	font-family: var(--font-mono);
	font-size: var(--fs-mono);
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.site-footer__list,
.site-footer__legal-list {
	display: grid;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__base {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
	max-width: calc(var(--container) + 2 * var(--gutter));
	margin: 0 auto;
	padding: 1.5rem var(--gutter) 2rem;
	border-top: 1px solid rgba(243, 238, 230, 0.1);
	font-size: 0.875rem;
}

.site-footer__address {
	display: inline-block;
	margin-left: 0.35em;
}

.site-footer__legal-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
}

/* Sections ---------------------------------------------------------------- */

.jg-section {
	position: relative;
	padding-block: var(--space-section);
	padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2));
	background: var(--c-paper);
}

.jg-section > * + * {
	margin-top: clamp(2.5rem, 4vw, 3.5rem);
}

.jg-section--sand {
	background: var(--c-sand);
}

.jg-section--rule {
	border-top: 1px solid var(--c-line);
}

.jg-section--dark {
	background: var(--c-navy);
	color: var(--c-on-dark-muted);
}

.jg-section--dark h1,
.jg-section--dark h2,
.jg-section--dark h3 {
	color: var(--c-on-dark);
}

.jg-section--dark a:not(.wp-block-button__link) {
	color: var(--c-accent-soft);
}

.jg-section--dark :focus-visible {
	outline-color: var(--c-accent-soft);
}

.jg-section--band {
	padding-block: 1.25rem;
	border-block: 1px solid var(--c-line);
}

.jg-eyebrow {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 1.1rem;
	color: var(--c-accent-ink);
	font-family: var(--font-mono);
	font-size: var(--fs-mono);
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.jg-eyebrow::before {
	content: "";
	flex: none;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 1.5px;
	background: var(--c-accent);
}

.jg-section--dark .jg-eyebrow {
	color: var(--c-accent-soft);
}

.jg-lead {
	max-width: 40em;
	margin-top: 1.25rem;
	color: var(--c-muted);
	font-size: var(--fs-lead);
	line-height: 1.55;
}

.jg-section--dark .jg-lead {
	color: var(--c-on-dark-muted);
}

.jg-section-head {
	max-width: 46rem;
}

.jg-section-head h2 {
	font-size: var(--fs-h2);
}

.jg-more a {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-weight: 600;
	text-decoration: none;
}

.jg-more a::after {
	content: "→";
	transition: transform 0.2s var(--ease);
}

.jg-more a:hover::after {
	transform: translateX(3px);
}

/* Hero */

.jg-hero {
	display: grid;
	align-items: center;
	gap: clamp(2.5rem, 5vw, 4rem);
	padding-block: clamp(3.5rem, 7vw, 6.5rem) clamp(4rem, 8vw, 7rem);
	overflow: hidden;
}

.jg-hero > * + * {
	margin-top: 0;
}

.jg-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--dots-light);
	background-size: 24px 24px;
	-webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
	mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
	pointer-events: none;
}

.jg-hero.jg-section--dark::before {
	background-image: var(--dots-dark);
}

.jg-hero > * {
	position: relative;
}

@media (min-width: 960px) {
	.jg-hero:has(> .jg-illustration) {
		grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
	}
}

.jg-hero h1 {
	font-size: var(--fs-display);
	line-height: 1.04;
	letter-spacing: -0.032em;
}

.jg-hero--page h1 {
	font-size: var(--fs-h1);
}

.jg-hero .jg-lead {
	max-width: 36em;
	margin-top: 1.5rem;
}

.jg-hero .jg-actions {
	margin-top: 2.25rem;
}

.jg-hero .jg-illustration {
	justify-self: center;
	width: 100%;
	max-width: 600px;
}

.jg-hero--page {
	border-bottom: 1px solid var(--c-line);
}

.jg-hero--compact {
	padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.jg-hero--compact .jg-hero__content {
	max-width: 52rem;
}

/* Split: heading column + text column */

.jg-split {
	display: grid;
	gap: 1.5rem 4rem;
}

.jg-split > * + * {
	margin-top: 0;
}

@media (min-width: 900px) {
	.jg-split {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	}
}

.jg-split__head h2 {
	font-size: var(--fs-h2);
}

.jg-split__body {
	max-width: 44rem;
}

.jg-split__body > * + * {
	margin-top: 1.25rem;
}

.jg-split__body .jg-lead {
	margin-top: 0;
	color: var(--c-ink);
}

@media (min-width: 900px) {
	.jg-split__body {
		padding-top: 2.1rem;
	}
}

/* Service cards */

.jg-cards {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
}

@media (min-width: 640px) {
	.jg-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1080px) {
	.jg-cards {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.jg-card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 1.5rem 1.5rem 1.75rem;
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
	background: var(--c-paper);
	transition: border-color 0.2s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.jg-card::before {
	content: "";
	display: block;
	width: 44px;
	height: 44px;
	margin-bottom: 1.5rem;
	border-radius: 10px;
	background: var(--c-sand) var(--icon, none) center / 22px 22px no-repeat;
}

.jg-card:hover {
	border-color: var(--c-line-strong);
	box-shadow: 0 18px 40px -28px rgba(14, 26, 43, 0.4);
	transform: translateY(-2px);
}

.jg-card:focus-within {
	outline: 2px solid var(--c-accent-ink);
	outline-offset: 3px;
}

.jg-card h3 {
	font-size: 1.15rem;
	letter-spacing: -0.012em;
}

.jg-card h3 a {
	color: var(--c-ink);
	text-decoration: none;
}

.jg-card h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.jg-card h3 a:focus-visible {
	outline: none;
}

.jg-card p {
	margin-top: 0.6rem;
	color: var(--c-muted);
	font-size: var(--fs-small);
}

.jg-card--invite {
	border-color: var(--c-navy);
	background: var(--c-navy);
}

.jg-card--invite::before {
	background-color: var(--c-navy-raised);
}

.jg-card--invite h3 a {
	color: var(--c-on-dark);
}

.jg-card--invite p {
	color: var(--c-on-dark-muted);
}

.jg-card--invite:hover {
	border-color: var(--c-navy);
}

.jg-icon-code { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A8461A' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.5 7 3.5 12l5 5M15.5 7l5 5-5 5M13.5 4.5l-3 15'/%3E%3C/svg%3E"); }
.jg-icon-compass { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A8461A' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='m15.5 8.5-2.2 4.8-4.8 2.2 2.2-4.8z'/%3E%3C/svg%3E"); }
.jg-icon-game { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A8461A' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='7' width='19' height='10.5' rx='5.25'/%3E%3Cpath d='M7.5 10.25v4M5.5 12.25h4'/%3E%3Ccircle cx='15.5' cy='11' r='1' fill='%23A8461A' stroke='none'/%3E%3Ccircle cx='17.75' cy='13.5' r='1' fill='%23A8461A' stroke='none'/%3E%3C/svg%3E"); }
.jg-icon-bug { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A8461A' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7.5' y='7.5' width='9' height='12' rx='4.5'/%3E%3Cpath d='M12 11v8.5M7.5 12H4M20 12h-3.5M7.5 16.5h-3M19.5 16.5h-3M9 7.5 7.5 5M15 7.5 16.5 5'/%3E%3C/svg%3E"); }
.jg-icon-gauge { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A8461A' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 16.5a8 8 0 1 1 16 0'/%3E%3Cpath d='m12 16.5 3.5-5M4 19.5h16'/%3E%3C/svg%3E"); }
.jg-icon-nodes { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A8461A' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='6.5' r='2.5'/%3E%3Ccircle cx='18' cy='6.5' r='2.5'/%3E%3Ccircle cx='12' cy='17.5' r='2.5'/%3E%3Cpath d='M8.5 6.5h7M7.2 8.7l3.6 6.6M16.8 8.7l-3.6 6.6'/%3E%3C/svg%3E"); }
.jg-icon-layers { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A8461A' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3.5 8.5 4.5-8.5 4.5L3.5 8z'/%3E%3Cpath d='m3.5 12.5 8.5 4.5 8.5-4.5M3.5 16.5 12 21l8.5-4.5'/%3E%3C/svg%3E"); }
.jg-icon-chat { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F2A06A' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 5.5h15v10h-9l-4.5 3.5v-3.5h-1.5z'/%3E%3Cpath d='M8.5 10.5h7'/%3E%3C/svg%3E"); }

/* Project type tiles and principles */

.jg-tiles,
.jg-principles {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1px;
	overflow: hidden;
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
	background: var(--c-line);
	counter-reset: tile;
}

@media (min-width: 720px) {
	.jg-tiles,
	.jg-principles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1080px) {
	.jg-tiles {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.jg-tile,
.jg-principle {
	padding: clamp(1.5rem, 3vw, 2rem);
	background: var(--c-paper);
	counter-increment: tile;
}

.jg-section--sand .jg-principle {
	background: var(--c-paper);
}

.jg-tile::before,
.jg-principle::before {
	content: counter(tile, decimal-leading-zero);
	display: block;
	margin-bottom: 1.25rem;
	color: var(--c-accent-ink);
	font-family: var(--font-mono);
	font-size: var(--fs-mono);
	font-weight: 500;
	letter-spacing: 0.1em;
}

.jg-tile h3,
.jg-principle h3 {
	font-size: var(--fs-h3);
}

.jg-tile p,
.jg-principle p {
	margin-top: 0.6rem;
	color: var(--c-muted);
	font-size: var(--fs-small);
}

.jg-principle p {
	max-width: 46ch;
}

/* Working process */

.jg-steps {
	display: grid;
	gap: 2.25rem;
	counter-reset: step;
}

.jg-step {
	position: relative;
	padding-left: 3.5rem;
	counter-increment: step;
}

.jg-step::before {
	content: counter(step, decimal-leading-zero);
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid rgba(243, 238, 230, 0.24);
	border-radius: 8px;
	background: var(--c-navy);
	color: var(--c-accent-soft);
	font-family: var(--font-mono);
	font-size: 0.78rem;
	font-weight: 500;
}

.jg-step::after {
	content: "";
	position: absolute;
	top: 2.25rem;
	bottom: -2.25rem;
	left: 1.125rem;
	width: 1px;
	background: repeating-linear-gradient(180deg, rgba(243, 238, 230, 0.3) 0 5px, transparent 5px 10px);
	transform-origin: top;
}

.jg-step:last-child::after {
	display: none;
}

.jg-step h3 {
	padding-top: 0.35rem;
	font-size: var(--fs-h3);
}

.jg-step p {
	margin-top: 0.6rem;
	color: var(--c-on-dark-muted);
	font-size: var(--fs-small);
}

@media (min-width: 900px) {
	.jg-steps {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 2rem;
	}

	.jg-step {
		padding-top: 3.5rem;
		padding-left: 0;
	}

	.jg-step::after {
		top: 1.125rem;
		right: -2rem;
		bottom: auto;
		left: 2.25rem;
		width: auto;
		height: 1px;
		background: repeating-linear-gradient(90deg, rgba(243, 238, 230, 0.3) 0 5px, transparent 5px 10px);
		transform-origin: left;
	}

	.jg-step h3 {
		padding-top: 0;
	}
}

/* Services page */

.jg-section--band .jg-jumpnav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.5rem;
}

.jg-jumpnav .jg-eyebrow {
	margin: 0;
}

.jg-jumpnav > * + * {
	margin-top: 0;
}

.jg-jumplist {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.jg-jumplist a {
	display: inline-block;
	padding: 0.45rem 0.85rem;
	border: 1px solid var(--c-line);
	border-radius: 999px;
	background: var(--c-white);
	color: var(--c-ink);
	font-size: 0.9rem;
	text-decoration: none;
	transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.jg-jumplist a:hover {
	border-color: var(--c-accent);
	color: var(--c-accent-ink);
}

.jg-service {
	display: grid;
	gap: 2rem 4rem;
	scroll-margin-top: var(--header-h);
}

.jg-service > * + * {
	margin-top: 0;
}

@media (min-width: 1000px) {
	.jg-service {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	}

	.jg-service__intro {
		position: sticky;
		top: calc(var(--header-h) + 2rem);
		align-self: start;
	}
}

.jg-service__index {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
	color: var(--c-accent-ink);
	font-family: var(--font-mono);
	font-size: var(--fs-mono);
	font-weight: 500;
	letter-spacing: 0.12em;
}

.jg-service__index::after {
	content: "";
	width: 3rem;
	height: 1px;
	background: var(--c-line-strong);
}

.jg-service__intro h2 {
	font-size: var(--fs-h2);
}

.jg-service__intro .jg-lead {
	font-size: 1.0625rem;
}

.jg-service__intro .jg-illustration {
	margin-top: 2.25rem;
}

.jg-service__details {
	display: grid;
	gap: 2rem;
}

@media (min-width: 700px) {
	.jg-service__details {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 2.5rem 2rem;
	}

	.jg-service__col:first-child {
		grid-column: 1 / -1;
	}

	.jg-service__col:first-child .jg-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 2rem;
	}
}

.jg-service__details > * + * {
	margin-top: 0;
}

.jg-service__col {
	padding-top: 1.25rem;
	border-top: 1px solid var(--c-line-strong);
}

.jg-service__col h3 {
	color: var(--c-muted);
	font-family: var(--font-mono);
	font-size: var(--fs-mono);
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.jg-list {
	display: grid;
	gap: 0.7rem;
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

.jg-list li {
	position: relative;
	padding-left: 1.4rem;
	line-height: 1.5;
}

.jg-list li::before {
	content: "";
	position: absolute;
	top: 0.58em;
	left: 0;
	width: 0.42rem;
	height: 0.42rem;
	border-radius: 1px;
	background: var(--c-accent);
}

/* Closing call to action */

.jg-section--cta {
	padding-block: clamp(3rem, 6vw, 5.5rem);
}

.jg-cta {
	position: relative;
	display: grid;
	align-items: center;
	gap: 1rem 3rem;
	overflow: hidden;
	padding: clamp(2rem, 5vw, 4rem);
	border-radius: calc(var(--radius) + 6px);
	background: var(--c-navy);
	color: var(--c-on-dark-muted);
}

.jg-cta::before {
	content: "";
	position: absolute;
	inset: 0 0 0 40%;
	background-image: var(--dots-dark);
	background-size: 20px 20px;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 70%);
	mask-image: linear-gradient(to right, transparent, #000 70%);
	pointer-events: none;
}

.jg-cta > * {
	position: relative;
}

.jg-cta h2 {
	color: var(--c-on-dark);
	font-size: var(--fs-h2);
}

.jg-cta p {
	max-width: 38em;
}

.jg-cta .wp-block-buttons {
	margin-top: 1rem;
}

@media (min-width: 900px) {
	.jg-cta {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.jg-cta .wp-block-buttons {
		grid-row: 1 / span 2;
		grid-column: 2;
		margin-top: 0;
	}
}

/* Company details */

.jg-details {
	display: grid;
	margin: 0;
	border-top: 1px solid var(--c-line);
}

.jg-details__row {
	display: grid;
	gap: 0.25rem 2rem;
	padding: 1rem 0;
	border-bottom: 1px solid var(--c-line);
}

@media (min-width: 600px) {
	.jg-details__row {
		grid-template-columns: 11rem minmax(0, 1fr);
	}
}

.jg-details dt {
	padding-top: 0.2rem;
	color: var(--c-muted);
	font-family: var(--font-mono);
	font-size: var(--fs-mono);
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.jg-details dd {
	margin: 0;
	color: var(--c-ink);
	overflow-wrap: anywhere;
}

/* Contact page */

.jg-contact-layout {
	display: grid;
	gap: 3rem;
	padding-top: clamp(2.5rem, 5vw, 4rem);
}

.jg-contact-layout > * + * {
	margin-top: 0;
}

@media (min-width: 960px) {
	.jg-contact-layout {
		grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
		align-items: start;
		gap: 4.5rem;
	}
}

.jg-contact-layout__form {
	padding: clamp(1.25rem, 4vw, 2.5rem);
	border: 1px solid var(--c-line);
	border-radius: calc(var(--radius) + 4px);
	background: var(--c-white);
	box-shadow: 0 30px 60px -48px rgba(14, 26, 43, 0.45);
}

.jg-aside-title {
	margin-top: 2.25rem;
	font-size: 1.125rem;
	letter-spacing: -0.01em;
}

.jg-contact-layout__aside > .jg-aside-title:first-child {
	margin-top: 0;
}

.jg-contact-layout__aside p {
	margin-top: 0.75rem;
	color: var(--c-muted);
	font-size: var(--fs-small);
}

.jg-contact-layout__aside .jg-list {
	font-size: var(--fs-small);
}

.jg-contact-layout__aside .jg-details {
	margin-top: 1rem;
	font-size: var(--fs-small);
}

.jg-contact-layout__aside .jg-details__row {
	grid-template-columns: minmax(0, 1fr);
}

/* Forms */

.jg-form {
	display: grid;
	gap: 1.25rem;
}

.jg-form__intro {
	color: var(--c-muted);
	font-size: 0.875rem;
}

.jg-form__row {
	display: grid;
	gap: 1.25rem;
}

@media (min-width: 640px) {
	.jg-form__row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.jg-field {
	display: grid;
	align-content: start;
	gap: 0.4rem;
}

.jg-field__label {
	color: var(--c-ink);
	font-size: 0.95rem;
	font-weight: 600;
}

.jg-field__optional {
	color: var(--c-muted);
	font-weight: 400;
}

.jg-field__hint {
	color: var(--c-muted);
	font-size: 0.875rem;
}

.jg-field input,
.jg-field textarea {
	width: 100%;
	min-height: 48px;
	padding: 0.75rem 0.95rem;
	border: 1px solid var(--c-line-strong);
	border-radius: var(--radius-sm);
	background: var(--c-paper);
	color: var(--c-ink);
	font: inherit;
	font-size: 1rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.jg-field textarea {
	min-height: 11rem;
	line-height: 1.5;
	resize: vertical;
}

.jg-field input:hover,
.jg-field textarea:hover {
	border-color: #b3a893;
}

.jg-field input:focus,
.jg-field textarea:focus {
	border-color: var(--c-ink);
	outline: none;
	background: var(--c-white);
	box-shadow: 0 0 0 3px rgba(233, 119, 62, 0.35);
}

.jg-field [aria-invalid="true"] {
	border-color: var(--c-error);
}

.jg-field__error {
	color: var(--c-error);
	font-size: 0.875rem;
	font-weight: 500;
}

.jg-field__error[hidden] {
	display: none;
}

.jg-form__status {
	padding: 1rem 1.15rem;
	border: 1px solid #f4c7c3;
	border-radius: var(--radius-sm);
	background: #fdecea;
	color: #7a1b12;
	font-size: 0.95rem;
}

.jg-form__status:focus {
	outline: 2px solid var(--c-error);
	outline-offset: 2px;
}

.jg-form__status ul {
	margin: 0.5rem 0 0;
	padding-left: 1.2rem;
}

.jg-form__status a {
	color: inherit;
}

.jg-form__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.5rem;
	margin-top: 0.25rem;
}

.jg-form__note {
	flex: 1 1 16rem;
	color: var(--c-muted);
	font-size: 0.875rem;
}

.jg-hp {
	position: absolute !important;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.jg-form-success {
	padding: clamp(1.5rem, 4vw, 2.25rem);
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
	background: var(--c-sand);
}

.jg-form-success:focus {
	outline: 2px solid var(--c-accent-ink);
	outline-offset: 3px;
}

.jg-form-success__title {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 0.5rem;
	color: var(--c-ink);
	font-size: 1.375rem;
	font-weight: 600;
	letter-spacing: -0.015em;
}

.jg-form-success__title::before {
	content: "";
	flex: none;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 6px;
	background: var(--c-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B1424' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.jg-form-success p + p {
	margin-top: 1rem;
}

.jg-form-notice {
	padding: 1rem 1.25rem;
	border: 1px solid var(--c-line);
	border-radius: var(--radius-sm);
	background: var(--c-sand);
}

.jg-form-notice--editor {
	margin-bottom: 1.5rem;
	border-color: #f2c48d;
	background: #fff4e5;
	color: #6b3a0a;
	font-size: 0.9rem;
}

/* Default page template --------------------------------------------------- */

.page-header {
	position: relative;
	padding: clamp(3rem, 7vw, 5.5rem) var(--gutter) clamp(2rem, 4vw, 3rem);
	border-bottom: 1px solid var(--c-line);
}

.page-header::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--dots-light);
	background-size: 24px 24px;
	-webkit-mask-image: linear-gradient(to bottom, #000, transparent 90%);
	mask-image: linear-gradient(to bottom, #000, transparent 90%);
	pointer-events: none;
}

.page-header__inner {
	position: relative;
	max-width: var(--measure);
	margin: 0 auto;
}

.page-header__title {
	font-size: var(--fs-h1);
}

.page-header__lead {
	margin-top: 1.25rem;
	color: var(--c-muted);
	font-size: var(--fs-lead);
}

.prose {
	max-width: calc(var(--measure) + 2 * var(--gutter));
	margin: 0 auto;
	padding: clamp(2.5rem, 5vw, 4rem) var(--gutter) var(--space-section);
}

.prose > * + * {
	margin-top: 1.15rem;
}

.prose h2 {
	margin-top: 2.75rem;
	font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
}

.prose h3 {
	margin-top: 2rem;
	font-size: 1.125rem;
}

.prose h2 + *,
.prose h3 + * {
	margin-top: 0.75rem;
}

.prose ul,
.prose ol {
	padding-left: 1.25rem;
}

.prose li + li {
	margin-top: 0.4rem;
}

.prose .jg-legal-meta {
	color: var(--c-muted);
	font-family: var(--font-mono);
	font-size: var(--fs-mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.post-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.post-list__item + .post-list__item {
	margin-top: 2.5rem;
	padding-top: 2.5rem;
	border-top: 1px solid var(--c-line);
}

.post-list__title {
	font-size: 1.5rem;
}

.post-list__title a {
	color: inherit;
	text-decoration: none;
}

.post-list__meta {
	margin: 0.5rem 0 1rem;
	color: var(--c-muted);
	font-size: 0.875rem;
}

/* 404 */

.not-found {
	padding: var(--space-section) var(--gutter);
}

.not-found__inner {
	max-width: var(--measure);
	margin: 0 auto;
}

.not-found__title {
	font-size: var(--fs-h1);
}

.not-found__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 2rem 0 0;
	padding: 0;
	list-style: none;
}

.not-found__links a {
	display: inline-block;
	padding: 0.55rem 1rem;
	border: 1px solid var(--c-line-strong);
	border-radius: var(--radius-sm);
	color: var(--c-ink);
	text-decoration: none;
}

.not-found__links a:hover {
	border-color: var(--c-ink);
}

/* Illustrations ----------------------------------------------------------- */

.jg-illustration {
	width: 100%;
}

.jg-illustration img {
	display: block;
	width: 100%;
	height: auto;
}

/* Placeholders and review notes (editors only) ----------------------------- */

.jg-placeholder {
	display: inline-block;
	padding: 0.05em 0.45em;
	border: 1px dashed #c2410c;
	border-radius: 4px;
	background: #fff4e5;
	color: #9a3412;
	font-family: var(--font-mono);
	font-size: 0.8em;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: 0.01em;
}

.jg-review {
	display: block;
	padding: 0.75rem 1rem;
	border-left: 3px solid #c2410c;
	border-radius: 0 8px 8px 0;
	background: #fff4e5;
	color: #7c2d12;
	font-size: 0.9rem;
}

.jg-review__label {
	display: block;
	margin-bottom: 0.25rem;
	color: #9a3412;
	font-family: var(--font-mono);
	font-size: var(--fs-mono);
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.jg-editor-bar {
	padding: 0.6rem var(--gutter);
	border-bottom: 1px solid #f2c48d;
	background: #fff4e5;
	color: #6b3a0a;
	font-size: 0.875rem;
	line-height: 1.5;
	text-align: center;
}

.jg-editor-bar a {
	color: #9a3412;
	font-weight: 600;
}

/* Motion ------------------------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}

	.jg-hero > .jg-illustration--viewport img {
		animation: jg-float 7s ease-in-out 1s infinite;
	}

	.jg-hero__content > * {
		animation: jg-rise 0.8s var(--ease) both;
	}

	.jg-hero__content > :nth-child(2) { animation-delay: 0.06s; }
	.jg-hero__content > :nth-child(3) { animation-delay: 0.12s; }
	.jg-hero__content > :nth-child(4) { animation-delay: 0.18s; }

	.jg-hero > .jg-illustration {
		animation: jg-fade 1s 0.2s var(--ease) both;
	}

	.js .jg-reveal {
		opacity: 0;
		transform: translateY(14px);
		transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
		transition-delay: var(--reveal-delay, 0s);
	}

	.js .jg-reveal.is-visible {
		opacity: 1;
		transform: none;
	}

	.js .jg-steps.jg-reveal .jg-step::after {
		transform: scale(0);
		transition: transform 0.9s var(--ease) 0.3s;
	}

	.js .jg-steps.jg-reveal.is-visible .jg-step::after {
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

@keyframes jg-float {
	50% {
		transform: translateY(-8px);
	}
}

@keyframes jg-rise {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
}

@keyframes jg-fade {
	from {
		opacity: 0;
	}
}

/* Print ------------------------------------------------------------------- */

@media print {
	.site-header,
	.site-footer,
	.jg-editor-bar,
	.jg-illustration,
	.wp-block-buttons {
		display: none !important;
	}

	.jg-section,
	.jg-section--dark,
	.jg-cta {
		padding-block: 1.5rem;
		background: none;
		color: #000;
	}

	.jg-section--dark h2,
	.jg-section--dark h3,
	.jg-cta h2 {
		color: #000;
	}
}
