/*
Theme Name: Build Journey
Theme URI: https://example.com/build-journey
Author: Build Journey
Author URI: https://example.com
Description: A clean, fast, mobile-first blog theme made for long-form build stories. Works with free Elementor (no Pro needed) and auto-hides its own header or footer when an Elementor-built one is published. Designed for comfortable reading and ready for Google AdSense. Compatible with RankMath.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
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: build-journey
Tags: blog, one-column, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, editor-style
*/

/* =================================================================
   ONE PLACE TO CHANGE COLORS, FONTS, AND SPACING.
   Edit the values below, or use Appearance > Customize > Build
   Journey Options to change the main colors and accent without code.
   ================================================================= */

:root {
  /* Colors */
  --bj-bg: #faf9f6;          /* page background, warm off-white */
  --bj-surface: #ffffff;     /* cards and boxes */
  --bj-text: #18181b;        /* body text, near-black, high contrast */
  --bj-muted: #5b5b66;       /* secondary text, dates, captions */
  --bj-border: #e7e5df;      /* hairlines and card borders */
  --bj-accent: #4338ca;      /* deep indigo, links and buttons */
  --bj-accent-soft: #eef0ff; /* tinted accent background */
  --bj-accent-ink: #ffffff;  /* text on top of the accent color */

  /* Typography */
  --bj-font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --bj-font-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --bj-font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --bj-size-base: 1.125rem;  /* ~18px body text */
  --bj-line: 1.75;           /* comfortable reading line height */

  /* Layout */
  --bj-reading-width: 44rem; /* the reading column, not too wide */
  --bj-wide-width: 72rem;    /* outer container for grids and hero */
  --bj-radius: 14px;         /* rounded corners on cards and buttons */
  --bj-radius-sm: 8px;
  --bj-shadow: 0 1px 2px rgba(24, 24, 27, 0.04), 0 6px 24px rgba(24, 24, 27, 0.06);
  --bj-shadow-sm: 0 1px 3px rgba(24, 24, 27, 0.07);
  --bj-space: 1.5rem;
}

/* -----------------------------------------------------------------
   Reset and base
   ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bj-bg);
  color: var(--bj-text);
  font-family: var(--bj-font-body);
  font-size: var(--bj-size-base);
  line-height: var(--bj-line);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--bj-accent);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover, a:focus { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--bj-font-head);
  color: var(--bj-text);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 5vw, 2.85rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.25em; }

strong, b { font-weight: 600; }

blockquote {
  margin: 1.75em 0;
  padding: 0.25em 0 0.25em 1.25em;
  border-left: 4px solid var(--bj-accent);
  color: var(--bj-muted);
  font-style: italic;
}

code, kbd, pre, samp {
  font-family: var(--bj-font-mono);
  font-size: 0.9em;
}
:not(pre) > code {
  background: var(--bj-accent-soft);
  color: #312e81;
  padding: 0.15em 0.4em;
  border-radius: 6px;
}
pre {
  background: #1e1e2e;
  color: #e4e4ef;
  padding: 1.2rem 1.3rem;
  border-radius: var(--bj-radius-sm);
  overflow-x: auto;
  line-height: 1.6;
  font-size: 0.95rem;
}
pre code { background: none; color: inherit; padding: 0; }

hr { border: 0; border-top: 1px solid var(--bj-border); margin: 2.5rem 0; }

/* -----------------------------------------------------------------
   Layout helpers
   ----------------------------------------------------------------- */
.bj-container { width: 100%; max-width: var(--bj-wide-width); margin-inline: auto; padding-inline: 1.25rem; }
.bj-reading { max-width: var(--bj-reading-width); margin-inline: auto; }
.bj-section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.bj-eyebrow {
  font-family: var(--bj-font-head);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bj-accent);
}
.screen-reader-text {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px; height: 1px; overflow: hidden;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--bj-accent); color: var(--bj-accent-ink);
  padding: 0.6rem 1rem; border-radius: 0 0 var(--bj-radius-sm) 0; z-index: 1000;
}
.skip-link:focus { left: 0; text-decoration: none; }

/* -----------------------------------------------------------------
   Buttons
   ----------------------------------------------------------------- */
.bj-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--bj-font-head); font-weight: 600; font-size: 1rem;
  background: var(--bj-accent); color: var(--bj-accent-ink);
  padding: 0.75rem 1.4rem; border-radius: var(--bj-radius-sm);
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, opacity .12s ease;
}
.bj-btn:hover, .bj-btn:focus { text-decoration: none; opacity: 0.92; transform: translateY(-1px); }
.bj-btn--ghost { background: transparent; color: var(--bj-accent); border-color: var(--bj-border); }

