/*
Theme Name: Bainwerx Dev
Theme URI: https://dev.bainwerx.com
Author: Bainwerx
Author URI: https://www.bainwerx.com
Description: Black developer-site theme for Bainwerx with an Apps section and a feature section for each app. All home-page wording, links and images are edited under Appearance → Customize → Bainwerx Home Page.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bainwerx-dev
*/

:root {
	--bw-accent: #f2c230;
	--bw-bg: #0a0a0a;
	--bw-bg-alt: #0f0f0f;
	--bw-card: #121212;
	--bw-media: #1a1a1a;
	--bw-line: #262626;
	--bw-line-strong: #3a3a38;
	--bw-text: #f5f5f2;
	--bw-muted: #b5b5b0;
	--bw-dim: #8c8c88;
	--bw-body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--bw-display: 'Michroma', 'Archivo', sans-serif;
	--bw-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
	--bw-icon-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Base ------------------------------------------------------------------ */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

[id] { scroll-margin-top: 24px; }

body {
	margin: 0;
	background: var(--bw-bg);
	color: var(--bw-text);
	font-family: var(--bw-body);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a { color: var(--bw-text); }
a:hover { color: var(--bw-accent); }
a:focus-visible, button:focus-visible, input:focus-visible {
	outline: 2px solid var(--bw-accent);
	outline-offset: 3px;
}

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

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; margin: 0;
	top: 12px; left: 12px; z-index: 1000;
	padding: 12px 18px; background: var(--bw-accent); color: #0a0a0a;
	font-weight: 600; text-decoration: none;
}

.bw-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding-left: 24px;
	padding-right: 24px;
}

/* Header ---------------------------------------------------------------- */

.site-header { border-bottom: 1px solid var(--bw-line); }
.site-header__inner {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 16px; padding-top: 20px; padding-bottom: 20px;
}
.site-title {
	font-family: var(--bw-display);
	font-size: 22px;
	letter-spacing: 0.08em;
	text-decoration: none;
	color: var(--bw-text);
}
.custom-logo-link { display: inline-flex; }
.custom-logo { max-height: 48px; width: auto; }

.bw-menu {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px;
	font-family: var(--bw-mono); font-size: 13px;
	text-transform: uppercase; letter-spacing: 0.08em;
}
.bw-menu a { display: inline-block; padding: 12px 0; text-decoration: none; }
.primary-nav .bw-cta a {
	padding: 12px 18px;
	border: 1px solid var(--bw-accent);
	color: var(--bw-accent);
}
.primary-nav .bw-cta a:hover { background: var(--bw-accent); color: #0a0a0a; }

/* Shared ---------------------------------------------------------------- */

.bw-section { border-top: 1px solid var(--bw-line); }
.bw-section--alt { background: var(--bw-bg-alt); }
.bw-section > .bw-wrap { padding-top: 96px; padding-bottom: 96px; }

.bw-eyebrow {
	margin: 0 0 16px;
	font-family: var(--bw-mono); font-size: 13px;
	letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--bw-dim);
}
.bw-eyebrow--accent { color: var(--bw-accent); }

.bw-h2 {
	margin: 0;
	font-family: var(--bw-display); font-weight: 400;
	font-size: clamp(28px, 4vw, 40px); line-height: 1.2;
}
.bw-h2--spaced { margin-bottom: 48px; }

