/*
 * Single blog post — Clickt "Warm & Airy".
 *
 * Reading surface: navy masthead, feature image bridging into a cream page,
 * one measured prose column, sand CTA, related row. Companion to
 * blog-index.css; shares its card language so index → article feels continuous.
 *
 * Defensive note: the site still loads Elementor kit 47 ("Local Services
 * Wireframe 1"), which sets Josefin Sans / Cinzel / Norican, a blue link color
 * and text-transform:capitalize on every <a>. Rules below out-specify it inside
 * .clickt-post rather than editing the kit, which other pages still rely on.
 */

body.clickt-post-page {
	background: var(--clickt-cream-100);
	color: var(--clickt-navy-600);
	font-family: var(--clickt-font-body);
	font-size: var(--clickt-fs-body);
	letter-spacing: normal;
}

.clickt-post {
	/* Content column width. tokens.css applies box-sizing:border-box to every
	 * descendant of a .clickt-* element, so the horizontal padding has to be
	 * added on top or it eats the measure. 660px of Inter at 18px is ~73
	 * characters — inside the 65-75 reading band. */
	--clickt-post-measure: calc(660px + 2 * var(--clickt-pad-x));
	background: var(--clickt-cream-100);
	color: var(--clickt-navy-600);
	font-family: var(--clickt-font-body);
}

/* =========================================================================
 * Masthead — navy band, echoing the blog index hero.
 * ========================================================================= */

.clickt-post__masthead {
	background: var(--clickt-navy-800);
	color: var(--clickt-cream-100);
	padding: 64px var(--clickt-pad-x) 150px;
}

.clickt-post__masthead-inner {
	max-width: 900px;
	margin: 0 auto;
}

.clickt-post .clickt-post__back {
	display: inline-flex;
	gap: 10px;
	align-items: center;
	margin-bottom: 44px;
	border-bottom: 1px solid transparent;
	padding-bottom: 2px;
	color: var(--clickt-gold-500) !important;
	font-family: var(--clickt-font-body) !important;
	font-size: var(--clickt-fs-eyebrow);
	font-weight: 700;
	letter-spacing: var(--clickt-ls-caps-nav);
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.clickt-post .clickt-post__back:hover {
	border-bottom-color: var(--clickt-gold-500);
	color: var(--clickt-gold-500) !important;
}

.clickt-post__eyebrow {
	margin: 0 0 22px;
	color: var(--clickt-gold-500);
	font-size: var(--clickt-fs-eyebrow);
	font-weight: 600;
	letter-spacing: var(--clickt-ls-caps-eyebrow);
	text-transform: uppercase;
}

.clickt-post__eyebrow a {
	color: inherit !important;
	text-decoration: none;
}

.clickt-post__eyebrow a:hover,
.clickt-post__eyebrow a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.clickt-post .clickt-post__title {
	max-width: 20ch;
	margin: 0;
	color: var(--clickt-cream-100);
	font-family: var(--clickt-font-display);
	font-size: clamp(38px, 5.4vw, 72px);
	font-weight: 300;
	letter-spacing: var(--clickt-ls-display);
	line-height: 1.02;
	text-transform: none;
	text-wrap: balance;
}

.clickt-post__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
	margin: 32px 0 0;
	padding-top: 26px;
	border-top: 1px solid var(--clickt-gold-50);
	color: var(--clickt-cream-78);
	font-size: var(--clickt-fs-body-xs);
	letter-spacing: var(--clickt-ls-caps-soft);
	text-transform: uppercase;
}

.clickt-post__meta-sep {
	color: var(--clickt-gold-500);
}

/* =========================================================================
 * Feature image — bridges the navy band and the cream page.
 * ========================================================================= */

.clickt-post__feature {
	max-width: var(--clickt-maxw-content);
	margin: -110px auto 0;
	padding: 0 var(--clickt-pad-x);
}

.clickt-post__feature img {
	width: 100%;
	aspect-ratio: 16 / 9;
	display: block;
	box-shadow: var(--clickt-shadow-drop);
	object-fit: cover;
}

/* =========================================================================
 * Prose — one measured column. The whole point of the redesign.
 * ========================================================================= */

