/* =========================================================
   TEMPLATE DE CASE — estilos compartilhados por todas as páginas de case
   Blocos disponíveis (copiar o HTML de case-esg.html):
   .intro            abertura: breadcrumb (.crumbs), título (.h1.h1--fit #case-title), tags (.tags/.tag)
   .col.block.stack  seção de texto na coluna central (h2/h3 + parágrafos)
   .steps-img        imagem de etapas do processo
   .linkcard         card com miniatura que leva a conteúdo externo
   .icon-title       título de seção com ícone (.icon-chip)
   .wide + .media    imagem larga (fluxos, UI kit, telas) — .scroll-x para rolar no mobile
   .feature          bloco cinza com texto + tela lado a lado (.feature__grid / .feature__shots)
   .back             link de volta para projetos
   ========================================================= */
/* Mesmos tokens do portfólio. Layout do case: coluna de texto central estreita,
   imagens largas quando o material pede (fluxo, UI kit, dashboard). */
:root {
  color-scheme: light;
  --bg: #F8F8F8;
  --bg-alt: #F2F2F2;
  --surface: #FFFFFF;
  --fg: #262626;
  --text: #333333;
  --muted: #6B6B6B;
  --line: #CFCFCF;
  --esg: #420C9B;          /* roxo primário da plataforma (guia de estilo do projeto) */
  --esg-soft: #EDE7F5;
  --select: #0D99FF;
  --font-display: "Mango Grotesque", "Antonio", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --fs-h1: clamp(2.75rem, 5.4vw, 4.75rem);
  --fs-h2: clamp(2.25rem, 3.8vw, 3.5rem);
  --fs-h3: clamp(1.875rem, 3vw, 2.75rem);
  --fs-body: clamp(1rem, 1.1vw, 1.0625rem);
  --gutter: clamp(16px, 7.8vw, 112px);
  --col: 680px;
  --wide: 1240px;
  --radius: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--select); outline-offset: 4px; border-radius: 4px; }
p { margin: 0; }

.container { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.col { width: 100%; max-width: calc(var(--col) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wide { width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* Header (igual ao da home) */

/* Tipografia do case */
.h1, .h2, .h3 { font-family: var(--font-display); font-weight: 600; color: var(--fg); line-height: 1; margin: 0; text-wrap: balance; }
.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.block { padding-block: clamp(24px, 2.8vw, 40px); }

/* Abertura */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 clamp(24px, 3vw, 40px); padding: 0; font-size: 0.875rem; color: var(--muted); }
.crumbs li + li::before { content: ">"; margin-right: 8px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--fg); font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tag { font-size: 0.75rem; font-weight: 500; color: #fff; background: var(--fg); padding: 4px 12px; border-radius: 999px; }
.intro { padding-block: clamp(8px, 2vw, 24px) 0; }

/* Etapas */
.steps { background: var(--surface); border-radius: var(--radius); padding: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 40px); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; list-style: none; margin: 8px 0 0; }
.step { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 0.8125rem; font-weight: 600; color: var(--text); min-width: 0; text-align: center; }
.step__icon { width: 56px; height: 56px; border-radius: 10px; background: var(--esg-soft); color: var(--esg); display: grid; place-items: center; }
.step__icon svg { width: 26px; height: 26px; }
.step-arrow { flex: 1; max-width: 60px; height: 56px; display: grid; place-items: center; color: var(--esg); }
.step-arrow svg { width: 100%; height: 10px; }

.steps-img { width: 100%; background: var(--surface); border-radius: var(--radius); margin-top: 8px; }
.h1--fit { white-space: nowrap; }
@media (max-width: 760px) { .h1--fit { white-space: normal; } }
/* Card de link para o case completo */
.linkcard { display: flex; gap: clamp(16px, 2.4vw, 28px); align-items: center; background: var(--surface); border: 1px solid #E2E2E2; border-radius: var(--radius); padding: 14px; text-decoration: none; }
.linkcard img { width: clamp(120px, 22vw, 160px); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; }
.linkcard__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.375rem, 2vw, 1.75rem); color: var(--fg); line-height: 1.05; margin: 0 0 6px; }
.linkcard__text { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

/* Título de seção com ícone (padrão da referência) */
.icon-title { display: flex; align-items: center; gap: 14px; }
.icon-chip { width: 40px; height: 40px; border-radius: 8px; flex: none; }
.icon-chip svg { width: 22px; height: 22px; }

/* Mídia */
.media { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.media--pad { padding: clamp(12px, 2vw, 24px); }
.media-row { margin-top: clamp(24px, 3vw, 40px); }
.scroll-x { overflow-x: auto; }
.scroll-x img { min-width: 720px; }

/* Telas em destaque (texto + tela lado a lado) */
.feature { background: var(--bg-alt); padding-block: clamp(48px, 5vw, 72px); }
.feature + .feature { border-top: 8px solid var(--bg); }
.feature__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.feature__shot { width: 100%; }
.feature__shots { display: flex; flex-direction: column; gap: clamp(8px, 1.5vw, 16px); min-width: 0; }

.back { padding-block: clamp(48px, 6vw, 88px); }
.back a { font-weight: 700; text-underline-offset: 5px; }

@media (max-width: 860px) {
  .feature__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .steps { flex-wrap: wrap; justify-content: center; row-gap: 24px; }
  .step-arrow { display: none; }
  .step { flex: 0 0 40%; }
  .linkcard { flex-direction: column; align-items: flex-start; }
  .linkcard img { width: 100%; }
}

/* Conteúdo provisório (remover a classe quando o texto real entrar) */
.ph { color: var(--muted); font-style: italic; border-left: 2px dashed var(--line); padding-left: 14px; }

/* Autoria do case (avatar + nome + cliente/ano) */
.byline { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.byline img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.byline__name { margin: 0; font-size: 1rem; color: var(--muted); }
.byline__name strong { color: var(--fg); font-weight: 700; }
.byline__meta { margin: 2px 0 0; font-size: 0.9375rem; color: var(--muted); }
.media img { width: 100%; }

/* Breadcrumb no celular: o último item vira "Case" em vez do título da página */
@media (max-width: 600px) {
  .crumbs [aria-current] { font-size: 0; }
  .crumbs [aria-current]::before { font-size: 0.875rem; font-weight: 400; color: var(--muted); }
  .crumbs [aria-current]::after { content: "Case"; font-size: 0.875rem; }
  .crumbs [aria-current][data-short]::after { content: attr(data-short); }
}
