/* ════════════════════════════════════════════════════════════════
   FRB7 — Brand Manual v1.1 · shared shell (v2.0 site dinâmico)
   ────────────────────────────────────────────────────────────────
   Alinhamento canônico ao Brand Manual (standalone) revisado:
   · sans-serif funcional: Manrope (era Inter)
   · @font-face fallback metric overrides para zero FOUT
   · text-wrap: balance em headlines · pretty em ledes
   · token --hair-strong adicionado (rgba 0.32)
   ════════════════════════════════════════════════════════════════ */

/* ── Fallback metric overrides — eliminam reflow durante carregamento
   das webfonts. Georgia/Arial/Menlo locais ocupam EXATAMENTE o mesmo
   espaço vertical+horizontal que Cormorant/Manrope/JetBrains Mono. */
@font-face {
  font-family: 'Cormorant Fallback';
  src: local('Georgia');
  size-adjust: 105%;
  ascent-override: 89%;
  descent-override: 23%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Manrope Fallback';
  src: local('Arial'), local('Helvetica');
  size-adjust: 102%;
  ascent-override: 100%;
  descent-override: 28%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Mono Fallback';
  src: local('Menlo'), local('Consolas');
  size-adjust: 96%;
  ascent-override: 100%;
  descent-override: 25%;
  line-gap-override: 0%;
}

:root{
  --ink:           #1A3D5C;
  --ink-deep:      #0F2A40;
  --ink-soft:      #2E5577;
  --gold:          #B08D4A;
  --gold-soft:     #D4B57A;
  --bone:          #F5F0E8;
  --paper:         #FAF7F1;
  --cream:         #EDE6D6;
  --graphite:      #3A3A38;
  --ash:           #726C60; /* era #8B8579 · escurecido o mínimo necessário: 3.43:1 → 4.87:1 sobre --paper, 4.59:1 sobre --bone (WCAG AA 4.5:1) — auditoria de legibilidade 2026-08-06 */
  --red:           #A4391F;
  --hair:          rgba(26,61,92,0.18);
  --hair-strong:   rgba(26,61,92,0.32);
  --hair-on-dark:  rgba(245,240,232,0.18);

  /* Stack canônica · Brand Manual standalone */
  --serif: "Cormorant Garamond", "Cormorant Fallback", "EB Garamond", Georgia, serif;
  --sans:  "Manrope", "Manrope Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:  "JetBrains Mono", "Mono Fallback", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --nav-w: 280px;
  --pad-x: clamp(24px, 5vw, 80px);
  --pad-y: clamp(96px, 14vh, 180px);
  --measure: 64ch;
}

*,*::before,*::after{ box-sizing: border-box; }
html,body{ margin:0; padding:0; }
html{ scroll-behavior: smooth; }
body{
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection{ background: var(--gold-soft); color: var(--ink-deep); }
a{ color: inherit; text-decoration: none; }

/* ───── type primitives ───── */
.serif{ font-family: var(--serif); font-weight: 400; letter-spacing: -0.005em; }
.sans { font-family: var(--sans); }
.mono {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ash);
  font-weight: 400;
}
.eyebrow{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ash);
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
}
.eyebrow .num{ color: var(--gold); font-weight: 500; }
.eyebrow.on-dark{ color: rgba(245,240,232,0.55); }
.eyebrow.on-dark .num{ color: var(--gold-soft); }

h1,h2,h3,h4,h5{
  font-family: var(--serif); font-weight: 400; margin: 0;
  letter-spacing: -0.01em; color: var(--ink);
  text-wrap: balance;   /* quebra elegante para headlines · canon do manual */
}
h2{ font-size: clamp(28px, 3.4vw, 48px); line-height: 1.08; }
h3{ font-size: clamp(20px, 1.6vw, 24px); line-height: 1.2; }
em{ font-style: italic; font-weight: 500; }
p{ margin: 0; max-width: var(--measure); text-wrap: pretty; }

