/* =========================================================
   Starbridge · Blog
   Header e rodapé iguais aos do starbridge.com.br.
   Paleta da marca: slate #3d5a6b · verde #5cb69f · texto #2c3e50
   Texto em Newsreader; interface em Space Grotesk (fonte do site)
   ========================================================= */

:root {
  --primary-color: #3d5a6b;
  --accent-color: #5cb69f;
  --accent-dark: #4a9d87;
  --text-dark: #2c3e50;
  --text-light: #5a6c7d;
  --bg-light: #f8fafb;
  --white: #ffffff;
  --line: #e8ecef;
  --font-main: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-read: 'Newsreader', Georgia, 'Times New Roman', serif;
  --read: 680px;
  --wide: 980px;
  color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-main);
  line-height: 1.7;
  color: var(--text-dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: rgba(92, 182, 159, 0.28); }
:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--text-dark); color: #fff; padding: 8px 14px; border-radius: 4px; z-index: 200; }
.skip:focus { left: 16px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header (igual ao site) ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo-link { display: block; line-height: 0; }
.logo { height: 36px; width: auto; display: block; }

.site-nav { display: flex; gap: 40px; align-items: center; }
.site-nav a {
  color: var(--text-dark);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}
.site-nav > a:hover, .nav-item-dropdown > a:hover { color: var(--accent-color); }
.site-nav > a.active { color: var(--accent-color); }
.site-nav > a.active::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 0;
  width: 100%; height: 2px;
  background: var(--accent-color);
}
.site-nav a.nav-cta { background: var(--accent-color); color: var(--white); padding: 8px 20px; border-radius: 4px; }
.site-nav > a.nav-cta:hover { background: var(--accent-dark); color: var(--white); }

.nav-item-dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 16px); left: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 0;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  opacity: 0; visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}
.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
  display: block;
  padding: 10px 20px;
  font-size: 14px !important;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}
.dropdown-item:hover { background: var(--bg-light); border-left-color: var(--accent-color); color: var(--accent-color) !important; }

.language-selector { position: relative; margin-left: 16px; }
.language-button {
  display: flex; align-items: center; gap: 6px;
  background: transparent;
  border: 1px solid #e0e4e8;
  padding: 6px 12px;
  border-radius: 4px;
  font: 500 14px var(--font-main);
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.2s ease;
}
.language-button:hover { border-color: var(--accent-color); color: var(--accent-color); }
.language-button svg { width: 16px; height: 16px; }
.language-dropdown {
  position: absolute;
  top: calc(100% + 12px); right: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 160px;
  opacity: 0; visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}
.language-selector:hover .language-dropdown,
.language-selector:focus-within .language-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.language-option { display: block; padding: 10px 16px; font-size: 14px !important; font-weight: 400 !important; }
.language-option:hover { background: var(--bg-light); color: var(--accent-color) !important; }

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.mobile-menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text-dark); transition: all 0.3s ease; }
.mobile-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* ---------- Texto ---------- */
.post { padding: 88px 0 40px; }
.post-head, .post-body, .post-end { max-width: var(--read); margin: 0 auto; }

.kicker {
  display: inline-block;
  font: 500 13px/1 var(--font-main);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-color);
  text-decoration: none;
  margin-bottom: 28px;
}
a.kicker:hover { color: var(--accent-dark); }

.post-head h1 {
  font-family: var(--font-read);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(36px, 5.2vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--text-dark);
  text-wrap: balance;
}
.post-dek {
  margin-top: 20px;
  font-family: var(--font-read);
  font-size: clamp(20px, 2.3vw, 23px);
  line-height: 1.45;
  color: var(--text-light);
  text-wrap: pretty;
}
.post-meta {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  margin-top: 28px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-light);
}
.post-meta span + span::before { content: '·'; margin-right: 18px; color: #b7c2ca; }

.post-body { padding-top: 40px; }
.post-body > p {
  font-family: var(--font-read);
  font-optical-sizing: auto;
  font-size: 20.5px;
  line-height: 1.72;
  color: var(--text-dark);
  margin-bottom: 1.25em;
  text-wrap: pretty;
  hanging-punctuation: first;
}
.post-body > p a { color: var(--primary-color); text-decoration-color: var(--accent-color); text-underline-offset: 3px; }

/* Assinatura e fontes */
.post-end { margin-top: 48px; }
.signature { display: flex; flex-direction: column; gap: 2px; }
.signature::before { content: ''; width: 40px; height: 2px; background: var(--accent-color); margin-bottom: 20px; }
.signature strong { font-family: var(--font-read); font-weight: 500; font-size: 22px; color: var(--text-dark); }
.signature span { font-size: 15px; color: var(--text-light); }

.post-sources { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.post-sources h2 { font: 500 13px/1 var(--font-main); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-light); margin-bottom: 16px; }
.post-sources ul { list-style: none; }
.post-sources li { font-size: 14.5px; line-height: 1.6; color: var(--text-light); padding: 3px 0; }

.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 48px;
  font-size: 15px; font-weight: 500;
  color: var(--accent-color);
  text-decoration: none;
}
.back-link:hover { color: var(--accent-dark); }
.back-link svg { width: 18px; height: 18px; }

