/*
Theme Name:   JJ Bailey Ministries
Theme URI:    https://jjbaileyministries.org
Description:  Standalone WordPress theme for JJ Bailey Ministries. Carries the conference palette and typography, and works with the JJB Conference Registration plugin. No parent theme required; compatible with Themify Builder or Gutenberg if either is added later.
Author:       JJ Bailey Ministries
Version:      1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License:      GPL-2.0-or-later
Text Domain:  jjb
*/

/* ============================================================
   Tokens
   ============================================================ */

:root {
	--jjb-purple: #6D3B8C;
	--jjb-gold:   #F4D35E;
	--jjb-plum:   #2D2338;
	--jjb-cream:  #FFFAF3;
	--jjb-mist:   #EEE4F2;
	--jjb-line:   #D8C5E1;
	--jjb-body:   #46384F;
	--jjb-white:  #FFFFFF;

	--jjb-display: "Playfair Display", Georgia, "Times New Roman", serif;
	--jjb-text: "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;

	--jjb-wide: 80rem;
	--jjb-narrow: 46rem;
}

/* ============================================================
   Base
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--jjb-text);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--jjb-plum);
	background: var(--jjb-cream);
	-webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }

a { color: var(--jjb-purple); }

h1, h2, h3, h4 {
	font-family: var(--jjb-display);
	font-weight: 700;
	line-height: 1.15;
	color: var(--jjb-purple);
	margin: 0 0 1rem;
}

h1 { font-size: clamp(2rem, 1.35rem + 2.8vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + .7vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin: 0 0 1.25rem; color: var(--jjb-body); }

blockquote {
	margin: 1.5rem 0;
	padding: .25rem 0 .25rem 1.25rem;
	border-left: 4px solid var(--jjb-gold);
	border-radius: 0;
	font-family: var(--jjb-display);
	font-size: 1.125rem;
	color: var(--jjb-plum);
}

:focus-visible {
	outline: 3px solid var(--jjb-gold);
	outline-offset: 3px;
}

.jjb-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	padding: .75rem 1.25rem;
	background: var(--jjb-purple);
	color: #fff;
	font-weight: 700;
}

.jjb-skip:focus { left: 0; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ============================================================
   Layout
   ============================================================ */

.jjb-wrap {
	width: 100%;
	max-width: var(--jjb-wide);
	margin: 0 auto;
	padding: 0 1.25rem;
}

@media (min-width: 640px) { .jjb-wrap { padding: 0 2rem; } }

.jjb-section { padding: clamp(3rem, 6vw, 4.5rem) 0; }

.jjb-row--white { background: var(--jjb-white); }
.jjb-row--cream { background: var(--jjb-cream); }
.jjb-row--mist  { background: var(--jjb-mist); }
.jjb-row--plum  { background: var(--jjb-plum); }

.jjb-row--plum, .jjb-row--plum p, .jjb-row--plum h2 { color: var(--jjb-white); }

.jjb-split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .jjb-split { grid-template-columns: .92fr 1.08fr; } }

/* Content area for regular pages and posts. */
.jjb-content { max-width: var(--jjb-narrow); margin: 0 auto; }
.jjb-content ul, .jjb-content ol { margin: 0 0 1.25rem 1.25rem; color: var(--jjb-body); }
.jjb-content li { margin-bottom: .4rem; }
.jjb-content img { border-radius: 1rem; }

/* Full-bleed for shortcode sections dropped into the editor. */
.jjb-content > .jjb-hero,
.jjb-content > .jjb-verse {
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* ============================================================
   Header
   ============================================================ */

.jjb-header {
	background: var(--jjb-white);
	border-bottom: 1px solid #E4D8E9;
	position: sticky;
	top: 0;
	z-index: 50;
}

.jjb-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.jjb-brand {
	display: inline-flex;
	align-items: center;
	gap: .75rem;
	text-decoration: none;
}

.jjb-brand__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	flex: none;
	border-radius: 50%;
	background: var(--jjb-mist);
	color: var(--jjb-purple);
}

.jjb-brand__name {
	font-family: var(--jjb-display);
	font-weight: 700;
	font-size: 1.3125rem;
	line-height: 1.2;
	color: var(--jjb-purple);
}