.hair{ height: 1px; background: var(--hair); border: 0; }

/* ───── app shell ───── */
.app{
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  min-height: 100vh;
}

.sidenav{
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 36px 28px;
  border-right: 1px solid var(--hair);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 22px;                 /* era 28 · adensa para caber em viewports menores */
  z-index: 30;
  overflow-y: auto;          /* impede que items finais vazem sobre o hero azul */
  scrollbar-width: thin;     /* Firefox · scrollbar discreta */
  scrollbar-color: var(--hair) transparent;
}
.sidenav::-webkit-scrollbar{ width: 6px; }
.sidenav::-webkit-scrollbar-thumb{ background: var(--hair); border-radius: 3px; }
.sidenav::-webkit-scrollbar-track{ background: transparent; }
.brandmark{
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1;
}
.brandmark .mono-line{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ash);
}
.brandmark .mono-line .dot{ color: var(--gold); padding: 0 6px; }
.nav-seal{ width: 44px; height: 44px; display: block; }
.topbar-seal{ width: 34px; height: 34px; display: block; }
.foot-seal{ width: 68px; height: 68px; display: block; margin-bottom: 18px; }

.nav-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;                 /* era 18 · adensa para caber sem scroll em viewports comuns */
}
.nav-list a{
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 14px;
  align-items: baseline;
  padding: 5px 0;
  color: var(--ink);
  position: relative;
}
.nav-list .n{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ash);
  padding-top: 2px;
}
.nav-list .t{
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.22;
  font-weight: 400;
  text-wrap: balance;
}
.nav-list a::after{
  content: "";
  position: absolute;
  left: 42px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 420ms cubic-bezier(.2,.6,.2,1);
}
.nav-list a:hover::after,
.nav-list a.is-active::after{ transform: scaleX(0.4); }
.nav-list a.is-active .n{ color: var(--gold); }

.nav-section{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ash);
  margin: 12px 0 6px;        /* era 18/10 · adensa */
  padding-left: 42px;
  border-top: 1px solid var(--hair);
  padding-top: 12px;         /* era 18 · adensa */
}

.nav-foot{
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lang{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.lang button{
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--ash);
  cursor: pointer;
  position: relative;
}
.lang button.is-active{ color: var(--ink); }
.lang button.is-active::after{
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--gold);
}
.lang .sep{ color: var(--hair); }
.nav-mono{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;   /* era 0.24em · overflow na coluna de 280px cortava "atuação global" */
  text-transform: uppercase;
  color: var(--ash);
  line-height: 1.7;
  max-width: 100%;
  overflow-wrap: break-word;
}

.topbar{ display: none; }
@media (max-width: 1023px){
  .app{ grid-template-columns: 1fr; }
  .sidenav{
    position: fixed;
    inset: 0;
    height: 100vh;
    width: min(420px, 100%);
    transform: translateX(-101%);
    transition: transform 420ms cubic-bezier(.2,.6,.2,1);
    box-shadow: 0 0 0 1px var(--hair);
    padding-top: 84px;
    overflow-y: auto;
  }
  .sidenav.is-open{ transform: translateX(0); }
  .topbar{
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 18px var(--pad-x);
    background: rgba(250,247,241,0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--hair);
  }
  .menu-toggle{
    background: none;
    border: 0;
    padding: 8px 0;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
  }
  .menu-toggle .bars{ width: 22px; height: 9px; display: inline-flex; flex-direction: column; justify-content: space-between; }
  .menu-toggle .bars::before,
  .menu-toggle .bars::after{ content: ""; height: 1px; background: var(--ink); }
}

main{ min-width: 0; }

section{
  padding: var(--pad-y) var(--pad-x);
  position: relative;
}
section + section{ border-top: 1px solid var(--hair); }
.section-inner{ max-width: 1120px; margin: 0 auto; }

