/* ==========================================================================
   ATACADO MODAS — páginas internas (institucionais + guias de SEO)
   Depende de site.css (tokens, tipografia, .btn, .tape, .perf, .wrap).
   Vocabulário mantido: etiqueta, picote, kraft, condensada, ourela.
   ========================================================================== */

/* ---------- navegação do header interno ---------- */
.nav {
  display: none;
  gap: 22px;
  align-items: center;
  margin-left: auto;
  margin-right: 18px;
}
@media (min-width: 860px) { .nav { display: flex; } }
.nav a {
  text-decoration: none;
  font-size: .95rem;
  color: var(--ink-2);
  padding-block: 4px;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--tangerine); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--tangerine); font-weight: 600; }

/* menu mobile: detalhes recolhido no topo da página */
.navm { display: block; border-bottom: 1px solid var(--line); background: var(--paper-2); }
@media (min-width: 860px) { .navm { display: none; } }
.navm summary {
  cursor: pointer; list-style: none;
  padding: 12px var(--gutter);
  font-family: var(--f-cond); text-transform: uppercase;
  letter-spacing: var(--tr-lbl); font-size: var(--t-label); font-weight: 700;
  color: var(--ink-2);
  display: flex; align-items: center; gap: 9px;
}
.navm summary::-webkit-details-marker { display: none; }
.navm summary::before {
  content: ""; width: 15px; height: 9px; flex: none;
  border-top: 2px solid var(--tangerine);
  border-bottom: 2px solid var(--tangerine);
}
.navm[open] summary::before { border-bottom-color: transparent; }
.navm__list { display: grid; padding: 0 var(--gutter) 14px; gap: 2px; }
.navm__list a {
  text-decoration: none; color: var(--ink-2); font-size: 1rem;
  padding: 9px 0; border-bottom: 1px dashed var(--line);
}
.navm__list a:last-child { border-bottom: 0; }

/* ---------- cabeçalho de página ---------- */
.phead { padding-block: clamp(30px, 6vw, 56px) clamp(20px, 4vw, 34px); }
.phead h1 {
  font-size: clamp(1.95rem, 5.2vw, 3.1rem);
  line-height: 1.04; letter-spacing: -.032em; margin-top: .34em;
}
.phead__deck {
  margin-top: 16px; font-size: var(--t-deck); color: var(--ink-2);
  max-width: 40ch;
}
.phead__meta {
  margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  font-size: var(--t-cap); color: var(--ink-3);
}
.phead__meta b { color: var(--ink-2); font-weight: 600; }

/* ---------- capa do artigo ---------- */
/* 36rem = a mesma coluna do .art, pra capa e prosa alinharem à esquerda no desktop.
   aspect-ratio fixo nos dois breakpoints: sem recorte, a legenda do canto nunca é
   decepada e o CLS é zero. A 360px de viewport a capa tem 189px de altura. */
.capa {
  max-width: 36rem;
  /* margin COMPLETA de propósito: <figure> tem `margin: 1em 40px` do user-agent
     e o reset do site.css não zera figure. Só margin-top deixava a capa 40px
     recuada dos dois lados — no celular ela ficava 80px mais estreita que o texto. */
  margin: clamp(22px, 4vw, 32px) 0;
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-1);
  background: var(--paper-2); box-shadow: var(--sh-2);
}
.capa img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 1200 / 630; object-fit: cover;
  filter: var(--img-f);
}
/* ourela: a capa vira um canhoto destacável, como o resto do site */
.capa::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--hot-a), var(--hot-b));
}

/* ---------- breadcrumb ---------- */
.crumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
  font-family: var(--f-cond); text-transform: uppercase;
  letter-spacing: var(--tr-lbl); font-size: var(--t-label); font-weight: 700;
  color: var(--ink-3);
  padding-block: 14px 0;
}
.crumb a { color: var(--ink-3); text-decoration: none; }
.crumb a:hover { color: var(--tangerine); }
.crumb span[aria-hidden] { color: var(--kraft); }

