/* ============================================================
   Six Capital Partners — sistema de design
   Preto grafite + latão. Newsreader / IBM Plex Sans / IBM Plex Mono.
   ============================================================ */

/* As @font-face vivem em fonts.css, gerado por scripts/fetch-fonts.mjs. */

/* ---------- 1. Tokens ---------- */

:root {
  /* Cor. O par quente/frio não é decorativo: latão = valor, aço = preço. */
  --ink:          #0B0D10;
  --ink-raised:   #14171C;
  --ink-line:     #232830;
  --bone:         #EDEAE3;
  --bone-dim:     #A9A69F;
  --brass:        #A58724;
  --brass-lit:    #D4B254;
  --steel:        #55636F;
  --steel-lit:    #8093A2;
  --header-bg:    rgba(11, 13, 16, 0.82);

  /* Tipografia */
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body:    'Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --fs-xs:   clamp(0.6875rem, 0.66rem + 0.12vw, 0.75rem);
  --fs-sm:   clamp(0.8125rem, 0.79rem + 0.12vw, 0.875rem);
  --fs-base: clamp(1rem, 0.97rem + 0.16vw, 1.0625rem);
  --fs-md:   clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --fs-lead: clamp(1.1875rem, 1.08rem + 0.5vw, 1.4375rem);
  --fs-lg:   clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --fs-xl:   clamp(1.625rem, 1.3rem + 1.5vw, 2.5rem);
  --fs-2xl:  clamp(2rem, 1.5rem + 2.4vw, 3.375rem);
  --fs-3xl:  clamp(2.5rem, 1.7rem + 3.8vw, 5rem);

  /* Ritmo */
  --gutter:  clamp(1.25rem, 0.6rem + 3vw, 3.5rem);
  --section: clamp(4.5rem, 2.5rem + 8vw, 9rem);
  --measure: 66ch;
  --maxw:    1320px;

  /* A hachura diagonal — textura de marca, derivada da área de alpha do gráfico */
  --hatch: repeating-linear-gradient(
    -45deg,
    rgba(165, 135, 36, 0.34) 0 1px,
    transparent 1px 7px
  );

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* clip, não hidden: `overflow-x: hidden` força `overflow-y: auto` pela
     especificação, o que faz do body um contêiner de rolagem e impede que os
     eventos de scroll cheguem à window. `clip` contém o estouro horizontal
     sem criar contêiner algum. */
  overflow-x: clip;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--brass-lit);
  outline-offset: 3px;
  border-radius: 1px;
}

::selection { background: var(--brass); color: var(--ink); }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
/* Compostos alemães ("Fremdkapitalstrukturierung") estouram a coluna em telas
   estreitas. A hifenização só é aplicada onde o idioma justifica. */
:lang(de) h1, :lang(de) h2, :lang(de) h3, :lang(de) .vertical p, :lang(de) .stack-row .desc {
  hyphens: auto;
}
h1 em, h2 em, h3 em {
  font-style: italic;
  color: var(--brass-lit);
}
p { margin: 0; }
/* figure vem com margin-inline: 40px do user-agent — encolhe o gráfico e a citação. */
figure, blockquote, dl, dd, ul, ol { margin: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--brass);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
}
.skip-link:focus { left: 0; }

/* ---------- 4. Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band { padding-block: var(--section); position: relative; }
.band--tight { padding-block: calc(var(--section) * 0.6); }
.band--raised { background: var(--ink-raised); }
.band + .band { border-top: 1px solid var(--ink-line); }

.measure { max-width: var(--measure); }

/* Mesma armadilha do .post-body: qualquer filho de grid/flex se recusa a
   encolher abaixo do próprio conteúdo. Basta uma tabela, um <pre> ou uma
   palavra longa para esticar a coluna e fazer a página rolar na horizontal. */
.editorial > *,
.contact-grid > *,
.stack-3d > *,
.post-grid > *,
.hero-grid > * { min-width: 0; }

/* Grid editorial assimétrico: rótulo estreito à esquerda, conteúdo à direita. */
.editorial {
  display: grid;
  gap: clamp(1.75rem, 1rem + 3vw, 4rem);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .editorial { grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr); }
}

/* ---------- 5. Elementos de estrutura ---------- */

/* Eyebrow: rótulo mono. Codifica a seção, não decora. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow::before {
  content: '';
  width: 1.75rem;
  height: 1px;
  background: var(--brass);
  flex: none;
}
.eyebrow--plain::before { display: none; }

.section-title {
  font-size: var(--fs-2xl);
  margin-top: 1.25rem;
}
.section-lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--bone-dim);
  margin-top: 1.5rem;
  max-width: var(--measure);
}

.prose > * + * { margin-top: 1.35em; }
.prose {
  font-size: var(--fs-md);
  line-height: 1.75;
  color: var(--bone-dim);
  max-width: var(--measure);
}
.prose strong { color: var(--bone); font-weight: 500; }
.prose em { font-family: var(--font-display); font-style: italic; color: var(--brass-lit); font-size: 1.06em; }

/* ---------- 6. Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.95rem 1.6rem;
  border: 1px solid var(--brass);
  color: var(--ink);
  background: var(--brass);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
  cursor: pointer;
}
.btn:hover { background: var(--brass-lit); border-color: var(--brass-lit); }

.btn--ghost {
  background: transparent;
  color: var(--bone);
  border-color: var(--ink-line);
}
.btn--ghost:hover {
  background: transparent;
  border-color: var(--brass);
  color: var(--brass-lit);
}

.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 2.5rem;
}

/* Link de texto com sublinhado que cresce */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  padding-top: 0.5rem;
  padding-bottom: 0.3rem;
  background-image: linear-gradient(var(--brass), var(--brass));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-size 0.4s var(--ease), color 0.3s var(--ease);
}
.link-arrow:hover { background-size: 100% 1px; color: var(--brass-lit); }