.bw-btn-row { display: flex; flex-wrap: wrap; gap: 16px; }
.bw-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 52px; padding: 0 28px;
	font-family: var(--bw-body); font-size: 16px; font-weight: 600;
	text-decoration: none; text-align: center;
	transition: background-color .15s, color .15s, border-color .15s;
}
.bw-btn--primary { background: var(--bw-accent); color: #0a0a0a; }
.bw-btn--primary:hover { background: var(--bw-text); color: #0a0a0a; }
.bw-btn--ghost { border: 1px solid #4a4a48; color: var(--bw-text); font-weight: 500; }
.bw-btn--ghost:hover { border-color: var(--bw-accent); color: var(--bw-accent); }

.bw-link-arrow {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
	font-family: var(--bw-mono); font-size: 13px;
	letter-spacing: 0.06em; text-transform: uppercase;
	text-decoration: none; color: var(--bw-accent);
}
.bw-link-arrow:hover { color: var(--bw-text); }

/* Hero ------------------------------------------------------------------ */

.bw-hero > .bw-wrap { padding-top: 120px; padding-bottom: 104px; }
.bw-hero .bw-eyebrow { margin-bottom: 28px; }
.bw-hero__title {
	margin: 0; max-width: 1000px;
	font-family: var(--bw-display); font-weight: 400;
	font-size: clamp(34px, 6vw, 76px); line-height: 1.12; letter-spacing: 0.01em;
}
.bw-hero__lead {
	margin: 32px 0 0; max-width: 640px;
	font-size: 20px; line-height: 1.6; color: var(--bw-muted);
}
.bw-hero__actions { margin-top: 48px; }

/* Apps grid ------------------------------------------------------------- */

.bw-section-head {
	display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
	gap: 24px; margin-bottom: 48px;
}
.bw-section-head__intro {
	margin: 0; max-width: 420px;
	font-size: 17px; line-height: 1.6; color: var(--bw-muted);
}

.bw-app-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
	gap: 24px;
}
.bw-app-card {
	display: flex; flex-direction: column;
	background: var(--bw-card); border: 1px solid var(--bw-line);
}
.bw-app-card__media {
	aspect-ratio: 16 / 10;
	display: flex; align-items: center; justify-content: center;
	background: var(--bw-media); border-bottom: 1px solid var(--bw-line);
}
.bw-app-card__body {
	flex-grow: 1; display: flex; flex-direction: column; gap: 14px; padding: 28px;
}
.bw-app-card h3 { margin: 0; font-size: 24px; font-weight: 600; }
.bw-app-card p { margin: 0; flex-grow: 1; font-size: 16px; line-height: 1.6; color: var(--bw-muted); }

.bw-tags {
	display: flex; flex-wrap: wrap; gap: 8px;
	font-family: var(--bw-mono); font-size: 11px;
	letter-spacing: 0.08em; text-transform: uppercase;
}
.bw-tag { padding: 5px 10px; border: 1px solid var(--bw-line-strong); color: #c9c9c4; }

/* App icon -------------------------------------------------------------- */

.bw-icon {
	display: flex; align-items: center; justify-content: center; overflow: hidden;
	width: 120px; height: 120px; border-radius: 27px;
	background: #ffffff; color: #000000;
	font-family: var(--bw-icon-font); font-weight: 700; font-size: 22px; letter-spacing: -0.01em;
	line-height: 1;
}
.bw-icon--lg { width: 180px; height: 180px; border-radius: 40px; font-size: 34px; }
.bw-icon--img { background: transparent; }
.bw-icon--img img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* App feature sections -------------------------------------------------- */

.bw-app > .bw-wrap {
	display: flex; flex-wrap: wrap; align-items: center; gap: 56px 72px;
}
.bw-app--reverse > .bw-wrap { flex-direction: row-reverse; }

.bw-app__text {
	flex: 1 1 420px; min-width: 0;
	display: flex; flex-direction: column; gap: 20px;
}
.bw-app__text .bw-eyebrow { margin: 0; }
.bw-app__title {
	margin: 0;
	font-family: var(--bw-display); font-weight: 400;
	font-size: clamp(40px, 5vw, 56px); line-height: 1.1;
}
.bw-app__tagline { margin: 0; font-size: 22px; line-height: 1.45; }
.bw-app__desc { margin: 0; font-size: 17px; line-height: 1.6; color: var(--bw-muted); }
.bw-app__text .bw-btn-row { margin-top: 12px; }

.bw-app__media {
	flex: 1 1 420px; min-width: 0; aspect-ratio: 4 / 3;
	display: flex; align-items: center; justify-content: center; overflow: hidden;
	background: var(--bw-card); border: 1px solid var(--bw-line);
}
.bw-app--reverse .bw-app__media { background: #151515; }
.bw-app__media--shot img { display: block; width: 100%; height: 100%; object-fit: cover; }

.bw-features {
	margin: 8px 0 0; padding: 0; list-style: none;
	display: flex; flex-direction: column;
}
.bw-features li {
	display: flex; gap: 16px; padding: 16px 0;
	border-top: 1px solid var(--bw-line);
	font-size: 16px; line-height: 1.5;
}
.bw-features li:last-child { border-bottom: 1px solid var(--bw-line); }
.bw-features__mark { font-family: var(--bw-mono); color: var(--bw-accent); }
.bw-features strong { font-weight: 600; }

/* Services -------------------------------------------------------------- */

.bw-services {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
	gap: 1px; background: var(--bw-line); border: 1px solid var(--bw-line);
}
.bw-service {
	display: flex; flex-direction: column; gap: 14px;
	padding: 36px 32px; background: var(--bw-bg);
}
.bw-service__num { font-family: var(--bw-mono); font-size: 13px; color: var(--bw-accent); }
.bw-service h3 { margin: 0; font-size: 22px; font-weight: 600; }
.bw-service p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--bw-muted); }

/* Approach -------------------------------------------------------------- */

.bw-approach > .bw-wrap { display: flex; flex-wrap: wrap; gap: 48px 80px; }
.bw-approach__intro { flex: 1 1 320px; }
.bw-steps {
	flex: 2 1 480px; min-width: 0;
	margin: 0; padding: 0; list-style: none;
	display: flex; flex-direction: column;
}
.bw-steps li { display: flex; gap: 24px; padding: 24px 0; border-top: 1px solid var(--bw-line); }
.bw-steps li:last-child { border-bottom: 1px solid var(--bw-line); }
.bw-steps__num { min-width: 32px; font-family: var(--bw-mono); font-size: 14px; color: var(--bw-accent); }
.bw-steps h3 { margin: 0 0 6px; font-size: 19px; font-weight: 600; }
.bw-steps p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--bw-muted); }