/* ---------- corpo de artigo ---------- */
/* 36rem ≈ 70 caracteres na fonte do corpo. A medida é da COLUNA. */
.art { max-width: 36rem; padding-bottom: clamp(40px, 7vw, 72px); }
/* site.css declara p{max-width:38ch} — regra dos decks da landing. Dentro do
   artigo ela travava a prosa em 369px / 44 caracteres, enquanto h2, lista,
   tabela e callout tinham 688: duas medidas alternadas no mesmo texto. */
.art p { max-width: none; }
.art > * + * { margin-top: 1.15em; }
.art h2 {
  font-size: clamp(1.4rem, 3.4vw, 1.85rem);
  line-height: 1.14; letter-spacing: -.026em;
  margin-top: 2em; padding-top: .9em;
  border-top: 1px solid var(--line);
}
.art h3 {
  font-size: clamp(1.12rem, 2.4vw, 1.28rem);
  line-height: 1.22; letter-spacing: -.018em;
  margin-top: 1.7em;
}
.art p, .art li { color: var(--ink-2); }
.art strong { color: var(--ink); font-weight: 700; }
.art ul, .art ol { display: grid; gap: 9px; padding-left: 0; list-style: none; }
.art ul li { padding-left: 19px; position: relative; }
.art ul li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 8px; height: 2px; background: var(--tangerine);
}
.art ol { counter-reset: n; }
.art ol li { padding-left: 30px; position: relative; counter-increment: n; }
.art ol li::before {
  content: counter(n, decimal-leading-zero);
  position: absolute; left: 0; top: .1em;
  font-family: var(--f-cond); font-weight: 700; font-size: .84em;
  font-variant-numeric: tabular-nums;
  color: var(--tangerine);
}
.art a:not(.btn):not(.cta-in__b) {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--tangerine);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
.art a:not(.btn):not(.cta-in__b):hover { color: var(--tangerine); }

/* tabela — rola sozinha, o corpo nunca */
.tbl-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: 3px;
  background: var(--card);
}
.art table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); min-width: 30rem; }
.art th, .art td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.art th {
  font-family: var(--f-cond); text-transform: uppercase;
  letter-spacing: var(--tr-lbl); font-size: var(--t-label); font-weight: 700;
  color: var(--ink-3); background: var(--paper-2);
  white-space: nowrap;
}
.art td { color: var(--ink-2); }
.art td b { color: var(--ink); }
.art tr:last-child td { border-bottom: 0; }
.art .num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* destaque — fita crepe colada na folha */
.callout {
  background: var(--paper-2);
  border-left: 3px solid var(--kraft);
  padding: 18px 20px;
  border-radius: 0 3px 3px 0;
}
.callout p { margin: 0; }
.callout p + p { margin-top: .7em; }
.callout__l {
  display: block; margin-bottom: 7px;
  font-family: var(--f-cond); text-transform: uppercase;
  letter-spacing: var(--tr-lbl); font-size: var(--t-label); font-weight: 700;
  color: var(--kraft-ink);
}

/* CTA dentro do texto — canhoto destacável */
.cta-in {
  margin-top: 2.2em;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 22px 24px 24px;
  box-shadow: var(--sh-2);
  position: relative;
  overflow: hidden;
}
.cta-in::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: linear-gradient(180deg, var(--hot-a), var(--hot-b));
}
.cta-in__l {
  font-family: var(--f-cond); text-transform: uppercase;
  letter-spacing: var(--tr-lbl); font-size: var(--t-label); font-weight: 700;
  color: var(--tangerine-2);
}
/* título do canhoto: h3 no corpo do texto, strong na margem (lá ele viria
   antes do primeiro h2 e quebraria a ordem dos níveis) */
.cta-in__t {
  display: block; margin: 8px 0 6px;
  font-size: 1.2rem; line-height: var(--lh-h3); letter-spacing: var(--tr-h3);
  font-weight: 700; color: var(--ink);
}
.cta-in p { margin: 0 0 16px; font-size: var(--t-sm); color: var(--ink-2); }
.cta-in .btn { font-size: .98rem; padding: 15px 26px; }