.clickt-post__body {
	max-width: var(--clickt-post-measure);
	margin: 0 auto;
	padding: var(--clickt-pad-y-s) var(--clickt-pad-x);
	color: var(--clickt-navy-600);
	font-family: var(--clickt-font-body);
	font-size: var(--clickt-fs-lead);
	font-weight: 400;
	letter-spacing: normal;
	line-height: var(--clickt-lh-body-loose);
}

.clickt-post__body > *:first-child {
	margin-top: 0;
}

.clickt-post__body p {
	margin: 0 0 1.5em;
	font-size: var(--clickt-fs-lead);
	letter-spacing: normal;
	line-height: var(--clickt-lh-body-loose);
	text-wrap: pretty;
}

/* Lead paragraph: sets the tone, then hands off to steady body rhythm.
 * The class is applied in single.php — see the note there. */
.clickt-post__body .clickt-post__lead {
	color: var(--clickt-navy-700);
	font-size: clamp(19px, 2vw, 22px);
	line-height: 1.65;
}

.clickt-post__body h2 {
	margin: 2.2em 0 0.5em;
	color: var(--clickt-navy-700);
	font-family: var(--clickt-font-display);
	font-size: clamp(28px, 3.2vw, 40px);
	font-weight: 400;
	letter-spacing: var(--clickt-ls-display-soft);
	line-height: 1.12;
	text-transform: none;
	text-wrap: balance;
}

/* Sans h3 against the serif h2 — a clear tier break, not a size tweak. */
.clickt-post__body h3 {
	margin: 1.9em 0 0.5em;
	color: var(--clickt-navy-800);
	font-family: var(--clickt-font-body);
	font-size: clamp(18px, 1.6vw, 20px);
	font-weight: 600;
	letter-spacing: normal;
	line-height: 1.35;
	text-transform: none;
	text-wrap: balance;
}

.clickt-post__body h4 {
	margin: 1.7em 0 0.4em;
	color: var(--clickt-navy-800);
	font-family: var(--clickt-font-body);
	font-size: var(--clickt-fs-body-l);
	font-weight: 600;
	letter-spacing: normal;
	line-height: 1.4;
	text-transform: none;
}

.clickt-post__body ul,
.clickt-post__body ol {
	margin: 0 0 1.5em;
	padding-left: 1.35em;
}

.clickt-post__body li {
	margin-bottom: 0.6em;
	padding-left: 0.35em;
	font-size: var(--clickt-fs-lead);
	letter-spacing: normal;
	line-height: var(--clickt-lh-body);
}

.clickt-post__body li::marker {
	color: var(--clickt-gold-700);
	font-weight: 700;
}

.clickt-post__body ol {
	font-variant-numeric: tabular-nums;
}

.clickt-post__body strong,
.clickt-post__body b {
	color: var(--clickt-navy-800);
	font-weight: 600;
}