/* ---------- 7. Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.site-header[data-scrolled='true'] { border-bottom-color: var(--ink-line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding-block: 0.5rem;
}
.brand img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: screen;
}
.brand--wordmark {
  width: clamp(10.5rem, 8.75rem + 3vw, 13.25rem);
  gap: 0.55rem;
  transition: filter 0.3s var(--ease), transform 0.3s var(--ease);
}
.brand--wordmark img { width: calc(100% - 1.75rem); }
.brand__mark {
  width: 1.2rem;
  height: 1.03rem;
  flex: none;
  background: var(--brass-lit);
  -webkit-mask: url('../img/alpha.svg') center / contain no-repeat;
  mask: url('../img/alpha.svg') center / contain no-repeat;
  filter: drop-shadow(0 0 0.5rem rgba(212, 178, 84, 0.18));
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}
.brand--wordmark:hover .brand__mark { transform: translateY(-1px) scale(1.06); background: var(--brass); }
.brand--wordmark:hover { filter: brightness(1.12); transform: translateY(-1px); }
.brand--lockup { width: min(16.5rem, 78vw); padding: 0; }
.brand--lockup img { opacity: 0.96; }
@media (max-width: 560px) {
  .brand--wordmark { width: 9rem; gap: 0.4rem; }
  .brand--wordmark img { width: calc(100% - 1.35rem); }
  .brand__mark { width: 0.95rem; height: 0.82rem; }
}

.nav-desktop { display: none; }
@media (min-width: 940px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 0.5rem + 1.6vw, 2.5rem);
  }
}
.nav-desktop a {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-dim);
  padding-block: 0.4rem;
  position: relative;
  transition: color 0.3s var(--ease);
}
.nav-desktop a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: var(--brass);
  transition: width 0.35s var(--ease);
}
.nav-desktop a:hover { color: var(--bone); }
.nav-desktop a:hover::after { width: 100%; }
.nav-desktop a[aria-current='page'] { color: var(--brass); }
.nav-desktop a[aria-current='page']::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 0.65rem; flex: none; }
.header-cta { display: none; }
@media (min-width: 1120px) { .header-cta { display: inline-flex; padding: 0.7rem 1.15rem; } }

.theme-toggle {
  width: 2.55rem;
  height: 2.55rem;
  padding: 0;
  border: 1px solid var(--ink-line);
  background: transparent;
  color: var(--bone);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.theme-toggle:hover { border-color: var(--brass); background: var(--ink-raised); }
.theme-toggle__track {
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  position: relative;
}
.theme-toggle__track::before,
.theme-toggle__track::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 1.45rem;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
  opacity: 0.55;
}
.theme-toggle__track::after { transform: translate(-50%, -50%) rotate(90deg); }
.theme-toggle__track i {
  position: absolute;
  inset: 0.19rem;
  border-radius: 50%;
  background: var(--brass-lit);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}
html[data-theme='light'] .theme-toggle__track i { transform: translate(0.25rem, -0.25rem) scale(0.65); background: var(--steel); }
@media (max-width: 420px) {
  .header-actions { gap: 0.45rem; }
  .theme-toggle { width: 2.25rem; height: 2.25rem; }
}

/* ---------- 8. Seletor de idioma (nativo, sem JS) ---------- */

.lang {
  position: relative;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}
.lang > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--ink-line);
  color: var(--bone-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary:hover { border-color: var(--brass); color: var(--bone); }
.lang > summary .chev { transition: transform 0.3s var(--ease); }
.lang[open] > summary .chev { transform: rotate(180deg); }

.lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 11rem;
  background: var(--ink-raised);
  border: 1px solid var(--ink-line);
  padding: 0.4rem;
  display: grid;
  gap: 1px;
  z-index: 10;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
.lang-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.7rem;
  color: var(--bone-dim);
  letter-spacing: 0.06em;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.lang-list a:hover { background: var(--ink); color: var(--bone); }
.lang-list a[aria-current='true'] { color: var(--brass); }
.lang-list .code { color: var(--steel-lit); letter-spacing: 0.14em; text-transform: uppercase; }

/* ---------- 9. Menu móvel ---------- */

.nav-mobile { position: relative; }
@media (min-width: 940px) { .nav-mobile { display: none; } }

.nav-mobile > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.5rem;
  border: 1px solid var(--ink-line);
  color: var(--bone);
}
.nav-mobile > summary::-webkit-details-marker { display: none; }
.nav-mobile > summary .bars { display: grid; gap: 4px; width: 1.15rem; }
.nav-mobile > summary .bars i {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-mobile[open] > summary .bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-mobile[open] > summary .bars i:nth-child(2) { opacity: 0; }
.nav-mobile[open] > summary .bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav-panel {
  position: fixed;
  inset: 4.75rem 0 0;
  background: var(--ink);
  border-top: 1px solid var(--ink-line);
  padding: var(--gutter);
  padding-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.nav-panel a.nav-link {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--bone);
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--ink-line);
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.nav-panel a.nav-link .idx {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--steel-lit);
  letter-spacing: 0.1em;
}
.nav-panel a.nav-link[aria-current='page'] { color: var(--brass); }
.nav-panel .panel-foot {
  margin-top: auto;
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
  display: grid;
  gap: 0.25rem;
  justify-items: start;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--bone-dim);
}
.nav-panel .panel-foot a { padding-block: 0.5rem; }

/* ---------- 10. Hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(3.5rem, 1.5rem + 7vw, 7rem) clamp(3rem, 1.5rem + 5vw, 5.5rem);
  overflow: hidden;
}
.hero::after {
  /* halo de latão muito baixo, evita o preto chapado */
  content: '';
  position: absolute;
  inset: auto -20% -60% 30%;
  height: 70vh;
  background: radial-gradient(ellipse at center, rgba(165, 135, 36, 0.11), transparent 62%);
  pointer-events: none;
  z-index: 0;
}
.hero > .wrap { position: relative; z-index: 1; }

/* ------------------------------------------------------------------
   O α como marca-d'água do hero.
   A marca da casa é a mesma grandeza que o gráfico ao lado mede: o
   alpha. Fica em profundidade, com paralaxe leve — presença de marca
   sem competir com a manchete.
   ------------------------------------------------------------------ */
