/*
Theme Name: Network Template
Theme URI: https://internetoutreachexperts.com/templates/network/
Author: Internet Outreach Experts
Author URI: https://internetoutreachexperts.com
Description: Operational confidence for multi-site megachurches. Slate + signal yellow, DM Serif Display + DM Sans. Sticky campus selector that drives the whole site experience, interactive campus map with pins, per-campus details, large leadership grid. Built for churches with 3-25 locations.
Version: 1.0.0
License: Proprietary — IOE customer use only
Text Domain: network-template
*/

/*
 * THE NETWORK — multi-campus megachurch template
 * Aesthetic: Operational confidence. The site IS a wayfinding system.
 * Slate + signal yellow. Campus selector is the hero.
 */

:root {
	--slate: #2c3e50;
	--slate-deep: #1a2733;
	--slate-soft: #3d5066;
	--slate-line: #d8dde4;
	--white: #ffffff;
	--mist: #f5f6f8;
	--mist-deep: #e8ebef;
	--yellow: #ffc940;
	--yellow-deep: #d9a01f;
	--yellow-glow: rgba(255, 201, 64, 0.18);
	--ink: #0f1822;
	--text: #1e2936;
	--text-soft: #556170;
	--text-muted: #8892a1;
	--border: #d1d6de;

	--font-display: 'DM Serif Display', 'Georgia', serif;
	--font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
	--font-mono: 'DM Mono', ui-monospace, monospace;

	--page-max: 1320px;
	--gutter: clamp(1.25rem, 4vw, 3rem);
	--ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--text);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; height: auto; display: block; }
button { font: inherit; border: 0; background: none; cursor: pointer; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
a { color: var(--slate); text-decoration: none; }
a:hover { color: var(--yellow-deep); }
::selection { background: var(--yellow); color: var(--ink); }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 400;
	line-height: 1.08;
	letter-spacing: -0.015em;
	color: var(--ink);
	margin: 0 0 .5em;
}
h1 { font-size: clamp(2.5rem, 1.8rem + 4vw, 5.5rem); font-weight: 400; }
h2 { font-size: clamp(1.8rem, 1.3rem + 2.5vw, 3.25rem); font-weight: 400; }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.75rem); font-weight: 400; }
h4 { font-size: 1.15rem; font-weight: 500; letter-spacing: 0; font-family: var(--font-body); }

h1 em, h2 em, h3 em { font-style: italic; font-weight: 400; color: var(--slate-soft); }

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--yellow-deep);
}
.eyebrow::before {
	content: '■';
	color: var(--yellow);
	font-size: 0.9em;
}
.eyebrow.solo::before { display: none; }

p { margin: 0 0 1em; max-width: 64ch; }
p.lead { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); line-height: 1.55; color: var(--text-soft); max-width: 44ch; font-weight: 400; }

.wrap { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: clamp(4rem, 3rem + 4vw, 6rem) 0; }
.section-tight { padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0; }

/* BUTTONS */
.btn {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	padding: .9em 1.6em;
	font-family: var(--font-body);
	font-weight: 500;
	font-size: 0.95rem;
	background: var(--yellow);
	color: var(--ink);
	border: 0;
	border-radius: 4px;
	text-decoration: none;
	transition: background .2s var(--ease), transform .15s var(--ease);
	cursor: pointer;
}
.btn:hover { background: var(--yellow-deep); color: var(--ink); text-decoration: none; transform: translateY(-1px); }
.btn-slate { background: var(--slate); color: var(--white); }
.btn-slate:hover { background: var(--slate-deep); color: var(--white); }
.btn-ghost { background: transparent; color: var(--slate); border: 1px solid var(--slate-line); }
.btn-ghost:hover { background: var(--mist); color: var(--slate-deep); }
.btn-lg { padding: 1.1em 1.9em; font-size: 1rem; }
.btn-sm { padding: .55em 1em; font-size: 0.85rem; }