/* Contact band ---------------------------------------------------------- */

.bw-contact { background: var(--bw-accent); color: #0a0a0a; }
.bw-contact > .bw-wrap {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 32px; padding-top: 88px; padding-bottom: 88px;
}
.bw-contact__text { max-width: 640px; }
.bw-contact h2 {
	margin: 0 0 16px;
	font-family: var(--bw-display); font-weight: 400;
	font-size: clamp(26px, 3.4vw, 36px); line-height: 1.2;
}
.bw-contact p { margin: 0; font-size: 18px; line-height: 1.6; }
.bw-btn--dark {
	min-height: 56px; padding: 0 32px; font-size: 17px;
	background: #0a0a0a; color: var(--bw-text);
	overflow-wrap: anywhere;
}
.bw-btn--dark:hover { background: #1f1f1f; color: var(--bw-accent); }
.bw-contact a:focus-visible { outline-color: #0a0a0a; }

/* Footer ---------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--bw-line); }
.site-footer__inner {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 20px; padding-top: 40px; padding-bottom: 40px;
	font-family: var(--bw-mono); font-size: 13px; color: #a3a3a0;
}
.site-footer__brand {
	font-family: var(--bw-display); font-size: 16px; letter-spacing: 0.08em; color: var(--bw-text);
}
.footer-nav .bw-menu { text-transform: none; letter-spacing: 0; gap: 4px 28px; }

/* Posts and pages ------------------------------------------------------- */

.bw-content > .bw-wrap { padding-top: 88px; padding-bottom: 104px; }
.bw-page-head { margin-bottom: 48px; }
.bw-page-title {
	margin: 0; max-width: 900px;
	font-family: var(--bw-display); font-weight: 400;
	font-size: clamp(30px, 4.6vw, 52px); line-height: 1.15;
}
.bw-page-desc { margin-top: 16px; max-width: 640px; color: var(--bw-muted); font-size: 18px; line-height: 1.6; }
.bw-lead { margin: 24px 0 40px; max-width: 640px; font-size: 20px; line-height: 1.6; color: var(--bw-muted); }
.bw-meta {
	margin: 0 0 12px;
	font-family: var(--bw-mono); font-size: 12px;
	letter-spacing: 0.1em; text-transform: uppercase; color: var(--bw-dim);
}

.bw-post-list { max-width: 820px; }
.bw-post { padding: 36px 0; border-top: 1px solid var(--bw-line); }
.bw-post:last-child { border-bottom: 1px solid var(--bw-line); }
.bw-post__title { margin: 0 0 12px; font-size: 28px; font-weight: 600; line-height: 1.25; }
.bw-post__title a { text-decoration: none; }
.bw-post__excerpt { color: var(--bw-muted); font-size: 17px; line-height: 1.6; }
.bw-post__excerpt p { margin: 0 0 8px; }

.bw-entry__image { margin: 0 0 48px; }
.bw-entry__image img { display: block; width: 100%; }

.entry-content { max-width: 720px; font-size: 18px; line-height: 1.75; color: #dcdcd7; }
.entry-content > * { margin-top: 0; margin-bottom: 1.4em; }
.entry-content h2, .entry-content h3, .entry-content h4 {
	margin-top: 2em; margin-bottom: 0.6em; color: var(--bw-text); line-height: 1.25;
}
.entry-content h2 { font-size: 30px; font-weight: 600; }
.entry-content h3 { font-size: 23px; font-weight: 600; }
.entry-content a { color: var(--bw-accent); text-underline-offset: 3px; }
.entry-content a:hover { color: var(--bw-text); }
.entry-content blockquote {
	margin-left: 0; margin-right: 0; padding: 4px 0 4px 24px;
	border-left: 2px solid var(--bw-accent); color: var(--bw-text); font-size: 21px;
}
.entry-content code, .entry-content pre { font-family: var(--bw-mono); font-size: 0.85em; }
.entry-content :not(pre) > code { padding: 2px 6px; background: var(--bw-card); border: 1px solid var(--bw-line); }
.entry-content pre { padding: 20px 24px; overflow-x: auto; background: var(--bw-card); border: 1px solid var(--bw-line); line-height: 1.6; }
.entry-content hr { border: 0; border-top: 1px solid var(--bw-line); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 16px; }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--bw-line); text-align: left; }
.entry-content figcaption, .wp-caption-text { font-size: 14px; color: var(--bw-dim); margin-top: 8px; }
.entry-content .alignwide { max-width: 1000px; }
.entry-content .alignfull { max-width: none; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.wp-block-button__link { background: var(--bw-accent); color: #0a0a0a !important; border-radius: 0; font-weight: 600; text-decoration: none; }

.post-navigation, .navigation.pagination { margin-top: 56px; font-family: var(--bw-mono); font-size: 13px; }
.post-navigation .nav-links, .pagination .nav-links { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.pagination .page-numbers { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; }
.pagination .page-numbers.current { color: var(--bw-accent); }

.search-form { display: flex; flex-wrap: wrap; gap: 8px; max-width: 520px; }
.search-form label { flex: 1 1 240px; }
.search-field {
	width: 100%; min-height: 48px; padding: 0 14px;
	background: var(--bw-card); color: var(--bw-text);
	border: 1px solid var(--bw-line-strong); font: inherit;
}
.search-submit {
	min-height: 48px; padding: 0 22px; border: 0; cursor: pointer;
	background: var(--bw-accent); color: #0a0a0a; font: inherit; font-weight: 600;
}

/* Comments */
.comments-area { max-width: 720px; margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--bw-line); }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--bw-line); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 12px 14px; background: var(--bw-card); color: var(--bw-text);
	border: 1px solid var(--bw-line-strong); font: inherit;
}
.comment-form .submit {
	min-height: 48px; padding: 0 24px; border: 0; cursor: pointer;
	background: var(--bw-accent); color: #0a0a0a; font: inherit; font-weight: 600;
}

/* Small screens --------------------------------------------------------- */

@media (max-width: 640px) {
	.bw-hero > .bw-wrap { padding-top: 72px; padding-bottom: 72px; }
	.bw-section > .bw-wrap { padding-top: 72px; padding-bottom: 72px; }
	.bw-contact > .bw-wrap { padding-top: 64px; padding-bottom: 64px; }
	.bw-hero__lead { font-size: 18px; }
	.bw-app > .bw-wrap, .bw-app--reverse > .bw-wrap { flex-direction: column; align-items: stretch; }
	.bw-app__media { flex-basis: auto; width: 100%; }
	.bw-app__text { flex-basis: auto; }
	.bw-service { padding: 28px 24px; }
}