/* -----------------------------------------------------------------
   Header
   ----------------------------------------------------------------- */
.bj-site-header {
  background: var(--bj-bg);
  background: color-mix(in srgb, var(--bj-bg) 88%, white);
  border-bottom: 1px solid var(--bj-border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(140%) blur(8px);
}
.bj-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}
.bj-brand { font-family: var(--bj-font-head); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; color: var(--bj-text); }
.bj-brand:hover { text-decoration: none; }
.bj-brand img { max-height: 40px; width: auto; }

.bj-nav ul { list-style: none; display: flex; gap: 1.6rem; margin: 0; padding: 0; }
.bj-nav a { font-family: var(--bj-font-head); font-weight: 500; font-size: 0.98rem; color: var(--bj-text); }
.bj-nav a:hover { color: var(--bj-accent); text-decoration: none; }
.bj-nav .current-menu-item > a { color: var(--bj-accent); }

.bj-nav-toggle {
  display: none; background: none; border: 1px solid var(--bj-border);
  border-radius: var(--bj-radius-sm); padding: 0.45rem 0.6rem; cursor: pointer;
}
.bj-nav-toggle span { display: block; width: 22px; height: 2px; background: var(--bj-text); margin: 4px 0; transition: .2s; }

/* -----------------------------------------------------------------
   Footer
   ----------------------------------------------------------------- */
