/*
Theme Name:   Kadence Child
Template:     kadence
Version:      1.0.0
Description:  Child theme for BigPoetry — customizations that survive Kadence parent theme updates.
*/

/* ── Body font: EB Garamond ─────────────────────────────────────────────── */
body,
input,
textarea,
select,
button,
.wp-block-post-content,
.entry-content,
.widget,
.site-footer {
	font-family: 'EB Garamond', Georgia, serif !important;
}

/* ── Heading font: EB Garamond ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title,
.widget-title,
.wp-block-heading {
	font-family: 'EB Garamond', Georgia, serif !important;
}

/* ── Background ─────────────────────────────────────────────────────────── */
body {
	background-color: #f5f0e8;
}

.site,
.content-bg,
.wp-site-blocks {
	background-color: #f5f0e8;
}

/* ── Link colour: deep burgundy ─────────────────────────────────────────── */
a,
a:visited,
a:hover,
a:focus,
.wp-block-button__link {
	color: #8B1A1A;
}

a:hover,
a:focus {
	opacity: 0.75;
}

/* ── Navigation menu: EB Garamond, spaced ───────────────────────────────── */
.main-navigation,
.main-navigation a,
.primary-menu,
.primary-menu a,
.primary-menu li a,
#site-navigation a,
.header-navigation a,
.kadence-navigation a,
.nav--toggle-sub a {
	font-family: 'EB Garamond', Georgia, serif !important;
	letter-spacing: 0.06em;
}

/* ── Sigil button ────────────────────────────────────────────────────────── */
.bp-sigil-btn {
	background: none !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	cursor: pointer;
	display: flex;
	align-items: center;
	color: inherit !important;
	flex-shrink: 0;
}

.bp-sigil-btn:hover {
	opacity: 0.75;
	background: none !important;
}

.bp-sigil {
	height: 40px;
	width: auto;
	display: block;
}

.bp-section-symbol {
	height: 40px;
	width: auto;
	display: block;
}

/* In the accent band (home/posts) the symbol sits at the far right */
.bigpoetry-accent-band .bp-section-symbol {
	margin-left: auto;
}