/* HEADER WITH CAMPUS SELECTOR */
.masthead {
	background: var(--slate);
	color: var(--white);
	position: sticky;
	top: 0;
	z-index: 50;
}
.masthead-inner {
	max-width: var(--page-max);
	margin: 0 auto;
	padding: .9rem var(--gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	color: var(--white);
	text-decoration: none;
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 400;
	letter-spacing: -0.005em;
}
.brand:hover { color: var(--white); text-decoration: none; }
.brand-mark {
	width: 30px; height: 30px;
	background: var(--yellow);
	border-radius: 4px;
	position: relative;
}
.brand-mark::before {
	content: '';
	position: absolute;
	inset: 6px;
	border: 2px solid var(--slate);
	border-radius: 2px;
}

.campus-selector {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	padding: .45rem .9rem .45rem .7rem;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 4px;
	color: var(--white);
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	transition: background .15s var(--ease);
}
.campus-selector:hover { background: rgba(255, 255, 255, 0.15); }
.campus-selector-label {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	color: var(--yellow);
	text-transform: uppercase;
}
.campus-selector-value { font-family: var(--font-body); font-weight: 500; }
.campus-selector::after { content: '▾'; font-size: 0.7em; opacity: .7; }

.primary-menu { display: flex; gap: .25rem; align-items: center; }
.primary-menu a {
	padding: .45rem .9rem;
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.92rem;
	font-weight: 500;
	border-radius: 4px;
	text-decoration: none;
}
.primary-menu a:hover { background: rgba(255, 255, 255, 0.1); color: var(--white); }
.primary-menu a.current { color: var(--yellow); }

.nav-right { display: flex; gap: .75rem; align-items: center; }
.menu-toggle { display: none; color: var(--white); border: 1px solid rgba(255,255,255,0.2); padding: .45rem .8rem; border-radius: 4px; }

@media (max-width: 960px) {
	.masthead-inner { flex-wrap: wrap; }
	.menu-toggle { display: inline-flex; }
	.campus-selector { order: 2; }
	.primary-menu {
		order: 4; width: 100%;
		flex-direction: column;
		align-items: stretch;
		padding-top: .75rem;
		margin-top: .75rem;
		border-top: 1px solid rgba(255,255,255,0.15);
		display: none;
	}
	.primary-menu.is-open { display: flex; }
	.primary-menu a { padding: .7rem 0; text-align: center; border-radius: 0; }
}

/* HERO — CAMPUS MAP */
.hero {
	padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0 clamp(2rem, 1.5rem + 2vw, 3.5rem);
	background: var(--white);
	background-image:
		radial-gradient(circle at 15% 15%, var(--yellow-glow), transparent 45%);
}
.hero-inner { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }

.hero-header { margin-bottom: 3rem; max-width: 48ch; }
.hero-header h1 { margin: 1.25rem 0 1.25rem; }
.hero-header p.lead { max-width: 40ch; }

.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.75rem; }

/* Campus locator */
.locator {
	background: var(--mist);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 0;
	margin-top: 2.5rem;
	overflow: hidden;
}
.locator-header {
	padding: 1.25rem 1.75rem;
	background: var(--white);
	border-bottom: 1px solid var(--border);
	display: flex;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
}
.locator-header h3 { margin: 0; font-family: var(--font-body); font-size: 1.05rem; font-weight: 500; color: var(--slate); }
.locator-header h3 em { font-style: normal; color: var(--yellow-deep); }
.locator-meta { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; color: var(--text-muted); }

.locator-body {
	display: grid;
	grid-template-columns: 1fr;
}
@media (min-width: 920px) { .locator-body { grid-template-columns: 4fr 5fr; } }