.bj-site-footer {
  background: #16161a; color: #d4d4dc; margin-top: 4rem;
  padding-block: 3rem 2rem;
}
.bj-footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem; }
.bj-site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 0.9rem; }
.bj-site-footer a { color: #c3c3cf; }
.bj-site-footer a:hover { color: #fff; }
.bj-footer-about { font-size: 0.98rem; line-height: 1.7; color: #a9a9b6; }
.bj-footer-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.bj-footer-bottom {
  border-top: 1px solid #2a2a32; margin-top: 2.5rem; padding-top: 1.5rem;
  font-size: 0.9rem; color: #8a8a98; text-align: center;
}

/* -----------------------------------------------------------------
   Cards and grids
   ----------------------------------------------------------------- */
.bj-grid { display: grid; gap: 1.75rem; }
.bj-grid--3 { grid-template-columns: repeat(3, 1fr); }
.bj-grid--2 { grid-template-columns: repeat(2, 1fr); }

.bj-card {
  background: var(--bj-surface); border: 1px solid var(--bj-border);
  border-radius: var(--bj-radius); overflow: hidden; box-shadow: var(--bj-shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease; display: flex; flex-direction: column;
}
.bj-card:hover { transform: translateY(-3px); box-shadow: var(--bj-shadow); }
.bj-card__thumb { aspect-ratio: 16 / 9; background: var(--bj-accent-soft); overflow: hidden; }
.bj-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.bj-card__body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.bj-card__title { font-size: 1.25rem; margin: 0; }
.bj-card__title a { color: var(--bj-text); }
.bj-card__title a:hover { color: var(--bj-accent); text-decoration: none; }
.bj-card__meta { font-family: var(--bj-font-head); font-size: 0.82rem; color: var(--bj-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.bj-card__excerpt { color: var(--bj-muted); font-size: 1rem; margin: 0; }
.bj-card--project .bj-card__body { gap: 0.4rem; }
.bj-card__count { font-family: var(--bj-font-head); font-size: 0.8rem; color: var(--bj-accent); font-weight: 600; }

/* -----------------------------------------------------------------
   Hero (homepage)
   ----------------------------------------------------------------- */
.bj-hero { padding-block: clamp(3rem, 8vw, 6rem); }
.bj-hero__inner { max-width: 48rem; }
.bj-hero h1 { margin-bottom: 0.6rem; }
.bj-hero p { font-size: 1.25rem; color: var(--bj-muted); margin-bottom: 1.8rem; max-width: 38rem; }
.bj-hero__cta { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.bj-section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.8rem; gap: 1rem; flex-wrap: wrap; }
.bj-section__head h2 { margin: 0; }
.bj-section__head a { font-family: var(--bj-font-head); font-weight: 600; font-size: 0.95rem; }

/* -----------------------------------------------------------------
   Single post
   ----------------------------------------------------------------- */
.bj-breadcrumbs { font-family: var(--bj-font-head); font-size: 0.85rem; color: var(--bj-muted); padding-top: 1.75rem; }
.bj-breadcrumbs a { color: var(--bj-muted); }
.bj-breadcrumbs a:hover { color: var(--bj-accent); }
.bj-breadcrumbs .sep { margin: 0 0.45rem; opacity: 0.6; }

.bj-post-header { padding-block: 1.5rem 1rem; }
.bj-series-label {
  display: inline-block; font-family: var(--bj-font-head); font-weight: 600;
  font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--bj-accent-soft); color: #312e81;
  padding: 0.35rem 0.8rem; border-radius: 999px; margin-bottom: 1rem;
}
.bj-post-title { margin-bottom: 0.8rem; }
.bj-post-meta { font-family: var(--bj-font-head); font-size: 0.9rem; color: var(--bj-muted); display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; }
.bj-post-meta a { color: var(--bj-accent); }
.bj-post-featured { margin: 2rem 0; border-radius: var(--bj-radius); overflow: hidden; box-shadow: var(--bj-shadow); }

.bj-post-content { font-size: var(--bj-size-base); }
.bj-post-content > * { max-width: var(--bj-reading-width); margin-inline: auto; }
.bj-post-content h2 { margin-top: 2.2rem; }
.bj-post-content h3 { margin-top: 1.8rem; }
.bj-post-content ul, .bj-post-content ol { padding-left: 1.4rem; margin: 0 auto 1.25em; max-width: var(--bj-reading-width); }
.bj-post-content li { margin-bottom: 0.5rem; }
.bj-post-content img,
.bj-post-content figure,
.bj-post-content .wp-block-image { max-width: 100%; }
.bj-post-content figure { margin: 2rem auto; }
.bj-post-content figcaption { font-size: 0.9rem; color: var(--bj-muted); text-align: center; margin-top: 0.5rem; }

/* Takeaway box */
.bj-takeaway {
  max-width: var(--bj-reading-width); margin: 2.25rem auto;
  background: var(--bj-accent-soft); border: 1px solid #d8ddff;
  border-left: 5px solid var(--bj-accent); border-radius: var(--bj-radius);
  padding: 1.4rem 1.6rem;
}
.bj-takeaway__label { font-family: var(--bj-font-head); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; color: var(--bj-accent); margin-bottom: 0.5rem; }
.bj-takeaway p:last-child { margin-bottom: 0; }

/* FAQ */
.bj-faq { max-width: var(--bj-reading-width); margin: 2.5rem auto; }
.bj-faq__title { font-size: 1.5rem; margin-bottom: 1rem; }
.bj-faq__item { border: 1px solid var(--bj-border); border-radius: var(--bj-radius-sm); background: var(--bj-surface); margin-bottom: 0.8rem; overflow: hidden; }
.bj-faq__q { font-family: var(--bj-font-head); font-weight: 600; font-size: 1.05rem; padding: 1rem 1.2rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.bj-faq__q::-webkit-details-marker { display: none; }
.bj-faq__q::after { content: "+"; color: var(--bj-accent); font-size: 1.3rem; line-height: 1; }
details[open] .bj-faq__q::after { content: "\2212"; }
.bj-faq__a { padding: 0 1.2rem 1.1rem; color: var(--bj-text); }
.bj-faq__a p:last-child { margin-bottom: 0; }

/* Ad slots */
.bj-ad { max-width: var(--bj-reading-width); margin: 2.25rem auto; text-align: center; }
.bj-ad__label { font-family: var(--bj-font-head); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--bj-muted); margin-bottom: 0.4rem; opacity: 0.8; }
.bj-ad ins, .bj-ad img { margin-inline: auto; }

/* Post tags */
.bj-post-tags { max-width: var(--bj-reading-width); margin: 2rem auto 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.bj-tag { font-family: var(--bj-font-head); font-size: 0.85rem; background: var(--bj-surface); border: 1px solid var(--bj-border); padding: 0.3rem 0.75rem; border-radius: 999px; color: var(--bj-muted); }
.bj-tag:hover { color: var(--bj-accent); border-color: var(--bj-accent); text-decoration: none; }

/* Author / about box */
.bj-author-box {
  max-width: var(--bj-reading-width); margin: 3rem auto 0;
  display: flex; gap: 1.25rem; align-items: flex-start;
  background: var(--bj-surface); border: 1px solid var(--bj-border);
  border-radius: var(--bj-radius); padding: 1.5rem;
}
.bj-author-box img { border-radius: 50%; width: 64px; height: 64px; }
.bj-author-box h4 { margin: 0 0 0.3rem; }
.bj-author-box p { margin: 0; color: var(--bj-muted); font-size: 0.98rem; }

/* Prev / next series navigation */
.bj-post-nav { max-width: var(--bj-reading-width); margin: 3rem auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.bj-post-nav a { display: block; padding: 1.1rem 1.25rem; border: 1px solid var(--bj-border); border-radius: var(--bj-radius); background: var(--bj-surface); }
.bj-post-nav a:hover { border-color: var(--bj-accent); text-decoration: none; }
.bj-post-nav .dir { font-family: var(--bj-font-head); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--bj-muted); }
.bj-post-nav .title { font-family: var(--bj-font-head); font-weight: 600; color: var(--bj-text); display: block; margin-top: 0.25rem; }
.bj-post-nav .next { text-align: right; }

/* Related posts */
.bj-related { margin-top: 3.5rem; }
.bj-related h2 { text-align: center; margin-bottom: 1.8rem; }

/* -----------------------------------------------------------------
   Archives, blog feed, pagination
   ----------------------------------------------------------------- */
.bj-archive-header { padding-block: 2.5rem 0.5rem; }
.bj-archive-header h1 { margin-bottom: 0.4rem; }
.bj-archive-header p { color: var(--bj-muted); max-width: 40rem; }

.bj-pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 3rem; flex-wrap: wrap; }
.bj-pagination .page-numbers {
  font-family: var(--bj-font-head); font-weight: 600; padding: 0.5rem 0.9rem;
  border: 1px solid var(--bj-border); border-radius: var(--bj-radius-sm); color: var(--bj-text);
}
.bj-pagination .page-numbers.current { background: var(--bj-accent); color: var(--bj-accent-ink); border-color: var(--bj-accent); }
.bj-pagination a.page-numbers:hover { border-color: var(--bj-accent); text-decoration: none; }

/* -----------------------------------------------------------------
   Page content (About, legal, etc.)
   ----------------------------------------------------------------- */
.bj-page { padding-block: 2.5rem; }
.bj-page-content { font-size: var(--bj-size-base); }
.bj-page-content h2 { margin-top: 2rem; }

/* Contact form */
.bj-contact-form { max-width: var(--bj-reading-width); display: grid; gap: 1rem; margin-top: 1.5rem; }
.bj-contact-form label { font-family: var(--bj-font-head); font-weight: 600; font-size: 0.95rem; display: block; margin-bottom: 0.35rem; }
.bj-contact-form input, .bj-contact-form textarea {
  width: 100%; padding: 0.8rem 0.95rem; font-family: var(--bj-font-body); font-size: 1rem;
  border: 1px solid var(--bj-border); border-radius: var(--bj-radius-sm); background: var(--bj-surface); color: var(--bj-text);
}
.bj-contact-form input:focus, .bj-contact-form textarea:focus { outline: 2px solid var(--bj-accent); border-color: var(--bj-accent); }
.bj-hp { position: absolute; left: -9999px; }
.bj-form-notice { padding: 0.9rem 1.1rem; border-radius: var(--bj-radius-sm); margin-bottom: 1rem; }
.bj-form-notice--ok { background: #e8f7ee; color: #1b5e34; border: 1px solid #b6e3c6; }
.bj-form-notice--err { background: #fdeceb; color: #8a2c25; border: 1px solid #f4c6c2; }
.bj-contact-links { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* Comments */
.bj-comments { max-width: var(--bj-reading-width); margin: 3rem auto 0; }
.bj-comments ol { list-style: none; padding: 0; }
.bj-comments .comment-body { border: 1px solid var(--bj-border); border-radius: var(--bj-radius); padding: 1.1rem 1.25rem; margin-bottom: 1rem; background: var(--bj-surface); }

/* Focus visibility for accessibility */
:focus-visible { outline: 3px solid var(--bj-accent); outline-offset: 2px; }

/* -----------------------------------------------------------------
   Responsive: mobile-first means we layer larger screens on,
   and collapse complex grids on small screens.
   ----------------------------------------------------------------- */
@media (max-width: 880px) {
  .bj-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .bj-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .bj-nav-toggle { display: block; }
  .bj-nav {
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--bj-bg); border-bottom: 1px solid var(--bj-border);
    padding: 1rem 1.25rem; display: none;
  }
  .bj-nav.is-open { display: block; }
  .bj-nav ul { flex-direction: column; gap: 0.9rem; }
  .bj-grid--3, .bj-grid--2 { grid-template-columns: 1fr; }
  .bj-footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .bj-post-nav { grid-template-columns: 1fr; }
  .bj-post-nav .next { text-align: left; }
}
