/* The Bullshit Filter — global stylesheet
 *
 * Mirrors the design-handoff styles.css. Tokens are duplicated as plain
 * CSS custom properties (in addition to theme.json's --wp--preset--color--*)
 * so the section CSS can stay terse and design-faithful.
 */

:root {
	--red:       #E5431C;
	--red-dark:  #B8330F;
	--red-deep:  #6E1E08;
	--ink:       #0E0E0E;
	--ink-soft:  #1A1A1A;
	--bone:      #F2EBDD;
	--bone-soft: #E8DFCB;
	--signal:    #F0C419;
	--rust:      #A8442A;
	--steel:     #4A4A48;
}

/* ---- Resets (scoped to keep block editor sane) ---- */
body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---- Typography utilities ---- */
.bsf-display {
	font-family: 'Oswald', 'Arial Narrow', sans-serif;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	line-height: 0.92;
}
.bsf-mono {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	font-size: 12px;
}

/* ---- Texture utilities ---- */
.bsf-grain { position: relative; }
.bsf-grain::before {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.07;
	mix-blend-mode: multiply;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.bsf-halftone {
	background-image: radial-gradient(circle at 1px 1px, currentColor 1px, transparent 1.5px);
	background-size: 6px 6px;
}
.bsf-halftone-lg {
	background-image: radial-gradient(circle at 1.5px 1.5px, currentColor 1.5px, transparent 2px);
	background-size: 9px 9px;
}
.bsf-stripes {
	background-image: repeating-linear-gradient(45deg, var(--ink) 0 12px, var(--signal) 12px 24px);
}

/* ---- Stamps ---- */
.bsf-stamp {
	display: inline-block;
	border: 2px solid currentColor;
	padding: 4px 10px 3px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	transform: rotate(-2deg);
}
.bsf-stamp--red { color: var(--red); border-color: var(--red); }
.bsf-stamp--signal { color: var(--ink); background: var(--signal); border-color: var(--ink); }

/* ---- Buttons ---- */
.bsf-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 22px;
	font-family: 'Oswald', sans-serif;
	font-weight: 700;
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: transform 0.08s, background 0.15s;
	border-radius: 0;
}
.bsf-btn:active { transform: translate(1px, 1px); }
.bsf-btn--red   { background: var(--red);  color: var(--bone); box-shadow: 4px 4px 0 var(--ink); }
.bsf-btn--red:hover { background: var(--red-dark); }
.bsf-btn--ink   { background: var(--ink);  color: var(--bone); box-shadow: 4px 4px 0 var(--red); }
.bsf-btn--ink:hover { background: var(--ink-soft); }
.bsf-btn--ghost { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.bsf-btn--ghost:hover { background: var(--ink); color: var(--bone); }

/* ---- Section frame ---- */
.bsf-section { position: relative; padding: 80px 48px; }
.bsf-container { max-width: 1320px; margin: 0 auto; position: relative; }

/* ---- Section markers ---- */
.bsf-section-marker {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 32px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.18em;
}
.bsf-section-marker__bar { width: 36px; height: 2px; background: currentColor; }
.bsf-section-marker__num { font-weight: 700; }

/* ---- Card hover ---- */
.bsf-card { transition: transform 0.12s ease, box-shadow 0.15s ease; }
.bsf-card:hover { transform: translate(-2px, -2px); }

/* ---- Marquee / animations ---- */
@keyframes bsf-marquee {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}
.bsf-marquee-track { display: flex; animation: bsf-marquee 40s linear infinite; white-space: nowrap; }

@keyframes bsf-pulse-red {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.4; }
}
.bsf-pulse { animation: bsf-pulse-red 1.4s ease-in-out infinite; }

@keyframes bsf-spin-slow {
	from { transform: rotate(0); }
	to   { transform: rotate(360deg); }
}
.bsf-spin-slow { animation: bsf-spin-slow 30s linear infinite; }

