/* ─── task.BIM — Blog & Artigo Editorial (Montserrat + Cores Oficiais) ─── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Source+Sans+3:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --bg: #FFFFFF;
  --bg-page: #FFFFFF;
  --bg-subtle: #FAF9F6;
  --bg-box: #FAF8F4;
  --raised: #FFFFFF;
  
  --ink: #121212;
  --ink-secondary: #585D56;
  --ink-soft: #585D56;
  --ink-muted: #848A82;
  
  /* Cores oficiais da marca */
  --task-green: #141A14;
  --task-green-light: #1E271E;
  --bim-gold: #B88E6D;
  --bim-gold-light: #C9A47E;
  --bim-gold-dark: #8F6547;
  
  --accent: var(--bim-gold);
  --accent-dark: var(--bim-gold-dark);
  --brand-dark: var(--task-green);
  --brand-hover: #000000;
  
  --line: rgba(18, 18, 18, 0.1);
  --line-strong: rgba(18, 18, 18, 0.2);
  --line-soft: rgba(18, 18, 18, 0.06);
  --line-gold: rgba(184, 142, 109, 0.3);
  
  --radius-pill: 999px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  
  --font-display: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  
  --measure: 68ch;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, .btn, .eyebrow { font-family: var(--font-display); }

/* ─── Reading Progress Bar ─── */
.reading-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 1000;
  pointer-events: none;
}
.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--bim-gold) 0%, var(--bim-gold-light) 100%);
  box-shadow: 0 0 10px rgba(184, 142, 109, 0.5);
  transition: width 0.08s linear;
}

/* ─── Layout Wrap ─── */
.wrap {
  width: min(1180px, calc(100% - 56px));
  margin-inline: auto;
}

.wrap-article {
  width: min(840px, calc(100% - 44px));
  margin-inline: auto;
}

/* ─── Top Header Navigation ─── */
.top {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 65px;
  padding: 0 clamp(20px, 4vw, 40px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
}

.brand img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.brand em {
  color: var(--bim-gold);
  font-style: normal;
}

.top nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.top nav a:hover {
  color: var(--ink);
}

.top nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--task-green);
  color: #FFFFFF !important;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--task-green);
  transition: background 0.2s ease, transform 0.2s var(--ease);
}

.btn:hover {
  background: #000000;
  transform: translateY(-1px);
}

.btn svg, .btn-ghost svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s var(--ease);
}

.btn:hover svg, .btn-ghost:hover svg {
  transform: translateX(3px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  background: #FFFFFF;
  color: var(--ink) !important;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  transition: border-color 0.2s ease, transform 0.2s var(--ease);
}

.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

/* ─── Page Head (Blog List) ─── */
.page-head {
  padding: clamp(56px, 9vh, 90px) 0 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bim-gold);
  margin-bottom: 14px;
}

.page-head h1 {
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  color: var(--ink);
}

.page-head p {
  color: var(--ink-secondary);
  margin: 0;
  max-width: 58ch;
  font-size: 18px;
  line-height: 1.55;
}

/* ─── Post Cards Grid (Blog Index) ─── */
.list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
  padding-bottom: 100px;
}

.row {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px 30px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(20, 26, 20, 0.03);
  transition: border-color 0.2s ease, transform 0.2s var(--ease), box-shadow 0.2s ease;
}

.row:hover {
  border-color: var(--bim-gold);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(20, 26, 20, 0.06);
}

.row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.week-badge {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bim-gold-dark);
  background: rgba(184, 142, 109, 0.12);
  padding: 3px 9px;
  border-radius: 999px;
}

.read-time {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
}

.row h2 {
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--ink);
  transition: color 0.15s ease;
}

.row:hover h2 {
  color: var(--bim-gold-dark);
}

.row p {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-secondary);
  flex-grow: 1;
}

.row-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--bim-gold-dark);
}

.row-footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.row-footer svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s var(--ease);
}

.row:hover .row-footer svg {
  transform: translateX(4px);
}