/* ---------- Lista de textos ---------- */
.blog-head { max-width: var(--read); margin: 0 auto; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.blog-head h1 {
  font-family: var(--font-read); font-weight: 500;
  font-size: clamp(36px, 5vw, 52px); line-height: 1.1; letter-spacing: -0.015em;
  text-wrap: balance;
}
.blog-head p { margin-top: 18px; font-family: var(--font-read); font-size: 21px; line-height: 1.5; color: var(--text-light); }
.post-list { max-width: var(--read); margin: 0 auto; list-style: none; }
.post-item { border-bottom: 1px solid var(--line); }
.post-item a { display: block; padding: 40px 0; text-decoration: none; }
.post-item time { font-size: 14px; color: var(--text-light); }
.post-item h2 {
  margin-top: 10px;
  font-family: var(--font-read); font-weight: 500;
  font-size: clamp(26px, 3.2vw, 32px); line-height: 1.2; letter-spacing: -0.01em;
  color: var(--text-dark);
  transition: color 0.2s ease;
}
.post-item p { margin-top: 12px; font-family: var(--font-read); font-size: 19px; line-height: 1.55; color: var(--text-light); }
.post-item .more { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 15px; font-weight: 500; color: var(--accent-color); }
.post-item .more svg { width: 18px; height: 18px; transition: transform 0.2s ease; }
.post-item a:hover h2 { color: var(--primary-color); }
.post-item a:hover .more svg { transform: translateX(3px); }

/* ---------- Modelo 3D dentro do texto (fechado até a pessoa clicar) ---------- */
.m3d { scroll-margin-top: 110px; margin: 44px auto 52px; max-width: var(--read); width: calc(100vw - 48px); position: relative; left: 50%; transform: translateX(-50%); }
.m3d.is-open { max-width: var(--wide); margin-bottom: 64px; }
.m3d-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 28px;
  padding: 20px 24px;
  background: var(--bg-light);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color 0.2s ease;
}
.m3d-head:hover { border-color: #cfe5de; }
.m3d-intro .kicker { margin-bottom: 8px; }
.m3d-intro h3 { font: 600 18px/1.35 var(--font-main); color: var(--text-dark); letter-spacing: -0.01em; }
.m3d-intro p { margin-top: 4px; font-size: 14.5px; line-height: 1.55; color: var(--text-light); }
.m3d-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; flex-shrink: 0; }
.m3d-toggle svg { width: 18px; height: 18px; }
.m3d.is-open .m3d-toggle { background: transparent; border-color: #e0e4e8; color: var(--text-dark); }
.m3d.is-open .m3d-toggle:hover { border-color: var(--accent-color); color: var(--accent-color); }
.m3d-stage { margin-top: 12px; }
.m3d:not(.is-open) .m3d-src { display: none; }
.m3d-view {
  position: relative;
  height: clamp(340px, 52vw, 540px);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-light) 100%);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.m3d-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.m3d-view canvas:active { cursor: grabbing; }
.m3d-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.m3d-lb {
  position: absolute; left: 0; top: 0;
  font: 500 12.5px/1.2 var(--font-main);
  color: var(--text-dark);
  background: rgba(255, 255, 255, 0.94);
  padding: 5px 9px;
  border-radius: 3px;
  border-left: 3px solid var(--primary-color);
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
  white-space: nowrap;
  will-change: transform;
}
.m3d-lb.v { border-left-color: var(--accent-color); }
.m3d-hint { position: absolute; right: 14px; bottom: 12px; font-size: 13px; color: var(--text-light); pointer-events: none; }
.m3d-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--text-light); }