.hero-mark {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: clamp(-6rem, -2rem - 6vw, -1rem);
  width: clamp(20rem, 14rem + 26vw, 40rem);
  aspect-ratio: 1000 / 858;
  transform: translate3d(0, -50%, 0);
  background: url('../img/alpha-original.png') center / 210% auto no-repeat;
  mix-blend-mode: screen;
  opacity: 0.17;
  pointer-events: none;
  will-change: transform;
}
@media (max-width: 900px) { .hero-mark { opacity: 0.11; right: -25%; } }

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 1rem + 5vw, 4.5rem);
  align-items: end;
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); }
}

.hero h1 {
  font-size: var(--fs-3xl);
  margin-top: 1.75rem;
  letter-spacing: -0.025em;
  line-height: 1.02;
  max-width: 15ch;   /* segura a manchete em 3 linhas em qualquer idioma */
}
.hero .section-lead { margin-top: 2rem; max-width: 46ch; }

/* ---------- 11. Assinatura: o spread preço × valor ---------- */

.spread {
  border: 1px solid var(--ink-line);
  background: linear-gradient(160deg, rgba(20, 23, 28, 0.9), rgba(11, 13, 16, 0.4));
  padding: clamp(1.1rem, 0.6rem + 1.6vw, 1.75rem);
}
.spread-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-lit);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ink-line);
  margin-bottom: 1.25rem;
}
.spread-head .tag { color: var(--brass); display: inline-flex; align-items: center; gap: 0.45rem; }

/* O α da marca usado como símbolo dentro do texto. Mesma origem vetorial
   da logo, então a marca e o conceito são literalmente a mesma forma. */
.mark-inline {
  width: 0.95em;
  height: 0.82em;
  flex: none;
  background-color: currentColor;
  -webkit-mask: url('../img/alpha.svg') center / contain no-repeat;
  mask: url('../img/alpha.svg') center / contain no-repeat;
}

/* Estágios em HTML: só aparecem quando os rótulos do SVG ficam pequenos demais. */
.spread-stages { display: none; }
@media (max-width: 900px) {
  .spread-stages {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.9rem;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--steel-lit);
  }
  .spread-stages span:nth-child(2) { text-align: center; }
  .spread-stages span:last-child { text-align: right; }

  /* Abaixo disso o SVG desce de 640 para ~300px de largura e todo texto
     interno cairia para menos de 5px — ilegível. Some, e o HTML acima e a
     legenda abaixo passam a carregar o significado. */
  .spread svg .tick,
  .spread svg .curve-label,
  .spread svg .delta { display: none; }
}

.spread-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--ink-line);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
@media (max-width: 900px) {
  .spread-legend { font-size: var(--fs-sm); letter-spacing: 0.06em; }
}
.spread-legend span { display: inline-flex; align-items: center; gap: 0.55rem; }
.spread-legend i { width: 1.4rem; height: 2px; flex: none; }
.spread-legend .k-value { background: var(--brass); }
.spread-legend .k-price { background: var(--steel); }
.spread-legend .k-alpha { background: var(--hatch), var(--ink-raised); height: 0.7rem; }

/* Traçado das curvas */
.spread svg .axis { stroke: var(--ink-line); stroke-width: 1; }
.spread svg .grid-line { stroke: var(--ink-line); stroke-width: 1; stroke-dasharray: 2 5; opacity: 0.7; }
.spread svg .tick {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  fill: var(--steel-lit);
  text-transform: uppercase;
}
.spread svg .curve { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spread svg .curve-price { stroke: var(--steel); }
.spread svg .curve-value { stroke: var(--brass); }
.spread svg .alpha-fill { fill: url(#hatch); }
.spread svg .curve-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.spread svg .label-price { fill: var(--steel-lit); }
.spread svg .label-value { fill: var(--brass-lit); }
.spread svg .delta { fill: var(--brass-lit); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; }

/* ---------- 12. Faixa de credenciais ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink-line);
  border-left: 1px solid var(--ink-line);
}
@media (min-width: 760px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fact {
  border-right: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
  padding: clamp(1.25rem, 0.8rem + 1.4vw, 2rem);
}
.fact dt {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-lit);
  margin-bottom: 0.85rem;
}
.fact dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  line-height: 1.15;
  color: var(--bone);
}
.fact dd small {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--bone-dim);
  margin-top: 0.5rem;
  line-height: 1.5;
  letter-spacing: 0;
}

/* ---------- 13. Verticais ---------- */

.verticals {
  display: grid;
  gap: 1px;
  background: var(--ink-line);
  border: 1px solid var(--ink-line);
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}
@media (min-width: 700px)  { .verticals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .verticals { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.vertical {
  position: relative;
  background: var(--ink);
  padding: clamp(1.5rem, 1rem + 1.8vw, 2.4rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 100%;
  transition: background 0.4s var(--ease);
  overflow: hidden;
}
.vertical::before {
  /* hachura entra pela diagonal no hover — o motivo do gráfico ecoado */
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hatch);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}
.vertical:hover { background: var(--ink-raised); }
.vertical:hover::before { opacity: 0.5; }
.vertical > * { position: relative; z-index: 1; }

/* Reflexo especular que segue o ponteiro — é o que dá leitura de material
   ao card inclinado. Sem ele o 3D parece papel, não metal. */
.vertical::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    18rem circle at var(--mx, 50%) var(--my, 50%),
    rgba(212, 178, 84, 0.12),
    transparent 68%
  );
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
  z-index: 2;
}
.vertical:hover::after { opacity: 1; }

/* Inclinação 3D só onde existe ponteiro fino: em toque, atrapalha. */
@media (hover: hover) and (pointer: fine) {
  .verticals { perspective: 1600px; }
  .vertical {
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(var(--tz, 0px));
    transform-style: preserve-3d;
    transition: transform 0.5s var(--ease), background 0.4s var(--ease);
  }
  /* durante o movimento o acompanhamento precisa ser imediato; ao sair,
     a volta ao repouso é suave */
  .vertical.is-tracking { transition: transform 0.1s linear, background 0.4s var(--ease); }
}

.vertical .ticker {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--brass);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vertical .ticker .n { color: var(--steel-lit); letter-spacing: 0.1em; }
.vertical h3 { font-size: var(--fs-lg); }
.vertical .focus {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  color: var(--steel-lit);
  text-transform: uppercase;
}
.vertical p { color: var(--bone-dim); font-size: var(--fs-sm); line-height: 1.7; }
.vertical .sub {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  border-top: 1px solid var(--ink-line);
  padding-top: 1.1rem;
  margin-top: auto;
}
.vertical .sub li {
  font-size: var(--fs-sm);
  color: var(--bone-dim);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.6;
}
.vertical .sub li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 1px;
  background: var(--brass);
}
.vertical .sub li b { color: var(--bone); font-weight: 500; }

/* ---------- 14. Capital stack ---------- */

.stack {
  display: grid;
  gap: 2px;
  margin-top: clamp(2rem, 1rem + 2.5vw, 3rem);
}
.stack-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem 1.5rem;
  align-items: center;
  background: var(--ink-raised);
  border-left: 2px solid var(--ink-line);
  padding: clamp(0.9rem, 0.6rem + 1vw, 1.35rem) clamp(1rem, 0.7rem + 1.2vw, 1.75rem);
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease);
}
@media (min-width: 820px) {
  .stack-row { grid-template-columns: 8rem minmax(0, 1fr) 9rem; }
}
.stack-row:hover,
.stack-row.is-active { border-left-color: var(--brass); background: #171b21; }
.stack-row .layer {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}
.stack-row .desc { color: var(--bone-dim); font-size: var(--fs-sm); line-height: 1.65; }
.stack-row .desc b { color: var(--bone); font-weight: 500; display: block; margin-bottom: 0.15rem; font-size: var(--fs-base); }
.stack-row .meter {
  height: 6px;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}
.stack-row .meter i {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--brass);
  width: var(--w, 50%);
}
.stack-row:nth-child(1) .meter i { background: var(--steel); }
.stack-row:nth-child(2) .meter i { background: var(--steel-lit); }

