/*
Theme Name: Battleground
Theme URI: https://battlegroundbaseballgroup.com
Author: Battleground Baseball Group
Description: Dark, data-driven block theme for Battleground Baseball Group. Black and gold, built for parents and players.
Version: 1.6.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: battleground
*/

:root {
	--bg-ink: #231F20;
	--bg-ink-2: #2A2627;
	--bg-line: #3A3536;
	--bg-line-2: #403A3B;
	--bg-chalk: #ECEAE4;
	--bg-muted: #B9B6AE;
	--bg-dim: #8A877F;
	--bg-gold: #BA9F67;
	--bg-gold-lt: #E6CB92;
	--bg-display: 'Saira Semi Condensed', 'Arial Narrow', sans-serif;
	--bg-mono: 'JetBrains Mono', ui-monospace, monospace;
	--bg-pad: clamp(20px, 3vw, 32px);
}

body { margin: 0; background: var(--bg-ink); color: var(--bg-chalk); }
.bg-main, .wp-site-blocks > * { margin-block-start: 0 !important; }
.bg-main p, .bg-main h1, .bg-main h2, .bg-main h3 { margin: 0; }

/* ---------- layout ---------- */
.bg-section { padding: clamp(64px, 8vw, 96px) var(--bg-pad); }
.bg-section > * { max-width: 1280px !important; margin-left: auto !important; margin-right: auto !important; width: 100%; }
.bg-section > * + * { margin-top: 48px !important; }
.bg-tight { padding-top: 28px; padding-bottom: 28px; }
.bg-alt { background: var(--bg-ink-2); border-top: 1px solid var(--bg-line); border-bottom: 1px solid var(--bg-line); }
.bg-ruled { border-top: 1px solid var(--bg-line); padding-top: 64px; padding-bottom: 64px; }
.bg-strip { background: var(--bg-ink-2); border-top: 1px solid var(--bg-line); border-bottom: 1px solid var(--bg-line); padding-top: 36px; padding-bottom: 36px; }
.bg-gold { background: var(--bg-gold); color: var(--bg-ink); }
.bg-gold a { color: var(--bg-ink); text-decoration: underline; }

