/*
Theme Name: Anthracite
Theme URI: https://example.com/anthracite
Author: Built for Dave Briggman
Author URI: https://example.com
Description: A blog and news theme rooted in Northeast Pennsylvania. Draws on the region's anthracite coal heritage, the Endless Mountains and Pocono ridgelines, railroad-industrial signage, and an autumn-into-slate palette. Built for local journalism, commentary, and community sites.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: anthracite
Tags: blog, news, two-columns, right-sidebar, custom-menu, custom-logo, featured-images, editor-style, threaded-comments, translation-ready
*/

/* ==========================================================================
   Palette and type tokens
   Anthracite  #1c1e22  the coal seam; dominant structural dark
   Culm Slate  #4d5d6b  river slate and haze
   Pocono Pine #2c4636  the forested ridges
   Iron Oxide  #b0492a  rust off old rail iron; primary accent
   Brass Gold  #c69240  autumn foliage and brass fittings
   Birch Cream #f3eee4  paper stock; content ground
   ========================================================================== */

:root {
	--anthracite: #1c1e22;
	--anthracite-soft: #26292f;
	--slate: #4d5d6b;
	--slate-light: #7f8f9c;
	--pine: #2c4636;
	--pine-deep: #1f3327;
	--iron: #b0492a;
	--iron-bright: #c9552f;
	--brass: #c69240;
	--cream: #f3eee4;
	--cream-panel: #faf6ee;
	--paper-line: #e2d9c8;
	--ink: #23262b;
	--ink-soft: #4a4f57;

	--shadow-warm: 0 2px 4px rgba(28, 30, 34, .06), 0 10px 24px rgba(28, 30, 34, .07);
	--shadow-lift: 0 4px 8px rgba(28, 30, 34, .09), 0 18px 40px rgba(28, 30, 34, .12);

	--font-display: "Oswald", "Arial Narrow", sans-serif;
	--font-body: "Lora", Georgia, "Times New Roman", serif;

	--wrap: 1160px;
	--wrap-narrow: 720px;
}

/* ==========================================================================
   Reset and base
   ========================================================================== */

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

body {
	margin: 0;
	background-color: var(--cream);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.125rem;
	line-height: 1.72;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a {
	color: var(--iron);
	text-decoration: none;
	transition: color .15s ease;
}
a:hover, a:focus { color: var(--iron-bright); text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
	outline: 3px solid var(--brass);
	outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.12;
	color: var(--anthracite);
	margin: 0 0 .5em;
	letter-spacing: .01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.25rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1.4rem; }

blockquote {
	margin: 2rem 0;
	padding: .4rem 0 .4rem 1.6rem;
	border-left: 4px solid var(--iron);
	font-size: 1.28rem;
	font-style: italic;
	color: var(--ink-soft);
}

code, pre {
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
	background: #ebe4d6;
	border-radius: 3px;
}
code { padding: .1em .35em; font-size: .9em; }
pre { padding: 1.2rem; overflow-x: auto; border-left: 4px solid var(--slate); }

hr {
	border: 0;
	height: 1px;
	background: var(--paper-line);
	margin: 2.5rem 0;
}

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

.wrap { width: min(var(--wrap), 92%); margin-inline: auto; }
.wrap-narrow { width: min(var(--wrap-narrow), 92%); margin-inline: auto; }

.site-content {
	padding: 3rem 0 4rem;
}

.content-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 3.5rem;
	align-items: start;
}

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

.skip-link {
	position: absolute;
	left: -999px;
	top: 0;
	background: var(--anthracite);
	color: var(--cream);
	padding: .75rem 1.25rem;
	z-index: 1000;
	font-family: var(--font-display);
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ==========================================================================
   Masthead
   ========================================================================== */

.site-header {
	background: var(--anthracite);
	color: var(--cream);
	border-bottom: 3px solid var(--iron);
	position: relative;
}

.masthead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1.5rem 0 1.4rem;
	flex-wrap: wrap;
}

.site-branding { display: flex; align-items: center; gap: 1rem; }

.custom-logo-link img { border-radius: 2px; }

.site-title {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(1.7rem, 3.6vw, 2.5rem);
	letter-spacing: .04em;
	text-transform: uppercase;
	line-height: 1;
}
.site-title a { color: var(--cream); text-decoration: none; }
.site-title a:hover { color: var(--brass); }

