/* =========================================================
   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: var(--color-bg);
  --bg-alt: var(--color-surface-alt);
  --surface: var(--color-surface);
  --fg: var(--color-fg);
  --text: var(--color-text);
  --muted: var(--color-muted);
  --line: var(--color-border);
  --esg: #420C9B;          /* roxo primário da plataforma (guia de estilo do projeto) */
  --esg-soft: #EDE7F5;
  --select: var(--color-focus);
  --radius: var(--radius-lg);
}
*, *::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: var(--lh-body); -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: var(--radius-sm); }
p { margin: 0; }

.container { width: 100%; max-width: var(--maxw); 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); margin: 0; text-wrap: balance; }
.h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
.h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
.h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
.stack { display: flex; flex-direction: column; gap: var(--space-16); }
.block { padding-block: var(--space-fluid-32); }

/* Abertura */
.crumbs { display: flex; flex-wrap: wrap; gap: var(--space-8); list-style: none; margin: 0 0 var(--space-fluid-32); padding: 0; font-size: var(--fs-small); color: var(--muted); line-height: var(--lh-small); }
.crumbs li + li::before { content: ">"; margin-right: var(--space-8); }
.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: var(--space-8); list-style: none; margin: 0; padding: 0; }
/* .tag: ver components.css */
.intro { padding-block: var(--space-fluid-24) 0; }

/* Etapas */
.steps { background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-fluid-48) var(--space-fluid-32); display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-12); list-style: none; margin: var(--space-8) 0 0; }
.step { display: flex; flex-direction: column; align-items: center; gap: var(--space-12); font-size: var(--fs-xs); font-weight: 600; color: var(--text); min-width: 0; text-align: center; line-height: var(--lh-xs); }
.step__icon { width: 56px; height: 56px; border-radius: var(--radius-md); 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-lg); margin-top: var(--space-8); }
.h1--fit { white-space: normal; }  /* títulos longos quebram em linhas, no tamanho da escala */
/* Card de link para o case completo */
.linkcard { display: flex; gap: var(--space-fluid-24); align-items: center; padding: var(--space-16); text-decoration: none; }
.linkcard img { width: clamp(120px, 22vw, 160px); aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-md); flex: none; }
.linkcard__title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h5); color: var(--fg); line-height: var(--lh-h5); margin: 0 0 var(--space-8); }
.linkcard__text { font-size: var(--fs-small); color: var(--muted); line-height: var(--lh-small); }

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

/* Mídia */
.media { background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; }
.media--pad { padding: var(--space-fluid-24); }
.media-row { margin-top: var(--space-fluid-32); }
.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: var(--space-fluid-64); }
.feature + .feature { border-top: 8px solid var(--bg); }
.feature__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--space-fluid-64); align-items: center; }
.feature__shot { width: 100%; }
.feature__shots { display: flex; flex-direction: column; gap: var(--space-fluid-16); min-width: 0; }

.back { padding-block: var(--space-fluid-96); }

@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: var(--space-24); }
  .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: var(--space-16); }

/* Autoria do case (avatar + nome + cliente/ano) */
.byline { display: flex; align-items: center; gap: var(--space-16); margin-top: var(--space-8); }
.byline img { width: 56px; height: 56px; border-radius: var(--radius-full); object-fit: cover; flex: none; }
.byline__name { margin: 0; font-size: var(--fs-body); color: var(--muted); line-height: var(--lh-body); }
.byline__name strong { color: var(--fg); font-weight: 700; }
.byline__meta { margin: var(--space-4) 0 0; font-size: var(--fs-small); color: var(--muted); line-height: var(--lh-small); }
.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: var(--fs-small); font-weight: 400; color: var(--muted); line-height: var(--lh-small); }
  .crumbs [aria-current]::after { content: "Case"; font-size: var(--fs-small); line-height: var(--lh-small); }
  .crumbs [aria-current][data-short]::after { content: attr(data-short); }
}