/* ── Accent band (home page / posts — no hero title) ────────────────────── */
/* Sigil sits at the far left, vertically centred. */
.bigpoetry-accent-band {
	background-color: var(--global-palette7, #EDF2F7);
	width: 100%;
	display: flex;
	align-items: center;
	min-height: 60px;
	padding: 10px var(--global-edge-spacing, 1.5rem);
}

/* ── Reduce tan gap between hero band and content box (half original) ────── */
.site-main {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

.content-area {
	padding-top: 2.5rem !important;
	margin-top: 0 !important;
}

.site-content {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

article.entry {
	margin-top: 0 !important;
}

/* ── Hero band (pages with title) ───────────────────────────────────────── */
.entry-hero-container-inner {
	min-height: 60px !important;
}

/* Row layout: sigil left, title centred via absolute positioning trick */
.entry-hero-container-inner .entry-header {
	min-height: 60px !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	position: relative !important;
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	justify-content: center !important;
}

.entry-hero-container-inner .entry-header .bp-sigil-btn {
	position: absolute !important;
	left: 0;
}

.entry-hero-container-inner .entry-header .bp-section-symbol {
	position: absolute !important;
	right: 0;
}

/* Page title inside the band: small caps, tracked */
.entry-hero-container-inner .entry-header .entry-title {
	font-family: 'EB Garamond', Georgia, serif !important;
	font-size: 1rem !important;
	font-variant: small-caps;
	letter-spacing: 0.15em;
	text-transform: none;
	margin: 0;
}

/* ── Sigil lightbox ──────────────────────────────────────────────────────── */
#bp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}

#bp-lightbox[hidden] {
	display: none;
}

.bp-lightbox-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
}

.bp-lightbox-content {
	position: relative;
	z-index: 1;
	background: #f5f0e8;
	padding: 2rem;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bp-lightbox-content img {
	width: 440px;
	max-width: 90vw;
	height: auto;
	display: block;
}

.bp-lightbox-close {
	position: absolute !important;
	top: 0.5rem !important;
	right: 0.75rem !important;
	background: none !important;
	border: none !important;
	font-size: 1.75rem !important;
	line-height: 1 !important;
	cursor: pointer !important;
	color: #2a1a0e !important;
	padding: 0 !important;
	margin: 0 !important;
}

.bp-lightbox-close:hover {
	opacity: 0.6;
	background: none !important;
}

body.bp-lightbox-open {
	overflow: hidden;
}

/* ── Rabbit page: two-column layout ─────────────────────────────────────── */
.bp-two-col {
	display: flex;
	gap: 2.5rem;
	align-items: flex-start;
	margin-bottom: 2.5rem;
}

.bp-two-col__photo {
	flex: 0 0 40%;
	max-width: 40%;
}

.bp-two-col__photo img {
	display: block;
	max-width: 100%;
	height: auto;
}

.bp-two-col__text {
	flex: 1;
}

.bp-rabbit-links p {
	margin-bottom: 0.5rem;
}

@media ( max-width: 767px ) {
	.bp-two-col {
		flex-direction: column;
	}

	.bp-two-col__photo {
		max-width: 100%;
	}
}

/* ── Retinal page: portrait video grid ──────────────────────────────────── */
.bp-video-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 0.5rem;
	margin: 1em 0;
}

/* Each video: viewport height minus band, padding, and title row */
.bp-video-portrait {
	position: relative;
	height: calc(100vh - 280px);
	overflow: hidden;
	background: #000;
}

/* Song title above each video */
.bp-video-title {
	font-family: 'EB Garamond', Georgia, serif;
	font-size: 0.75rem;
	font-weight: 700;
	font-variant: small-caps;
	letter-spacing: 0.06em;
	color: #2a1a0e;
	text-align: center;
	margin: 0 0 0.3em !important;
}

.bp-video-portrait iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Thumbnail replaces iframe in grid */
.bp-video-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Play button overlay */
.bp-video-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: rgba(255, 255, 255, 0.85);
	font-size: 2.5rem;
	line-height: 1;
	pointer-events: none;
	text-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
}

.bp-video-portrait:hover .bp-video-play {
	color: #fff;
}

@media ( max-width: 767px ) {
	.bp-video-grid {
		grid-template-columns: 1fr;
	}
}

/* ── Video lightbox ──────────────────────────────────────────────────────── */
#bp-video-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99998;
	display: flex;
	align-items: center;
	justify-content: center;
}

#bp-video-lightbox[hidden] {
	display: none;
}

.bp-vlb-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.88);
}

.bp-vlb-content {
	position: relative;
	z-index: 1;
	height: 90vh;
	width: calc(90vh * 9 / 16);
	max-width: 95vw;
}

.bp-vlb-frame {
	width: 100%;
	height: 100%;
}

.bp-vlb-frame iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.bp-vlb-close {
	position: absolute !important;
	top: -2.25rem !important;
	right: 0 !important;
	background: none !important;
	border: none !important;
	color: #fff !important;
	font-size: 2rem !important;
	line-height: 1 !important;
	cursor: pointer !important;
	padding: 0 !important;
}

.bp-vlb-close:hover {
	opacity: 0.7;
}

/* ── Section break: asterism ⁂ ──────────────────────────────────────────── */
.bp-asterism {
	text-align: center;
	color: #8B1A1A;
	font-size: 1.4rem;
	line-height: 1;
	margin: 2.5em 0 !important;
}

/* ── Reverie: table of contents ──────────────────────────────────────────── */
.bp-toc-wrap {
	display: flex;
	justify-content: center;
}

.bp-toc-grid {
	display: grid;
	grid-template-columns: 1fr;
	column-gap: 5em;
	row-gap: 0;
	font-family: 'EB Garamond', Georgia, serif;
	font-size: 1.15em;
	width: 100%;
	max-width: 41em;
}

.bp-toc-entry {
	display: flex;
	align-items: baseline;
	gap: 0.3em;
	padding: 0.45em 0;
}

