/* MICP Design System — Refino v259 — Geometria e Ritmo
   Escopo: polimento visual, sem alteração editorial. */
:root{
  --ds-bg:#fbf8f3;
  --ds-ink:#181716;
  --ds-muted:#5f5547;
  --ds-divider:#e2d7ca;
  --ds-card-border:rgba(189,160,99,.20);
  --ds-card-bg:rgba(255,255,255,.72);
  --ds-card-shadow:0 18px 42px rgba(54,45,31,.065);
  --ds-container:1120px;
  --ds-copy:680px;
  --ds-editorial:900px;
  --ds-statement-size:30px;
  --ds-statement-line:1.25;
  --ds-statement-mobile:27px;
  --ds-card-radius:22px;
}

/* 1. Statements — referência: página O Método / “Compreender antes de concluir.” */
.micp-statement{
  font-family:var(--serif)!important;
  font-size:var(--ds-statement-size)!important;
  line-height:var(--ds-statement-line)!important;
  letter-spacing:-.02em!important;
  font-weight:400!important;
  text-transform:none!important;
}
.micp-statement--dark{color:var(--ds-ink)!important;}
.micp-statement--light{color:#f5f1ea!important;}
.micp-statement--center{text-align:center!important;}

.method-statement,
body.page-origin .origin-statement{
  min-height:150px!important;
  padding:38px 24px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  background:#211914!important;
  color:#fff!important;
  border-top:1px solid rgba(185,165,138,.45)!important;
  border-bottom:1px solid rgba(185,165,138,.45)!important;
}
.method-statement p,
body.page-origin .origin-statement p,
body.page-origin .origin-statement p.micp-statement{
  width:min(980px,100%)!important;
  max-width:980px!important;
  margin:0 auto!important;
  font-family:var(--serif)!important;
  font-size:var(--ds-statement-size)!important;
  line-height:var(--ds-statement-line)!important;
  letter-spacing:-.02em!important;
  font-weight:400!important;
  text-transform:none!important;
  color:#fff!important;
  text-align:center!important;
}
.method-statement .contact-rule,
body.page-origin .origin-statement .origin-rule--center{
  width:54px!important;
  height:2px!important;
  margin:24px auto 0!important;
}

/* 2. Containers editoriais — centraliza o bloco, não o texto. */
@media(min-width:1101px){
  .origin-copy--editorial,
  .origin-copy--beyond{
    width:min(var(--ds-editorial),100%)!important;
    max-width:var(--ds-editorial)!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  .origin-copy--editorial .body-text,
  .origin-copy--beyond .body-text{
    max-width:var(--ds-editorial)!important;
  }
  .origin-close__inner{
    width:min(var(--ds-editorial),100%)!important;
    max-width:var(--ds-editorial)!important;
    margin-left:auto!important;
    margin-right:auto!important;
    text-align:left!important;
  }
}

/* 3. Fechamento da Origem: tipografia de statement, alinhamento editorial. */
body.page-origin #origin-close-title,
body.page-origin .origin-close #origin-close-title.micp-statement{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  margin:0 0 18px!important;
  color:var(--ds-ink)!important;
  font-family:var(--serif)!important;
  font-size:var(--ds-statement-size)!important;
  line-height:var(--ds-statement-line)!important;
  letter-spacing:-.02em!important;
  font-weight:400!important;
  text-align:left!important;
  white-space:nowrap!important;
}
body.page-origin .origin-close .body-text{max-width:var(--ds-copy)!important;}

/* 4. Cards editoriais da Origem — componente em dois quadros. */
.origin-cards{
  width:min(1100px,100%)!important;
  max-width:1100px!important;
  margin:0 auto!important;
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:clamp(24px,2.7vw,34px)!important;
  align-items:stretch!important;
}
.origin-card{
  background:var(--ds-card-bg)!important;
  border:1px solid var(--ds-card-border)!important;
  border-radius:var(--ds-card-radius)!important;
  padding:clamp(28px,2.6vw,36px)!important;
  box-shadow:var(--ds-card-shadow)!important;
  min-height:0!important;
  height:100%!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
}
.origin-card .card-title{
  margin:0 0 16px!important;
  min-height:0!important;
  font-family:var(--serif)!important;
  font-weight:400!important;
  font-size:clamp(25px,2.25vw,32px)!important;
  line-height:1.14!important;
  letter-spacing:-.02em!important;
  color:#302719!important;
}
.origin-card .body-text{
  max-width:none!important;
  margin:0!important;
  font-size:15px!important;
  line-height:1.78!important;
  color:var(--ds-muted)!important;
}
.origin-card .body-text + .body-text{margin-top:14px!important;}

/* 5. Como Trabalhamos — geometria dos cards de ferramentas. */
.page-how-we-work .how-tools-clean__item{
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
}
.page-how-we-work .how-tools-clean__item h3{
  min-height:64px!important;
}

/* 6. Divisórias e CTAs finais. */
body:not(.page-home) .site-section{
  border-bottom-color:var(--ds-divider)!important;
}
.contact-band.site-cta,
.site-footer .contact-band{
  border-top:1px solid #ded2c3!important;
}
.method-cta__button,
.site-cta__button,
.btn.primary{white-space:nowrap;}

@media(max-width:1100px){
  .origin-cards{width:min(100% - 64px,720px)!important;grid-template-columns:1fr!important;}
  body.page-origin #origin-close-title,
  body.page-origin .origin-close #origin-close-title.micp-statement{white-space:normal!important;}
}
@media(max-width:760px){
  .micp-statement,
  .method-statement p,
  body.page-origin .origin-statement p,
  body.page-origin .origin-statement p.micp-statement,
  body.page-origin #origin-close-title,
  body.page-origin .origin-close #origin-close-title.micp-statement{
    font-size:var(--ds-statement-mobile)!important;
    line-height:1.22!important;
  }
  .method-statement,
  body.page-origin .origin-statement{min-height:138px!important;padding:34px 22px!important;}
  .origin-cards{width:min(100% - 44px,720px)!important;}
}
@media(max-width:520px){
  .micp-statement,
  .method-statement p,
  body.page-origin .origin-statement p,
  body.page-origin .origin-statement p.micp-statement,
  body.page-origin #origin-close-title,
  body.page-origin .origin-close #origin-close-title.micp-statement{font-size:25px!important;}
}