/* ─── Skeleton Loading ─── */
.skeleton-card {
  height: 220px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

/* ─── Empty State ─── */
.empty-state {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: min(60vh, 520px);
  padding: 64px 20px 88px;
}
.empty-state .giant {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  font-weight: 700;
  font-size: clamp(5rem, 20vw, 12rem);
  letter-spacing: -0.05em;
  line-height: 0.85;
  color: rgba(18, 18, 18, 0.04);
}
.empty-state .panel {
  position: relative;
  z-index: 1;
  max-width: 36rem;
}
.empty-state h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 4vw, 2.5rem);
  line-height: 1.15;
  margin: 12px 0 16px;
  color: var(--ink);
}
.empty-state p {
  margin: 0 auto 32px;
  color: var(--ink-secondary);
  font-size: 1.05rem;
  max-width: 42ch;
}
.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ─── Article Container & Layout ─── */
article {
  padding: 52px 0 100px;
}

.article-header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-bottom: 18px;
}

.article-breadcrumb a {
  color: var(--bim-gold-dark);
}

.article-breadcrumb a:hover {
  text-decoration: underline;
}

.article-breadcrumb span.sep {
  opacity: 0.4;
}

.article-header h1 {
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 10px 0 18px;
  font-size: clamp(32px, 4.8vw, 50px);
  line-height: 1.12;
  color: var(--ink);
  text-wrap: balance;
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.article-meta-bar .badge {
  color: var(--bim-gold-dark);
  background: rgba(184, 142, 109, 0.12);
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-meta-bar .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ─── Article Table of Contents (Índice de seções) ─── */
.article-toc {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-left: 3px solid var(--bim-gold);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin: 32px 0 44px;
  max-width: var(--measure);
}

.article-toc summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  user-select: none;
}

.article-toc summary::-webkit-details-marker {
  display: none;
}

.article-toc summary::after {
  content: "↓";
  font-size: 14px;
  color: var(--bim-gold);
  transition: transform 0.2s ease;
}

.article-toc[open] summary::after {
  transform: rotate(180deg);
}

.article-toc-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.article-toc-list li a {
  font-size: 14.5px;
  color: var(--ink-secondary);
  display: flex;
  align-items: baseline;
  gap: 8px;
  transition: color 0.15s ease, transform 0.15s ease;
}

.article-toc-list li a::before {
  content: "—";
  color: var(--bim-gold);
  font-weight: bold;
}

.article-toc-list li a:hover {
  color: var(--bim-gold-dark);
  transform: translateX(3px);
}

/* ─── Long-Form Article Body Typography ─── */
.article-content {
  font-size: 18px;
  line-height: 1.74;
  color: var(--ink);
}

.article-content p {
  margin: 0 0 24px;
  max-width: var(--measure);
}

/* Lede: opening paragraph */
.article-content .lede,
p.lede {
  font-size: clamp(20px, 2.4vw, 23px);
  line-height: 1.52;
  color: var(--ink);
  font-weight: 400;
  margin: 0 0 36px;
  max-width: var(--measure);
  letter-spacing: -0.01em;
  border-left: 3px solid var(--bim-gold);
  padding-left: 20px;
}

/* Section Headings H2: Montserrat peso 600/700 */
.article-content h2,
article h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 54px 0 16px;
  max-width: var(--measure);
  color: var(--ink);
  position: relative;
  scroll-margin-top: 90px;
}

.article-content h2 a.heading-anchor {
  text-decoration: none;
  color: var(--ink-muted);
  opacity: 0;
  margin-left: 8px;
  font-weight: 400;
  font-size: 0.8em;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.article-content h2:hover a.heading-anchor {
  opacity: 1;
}

.article-content h2 a.heading-anchor:hover {
  color: var(--bim-gold);
}

.article-content strong,
article strong {
  font-weight: 600;
  color: var(--ink);
}

/* Inline Code */
.article-content code,
article code,
.page-head code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-subtle);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--line);
  word-break: break-word;
}

/* Unordered Lists */
.article-content ul,
article ul {
  padding-left: 1.4em;
  margin: 0 0 28px;
  max-width: var(--measure);
}

.article-content ul li,
article ul li {
  margin-bottom: 10px;
  line-height: 1.68;
}

.article-content ul li::marker {
  color: var(--bim-gold);
}