.site-description {
	margin: .35rem 0 0;
	font-family: var(--font-body);
	font-style: italic;
	font-size: .98rem;
	color: var(--slate-light);
	letter-spacing: .01em;
}

/* The Electric City spark: a thin brass filament under the title */
.branding-text { position: relative; }
.branding-text::after {
	content: "";
	display: block;
	width: 3.2rem;
	height: 2px;
	margin-top: .55rem;
	background: linear-gradient(90deg, var(--brass), transparent);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.main-navigation {
	background: var(--anthracite-soft);
	border-top: 1px solid rgba(255,255,255,.06);
}
.main-navigation .wrap { display: flex; align-items: center; }

.menu-toggle {
	display: none;
	background: transparent;
	border: 1px solid var(--slate);
	color: var(--cream);
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: .08em;
	padding: .55rem 1rem;
	margin: .75rem 0;
	cursor: pointer;
	border-radius: 2px;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
}
.main-navigation li { position: relative; }
.main-navigation a {
	display: block;
	color: var(--cream);
	font-family: var(--font-display);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: .07em;
	font-size: .92rem;
	padding: 1.1rem 1.15rem;
	text-decoration: none;
	border-bottom: 3px solid transparent;
	transition: color .15s ease, border-color .15s ease;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
	color: var(--brass);
	border-bottom-color: var(--iron);
}

.main-navigation ul ul {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--anthracite);
	min-width: 220px;
	box-shadow: var(--shadow-lift);
	z-index: 50;
	border-top: 2px solid var(--iron);
}
.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul { display: block; }
.main-navigation ul ul a { padding: .8rem 1.15rem; border-bottom: 1px solid rgba(255,255,255,.05); text-transform: none; letter-spacing: .02em; }

/* ==========================================================================
   Ridgeline (the Endless Mountains) — used in hero and footer
   ========================================================================== */

.ridgeline { display: block; width: 100%; height: auto; }
.ridgeline--footer { transform: rotate(180deg); margin-bottom: -1px; }

/* ==========================================================================
   Front-page hero
   ========================================================================== */

.hero {
	position: relative;
	background: var(--anthracite);
	color: var(--cream);
	overflow: hidden;
}
.hero-inner {
	position: relative;
	z-index: 2;
	padding: 4.5rem 0 7rem;
	max-width: 40rem;
}
.hero-kicker {
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: .18em;
	font-size: .82rem;
	color: var(--brass);
	margin: 0 0 1rem;
}
.hero-title {
	color: var(--cream);
	font-size: clamp(2.4rem, 6vw, 4rem);
	margin: 0 0 1rem;
	line-height: 1.05;
}
.hero-lede {
	font-size: 1.25rem;
	color: #d9d2c6;
	margin: 0 0 2rem;
	max-width: 34rem;
}
.hero .btn { margin-right: .75rem; }

.hero-ridge {
	position: absolute;
	left: 0; right: 0; bottom: -1px;
	z-index: 1;
	pointer-events: none;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
	display: inline-block;
	font-family: var(--font-display);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: .08em;
	font-size: .92rem;
	padding: .8rem 1.6rem;
	border-radius: 2px;
	border: 2px solid var(--iron);
	background: var(--iron);
	color: #fff;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover, .btn:focus { background: var(--iron-bright); border-color: var(--iron-bright); color: #fff; text-decoration: none; }
.btn--ghost { background: transparent; color: var(--cream); }
.btn--ghost:hover { background: rgba(255,255,255,.08); color: var(--cream); }

/* ==========================================================================
   Post cards / listings
   ========================================================================== */

.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin: 0 0 1.8rem;
	border-bottom: 2px solid var(--anthracite);
	padding-bottom: .6rem;
}
.section-head h2 { margin: 0; }
.section-head .section-link { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }

.post-card {
	background: var(--cream-panel);
	border: 1px solid var(--paper-line);
	border-radius: 3px;
	box-shadow: var(--shadow-warm);
	overflow: hidden;
	margin-bottom: 2.2rem;
	transition: box-shadow .18s ease, transform .18s ease;
}
.post-card:hover { box-shadow: var(--shadow-lift); }

.post-card .card-thumb { display: block; position: relative; }
.post-card .card-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.card-body { padding: 1.5rem 1.7rem 1.8rem; }