.section-head{
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding-bottom: 56px;
}
@media (min-width: 900px){
  .section-head{ grid-template-columns: 240px 1fr; gap: 64px; }
}
.section-head h2{ max-width: 22ch; }
.section-lede{
  font-family: var(--serif);
  font-size: clamp(20px, 1.6vw, 22px);
  line-height: 1.5; /* era 1.45 · piso de legibilidade do corpo (auditoria 2026-08-06) */
  color: var(--ink);
  max-width: 56ch;
  font-style: italic;
  font-weight: 400;
}
.section-lede.sans{
  font-family: var(--sans);
  font-style: normal;
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.55;
  color: var(--ink);
}

.bg-bone { background: var(--bone); }
.bg-cream{ background: var(--cream); }
.bg-paper{ background: var(--paper); }
.bg-ink-deep{
  background: var(--ink-deep);
  color: var(--bone);
}
.bg-ink-deep h2,
.bg-ink-deep h3,
.bg-ink-deep h4,
.bg-ink-deep h5{ color: var(--bone); }
.bg-ink-deep .hair{ background: var(--hair-on-dark); }
.bg-ink-deep .mono{ color: rgba(245,240,232,0.55); }

/* CTA primitive */
.cta{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 5px;
  border-bottom: 1px solid var(--gold);
  display: inline-block;
  position: relative;
  cursor: pointer;
  background: none;
  border-top: 0; border-left: 0; border-right: 0;
}
.cta::after{
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -1px;
  height: 1px;
  background: var(--gold-soft);
  transition: right 420ms cubic-bezier(.2,.6,.2,1);
}
.cta:hover::after{ right: 0; }
.cta.on-dark{ color: var(--bone); }
.cta.on-dark:hover{ color: var(--gold-soft); }

/* inline cross-reference link (menção navegável dentro de parágrafo)
   cor própria, mais escura que --gold: --gold sobre --paper mede 2.91:1 (falha AA);
   #87682C mede 4.85:1 sobre --paper e 4.57:1 sobre --bone (auditoria 2026-08-06).
   --gold em si não é alterado — segue usado em bordas/hairlines/acentos decorativos. */
.ilink{
  color: #87682C;
  border-bottom: 1px solid var(--gold-soft);
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease;
}
.ilink:hover{ color: var(--gold-soft); border-bottom-color: var(--gold); }

/* footer */
footer.site-foot{
  background: var(--ink-deep);
  color: var(--bone);
  padding: 96px var(--pad-x) 56px;
}
.foot-inner{ max-width: 1120px; margin: 0 auto; }
.foot-top{
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--hair-on-dark);
}
@media (min-width: 900px){ .foot-top{ grid-template-columns: 1.2fr 1fr 1fr; } }
.foot-brand p{
  color: rgba(245,240,232,0.65);
  font-size: 15px; /* era 14px · piso de legibilidade do corpo (auditoria 2026-08-06) */
  line-height: 1.6;
  max-width: 36ch;
}
.foot-col h5{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-soft);
  font-weight: 500;
  margin: 0 0 16px;
}
.foot-col p, .foot-col a{
  color: rgba(245,240,232,0.75);
  font-size: 15px; /* era 14px · piso de legibilidade do corpo (auditoria 2026-08-06) */
  line-height: 1.7;
}
.foot-col a:hover{ color: var(--bone); }
.foot-bot{
  padding-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.45);
}

/* reveal */
.reveal{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms cubic-bezier(.2,.6,.2,1), transform 600ms cubic-bezier(.2,.6,.2,1);
}
.reveal.is-in{ opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{ animation: none !important; transition: none !important; }
  .reveal{ opacity: 1; transform: none; }
}

/* ─────────────────────────────────────────────
   IA Assistant — floating sober widget
   ───────────────────────────────────────────── */