.locator-map {
	aspect-ratio: 5 / 4;
	position: relative;
	background: linear-gradient(135deg, var(--slate-deep), var(--slate));
	overflow: hidden;
	min-height: 320px;
}
.locator-map::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image:
		/* Grid lines */
		linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
	background-size: 40px 40px;
}
.campus-pin {
	position: absolute;
	display: flex;
	align-items: center;
	gap: .5rem;
	transform: translate(-50%, -50%);
	color: var(--white);
	cursor: pointer;
	transition: transform .2s var(--ease);
}
.campus-pin:hover { transform: translate(-50%, -50%) scale(1.05); }
.campus-pin .dot {
	width: 14px; height: 14px;
	background: var(--yellow);
	border-radius: 50%;
	box-shadow: 0 0 0 4px rgba(255, 201, 64, 0.3), 0 2px 8px rgba(0,0,0,0.3);
	position: relative;
}
.campus-pin.active .dot {
	box-shadow: 0 0 0 6px rgba(255, 201, 64, 0.4), 0 0 0 14px rgba(255, 201, 64, 0.15);
	animation: pin-pulse 2s ease-in-out infinite;
}
@keyframes pin-pulse {
	0%, 100% { box-shadow: 0 0 0 6px rgba(255, 201, 64, 0.4), 0 0 0 14px rgba(255, 201, 64, 0.15); }
	50% { box-shadow: 0 0 0 6px rgba(255, 201, 64, 0.5), 0 0 0 22px rgba(255, 201, 64, 0); }
}
.campus-pin .label {
	font-family: var(--font-body);
	font-size: 0.78rem;
	font-weight: 500;
	padding: .25rem .55rem;
	background: var(--white);
	color: var(--slate);
	border-radius: 3px;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.locator-list {
	padding: 1rem;
	background: var(--white);
	overflow-y: auto;
	max-height: 420px;
}
.campus-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: .75rem 1rem;
	padding: 1rem;
	border-radius: 8px;
	border: 1px solid transparent;
	transition: background .15s var(--ease), border-color .15s var(--ease);
	cursor: pointer;
	align-items: center;
}
.campus-row:hover { background: var(--mist); }
.campus-row.active { background: var(--mist-deep); border-color: var(--yellow); }
.campus-row .name {
	font-family: var(--font-display);
	font-size: 1.2rem;
	color: var(--slate-deep);
}
.campus-row .distance {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	color: var(--yellow-deep);
	text-transform: uppercase;
	text-align: right;
}
.campus-row .address {
	font-size: 0.88rem;
	color: var(--text-soft);
	grid-column: 1 / -1;
}
.campus-row .times {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.05em;
	color: var(--slate);
	grid-column: 1 / -1;
}

/* METRIC STRIP */
.metric-strip {
	background: var(--slate-deep);
	color: var(--white);
	padding: 2rem 0;
}
.metric-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem;
	max-width: var(--page-max);
	margin: 0 auto;
	padding: 0 var(--gutter);
}
@media (min-width: 760px) { .metric-grid { grid-template-columns: repeat(4, 1fr); } }
.metric {
	text-align: left;
}
.metric-num {
	font-family: var(--font-display);
	font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
	color: var(--yellow);
	font-weight: 400;
	line-height: 1;
}
.metric-label {
	font-family: var(--font-mono);
	font-size: 0.74rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.65);
	margin-top: .5rem;
}

/* FEATURE CARDS */
.feature-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}
@media (min-width: 720px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 1.75rem;
	display: flex;
	flex-direction: column;
	gap: .75rem;
	transition: border-color .2s var(--ease), transform .2s var(--ease);
	position: relative;
}
.feature-card:hover { border-color: var(--yellow); transform: translateY(-2px); }
.feature-icon {
	width: 40px; height: 40px;
	background: var(--yellow);
	border-radius: 6px;
	display: grid; place-items: center;
	color: var(--slate-deep);
	margin-bottom: .25rem;
}
.feature-card h3 { margin: 0; font-family: var(--font-body); font-weight: 500; font-size: 1.2rem; color: var(--slate-deep); letter-spacing: -0.005em; }
.feature-card p { margin: 0; color: var(--text-soft); font-size: 0.95rem; }
.feature-card-link { margin-top: auto; padding-top: .5rem; color: var(--yellow-deep); font-weight: 500; font-size: 0.88rem; text-decoration: none; }
.feature-card-link::after { content: ' →'; }

/* LEADERSHIP GRID */
.leaders-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.25rem;
}
@media (min-width: 760px) { .leaders-grid { grid-template-columns: repeat(4, 1fr); } }
.leader {
	text-align: left;
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 1.25rem;
	transition: border-color .2s;
}
.leader:hover { border-color: var(--yellow); }
.leader-avatar {
	aspect-ratio: 1;
	background: linear-gradient(135deg, var(--slate-soft), var(--slate-deep));
	border-radius: 4px;
	display: grid; place-items: center;
	color: var(--yellow);
	font-family: var(--font-display);
	font-size: 2rem;
	font-weight: 400;
	margin-bottom: .75rem;
}
.leader h4 { margin: 0 0 .15em; color: var(--slate-deep); }
.leader-role {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	color: var(--text-muted);
	text-transform: uppercase;
}
.leader-campus {
	font-size: 0.82rem;
	color: var(--yellow-deep);
	font-weight: 500;
	margin-top: .4rem;
}