/* 7. Fase 1B — Geometria e ritmo v259
   Escopo: padronização de respiro vertical e geometria, sem alteração editorial. */
:root{
  --ds-space-section:clamp(72px,7vw,104px);
  --ds-space-section-compact:clamp(54px,5.8vw,78px);
  --ds-space-section-tight:clamp(42px,4.6vw,62px);
  --ds-space-title:clamp(18px,2vw,26px);
  --ds-space-paragraph:14px;
  --ds-space-card-gap:clamp(24px,2.7vw,34px);
  --ds-editorial-wide:900px;
  --ds-editorial-copy:680px;
}

/* Seções internas: respiro mais previsível entre blocos. */
body:not(.page-home) .site-section,
body.page-origin .origin-section,
body.page-method .method-section,
body.page-application .application-section,
body.page-how-we-work .how-section{
  padding-top:var(--ds-space-section)!important;
  padding-bottom:var(--ds-space-section)!important;
}

body.page-origin .origin-section--compact,
body.page-origin .origin-close,
body.page-method .method-statement,
body.page-method .method-cta,
body.page-application .application-cta,
body.page-how-we-work .how-cta,
body.page-contact .contact-form-section{
  padding-top:var(--ds-space-section-compact)!important;
  padding-bottom:var(--ds-space-section-compact)!important;
}

/* Transição Hero → primeiro bloco: separação constante nas páginas internas. */
body:not(.page-home) .page-hero + .site-section,
body.page-origin .page-hero + .origin-section,
body.page-method .page-hero + .method-section,
body.page-application .page-hero + .application-section,
body.page-how-we-work .page-hero + .how-section,
body.page-contact .page-hero + .contact-section{
  padding-top:clamp(84px,7.4vw,116px)!important;
}

/* Título → texto: mesma distância editorial. */
body:not(.page-home) .section-title,
body:not(.page-home) .block-title,
body:not(.page-home) .card-title,
body.page-origin .origin-copy h2,
body.page-origin .origin-card .card-title,
body.page-method .method-copy h2,
body.page-application .application-copy h2,
body.page-how-we-work .how-copy h2{
  margin-bottom:var(--ds-space-title)!important;
}

/* Parágrafos: ritmo único, sem sobras. */
.body-text p,
p.body-text,
.origin-copy .body-text,
.origin-card .body-text,
.method-copy .body-text,
.application-copy .body-text,
.how-copy .body-text{
  margin-top:0!important;
}
.body-text p + p,
p.body-text + p.body-text,
.origin-copy .body-text + .body-text,
.method-copy .body-text + .body-text,
.application-copy .body-text + .body-text,
.how-copy .body-text + .body-text{
  margin-top:var(--ds-space-paragraph)!important;
}

/* Containers editoriais: mesmo eixo e largura de leitura. */
.origin-copy--editorial,
.origin-copy--beyond,
.origin-close__inner,
.method-copy,
.application-copy,
.how-copy{
  max-width:var(--ds-editorial-wide)!important;
}

/* Cards: gap e preenchimento mais consistentes. */
.origin-cards,
.home-card-grid,
.application-card-grid,
.how-tools-clean,
.method-card-grid{
  gap:var(--ds-space-card-gap)!important;
}
.origin-card,
.home-card,
.application-card,
.method-card,
.page-how-we-work .how-tools-clean__item{
  padding:clamp(28px,2.6vw,36px)!important;
}

/* Cards com ícones: geometria interna estável. */
.card-icon,
.application-card__icon,
.page-how-we-work .how-tools-clean__icon{
  margin-bottom:20px!important;
}
.application-card h3,
.method-card h3,
.home-card h3,
.page-how-we-work .how-tools-clean__item h3{
  margin-top:0!important;
  margin-bottom:14px!important;
}