.entry-meta {
	font-family: var(--font-display);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: .07em;
	font-size: .78rem;
	color: var(--slate);
	margin-bottom: .6rem;
	display: flex;
	gap: .6rem;
	flex-wrap: wrap;
	align-items: center;
}
.entry-meta .cat-badge {
	background: var(--pine);
	color: var(--cream);
	padding: .2rem .6rem;
	border-radius: 2px;
	letter-spacing: .06em;
}
.entry-meta a { color: var(--slate); }
.entry-meta a:hover { color: var(--iron); }

.entry-title { margin: 0 0 .6rem; }
.entry-title a { color: var(--anthracite); text-decoration: none; }
.entry-title a:hover { color: var(--iron); }

.entry-excerpt { color: var(--ink-soft); margin-bottom: 1rem; }

.read-more {
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: .07em;
	font-size: .82rem;
	font-weight: 500;
	border-bottom: 2px solid var(--iron);
	padding-bottom: 2px;
}
.read-more:hover { text-decoration: none; border-bottom-color: var(--iron-bright); }

/* Lead story on the front page runs wider with a horizontal layout */
.post-card--lead .card-inner { display: grid; grid-template-columns: 1.15fr 1fr; }
.post-card--lead .card-thumb img { height: 100%; aspect-ratio: auto; }
.post-card--lead .card-body { padding: 2.2rem 2.4rem; align-self: center; }
.post-card--lead .entry-title { font-size: clamp(1.7rem, 3vw, 2.3rem); }

.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.2rem; }
.post-grid .post-card { margin-bottom: 0; }

/* ==========================================================================
   Single post / page
   ========================================================================== */

.entry-header--single { margin-bottom: 1.6rem; }
.entry-header--single .entry-title { font-size: clamp(2rem, 4.5vw, 3rem); }

.featured-image { margin: 0 0 2rem; border-radius: 3px; overflow: hidden; box-shadow: var(--shadow-warm); }

.entry-content { font-size: 1.16rem; }
.entry-content > * { max-width: 42rem; }
.entry-content > .alignwide { max-width: 52rem; }
.entry-content > .alignfull { max-width: none; }
.entry-content h2 { margin-top: 2.4rem; }
.entry-content h3 { margin-top: 1.8rem; }
.entry-content ul, .entry-content ol { margin: 0 0 1.4rem; padding-left: 1.4rem; }
.entry-content li { margin-bottom: .5rem; }
.entry-content a { border-bottom: 1px solid rgba(176,73,42,.4); }

.entry-footer {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--paper-line);
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: .05em;
	font-size: .85rem;
	color: var(--slate);
}
.entry-footer a { color: var(--pine); }
.tag-links a {
	display: inline-block;
	border: 1px solid var(--paper-line);
	padding: .25rem .7rem;
	margin: 0 .4rem .5rem 0;
	border-radius: 2px;
}
.tag-links a:hover { background: var(--pine); color: var(--cream); border-color: var(--pine); text-decoration: none; }

