/*
Theme Name: Newspack — Red Bank Green
Template: newspack-theme
Description: Child of the Newspack theme carrying redbankgreen.com's personality — black top bar, illustrated Broad Street banner with the RBG badge, chartreuse tagline band, green Helvetica headlines. Experimental (newspack.redbankgreen.com).
Version: 0.1.0
Author: Red Bank Green
Text Domain: newspack-redbankgreen
*/

/* ---------- Fonts (same Helvetica Neue files the production theme self-hosts) ---------- */
@font-face { font-family: "Helvetica Neue"; src: url(fonts/HelveticaNeue-Light.woff2) format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Helvetica Neue"; src: url(fonts/HelveticaNeue.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Helvetica Neue"; src: url(fonts/HelveticaNeue-Italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Helvetica Neue"; src: url(fonts/HelveticaNeue-Medium.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Helvetica Neue"; src: url(fonts/HelveticaNeue-Bold.woff2) format("woff2"); font-weight: 700 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Helvetica Neue"; src: url(fonts/HelveticaNeue-BoldItalic.woff2) format("woff2"); font-weight: 700 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Helvetica Neue Condensed"; src: url(fonts/HelveticaNeue-CondensedBlack.woff2) format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }

/* ---------- Tokens (mirrors redbankgreen theme.json) ---------- */
:root {
	--rbg-green: #1e6228;
	--rbg-green-dark: #154a1d;
	--rbg-chartreuse: #e8f651;
	--rbg-chartreuse-soft: #f8fcc9;
	--rbg-ink: #090a0b;
	--rbg-text: #45474a;
	--rbg-ui: "Work Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--rbg-display: "Helvetica Neue", Helvetica, Arial, sans-serif;

	--newspack-theme-font-heading: var(--rbg-display);
	--newspack-theme-font-body: var(--rbg-display);
}

body {
	color: var(--rbg-text);
}

::selection {
	background: var(--rbg-chartreuse);
	color: var(--rbg-ink);
}

/* ======================================================================
   Top bar — Newspack's short header, dressed as RBG's black menu bar
   ====================================================================== */
.site-header,
.h-sb .site-header,
.h-sb .middle-header-contain {
	background: linear-gradient(180deg, #0d0d0d, #000);
}

.h-sb.h-sh .site-header .middle-header-contain .wrapper {
	min-height: 60px;
	padding-top: 0;
	padding-bottom: 0;
}

/* Editor byline badge (template-parts/header/site-branding.php) */
.rbg-branding {
	display: flex;
	align-items: center;
}
.rbg-editor {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: #fff;
	text-decoration: none;
}
.rbg-editor:hover,
.rbg-editor:focus {
	color: var(--rbg-chartreuse);
}
.rbg-editor__photo {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid rgba(255, 255, 255, 0.15);
}
.rbg-editor__info {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
	font-family: var(--rbg-ui);
}
.rbg-editor__title {
	font-size: 0.75rem;
	color: #a3a3a3;
}
.rbg-editor__name {
	font-size: 0.9rem;
	font-weight: 600;
}

/* Primary nav: chartreuse Work Sans links, as on the live site */
body .site-header #site-navigation .main-menu > li > a,
body .site-header #site-navigation .main-menu > li > .submenu-expand {
	font-family: var(--rbg-ui);
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--rbg-chartreuse);
	text-transform: none;
	letter-spacing: 0;
}
body .site-header #site-navigation .main-menu > li > .submenu-expand svg {
	fill: currentColor;
	color: var(--rbg-chartreuse);
}
body .site-header #site-navigation .main-menu > li > a:hover,
body .site-header #site-navigation .main-menu > li > a:focus {
	color: #fff;
}
body .site-header #site-navigation .sub-menu {
	background: #111;
	border-top: 3px solid var(--rbg-chartreuse);
}
body .site-header #site-navigation .sub-menu a {
	color: #fff;
	font-family: var(--rbg-ui);
}
body .site-header #site-navigation .sub-menu a:hover {
	color: var(--rbg-chartreuse);
}

/* "Get The Blast" CTA — a tertiary-menu item (desktop) / Newspack mobile CTA,
   outlined chartreuse, fills on hover */
body .site-header #tertiary-nav-contain .rbg-cta > a,
body .site-header .button.mb-cta {
	font-family: var(--rbg-ui);
	font-weight: 500;
	font-size: 0.875rem;
	text-transform: none;
	letter-spacing: 0;
	background: transparent;
	color: var(--rbg-chartreuse);
	border: 2px solid var(--rbg-chartreuse);
	border-radius: 4px;
	padding: 0.55rem 1.1rem;
	line-height: 1.25;
	white-space: nowrap;
	display: inline-block;
}
body .site-header #tertiary-nav-contain .rbg-cta > a:hover,
body .site-header .button.mb-cta:hover {
	background: var(--rbg-chartreuse);
	color: #000;
}

/* Tighter gap between the masthead band and the stories */
.site-content {
	margin-top: 2.5rem;
}

.site-header .header-search-contain button,
.site-header .mobile-menu-toggle,
.site-header .desktop-menu-toggle,
.site-header .search-toggle {
	color: #fff;
}

/* ======================================================================
   Masthead — illustrated banner, RBG badge, chartreuse tagline band
   ====================================================================== */