.ai-launcher{
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 80;
  background: var(--ink-deep);
  color: var(--bone);
  border: 1px solid var(--gold);
  padding: 14px 22px 14px 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border-radius: 0;
  transition: background 320ms ease, color 320ms ease, border-color 320ms ease;
}
.ai-launcher:hover{
  background: var(--ink);
  border-color: var(--gold-soft);
  color: var(--gold-soft);
}
.ai-launcher .dot{
  width: 6px; height: 6px;
  background: var(--gold-soft);
  border-radius: 50%;
  display: inline-block;
  animation: ai-pulse 2400ms ease-in-out infinite;
}
@keyframes ai-pulse{
  0%,100%{ opacity: 0.4; }
  50%{ opacity: 1; }
}
.ai-overlay{
  position: fixed;
  inset: 0;
  background: rgba(15,42,64,0.42);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
  z-index: 90;
}
.ai-overlay.is-open{ opacity: 1; pointer-events: auto; }
.ai-drawer{
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: min(440px, 100%);
  background: var(--paper);
  border-left: 1px solid var(--hair);
  transform: translateX(101%);
  transition: transform 420ms cubic-bezier(.2,.6,.2,1);
  z-index: 91;
  display: flex;
  flex-direction: column;
}
.ai-drawer.is-open{ transform: translateX(0); }
.ai-head{
  padding: 28px 28px 22px;
  border-bottom: 1px solid var(--hair);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ai-head .label{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}
.ai-head h3{
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
}
.ai-head .close{
  position: absolute;
  top: 22px; right: 22px;
  background: none; border: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ash);
  cursor: pointer;
  padding: 6px 8px;
}
.ai-head .close:hover{ color: var(--ink); }
.ai-body{
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ai-msg{
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 100%;
}
.ai-msg .who{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ash);
}
.ai-msg.user .who{ color: var(--ink-soft); }
.ai-msg.bot .who{ color: var(--gold); }
.ai-msg .bubble{
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  padding: 10px 0 0;
}
.ai-msg.user .bubble{
  font-family: var(--sans);
  font-size: 15px; /* era 14.5px · piso de legibilidade do corpo (auditoria 2026-08-06) */
  color: var(--graphite);
  border-left: 1px solid var(--gold);
  padding-left: 14px;
}
.ai-msg.bot .bubble{
  border-top: 1px solid var(--hair);
  padding-top: 12px;
}
.ai-typing{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ash);
  padding: 8px 0;
}
.ai-typing .dot{ animation: ai-blink 1200ms ease-in-out infinite; }
.ai-typing .dot:nth-child(2){ animation-delay: 200ms; }
.ai-typing .dot:nth-child(3){ animation-delay: 400ms; }
@keyframes ai-blink{
  0%,100%{ opacity: 0.2; }
  50%{ opacity: 1; }
}
.ai-suggestions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0 0;
}
.ai-suggestions button{
  background: none;
  border: 1px solid var(--hair);
  padding: 8px 12px;
  font-family: var(--sans);
  font-size: 15px; /* era 12.5px · são frases completas lidas como corpo de texto (auditoria 2026-08-06) */
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  line-height: 1.5; /* era 1.35 */
  transition: border-color 280ms ease, color 280ms ease;
}
.ai-suggestions button:hover{
  border-color: var(--gold);
  color: var(--ink-deep);
}
.ai-foot{
  border-top: 1px solid var(--hair);
  padding: 16px 28px 22px;
  background: var(--bone);
}
.ai-input{
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.ai-input textarea{
  flex: 1;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair);
  padding: 8px 0;
  outline: none;
  resize: none;
  min-height: 28px;
  max-height: 120px;
  line-height: 1.4;
  transition: border-color 280ms ease;
}
.ai-input textarea:focus{ border-bottom-color: var(--gold); }
.ai-input button{
  background: none;
  border: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  padding: 8px 0;
  border-bottom: 1px solid var(--gold);
  position: relative;
}
.ai-input button:disabled{ opacity: 0.4; cursor: not-allowed; }
.ai-disclaimer{
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 15px; /* era 11.5px · disclaimer de conformidade lido como corpo de texto (auditoria 2026-08-06) */
  font-style: italic;
  color: var(--ash);
  line-height: 1.5; /* era 1.45 */
  max-width: 100%;
}