.post-navigation {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	margin: 3rem 0;
}
.post-navigation a {
	display: block;
	padding: 1.2rem 1.4rem;
	background: var(--cream-panel);
	border: 1px solid var(--paper-line);
	border-radius: 3px;
}
.post-navigation .nav-next { text-align: right; }
.post-navigation .nav-subtitle { display: block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .07em; font-size: .75rem; color: var(--slate); margin-bottom: .3rem; }
.post-navigation a:hover { border-color: var(--iron); text-decoration: none; }

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-area { margin-top: 3.5rem; }
.comments-title, .comment-reply-title { border-bottom: 2px solid var(--anthracite); padding-bottom: .5rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-body { padding: 1.4rem 0; border-bottom: 1px solid var(--paper-line); }
.comment-list .children { list-style: none; margin: 0 0 0 2rem; padding: 0; }
.comment-author { font-family: var(--font-display); }
.comment-author .fn { font-style: normal; font-weight: 600; }
.comment-metadata { font-size: .8rem; color: var(--slate); }

.comment-form label { display: block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; margin-bottom: .3rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: .7rem .8rem;
	border: 1px solid var(--paper-line);
	border-radius: 3px;
	font-family: var(--font-body);
	font-size: 1rem;
	background: #fff;
	margin-bottom: 1rem;
}

/* ==========================================================================
   Sidebar / widgets
   ========================================================================== */

.widget {
	background: var(--cream-panel);
	border: 1px solid var(--paper-line);
	border-radius: 3px;
	padding: 1.5rem 1.6rem;
	margin-bottom: 2rem;
}
.widget-title {
	font-size: 1.15rem;
	margin: 0 0 1rem;
	padding-bottom: .5rem;
	border-bottom: 2px solid var(--iron);
	text-transform: uppercase;
	letter-spacing: .04em;
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li {
	padding: .5rem 0;
	border-bottom: 1px solid var(--paper-line);
	font-size: 1rem;
}
.widget ul li:last-child { border-bottom: 0; }
.widget a { color: var(--ink); }
.widget a:hover { color: var(--iron); }

.widget select, .widget input[type="search"] {
	width: 100%; padding: .6rem .7rem;
	border: 1px solid var(--paper-line);
	border-radius: 3px; font-family: var(--font-body);
}

/* Search form */
.search-form { display: flex; gap: .5rem; }
.search-form .search-field { flex: 1; }
.search-form .search-submit {
	background: var(--anthracite); color: var(--cream);
	border: 0; border-radius: 3px; padding: 0 1rem;
	font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em;
	cursor: pointer;
}
.search-form .search-submit:hover { background: var(--iron); }

/* ==========================================================================
   Archive / page headers
   ========================================================================== */

.page-banner {
	background: var(--pine-deep);
	color: var(--cream);
	padding: 2.6rem 0;
	border-bottom: 3px solid var(--brass);
}
.page-banner .page-title { color: var(--cream); margin: 0; }
.page-banner .archive-description { color: #cdd6cf; margin: .6rem 0 0; font-style: italic; }

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination { margin-top: 2.5rem; }
.pagination .nav-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.pagination .page-numbers {
	display: inline-block;
	padding: .5rem .9rem;
	border: 1px solid var(--paper-line);
	border-radius: 3px;
	font-family: var(--font-display);
	background: var(--cream-panel);
	color: var(--anthracite);
}
.pagination .page-numbers.current { background: var(--iron); color: #fff; border-color: var(--iron); }
.pagination a.page-numbers:hover { background: var(--anthracite); color: var(--cream); text-decoration: none; }

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

.site-footer {
	background: var(--anthracite);
	color: #cbc6bc;
	margin-top: 4rem;
}
.footer-widgets {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2.5rem;
	padding: 3.5rem 0 2.5rem;
}
.footer-widgets .widget { background: transparent; border: 0; padding: 0; }
.footer-widgets .widget-title { color: var(--cream); border-bottom-color: var(--slate); }
.footer-widgets a { color: #cbc6bc; }
.footer-widgets a:hover { color: var(--brass); }
.footer-widgets ul li { border-bottom-color: rgba(255,255,255,.08); }

.site-info {
	border-top: 1px solid rgba(255,255,255,.08);
	padding: 1.5rem 0;
	font-size: .85rem;
	color: var(--slate-light);
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}
.site-info a { color: var(--brass); }

/* ==========================================================================
   Alignments (editor)
   ========================================================================== */

.alignleft { float: left; margin: .4rem 1.6rem 1rem 0; }
.alignright { float: right; margin: .4rem 0 1rem 1.6rem; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--slate); font-style: italic; margin-top: .4rem; }
.sticky .entry-title::after { content: " \2605"; color: var(--brass); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
	.content-grid { grid-template-columns: 1fr; gap: 2.5rem; }
	.post-grid { grid-template-columns: 1fr; }
	.post-card--lead .card-inner { grid-template-columns: 1fr; }
	.footer-widgets { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
	body { font-size: 1.06rem; }
	.footer-widgets { grid-template-columns: 1fr; }
	.post-navigation { grid-template-columns: 1fr; }

	.menu-toggle { display: block; }
	.main-navigation ul.nav-menu {
		display: none;
		width: 100%;
		flex-direction: column;
		padding-bottom: .8rem;
	}
	.main-navigation.toggled ul.nav-menu { display: flex; }
	.main-navigation .wrap { flex-wrap: wrap; }
	.main-navigation a { padding: .8rem .2rem; border-bottom: 1px solid rgba(255,255,255,.06); }
	.main-navigation ul ul { position: static; box-shadow: none; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
}
