/* Jeff Buttigieg theme — styles theme.json can't express. */

/* Headings and links follow the section colour on dark backgrounds. */
:is(.has-primary-background-color, .has-contrast-background-color, .has-navy-soft-background-color) :is(h1, h2, h3, h4, h5, h6) {
	color: inherit;
}
:is(.has-primary-background-color, .has-contrast-background-color) a:where(:not(.wp-element-button)) {
	color: inherit;
	text-underline-offset: 4px;
}
:is(.has-primary-background-color, .has-contrast-background-color) .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) {
	color: var(--wp--preset--color--base);
}

/* Eyebrow label above headings. */
.is-style-eyebrow {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}
:is(.has-primary-background-color, .has-contrast-background-color) .is-style-eyebrow:not(.has-text-color) {
	color: var(--wp--preset--color--peach);
}

/* Small grey meta line (categories, dates). */
.jb-meta,
.jb-meta a {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}

/* Big Fraunces numerals for numbered steps. */
.is-style-numeral {
	font-family: var(--wp--preset--font-family--display);
	font-size: 2.5rem;
	font-weight: 600;
	line-height: 1;
	color: var(--wp--preset--color--accent);
}

/* Arrow list. */
.is-style-arrows {
	list-style: none;
	padding-left: 0;
}
.is-style-arrows li {
	position: relative;
	padding-left: 1.6em;
	margin-bottom: 0.5em;
}
.is-style-arrows li::before {
	content: "→";
	position: absolute;
	left: 0;
	color: var(--wp--preset--color--accent);
	font-weight: 700;
}

/* Category chips on the Writing page. */
.wp-block-categories.is-style-chips {
	list-style: none;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.wp-block-categories.is-style-chips li a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	box-sizing: border-box;
	padding: 10px 18px;
	border-radius: 999px;
	border: 1.5px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary);
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
}
.wp-block-categories.is-style-chips li a:hover,
.wp-block-categories.is-style-chips li.current-cat a {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

/* Header: logo always white on navy; 44px touch targets. */
.jb-site-header .wp-block-site-logo img {
	filter: brightness(0) invert(1);
	height: 52px;
	width: auto;
}
.jb-site-header .wp-block-navigation a {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}
.jb-site-header .wp-block-navigation__responsive-container-open {
	min-width: 44px;
	min-height: 44px;
	justify-content: center;
}

/* Header, main and footer sit flush against each other. */
.wp-site-blocks > * {
	margin-block-start: 0;
}
.jb-site-header .wp-block-navigation .current-menu-item > a {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--peach);
	text-decoration-thickness: 2px;
	text-underline-offset: 8px;
}
.jb-site-footer .wp-block-site-logo img {
	filter: brightness(0) invert(1);
	height: 44px;
	width: auto;
}

/* Photo and image placeholders until real photos go in. */
.jb-placeholder {
	border-radius: 6px;
	text-align: center;
	font-size: var(--wp--preset--font-size--small);
}

/* Dashed testimonial slots, until real quotes go in. */
.jb-slot {
	border: 1.5px dashed #C9BBA6;
}

/* Rounded images and featured images. */
.wp-block-post-featured-image img,
.wp-block-image.is-style-rounded img {
	border-radius: 6px;
}

/* Post content readability. */
.wp-block-post-content {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.75;
}
.wp-block-post-content :is(h2, h3) {
	margin-top: 2.5rem;
}

/* Visible focus for keyboard users. */
:where(a, button, input, .wp-block-navigation-item__content):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

/* Footer link lists and divider. */
.jb-footer-links {
	list-style: none;
	padding-left: 0;
	font-size: 0.9375rem;
}
.jb-footer-links li {
	margin-bottom: 0.5em;
}
.jb-footer-links a {
	color: var(--wp--preset--color--base) !important;
	text-decoration: none;
}
.jb-site-footer .wp-block-separator {
	border-color: rgba(255, 255, 255, 0.12);
	margin-top: var(--wp--preset--spacing--50);
	margin-bottom: var(--wp--preset--spacing--40);
}

/* "Flagship" style label inside the navy card. */
.jb-badge {
	display: inline-block;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--peach);
}

/* Numbered steps and rows. */
.jb-step {
	border-top: 2px solid var(--wp--preset--color--primary);
	padding-top: var(--wp--preset--spacing--40);
}
.jb-row {
	border-top: 1px solid var(--wp--preset--color--line);
	padding-block: var(--wp--preset--spacing--40);
	margin-block-start: 0 !important;
}
.jb-row:last-child {
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.jb-row .is-style-numeral {
	min-width: 3.5rem;
}

/* Post byline and author box. */
.jb-byline,
.jb-byline a {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}
.jb-author {
	border-top: 1px solid var(--wp--preset--color--line);
}

/* Photos built into the theme. */
.jb-photo img {
	border-radius: 6px;
	width: 100%;
}
.jb-photo img {
	object-position: 50% 30%;
}
@media (max-width: 781px) {
	/* Stacked on phones and tablets: keep the photo from filling several screens. */
	.jb-photo img {
		aspect-ratio: 1 / 1 !important;
		max-height: 70vh;
	}
}

/* The S.P.A.C.E. diagram. */
.jb-diagram img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	box-shadow: var(--wp--preset--shadow--card);
}
