/* =====================================================================
 * Rocksync Blog · Design System (alinhado a brand/tokens.css e site/index.html)
 * ===================================================================== */
:root {
  --ink: #1F2329;
  --ink-2: #2B3038;
  --stone: #59616B;
  --mist: #E2E6EB;
  --paper: #F6F7F9;
  --white: #FFFFFF;
  --blue: #1F6BFF;
  --blue-2: #5B93FF;
  --blue-deep: #1550C7;
  --blue-tint: #ECF2FF;
  --night: #15181D;
  --ok: #43D18E;
  --display: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==================== DEMO NOTICE ==================== */
.preview-bar {
  background: var(--night);
  color: #E2E6EB;
  font-size: 12.5px;
  text-align: center;
  padding: 8px 16px;
}
.preview-bar strong { color: var(--white); }

/* ==================== HEADER ==================== */
.hdr {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mist);
}
.hdr-in {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-word {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.03em;
}
.brand-word b { color: var(--blue); font-weight: 600; }
.brand-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--stone);
  border-left: 1px solid var(--mist);
  padding-left: 10px;
}

.hdr-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.hdr-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}
.hdr-nav a:hover { color: var(--blue); text-decoration: none; }

.hdr-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-sw {
  display: inline-flex;
  background: var(--paper);
  border: 1px solid var(--mist);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-sw a {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--stone);
  text-decoration: none;
}
.lang-sw a.is-active {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(21, 24, 29, 0.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.14s ease, border-color 0.14s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-deep); }
.btn-dark { background: var(--night); color: var(--white); }
.btn-dark:hover { background: #262B34; }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--mist); }
.btn-ghost:hover { border-color: #C7CFD9; }

/* ==================== INDEX HERO & CATEGORIES ==================== */
.blog-hero {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--mist);
  background: var(--white);
}
.eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-deep);
  margin-bottom: 12px;
}
.blog-hero h1 {
  font-family: var(--display);
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  max-width: 780px;
}
.blog-hero-sub {
  font-size: 17px;
  color: var(--stone);
  max-width: 680px;
  margin: 0 0 28px;
}

.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--mist);
  background: var(--paper);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}
.cat-pill:hover {
  border-color: var(--blue);
  color: var(--blue-deep);
  text-decoration: none;
}
.cat-pill.is-active {
  background: var(--night);
  border-color: var(--night);
  color: var(--white);
}

/* ==================== FEATURED & GRID ==================== */
.blog-main { padding: 40px 0 72px; }

.featured-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 32px;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: 0 12px 36px -24px rgba(21, 24, 29, 0.2);
}
.featured-media {
  background: var(--night);
  aspect-ratio: 1200 / 630;
  overflow: hidden;
}
.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured-body {
  padding: 32px 32px 32px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.post-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-deep);
}
.post-kicker span.sep-dot { color: var(--stone); }
.post-kicker time { color: var(--stone); font-weight: 500; }

.featured-body h2 {
  font-family: var(--display);
  font-size: clamp(24px, 2.5vw, 32px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0;
}
.featured-body h2 a { color: var(--ink); }
.featured-body h2 a:hover { color: var(--blue); text-decoration: none; }
.featured-body p {
  margin: 0;
  color: var(--stone);
  font-size: 15px;
}
.read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--blue-deep);
  margin-top: 6px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.post-card {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.post-card:hover {
  border-color: #C3CCD8;
  box-shadow: 0 14px 32px -24px rgba(21, 24, 29, 0.25);
}
.post-card-media {
  aspect-ratio: 1200 / 630;
  background: var(--night);
  overflow: hidden;
  display: block;
}
.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-card-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.post-card h3 {
  font-family: var(--display);
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0;
}
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--blue); text-decoration: none; }
.post-card p {
  margin: 0;
  font-size: 14px;
  color: var(--stone);
  flex: 1;
}
.post-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--stone);
  padding-top: 12px;
  border-top: 1px solid #EEF1F5;
}

.pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.empty-box {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: 18px;
  padding: 48px 24px;
  text-align: center;
  color: var(--stone);
}

/* ==================== ARTICLE PAGE ==================== */
.article-wrap { padding: 32px 0 80px; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--stone);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--stone); }
.breadcrumb a:hover { color: var(--blue); }

.article-head {
  max-width: 820px;
  margin-bottom: 28px;
}
.article-head h1 {
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 12px 0 14px;
}
.article-excerpt {
  font-size: 18px;
  color: var(--stone);
  margin: 0 0 20px;
  line-height: 1.55;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  font-size: 13.5px;
  color: var(--stone);
}
.article-meta strong { color: var(--ink); font-weight: 600; }

.article-cover {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--mist);
  margin-bottom: 40px;
  background: var(--night);
  max-width: 1020px;
}
.article-cover img {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 740px) 280px;
  gap: 48px;
  align-items: start;
}
.article-grid > * { min-width: 0; }