/* ---- Tape ---- */
.bsf-tape {
	position: absolute;
	background: var(--signal);
	opacity: 0.85;
	width: 90px;
	height: 22px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar         { width: 10px; height: 10px; }
::-webkit-scrollbar-track   { background: var(--bone); }
::-webkit-scrollbar-thumb   { background: var(--ink); }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
	.bsf-section { padding: 56px 24px; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
	.bsf-marquee-track,
	.bsf-pulse,
	.bsf-spin-slow { animation: none !important; }
}

/* ──────────────────────────────────────────────────────────────────────
   Vault grid — shared across the homepage (bsf/episode-grid) and
   the archive (bsf/episode-archive) blocks. Each block has a small
   inline <style> tag for grid-columns variants, but the structural rules
   (display:grid, gap, card border/shadow, body padding, etc.) live here
   so they load on every page that contains either block.
   ──────────────────────────────────────────────────────────────────── */

.bsf-section--vault .bsf-vault__head {
	display: flex; align-items: flex-end; justify-content: space-between;
	margin-bottom: 48px; flex-wrap: wrap; gap: 24px;
}
.bsf-section--vault .bsf-vault__h {
	font-size: clamp(44px, 5.5vw, 72px); text-wrap: balance; max-width: 720px;
}
.bsf-section--vault .bsf-vault__filter {
	display: flex; gap: 4px; border: 2px solid var(--ink);
}
.bsf-section--vault .bsf-vault__pill {
	display: inline-block;
	padding: 10px 18px; border: none;
	background: transparent; color: var(--ink);
	cursor: pointer; font-size: 11px; font-weight: 700;
	font-family: 'JetBrains Mono', monospace;
	text-transform: uppercase; letter-spacing: 0.18em;
	text-decoration: none;
	transition: background 0.1s, color 0.1s;
}
.bsf-section--vault .bsf-vault__pill:hover {
	background: var(--bone-soft); color: var(--ink);
}
.bsf-section--vault .bsf-vault__pill--active {
	background: var(--ink); color: var(--bone);
}
.bsf-section--vault .bsf-vault__pill--active:hover {
	background: var(--ink); color: var(--bone);
}

.bsf-section--vault .bsf-vault__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}
.bsf-section--vault .bsf-vault__card {
	background: var(--bone);
	border: 2px solid var(--ink);
	box-shadow: 4px 4px 0 var(--ink);
	position: relative;
	display: flex; flex-direction: column;
	transition: transform 0.12s, box-shadow 0.15s;
}
.bsf-section--vault .bsf-vault__card:hover {
	transform: translate(-2px, -2px);
	box-shadow: 8px 8px 0 var(--red);
}
.bsf-section--vault .bsf-vault__card-link {
	display: flex; flex-direction: inherit;
	color: inherit; text-decoration: none;
	width: 100%;
}

.bsf-section--vault .bsf-vault__art {
	position: relative;
	aspect-ratio: 1;
	overflow: hidden;
	border-bottom: 2px solid var(--ink);
	flex-shrink: 0;
}
.bsf-section--vault .bsf-vault__art img,
.bsf-section--vault .bsf-vault__art svg {
	width: 100%; height: 100%; object-fit: cover; display: block;
}
.bsf-section--vault .bsf-vault__epnum {
	position: absolute; bottom: 0; left: 0;
	background: var(--ink); color: var(--bone);
	padding: 6px 14px; font-size: 11px;
}
.bsf-section--vault .bsf-vault__premium-badge {
	position: absolute; top: 12px; right: 12px;
	background: var(--signal); color: var(--ink);
	padding: 4px 8px; box-shadow: 2px 2px 0 var(--ink);
	font-size: 11px;
}
.bsf-section--vault .bsf-vault__overlay {
	position: absolute; inset: 0;
	background: rgba(14, 14, 14, 0.65);
	display: flex; align-items: center; justify-content: center;
	opacity: 0; transition: opacity 0.15s;
}
.bsf-section--vault .bsf-vault__card:hover .bsf-vault__overlay { opacity: 1; }
.bsf-section--vault .bsf-vault__play {
	width: 72px; height: 72px;
	background: var(--red);
	display: flex; align-items: center; justify-content: center;
	box-shadow: 4px 4px 0 var(--bone);
}