/* ---------- 15. Divisões ---------- */

.divisions {
  display: grid;
  gap: 1px;
  background: var(--ink-line);
  border: 1px solid var(--ink-line);
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}
@media (min-width: 860px) { .divisions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.division {
  background: var(--ink);
  padding: clamp(1.75rem, 1.1rem + 2.4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.division .mark {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel-lit);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--ink-line);
}
.division h3 { font-size: var(--fs-xl); }
.division h3 span { display: block; color: var(--brass); font-style: italic; }
.division p { color: var(--bone-dim); font-size: var(--fs-md); line-height: 1.7; }
.division ul { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.division ul li {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-dim);
  padding-left: 1.2rem;
  position: relative;
}
.division ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border: 1px solid var(--brass);
}

/* ---------- Painel de interseções ---------- */

.cross-layout {
  display: grid;
  gap: clamp(2rem, 1rem + 3vw, 3.5rem);
  margin-top: 2rem;
  align-items: start;
}
.cross-layout > * { min-width: 0; }
@media (min-width: 900px) {
  .cross-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr); }
}

.cross { margin: 0; }
.cross svg { width: 100%; height: auto; overflow: visible; }
.cross figcaption {
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  color: var(--steel-lit);
  line-height: 1.6;
}

.cross .cross-ring {
  fill: none;
  stroke: var(--ink-line);
  stroke-dasharray: 2 6;
}
.cross .chord {
  fill: none;
  stroke: var(--brass);
  stroke-width: 1.2;
  opacity: 0.30;
  transition: opacity 0.35s var(--ease), stroke-width 0.35s var(--ease), stroke 0.35s var(--ease);
}
.cross .node-hit { fill: transparent; cursor: pointer; }
.cross .node-dot {
  fill: var(--ink);
  stroke: var(--brass);
  stroke-width: 2;
  transition: fill 0.3s var(--ease), r 0.3s var(--ease);
}
.cross .node-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  fill: var(--bone-dim);
  transition: fill 0.3s var(--ease);
}
.cross .node:hover .node-dot,
.cross .node:focus-visible .node-dot { fill: var(--brass); }
.cross .node:hover .node-label,
.cross .node:focus-visible .node-label { fill: var(--brass-lit); }
.cross .node:focus { outline: none; }
.cross .node:focus-visible .node-hit { stroke: var(--brass-lit); stroke-width: 1; stroke-dasharray: 3 3; }

/* com um nó em foco, só as cordas dele permanecem */
.cross[data-focus] .chord { opacity: 0.08; }
.cross[data-focus] .chord.is-on { opacity: 0.95; stroke-width: 2; stroke: var(--brass-lit); }
.cross[data-focus] .node-dot { opacity: 0.4; }
.cross[data-focus] .node.is-on .node-dot,
.cross[data-focus] .node.is-near .node-dot { opacity: 1; }
.cross[data-focus] .node-label { fill: var(--steel); }
.cross[data-focus] .node.is-on .node-label { fill: var(--brass-lit); }
.cross[data-focus] .node.is-near .node-label { fill: var(--bone); }

/* ---------- 16. Citação / declaração ---------- */

.statement {
  position: relative;
  max-width: min(100%, 38rem);
  padding-left: clamp(1.25rem, 0.5rem + 2.5vw, 2.75rem);
  border-left: 1px solid var(--brass);
}
.statement blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  line-height: 1.25;
  color: var(--bone);
  letter-spacing: -0.015em;
}
.statement blockquote em { color: var(--brass-lit); }
.statement figcaption {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-lit);
}

/* ------------------------------------------------------------------
   Textura de fundo gerada por código (scripts/gerar-imagens.mjs).
   Não é fotografia e não tenta parecer: é uma abstração de torre à
   noite, usada baixa o suficiente para dar atmosfera sem disputar
   atenção com o texto.
   ------------------------------------------------------------------ */
.has-backdrop { position: relative; overflow: hidden; isolation: isolate; }
.has-backdrop > .wrap { position: relative; z-index: 1; }
.backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url('../img/torre-noite.jpg') center / cover no-repeat;
  opacity: 0.5;
  pointer-events: none;
}
/* Degradê para o texto nunca cair sobre a parte mais clara da imagem. */
.backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--ink-raised) 18%, rgba(20, 23, 28, 0.72) 52%, rgba(20, 23, 28, 0.35) 100%);
}
@media (max-width: 700px) {
  /* No celular a imagem vira só ruído atrás do texto. */
  .backdrop { opacity: 0.28; }
}