.bp-toc-title {
	color: #8B1A1A;
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
}

.bp-toc-title:hover {
	opacity: 0.75;
}

.bp-toc-leaders {
	flex: 1;
	overflow: hidden;
	color: #c0a882;
	min-width: 1.5em;
}

.bp-toc-leaders::after {
	content: ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .";
	white-space: nowrap;
}

.bp-toc-num {
	color: #2a1a0e;
	flex-shrink: 0;
	white-space: nowrap;
	font-variant-numeric: oldstyle-nums;
}

@media ( max-width: 767px ) {
	.bp-toc-wrap {
		display: block;
	}
	.bp-toc-grid {
		grid-template-columns: 1fr;
		max-width: none;
	}
	.bp-toc-entry {
		display: block;
		padding: 0.5em 0;
	}
	.bp-toc-leaders,
	.bp-toc-num {
		display: none;
	}
}

@media ( min-width: 768px ) {
	.bp-toc-grid {
		grid-template-columns: 18em 18em;
		grid-template-rows: repeat(4, auto);
		grid-auto-flow: column;
	}
}

/* ── Drop caps ───────────────────────────────────────────────────────────── */
.home .entry-content > p:first-of-type::first-letter,
.page-id-2 .entry-content > p:first-of-type::first-letter,
.page-id-846 .entry-content > p:nth-of-type(2)::first-letter,
.page-id-107 .bp-two-col__text > p:first-of-type::first-letter,
.page-id-309 .entry-content > p:first-of-type::first-letter,
.page-id-549 .entry-content > p:first-of-type::first-letter,
.page-id-847 .entry-content > p:first-of-type::first-letter {
	float: left;
	font-family: 'EB Garamond', Georgia, serif;
	font-size: 3em;
	line-height: 0.8;
	color: #8B1A1A;
	padding-right: 4px;
	margin-top: 0.05em;
}

/* Rummage: push links below the drop cap float */
.page-id-847 .entry-content > p:nth-of-type(2) {
	clear: left;
	margin-top: 2.5em !important;
}

/* ── Reverie poem footer nav ─────────────────────────────────────────────── */
.bp-reverie-nav {
	text-align: center;
	margin-top: 3em;
	padding-top: 1em;
}

.bp-reverie-nav .bp-asterism {
	margin-bottom: 0.75em !important;
}

.bp-reverie-return {
	display: block;
	font-size: 0.8rem;
	font-variant: small-caps;
	letter-spacing: 0.12em;
	color: #8B1A1A;
	text-decoration: none;
}

.bp-reverie-return:hover {
	opacity: 0.75;
}

/* ── Notify me / submit buttons: burgundy ───────────────────────────────── */
input[type="submit"],
button[type="submit"],
.wp-block-button__link,
.button {
	background-color: #8B1A1A !important;
	border-color: #8B1A1A !important;
	color: #fff !important;
	font-family: 'EB Garamond', Georgia, serif !important;
}

input[type="submit"]:hover,
button[type="submit"]:hover {
	background-color: #6e1414 !important;
	border-color: #6e1414 !important;
}

/* ── Manifesto: title + subtitle stacked in the accent band ──────────────── */
.page-id-848 .entry-hero-container-inner {
	min-height: 80px !important;
}

.page-id-848 .entry-hero-container-inner .entry-header {
	flex-direction: column !important;
	gap: 0.2em;
}

.bp-band-subtitle {
	font-family: 'EB Garamond', Georgia, serif;
	font-size: 0.75rem;
	font-weight: 400;
	font-style: italic;
	letter-spacing: 0.06em;
	text-align: center;
	display: block;
}

/* ── Home page: two-column layout with photo ─────────────────────────────── */
.bp-home-layout {
	display: flex;
	gap: 3rem;
	align-items: flex-start;
}

.bp-home-text {
	flex: 1;
}

.bp-home-photo {
	flex: 0 0 auto;
}

.bp-home-photo img {
	display: block;
	max-height: 50vh;
	width: auto;
	max-width: 100%;
}