@media (max-width: 1023px){
  .ai-launcher{
    bottom: 20px; right: 20px;
    padding: 12px 16px;
    font-size: 10px;
    letter-spacing: 0.22em;
  }
  .ai-launcher .label-long{ display: none; }
}

/* ─────────────────────────────────────────────
   Page-hero (smaller than home hero)
   ───────────────────────────────────────────── */
.page-hero{
  background: var(--ink-deep);
  color: var(--bone);
  padding: clamp(140px, 18vh, 220px) var(--pad-x) clamp(80px, 10vh, 120px);
  position: relative;
}
.page-hero .ph-inner{ max-width: 1120px; margin: 0 auto; display: grid; gap: 28px; }
.page-hero .ph-eyebrow{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.55);
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
}
.page-hero .ph-eyebrow .num{ color: var(--gold-soft); }
.page-hero h1{
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.06;
  color: var(--bone);
  font-weight: 400;
  letter-spacing: -0.012em;
  max-width: 20ch;
}
.page-hero h1 em{
  font-style: italic;
  font-weight: 500;
  position: relative;
  display: inline-block;
}
.page-hero h1 em::after{
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.08em;
  height: 1px;
  background: var(--gold);
}
.page-hero .ph-lede{
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(16px, 1.1vw, 19px);
  color: rgba(245,240,232,0.78);
  line-height: 1.6;
  max-width: 56ch;
  margin-top: 8px;
}
.page-hero .ph-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 28px 48px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--hair-on-dark);
}
.page-hero .ph-meta > div{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.page-hero .ph-meta .k{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.45);
}
.page-hero .ph-meta .v{
  font-family: var(--serif);
  font-size: 18px;
  color: var(--bone);
}

/* ── Vertente image slot · injetada por shared.js quando o asset
   existe em assets/vertentes/<slug>.{avif,webp,jpg}. Graceful
   absence: o slot é renderizado vazio com aspect-ratio reservado,
   e some via JS se as 3 fontes falharem (onerror).
   Convenções: dimensões 2400x1000, peso ≤ 250KB AVIF / 350KB WebP /
   500KB JPG; foco off-center à esquerda para respirar com o título. */
.page-hero .ph-image-slot{
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--hair-on-dark);
  display: block;
  position: relative;
}
.page-hero .ph-image-slot picture,
.page-hero .ph-image-slot img{
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 12 / 5;
  object-fit: cover;
  object-position: 30% 50%;
  background: rgba(245,240,232,0.04);
  filter: grayscale(0.18) contrast(1.05);
  transition: filter 420ms ease;
}
.page-hero .ph-image-slot:hover img{ filter: grayscale(0) contrast(1.08); }
.page-hero .ph-image-slot::after{
  /* fio dourado curto sob a imagem · marca de assinatura */
  content: "";
  position: absolute;
  left: 0; bottom: -10px;
  width: 48px; height: 1px;
  background: var(--gold);
}
.page-hero .ph-image-slot.is-empty{ display: none; }
@media (prefers-reduced-motion: reduce){
  .page-hero .ph-image-slot img{ transition: none; }
}

/* segregation tag (linha empresarial · não advocacia) — eyebrow sob a ph-eyebrow do venture/produto */
.ph-segregation{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--hair-on-dark);
  max-width: 60ch;
  line-height: 1.6;
}
.ph-segregation::before{
  content: "▴ ";
  color: var(--gold);
  margin-right: 4px;
}