/* CTA BAND */
.cta-band {
	background: var(--yellow);
	color: var(--ink);
	padding: clamp(3rem, 2rem + 4vw, 5rem) 0;
}
.cta-band h2 { color: var(--ink); max-width: 16ch; margin: 1rem 0 1.25rem; }
.cta-band h2 em { color: var(--slate); }
.cta-band p { color: var(--slate-deep); max-width: 48ch; margin-bottom: 2rem; }
.cta-band .btn { background: var(--slate); color: var(--white); }
.cta-band .btn:hover { background: var(--slate-deep); color: var(--white); }
.cta-band .btn-ghost { background: transparent; color: var(--ink); border-color: rgba(15, 24, 34, 0.3); }
.cta-band .btn-ghost:hover { background: var(--slate); color: var(--white); border-color: var(--slate); }
.cta-band .eyebrow { color: var(--slate); }
.cta-band .eyebrow::before { color: var(--slate); }

/* PAGE BANNER */
.page-banner {
	padding: clamp(3rem, 2rem + 3vw, 5rem) 0 clamp(2rem, 1.5rem + 2vw, 3rem);
	background: var(--mist);
	border-bottom: 1px solid var(--border);
}
.page-banner-inner { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }
.page-banner h1 { margin: .75rem 0 1rem; max-width: 18ch; }
.page-banner h1 em { color: var(--yellow-deep); }

/* FOOTER */
.site-footer {
	background: var(--slate-deep);
	color: rgba(255, 255, 255, 0.75);
	padding: clamp(3rem, 2rem + 3vw, 4.5rem) 0 1.5rem;
}
.footer-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
	max-width: var(--page-max);
	margin: 0 auto;
	padding: 0 var(--gutter);
}
@media (min-width: 780px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.footer-brand .brand { color: var(--white); }
.footer-brand p { color: rgba(255, 255, 255, 0.7); max-width: 30ch; font-size: 0.95rem; margin-top: 1rem; }
.footer-col h5 {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--yellow);
	margin: 0 0 1rem;
	font-weight: 500;
}
.footer-col ul { display: flex; flex-direction: column; gap: .45rem; }
.footer-col a { color: rgba(255, 255, 255, 0.78); font-size: 0.95rem; }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom {
	margin-top: 3rem;
	padding: 1.5rem var(--gutter) 0;
	max-width: var(--page-max);
	margin-left: auto; margin-right: auto;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.5);
}

/* PROSE */
.prose { max-width: 720px; margin: 0 auto; padding: clamp(2.5rem, 1.5rem + 3vw, 4rem) var(--gutter); font-size: 1rem; line-height: 1.7; color: var(--text); }
.prose p { margin: 0 0 1.2em; max-width: 100%; color: var(--text-soft); }
.prose p strong { color: var(--slate-deep); }
.prose h2 { margin: 2em 0 .5em; }
.prose h3 { margin: 1.5em 0 .4em; color: var(--slate); font-family: var(--font-body); font-weight: 500; font-size: 1.15rem; letter-spacing: -0.005em; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 1em 0 1.5em; }
.prose ul li::marker { color: var(--yellow-deep); }

/* MOTION */
@media (prefers-reduced-motion: no-preference) {
	.hero-header > *:nth-child(1) { animation: n-rise 0.8s var(--ease) both; }
	.hero-header > *:nth-child(2) { animation: n-rise 0.8s 0.1s var(--ease) both; }
	.hero-header > *:nth-child(3) { animation: n-rise 0.8s 0.2s var(--ease) both; }
	.hero-header > *:nth-child(4) { animation: n-rise 0.8s 0.3s var(--ease) both; }
	.locator { animation: n-rise 0.9s 0.4s var(--ease) both; }
}
@keyframes n-rise {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: none; }
}

/* ========== PHOTO COMPONENTS ========== */

/* Photo variant of leader-avatar — square card header with photo */
.leader-avatar.leader-avatar--photo {
	background: none;
	padding: 0;
	font-size: 0;
	overflow: hidden;
}
.leader-avatar.leader-avatar--photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 25%;
	display: block;
}

/* Full-width photo band — capped height with centered crop */
.photo-band {
	width: 100%;
	display: block;
	margin: 0;
	background: var(--mist);
	overflow: hidden;
}
.photo-band img {
	width: 100%;
	height: auto;
	display: block;
	max-height: clamp(280px, 32vw, 540px);
	object-fit: cover;
	object-position: center;
}

/* Inset photo inside body content */
.photo-inset {
	margin: 2.5rem auto;
	border-radius: 8px;
	overflow: hidden;
	max-width: 880px;
	border: 1px solid var(--border);
}
.photo-inset img {
	width: 100%;
	height: auto;
	display: block;
}