.m3d-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.m3d-tabs button {
  font: inherit; text-align: left;
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-dark);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.m3d-tabs button:hover { border-color: #cfd8de; }
.m3d-tabs button[aria-selected="true"] { border-color: var(--accent-color); box-shadow: inset 0 -3px 0 var(--accent-color); }
.m3d-yr { font-size: 13px; color: var(--text-light); }
.m3d-nm { font-size: 15.5px; font-weight: 600; line-height: 1.3; }

.m3d-under { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-start; justify-content: space-between; margin-top: 18px; }
.m3d-cap { flex: 1 1 440px; max-width: 70ch; }
.m3d-cap p { font-size: 15.5px; line-height: 1.65; color: var(--text-light); }
.m3d-cap .m3d-status { margin-top: 8px; min-height: 1.65em; font-weight: 500; color: #b8473f; }
.m3d-cap .m3d-status.ok { color: #3f8f7a; }
.m3d-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.m3d-btn {
  font: 500 15px var(--font-main);
  min-height: 44px; padding: 0 20px;
  border-radius: 4px;
  border: 1px solid #e0e4e8;
  background: transparent;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.2s ease;
}
.m3d-btn:hover { border-color: var(--accent-color); color: var(--accent-color); }
.m3d-btn-primary { background: var(--accent-color); border-color: var(--accent-color); color: var(--white); }
.m3d-btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--white); }
.m3d-src { margin: 14px 0 0; font-size: 13px; line-height: 1.6; color: #7d8d9a; }
[hidden] { display: none !important; }

/* ---------- Rodapé (igual ao site) ---------- */
.site-footer { background: var(--text-dark); color: var(--white); padding: 64px 0 32px; margin-top: 96px; }
.footer-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 60px;
  align-items: center;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 32px;
}
.footer-logo-img { height: 32px; width: auto; filter: brightness(0) invert(1); }
.footer-nav { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; }
.footer-nav a { color: var(--white); text-decoration: none; font-size: 15px; opacity: 0.8; transition: all 0.2s ease; }
.footer-nav a:hover { opacity: 1; color: var(--accent-color); }
.footer-social { display: flex; gap: 16px; }
.linkedin-link {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  transition: all 0.3s ease;
}
.linkedin-link:hover { background: var(--accent-color); transform: translateY(-2px); }
.linkedin-link svg { width: 20px; height: 20px; }
.footer-bottom { text-align: center; }
.footer-bottom p { opacity: 0.6; font-size: 14px; margin: 0; }
.footer-bottom .footer-legal { margin-top: 4px; }
.footer-bottom a { color: var(--white); }

/* ---------- Responsivo ---------- */
@media (max-width: 968px) {
  .header-content { position: relative; }
  .mobile-menu-toggle { display: flex; }
  .site-nav {
    position: absolute; top: calc(100% + 25px); left: -24px; right: -24px;
    background: var(--white);
    border-top: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0;
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .site-nav.active { max-height: 640px; padding: 16px 0; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); }
  .site-nav a, .nav-item-dropdown > a { display: block; padding: 12px 24px; border-bottom: 1px solid #f0f0f0; }
  .site-nav > a.active::after { display: none; }
  .site-nav a.nav-cta { margin: 12px 24px 4px; text-align: center; border-bottom: none; }
  .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; border-radius: 0; padding: 0; min-width: 0; background: var(--bg-light); }
  .dropdown-item { padding: 10px 24px 10px 40px; border-bottom: 1px solid var(--line); }
  .language-selector { margin-left: 0; padding: 12px 24px; border-top: 1px solid var(--line); }
  .language-button { width: 100%; justify-content: center; }
  .language-dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; margin-top: 8px; min-width: 0; background: var(--bg-light); }
  .footer-content { grid-template-columns: 1fr; gap: 32px; text-align: center; justify-items: center; }
  .footer-nav { flex-direction: column; gap: 16px; }
}

@media (max-width: 640px) {
  .post { padding-top: 56px; }
  .post-body > p { font-size: 19px; line-height: 1.68; }
  .m3d { width: calc(100vw - 32px); margin: 36px auto 44px; }
  .m3d-head { flex-direction: column; align-items: stretch; padding: 18px; }
  .m3d-toggle { width: 100%; }
  .m3d-view { height: 380px; }
  .m3d-tabs { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .m3d-tabs button { padding: 10px 14px; }
  .m3d-lb { font-size: 11.5px; padding: 4px 7px; }
  .m3d-hint { font-size: 12px; }
  .m3d-actions { width: 100%; }
  .m3d-actions .m3d-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Imagem ou vídeo dentro do texto (ver _modelo.html) */
.post-figure { margin: 40px 0 48px; }
.post-figure img, .post-figure video { width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--line); }
.post-figure figcaption { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--text-light); }