/* compliance notice (segregation) */
.compliance-note{
  padding: 20px 24px;
  border-left: 1px solid var(--gold);
  background: rgba(176,141,74,0.04);
  font-family: var(--sans);
  font-size: 15px; /* era 13px · nota de conformidade lida como corpo de texto (auditoria 2026-08-06) */
  line-height: 1.6;
  color: var(--graphite);
  max-width: 72ch;
  font-style: italic;
}
.bg-ink-deep .compliance-note{
  background: rgba(245,240,232,0.04);
  color: rgba(245,240,232,0.7);
  border-left-color: var(--gold-soft);
}

/* small screen */
@media (max-width: 640px){
  :root{ --pad-x: 22px; --pad-y: 72px; }
}
.lang-mobile{ display: none; }
@media (max-width: 1023px){ .lang-mobile{ display: inline-flex; } }

/* ═══════════════════════════════════════════════════════════
   v2.1 — interação moderna · conectividade · camada premium
   ═══════════════════════════════════════════════════════════ */

/* View Transitions — navegação entre páginas como documento contínuo */
@view-transition { navigation: auto; }
::view-transition-old(root){ animation-duration: 340ms; animation-timing-function: cubic-bezier(.2,.6,.2,1); }
::view-transition-new(root){ animation-duration: 340ms; animation-timing-function: cubic-bezier(.2,.6,.2,1); }
.sidenav{ view-transition-name: frb7-sidenav; }
.site-foot{ view-transition-name: frb7-foot; }
@media (prefers-reduced-motion: reduce){
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){ animation: none !important; }
}

/* Reveal conduzido por scroll (thread do compositor) quando suportado.
   2026-08-28: o range misturava "entry" (inicio) com "cover" (fim) — para
   elementos altos (ex.: o 3o cartao de nivel, mais alto que o 1o), o ponto
   "cover 22%" cai antes do "entry 4%" em termos de posicao de scroll, o que
   a spec trata como range invertido/vazio: a animacao trava no frame 0
   (opacity:0), no efeito relatado ("nivel 3 quase impossivel de ver" ate a
   pagina rolar para o nivel seguinte). Corrigido para um unico range nomeado
   ("entry" a "entry"), que sempre progride 0->100% de forma monotonica —
   mesmo padrao ja usado no bloco @supports de app.aios.frb7.com abaixo. */
@keyframes frb7-reveal{ from{ opacity: 0; transform: translateY(16px); } to{ opacity: 1; transform: none; } }
.frb7-sdt .reveal{
  opacity: 0;
  animation: frb7-reveal linear both;
  animation-timeline: view();
  animation-range: entry 4% entry 40%;
}
@media (prefers-reduced-motion: reduce){
  .frb7-sdt .reveal{ animation: none; opacity: 1; }
}

/* Canal WhatsApp — flutuante, sóbrio (sem verde de marca) */
.wa-launcher{
  position: fixed;
  bottom: 88px;
  right: 28px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--hair);
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: border-color 320ms ease, color 320ms ease;
}
.wa-launcher:hover{ border-color: var(--gold); color: var(--ink-deep); }
.wa-launcher .wa-dot{
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); display: inline-block;
}
@media (max-width: 1023px){
  .wa-launcher{ bottom: 74px; right: 20px; padding: 10px 14px; letter-spacing: 0.18em; }
}

/* Camada premium — escassez.
   Microcopy mono uppercase abaixo do CTA, em 2 linhas controladas via
   <br/> explícito no HTML (PT e EN). text-wrap: balance foi removido
   porque a implementação em Safari iOS prioriza altura mínima sobre
   simetria visual — com letter-spacing 0.28em em mono, isso gerava
   linha 1 ~36 chars e linha 2 ~21 chars, desequilibrado. Quebra
   física dá controle absoluto: cada linha respira pelo tracking, e
   o conjunto cria um bloco simétrico abaixo do CTA. */