.bp-photo-caption {
	text-align: center;
	font-family: 'EB Garamond', Georgia, serif;
	font-size: 0.85rem;
	font-variant: small-caps;
	letter-spacing: 0.1em;
	color: #8B1A1A;
	margin-top: 0.5em !important;
	margin-bottom: 0 !important;
}

@media ( max-width: 767px ) {
	.bp-home-layout {
		flex-direction: column;
	}

	.bp-home-photo {
		flex: none;
		max-width: 100%;
		width: 100%;
	}
}

/* ── Easter Bunny letters: restore spacing on prose, skip indented poem lines */
.postid-23 .entry-content p:not([style*="0.5in"]),
.postid-24 .entry-content p:not([style*="0.5in"]) {
	margin-bottom: 0.8em !important;
}

/* Space after verse block — prose paragraph that follows a verse line */
.postid-23 .entry-content p[style*="0.5in"] + p:not([style*="0.5in"]),
.postid-24 .entry-content p[style*="0.5in"] + p:not([style*="0.5in"]) {
	margin-top: 0.8em !important;
}

/* Post 25 uses divs — space before and after indented verse divs */
.postid-25 .entry-content div:not([style*="margin-left"]) + div[style*="margin-left"],
.postid-25 .entry-content div[style*="margin-left"] + div:not([style*="margin-left"]) {
	margin-top: 0.8em !important;
}

/* ── Rite page: tighten paragraph spacing to fit on one screen ───────────── */
.page-id-846 .entry-content p,
.page-id-846 .entry-content h2 {
	margin-top: 0.3em !important;
	margin-bottom: 0.3em !important;
}

.page-id-846 .entry-content hr {
	margin-top: 0.5em !important;
	margin-bottom: 0.5em !important;
}

.page-id-846 .mc4wp-form {
	margin-top: 0.5em !important;
}

/* ── Retinal page ────────────────────────────────────────────────────────── */
.bp-see-also {
	font-family: 'EB Garamond', Georgia, serif;
	font-size: 0.9rem;
	font-style: italic;
	margin-bottom: 1em !important;
}


/* ── Resonance page: link block ──────────────────────────────────────────── */
.bp-resonance-links {
	margin-top: 1.25em !important;
}

.bp-resonance-links a {
	font-family: 'EB Garamond', Georgia, serif;
	font-size: 1rem;
	color: #8B1A1A;
	text-decoration: none;
}

.bp-resonance-links a:hover {
	opacity: 0.75;
}

/* ── MC4WP signup form: site-matched styling ────────────────────────────── */
.mc4wp-form {
	margin-top: 1.5em;
}

.mc4wp-form p {
	margin-bottom: 0.5em !important;
}

.mc4wp-form input[type="email"] {
	font-family: 'EB Garamond', Georgia, serif !important;
	font-size: 1rem;
	background: transparent;
	border: none;
	border-bottom: 1px solid #999;
	border-radius: 0;
	padding: 4px 0;
	width: 280px;
	max-width: 100%;
	outline: none;
	box-shadow: none;
}

.mc4wp-form input[type="email"]::placeholder {
	color: #999;
	font-style: italic;
}

.mc4wp-form input[type="email"]:focus {
	border-bottom-color: #8B1A1A;
}

/* ── Site title: EB Garamond, bold, burgundy ─────────────────────────────── */
.site-branding .site-title a,
.site-title a {
	font-family: 'EB Garamond', Georgia, serif !important;
	font-weight: 700 !important;
	color: #8B1A1A !important;
	text-decoration: none !important;
}

/* ── Permanent font-weight locks (must stay at end of file) ─────────────── */
/* High specificity + !important beats Kadence inline style blocks.          */
html body #site-navigation a,
html body .kadence-navigation a,
html body .primary-menu a,
html body .primary-menu li a,
html body .nav--toggle-sub a {
	font-weight: 700 !important;
}

html body .entry-hero-container-inner .entry-header .entry-title {
	font-weight: 700 !important;
}