/* Textos com títulos, listas e citações (posts trazidos do Substack) */
.post-body > h2 {
  margin: 56px 0 18px;
  font-family: var(--font-read); font-optical-sizing: auto; font-weight: 500;
  font-size: clamp(26px, 3vw, 31px); line-height: 1.2; letter-spacing: -0.01em;
  color: var(--text-dark);
}
.post-body > h3 { margin: 36px 0 12px; font: 600 19px/1.35 var(--font-main); color: var(--text-dark); letter-spacing: -0.005em; }
.post-body > h2 + h3 { margin-top: 8px; }
.post-body > ul, .post-body > ol { margin: 0 0 1.4em; padding-left: 1.3em; }
.post-body li {
  font-family: var(--font-read); font-size: 20px; line-height: 1.65; color: var(--text-dark);
  margin-bottom: 0.45em; padding-left: 0.2em;
}
.post-body li::marker { color: var(--accent-color); }
.post-body ol > li::marker { font-family: var(--font-main); font-weight: 600; font-size: 0.85em; }
.post-body li ul { margin-top: 0.5em; padding-left: 1.2em; }
.post-body li a, .post-body blockquote a { color: var(--primary-color); text-decoration-color: var(--accent-color); text-underline-offset: 3px; }
.post-body > blockquote { margin: 28px 0 32px; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent-color); }
.post-body > blockquote p { font-family: var(--font-read); font-size: 21px; line-height: 1.6; color: var(--text-dark); margin: 0; }
.post-body > hr { border: 0; height: 1px; background: var(--line); margin: 48px 0 8px; }
.post-body > hr + h2 { margin-top: 32px; }
.post-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82em; background: var(--bg-light); border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; }
.post-body strong { font-weight: 600; }
.post-origin { margin-top: 20px; font-size: 14.5px; color: var(--text-light); }
.post-origin a { color: var(--accent-color); text-underline-offset: 3px; }
@media (max-width: 640px) {
  .post-body li { font-size: 18.5px; }
  .post-body > h2 { margin-top: 44px; }
}

/* Destaques no texto */
.post-body > blockquote.destaque { margin: 40px 0 44px; padding: 6px 0 6px 28px; border-left: 3px solid var(--accent-color); }
.post-body > blockquote.destaque p,
.post-body > .frase-destaque {
  font-family: var(--font-read); font-optical-sizing: auto; font-style: italic; font-weight: 400;
  font-size: clamp(25px, 3.1vw, 31px); line-height: 1.34; letter-spacing: -0.005em;
  color: var(--primary-color); text-wrap: pretty;
}
.post-body > blockquote.destaque p { margin: 0; }
.post-body > blockquote.destaque cite { display: block; margin-top: 16px; font: 500 14px/1.3 var(--font-main); font-style: normal; color: var(--text-light); letter-spacing: 0.02em; }
.post-body > .frase-destaque { margin: 40px 0 40px; padding: 6px 0 6px 28px; border-left: 3px solid var(--accent-color); }
mark.grifo {
  color: inherit;
  background-color: transparent;
  background-image: linear-gradient(rgba(92, 182, 159, 0.34), rgba(92, 182, 159, 0.34));
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 100% 0.46em;
  padding: 0 2px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background-size 1.1s cubic-bezier(.2, .8, .2, 1);
}
html.anima-grifo mark.grifo:not(.is-in) { background-size: 0% 0.46em; }
@media (max-width: 640px) {
  .post-body > blockquote.destaque, .post-body > .frase-destaque { padding-left: 20px; margin: 32px 0 36px; }
}

/* Capas */
.post-cover { max-width: var(--wide); margin: 48px auto 56px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; background: #c9d3da; }
.post-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.blog-head, .post-list { max-width: var(--wide); }
.post-item a { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 44px; align-items: center; padding: 40px 0; }
.post-thumb { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 4px; background: #c9d3da; }
.post-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(.2, .8, .2, 1); }
.post-item a:hover .post-thumb img { transform: scale(1.03); }
.post-text { display: block; }
@media (max-width: 760px) {
  .post-cover { margin: 32px -24px 40px; border-radius: 0; aspect-ratio: 3 / 2; }
  .post-item a { grid-template-columns: 1fr; gap: 22px; padding: 32px 0; }
}
.post-cover + .post-body > :first-child { margin-top: 0; }