.bsf-section--vault .bsf-vault__body {
	padding: 20px;
	display: flex; flex-direction: column;
	flex: 1;
}
.bsf-section--vault .bsf-vault__meta {
	display: flex; justify-content: space-between;
	margin-bottom: 12px;
}
.bsf-section--vault .bsf-vault__series { color: var(--red); font-size: 11px; }
.bsf-section--vault .bsf-vault__date { font-size: 11px; opacity: 0.6; }
.bsf-section--vault .bsf-vault__title {
	font-size: 20px; line-height: 1.0;
	text-wrap: balance; margin-bottom: 12px;
}
.bsf-section--vault .bsf-vault__excerpt {
	font-size: 15px; color: var(--steel);
	margin-bottom: 20px; flex: 1;
}
.bsf-section--vault .bsf-vault__foot {
	display: flex; align-items: center; justify-content: space-between;
	margin-top: auto; padding-top: 12px;
	border-top: 1px dashed var(--ink);
}
.bsf-section--vault .bsf-vault__dur {
	font-size: 11px; display: flex; align-items: center; gap: 6px;
}
.bsf-section--vault .bsf-vault__dur-dot {
	display: inline-block; width: 8px; height: 8px;
	background: var(--red);
}
.bsf-section--vault .bsf-vault__listen {
	font-size: 11px; text-decoration: underline;
}

/* CSS-driven FREE/PREMIUM filter — covers both the homepage Vault block
   (.bsf-section--vault) and the archive block (.bsf-section--vault.bsf-section--archive)
   via the shared --vault class. JS just sets data-current-filter on the
   section; CSS hides the non-matching cards. */
.bsf-section--vault[data-current-filter="free"]    .bsf-vault__card[data-flag="premium"] { display: none !important; }
.bsf-section--vault[data-current-filter="premium"] .bsf-vault__card[data-flag="free"]    { display: none !important; }

/* Pagination — shared across archive + search templates */
.bsf-pagination {
	display: flex; gap: 8px; flex-wrap: wrap;
	justify-content: center;
	margin-top: 56px;
}
.bsf-pagination a,
.bsf-pagination span.page-numbers {
	padding: 10px 16px;
	border: 2px solid var(--ink);
	background: var(--bone);
	color: var(--ink);
	text-decoration: none;
	font-family: 'JetBrains Mono', monospace;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	transition: background 0.1s, color 0.1s;
}
.bsf-pagination a:hover { background: var(--ink); color: var(--bone); }
.bsf-pagination span.current { background: var(--red); color: var(--bone); border-color: var(--red); }
.bsf-pagination span.dots { border: none; background: transparent; padding: 10px 4px; }

@media (max-width: 1100px) {
	.bsf-section--vault .bsf-vault__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.bsf-section--vault .bsf-vault__grid { grid-template-columns: 1fr; }
}

/* ---- Scaffold placeholder (REMOVE once real templates land) ---- */
.bsf-scaffold {
	min-height: 60vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 80px 24px;
	text-align: center;
}
.bsf-scaffold h1 {
	font-family: 'Oswald', sans-serif;
	font-weight: 700;
	font-size: clamp(40px, 6vw, 80px);
	text-transform: uppercase;
	color: var(--ink);
}
.bsf-scaffold p {
	font-family: 'JetBrains Mono', monospace;
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--steel);
}

/* =========================================================================
   Support page · premium feed help (added 2026-06-01)
   ========================================================================= */
