/*
Theme Name: Bruna Lopes de Barros
Theme URI: https://brunalopesdebarros.com.br
Author: Crayon Comunicação
Author URI: https://brunalopesdebarros.com.br
Description: Tema institucional para Bruna Lopes de Barros — comunicação executiva, posicionamento e reputação de líderes. Construído para performance máxima (Core Web Vitals), semântica forte e indexação por buscadores e IAs.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
Text Domain: brunalopes
*/

/* =========================================================
   0. RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, picture, svg { max-width: 100%; display: block; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   1. DESIGN TOKENS — paleta extraída da logo Crayon
   ========================================================= */
:root {
  /* marca */
  --c-green:        #00D37F;
  --c-green-dark:    #00A868;
  --c-green-deep:    #05261B;
  --c-black:         #0B0B0C;
  --c-ink:           #14201B;
  --c-white:         #FFFFFF;

  /* neutros / superfícies */
  --c-cream:         #F7F5F1;
  --c-mint:          #EAFBF4;
  --c-line:          #E7E3DC;
  --c-text:          #1C1C1C;
  --c-muted:         #5B5B5B;
  --c-muted-on-dark: #B9C4BF;

  /* tipografia — pilha de sistema: zero requisições de rede, zero CLS por troca de fonte */
  --f-serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --f-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* escala fluida */
  --fs-h1: clamp(2.1rem, 1.4rem + 3vw, 3.6rem);
  --fs-h2: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  --fs-h3: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  --fs-lead: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;

  --container: 1180px;
  --gap: clamp(1.25rem, 1rem + 1vw, 2rem);
  --radius: 14px;
  --section-pad: clamp(3.5rem, 2.5rem + 4vw, 7rem);
}

/* =========================================================
   2. BASE TIPOGRÁFICA
   ========================================================= */
body {
  font-family: var(--f-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-white);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--f-serif);
  font-weight: 400;
  line-height: 1.18;
  color: var(--c-black);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-family: var(--f-sans); font-weight: 700; }

p { max-width: 68ch; }
p + p { margin-top: 1.1em; }

a.link-underline {
  color: var(--c-green-dark);
  font-weight: 600;
  border-bottom: 2px solid var(--c-green);
  padding-bottom: 1px;
  transition: color .15s ease, border-color .15s ease;
}
a.link-underline:hover { color: var(--c-black); border-color: var(--c-black); }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-green-dark);
  margin-bottom: 0.9em;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
  border: 0; padding: 0; margin: -1px;
}
.skip-link {
  position: absolute; left: 1rem; top: -60px;
  background: var(--c-black); color: var(--c-white);
  padding: .75rem 1.25rem; z-index: 1000; border-radius: 0 0 8px 8px;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; }

:focus-visible { outline: 3px solid var(--c-green); outline-offset: 2px; }

