/*
 * Pippin Collective — theme styles.
 *
 * Colours and fonts mirror the Elementor global variables (--pc-*), with fallbacks
 * for pages where the Elementor kit CSS isn't loaded.
 *   .pc-*  Elementor global classes (only header/footer behaviour is touched here)
 *   .pt-*  this theme's blog templates
 */

:root {
	--pt-cream: var(--pc-cream, #FAF7F2);
	--pt-ink: var(--pc-ink, #2F3A34);
	--pt-body: var(--pc-body, #4A554E);
	--pt-muted: var(--pc-muted, #6B7570);
	--pt-coral: var(--pc-coral, #FF6B6B);
	--pt-coral-deep: var(--pc-coral-deep, #B5322F);
	--pt-mint: var(--pc-mint, #A8D5C9);
	--pt-rule: rgba(47, 58, 52, 0.16);
	--pt-heading: Manrope, Helvetica, sans-serif;
	--pt-sans: Inter, Helvetica, Arial, sans-serif;
	--pt-gutter: clamp(18px, 4vw, 40px);
}

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

html { -webkit-text-size-adjust: 100%; }

body,
.ast-separate-container,
.ast-page-builder-template {
	background: var(--pt-cream);
	color: var(--pt-ink);
	font-family: var(--pt-sans);
}

::selection { background: var(--pt-mint); color: var(--pt-ink); }

/* Astra leaves the content area to page builders; remove its gaps. */
.ast-page-builder-template .site-content > .ast-container,
.ast-page-builder-template .site-content #primary {
	max-width: none;
	padding: 0;
	margin: 0;
}
.ast-page-builder-template .entry-header { display: none; }
.ast-page-builder-template .site-main > article { margin: 0; padding: 0; }
.site-content { overflow-x: clip; }

/* Astra underlines links inside .entry-content; Elementor buttons and link blocks shouldn't be. */
.entry-content .elementor a.e-button-base,
.entry-content .elementor a.e-div-block-base,
.entry-content .elementor a.e-flexbox-base,
.elementor a.e-button-base {
	text-decoration: none;
}
/* Astra's <button> styles (uppercase etc.) leak onto Elementor buttons rendered as <button>. */
.elementor button.e-button-base { text-transform: none; letter-spacing: inherit; }

/* ---------- Header (Header Footer Elementor template) ---------- */

body.ehf-header #masthead {
	position: sticky;
	top: 0;
	z-index: 50;
}
body.admin-bar.ehf-header #masthead { top: 32px; }
@media (max-width: 782px) {
	body.admin-bar.ehf-header #masthead { top: 46px; }
}
@media (max-width: 600px) {
	body.admin-bar.ehf-header #masthead { top: 0; }
}

/* Podcast dropdown: opens on hover and on keyboard/tap focus. */
.pc-dd:hover > .pc-dd-menu,
.pc-dd:focus-within > .pc-dd-menu { display: flex; }
.pc-dd-menu::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -12px;
	height: 12px;
}
.pc-dd > button { cursor: pointer; }
.pc-dd > button::after {
	content: "▾";
	font-size: 10px;
	line-height: 1;
	color: var(--pt-muted);
}

/*
 * Mobile menu (≤1024px): the nav collapses behind a hamburger (.pc-burger) and opens
 * as a panel under the header bar. Toggled by assets/pippin-nav.js via .pc-header.is-open.
 */
.pc-burger {
	position: relative;
	width: 44px;
	height: 44px;
	flex: none;
	font-size: 0 !important;
	line-height: 0;
	border: 0;
}
.pc-burger::before,
.pc-burger::after {
	content: "";
	position: absolute;
	left: 11px;
	top: 21px;
	width: 22px;
	height: 2px;
	border-radius: 2px;
	background: var(--pt-ink);
	transition: transform .2s, box-shadow .2s, opacity .2s;
}
.pc-burger::before { box-shadow: 0 -7px 0 var(--pt-ink), 0 7px 0 var(--pt-ink); }
.pc-burger::after { opacity: 0; }
.pc-header.is-open .pc-burger::before { box-shadow: none; transform: rotate(45deg); }
.pc-header.is-open .pc-burger::after { opacity: 1; transform: rotate(-45deg); }
.pc-burger:focus-visible { outline: 2px solid var(--pt-coral); outline-offset: 2px; }

@media (max-width: 1024px) {
	.elementor .pc-header .pc-header-bar { flex-wrap: nowrap; min-height: 68px; }
	.elementor .pc-header .pc-burger { display: block; margin-right: -10px; }

	.elementor .pc-header .pc-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
		gap: 0;
		max-height: calc(100vh - 68px);
		overflow-y: auto;
		padding: 4px var(--pt-gutter) 24px;
		background: var(--pt-cream);
		border-bottom: 1px solid rgba(47, 58, 52, 0.10);
		box-shadow: 0 18px 30px rgba(47, 58, 52, 0.10);
	}
	.elementor .pc-header.is-open .pc-nav { display: flex; }

	.elementor .pc-header .pc-nav > .pc-nav-link,
	.elementor .pc-header .pc-dd > .pc-nav-link {
		display: block;
		width: 100%;
		text-align: left;
		font-size: 17px;
		padding: 14px 0;
		border-bottom: 1px solid var(--pt-rule);
	}
	.elementor .pc-header .pc-nav > .pc-nav-link:hover { border-bottom-color: var(--pt-rule); }

	/* Podcast: shown as a label with its two links listed underneath. */
	.elementor .pc-header .pc-dd { display: block; width: 100%; }
	.elementor .pc-header .pc-dd > button.pc-nav-link { pointer-events: none; border-bottom: 0; padding-bottom: 4px; }
	.elementor .pc-header .pc-dd > button::after { content: none; }
	.elementor .pc-header .pc-dd-menu {
		display: flex;
		position: static;
		min-width: 0;
		padding: 0 0 10px 14px;
		background: transparent;
		border: 0;
		border-bottom: 1px solid var(--pt-rule);
		border-radius: 0;
		box-shadow: none;
	}
	.pc-dd-menu::before { content: none; }
	.elementor .pc-header .pc-dd-item { font-size: 16px; padding: 8px 0; color: var(--pt-body); }
	.elementor .pc-header .pc-dd-item:hover { background: transparent; color: var(--pt-coral-deep); }

	.elementor .pc-header .pc-nav-cta { margin-top: 20px; padding: 16px 22px; text-align: center; font-size: 15px; }
}

/* ---------- Shared blog template pieces ---------- */

.pt-band { background: var(--pt-cream); }
.pt-band--white { background: #FFFFFF; }
.pt-band--ink { background: var(--pt-ink); }

.pt-wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding-left: var(--pt-gutter);
	padding-right: var(--pt-gutter);
}

.pt-row { display: flex; flex-wrap: wrap; gap: 14px; }

.pt-btn {
	display: inline-block;
	font-family: var(--pt-heading);
	font-weight: 700;
	font-size: 15px;
	line-height: 1.2;
	padding: 16px 30px;
	border-radius: 6px;
	border: 1.5px solid transparent;
	text-decoration: none;
	transition: background-color .2s, color .2s, border-color .2s;
}
.pt-btn-coral-on-dark { background: var(--pt-coral); color: var(--pt-ink); }
.pt-btn-coral-on-dark:hover,
.pt-btn-coral-on-dark:focus-visible { background: var(--pt-cream); color: var(--pt-ink); }
.pt-btn-outline-light { color: #FFFFFF; border-color: rgba(255, 255, 255, 0.5); }
.pt-btn-outline-light:hover,
.pt-btn-outline-light:focus-visible { background: #FFFFFF; color: var(--pt-ink); border-color: #FFFFFF; }

.pt-link-underline {
	display: inline-block;
	font-family: var(--pt-heading);
	font-weight: 700;
	font-size: 15px;
	color: var(--pt-ink);
	border-bottom: 2px solid var(--pt-coral);
	padding-bottom: 4px;
	transition: color .2s;
}

.pt-eyebrow {
	display: block;
	font-family: var(--pt-heading);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--pt-coral-deep);
	margin-bottom: 16px;
}

.pt-text { margin: 0; font-size: 17px; line-height: 1.72; color: var(--pt-body); }

.pt-img-placeholder {
	display: flex !important;
	align-items: center;
	justify-content: center;
	background: var(--pt-mint);
}
.pt-img-placeholder img { width: 18%; height: auto; opacity: 0.9; }

/* ---------- Blog listing ---------- */

.pt-blog__intro {
	padding-top: clamp(48px, 6vw, 88px);
	padding-bottom: clamp(28px, 4vw, 44px);
}
.pt-blog__title {
	margin: 0 0 18px;
	max-width: 760px;
	font-family: var(--pt-heading);
	font-weight: 800;
	font-size: clamp(32px, 5vw, 58px);
	line-height: 1.04;
	letter-spacing: -0.028em;
	color: var(--pt-ink);
}
.pt-blog__lede {
	margin: 0;
	max-width: 560px;
	font-size: 17px;
	line-height: 1.7;
	color: var(--pt-body);
}

.pt-blog__featured-wrap { padding-bottom: clamp(44px, 6vw, 72px); }
.pt-blog__featured {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
	gap: clamp(24px, 4vw, 52px);
	align-items: center;
	color: var(--pt-ink);
	text-decoration: none;
}
.pt-blog__featured:hover,
.pt-blog__featured:focus-visible { color: var(--pt-ink); }
.pt-blog__featured:hover .pt-link-underline { color: var(--pt-coral); }
.pt-blog__featured-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 8px;
}
.pt-blog__featured-text { min-width: 0; }
.pt-blog__featured-title {
	margin: 0 0 18px;
	font-family: var(--pt-heading);
	font-weight: 800;
	font-size: clamp(26px, 3.4vw, 42px);
	line-height: 1.1;
	letter-spacing: -0.024em;
	color: var(--pt-ink);
}

.pt-blog__list-wrap {
	padding-top: clamp(44px, 6vw, 80px);
	padding-bottom: clamp(44px, 6vw, 80px);
}
.pt-blog__list-title {
	margin: 0 0 clamp(20px, 3vw, 34px);
	font-family: var(--pt-heading);
	font-weight: 800;
	font-size: clamp(20px, 2.2vw, 26px);
	line-height: 1.2;
	letter-spacing: -0.018em;
	color: var(--pt-ink);
}
.pt-blog__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
	column-gap: clamp(28px, 5vw, 72px);
}
.pt-blog__item {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	padding: 22px 0;
	border-top: 1px solid var(--pt-rule);
	color: var(--pt-ink);
	text-decoration: none;
	transition: color .2s;
}
.pt-blog__item:hover,
.pt-blog__item:focus-visible { color: var(--pt-coral-deep); }
.pt-blog__item-title {
	min-width: 0;
	font-family: var(--pt-heading);
	font-weight: 700;
	font-size: clamp(16px, 1.5vw, 19px);
	line-height: 1.32;
	letter-spacing: -0.014em;
}
.pt-blog__item-arrow { flex: none; font-size: 15px; color: var(--pt-coral-deep); }

.pt-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	border-top: 1px solid var(--pt-rule);
	padding-top: 26px;
	margin-top: 34px;
}
.pt-pagination__status {
	font-family: var(--pt-heading);
	font-weight: 600;
	font-size: 14px;
	color: var(--pt-muted);
}
.pt-pagination__pages {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.pt-pagination__page,
.pt-pagination__prev {
	font-family: var(--pt-heading);
	font-weight: 600;
	font-size: 14px;
	line-height: 1.2;
	color: var(--pt-body);
	border: 1px solid var(--pt-rule);
	border-radius: 6px;
	padding: 9px 14px;
	text-decoration: none;
	transition: color .2s, border-color .2s;
}
a.pt-pagination__page:hover,
.pt-pagination__prev:hover { color: var(--pt-ink); border-color: var(--pt-ink); }
.pt-pagination__page.is-current {
	font-weight: 700;
	color: var(--pt-ink);
	background: var(--pt-cream);
}
.pt-pagination__gap { font-size: 14px; color: var(--pt-muted); padding: 0 4px; }
.pt-pagination__next {
	font-family: var(--pt-heading);
	font-weight: 700;
	font-size: 14px;
	line-height: 1.2;
	color: var(--pt-ink);
	background: var(--pt-coral);
	border-radius: 6px;
	padding: 10px 18px;
	white-space: nowrap;
	text-decoration: none;
	transition: background-color .2s, color .2s;
}
.pt-pagination__next:hover,
.pt-pagination__next:focus-visible { background: var(--pt-ink); color: var(--pt-cream); }

/* ---------- Single post ---------- */

.pt-post__head {
	max-width: 760px;
	padding-top: clamp(36px, 5vw, 64px);
	padding-bottom: clamp(24px, 3vw, 36px);
}
.pt-post__back {
	display: inline-block;
	margin-bottom: 26px;
	font-family: var(--pt-heading);
	font-weight: 700;
	font-size: 14px;
	color: var(--pt-body);
	text-decoration: none;
}
.pt-post__back:hover,
.pt-post__back:focus-visible { color: var(--pt-coral-deep); }
.pt-post__title {
	margin: 0 0 18px;
	font-family: var(--pt-heading);
	font-weight: 800;
	font-size: clamp(30px, 4.2vw, 52px);
	line-height: 1.06;
	letter-spacing: -0.026em;
	color: var(--pt-ink);
}
.pt-post__meta {
	margin: 0;
	font-family: var(--pt-heading);
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.02em;
	color: var(--pt-muted);
}
/* Featured image: shown whole (never cropped), centred on a mint panel. */
.pt-post__hero-frame {
	margin: 0;
	padding: clamp(12px, 2.5vw, 28px);
	border-radius: 8px;
	background: rgba(168, 213, 201, 0.3);
}
.pt-post__hero {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: min(560px, 70vh);
	margin-inline: auto;
	border-radius: 6px;
}

.pt-post__body {
	max-width: 760px; /* same as .pt-post__head, so text lines up with the title */
	padding-top: clamp(40px, 5vw, 72px);
	padding-bottom: clamp(30px, 4vw, 50px);
	font-size: 17px;
	line-height: 1.78;
	color: var(--pt-body);
}
.pt-post__body > * { margin-top: 0; margin-bottom: 22px; }
.pt-post__body > *:last-child { margin-bottom: 0; }
.pt-post__body > p:first-child {
	font-size: clamp(17.5px, 1.5vw, 20px);
	line-height: 1.7;
	color: var(--pt-ink);
}
.pt-post__body h2,
.pt-post__body h3,
.pt-post__body h4,
.pt-post__body h5,
.pt-post__body h6 {
	margin: 38px 0 16px;
	font-family: var(--pt-heading);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.018em;
	color: var(--pt-ink);
}
.pt-post__body h2 { font-size: clamp(21px, 2.4vw, 28px); }
.pt-post__body h3 { font-size: clamp(19px, 2vw, 24px); }
.pt-post__body h4,
.pt-post__body h5,
.pt-post__body h6 { font-size: clamp(18px, 1.7vw, 21px); }
.pt-post__body :is(h2, h3, h4, h5, h6) > br:first-child { display: none; }
.pt-post__body :is(h2, h3, h4, h5, h6) strong { font-weight: inherit; }
.pt-post__body strong { color: var(--pt-ink); }
.pt-post__body a {
	color: var(--pt-coral-deep);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.pt-post__body a:hover { color: var(--pt-ink); }
.pt-post__body ul,
.pt-post__body ol {
	margin-left: 0;
	padding-left: 22px;
}
.pt-post__body li { margin-bottom: 10px; line-height: 1.65; }
.pt-post__body blockquote,
.pt-post__body .wp-block-quote,
.pt-post__body .wp-block-pullquote {
	margin: 34px 0;
	padding: 0 0 0 22px;
	border: 0;
	border-left: 3px solid var(--pt-coral);
	text-align: left;
}
.pt-post__body blockquote p {
	margin: 0;
	font-family: var(--pt-heading);
	font-weight: 800;
	font-size: clamp(20px, 2.4vw, 28px);
	line-height: 1.24;
	letter-spacing: -0.018em;
	color: var(--pt-ink);
	font-style: normal;
}
.pt-post__body img { max-width: 100%; height: auto; border-radius: 8px; }

/*
 * In-post images: full column width, one after another, never floated.
 * The wp_content_img_tag filter in functions.php strips the old pixel widths and adds
 * .is-portrait / .is-square / .is-small. Old posts wrap the figure in div.wp-block-image.
 */
.pt-post__body :is(figure, .wp-block-image) {
	float: none;
	display: block;
	width: auto;
	max-width: 100%;
	margin: 34px 0;
}
.pt-post__body > :is(figure, .wp-block-image):first-child { margin-top: 0; }
.pt-post__body .wp-block-image > figure { margin: 0; }
.pt-post__body :is(figure, .wp-block-image) img {
	display: block;
	width: 100%;
	height: auto;
	margin-inline: auto;
}
.pt-post__body :is(figure, .wp-block-image):has(img.is-portrait) {
	max-width: 400px;
	margin-inline: auto;
}
.pt-post__body :is(figure, .wp-block-image):has(img.is-square) {
	max-width: 520px;
	margin-inline: auto;
}
.pt-post__body :is(figure, .wp-block-image) img.is-small { width: auto; }
.pt-post__body figure:has(img.is-small) {
	display: table;
	margin-inline: auto;
}
/* Beats core's `.wp-block-image .alignleft > figcaption { display: table-caption }`. */
.pt-post__body :is(figure, .wp-block-image) > figcaption,
.pt-post__body figcaption {
	display: block;
	margin-top: 10px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--pt-muted);
	text-align: left;
}
.pt-post__body figure:has(img.is-small) > figcaption {
	display: table-caption;
	caption-side: bottom;
}

.pt-post__cta {
	padding-top: clamp(44px, 6vw, 80px);
	padding-bottom: clamp(44px, 6vw, 80px);
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	gap: clamp(24px, 4vw, 56px);
	align-items: center;
}
.pt-post__cta-title {
	margin: 0;
	font-family: var(--pt-heading);
	font-weight: 800;
	font-size: clamp(24px, 3vw, 36px);
	line-height: 1.12;
	letter-spacing: -0.022em;
	color: #FFFFFF;
}
