/* ==========================================================================
   Bowblog — Front-end styles
   ========================================================================== */

/* Skip link
   ========================================================================== */

.skip-link {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.skip-link:focus {
	position: static;
	width: auto;
	height: auto;
	left: auto;
	overflow: visible;
	background: var(--wp--preset--color--blog-red);
	color: var(--wp--preset--color--blog-white);
	padding: 0.5em 1em;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
	outline: none;
	z-index: 9999;
}

/* Focus
   ========================================================================== */

:focus-visible {
	outline: 2px solid var(--wp--preset--color--blog-red);
	outline-offset: 2px;
}

/* Header
   ========================================================================== */

.bb-site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--wp--preset--color--blog-white);
	border-bottom: 1px solid var(--wp--preset--color--blog-rule);
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

/* Site title: the B gets the red treatment */

.bb-site-header .wp-block-site-title a {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.6rem;
	font-weight: 400;
	color: var(--wp--preset--color--blog-black);
	text-decoration: none;
	letter-spacing: -0.01em;
}

.bb-site-header .wp-block-site-title a::first-letter {
	color: var(--wp--preset--color--blog-red);
}

.bb-site-header .wp-block-site-title a:hover {
	color: var(--wp--preset--color--blog-red);
}

/* Search bar in header
   ========================================================================== */

.bb-header-search .wp-block-search__inside-wrapper {
	border: 2px solid var(--wp--preset--color--blog-rule);
	border-radius: 3px;
	overflow: hidden;
	transition: border-color 0.15s ease;
	display: flex;
}

.bb-header-search .wp-block-search__inside-wrapper:focus-within {
	border-color: var(--wp--preset--color--blog-red);
}

.bb-header-search .wp-block-search__input {
	border: none;
	padding: 0.55em 0.75em;
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--blog-black);
	background: transparent;
	flex: 1;
	min-width: 0;
	outline: none;
}

.bb-header-search .wp-block-search__button {
	background: var(--wp--preset--color--blog-red);
	color: var(--wp--preset--color--blog-white);
	border: none;
	padding: 0.55em 0.9em;
	cursor: pointer;
	font-size: var(--wp--preset--font-size--small);
	transition: background 0.15s ease;
	flex-shrink: 0;
}

.bb-header-search .wp-block-search__button:hover {
	background: var(--wp--preset--color--blog-red-dark);
}

/* Homepage two-column layout
   ========================================================================== */

.bb-home-body {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: flex-start !important;
	gap: 3rem !important;
}

.bb-years-col {
	flex: 0 0 180px !important;
	width: 180px !important;
	min-width: 0 !important;
}

.bb-posts-col {
	flex: 1 1 auto !important;
	min-width: 0 !important;
}

/* Year archives block
   ========================================================================== */

.bb-year-archives {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: 0.4rem;
	padding: 0.75rem 0 0;
}

.bb-year-link {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	padding: 0.4rem 0.6rem;
	background: var(--wp--preset--color--blog-white);
	border: 1px solid var(--wp--preset--color--blog-rule);
	border-radius: 3px;
	text-decoration: none !important;
	color: var(--wp--preset--color--blog-dark) !important;
	transition: background 0.12s, border-color 0.12s, color 0.12s;
	min-width: 3rem;
	text-align: center;
}

.bb-year-link:hover {
	background: var(--wp--preset--color--blog-red-tint);
	border-color: var(--wp--preset--color--blog-red);
	color: var(--wp--preset--color--blog-red);
}

.bb-year-link--current {
	background: var(--wp--preset--color--blog-red);
	border-color: var(--wp--preset--color--blog-red);
	color: var(--wp--preset--color--blog-white) !important;
}

.bb-year-link--current:hover {
	background: var(--wp--preset--color--blog-red-dark);
	border-color: var(--wp--preset--color--blog-red-dark);
}

.bb-year-num {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	line-height: 1.2;
	color: inherit;
}

.bb-year-count {
	font-family: var(--wp--preset--font-family--inter);
	font-size: 0.7rem;
	color: var(--wp--preset--color--blog-mid);
	line-height: 1;
	margin-top: 0.2rem;
}

.bb-year-link--current .bb-year-count {
	color: rgba(255, 255, 255, 0.75);
}

/* Section labels
   ========================================================================== */

.bb-section-label {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--blog-red);
	margin-bottom: 1.25rem;
}

.bb-section-label::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--wp--preset--color--blog-rule);
}

/* Highlights grid
   ========================================================================== */

.bb-highlights-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	margin-top: 1rem;
}

.bb-highlights-empty {
	color: var(--wp--preset--color--blog-mid);
	font-size: var(--wp--preset--font-size--small);
	margin-top: 0.5rem;
}

/* Pinned post cards
   ========================================================================== */

.bb-post-card {
	display: flex;
	flex-direction: column;
	border-top: 3px solid var(--wp--preset--color--blog-red);
	background: var(--wp--preset--color--blog-white);
	transition: box-shadow 0.15s ease;
}

.bb-post-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.bb-card-body {
	padding: 1rem 0 0.5rem;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.bb-card-body .wp-block-post-title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 400;
	line-height: var(--wp--custom--line-height--tight);
	margin-bottom: 0.5rem;
}

.bb-card-body .wp-block-post-title a {
	color: var(--wp--preset--color--blog-black);
	text-decoration: none;
}

.bb-card-body .wp-block-post-title a:hover {
	color: var(--wp--preset--color--blog-red);
}

.bb-card-body .wp-block-post-excerpt {
	flex: 1;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--blog-dark);
	line-height: var(--wp--custom--line-height--relaxed);
	margin-bottom: 0.75rem;
}

.bb-card-date {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--blog-mid);
}

/* Post stream (homepage / archive list)
   ========================================================================== */

