/*
Theme Name: Black Knight
Theme URI: https://blackknightindustries.com
Author: Black Knight Industries
Author URI: https://blackknightindustries.com
Description: A clean, content-first theme built for Black Knight Industries. The homepage shows the five most recent posts in full rather than excerpts. Lightweight, no page builder, no external dependencies, PHP 7.4 compatible.
Version: 1.0.0
Requires at least: 5.0
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blackknight
Tags: blog, one-column, two-columns, right-sidebar, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* ---------------------------------------------------------------
   1. Variables
   --------------------------------------------------------------- */
:root {
	--bk-ink: #14171a;
	--bk-ink-soft: #4a5560;
	--bk-muted: #7a8794;
	--bk-line: #e3e8ec;
	--bk-bg: #ffffff;
	--bk-bg-alt: #f5f7f9;
	--bk-accent: #1f6feb;
	--bk-dark: #14171a;
	--bk-max: 1180px;
	--bk-read: 720px;
}

/* ---------------------------------------------------------------
   2. Reset
   --------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bk-bg);
	color: var(--bk-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 18px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--bk-accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .5em;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -.02em;
	color: var(--bk-ink);
}

h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p, ul, ol, blockquote, figure, table { margin: 0 0 1.4em; }

blockquote {
	border-left: 4px solid var(--bk-accent);
	padding: .2em 0 .2em 1.4em;
	margin-left: 0;
	color: var(--bk-ink-soft);
	font-style: italic;
}

code, pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .9em;
	background: var(--bk-bg-alt);
}

code { padding: .15em .4em; border-radius: 4px; }
pre { padding: 1.2em; overflow-x: auto; border-radius: 8px; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: .6em .8em; border-bottom: 1px solid var(--bk-line); text-align: left; }

/* ---------------------------------------------------------------
   3. Layout
   --------------------------------------------------------------- */
.bk-wrap {
	width: 100%;
	max-width: var(--bk-max);
	margin: 0 auto;
	padding: 0 24px;
}

.bk-main {
	display: flex;
	gap: 56px;
	align-items: flex-start;
	padding: 56px 0 72px;
}

.bk-content { flex: 1 1 auto; min-width: 0; }
.bk-sidebar { flex: 0 0 300px; }

.bk-content--full { max-width: var(--bk-read); margin: 0 auto; }

/* Skip link */
.bk-skip {
	position: absolute;
	left: -9999px;
}
.bk-skip:focus {
	left: 24px;
	top: 12px;
	z-index: 999;
	background: #fff;
	padding: .6em 1em;
	border-radius: 6px;
}

/* ---------------------------------------------------------------
   4. Header
   --------------------------------------------------------------- */
.bk-header {
	background: var(--bk-dark);
	color: #fff;
	padding: 22px 0;
	position: relative;
}

.bk-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

.bk-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }

.bk-brand__title {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: -.03em;
	line-height: 1.1;
}

.bk-brand__title a { color: #fff; text-decoration: none; }
.bk-brand__title a:hover { color: #fff; opacity: .85; text-decoration: none; }

.bk-brand__tagline {
	margin: 2px 0 0;
	font-size: .8rem;
	color: rgba(255,255,255,.62);
	letter-spacing: .04em;
	text-transform: uppercase;
}

.bk-brand .custom-logo { max-height: 52px; width: auto; }

/* Navigation */
.bk-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
}

.bk-nav a {
	color: rgba(255,255,255,.88);
	font-size: .95rem;
	font-weight: 500;
	text-decoration: none;
	padding: 4px 0;
	border-bottom: 2px solid transparent;
	display: block;
}

.bk-nav a:hover,
.bk-nav .current-menu-item > a {
	color: #fff;
	border-bottom-color: var(--bk-accent);
	text-decoration: none;
}

.bk-nav ul ul {
	display: none;
	position: absolute;
	background: var(--bk-dark);
	padding: 10px 18px;
	border-radius: 8px;
	flex-direction: column;
	gap: 10px;
	z-index: 20;
	box-shadow: 0 12px 30px rgba(0,0,0,.25);
}

.bk-nav li { position: relative; }
.bk-nav li:hover > ul,
.bk-nav li:focus-within > ul { display: flex; }

/* Mobile toggle */
.bk-nav-toggle {
	display: none;
	background: transparent;
	border: 1px solid rgba(255,255,255,.35);
	color: #fff;
	border-radius: 6px;
	padding: 8px 14px;
	font-size: .9rem;
	cursor: pointer;
}

/* ---------------------------------------------------------------
   5. Posts
   --------------------------------------------------------------- */
.bk-post {
	padding-bottom: 52px;
	margin-bottom: 52px;
	border-bottom: 1px solid var(--bk-line);
}

.bk-post:last-child { border-bottom: 0; margin-bottom: 0; }

.bk-post__title { margin: 0 0 .35em; font-size: 2.1rem; }
.bk-post__title a { color: var(--bk-ink); }
.bk-post__title a:hover { color: var(--bk-accent); text-decoration: none; }

.bk-meta {
	font-size: .85rem;
	color: var(--bk-muted);
	margin-bottom: 1.4em;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	letter-spacing: .01em;
}

.bk-meta a { color: var(--bk-muted); }
.bk-meta a:hover { color: var(--bk-accent); }

.bk-post__thumb { margin: 0 0 1.6em; }
.bk-post__thumb img { border-radius: 10px; width: 100%; }

.bk-post__body > *:last-child { margin-bottom: 0; }

.bk-post__body img { border-radius: 8px; }

.bk-post__body h2 { font-size: 1.6rem; margin-top: 1.6em; }
.bk-post__body h3 { font-size: 1.3rem; margin-top: 1.4em; }

/* Hide broken-image placeholders left by missing uploads */
.bk-post__body img[src=""] { display: none; }

.bk-tags { font-size: .85rem; color: var(--bk-muted); margin-top: 1.6em; }

/* Page header */
.bk-page-header {
	padding: 48px 0 0;
	border-bottom: 1px solid var(--bk-line);
}

.bk-page-header h1 { margin-bottom: .4em; }

.bk-page-header p { color: var(--bk-ink-soft); margin-bottom: 1.6em; }

/* ---------------------------------------------------------------
   6. Sidebar
   --------------------------------------------------------------- */
.bk-sidebar .widget {
	margin-bottom: 36px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--bk-line);
}