/* Ordered Steps List: <ol class="steps"> */
.article-content ol.steps,
article .steps {
  list-style: none;
  counter-reset: steps-counter;
  padding-left: 0;
  margin: 32px 0 36px;
  max-width: var(--measure);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-content ol.steps li,
article .steps li {
  counter-increment: steps-counter;
  position: relative;
  padding-left: 48px;
  line-height: 1.65;
  margin-bottom: 0;
}

.article-content ol.steps li::before,
article .steps li::before {
  content: counter(steps-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1.5px solid var(--bim-gold);
  color: var(--bim-gold-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Callout Box: .box with h3 + p */
.article-content .box,
article .box {
  background: var(--bg-box);
  border: 1px solid var(--line);
  border-left: 3px solid var(--bim-gold);
  border-radius: var(--radius-sm);
  padding: 24px 28px;
  margin: 36px 0;
  max-width: var(--measure);
}

.article-content .box h3,
article .box h3 {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 10px;
  color: var(--bim-gold-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-content .box h3::before {
  content: "✦";
  color: var(--bim-gold);
}

.article-content .box p,
article .box p {
  margin: 0 0 12px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink);
}

.article-content .box p:last-child {
  margin-bottom: 0;
}

/* ─── Bottom Post CTA Banner (Verde TASK + Dourado BIM) ─── */
.post-cta-card {
  background: var(--task-green);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: clamp(36px, 5vw, 48px);
  margin-top: 64px;
  max-width: var(--measure);
  position: relative;
  overflow: hidden;
}

.post-cta-card::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(184, 142, 109, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.post-cta-card .cta-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bim-gold-light);
  margin-bottom: 12px;
}

.post-cta-card h2 {
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #FFFFFF;
  margin: 0 0 14px;
}

.post-cta-card p {
  color: rgba(237, 234, 224, 0.78);
  font-size: 15.5px;
  line-height: 1.55;
  margin: 0 0 28px;
}

.post-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.post-cta-actions .btn-primary {
  background: var(--bim-gold-light);
  color: var(--task-green) !important;
  border-color: var(--bim-gold-light);
  font-weight: 700;
}

.post-cta-actions .btn-primary:hover {
  background: #D8B795;
}

.post-cta-actions .btn-ghost {
  border: 1px solid rgba(237, 234, 224, 0.28);
  color: #FFFFFF !important;
  background: transparent;
}

.post-cta-actions .btn-ghost:hover {
  border-color: var(--bim-gold-light);
}

/* ─── Post Navigation ─── */
.post-nav-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 48px;
  max-width: var(--measure);
}

.post-nav-item {
  display: flex;
  flex-direction: column;
  padding: 22px 24px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, transform 0.2s var(--ease), box-shadow 0.2s ease;
}

.post-nav-item:hover {
  border-color: var(--bim-gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(20, 26, 20, 0.05);
}

.post-nav-item.is-prev { align-items: flex-start; text-align: left; }
.post-nav-item.is-next { align-items: flex-end; text-align: right; }

.post-nav-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bim-gold-dark);
  margin-bottom: 6px;
}

.post-nav-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

/* ─── Footer ─── */
.foot {
  padding: 44px 0 64px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.foot a {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--bim-gold-dark);
}

.foot a:hover {
  text-decoration: underline;
}

.muted { color: var(--ink-secondary); }

/* ─── Responsive ─── */
@media (max-width: 820px) {
  .list { grid-template-columns: 1fr; gap: 16px; }
  .post-nav-bar { grid-template-columns: 1fr; }
  .post-nav-item.is-next { align-items: flex-start; text-align: left; }
}

@media (max-width: 720px) {
  .wrap, .wrap-article { width: calc(100% - 36px); }
  .top { padding: 0 18px; height: 60px; }
  .top nav { gap: 16px; font-size: 13px; }
  .top .btn { padding: 8px 16px; font-size: 12.5px; }
  .page-head { padding: 44px 0 28px; margin-bottom: 32px; }
  .article-header { padding-bottom: 24px; margin-bottom: 32px; }
  .article-content ol.steps li { padding-left: 42px; }
  .article-content ol.steps li::before { width: 28px; height: 28px; font-size: 11px; }
  .article-content .box { padding: 20px 20px; margin: 28px 0; }
  .post-cta-card { padding: 32px 24px; }
  .foot { flex-direction: column; align-items: flex-start; gap: 14px; }
}