/* Editorial Prose */
.prose {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: 20px;
  padding: 36px 40px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-2);
}
.prose > *:first-child { margin-top: 0; }
.prose h2 {
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 36px 0 14px;
  scroll-margin-top: 90px;
}
.prose h3 {
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 26px 0 10px;
  scroll-margin-top: 90px;
}
.prose h4 {
  font-family: var(--display);
  font-size: 16.5px;
  color: var(--ink);
  margin: 20px 0 8px;
}
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 7px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote {
  margin: 22px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--blue);
  background: var(--paper);
  border-radius: 0 12px 12px 0;
  color: var(--ink);
}
.prose blockquote p { margin: 0; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--paper);
  border: 1px solid var(--mist);
  padding: 1px 6px;
  border-radius: 6px;
}
.prose pre {
  margin: 20px 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--night);
  color: #E8ECF2;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.55;
}
.prose pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
}
.prose hr { border: 0; border-top: 1px solid var(--mist); margin: 28px 0; }

.table-scroll {
  width: 100%;
  overflow-x: auto;
  margin: 22px 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.prose th, .prose td {
  padding: 10px 12px;
  border: 1px solid var(--mist);
  text-align: left;
}
.prose th {
  background: var(--paper);
  font-weight: 600;
  color: var(--ink);
}

/* FAQ Block inside Article */
.faq-block {
  margin-top: 32px;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: 20px;
  padding: 28px 36px;
}
.faq-block h2 {
  font-family: var(--display);
  font-size: 23px;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
}
.faq-block details {
  border-top: 1px solid var(--mist);
  padding: 14px 0;
}
.faq-block details:first-of-type { border-top: 0; padding-top: 4px; }
.faq-block summary {
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-block summary::-webkit-details-marker { display: none; }
.faq-block summary::after {
  content: "+";
  font-size: 19px;
  color: var(--blue);
  flex-shrink: 0;
}
.faq-block details[open] summary::after { content: "−"; }
.faq-block details p {
  margin: 10px 0 0;
  font-size: 14.5px;
  color: var(--stone);
}

/* Bottom Dark CTA Card */
.cta-banner {
  margin-top: 32px;
  background: var(--night);
  color: var(--white);
  border-radius: 22px;
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-banner-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-2);
  margin-bottom: 8px;
}
.cta-banner h2 {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
  color: var(--white);
}
.cta-banner p {
  margin: 0;
  color: #B4BCC8;
  font-size: 14.5px;
  max-width: 480px;
}

/* Sticky Sidebar */
.article-aside {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.aside-card {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: 16px;
  padding: 18px 20px;
}
.aside-title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  margin: 0 0 12px;
}
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toc-list a {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.35;
  display: block;
}
.toc-list a:hover { color: var(--blue); text-decoration: none; }
.toc-list li.lvl-3 { padding-left: 14px; }
.toc-list li.lvl-3 a { font-size: 12.5px; color: var(--stone); }

.aside-cta {
  background: var(--night);
  border-color: var(--night);
  color: var(--white);
}
.aside-cta h3 {
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.2;
  margin: 0 0 8px;
}
.aside-cta p {
  margin: 0 0 16px;
  font-size: 13px;
  color: #B4BCC8;
}
.aside-cta .btn { width: 100%; }

/* Related */
.related-sec {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--mist);
}
.related-sec h2 {
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: -0.025em;
  margin: 0 0 22px;
}

/* Footer */
.foot {
  border-top: 1px solid var(--mist);
  background: var(--white);
  padding: 36px 0 48px;
}
.foot-in {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.foot p { margin: 6px 0 0; font-size: 13.5px; color: var(--stone); }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.foot nav a { font-size: 14px; color: var(--ink-2); }
.foot-btn {
  all: unset;
  cursor: pointer;
  color: var(--stone);
  font-size: 14px;
}
.foot-btn:hover { color: var(--blue); }
.foot-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* Banner LGPD / Consent Mode v2 (mesmo padrão visual de index.html) */
.consent-bar {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  width: min(430px, calc(100% - 32px));
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--white);
  border: 1px solid var(--mist);
  box-shadow: 0 24px 60px -24px rgba(21, 24, 29, 0.45);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.consent-bar[hidden] { display: none; }
.consent-bar p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.consent-bar strong { color: var(--ink); font-weight: 600; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.consent-actions .btn { min-height: 42px; padding: 8px 12px; font-size: 13.5px; border-radius: 10px; width: 100%; }
@media (max-width: 560px) {
  .consent-bar { left: 14px; right: 14px; bottom: 14px; width: auto; padding: 13px 14px; gap: 10px; }
  .consent-bar p { font-size: 13px; }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1020px) {
  .featured-card { grid-template-columns: 1fr; gap: 0; }
  .featured-body { padding: 24px; }
  .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-grid { grid-template-columns: 1fr; gap: 28px; }
  .article-aside { position: static; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .hdr-in { gap: 8px; min-height: 60px; }
  .hdr-nav { display: none; }
  .brand { gap: 7px; }
  .brand svg { width: 22px; height: 22px; }
  .brand-word { font-size: 17px; }
  .brand-tag { display: none; }
  .hdr-right { gap: 6px; }
  .lang-sw { padding: 2px; }
  .lang-sw a { padding: 3px 7px; font-size: 11px; }
  .btn-hdr-cta { padding: 7px 10px; font-size: 12px; border-radius: 9px; }
  .posts-grid { grid-template-columns: 1fr; }
  .prose { padding: 22px 18px; font-size: 15.5px; }
  .faq-block { padding: 22px 18px; }
  .cta-banner { padding: 24px 18px; }
}