/* ---------- índice do artigo ---------- */
.sumario {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 18px 20px 20px;
}
.sumario > b {
  display: block; margin-bottom: 11px;
  font-family: var(--f-cond); text-transform: uppercase;
  letter-spacing: var(--tr-lbl); font-size: var(--t-label);
  color: var(--ink-3);
}
.sumario ol { display: grid; gap: 7px; counter-reset: s; list-style: none; padding: 0; }
.sumario li { counter-increment: s; padding-left: 27px; position: relative; }
.sumario li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute; left: 0; top: .12em;
  font-family: var(--f-cond); font-weight: 700; font-size: .8em;
  font-variant-numeric: tabular-nums; color: var(--kraft-ink);
}
.sumario a { color: var(--ink-2); text-decoration: none; font-size: var(--t-sm); }
.sumario a:hover { color: var(--tangerine); text-decoration: underline; }

/* ==========================================================================
   COLUNA DE MARGEM — o canhoto do artigo
   O corpo do texto deixa de ser um bloco solto à esquerda: vira coluna de
   leitura (36rem) mais uma margem com o índice e o kit, encostada na borda
   direita do .wrap — a mesma em que param o .phead, o header e o rodapé.
   Abaixo de 940px nada disto existe: a margem volta a ser uma pilha no fluxo.
   ========================================================================== */
.lateral { display: grid; gap: 14px; }
/* no celular o canhoto do kit não aparece: o .cta-in do meio do texto já
   cumpre esse papel dentro da leitura */
.lateral .cta-in { display: none; margin-top: 0; }

/* tudo aninhado em :has() de propósito — navegador sem :has() cai na coluna
   única com a medida certa, nunca num sticky solto */