.hero-scarce{
  margin: 30px auto 0;
  max-width: none;
  width: auto;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.52);
  text-align: center;
}
.admission{
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--hair);
}
@media (min-width: 760px){ .admission{ grid-template-columns: repeat(3, 1fr); } }
.admission .step{
  padding: 28px 24px 28px 0;
  border-bottom: 1px solid var(--hair);
}
@media (min-width: 760px){
  .admission .step{ padding: 30px 30px 30px 0; border-bottom: 0; }
  .admission .step + .step{ border-left: 1px solid var(--hair); padding-left: 30px; }
}
.admission .step .sn{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--gold);
}
.admission .step h4{
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  margin: 12px 0 8px;
}
.admission .step p{
  font-size: 15px; /* era 13.5px · piso de legibilidade do corpo (auditoria 2026-08-06) */
  line-height: 1.6;
  color: var(--graphite);
}

/* Insights — CMS Notion */
.insights-grid{
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--hair);
}
@media (min-width: 760px){ .insights-grid{ grid-template-columns: repeat(2, 1fr); } }
.insight{
  padding: 32px 28px 32px 0;
  border-bottom: 1px solid var(--hair);
}
@media (min-width: 760px){
  .insight{ padding: 34px; }
  .insight:nth-child(2n){ border-left: 1px solid var(--hair); }
  .insight:nth-child(2n+1){ padding-left: 0; }
}
.insight .idate{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
}
.insight h3{
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  margin: 12px 0 10px;
  line-height: 1.2;
}
.insight p{ color: var(--graphite); font-size: 15px; line-height: 1.62; } /* era 14.5px · piso de legibilidade do corpo (auditoria 2026-08-06) */
.insights-state{
  padding: 56px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--ash);
}

/* toggle de idioma nas auth views / dashboards (injetado por injectAuthLang) */
.lang-auth{ margin-left: auto; }
.dash-user .lang-auth{ margin: 14px 0 0; display: flex; }

/* ════════════════════════════════════════════════════════════════
   EVOLUÇÃO FRB7B · 2026-06 — refinamentos Web Platform nativos
   (fio de progresso, hero respira, reveals nativos, view transitions,
    tipografia 2026, paleta ⌘K). Tudo degrada com prefers-reduced-motion.
   ════════════════════════════════════════════════════════════════ */

/* tipografia 2026 */
.hero-title, .page-hero h1, .section-head h2, h2, h3 { text-wrap: balance; }
.thesis, .section-lede, .hero-sub, .ph-lede, p { text-wrap: pretty; }
.crest-mono, [data-year], .eyebrow .num, .ph-eyebrow .num { font-variant-numeric: tabular-nums; }

/* Reveal nativo por viewport-timeline ja resolvido em ".frb7-sdt .reveal"
   (aplicado via JS, mais especifico, ganha o cascade sobre qualquer regra
   aqui) — duplicar a mesma feature-query aqui so criava dois ranges
   divergentes competindo pelo mesmo elemento. IntersectionObserver cobre
   quem nao tem a classe frb7-sdt. */

/* fio de leitura dourado — scroll-driven, sem JS */
.ev-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); transform: scaleX(0); transform-origin: 0 50%; z-index: 9999; pointer-events: none; }
@supports (animation-timeline: scroll()) {
  .ev-progress { animation: ev-grow linear both; animation-timeline: scroll(root); }
  @keyframes ev-grow { to { transform: scaleX(1); } }
}

/* hero · vida discreta (somente home) — entrada escalonada, hairline e parallax do selo.
   Substitui o antigo glow radial dourado (descartado: manchava o fundo ink). */
#hero { position: relative; overflow: hidden; }
#hero > * { position: relative; z-index: 1; }

/* entrada no carregamento — selo, título, texto e CTA sobem em sequência */
@keyframes ev-enter { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
#hero .hero-seal, #hero .hero-title, #hero .hero-sub, #hero .hero-cta, #hero .hero-scarce {
  animation: ev-enter .9s cubic-bezier(.2,.6,.2,1) both;
}
#hero .hero-seal   { animation-delay: .05s; }
#hero .hero-title  { animation-delay: .18s; }
#hero .hero-sub    { animation-delay: .44s; }
#hero .hero-cta    { animation-delay: .60s; }
#hero .hero-scarce { animation-delay: .74s; }