.bsf-support-apps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
	margin-top: 40px;
}
.bsf-support-app {
	border: 2px solid var(--ink);
	background: var(--bone-soft);
	padding: 28px 30px;
}
.bsf-support-app__eyebrow {
	margin: 0 0 8px 0;
	color: var(--red);
	font-size: 11px;
	letter-spacing: 0.18em;
}
.bsf-support-app__title {
	font-size: 26px;
	margin: 0 0 18px 0;
	color: var(--ink);
}
.bsf-support-steps {
	margin: 0;
	padding-left: 24px;
	color: var(--ink-soft);
	font-size: 15px;
	line-height: 1.55;
}
.bsf-support-steps li { margin-bottom: 12px; }
.bsf-support-steps li b { color: var(--ink); font-weight: 700; }
.bsf-support-code {
	display: block;
	margin: 10px 0;
	padding: 10px 14px;
	background: var(--ink);
	color: var(--bone-soft);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 13px;
	word-break: break-all;
}
.bsf-support-steps code:not(.bsf-support-code) {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.92em;
	background: rgba(168, 68, 42, 0.12);
	color: var(--rust);
	padding: 1px 5px;
}

.bsf-support-faq {
	display: grid;
	gap: 28px;
	margin-top: 36px;
}
.bsf-support-faq__item {
	border-left: 4px solid var(--red);
	padding: 6px 0 6px 24px;
}
.bsf-support-faq__q {
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	font-size: 20px;
	line-height: 1.4;
	color: var(--ink);
	margin: 0 0 12px 0;
	max-width: 66ch;
}
.bsf-support-faq__a {
	margin: 0;
	color: var(--ink-soft);
	font-size: 16px;
	line-height: 1.55;
	max-width: 66ch;
}
.bsf-support-faq__a b { color: var(--red-deep); font-weight: 700; }

@media (max-width: 980px) {
	.bsf-support-apps { grid-template-columns: 1fr; gap: 24px; }
	.bsf-feed-list { grid-template-columns: 1fr !important; }
}

/* =========================================================================
   SHOW-SPECIFIC — The Bullshit Filter
   Redaction bars, highlighter truth, BS meters, the Filter Unit decoder.
   Mirrors the design-handoff styles.css "show-specific" block.
   ========================================================================= */

/* Red warning stripes variant */
.bsf-stripes-red {
	background-image: repeating-linear-gradient(45deg, var(--red) 0 10px, var(--ink) 10px 20px);
}