/* =========================================================
   3. LAYOUT / CONTAINERS
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 1rem + 2vw, 2.5rem);
}

.section { padding-block: var(--section-pad); }
.bg-white  { background: var(--c-white); }
.bg-cream  { background: var(--c-cream); }
.bg-mint   { background: var(--c-mint); }
.bg-ink    { background: var(--c-ink); color: var(--c-white); }
.bg-ink h2, .bg-ink h3 { color: var(--c-white); }
.bg-ink p  { color: var(--c-muted-on-dark); }

.grid-2 {
  display: grid;
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-2.reverse > *:first-child { order: 2; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  background: var(--c-green);
  color: var(--c-black);
  font-weight: 700;
  font-size: var(--fs-small);
  letter-spacing: .02em;
  padding: .9em 1.6em;
  border-radius: 999px;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--c-green-dark); color: var(--c-white); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--c-white);
  color: var(--c-white);
}
.btn-outline:hover { background: var(--c-white); color: var(--c-black); }

/* =========================================================
   4. HEADER / NAV
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--c-line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: .9rem;
}
.site-branding { display: flex; align-items: center; gap: .6rem; }
.site-branding .custom-logo-link { display: flex; align-items: center; }
.site-branding img,
.custom-logo-link img {
  height: 34px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
}
.site-title {
  font-family: var(--f-serif);
  font-size: 1.25rem;
  color: var(--c-black);
}
.site-title a { display:block; }

.primary-nav ul { display: flex; gap: clamp(1rem, 2vw, 2.2rem); }
.primary-nav a {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--c-text);
  position: relative;
  padding-block: .3em;
}
.primary-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--c-green); transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.primary-nav a:hover::after, .primary-nav a[aria-current="page"]::after { transform: scaleX(1); }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  padding: .5rem;
  position: relative;
  z-index: 120;
}
.menu-toggle span {
  width: 22px; height: 2px; background: var(--c-black); display: block;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 991px) {
  .menu-toggle { display: flex; }
  .primary-nav {
      position: absolute;
      top: 100%; left: 0; right: 0;
      width: 100%;
      max-height: 0;
      opacity: 0;
      overflow: hidden;
      background: var(--c-white);
      border-top: 1px solid var(--c-line);
      border-bottom: 1px solid var(--c-line);
      box-shadow: 0 20px 32px -8px rgba(0,0,0,.14);
      transition: max-height .3s ease, opacity .2s ease;
  }
  .primary-nav.is-open { max-height: 80vh; opacity: 1; overflow-y: auto; }

  .primary-nav ul {
      flex-direction: column;
      gap: 0;
      padding: .5rem clamp(1.25rem, 1rem + 2vw, 2.5rem) 2.75rem;
  }
  .primary-nav li { border-bottom: 1px solid var(--c-line); }
  .primary-nav li:last-child { border-bottom: 0; padding-top: 1.25rem; padding-bottom: .25rem; }
  .primary-nav a { display: block; padding: 1rem 0; font-size: 1.05rem; }
  .primary-nav a::after { display: none; }
  .primary-nav .btn { display: inline-flex; margin-bottom: .25rem; }
}

/* =========================================================
   5. HERO
   ========================================================= */
.hero {
  background: linear-gradient(180deg, var(--c-cream) 0%, #fff 100%);
  padding-block: clamp(2.5rem, 3vw, 4.5rem) clamp(3rem, 5vw, 5.5rem);
}
.hero .grid-2 { align-items: center; }
.hero h1 { margin-bottom: .5em; }
.hero p.lead { font-size: var(--fs-lead); color: var(--c-muted); }
.hero-actions { margin-top: 1.8rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-figure {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--c-line);
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================================
   6. SECTION CONTENT BLOCKS
   ========================================================= */
.content-figure {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--c-line);
}
.content-figure img { width: 100%; height: 100%; object-fit: cover; }

.section-head { max-width: 60ch; margin-bottom: 2.2rem; }
.section-head.center { margin-inline: auto; text-align: center; }

.subsection { margin-top: 2.4rem; padding-top: 2.4rem; border-top: 1px solid var(--c-line); }
.bg-ink .subsection { border-top-color: rgba(255,255,255,.14); }
.subsection:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.subsection h3 { margin-bottom: .5em; display:flex; align-items:center; gap:.6em; }
.subsection h3::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-green); flex: none;
}

/* =========================================================
   7. CRAYON — cards de serviço
   ========================================================= */
.service-grid {
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 2.5rem;
}
.service-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.service-card h3 { color: var(--c-white); font-size: 1.05rem; }
.service-card p { color: var(--c-muted-on-dark); font-size: var(--fs-small); }
.service-card .num {
  font-family: var(--f-serif);
  color: var(--c-green);
  font-size: 1.6rem;
  display: block; margin-bottom: .4rem;
}

/* =========================================================
   8. LOGOS (mídia)
   ========================================================= */
.logo-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 2.5rem;
}
.logo-strip img { max-height: 34px; width: auto; filter: grayscale(1); opacity: .7; transition: opacity .15s ease, filter .15s ease; }
.logo-strip a:hover img { filter: none; opacity: 1; }
.logo-strip .placeholder {
  font-size: var(--fs-small); font-weight: 700; letter-spacing: .04em;
  color: var(--c-muted); border: 1px dashed var(--c-line); border-radius: 8px;
  padding: .6rem 1.1rem;
}