.jjb-nav ul {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.jjb-nav a {
	font-weight: 700;
	color: var(--jjb-purple);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	padding-bottom: 2px;
	transition: border-color 180ms ease, color 180ms ease;
}

.jjb-nav a:hover,
.jjb-nav .current-menu-item > a {
	color: var(--jjb-plum);
	border-bottom-color: var(--jjb-gold);
}

.jjb-nav__toggle {
	display: none;
	align-items: center;
	gap: .5rem;
	min-height: 44px;
	padding: .5rem .9rem;
	border: 1px solid var(--jjb-line);
	border-radius: 999px;
	background: var(--jjb-white);
	color: var(--jjb-purple);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

@media (max-width: 860px) {
	.jjb-nav__toggle { display: inline-flex; }
	.jjb-nav {
		display: none;
		width: 100%;
		order: 3;
		padding-bottom: 1rem;
	}
	.jjb-nav.is-open { display: block; }
	.jjb-nav ul { flex-direction: column; align-items: flex-start; gap: 0; }
	.jjb-nav li { width: 100%; border-top: 1px solid #EFE7F3; }
	.jjb-nav a { display: block; padding: .9rem 0; border-bottom: 0; }
	.jjb-header__inner { flex-wrap: wrap; }
}

/* ============================================================
   Footer
   ============================================================ */

.jjb-footer { background: var(--jjb-plum); color: var(--jjb-white); }

.jjb-footer__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	padding-top: 1.75rem;
	padding-bottom: 1.75rem;
	text-align: center;
}

@media (min-width: 640px) {
	.jjb-footer__inner { flex-direction: row; text-align: left; }
}

.jjb-footer__name { margin: 0; font-weight: 700; color: var(--jjb-white); }
.jjb-footer__note { margin: 0; color: var(--jjb-gold); font-size: .9375rem; }
.jjb-footer a { color: var(--jjb-gold); }

/* ============================================================
   Eyebrow, lede, buttons
   ============================================================ */

.jjb-eyebrow {
	display: block;
	margin: 0 0 .75rem;
	font-family: var(--jjb-text);
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--jjb-purple);
}

.jjb-row--plum .jjb-eyebrow,
.jjb-hero .jjb-eyebrow { color: var(--jjb-gold); }

.jjb-lede { font-size: 1.125rem; color: var(--jjb-body); max-width: 40rem; }

.jjb-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .6rem;
	min-height: 52px;
	padding: .9rem 1.75rem;
	border: 2px solid transparent;
	border-radius: 999px;
	background: var(--jjb-gold);
	color: var(--jjb-plum);
	font-family: var(--jjb-text);
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.jjb-cta:hover, .jjb-cta:focus {
	transform: translateY(-2px);
	box-shadow: 0 10px 20px rgba(45, 35, 56, .2);
	filter: brightness(.98);
	color: var(--jjb-plum);
}

.jjb-cta--purple { background: var(--jjb-purple); color: var(--jjb-white); }
.jjb-cta--purple:hover, .jjb-cta--purple:focus { color: var(--jjb-white); }

/* ============================================================
   Hero
   ============================================================ */

.jjb-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 27.5rem;
	overflow: hidden;
	isolation: isolate;
}

.jjb-hero__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(.9) contrast(1.03);
	z-index: -2;
}

.jjb-hero__scrim {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg,
		rgba(45, 35, 56, .92) 0%,
		rgba(45, 35, 56, .76) 48%,
		rgba(45, 35, 56, .22) 100%);
}

.jjb-hero__inner {
	width: 100%;
	max-width: var(--jjb-wide);
	margin: 0 auto;
	padding: 4rem 1.25rem;
}

@media (min-width: 640px) { .jjb-hero__inner { padding: 4rem 2rem; } }

.jjb-hero__copy { max-width: 36rem; }
.jjb-hero__title { color: var(--jjb-white); margin: 0 0 1.5rem; }
.jjb-hero__text { color: var(--jjb-white); font-size: 1.125rem; margin: 0 0 2rem; max-width: 34rem; }