/* ---------- 16b. Presença física ---------- */

.presence-band { overflow: hidden; }
.presence-grid {
  display: grid;
  gap: clamp(2rem, 1.2rem + 4vw, 4.5rem);
  align-items: center;
}
@media (min-width: 980px) {
  .presence-grid { grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); }
}
.presence-grid .section-title { margin-top: 1.2rem; max-width: 12ch; }
.presence-grid .section-lead { margin-top: 1.2rem; max-width: 45ch; }
.presence-addresses { margin-top: 2rem; }

.office-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 0.85rem;
}
.office-photo {
  position: relative;
  min-width: 0;
  min-height: 12rem;
  overflow: hidden;
  border: 1px solid var(--ink-line);
  background: var(--ink);
}
.office-photo--main { grid-row: span 2; }
.office-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 12rem;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(0.94) contrast(1.04);
  transform: scale(1.01);
}
.office-photo--main img {
  min-height: clamp(28rem, 52vw, 43rem);
  aspect-ratio: 4 / 5;
  object-position: center;
}
.office-photo:not(.office-photo--main) img {
  min-height: clamp(13rem, 17vw, 18rem);
  aspect-ratio: 1.45 / 1;
}
.office-photo figcaption {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.75rem;
  z-index: 1;
  color: #F7F3EA;
  font: 500 0.62rem/1.35 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 1px 1rem rgba(0,0,0,.72);
}
.office-photo::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(0,0,0,.74), transparent);
  pointer-events: none;
}
@media (max-width: 760px) {
  .office-showcase { grid-template-columns: 1fr 1fr; }
  .office-photo--main { grid-column: 1 / -1; grid-row: auto; }
  .office-photo--main img { min-height: 25rem; aspect-ratio: 1 / 1.15; }
  .office-photo:not(.office-photo--main) img { min-height: 11rem; aspect-ratio: 1 / 1; }
}
@media (max-width: 430px) {
  .office-showcase { gap: 0.55rem; }
  .office-photo figcaption { left: 0.65rem; right: 0.65rem; bottom: 0.55rem; font-size: 0.56rem; }
}

/* ---------- 17. Research ---------- */

.research-empty {
  border: 1px solid var(--ink-line);
  padding: clamp(2rem, 1.2rem + 3vw, 4rem);
  display: grid;
  gap: 1.25rem;
  justify-items: start;
  position: relative;
  overflow: hidden;
}
.research-empty::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hatch);
  opacity: 0.18;
  pointer-events: none;
}
.research-empty > * { position: relative; z-index: 1; }

.post-list { display: grid; gap: 1px; background: var(--ink-line); border-block: 1px solid var(--ink-line); }
.post {
  background: var(--ink);
  padding: clamp(1.35rem, 0.9rem + 1.6vw, 2.25rem) 0;
  display: grid;
  gap: 0.65rem 2rem;
  transition: background 0.35s var(--ease);
}
@media (min-width: 820px) { .post { grid-template-columns: 10rem minmax(0, 1fr) 3rem; align-items: baseline; } }
.post:hover { background: var(--ink-raised); }
.post .meta { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel-lit); }
.post h3 { font-size: var(--fs-lg); }
.post p { color: var(--bone-dim); font-size: var(--fs-sm); margin-top: 0.5rem; }

/* ---------- 18. Contato ---------- */

.contact-grid {
  display: grid;
  gap: clamp(2.5rem, 1.5rem + 4vw, 5rem);
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}
@media (min-width: 940px) { .contact-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); } }

.channels { display: grid; gap: 1px; background: var(--ink-line); border: 1px solid var(--ink-line); align-content: start; }
.channel {
  background: var(--ink);
  padding: clamp(1.25rem, 0.8rem + 1.4vw, 1.85rem);
  display: grid;
  gap: 0.5rem;
  transition: background 0.35s var(--ease);
}
.channel:hover { background: var(--ink-raised); }
.channel .k {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-lit);
}
.channel .v { font-size: var(--fs-md); color: var(--bone); word-break: break-word; }
.channel a.v:hover { color: var(--brass-lit); }
.channel address { font-style: normal; color: var(--bone-dim); font-size: var(--fs-sm); line-height: 1.65; }

.field { display: grid; gap: 0.55rem; margin-bottom: 1.35rem; }
.field label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--ink-raised);
  border: 1px solid var(--ink-line);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  padding: 0.85rem 1rem;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
  border-radius: 0;
}
.field textarea { resize: vertical; min-height: 8rem; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brass);
  background: var(--ink);
  outline: none;
}
.field input::placeholder, .field textarea::placeholder { color: var(--steel-lit); opacity: 1; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--brass) 50%), linear-gradient(135deg, var(--brass) 50%, transparent 50%);
  background-position: calc(100% - 20px) 1.35rem, calc(100% - 14px) 1.35rem;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.75rem;
}
.field select option { background: var(--ink-raised); color: var(--bone); }
.field-row { display: grid; gap: 0 1.25rem; }
@media (min-width: 620px) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.form-note {
  font-size: var(--fs-sm);
  color: var(--steel-lit);
  line-height: 1.7;
  margin-top: 1.25rem;
  max-width: 52ch;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-left: 2px solid var(--brass);
  background: var(--ink-raised);
  font-size: var(--fs-sm);
  color: var(--bone);
}
.form-status[hidden] { display: none; }
.form-status[data-state='error'] { border-left-color: #C25B4A; }

/* ---------- 19. Faixa de CTA ---------- */

.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--ink-raised);
  border-top: 1px solid var(--ink-line);
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hatch);
  opacity: 0.22;
  pointer-events: none;
}
.cta-band > .wrap { position: relative; z-index: 1; }
.cta-band h2 { font-size: var(--fs-2xl); max-width: 20ch; }

/* ---------- 20. Rodapé ---------- */