/* =========================================================
   9. CONTATO
   ========================================================= */
.contact-section { background: var(--c-black); color: var(--c-white); }
.contact-section .section-head h2 { color: var(--c-white); }
.contact-section .section-head p { color: var(--c-muted-on-dark); }
.contact-form { max-width: 640px; margin-inline: auto; margin-top: 2.5rem; display: grid; gap: 1rem; }
.contact-form .row2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .contact-form .row2 { grid-template-columns: 1fr 1fr; } }
.contact-form label { font-size: var(--fs-small); font-weight: 600; display:block; margin-bottom: .4rem; }
.contact-form input, .contact-form textarea {
  width: 100%; background: #1A1A1B; border: 1px solid #333;
  color: var(--c-white); border-radius: 10px; padding: .85em 1em; font-size: 1rem;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--c-green); }
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form .hp-field { position: absolute; left: -9999px; }
.form-note { font-size: var(--fs-small); color: var(--c-muted-on-dark); margin-top: .75rem; }
.form-success { background: rgba(0,211,127,.12); border: 1px solid var(--c-green); color: var(--c-white); padding: 1rem 1.2rem; border-radius: 10px; }
.form-error { background: rgba(255,90,90,.12); border: 1px solid #ff5a5a; color: #fff; padding: 1rem 1.2rem; border-radius: 10px; }

/* =========================================================
   10. BLOG
   ========================================================= */
.blog-header { background: var(--c-cream); padding-block: clamp(2.5rem, 4vw, 4rem); }

.breadcrumbs { margin-bottom: 1.1rem; }
.breadcrumbs ol {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .35rem; font-size: var(--fs-small); color: var(--c-muted);
}
.breadcrumbs li { display: flex; align-items: center; gap: .35rem; }
.breadcrumbs li:not(:last-child)::after { content: "/"; color: var(--c-line); }
.breadcrumbs a { color: var(--c-muted); font-weight: 600; }
.breadcrumbs a:hover { color: var(--c-black); }
.breadcrumbs li[aria-current="page"] { color: var(--c-text); font-weight: 600; }

.post-grid {
  display: grid; gap: 2.2rem;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 2rem;
}
@media (max-width: 1100px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .post-grid { grid-template-columns: 1fr; } }

.post-grid-related { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .post-grid-related { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .post-grid-related { grid-template-columns: 1fr; } }

.post-card { display: flex; flex-direction: column; height: 100%; }
.post-card .post-thumb {
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/10; background: var(--c-line); margin-bottom: 1rem;
}
.post-card .post-thumb img { width:100%; height:100%; object-fit: cover; transition: transform .3s ease; }
.post-card a:hover .post-thumb img { transform: scale(1.04); }
.post-card .post-meta { font-size: var(--fs-small); color: var(--c-muted); margin-bottom: .4em; }
.post-card h2, .post-card h3 {
  font-size: 1.2rem; margin-bottom: .4em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.5em;
}
.post-card h2 a, .post-card h3 a { color: var(--c-black); }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--c-green-dark); }
.post-card p {
  font-size: var(--fs-small); color: var(--c-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}

.single-post-header { padding-block: clamp(2.5rem,4vw,4rem) 2rem; background: var(--c-cream); }
.single-post-header .post-meta { color: var(--c-muted); font-size: var(--fs-small); margin-bottom: 1em; }

/* Imagem destacada sempre inteira, sem corte (sem object-fit:cover) */
.single-post-thumb {
  border-radius: var(--radius); overflow: hidden; margin-block: 2rem;
  background: var(--c-cream);
  display: flex; justify-content: center;
}
.single-post-thumb img { width: 100%; height: auto; max-height: 640px; object-fit: contain; }

/* Espaço reservado antes do rodapé, mesmo quando não há posts relacionados */
.entry-wrap { padding-bottom: clamp(3rem, 6vw, 5.5rem); }

/* Botões de compartilhamento */
.share-buttons { display: flex; align-items: center; gap: .6rem; margin-bottom: 2rem; flex-wrap: wrap; }
.share-label { font-size: var(--fs-small); font-weight: 700; color: var(--c-muted); margin-right: .3rem; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--c-cream); color: var(--c-black);
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.share-btn:hover { background: var(--c-green); transform: translateY(-1px); }
.share-btn.is-copied { background: var(--c-green); }

/* Índice de conteúdo */
.toc {
  background: var(--c-cream);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin-bottom: 2.4rem;
}
.toc-title { font-size: var(--fs-small); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); margin-bottom: .8rem; }
.toc ol { display: flex; flex-direction: column; gap: .55rem; counter-reset: toc; }
.toc li { counter-increment: toc; font-size: .95rem; }
.toc li a { color: var(--c-text); font-weight: 600; }
.toc li a:hover { color: var(--c-green-dark); }
.toc li a::before { content: counter(toc) ". "; color: var(--c-green-dark); font-weight: 700; }
.toc li.toc-level-3 { padding-left: 1.4rem; font-size: .88rem; }
.toc li.toc-level-3 a::before { content: "– "; }

