/* =========================================================
   BLACKhouse Bookkeeping: blog
   Loads after styles.css. Same four-color jobs:
     BRASS trim + eyebrows, RED action only, BLUE secondary UI,
     WHITE card surfaces. Paper base, navy bands.
   ========================================================= */

/* ---- page header band (index + posts) ---- */
.blog-hero {
  background: var(--navy-dark);
  padding: 150px 0 72px;
  position: relative;
  background-image: linear-gradient(90deg,
    var(--red) 0 33.34%, #ffffff 33.34% 66.67%, var(--blue) 66.67% 100%);
  background-size: 100% 3px;
  background-position: left bottom;
  background-repeat: no-repeat;
}

.blog-hero .section-tag,
.blog-hero p.section-tag { color: var(--brass-light); }
.blog-hero .section-tag::before { background: var(--brass-light); }

.blog-hero h1 {
  color: var(--white);
  font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  letter-spacing: -0.02em;
  max-width: 860px;
  margin-bottom: 18px;
}

.blog-hero .blog-hero-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.12rem;
  line-height: 1.7;
  max-width: 640px;
}

/* ---- breadcrumb ---- */
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 22px;
}

.breadcrumb li { color: rgba(255, 255, 255, 0.6); }
.breadcrumb li + li::before { content: '/'; margin-right: 6px; color: rgba(255, 255, 255, 0.35); }
.breadcrumb a { color: rgba(255, 255, 255, 0.82); }
.breadcrumb a:hover { color: var(--brass-light); }

/* ---- post meta line ---- */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  font-weight: 500;
  margin-top: 6px;
}

.post-meta .post-author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 700;
}

.post-meta img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 2px solid var(--brass-light);
}

.post-meta .dot { color: rgba(255, 255, 255, 0.35); }

/* ---- blog index grid ---- */
.blog-list {
  padding: 80px 0 110px;
  background: var(--paper);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 34px 32px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 0;
  background: var(--brass);
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.post-card:hover::before { height: 100%; }

.post-card .post-cat {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-text);
  margin-bottom: 12px;
}

.post-card h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin-bottom: 12px;
}

.post-card h2 a { color: var(--navy); }

/* whole card is clickable through the title link */
.post-card h2 a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.post-card h2 a:focus-visible { outline: none; }
.post-card:focus-within { outline: 3px solid var(--blue-light); outline-offset: 2px; }

.post-card p {
  color: var(--gray-600);
  font-size: 0.97rem;
  line-height: 1.7;
  margin-bottom: 22px;
  flex: 1;
}

.post-card .post-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-500);
  border-top: 1px solid var(--gray-200);
  padding-top: 16px;
}

.post-card .read-more { color: var(--blue); font-weight: 700; }

/* ---- article ---- */
.article-wrap {
  background: var(--paper);
  padding: 64px 0 40px;
}

.article {
  max-width: 740px;
  margin: 0 auto;
}

.article > p,
.article li {
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--ink-soft);
}

.article > p { margin-bottom: 20px; }

.article h2 {
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  margin: 52px 0 16px;
  letter-spacing: -0.01em;
  scroll-margin-top: 100px;
}

.article h3 {
  font-size: 1.25rem;
  margin: 32px 0 10px;
}

.article ul,
.article ol {
  margin: 0 0 22px 24px;
}

.article li { margin-bottom: 10px; }
.article li::marker { color: var(--brass); font-weight: 700; }

.article strong { color: var(--ink); }

.article a:not(.btn) {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.article a:not(.btn):hover { color: var(--red); }

/* AEO: answer-first box directly under the H1 band */
.quick-answer {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--brass);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px 28px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
}

.quick-answer .qa-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-text);
  margin-bottom: 8px;
}

.quick-answer p:last-child {
  font-size: 1.12rem;
  line-height: 1.75;
  color: var(--ink);
  font-weight: 500;
  margin: 0;
}

/* key takeaways */
.takeaways {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.86);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: 8px 0 40px;
}

.takeaways h2 {
  color: var(--white);
  font-size: 1.2rem;
  margin: 0 0 14px;
}

.article .takeaways ul { margin: 0 0 0 20px; }
.article .takeaways li { color: rgba(255, 255, 255, 0.86); font-size: 1rem; margin-bottom: 8px; }
.article .takeaways li::marker { color: var(--brass-light); }