.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--ink-line);
  padding-block: clamp(3rem, 2rem + 3vw, 4.5rem) 2rem;
  font-size: var(--fs-sm);
}
.footer-grid {
  display: grid;
  gap: clamp(2rem, 1rem + 3vw, 3.5rem);
}
@media (min-width: 820px) { .footer-grid { grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); } }

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1.35rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.footer-col a {
  color: var(--bone-dim);
  transition: color 0.25s var(--ease);
  display: inline-block;
  padding-block: 0.4rem;   /* alvo de toque acima do mínimo de 24px */
}
.footer-col a:hover { color: var(--brass-lit); }
.footer-col address { font-style: normal; color: var(--bone-dim); line-height: 1.7; }
.footer-col address + address { margin-top: 1.25rem; }
.footer-col address b {
  display: block;
  color: var(--steel-lit);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 0.4rem;
}

.socials { display: flex; gap: 0.6rem; margin-top: 1.75rem; }
.socials a {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink-line);
  color: var(--bone-dim);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.socials a:hover { border-color: var(--brass); color: var(--brass-lit); }
.socials svg { width: 1rem; height: 1rem; }

.footer-base {
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--ink-line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  color: var(--steel-lit);
  line-height: 1.7;
}
.disclaimer {
  margin-top: 1.75rem;
  font-size: var(--fs-sm);
  line-height: 1.75;
  color: var(--steel-lit);
  max-width: 92ch;
}

/* ---------- 21. Movimento ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal-delay='1'] { transition-delay: 0.08s; }
[data-reveal-delay='2'] { transition-delay: 0.16s; }
[data-reveal-delay='3'] { transition-delay: 0.24s; }

/* Sequência de entrada do hero */
.hero [data-enter] {
  opacity: 0;
  transform: translateY(18px);
  animation: enter 0.9s var(--ease) forwards;
}
.hero [data-enter='1'] { animation-delay: 0.05s; }
.hero [data-enter='2'] { animation-delay: 0.17s; }
.hero [data-enter='3'] { animation-delay: 0.29s; }
.hero [data-enter='4'] { animation-delay: 0.41s; }
.hero [data-enter='5'] { animation-delay: 0.53s; }
@keyframes enter { to { opacity: 1; transform: none; } }

/* O traçado das curvas do spread */
.spread .curve {
  stroke-dasharray: var(--len, 600);
  stroke-dashoffset: var(--len, 600);
  animation: draw 1.6s var(--ease) 0.7s forwards;
}
.spread .curve-value { animation-delay: 0.95s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.spread .alpha-fill,
.spread .curve-label,
.spread .delta {
  opacity: 0;
  animation: fade 0.9s var(--ease) 2.1s forwards;
}
@keyframes fade { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .hero [data-enter] { opacity: 1; transform: none; }
  .spread .curve { stroke-dashoffset: 0; }
  .spread .alpha-fill, .spread .curve-label, .spread .delta { opacity: 1; }
}

/* ============================================================
   23. Transições entre páginas
   O site é multipágina de verdade (bom para SEO e robustez), mas
   sem isto cada navegação é um corte seco e as páginas parecem a
   mesma. A View Transitions API dá continuidade sem virar SPA.
   ============================================================ */

@view-transition { navigation: auto; }

/* O header e o rodapé permanecem: só o miolo troca. */
.site-header { view-transition-name: site-header; }
.site-footer { view-transition-name: site-footer; }

::view-transition-group(root) { animation-duration: 420ms; }
::view-transition-old(root) {
  animation: vt-leave 200ms cubic-bezier(0.4, 0, 1, 1) both;
}
::view-transition-new(root) {
  animation: vt-enter 420ms var(--ease) both;
}
@keyframes vt-leave { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vt-enter { from { opacity: 0; transform: translateY(18px); } }

/* O título da página cruza de uma para outra em vez de piscar. */
.page-title, .hero h1 { view-transition-name: page-heading; }
::view-transition-old(page-heading),
::view-transition-new(page-heading) { animation-duration: 460ms; }

/* ============================================================
   24. Identidade por página
   Cada seção do site recebe um acento próprio, para o visitante
   perceber que mudou de lugar. A cor de marca não muda; muda a
   proporção e o ângulo.
   ============================================================ */

.page-intro { position: relative; overflow: hidden; }
.page-intro::before {
  content: '';
  position: absolute;
  inset: -40% -10% auto auto;
  width: min(46rem, 70vw);
  aspect-ratio: 1;
  background: radial-gradient(circle at 70% 30%, rgba(165, 135, 36, 0.13), transparent 60%);
  pointer-events: none;
}
.page-intro > .wrap { position: relative; z-index: 1; }

/* Símbolo original como marca-d'água também nas páginas internas. */
.page-intro__mark {
  position: absolute;
  z-index: 0;
  top: 52%;
  right: clamp(-5rem, -2rem - 5vw, -1rem);
  width: clamp(17rem, 12rem + 18vw, 29rem);
  aspect-ratio: 1000 / 858;
  transform: translateY(-50%);
  background: url('../img/alpha-original.png') center / 210% auto no-repeat;
  mix-blend-mode: screen;
  opacity: 0.12;
  pointer-events: none;
}
@media (max-width: 720px) {
  .page-intro__mark { right: -9rem; opacity: 0.08; }
}

.page-title {
  font-size: var(--fs-2xl);
  margin-top: 1.5rem;
  max-width: 18ch;
}

/* Faixa hachurada fina que abre cada página interna. */
.page-intro::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--hatch);
  opacity: 0.5;
}

/* ============================================================
   25. Pilha de capital em 3D
   Uma estrutura de capital é literalmente uma pilha de camadas.
   Aqui ela é desenhada como planos empilhados em profundidade, e
   não como barras — a forma diz o que o conteúdo diz.
   ============================================================ */

.stack-3d {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
  margin-top: clamp(2rem, 1rem + 2.5vw, 3rem);
}
@media (min-width: 960px) {
  .stack-3d { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); }
}

.stack-scene {
  perspective: 1500px;
  perspective-origin: 50% 42%;
  padding-block: clamp(2rem, 1rem + 3vw, 3.5rem);
}

.stack-planes {
  position: relative;
  width: min(100%, 26rem);
  margin-inline: auto;
  aspect-ratio: 1 / 0.86;
  transform-style: preserve-3d;
  /* o ângulo isométrico; o JS soma uma variação suave conforme o scroll */
  transform: rotateX(59deg) rotateZ(-40deg) rotateY(0deg) translateZ(0);
  transition: transform 0.8s var(--ease);
}