@media (min-width: 940px) {

  .art:has(> .lateral) {
    display: grid;
    max-width: none;
    grid-template-columns: minmax(0, 36rem) minmax(15rem, 19rem);
    column-gap: clamp(36px, 3.4vw, 56px);
    row-gap: 0;                      /* o ritmo vertical continua no margin-top dos filhos */
    justify-content: space-between;  /* a margem encosta na borda do .wrap */
    align-items: start;              /* sem isto o item estica e o sticky não anda */
  }

  .art:has(> .lateral) > * { grid-column: 1; }

  .art:has(> .lateral) > .lateral {
    grid-column: 2;
    grid-row: 1 / span 200;          /* trilho do sticky = altura inteira do artigo;
                                        1/-1 não vale em grid implícito, e as linhas
                                        extras nascem com 0px porque row-gap é 0 */
    margin-top: 0;
    position: sticky;
    top: calc(var(--h-top) + 20px);
    max-height: calc(100dvh - var(--h-top) - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  /* o primeiro bloco de texto nasce na mesma linha do topo da margem */
  .art:has(> .lateral) > .lateral:first-child + * {
    margin-top: 0; padding-top: 0; border-top: 0;
  }

  /* na margem o kit é canhoto, não o cartão do corpo do texto */
  .art:has(> .lateral) .lateral .cta-in { display: block; padding: 18px 18px 20px; }
  .art:has(> .lateral) .lateral .cta-in__t { font-size: 1.05rem; }
  .art:has(> .lateral) .lateral .cta-in p { font-size: var(--t-cap); }
  .art:has(> .lateral) .lateral .cta-in .btn { width: 100%; padding: 13px 16px; font-size: .92rem; }
}

/* ---------- grade de guias (hub) ---------- */
.guias { display: grid; gap: 14px; }
@media (min-width: 700px) { .guias { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .guias { grid-template-columns: repeat(3, 1fr); } }
.guia {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 20px 21px 22px;
  display: flex; flex-direction: column; gap: 8px;
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.guia:hover { border-color: var(--tangerine); transform: translateY(-3px); box-shadow: var(--sh-2); }
.guia__k {
  font-family: var(--f-cond); text-transform: uppercase;
  letter-spacing: var(--tr-lbl); font-size: var(--t-label); font-weight: 700;
  color: var(--kraft-ink);
}
.guia h3 { font-size: 1.1rem; line-height: 1.24; color: var(--ink); }
.guia p { font-size: var(--t-sm); color: var(--ink-3); line-height: 1.45; }
.guia__go {
  margin-top: auto; padding-top: 6px;
  font-size: var(--t-sm); font-weight: 600; color: var(--tangerine-2);
}

/* agrupador por cluster */
.cluster + .cluster { margin-top: clamp(34px, 5vw, 54px); }
.cluster__h {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.cluster__h h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
.cluster__h span { font-size: var(--t-cap); color: var(--ink-3); }

/* ---------- WhatsApp ---------- */
.wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  background: #128C4A; color: #fff;
  font-size: 1rem; font-weight: 700; letter-spacing: -.01em;
  padding: 16px 28px; border-radius: 3px; text-decoration: none;
  box-shadow: 0 2px 0 #0C6B38, 0 14px 26px -16px rgba(18,140,74,.85);
  transition: transform .15s ease, background .15s ease;
}
.wa:hover { background: #0F7A41; transform: translateY(-2px); }
.wa:active { transform: translateY(1px); box-shadow: 0 1px 0 #0C6B38; }
.wa svg { width: 21px; height: 21px; fill: currentColor; flex: none; }
.wa--ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); box-shadow: none;
}
.wa--ghost svg { fill: #128C4A; }
.wa--ghost:hover { background: var(--paper-2); border-color: #128C4A; }

.wa-box {
  background: var(--paper-3);
  border-radius: 3px;
  padding: clamp(22px, 4vw, 32px);
  display: grid; gap: 14px; justify-items: start;
  position: relative; overflow: hidden;
}
.wa-box h3 { font-size: 1.25rem; color: var(--ink); }
.wa-box p { font-size: var(--t-sm); color: var(--ink-2); max-width: 44ch; margin: 0; }

/* ---------- rodapé expandido ---------- */
.foot { border-top: 1px solid var(--line); background: var(--paper-2); }
.foot__grid {
  display: grid; gap: 30px;
  padding-block: clamp(34px, 5vw, 52px) 26px;
}
@media (min-width: 760px) { .foot__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; } }
.foot__brand { display: flex; align-items: baseline; gap: 0; font-weight: 800; letter-spacing: -.03em; font-size: 1.15rem; }
.foot__brand em { font-style: normal; color: var(--tangerine-2); }
.foot__desc { margin-top: 10px; font-size: var(--t-sm); color: var(--ink-3); max-width: 34ch; }
.foot h4 {
  font-family: var(--f-cond); text-transform: uppercase;
  letter-spacing: var(--tr-lbl); font-size: var(--t-label); font-weight: 700;
  color: var(--ink-3); margin-bottom: 12px;
}
.foot ul { list-style: none; display: grid; gap: 9px; padding: 0; }
.foot a { color: var(--ink-2); text-decoration: none; font-size: var(--t-sm); }
.foot a:hover { color: var(--tangerine); text-decoration: underline; }
.foot__bar {
  border-top: 1px solid var(--line);
  padding-block: 18px 26px;
  display: flex; flex-wrap: wrap; gap: 10px 24px;
  justify-content: space-between; align-items: center;
  font-size: var(--t-cap); color: var(--ink-3);
}
.foot__codex {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-3); text-decoration: none;
}
.foot__codex b { color: var(--ink-2); font-weight: 700; }
.foot__codex:hover b { color: var(--tangerine); }
.foot__codex::before {
  content: ""; width: 7px; height: 7px; flex: none;
  background: var(--tangerine); transform: rotate(45deg);
}

/* ---------- 404 ---------- */
.e404 { text-align: center; padding-block: clamp(60px, 12vw, 130px); }
.e404__n {
  font-family: var(--f-cond); font-weight: 700;
  font-size: clamp(5rem, 24vw, 11rem); line-height: .84;
  letter-spacing: -.05em; color: transparent;
  -webkit-text-stroke: 2px var(--line);
}
.e404 h1 { margin-top: 18px; font-size: clamp(1.5rem, 5vw, 2.2rem); }
.e404 p { margin: 14px auto 26px; max-width: 34ch; color: var(--ink-2); }
.e404__links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- utilitários ---------- */
.mt-l { margin-top: clamp(34px, 5vw, 54px); }
.mb-l { margin-bottom: clamp(34px, 5vw, 54px); }
.center { text-align: center; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 12px 20px;
  text-decoration: none; border-radius: 0 0 3px 0;
}
.skip:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  .guia, .wa, .nav a { transition: none; }
}