/* Links pasted with their own background (CTA buttons) keep their inline colour. */
.clickt-post__body a:not([style*="background"]) {
	color: var(--clickt-navy-800) !important;
	font-family: var(--clickt-font-body) !important;
	font-size: inherit;
	font-weight: 500;
	letter-spacing: inherit;
	line-height: inherit;
	text-decoration: underline;
	text-decoration-color: var(--clickt-gold-500);
	text-decoration-thickness: 2px;
	text-transform: none;
	text-underline-offset: 4px;
	transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.clickt-post__body a:not([style*="background"]):hover {
	color: var(--clickt-gold-700) !important;
	text-decoration-color: var(--clickt-gold-700);
}

.clickt-post__body blockquote {
	margin: 2em 0;
	border: 0;
	padding: 0 0 0 28px;
	border-left: 1px solid var(--clickt-gold-500);
	color: var(--clickt-navy-700);
	font-family: var(--clickt-font-display);
	font-size: clamp(21px, 2.2vw, 26px);
	font-style: italic;
	font-weight: 400;
	line-height: var(--clickt-lh-blockquote);
}

.clickt-post__body blockquote p:last-child {
	margin-bottom: 0;
}

.clickt-post__body img {
	height: auto;
	max-width: 100%;
	display: block;
	margin: 2em 0;
}

.clickt-post__body figcaption {
	margin-top: 12px;
	color: var(--clickt-body-70);
	font-size: var(--clickt-fs-body-xs);
	line-height: var(--clickt-lh-body-tight);
}

.clickt-post__body hr {
	margin: 2.6em 0;
	border: 0;
	border-top: 1px solid var(--clickt-navy-18);
}

.clickt-post__body table {
	width: 100%;
	margin: 2em 0;
	border-collapse: collapse;
	font-size: var(--clickt-fs-body-s);
}

.clickt-post__body th,
.clickt-post__body td {
	border-bottom: 1px solid var(--clickt-navy-18);
	padding: 12px 14px;
	text-align: left;
}

.clickt-post__body th {
	color: var(--clickt-navy-800);
	font-size: var(--clickt-fs-eyebrow);
	font-weight: 700;
	letter-spacing: var(--clickt-ls-caps-soft);
	text-transform: uppercase;
}

/* Pasted CTA buttons are inline links with padding; on a narrow screen the
 * text wraps and the background splits across lines. Make them boxes. */
.clickt-post__body a[style*="background"] {
	box-sizing: border-box;
	display: inline-block;
	line-height: 1.4;
	max-width: 100%;
	text-align: center;
}

/* Header rows pasted with an inline text colour (white on navy) keep it. */
.clickt-post__body [style*="color"] th,
.clickt-post__body [style*="color"] td {
	color: inherit;
}

/* -------------------------------------------------------------------------
 * Elementor content reset.
 *
 * Every post is itself an Elementor page, so the article HTML arrives wrapped
 * in .elementor-widget-container, which kit 47 styles with Josefin Sans and
 * its own #324A6D ink. Those reach the prose by inheritance, which beats the
 * font-family/color set on .clickt-post__body but loses to a rule targeting
 * the text elements directly — so re-assert the brand type on them here.
 *
 * !important is carried only on font-family and color, and only because some
 * legacy pasted content sets font-family inline on the elements themselves
 * (one post shipped a `font-family: Arial` wrapper), which no amount of
 * specificity would otherwise beat. Sizes, leading and spacing are left to
 * the rules above.
 * ------------------------------------------------------------------------- */

.clickt-post__body :is(p, li, span, div, td, th, dd, dt, figcaption, strong, b, em, i) {
	font-family: var(--clickt-font-body) !important;
}

.clickt-post__body :is(h2, blockquote) {
	font-family: var(--clickt-font-display) !important;
}

.clickt-post__body :is(h3, h4, h5, h6) {
	font-family: var(--clickt-font-body) !important;
}

.clickt-post__body :is(p, li, td, dd, dt) {
	color: var(--clickt-navy-600) !important;
}

/* Re-assert the roles the blanket ink rule above would otherwise flatten. */
.clickt-post__body .clickt-post__lead {
	color: var(--clickt-navy-700) !important;
}

.clickt-post__body :is(strong, b) {
	color: var(--clickt-navy-800) !important;
}

.clickt-post__body figcaption {
	color: var(--clickt-body-70) !important;
}

/* =========================================================================
 * CTA — sand band. The article's one commercial moment.
 * ========================================================================= */

.clickt-post__cta {
	background: var(--clickt-cream-200);
	padding: var(--clickt-pad-y-s) var(--clickt-pad-x);
}

.clickt-post__cta-inner {
	max-width: var(--clickt-maxw-faq);
	margin: 0 auto;
	text-align: center;
}

.clickt-post .clickt-post__cta-inner h2 {
	margin: 0;
	color: var(--clickt-navy-700);
	font-family: var(--clickt-font-display);
	font-size: var(--clickt-fs-h3);
	font-weight: 300;
	letter-spacing: var(--clickt-ls-display-soft);
	line-height: var(--clickt-lh-h3);
	text-transform: none;
	text-wrap: balance;
}

.clickt-post__cta-inner p {
	max-width: 54ch;
	margin: 20px auto 0;
	color: var(--clickt-body-85);
	font-size: var(--clickt-fs-body-l);
	line-height: var(--clickt-lh-body);
}

.clickt-post .clickt-post__cta-btn {
	display: inline-block;
	margin-top: 36px;
	background: var(--clickt-gold-500);
	padding: 18px 44px;
	color: var(--clickt-navy-800) !important;
	font-family: var(--clickt-font-body) !important;
	font-size: var(--clickt-fs-eyebrow);
	font-weight: 700;
	letter-spacing: var(--clickt-ls-caps-button);
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
}

/* =========================================================================
 * Related — same card language as the blog index.
 * ========================================================================= */

.clickt-post__related {
	max-width: var(--clickt-maxw-grid);
	margin: 0 auto;
	padding: var(--clickt-pad-y-m) var(--clickt-pad-x);
}

.clickt-post .clickt-post__related-title {
	margin: 0 0 48px;
	color: var(--clickt-navy-700);
	font-family: var(--clickt-font-display);
	font-size: var(--clickt-fs-h2-sm);
	font-weight: 300;
	letter-spacing: var(--clickt-ls-display-soft);
	line-height: var(--clickt-lh-display-3);
	text-transform: none;
}

.clickt-post__related-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 44px;
}

