/**
 * WordPress integration layer for the Jessie HTML reference.
 *
 * The original reference stylesheet remains the visual source of truth. This
 * file only normalizes WordPress wrappers and extends that language to dynamic
 * templates such as the journal and single posts.
 */

@font-face {
	font-family: "Jessie Literata";
	src: url("../fonts/literata/Literata72pt-ExtraLight.woff2") format("woff2");
	font-style: normal;
	font-weight: 300;
	font-display: swap;
}

@font-face {
	font-family: "Jessie Literata";
	src: url("../fonts/literata/Literata72pt-Regular.woff2") format("woff2");
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}

:root {
	--jessie-content: 1180px;
	--jessie-gutter: 20px;
}

body {
	background: var(--bg, #faf6ef);
	overflow-x: hidden;
}

html:has(.jessie-source-footer),
body:has(.jessie-source-footer) {
	background: var(--bg, #faf6ef);
}

body .wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100svh;
	background: var(--bg, #faf6ef);
	padding: 0;
}

body .wp-site-blocks > * {
	margin-block-start: 0;
}

body .wp-site-blocks > main,
body .wp-site-blocks > .wp-block-group:not(.jessie-source-header):not(.jessie-source-footer) {
	flex: 0 0 auto;
}

.jessie-gutenberg-home,
.jessie-gutenberg-home > .wp-block-post-content {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

.jessie-gutenberg-home .wp-block-post-content > *,
.jessie-gutenberg-home .wp-block-group > *,
.jessie-gutenberg-home .wp-block-columns > * {
	margin-block-start: 0;
}

.jessie-gutenberg-home .wp-block-group,
.jessie-gutenberg-home .wp-block-columns {
	box-sizing: border-box;
}

.jessie-gutenberg-home .wp-block-image {
	margin-block: 0;
}

.jessie-gutenberg-home .portrait-shape {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.jessie-gutenberg-home .portrait-shape img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.jessie-gutenberg-home .approach-card > p:first-child {
	display: block;
	margin: 0 0 8px;
	color: var(--petrol-deep);
	font-size: .72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .08em;
}

.jessie-gutenberg-home .support-chips p,
.jessie-gutenberg-home .writing-points p,
.jessie-gutenberg-home .care-detail-top p {
	margin: 0;
}

.jessie-gutenberg-home .care-number {
	display: none;
}

.jessie-gutenberg-home .care-detail-top {
	justify-content: flex-end;
}

.jessie-gutenberg-home .support-chips p {
	display: inline-flex;
	align-items: center;
	padding: 9px 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: rgba(255, 253, 249, .72);
	font-size: .82rem;
}

.jessie-gutenberg-home .writing-points p {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.jessie-gutenberg-home .writing-quote p,
.jessie-gutenberg-home .retirement-pullquote p {
	margin: 0;
	font: inherit;
	line-height: inherit;
}

.jessie-gutenberg-home .wp-block-buttons {
	align-items: center;
}

.jessie-gutenberg-home .source-btn .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 46px;
	padding: 12px 20px;
	border: 1px solid rgba(163, 130, 110, .12);
	border-radius: 999px;
	background: linear-gradient(135deg, #a3826e 0%, #b29380 100%);
	color: #fffdf9;
	font-family: var(--sans);
	font-size: .9rem;
	font-weight: 800;
	line-height: 1.2;
	box-shadow: 0 12px 24px rgba(163, 130, 110, .16);
	transition: transform .2s ease, box-shadow .2s ease;
}

.jessie-gutenberg-home .source-btn .wp-block-button__link:hover,
.jessie-gutenberg-home .source-btn .wp-block-button__link:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 16px 30px rgba(163, 130, 110, .22);
}

.jessie-gutenberg-home .source-btn--secondary .wp-block-button__link {
	border-color: rgba(68, 58, 53, .08);
	background: rgba(255, 253, 249, .92);
	color: var(--ink);
	box-shadow: none;
}

.jessie-gutenberg-home .home-articles-link {
	justify-content: center;
	margin-top: 30px;
}

.jessie-source-header,
.jessie-source-footer {
	position: relative;
	z-index: 30;
}

.jessie-source-header .wrap,
.jessie-source-footer .wrap {
	width: min(var(--jessie-content), calc(100% - (2 * var(--jessie-gutter))));
}

.jessie-source-header nav {
	min-width: 0;
}

.jessie-source-header .brand,
.jessie-source-header .nav-links,
.jessie-source-header .nav-pill,
.jessie-source-header .btn {
	min-width: 0;
	white-space: nowrap;
	word-break: normal;
	overflow-wrap: normal;
	hyphens: none;
}

.jessie-source-header .brand-colibri {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.jessie-source-header .nav-links {
	justify-content: flex-end;
}

.source-mobile-nav {
	display: none;
	position: relative;
	margin: 0;
}

.source-mobile-nav summary {
	list-style: none;
	cursor: pointer;
	font-family: var(--sans);
	font-size: .76rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .08em;
}

.source-mobile-nav summary::-webkit-details-marker {
	display: none;
}

.source-mobile-nav summary span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 10px 16px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--paper);
	box-shadow: 0 8px 22px rgba(55, 47, 44, .07);
}

.source-mobile-nav[open] summary span {
	background: var(--ink);
	color: var(--paper);
}

.source-mobile-nav__panel {
	position: fixed;
	top: 78px;
	right: var(--jessie-gutter);
	left: var(--jessie-gutter);
	display: grid;
	gap: 2px;
	padding: 14px;
	border: 1px solid var(--line);
	border-radius: 22px;
	background: rgba(255, 253, 248, .98);
	box-shadow: 0 22px 48px rgba(55, 47, 44, .14);
	backdrop-filter: blur(18px);
	opacity: 0;
	pointer-events: none;
	transform: translate3d(0, -12px, 0) scale(.985);
	transform-origin: top right;
	transition:
		opacity 240ms ease,
		transform 360ms cubic-bezier(.19, 1, .22, 1);
}

.source-mobile-nav[open] .source-mobile-nav__panel {
	opacity: 1;
	pointer-events: auto;
	transform: translate3d(0, 0, 0) scale(1);
}

.source-mobile-nav__panel a:not(.btn) {
	display: block;
	padding: 13px 14px;
	border-bottom: 1px solid var(--line);
	font-family: var(--sans);
	font-size: .86rem;
	font-weight: 750;
}

.source-mobile-nav__panel a {
	opacity: 0;
	transform: translate3d(0, 9px, 0);
	transition:
		opacity 260ms ease,
		transform 340ms cubic-bezier(.19, 1, .22, 1),
		background-color 180ms ease,
		box-shadow 180ms ease;
}

.source-mobile-nav[open] .source-mobile-nav__panel a {
	opacity: 1;
	transform: translate3d(0, 0, 0);
}

.source-mobile-nav[open] .source-mobile-nav__panel a:nth-child(1) { transition-delay: 30ms; }
.source-mobile-nav[open] .source-mobile-nav__panel a:nth-child(2) { transition-delay: 55ms; }
.source-mobile-nav[open] .source-mobile-nav__panel a:nth-child(3) { transition-delay: 80ms; }
.source-mobile-nav[open] .source-mobile-nav__panel a:nth-child(4) { transition-delay: 105ms; }
.source-mobile-nav[open] .source-mobile-nav__panel a:nth-child(5) { transition-delay: 130ms; }
.source-mobile-nav[open] .source-mobile-nav__panel a:nth-child(6) { transition-delay: 155ms; }
.source-mobile-nav[open] .source-mobile-nav__panel a:nth-child(7) { transition-delay: 180ms; }

.source-mobile-nav__panel a:not(.btn):last-of-type {
	border-bottom: 0;
}

.source-mobile-nav__panel .btn {
	margin-top: 8px;
	text-align: center;
}

.jessie-source-footer {
	margin-block: 0 !important;
	background: var(--bg, #faf6ef);
	padding-bottom: max(36px, env(safe-area-inset-bottom));
}

.jessie-source-footer .footer-grid {
	align-items: center;
}

.jessie-source-footer + * {
	margin-top: 0 !important;
}

/* Dynamic journal keeps the source HTML's editorial card language. */
.jessie-articles-page {
	background: var(--bg);
	color: var(--ink);
}

.jessie-page-hero,
.jessie-journal-intro,
.jessie-articles-query,
.articles-topics--dynamic,
.jessie-single {
	width: min(var(--jessie-content), calc(100% - (2 * var(--jessie-gutter))));
	margin-inline: auto;
}

.jessie-page-hero {
	padding: clamp(72px, 9vw, 132px) 0 clamp(46px, 6vw, 84px);
}

.jessie-page-hero__inner {
	position: relative;
}

.jessie-page-hero__content {
	margin: 0;
}

.jessie-kicker,
.jessie-article-card__terms {
	color: var(--sage);
	font-family: var(--sans);
	font-size: .76rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .12em;
}

.jessie-page-title {
	max-width: 780px;
	font-size: clamp(3rem, 7vw, 6.6rem);
	line-height: .98;
}

.jessie-lead {
	max-width: 680px;
	margin-top: 24px;
	color: var(--muted);
	font-size: 1.08rem;
}

.jessie-page-hero__mark {
	position: absolute;
	right: 0;
	bottom: -.2em;
	margin: 0;
	color: rgba(183, 131, 36, .12);
	font-family: var(--serif);
	font-size: clamp(4.5rem, 12vw, 10rem);
	font-style: italic;
	pointer-events: none;
}

.jessie-journal-intro {
	padding: 54px 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.articles-topics--dynamic {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 42px 0 30px;
}

.articles-topics--dynamic .articles-topic {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 10px 16px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--paper);
	color: var(--ink);
	font-size: .78rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .06em;
	transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.articles-topics--dynamic .articles-topic:hover,
.articles-topics--dynamic .articles-topic:focus-visible,
.articles-topics--dynamic .articles-topic.is-active {
	background: var(--sage);
	color: #fff;
	transform: translateY(-1px);
}

.jessie-articles-query {
	padding: 18px 0 100px;
}

.jessie-article-grid,
.jessie-articles-query .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
}

.jessie-article-card {
	display: flex;
	min-height: 100%;
	flex-direction: column;
	padding: 14px 14px 22px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--paper);
	box-shadow: 0 14px 34px rgba(55, 47, 44, .07);
}

.jessie-article-card__visual {
	overflow: hidden;
	margin: 0 0 22px;
	border-radius: calc(var(--radius) - 8px);
}

.jessie-article-card__visual img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform .45s ease;
}

.jessie-article-card:hover .jessie-article-card__visual img {
	transform: scale(1.025);
}

.jessie-article-card__title {
	margin: 12px 0 14px;
	font-size: clamp(1.45rem, 2vw, 2rem);
}

.jessie-article-card__excerpt {
	margin-top: auto;
}

.jessie-single {
	padding-block: clamp(64px, 8vw, 112px);
}

.jessie-single__header,
.jessie-single .wp-block-post-content,
.jessie-single > .wp-block-group:not(.alignwide) {
	max-width: 760px;
	margin-inline: auto;
}

.jessie-single .wp-block-post-title {
	font-size: clamp(3rem, 7vw, 6rem);
	line-height: 1;
}

.jessie-single .wp-block-post-featured-image {
	overflow: hidden;
	border-radius: var(--radius) !important;
}

.jessie-single .wp-block-post-content {
	font-size: 1.08rem;
	line-height: 1.8;
}

@media (max-width: 1180px) {
	.jessie-source-header .nav-links {
		display: none;
	}

	.source-mobile-nav {
		display: block;
	}
}

@media (max-width: 780px) {
	:root {
		--jessie-gutter: 14px;
	}

	.jessie-source-header .brand-colibri-wrap {
		width: 42px;
		height: 42px;
	}

	.jessie-source-header .brand-name {
		font-size: 1rem;
	}

	.jessie-source-header .brand-services,
	.jessie-source-header .brand-lockup small {
		font-size: .58rem;
	}

	.source-mobile-nav__panel {
		top: 70px;
	}

	.jessie-article-grid,
	.jessie-articles-query .wp-block-post-template {
		grid-template-columns: 1fr;
	}

	.jessie-page-hero__mark {
		display: none;
	}

	.jessie-source-footer .footer-grid {
		display: grid;
		gap: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jessie-article-card__visual img,
	.articles-topics--dynamic .articles-topic {
		transition: none;
	}
}

/* Centered typographic identity shared by every public template. */
.jessie-source-header .brand-wordmark {
	align-self: center !important;
	display: grid !important;
	justify-items: center;
	width: fit-content;
	max-width: 100%;
	margin-inline: auto;
	padding-top: 2px;
	color: #4f5d43 !important;
	text-align: center;
}

.jessie-source-header .brand-wordmark .brand-name {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: .42em;
	font-family: "Jessie Literata", Georgia, serif !important;
	font-size: clamp(1.65rem, 2.2vw, 2.2rem) !important;
	font-weight: 300 !important;
	line-height: .95 !important;
	letter-spacing: .16em !important;
	text-transform: uppercase;
	color: #4f5d43 !important;
}

.jessie-source-header .brand-name__divider {
	position: relative;
	display: block;
	width: clamp(54px, 6vw, 84px);
	height: 1px;
	margin-top: 10px;
	background: linear-gradient(90deg, transparent, #b58d45 20%, #b58d45 80%, transparent);
}

.jessie-source-header .brand-name__divider::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 5px;
	height: 5px;
	border: 1px solid #b58d45;
	background: #fbf7ef;
	transform: translate(-50%, -50%) rotate(45deg);
}

.jessie-source-header .brand-signature {
	display: block;
	margin-top: 9px;
	font-family: var(--sans) !important;
	font-size: .6rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: #9a783d;
}

.jessie-source-header .nav-links .nav-pill,
.jessie-source-header .nav-links .btn,
.jessie-source-header .source-mobile-nav__panel a {
	font-family: var(--sans) !important;
	font-weight: 600 !important;
	letter-spacing: .055em !important;
}

.jessie-source-header .nav-links .nav-pill {
	font-size: .9rem !important;
}

.jessie-source-header .nav-links .btn {
	font-size: .86rem !important;
	font-weight: 700 !important;
}

.jessie-source-header .source-mobile-nav__panel a {
	font-size: .86rem !important;
}

@media (min-width: 1181px) {
	.jessie-source-header nav {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
	}
}

@media (max-width: 1180px) {
	.jessie-source-header .nav-links {
		display: none !important;
	}

	.jessie-source-header nav {
		position: relative;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		min-height: 78px;
		padding: 10px 78px;
	}

	.jessie-source-header .brand-wordmark {
		flex: 0 0 auto;
		margin: 0;
	}

	.jessie-source-header .source-mobile-nav {
		position: absolute;
		top: 50%;
		right: 0;
		transform: translateY(-50%);
	}
}

@media (max-width: 650px) {
	.jessie-source-header nav {
		min-height: 68px;
		padding-inline: 62px;
	}

	.jessie-source-header .brand-wordmark .brand-name {
		gap: .4em;
		font-size: clamp(.95rem, 4.5vw, 1.18rem) !important;
		letter-spacing: .09em !important;
	}

	.jessie-source-header .brand-name__divider {
		width: 46px;
		margin-top: 8px;
	}

	.jessie-source-header .brand-signature {
		display: none;
	}

	.jessie-source-header .source-mobile-nav summary span {
		min-height: 38px;
		padding: 8px 11px;
		font-size: .68rem;
	}
}

@media (max-width: 980px) {
	.jessie-gutenberg-home .hero .wrap.hero-grid {
		width: auto;
		max-width: none;
		margin-left: clamp(20px, 5vw, 40px);
		margin-right: clamp(20px, 5vw, 40px);
	}
}

@media (max-width: 780px) {
	.jessie-gutenberg-home .wrap,
	.jessie-articles-page .jessie-page-hero__inner,
	.jessie-articles-page .jessie-journal-intro,
	.jessie-articles-page .jessie-articles-query {
		width: auto;
		max-width: none;
		margin-left: 20px !important;
		margin-right: 20px !important;
	}

	.jessie-gutenberg-home .hero .wrap.hero-grid {
		margin-left: 20px !important;
		margin-right: 20px !important;
	}

	.jessie-gutenberg-home .portrait-column .portrait-caption-below {
		width: auto !important;
		margin-left: 20px !important;
		margin-right: 20px !important;
	}

	.jessie-source-header .source-mobile-nav summary {
		margin-right: 4px;
	}
}