.rbg-masthead {
	position: relative;
	background: var(--rbg-chartreuse);
	color: #000;
}
.rbg-masthead__art {
	display: block;
	height: 240px;
	overflow: hidden;
	background: #cfe3f2;
}
.rbg-masthead__art img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}
.rbg-masthead__badge {
	position: absolute;
	left: 50%;
	top: 240px;
	transform: translate(-50%, -100%);
	width: 5rem;
	height: 5rem;
	padding: 0.75rem;
	border-radius: 9999px 9999px 0 0;
	background: var(--rbg-chartreuse);
	display: block;
	height: auto;
	padding-bottom: 0;
}
.rbg-masthead__badge img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 50%;
	transition: transform 0.25s ease-out;
}
.rbg-masthead__badge:hover img,
.rbg-masthead__art:hover + .rbg-masthead__badge img {
	transform: rotate(90deg);
}
.rbg-masthead__band {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0.35rem 2.25rem;
}
.rbg-masthead__left,
.rbg-masthead__right {
	flex: 1 1 0;
	margin: 0;
	font-family: var(--rbg-display);
	font-weight: 700;
	font-size: 0.875rem;
	line-height: 1.25;
}
.rbg-masthead__right {
	text-align: right;
}
.rbg-masthead__wordmark {
	flex: 0 0 auto;
	font-family: var(--rbg-display);
	font-weight: 700;
	font-size: 1.875rem;
	line-height: 1.2;
	color: #000;
	text-decoration: none;
	letter-spacing: -0.01em;
}
.rbg-masthead__wordmark:hover {
	color: var(--rbg-green);
}

@media (max-width: 781px) {
	.rbg-masthead__art {
		height: 150px;
	}
	.rbg-masthead__badge {
		top: 150px;
		width: 3.25rem;
		padding: 0.45rem 0.45rem 0;
	}
	.rbg-masthead__band {
		flex-direction: column;
		gap: 0;
		padding: 0;
	}
	.rbg-masthead__wordmark {
		order: 1;
		font-size: 1.25rem;
		padding: 0.45rem 1rem;
	}
	.rbg-masthead__left {
		order: 2;
		width: 100%;
		text-align: center;
		background: var(--rbg-chartreuse-soft);
		padding: 0.6rem 1rem;
	}
	.rbg-masthead__right {
		display: none;
	}
}

/* ======================================================================
   Story typography — green Helvetica headlines, RBG-style labels
   ====================================================================== */
h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title,
.wp-block-newspack-blocks-homepage-articles .entry-title {
	font-family: var(--rbg-display);
	font-weight: 700;
	letter-spacing: -0.01em;
}

.entry-title a,
.entry .entry-title a,
.archive .entry-title a,
.blog .entry-title a {
	color: var(--rbg-green);
}
.entry-title a:hover {
	color: var(--rbg-green-dark);
	text-decoration: underline;
	text-decoration-color: var(--rbg-chartreuse);
	text-decoration-thickness: 0.18em;
	text-underline-offset: 0.12em;
}

.single .entry-header .entry-title,
.single-post .entry-title {
	color: var(--rbg-green);
	font-weight: 800;
}

/* Category labels: small green caps like "BUSINESS" on the live homepage */
.cat-links a,
.entry-header .cat-links a {
	background: none;
	color: var(--rbg-green);
	font-family: var(--rbg-ui);
	font-weight: 600;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0;
	margin-right: 0.9em;
}
.cat-links a:hover {
	color: var(--rbg-ink);
	background: var(--rbg-chartreuse);
}
.cat-links a + a::before {
	content: none;
}

.byline a,
.author-name a,
.entry-meta a {
	color: var(--rbg-green);
	font-weight: 600;
}

/* Body links: green with a chartreuse highlighter underline */
.entry-content a {
	color: var(--rbg-green);
	text-decoration: underline;
	text-decoration-color: var(--rbg-chartreuse);
	text-decoration-thickness: 0.2em;
	text-underline-offset: 0.15em;
}
.entry-content a:hover {
	background: var(--rbg-chartreuse);
	color: var(--rbg-ink);
}

.entry-content blockquote,
.entry-content .wp-block-quote {
	border-left: 4px solid var(--rbg-chartreuse);
}

/* Buttons site-wide */
.button,
button,
input[type="submit"],
.wp-block-button__link {
	font-family: var(--rbg-ui);
	text-transform: none;
	letter-spacing: 0;
}

/* Pagination & "more" links */
.nav-links .page-numbers.current,
.navigation .nav-links a:hover {
	background: var(--rbg-chartreuse);
	color: var(--rbg-ink);
}

/* ======================================================================
   Footer — black with chartreuse, founding mission line
   ====================================================================== */
.rbg-footer-mission {
	background: var(--rbg-chartreuse);
	color: var(--rbg-ink);
	padding: 1.75rem 0;
	margin-top: 3rem;
}
.rbg-footer-mission .wrapper {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	max-width: 900px;
}
.rbg-footer-mission img {
	flex: 0 0 auto;
	border-radius: 50%;
}
.rbg-footer-mission p {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.5;
}

.site-footer {
	background: #000;
	color: #d4d4d4;
}
.site-footer a {
	color: var(--rbg-chartreuse);
}
.site-footer a:hover {
	color: #fff;
}

/* Desktop: drop Newspack's divider beside the search icon */
body .site-header #tertiary-nav-contain,
body .site-header .header-search-contain {
	border: 0;
}

/* Mobile top bar: one row — editor photo, CTA, menu toggle */
@media (max-width: 781px) {
	.site-header .middle-header-contain .wrapper {
		flex-wrap: nowrap;
		align-items: center;
		min-height: 56px;
	}
	.rbg-editor__photo {
		width: 34px;
		height: 34px;
	}
	.rbg-editor__title {
		display: none;
	}
	.rbg-editor__name {
		font-size: 0.8rem;
	}
	body .site-header .button.mb-cta {
		padding: 0.4rem 0.75rem;
		font-size: 0.8rem;
	}
}