/* hairline dourado que se desenha logo abaixo do cabeçalho do hero
   (FRB7 · Legal Strategy / Florianópolis). Fica entre o cabeçalho e o brasão:
   o `safe center` impede o conteúdo central de transbordar para cima e o
   padding-top garante folga, de modo que o brasão nunca cruza a linha. */
#hero .hero-top { position: relative; padding-bottom: 12px; }
#hero .hero-top::after {
  content: ""; position: absolute; left: var(--pad-x); right: var(--pad-x); bottom: 0; height: 1px; width: auto;
  background: linear-gradient(90deg, var(--gold), rgba(176,141,74,0.35));
  transform: scaleX(0); transform-origin: 0 50%;
  animation: ev-rule 1.2s cubic-bezier(.2,.6,.2,1) .35s both;
}
@keyframes ev-rule { to { transform: scaleX(1); } }
#hero .hero-center { place-items: safe center; padding-top: clamp(28px, 5vh, 60px); }

/* parallax sutil do selo ao rolar — leve flutuação, sem cor */
@supports (animation-timeline: scroll()) {
  #hero .hero-seal img { animation: ev-seal linear both; animation-timeline: scroll(root); animation-range: 0 90vh; }
  @keyframes ev-seal { to { transform: translateY(-20px); opacity: .82; } }
}

/* View Transitions cross-document — crossfade suave entre páginas */
@view-transition { navigation: auto; }

/* paleta de comando ⌘K */
.ev-cmdk-back { position: fixed; inset: 0; background: rgba(15,42,64,.42); backdrop-filter: blur(2px); z-index: 10000; display: none; align-items: flex-start; justify-content: center; }
.ev-cmdk-back.open { display: flex; }
.ev-cmdk { margin-top: 14vh; width: min(560px,92vw); background: var(--paper); border: 1px solid var(--hair); box-shadow: 0 30px 90px -30px rgba(15,42,64,.5); }
.ev-cmdk .pin { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--hair); padding: 16px 20px; }
.ev-cmdk .pin input { flex: 1; border: 0; outline: 0; background: none; font-family: var(--serif); font-size: 19px; color: var(--ink); }
.ev-cmdk .pin .kbd { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; border: 1px solid var(--hair); padding: 2px 7px; color: var(--ash); }
.ev-cmdk ul { list-style: none; margin: 0; padding: 0; max-height: 48vh; overflow: auto; }
.ev-cmdk li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 13px 20px; border-bottom: 1px solid var(--hair); cursor: pointer; font-family: var(--sans); font-size: 15px; color: var(--graphite); } /* era 14px · piso de legibilidade do corpo (auditoria 2026-08-06) */
.ev-cmdk li[hidden] { display: none; }
.ev-cmdk li:last-child { border-bottom: 0; }
.ev-cmdk li.sel, .ev-cmdk li:hover { background: var(--bone); }
.ev-cmdk li .m { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .ev-progress,
  #hero .hero-seal, #hero .hero-title, #hero .hero-sub, #hero .hero-cta, #hero .hero-scarce,
  #hero .hero-top::after, #hero .hero-seal img { animation: none !important; }
}

/* ── Acessibilidade · skip-link + focus-visible (auditoria 2026-07-06) ── */
.skip-link{
  position: absolute; left: 16px; top: -48px; z-index: 200;
  background: var(--ink-deep); color: var(--bone);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 10px 16px; border: 1px solid var(--gold);
  transition: top 160ms ease;
}
.skip-link:focus-visible{ top: 12px; outline: 2px solid var(--gold); outline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible{
  outline: 2px solid var(--gold); outline-offset: 2px;
}