@media (max-width: 640px) {
	.jjb-hero { min-height: 32.5rem; }
	.jjb-hero__scrim { background: linear-gradient(180deg, rgba(45,35,56,.9), rgba(45,35,56,.64)); }
}

/* ============================================================
   Media, points, verse
   ============================================================ */

.jjb-media { position: relative; display: block; margin: 0; }

.jjb-media::before {
	content: "";
	position: absolute;
	top: -.75rem; left: -.75rem;
	width: 6rem; height: 6rem;
	border: 10px solid rgba(244, 211, 94, .45);
	border-radius: 50%;
	pointer-events: none;
}

.jjb-media img {
	position: relative;
	display: block;
	width: 100%;
	height: clamp(19rem, 30vw, 23rem);
	object-fit: cover;
	border-radius: 2rem;
	box-shadow: 0 16px 40px rgba(45, 35, 56, .14);
}

.jjb-points { display: grid; gap: .75rem; margin: 1.75rem 0 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .jjb-points { grid-template-columns: 1fr 1fr; } }

.jjb-point { display: flex; align-items: flex-start; gap: .75rem; margin: 0; color: var(--jjb-plum); }
.jjb-point svg { flex: none; width: 21px; height: 21px; margin-top: .2rem; color: var(--jjb-purple); }

.jjb-verse { background: var(--jjb-plum); text-align: center; padding: clamp(2.5rem, 5vw, 3.5rem) 1.25rem; }
.jjb-verse svg { width: 30px; height: 30px; color: var(--jjb-gold); margin-bottom: 1rem; }

.jjb-verse__text {
	font-family: var(--jjb-display);
	font-weight: 700;
	font-size: clamp(1.35rem, 1rem + 1.5vw, 1.7rem);
	line-height: 1.35;
	color: var(--jjb-white);
	max-width: 48rem;
	margin: 0 auto;
	border: 0;
	padding: 0;
}

.jjb-verse__cite {
	display: block;
	margin-top: 1rem;
	font-family: var(--jjb-text);
	font-size: .9375rem;
	font-style: normal;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--jjb-gold);
}

/* ============================================================
   Event listing
   ============================================================ */

.jjb-events { display: grid; gap: 1.5rem; }
@media (min-width: 700px)  { .jjb-events { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .jjb-events { grid-template-columns: repeat(3, 1fr); } }

.jjb-event {
	display: flex;
	flex-direction: column;
	background: var(--jjb-white);
	border: 1px solid var(--jjb-line);
	border-top: 6px solid var(--jjb-gold);
	border-radius: 1rem;
	overflow: hidden;
}

.jjb-event img { width: 100%; height: 11rem; object-fit: cover; border-radius: 0; }
.jjb-event__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.jjb-event__title { font-size: 1.25rem; margin: 0 0 .5rem; }
.jjb-event__meta { margin: 0 0 1rem; font-size: .9375rem; color: var(--jjb-purple); font-weight: 700; }
.jjb-event__excerpt { flex: 1; }

.jjb-event-meta {
	display: grid;
	gap: .5rem 1.5rem;
	margin: 0 0 2rem;
	padding: 1.25rem;
	background: var(--jjb-mist);
	border-radius: 1rem;
}

@media (min-width: 640px) { .jjb-event-meta { grid-template-columns: repeat(2, 1fr); } }
.jjb-event-meta p { margin: 0; }
.jjb-event-meta strong { color: var(--jjb-purple); }

/* ============================================================
   Pagination, comments-free extras
   ============================================================ */

.jjb-pagination { margin-top: 2.5rem; text-align: center; }
.jjb-pagination .page-numbers {
	display: inline-block;
	min-width: 44px;
	padding: .6rem .8rem;
	margin: 0 .15rem;
	border-radius: .5rem;
	text-decoration: none;
	color: var(--jjb-purple);
	font-weight: 700;
}
.jjb-pagination .current { background: var(--jjb-purple); color: #fff; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
	.jjb-cta:hover { transform: none; }
}

@media print {
	.jjb-header, .jjb-footer, .jjb-hero__media, .jjb-hero__scrim, .jjb-cta { display: none; }
	body { background: #fff; }
}