.bg-hero { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.bg-hero-section { padding-top: clamp(64px, 9vw, 104px); }
.bg-hero-main { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.bg-hero > :not(.bg-hero-main) { flex: 1 1 380px; min-width: 0; }
.bg-head { display: flex; flex-wrap: wrap; gap: 24px 40px; justify-content: space-between; align-items: flex-end; }
.bg-head-main { display: flex; flex-direction: column; gap: 16px; flex: 1 1 480px; }
.bg-head > .bg-lede { flex: 1 1 360px; }
.bg-split { display: flex; flex-wrap: wrap; gap: 48px; }
.bg-split-left { flex: 1 1 300px; display: flex; flex-direction: column; gap: 16px; }
.bg-split > .bg-grid { flex: 2.2 1 600px; min-width: 0; }
.bg-grid { gap: 16px !important; }
.bg-steps .bg-card { min-height: 260px; }

/* ---------- type ---------- */
.bg-eyebrow { font-family: var(--bg-mono); font-size: 13px; letter-spacing: 0.14em; color: var(--bg-gold-lt); text-transform: uppercase; }
.bg-gold .bg-eyebrow { color: var(--bg-ink); }
.bg-h1 { font-size: clamp(48px, 6.4vw, 84px) !important; line-height: 0.92 !important; letter-spacing: -0.01em; }
.bg-h1-md { font-size: clamp(44px, 5vw, 64px) !important; margin-bottom: 32px !important; }
.bg-h2 { font-size: clamp(36px, 4.4vw, 56px) !important; }
.bg-h2-md { font-size: clamp(36px, 4vw, 48px) !important; }
.bg-h2-xl { font-size: clamp(46px, 5.8vw, 72px) !important; line-height: 0.92 !important; }
.bg-h3 { font-size: clamp(26px, 2.4vw, 32px) !important; font-weight: 700 !important; line-height: 1 !important; }
.bg-accent { color: var(--bg-gold-lt); }
.bg-lede { font-size: 17px; color: var(--bg-muted); max-width: 560px; }
.bg-lede-lg { font-size: 19px; }
.bg-gold .bg-lede, .bg-gold .bg-card-body { color: var(--bg-ink); }
.bg-tag { font-family: var(--bg-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--bg-gold-lt); }
.bg-tag-muted { font-family: var(--bg-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--bg-dim); margin-bottom: 4px !important; }
.bg-card-body { color: #A8A39A; font-size: 15px; }
.bg-link a { font-weight: 600; }
.bg-pill { font-family: var(--bg-mono); font-size: 11px; letter-spacing: 0.12em; padding: 6px 10px; background: var(--bg-gold); color: var(--bg-ink); }
.bg-news { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

/* ---------- cards ---------- */
.bg-card { border: 1px solid var(--bg-line-2); background: var(--bg-ink); padding: 28px; display: flex; flex-direction: column; gap: 12px; box-sizing: border-box; }
.bg-alt .bg-card, .bg-ruled .bg-card { background: var(--bg-ink-2); }
.bg-gold .bg-card { background: transparent; border-color: var(--bg-ink); }
.bg-card .bg-card-body { flex-grow: 1; }
.bg-price-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; border-top: 1px solid #3A3536; padding-top: 14px; margin-top: 4px; }
.bg-price { font-family: var(--bg-display); font-weight: 700; font-size: 32px; line-height: 1; }
.bg-price-note { font-family: var(--bg-mono); font-size: 11px; color: var(--bg-dim); }
.bg-start { gap: 14px; }
.bg-visit-card { gap: 22px; font-size: 15px; }

/* stats */
.bg-stat-n { font-family: var(--bg-display); font-weight: 700; font-size: 52px; line-height: 1; }
.bg-stat-l { font-size: 13px; color: var(--bg-dim); letter-spacing: 0.02em; }

/* commits */
.bg-commits { gap: 0 !important; }
.bg-commit { box-shadow: 0 0 0 1px var(--bg-ink); margin: 1px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.bg-commit-n { font-family: var(--bg-display); font-weight: 700; font-size: 24px; text-transform: uppercase; line-height: 1.05; }
.bg-commit-s { font-family: var(--bg-mono); font-size: 11px; }

/* staff + media */
.bg-staff { display: flex; flex-direction: column; gap: 6px; border-top: 2px solid var(--bg-gold); }
.bg-staff-n { font-family: var(--bg-display); font-weight: 700; font-size: 24px; text-transform: uppercase; line-height: 1.1; }
.bg-staff-r { font-size: 13px; color: var(--bg-dim); }
.bg-space { display: flex; flex-direction: column; gap: 12px; }
.bg-media { position: relative; background: linear-gradient(160deg, #2E2A2B, #1E1B1C); border: 1px solid #3A3536; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.bg-media figure, .bg-media .wp-block-image { margin: 0 !important; position: absolute; inset: 0; width: 100%; height: 100%; }
.bg-media img, .bg-media video { width: 100% !important; height: 100% !important; object-fit: cover; display: block; }
.bg-media-label { font-family: var(--bg-mono); font-size: 11px; color: #8A847A; text-align: center; padding: 16px; }
.bg-portrait { aspect-ratio: 4 / 5; }
.bg-wide { aspect-ratio: 3 / 2; }
.bg-map { aspect-ratio: 21 / 9; }
.bg-hero-media { aspect-ratio: 4 / 3; }
.bg-readouts { position: absolute; left: 20px; bottom: 20px; z-index: 2; background: rgba(35, 31, 32, 0.9); border: 1px solid #403A3B; padding: 12px 16px; }
.bg-readout { font-family: var(--bg-mono); font-size: 16px; color: var(--bg-gold-lt); }

/* ---------- buttons ---------- */
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--bg-chalk); border: 1px solid #4A4445; padding: 14px 23px; }
.wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: var(--bg-gold-lt); color: var(--bg-gold-lt); }
.wp-block-buttons { gap: 14px; }

/* ---------- header ---------- */
header.wp-block-template-part { position: sticky; top: 0; z-index: 50; background: rgba(35, 31, 32, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--bg-line); }
.bg-header { max-width: 1280px; margin: 0 auto; padding: 14px var(--bg-pad); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.bg-brand a { display: flex; align-items: center; gap: 12px; color: var(--bg-chalk); }
.bg-brand { display: flex; align-items: center; gap: 12px; }
.bg-mark { width: 40px; height: 40px; border: 2px solid var(--bg-gold); display: inline-flex; align-items: center; justify-content: center; font-family: var(--bg-display); font-weight: 800; font-size: 20px; color: var(--bg-gold); box-sizing: border-box; }
.bg-wordmark { font-family: var(--bg-display); font-weight: 700; font-size: 22px; letter-spacing: 0.06em; }
.bg-nav { gap: 28px; font-size: 14px; font-weight: 500; }
.bg-nav a { color: var(--bg-muted); }
.bg-nav a:hover, .bg-nav .current-menu-item a { color: var(--bg-chalk); }
.bg-header .wp-block-button__link { font-size: 14px; padding: 11px 18px; border-color: var(--bg-gold) !important; color: var(--bg-gold-lt) !important; }
.wp-block-navigation__responsive-container.is-menu-open { background: var(--bg-ink) !important; color: var(--bg-chalk) !important; }

/* ---------- footer ---------- */
.bg-footer { border-top: 1px solid var(--bg-line); padding: 56px var(--bg-pad) 32px; }
.bg-footer-cols { max-width: 1280px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.bg-footer-col { display: flex; flex-direction: column; gap: 8px; flex: 1 1 160px; }
.bg-footer-about { flex: 2 1 280px; max-width: 360px; gap: 16px; }
.bg-footer-link a { color: var(--bg-muted); font-size: 14px; }
.bg-footer-link a:hover { color: var(--bg-gold-lt); }
.bg-footer-legal { max-width: 1280px; margin: 40px auto 0 !important; font-size: 13px; color: var(--bg-dim); border-top: 1px solid var(--bg-line); padding-top: 24px; }
.bg-footer-legal a { color: var(--bg-dim); }

/* ---------- generic pages ---------- */
.bg-generic .wp-block-post-content > * + * { margin-top: 1.1em; }
.bg-generic .wp-block-post-content { color: var(--bg-muted); font-size: 17px; }

@media (max-width: 600px) {
	.bg-strip .bg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.bg-stat-n { font-size: 40px; }
	.bg-readouts { left: 10px; right: 10px; bottom: 10px; gap: 16px; justify-content: space-between; }
	.bg-readout { font-size: 17px; }
	.bg-header > .wp-block-buttons { display: none; }
}

/* ---------- v1.2: reels + stacks ---------- */
.bg-stack { gap: 18px; }
.bg-reel .wp-block-embed { margin: 0; }
.bg-reel iframe, .bg-reel .instagram-media { max-width: 100% !important; min-width: 0 !important; width: 100% !important; margin: 0 !important; border-radius: 0 !important; }
.bg-logo { margin: 0 !important; line-height: 0; }
.bg-logo img { height: auto; display: block; }

/* ---------- v1.5: Axioforce feature ---------- */
.bg-feature { background: radial-gradient(ellipse at 20% 0%, rgba(186, 159, 103, 0.18), transparent 60%), var(--bg-ink-2); border-top: 2px solid var(--bg-gold); border-bottom: 1px solid var(--bg-line); }
.bg-feature .bg-split-left { flex: 1.4 1 480px; }
.bg-axio-reel { flex: 1 1 320px; max-width: 420px; }
.bg-banner { aspect-ratio: 3 / 1; border-color: var(--bg-line-2); }
.bg-feature .bg-stat { border-top: 1px solid var(--bg-gold); padding-top: 12px; }
.bg-feature .bg-stat-n { color: var(--bg-gold-lt); font-size: 40px; }
.bg-news a { color: var(--bg-gold-lt); font-weight: 600; }

/* v1.5.1 — Axioforce plate photos */
.bg-plate { aspect-ratio: 16 / 5; border-color: var(--bg-line-2); }
.bg-plate img { width: 100%; height: 100%; object-fit: cover; }
.bg-cap { font-family: var(--wp--preset--font-family--mono, monospace); font-size: 12px; letter-spacing: .12em; color: var(--bg-gold-lt); margin-top: 10px !important; }

/* v1.6.0 — homepage "Become a member" box */
.bg-join { position: relative; overflow: hidden; gap: 14px; max-width: 640px; padding: clamp(26px, 3vw, 38px) !important;
  border: 2px solid var(--bg-gold) !important;
  background: linear-gradient(135deg, rgba(186,159,103,0.22), rgba(186,159,103,0.04) 60%), var(--bg-ink-2) !important;
  animation: bgJoinPulse 1.6s ease-in-out infinite; }
.bg-join > * { position: relative; z-index: 1; }
.bg-join::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,0.13) 50%, transparent 65%);
  transform: translateX(-100%); animation: bgJoinShine 3.2s ease-in-out infinite; }
.bg-join-tag { display: flex; align-items: center; gap: 10px; margin: 0 !important; font-family: var(--bg-mono); font-size: 13px; letter-spacing: 0.14em; color: var(--bg-gold-lt); }
.bg-join-tag::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--bg-gold-lt); box-shadow: 0 0 10px var(--bg-gold-lt); animation: bgJoinBlink 1s steps(1, end) infinite; }
.bg-join-title { font-size: clamp(38px, 4.4vw, 54px) !important; margin: 0 !important; color: #fff; }
.bg-join-body { font-size: 18px; line-height: 1.5; margin: 0 !important; }
.bg-join .wp-block-button__link { font-size: 18px !important; padding: 16px 30px !important; }
@keyframes bgJoinPulse {
  0%, 100% { border-color: var(--bg-gold); box-shadow: 0 0 0 0 rgba(230,203,146,0.55), 0 0 22px rgba(186,159,103,0.25); }
  50% { border-color: var(--bg-gold-lt); box-shadow: 0 0 0 12px rgba(230,203,146,0), 0 0 54px rgba(230,203,146,0.6); } }
@keyframes bgJoinShine { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100%); } }
@keyframes bgJoinBlink { 0% { opacity: 1; } 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bg-join, .bg-join::after, .bg-join-tag::before { animation: none; } }

/* v1.6.0 — test-and-retest loop, notes */
.bg-loop { margin-top: 40px; padding: 28px clamp(20px, 3vw, 36px); border: 1px solid var(--bg-gold); border-radius: 4px;
  background: linear-gradient(90deg, rgba(186,159,103,0.14), rgba(186,159,103,0.03)); gap: 14px; }
.bg-loop-row { flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.bg-loop-step { margin: 0 !important; font-family: var(--bg-display); font-weight: 700; font-size: clamp(26px, 3.2vw, 40px); line-height: 1; letter-spacing: 0.02em; color: #fff; }
.bg-loop-arrow { margin: 0 !important; font-size: clamp(22px, 2.6vw, 32px); color: var(--bg-gold-lt); }
.bg-loop-text { margin: 0 !important; font-size: 17px; line-height: 1.55; max-width: 820px; }
.bg-note { font-size: 14px; line-height: 1.5; color: var(--bg-dim); border-left: 2px solid var(--bg-gold); padding-left: 12px; }
