/* Reset, base type and layout primitives. */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

body {
	margin: 0;
	background: var(--jb-bg);
	color: var(--jb-fg);
	font-family: var(--jb-font-text);
	font-size: var(--jb-step-0);
	line-height: var(--jb-leading-text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}

img, svg, video, picture { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
p, h1, h2, h3, h4, h5, h6, figure, blockquote { margin: 0; }
p { text-wrap: pretty; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, .jb-display {
	font-family: var(--jb-font-display);
	font-weight: 800;
	font-stretch: 85%;
	line-height: var(--jb-leading-tight);
	letter-spacing: -0.035em;
	text-wrap: balance;
}
h1 { font-size: var(--jb-step-5); }
h2 { font-size: var(--jb-step-4); }
h3 { font-size: var(--jb-step-2); letter-spacing: -0.02em; line-height: 1.05; }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }

:focus-visible {
	outline: 3px solid var(--jb-ink);
	outline-offset: 3px;
	box-shadow: 0 0 0 6px var(--jb-yellow);
	border-radius: 2px;
}

::selection { background: var(--jb-yellow); color: var(--jb-ink); }

.jb-wrap {
	width: 100%;
	max-width: calc(var(--jb-max) + 2 * var(--jb-margin));
	margin-inline: auto;
	padding-inline: var(--jb-margin);
}

/* Comic button: yellow, ink border, hard shadow that presses in */
.jb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 48px;
	padding: 0.7rem 1.35rem;
	border: 3px solid var(--jb-ink);
	border-radius: 999px;
	background: var(--jb-yellow);
	color: var(--jb-ink);
	box-shadow: 4px 4px 0 var(--jb-ink);
	font-family: var(--jb-font-text);
	font-weight: 700;
	font-size: var(--jb-step-0);
	line-height: 1.1;
	text-decoration: none;
	transition: transform 120ms var(--jb-ease), box-shadow 120ms var(--jb-ease);
}
.jb-btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--jb-ink); }
.jb-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--jb-ink); }
.jb-btn--white { background: var(--jb-white); }
.jb-btn--ink { background: var(--jb-ink); color: var(--jb-white); box-shadow: 4px 4px 0 var(--jb-yellow); }
.jb-btn--ink:hover { box-shadow: 5px 5px 0 var(--jb-yellow); }

.screen-reader-text, .jb-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus {
	position: fixed !important;
	top: var(--jb-space-4); left: var(--jb-space-4);
	width: auto; height: auto;
	clip: auto;
	padding: var(--jb-space-3) var(--jb-space-4);
	background: var(--jb-ink); color: var(--jb-white);
	z-index: 200;
}