.stack-plane {
  position: absolute;
  inset: 0;
  border: 1px solid var(--brass);
  background: linear-gradient(135deg, rgba(165, 135, 36, 0.16), rgba(11, 13, 16, 0.72));
  transform: translateZ(calc(var(--z, 0) * 1px));
  transition: transform 0.5s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease), opacity 0.4s var(--ease);
  backface-visibility: hidden;
}
/* as camadas mais baixas são as mais frias: dívida sênior, menos risco */
.stack-plane[data-layer='0'] { border-color: var(--steel); background: linear-gradient(135deg, rgba(85, 99, 111, 0.22), rgba(11, 13, 16, 0.72)); }
.stack-plane[data-layer='1'] { border-color: var(--steel-lit); background: linear-gradient(135deg, rgba(128, 147, 162, 0.18), rgba(11, 13, 16, 0.72)); }

/* camada em foco: sobe e destaca */
.stack-3d[data-active] .stack-plane { opacity: 0.42; }
.stack-plane.is-active {
  opacity: 1 !important;
  transform: translateZ(calc(var(--z, 0) * 1px + 26px));
  box-shadow: 0 0 0 1px var(--brass-lit), 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* A lista ao lado é o conteúdo de fato; o 3D é a ilustração. */
.stack-rows { display: grid; gap: 2px; }

@media (prefers-reduced-motion: reduce) {
  .stack-planes { transition: none; }
  .stack-plane { transition: none; }
}
/* Sem suporte a 3D o desenho simplesmente não aparece e a lista basta. */
@supports not (transform-style: preserve-3d) {
  .stack-scene { display: none; }
  .stack-3d { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .stack-scene { display: none; }
}

/* ============================================================
   26. Blog — listagem
   ============================================================ */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: clamp(2rem, 1rem + 2.5vw, 3rem);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-dim);
  border: 1px solid var(--ink-line);
  padding: 0.55rem 0.9rem;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.chip:hover { border-color: var(--brass); color: var(--bone); }
.chip[aria-current] { border-color: var(--brass); color: var(--ink); background: var(--brass); }
.chip .n { color: var(--steel-lit); font-size: 0.9em; }
.chip[aria-current] .n { color: rgba(11, 13, 16, 0.65); }

.intro-actions { margin-top: 2rem; }

.post-grid {
  display: grid;
  gap: 1px;
  background: var(--ink-line);
  border: 1px solid var(--ink-line);
}
@media (min-width: 760px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-card--lead { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .post-grid--related { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.post-card {
  background: var(--ink);
  display: flex;
  flex-direction: column;
  transition: background 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}
.post-card:hover { background: var(--ink-raised); }

.post-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink-raised);
}
.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease), opacity 0.4s var(--ease);
  opacity: 0.86;
}
.post-card:hover .post-card__media img { transform: scale(1.04); opacity: 1; }

.post-card__body {
  padding: clamp(1.4rem, 1rem + 1.6vw, 2.2rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}
.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel-lit);
}
.post-card__meta .cat { color: var(--brass); }
.post-card__title { font-size: var(--fs-lg); }
.post-card--lead .post-card__title { font-size: var(--fs-xl); }
.post-card__title a { color: var(--bone); transition: color 0.3s var(--ease); }
.post-card__title a::after { content: ''; position: absolute; inset: 0; }
.post-card:hover .post-card__title a { color: var(--brass-lit); }
.post-card__excerpt { color: var(--bone-dim); font-size: var(--fs-sm); line-height: 1.7; }
.post-card__foot {
  margin-top: auto;
  padding-top: 1.1rem;
  border-top: 1px solid var(--ink-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-lit);
}
.post-card__foot .go { color: var(--brass); display: inline-flex; align-items: center; gap: 0.5rem; }
.post-card:hover .post-card__foot .go svg { transform: translateX(4px); }
.post-card__foot .go svg { transition: transform 0.3s var(--ease); }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2.5rem, 1.5rem + 2.5vw, 3.5rem);
  flex-wrap: wrap;
}
.pager__count {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel-lit);
}

/* ============================================================
   27. Blog — artigo
   ============================================================ */

.post-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-lit);
}
.post-breadcrumb a {
  color: var(--brass);
  padding-block: 0.3rem;   /* alvo de toque acima do mínimo */
}
.post-breadcrumb a:hover { color: var(--brass-lit); }

.post-title {
  font-size: var(--fs-2xl);
  margin-top: 1.5rem;
  max-width: 22ch;
  view-transition-name: page-heading;
}
.post-standfirst {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--bone-dim);
  margin-top: 1.5rem;
  max-width: 58ch;
}

.post-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink-line);
}
.post-byline__who .name { font-family: var(--font-display); font-size: var(--fs-md); color: var(--bone); }
.post-byline__who .role {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin-top: 0.3rem;
}
.post-byline__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-lit);
}

.post-cover { margin-top: clamp(2rem, 1rem + 3vw, 3.5rem); }
.post-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--ink-line);
}

.post-body-band { padding-top: clamp(2.5rem, 1.5rem + 3vw, 4rem); }

.post-layout { display: grid; gap: clamp(2rem, 1rem + 3vw, 4rem); }
/* Item de grid nasce com min-width:auto e se recusa a encolher abaixo do
   conteúdo. Sem esta linha, uma tabela larga dentro do artigo estica a coluna,
   o overflow-x do wrapper nunca age, e a PÁGINA INTEIRA rola na horizontal no
   celular. */
.post-body, .post-aside { min-width: 0; }
@media (min-width: 1000px) {
  .post-layout { grid-template-columns: 14rem minmax(0, 1fr); align-items: start; }
  .post-aside { position: sticky; top: 7rem; }
}