.clickt-post__card {
	min-width: 0;
	margin: 0;
	border-top: 1px solid var(--clickt-navy-18);
	padding-top: 18px;
}

.clickt-post__card-image {
	aspect-ratio: 16 / 10;
	display: block;
	overflow: hidden;
	background: var(--clickt-cream-200);
}

.clickt-post__card-image img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	transition: transform 0.35s var(--clickt-ease-out);
}

.clickt-post__card-image:hover img {
	transform: scale(1.025);
}

.clickt-post__card-body {
	padding-top: 24px;
}

.clickt-post__card-meta {
	display: flex;
	gap: 20px;
	align-items: center;
	color: var(--clickt-gold-700);
	font-size: var(--clickt-fs-eyebrow);
	font-weight: 600;
	letter-spacing: var(--clickt-ls-caps-soft);
	text-transform: uppercase;
}

.clickt-post__card-meta time {
	border-left: 1px solid var(--clickt-navy-18);
	padding-left: 20px;
	color: var(--clickt-body-70);
}

.clickt-post .clickt-post__card h3 {
	margin: 16px 0 0;
	font-family: var(--clickt-font-display);
	font-size: clamp(24px, 2.2vw, 30px);
	font-weight: 400;
	letter-spacing: var(--clickt-ls-display-soft);
	line-height: 1.1;
	text-transform: none;
}

.clickt-post .clickt-post__card h3 a {
	color: var(--clickt-navy-700) !important;
	font-family: var(--clickt-font-display) !important;
	font-size: inherit;
	font-weight: inherit;
	letter-spacing: inherit;
	line-height: inherit;
	text-decoration: none;
	text-transform: none;
	transition: color 0.2s ease;
}

.clickt-post .clickt-post__card h3 a:hover {
	color: var(--clickt-gold-700) !important;
}

/* =========================================================================
 * Responsive
 * ========================================================================= */

@media (max-width: 900px) {
	.clickt-post__masthead {
		padding-bottom: 120px;
	}

	.clickt-post__feature {
		margin-top: -80px;
	}

	.clickt-post .clickt-post__title {
		max-width: none;
	}
}

@media (max-width: 767px) {
	.clickt-post__masthead {
		padding: 44px var(--clickt-pad-x) 96px;
	}

	.clickt-post .clickt-post__back {
		margin-bottom: 32px;
	}

	.clickt-post__feature {
		margin-top: -64px;
	}

	.clickt-post__feature img {
		aspect-ratio: 4 / 3;
	}

	/* Body size holds at 17px; only the leading tightens slightly. */
	.clickt-post__body {
		font-size: var(--clickt-fs-body-l);
		line-height: var(--clickt-lh-body);
	}

	.clickt-post__body p,
	.clickt-post__body li {
		font-size: var(--clickt-fs-body-l);
		line-height: var(--clickt-lh-body);
	}

	.clickt-post__card-meta {
		align-items: flex-start;
		flex-direction: column;
		gap: 6px;
	}

	.clickt-post__card-meta time {
		border-left: 0;
		padding-left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.clickt-post__card-image img,
	.clickt-post .clickt-post__back,
	.clickt-post__body a {
		transition: none;
	}

	.clickt-post__card-image:hover img {
		transform: none;
	}
}