/* table of contents */
.toc {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px 26px;
  margin-bottom: 40px;
  background: var(--paper-alt);
}

.toc p {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-text);
  margin-bottom: 10px;
}

.article .toc ol { margin: 0 0 0 20px; }
.article .toc li { font-size: 0.98rem; margin-bottom: 6px; line-height: 1.5; }
.article .toc a { text-decoration: none; color: var(--navy); }
.article .toc a:hover { color: var(--blue); text-decoration: underline; }

/* callout */
.callout {
  background: var(--paper-alt);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 8px 0 26px;
  border: 1px solid var(--gray-200);
}

.callout p { margin: 0; font-size: 1rem; line-height: 1.7; color: var(--ink-soft); }

/* data table */
.table-wrap { overflow-x: auto; margin: 8px 0 28px; }

.article table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.98rem;
  box-shadow: var(--shadow-sm);
}

.article th,
.article td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: top;
  line-height: 1.55;
  color: var(--ink-soft);
}

.article th {
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.article tr:last-child td { border-bottom: none; }

/* FAQ on paper (homepage FAQ sits on navy) */
.article .faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 8px 0 20px;
}

.article .faq-item { border-color: var(--gray-200); }
.article .faq-item[open] { border-color: var(--blue); box-shadow: 0 8px 24px rgba(11, 53, 118, 0.10); }
.article .faq-item summary { font-family: 'Raleway', sans-serif; }
.article .faq-item p { font-size: 1rem; margin: 0; }

/* sources */
.sources {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
}

.sources h2 { font-size: 1.05rem; margin: 0 0 10px; font-family: 'Raleway', sans-serif; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gray-600); }
.article .sources ul { margin-left: 20px; }
.article .sources li { font-size: 0.92rem; margin-bottom: 6px; }

/* author box (E-E-A-T) */
.author-box {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 22px;
  align-items: start;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  margin: 48px 0 0;
}

.author-box img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 3px solid var(--brass);
}

.author-box .author-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-text);
  margin-bottom: 4px;
}

.author-box h2 { font-size: 1.3rem; margin: 0 0 8px; }
.author-box p { font-size: 0.98rem; line-height: 1.7; color: var(--ink-soft); margin: 0; }

/* end-of-post CTA (red = action) */
.post-cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-lg);
  padding: 40px 40px 36px;
  margin: 40px auto 0;
  max-width: 900px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.post-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--red) 0 33.34%, #ffffff 33.34% 66.67%, var(--blue) 66.67% 100%);
}

.post-cta h2 { color: var(--white); font-size: 1.7rem; margin: 0 0 10px; }
.post-cta p { color: rgba(255, 255, 255, 0.8); font-size: 1.05rem; line-height: 1.7; max-width: 540px; margin: 0 auto 24px; }
.post-cta .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* related posts */
.related {
  background: var(--paper-alt);
  padding: 72px 0 90px;
}

.related > .container > h2 {
  font-size: 1.8rem;
  margin-bottom: 28px;
}

.related .post-grid { grid-template-columns: repeat(3, 1fr); }
.related > .container > .post-cta { margin-top: 0; }
.related .post-card h2 { font-size: 1.15rem; margin-bottom: 10px; }
.related .post-card p { font-size: 0.92rem; margin-bottom: 16px; }

/* nav: current page marker */
.nav-links a[aria-current="page"] { color: var(--navy); }
.nav-links a[aria-current="page"]::after { width: 100% !important; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .related .post-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .blog-hero { padding: 120px 0 52px; }
  .post-grid,
  .related .post-grid { grid-template-columns: 1fr; }
  .article-wrap { padding: 44px 0 24px; }
  .article > p, .article li { font-size: 1.03rem; }
  .author-box { grid-template-columns: 1fr; text-align: left; }
  .post-cta { padding: 34px 24px 30px; }
  .takeaways { padding: 24px 22px; }
}

@media print {
  .site-header, .site-footer, .post-cta, .related, .toc { display: none; }
  .blog-hero { background: none; padding: 0 0 20px; }
  .blog-hero h1, .breadcrumb a, .post-meta { color: #000; }
}