.toc { border-left: 1px solid var(--ink-line); padding-left: 1.25rem; margin-bottom: 2.5rem; }
.toc__title {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1rem;
}
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; counter-reset: toc; }
.toc li a {
  font-size: var(--fs-sm);
  color: var(--bone-dim);
  line-height: 1.5;
  display: block;
  transition: color 0.25s var(--ease);
}
.toc li a:hover { color: var(--brass-lit); }
.toc li.lvl3 { padding-left: 1rem; }
.toc li.lvl3 a { font-size: var(--fs-xs); color: var(--steel-lit); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.share__label {
  width: 100%;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-lit);
  margin-bottom: 0.4rem;
}
.share__btn {
  display: inline-grid;
  place-items: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding-inline: 0.6rem;
  border: 1px solid var(--ink-line);
  background: transparent;
  color: var(--bone-dim);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.share__btn:hover { border-color: var(--brass); color: var(--brass-lit); }

/* --- corpo do texto --- */

.post-body {
  max-width: 68ch;
  font-size: var(--fs-md);
  line-height: 1.8;
  color: var(--bone-dim);
}
.post-body > * + * { margin-top: 1.5em; }
.post-body h2, .post-body h3 {
  color: var(--bone);
  scroll-margin-top: 7rem;
}
.post-body h2 { font-size: var(--fs-xl); margin-top: 2.4em; }
.post-body h3 { font-size: var(--fs-lg); margin-top: 2em; }
.post-body strong { color: var(--bone); font-weight: 500; }
.post-body a { color: var(--brass-lit); text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
.post-body a:hover { color: var(--brass); }
.post-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--ink-raised);
  border: 1px solid var(--ink-line);
  padding: 0.1em 0.4em;
}
.post-body .post-rule { border: 0; border-top: 1px solid var(--ink-line); margin-block: 2.5em; }

.post-body .post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85em; }
.post-body ul.post-list li,
.post-body ol.post-list li { position: relative; padding-left: 1.5rem; }
.post-body ul.post-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 1px;
  background: var(--brass);
}
.post-body ol.post-list { counter-reset: n; }
.post-body ol.post-list li::before {
  counter-increment: n;
  content: counter(n, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.1em;
  font-family: var(--font-mono);
  font-size: 0.72em;
  color: var(--brass);
}

.post-body .post-quote {
  border-left: 1px solid var(--brass);
  padding-left: clamp(1.1rem, 0.6rem + 1.6vw, 2rem);
  margin-block: 2.5em;
}
.post-body .post-quote p {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  line-height: 1.35;
  color: var(--bone);
  letter-spacing: -0.01em;
}

.post-body .post-callout {
  border: 1px solid var(--ink-line);
  border-left: 2px solid var(--brass);
  background: var(--ink-raised);
  padding: clamp(1.1rem, 0.8rem + 1.2vw, 1.75rem);
  margin-block: 2.5em;
  position: relative;
  overflow: hidden;
}
.post-body .post-callout::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hatch);
  opacity: 0.16;
  pointer-events: none;
}
.post-body .post-callout p { position: relative; color: var(--bone); font-size: var(--fs-base); }
.post-body .post-callout--numero p {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  line-height: 1.25;
}
.post-body .post-callout--aviso { border-left-color: var(--steel-lit); }
.post-body .post-callout--aviso::after { opacity: 0; }

.post-body .post-figure { margin-block: 2.5em; }
.post-body .post-figure img { width: 100%; border: 1px solid var(--ink-line); }
.post-body .post-figure figcaption {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  color: var(--steel-lit);
  margin-top: 0.85rem;
  line-height: 1.6;
}

.post-body .post-table-wrap {
  margin-block: 2.5em;
  overflow-x: auto;      /* tabela larga rola dentro de si, nunca na página */
  border: 1px solid var(--ink-line);
}
.post-body .post-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 34rem; }
.post-body .post-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--ink-line);
  background: var(--ink-raised);
  white-space: nowrap;
}
.post-body .post-table td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--ink-line); color: var(--bone-dim); }
.post-body .post-table tr:last-child td { border-bottom: 0; }

.post-footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--ink-line);
  padding-top: 2rem;
}
.post-langs {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel-lit);
}
.post-langs a {
  color: var(--brass);
  margin-left: 0.6rem;
  display: inline-block;
  padding-block: 0.35rem;
}

/* ---------- 28. Impressão ---------- */

/* ---------- tema claro ---------- */
html[data-theme='light'] {
  --ink: #F4F1EA;
  --ink-raised: #E9E4DA;
  --ink-line: #CCC3B3;
  --bone: #17191D;
  --bone-dim: #4F5358;
  --brass: #8A6818;
  --brass-lit: #6F500D;
  --steel: #6B7983;
  --steel-lit: #40515C;
  --header-bg: rgba(244, 241, 234, 0.88);
  --hatch: repeating-linear-gradient(-45deg, rgba(138,104,24,.27) 0 1px, transparent 1px 7px);
}
html[data-theme='light'] { color-scheme: light; }
html[data-theme='light'] .brand img { mix-blend-mode: multiply; filter: invert(1) grayscale(1); }
html[data-theme='light'] .brand__mark { filter: none; }
html[data-theme='light'] .hero::after { background: radial-gradient(ellipse at center, rgba(165,135,36,.14), transparent 62%); }
html[data-theme='light'] .hero-mark,
html[data-theme='light'] .page-intro__mark { background: var(--brass); -webkit-mask: url('../img/alpha.svg') center / contain no-repeat; mask: url('../img/alpha.svg') center / contain no-repeat; mix-blend-mode: multiply; opacity: .09; }
html[data-theme='light'] .spread { background: linear-gradient(160deg, rgba(255,255,255,.74), rgba(233,228,218,.66)); }
html[data-theme='light'] .stack-row.is-active { background: #DDD6C8; }
html[data-theme='light'] .site-footer { background: #17191D; color: #EDEAE3; --ink:#17191D; --ink-raised:#20242A; --ink-line:#313740; --bone:#EDEAE3; --bone-dim:#B3B0A9; --brass:#A58724; --brass-lit:#D4B254; --steel-lit:#8B9BA7; }
html[data-theme='light'] .site-footer .brand img { mix-blend-mode: screen; filter: none; }

@media (prefers-reduced-motion: reduce) {
  .stack-plane, .stack-row .meter i { transition: none; }
}

@media print {
  body { background: #fff; color: #000; }
  .site-header, .cta-band, .socials { display: none; }
  a { color: #000; }
}