.bk-sidebar .widget:last-child { border-bottom: 0; }

.bk-sidebar .widget-title {
	font-size: .8rem;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--bk-muted);
	margin-bottom: 1em;
	font-weight: 700;
}

.bk-sidebar ul { list-style: none; margin: 0; padding: 0; }

.bk-sidebar li { margin-bottom: .7em; font-size: .95rem; line-height: 1.5; }

.bk-sidebar a { color: var(--bk-ink); }
.bk-sidebar a:hover { color: var(--bk-accent); }

/* ---------------------------------------------------------------
   7. Buttons / pagination
   --------------------------------------------------------------- */
.bk-btn,
.bk-pagination a,
.bk-pagination span {
	display: inline-block;
	padding: .55em 1.1em;
	border: 1px solid var(--bk-line);
	border-radius: 8px;
	font-size: .92rem;
	font-weight: 600;
	color: var(--bk-ink);
	background: #fff;
}

.bk-btn:hover,
.bk-pagination a:hover {
	border-color: var(--bk-accent);
	color: var(--bk-accent);
	text-decoration: none;
}

.bk-pagination { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 8px; }

.bk-pagination .current {
	background: var(--bk-dark);
	border-color: var(--bk-dark);
	color: #fff;
}

/* ---------------------------------------------------------------
   8. Footer
   --------------------------------------------------------------- */
.bk-footer {
	background: var(--bk-dark);
	color: rgba(255,255,255,.72);
	padding: 54px 0 40px;
	font-size: .92rem;
}

.bk-footer__inner {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 32px;
	flex-wrap: wrap;
}

.bk-footer__brand { font-weight: 700; color: #fff; font-size: 1.1rem; }

.bk-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.bk-footer a { color: rgba(255,255,255,.78); }
.bk-footer a:hover { color: #fff; }

.bk-footer__legal {
	margin-top: 34px;
	padding-top: 22px;
	border-top: 1px solid rgba(255,255,255,.12);
	font-size: .84rem;
	color: rgba(255,255,255,.5);
}

/* ---------------------------------------------------------------
   9. Comments
   --------------------------------------------------------------- */
.bk-comments { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--bk-line); }
.bk-comments ol { list-style: none; padding: 0; }
.bk-comments .comment-body { padding: 18px 0; border-bottom: 1px solid var(--bk-line); }

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea {
	width: 100%;
	max-width: 100%;
	padding: .7em .9em;
	border: 1px solid var(--bk-line);
	border-radius: 8px;
	font: inherit;
	font-size: .95rem;
}

input:focus, textarea:focus { outline: 2px solid var(--bk-accent); outline-offset: 1px; }

input[type="submit"] {
	background: var(--bk-dark);
	color: #fff;
	border: 0;
	padding: .7em 1.6em;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	width: auto;
}

input[type="submit"]:hover { background: var(--bk-accent); }

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

.alignleft { float: left; margin: .4em 1.6em 1.2em 0; }
.alignright { float: right; margin: .4em 0 1.2em 1.6em; }
.aligncenter { margin: 0 auto 1.4em; }
.alignwide, .alignfull { max-width: 100%; }

.wp-caption-text, figcaption {
	font-size: .85rem;
	color: var(--bk-muted);
	margin-top: .6em;
	text-align: center;
}

.sticky .bk-post__title::before { content: "★ "; color: var(--bk-accent); }

/* ---------------------------------------------------------------
   11. Responsive
   --------------------------------------------------------------- */
@media (max-width: 960px) {
	.bk-main { flex-direction: column; gap: 48px; padding-top: 40px; }
	.bk-sidebar { flex: 1 1 auto; width: 100%; }
}

@media (max-width: 680px) {
	body { font-size: 17px; }
	h1 { font-size: 2rem; }
	.bk-post__title { font-size: 1.6rem; }
	.bk-wrap { padding: 0 18px; }

	.bk-nav-toggle { display: block; }

	.bk-nav {
		flex-basis: 100%;
		display: none;
	}
	.bk-nav.is-open { display: block; }
	.bk-nav ul { flex-direction: column; gap: 2px; padding-top: 16px; }
	.bk-nav ul ul { position: static; box-shadow: none; padding: 6px 0 6px 18px; }
	.bk-nav li:hover > ul { display: flex; }

	.bk-footer__inner { flex-direction: column; gap: 20px; }
}

@media print {
	.bk-header, .bk-footer, .bk-sidebar, .bk-pagination { display: none; }
	body { font-size: 12pt; }
}