.bb-post-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
}

.bb-post-item {
	padding: 1.75rem 0;
	border-bottom: 1px solid var(--wp--preset--color--blog-rule);
}

.bb-post-item:first-child {
	border-top: 1px solid var(--wp--preset--color--blog-rule);
}

.bb-post-item .wp-block-post-date {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--blog-red);
	display: block;
	margin-bottom: 0.35rem;
}

.bb-post-item .wp-block-post-title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 400;
	line-height: var(--wp--custom--line-height--tight);
	margin-bottom: 0.5rem;
}

.bb-post-item .wp-block-post-title a {
	color: var(--wp--preset--color--blog-black);
	text-decoration: none;
}

.bb-post-item .wp-block-post-title a:hover {
	color: var(--wp--preset--color--blog-red);
}

.bb-post-item .wp-block-post-excerpt {
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--blog-dark);
	line-height: var(--wp--custom--line-height--relaxed);
	margin-top: 0.75rem;
}

.bb-post-item .wp-block-post-excerpt .wp-block-post-excerpt__more-link {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--blog-red);
	text-decoration: none;
	white-space: nowrap;
}

.bb-post-item .wp-block-post-excerpt .wp-block-post-excerpt__more-link:hover {
	text-decoration: underline;
}

/* Star ratings
   ========================================================================== */

.bb-star-rating {
	display: inline-flex;
	gap: 0.1em;
	font-size: 0.9rem;
	line-height: 1;
}

.bb-star--filled {
	color: var(--wp--preset--color--blog-red);
}

.bb-star--empty {
	color: var(--wp--preset--color--blog-rule);
}

.bb-rating-label {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--blog-mid);
	margin-left: 0.4em;
	vertical-align: middle;
}

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

.bb-post-header {
	border-top: 4px solid var(--wp--preset--color--blog-red);
	padding-top: 2rem;
}

.bb-post-dateline {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--blog-red);
	display: block;
	margin-bottom: 0.5rem;
}

.bb-post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--blog-mid);
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--blog-rule);
}

/* Post content typography
   ========================================================================== */

.wp-block-post-content p,
.wp-block-post-content li {
	font-size: var(--wp--preset--font-size--medium);
	line-height: var(--wp--custom--line-height--relaxed);
}

.wp-block-post-content h2,
.wp-block-post-content h3,
.wp-block-post-content h4 {
	margin-top: 2em;
}

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

.wp-block-query-pagination {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	align-items: center;
	padding: 2rem 0 1rem;
}

.wp-block-query-pagination-numbers a,
.wp-block-query-pagination-previous a,
.wp-block-query-pagination-next a {
	display: inline-block;
	padding: 0.4em 0.85em;
	border: 1px solid var(--wp--preset--color--blog-rule);
	border-radius: 3px;
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--blog-red);
	text-decoration: none;
	transition: background 0.12s, border-color 0.12s;
}

.wp-block-query-pagination-numbers a:hover,
.wp-block-query-pagination-previous a:hover,
.wp-block-query-pagination-next a:hover {
	background: var(--wp--preset--color--blog-red-tint);
	border-color: var(--wp--preset--color--blog-red);
}

.wp-block-query-pagination-numbers .current {
	display: inline-block;
	padding: 0.4em 0.85em;
	background: var(--wp--preset--color--blog-red);
	color: var(--wp--preset--color--blog-white);
	border-radius: 3px;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

/* Archive header band
   ========================================================================== */

.bb-archive-band {
	background: var(--wp--preset--color--blog-red-tint);
	border-bottom: 3px solid var(--wp--preset--color--blog-red);
	padding: 2rem 0;
}

.bb-archive-band h1 {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xxl);
	font-weight: 400;
	color: var(--wp--preset--color--blog-black);
	margin: 0;
}

.bb-archive-band .bb-archive-year {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--blog-red);
	display: block;
	margin-bottom: 0.25rem;
}

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

.bb-site-footer {
	background: var(--wp--preset--color--blog-black);
	color: var(--wp--preset--color--blog-white);
	font-size: var(--wp--preset--font-size--small);
}

.bb-site-footer .wp-block-site-title a {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.2rem;
	font-weight: 400;
	color: var(--wp--preset--color--blog-white);
	text-decoration: none;
}

.bb-site-footer .wp-block-site-title a::first-letter {
	color: var(--wp--preset--color--blog-red);
}

.bb-site-footer a {
	color: var(--wp--preset--color--blog-light);
	text-decoration: none;
}

.bb-site-footer a:hover {
	color: var(--wp--preset--color--blog-white);
	text-decoration: underline;
}

.bb-footer-copy {
	font-size: var(--wp--preset--font-size--xs);
	color: rgba(255, 255, 255, 0.45);
	margin-top: 0.25rem;
}

/* 404
   ========================================================================== */

.bb-404-num {
	font-family: var(--wp--preset--font-family--mono);
	font-size: clamp(4rem, 12vw, 8rem);
	font-weight: 600;
	color: var(--wp--preset--color--blog-red);
	line-height: 1;
	display: block;
	margin-bottom: 0.5rem;
}

/* Edit post link
   ========================================================================== */

.bb-edit-link {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--blog-rule);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--xs);
}

.bb-edit-link a {
	color: var(--wp--preset--color--blog-mid);
	text-decoration: none;
}

.bb-edit-link a:hover {
	color: var(--wp--preset--color--blog-red);
}

/* Print
   ========================================================================== */

@media print {
	.bb-site-header,
	.bb-site-footer,
	.wp-block-query-pagination,
	.bb-year-archives {
		display: none !important;
	}

	body {
		font-size: 12pt;
		color: #000;
		background: #fff;
	}
}

/* Reduced motion
   ========================================================================== */

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