/* Redaction bar — blacks out the spin */
.bsf-redact {
	background: var(--ink);
	color: transparent;
	padding: 0 0.14em;
	border-radius: 1px;
	white-space: nowrap;
	-webkit-user-select: none;
	user-select: none;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

/* Highlighter — marks the truth they buried */
.bsf-hl-mark {
	background: linear-gradient(var(--signal), var(--signal));
	background-size: 100% 64%;
	background-repeat: no-repeat;
	background-position: 0 80%;
	padding: 0 0.06em;
	color: var(--ink);
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

/* BS meter — the show's signature gauge */
.bsf-bsmeter {
	position: relative;
	height: 8px;
	background: rgba(14, 14, 14, 0.12);
	border: 1.5px solid var(--ink);
	overflow: hidden;
}
.bsf-bsmeter__fill {
	position: absolute;
	inset: 0 auto 0 0;
	background: var(--red);
	background-image: repeating-linear-gradient(45deg, transparent 0 5px, rgba(14, 14, 14, 0.18) 5px 7px);
}
.bsf-bs-row {
	display: flex; justify-content: space-between;
	font-family: 'JetBrains Mono', monospace;
	text-transform: uppercase; letter-spacing: 0.1em;
	font-size: 10px; margin-bottom: 5px;
}
.bsf-bs-row__pct { color: var(--red); }
/* BS meter slot inside a vault card */
.bsf-section--vault .bsf-vault__bs { margin-bottom: 14px; }

/* Dashed divider used in show cards */
.bsf-dashed-top { border-top: 1px dashed var(--ink); }

/* Numbered-list tick square (premium feature rows) */
.bsf-tick {
	display: inline-block;
	width: 14px; height: 14px;
	background: var(--red);
	margin-right: 10px;
	vertical-align: middle;
	flex-shrink: 0;
}

/* Hero player progress bar (real <audio> wiring lives in assets/theme.js) */
.bsf-progress-track {
	position: relative;
	height: 6px;
	background: rgba(242, 235, 221, 0.2);
	cursor: pointer;
}
.bsf-progress-fill { position: absolute; inset: 0 auto 0 0; width: 0%; background: var(--red); }
.bsf-progress-knob {
	position: absolute; top: 50%; left: 0%;
	transform: translate(-50%, -50%);
	width: 14px; height: 14px;
	background: var(--bone);
	border: 2px solid var(--red);
}

/* The Filter Unit — Spin → Filtered decoder terminal */
.bsf-filter-unit {
	position: relative;
	background: var(--ink-soft);
	border: 2px solid var(--bone);
	box-shadow: 8px 8px 0 var(--red);
	color: var(--bone);
}
.bsf-filter-unit__bar {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	background: var(--ink); color: var(--bone);
	padding: 11px 16px;
	border-bottom: 2px solid var(--bone);
}
.bsf-filter-unit__body { padding: 22px 22px 24px; }
.bsf-filter-unit__meta {
	display: flex; justify-content: space-between;
	font-family: 'JetBrains Mono', monospace;
	font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
	color: rgba(242, 235, 221, 0.55);
	margin-bottom: 14px;
}
.bsf-filter-unit__headline {
	font-family: 'Source Serif 4', Georgia, serif;
	font-weight: 500;
	font-size: clamp(20px, 1.7vw, 25px);
	line-height: 1.32;
	min-height: 4.1em;
	color: var(--bone);
}
.bsf-filter-unit__source {
	margin-top: 16px;
	font-family: 'JetBrains Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
	color: rgba(242, 235, 221, 0.55);
	display: flex; align-items: center; gap: 8px;
}
.bsf-filter-unit__source-dot { display: inline-block; width: 9px; height: 9px; background: var(--red); }
.bsf-filter-unit__nav {
	margin-top: 16px;
	display: flex; align-items: center; justify-content: space-between;
}
.bsf-filter-unit__navbtn {
	width: 36px; height: 36px;
	border: 2px solid var(--bone); background: transparent;
	color: var(--bone); cursor: pointer; font-size: 16px; line-height: 1;
}
.bsf-filter-unit__navbtn:hover { background: var(--bone); color: var(--ink); }

/* Spin / Filtered toggle — active half fills with accent */
.bsf-spin-toggle {
	position: relative;
	display: grid; grid-template-columns: 1fr 1fr;
	border: 2px solid var(--bone);
	background: var(--ink);
	margin-top: 20px;
}
.bsf-spin-toggle button {
	appearance: none; background: transparent; border: none; cursor: pointer;
	padding: 13px 8px;
	font-family: 'JetBrains Mono', monospace; font-weight: 700;
	text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px;
	color: rgba(242, 235, 221, 0.6);
	transition: background 0.22s ease, color 0.22s ease;
}
.bsf-spin-toggle button[data-active="true"] { background: var(--red); color: var(--bone); }

/* Decoded-headline visibility: toggled by data-mode on the unit */
.bsf-filter-unit[data-mode="spin"]     .bsf-filter-unit__decoded { display: none; }
.bsf-filter-unit[data-mode="filtered"] .bsf-filter-unit__spin    { display: none; }

/* The big outlined footer wordmark */
.bsf-wordmark {
	font-family: 'Oswald', sans-serif; font-weight: 700;
	text-transform: uppercase;
	font-size: clamp(56px, 11vw, 180px);
	color: transparent;
	-webkit-text-stroke: 1.5px var(--red);
	text-align: center; line-height: 0.9; letter-spacing: 0.02em;
	white-space: nowrap;
}

/* Blackout (dark) theme — applied via data-theme="dark" on <html> */
[data-theme="dark"] {
	--bone: #14110D;
	--bone-soft: #1F1A14;
	--ink: #F2EBDD;
	--ink-soft: #D9D0BC;
	--steel: #8A8580;
}
[data-theme="dark"] .bsf-bsmeter { background: rgba(242, 235, 221, 0.14); }
[data-theme="dark"] .bsf-filter-unit { border-color: var(--ink); }
[data-theme="dark"] .bsf-filter-unit__bar { border-bottom-color: var(--ink); background: #000; }
[data-theme="dark"] .bsf-spin-toggle { border-color: var(--ink); }