/* CTA final: respiro constante antes do footer. */
.site-cta,
.contact-band.site-cta,
.method-cta,
.application-cta,
.how-cta{
  padding-top:var(--ds-space-section-compact)!important;
  padding-bottom:var(--ds-space-section-compact)!important;
}

/* Redução de sobras em blocos de fechamento e statements. */
body.page-origin .origin-close,
body.page-method .method-statement,
body.page-origin .origin-statement{
  margin-top:0!important;
  margin-bottom:0!important;
}

@media(max-width:760px){
  :root{
    --ds-space-section:58px;
    --ds-space-section-compact:46px;
    --ds-space-section-tight:36px;
    --ds-space-title:18px;
    --ds-space-paragraph:12px;
  }
  body:not(.page-home) .page-hero + .site-section,
  body.page-origin .page-hero + .origin-section,
  body.page-method .page-hero + .method-section,
  body.page-application .page-hero + .application-section,
  body.page-how-we-work .page-hero + .how-section,
  body.page-contact .page-hero + .contact-section{
    padding-top:62px!important;
  }
}


/* v260 — ajuste pontual: CTA final volta à proporção compacta anterior.
   Mantém o restante da geometria da v259. */
.site-footer .contact-band,
.contact-band.site-cta{
  padding:12px 6vw!important;
}

/* v262 — Correção específica do bloco Ferramentas (Como Trabalhamos)
   Remove sobreposição dos ícones sobre os títulos mantendo o grid. */
.page-how-we-work .how-tools-clean__item{
  padding:28px 10px 0!important;
  min-height:202px!important;
}
.page-how-we-work .how-tools-clean__icon{
  position:static!important;
  top:auto!important;
  left:auto!important;
  transform:none!important;
  width:38px!important;
  height:38px!important;
  margin:0 auto 16px!important;
}
.page-how-we-work .how-tools-clean__icon svg{
  width:38px!important;
  height:38px!important;
}
.page-how-we-work .how-tools-clean__item h3{
  min-height:64px!important;
  margin:0 0 14px!important;
}


/* =========================================================
   v263 — Homologação final da Fase 1
   Escopo: congelamento do Design System e ajustes residuais
   de geometria, sem alteração editorial.
   ========================================================= */

:root{
  --ds-h2-line:1.12;
  --ds-h2-margin:clamp(18px,2vw,26px);
  --ds-block-flow:clamp(52px,5.2vw,76px);
}

/* H2 editoriais: mesma altura de linha e distância para o conteúdo.
   Mantém tamanhos específicos já aprovados em cada página. */
body:not(.page-home) .origin-copy h2,
body:not(.page-home) .method-copy h2,
body:not(.page-home) .application-copy h2,
body:not(.page-home) .how-copy h2,
body:not(.page-home) .how-process__header h2,
body:not(.page-home) .contact-form__intro h2{
  line-height:var(--ds-h2-line)!important;
  margin-bottom:var(--ds-h2-margin)!important;
}

/* Containers editoriais: eixo horizontal final. */
.origin-copy--editorial,
.origin-copy--beyond,
.origin-close__inner,
.method-copy,
.application-copy,
.how-copy{
  margin-left:auto!important;
  margin-right:auto!important;
}

/* Blocos de cards: respiro inferior/superior consistente. */
.origin-cards,
.home-card-grid,
.application-card-grid,
.method-card-grid{
  gap:var(--ds-space-card-gap)!important;
}

/* Como Trabalhamos / Ferramentas: exceção homologada.
   Este bloco tem grid próprio de 2 áreas + 7 cards; não deve herdar gap global. */
.page-how-we-work .how-tools-clean{
  gap:0!important;
  column-gap:0!important;
  row-gap:0!important;
}
.page-how-we-work .how-tools-clean__grid{
  gap:0!important;
}
.page-how-we-work .how-tools-clean__item{
  box-sizing:border-box!important;
  padding:28px 10px 0!important;
  min-height:202px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
}
.page-how-we-work .how-tools-clean__icon{
  flex:0 0 38px!important;
  position:static!important;
  width:38px!important;
  height:38px!important;
  margin:0 auto 16px!important;
}
.page-how-we-work .how-tools-clean__item h3{
  min-height:64px!important;
  margin:0 0 14px!important;
}
.page-how-we-work .how-tools-clean__item p{
  margin:0!important;
}

/* CTA final: proporção compacta aprovada, preservada após a geometria v259. */
.contact-band.site-cta,
.site-footer .contact-band{
  padding-top:12px!important;
  padding-bottom:12px!important;
}

/* Mobile: evita excesso de respiro após a homologação. */
@media(max-width:760px){
  body:not(.page-home) .origin-copy h2,
  body:not(.page-home) .method-copy h2,
  body:not(.page-home) .application-copy h2,
  body:not(.page-home) .how-copy h2,
  body:not(.page-home) .how-process__header h2,
  body:not(.page-home) .contact-form__intro h2{
    margin-bottom:18px!important;
  }
  .contact-band.site-cta,
  .site-footer .contact-band{
    padding-top:14px!important;
    padding-bottom:14px!important;
  }
}