/* Card do autor */
.author-card {
  display: flex; gap: 1.1rem; align-items: flex-start;
  margin-top: 3rem; padding-top: 2.4rem; border-top: 1px solid var(--c-line);
}
.author-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.author-name { font-family: var(--f-serif); font-size: 1.1rem; color: var(--c-black); margin-bottom: .3rem; }
.author-bio { font-size: var(--fs-small); color: var(--c-muted); max-width: 52ch; margin-bottom: .5rem; }

.entry-content { max-width: 72ch; margin-inline: auto; font-size: 1.08rem; }
.entry-content > * + * { margin-top: 1.4em; }
.entry-content h2 { font-size: 1.5rem; margin-top: 2em; }
.entry-content h3 { font-size: 1.2rem; margin-top: 1.6em; }
.entry-content img { border-radius: 10px; }
.entry-content blockquote {
  border-left: 3px solid var(--c-green); padding-left: 1.2em; font-style: italic; color: var(--c-muted);
}
.entry-content ul, .entry-content ol { padding-left: 1.4em; list-style: revert; max-width: 72ch; }
.entry-tags { max-width: 72ch; margin-inline: auto; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--c-line); }
.entry-tags a { display:inline-block; font-size: var(--fs-small); background: var(--c-cream); padding: .4em .9em; border-radius: 999px; margin: .2em; }

.pagination { display: flex; justify-content: center; gap: .5rem; margin-top: 3rem; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-flex; align-items:center; justify-content:center;
  min-width: 40px; height: 40px; border-radius: 999px; font-size: var(--fs-small); font-weight: 600;
  border: 1px solid var(--c-line);
}
.pagination .page-numbers.current { background: var(--c-black); color: var(--c-white); border-color: var(--c-black); }
.pagination .page-numbers:hover:not(.current) { border-color: var(--c-black); }

/* =========================================================
   11. FOOTER
   ========================================================= */
.site-footer { background: var(--c-ink); color: var(--c-muted-on-dark); padding-block: 3.5rem 2rem; }
.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  background: var(--c-white);
  border-radius: 10px;
  padding: .7rem 1.1rem;
  margin-bottom: .9rem;
}
.footer-logo img {
  height: 28px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
}
.footer-brand { color: var(--c-white); font-family: var(--f-serif); font-size: 1.15rem; }
.footer-tagline { font-size: var(--fs-small); color: var(--c-muted-on-dark); max-width: 32ch; }
.footer-col-title {
  font-size: var(--fs-small); font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--c-white); margin-bottom: 1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: .7rem; }
.footer-col a { font-size: var(--fs-small); }
.footer-col a:hover { color: var(--c-white); }
.footer-posts li a { display: block; line-height: 1.4; }
.footer-meta {
  font-size: var(--fs-small); margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.12); text-align: center; opacity: .7;
}

/* =========================================================
   12. UTILITIES
   ========================================================= */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.container-narrow { max-width: 760px; margin-inline: auto; }