/* ============================================================
   B9 — TEMPLATE DE ARQUIVO / LISTAGEM
   Base para: editorias, tags, especiais, arquivo geral, B9+,
   e links "Ver todas / Ver todas as matérias / Ver arquivo".
   Carregado depois de b9-v6 + v7 + v8 + b9-article-v2
   (reaproveita raio, header, sticky e footer).
   ============================================================ */

/* o raio acompanha só o topo (header + cabeçalho do arquivo) */
.arch-page .art-fold { background: #fff; }
.arch-main { position: relative; z-index: 1; }

/* ── 1 · CABEÇALHO EDITORIAL ─────────────────────────────── */
.arch-head { padding: clamp(34px, 5vw, 64px) 0 clamp(20px, 2.4vw, 30px); }
.arch-head__label {
  font-family: var(--mono); font-weight: 700; font-size: 12px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--red);
  margin: 0 0 18px; display: inline-flex; align-items: center; gap: 9px;
}
.arch-head__label::before {
  content: ""; width: 13px; height: 10px; background: var(--red);
  clip-path: polygon(0 0, 100% 0, 72% 100%, 0 100%);
}
.arch-page.ctx-plus .arch-head__label { color: #9a7a00; }
.arch-page.ctx-plus .arch-head__label::before { background: var(--yellow); }

.arch-head__title {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.035em;
  font-size: clamp(46px, 6.4vw, 100px); line-height: 0.95;
  color: var(--ink); margin: 0; text-wrap: balance;
}
[data-type="franklin"] .arch-head__title,
[data-type="atf"] .arch-head__title { font-weight: 800; }

.arch-head__desc {
  font-family: var(--serif); font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5;
  color: var(--fg-soft); margin: 22px 0 0; max-width: 58ch; text-wrap: pretty;
}
/* frase de benefício — só na variação B9+ */
.arch-head__benefit {
  display: none; font-family: var(--serif); font-style: italic;
  font-size: clamp(16px, 1.3vw, 18.5px); line-height: 1.5;
  color: var(--fg-soft); margin: 14px 0 0; max-width: 56ch; text-wrap: pretty;
}
.arch-page.ctx-plus .arch-head__benefit { display: block; }
.arch-head__meta {
  margin: 18px 0 0; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted);
}

/* CTA B9+ — só na variação premium */
.arch-head__cta { display: none; margin-top: 24px; }
.arch-page.ctx-plus .arch-head__cta { display: inline-flex; }
.arch-head__cta a {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--yellow); color: var(--black); padding: 15px 22px;
  transition: background .16s, transform .16s, box-shadow .16s;
}
.arch-head__cta a span { transition: transform .16s; }
.arch-head__cta a:hover { background: var(--yellow-deep); box-shadow: 0 6px 18px rgba(0,0,0,.16); transform: translateY(-1px); }
.arch-head__cta a:hover span { transform: translateX(3px); }

/* ── 2 · CHIPS / FILTROS ─────────────────────────────────── */
.arch-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(24px, 3vw, 38px); }
.arch-chip {
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.03em;
  color: var(--fg-soft); background: #fff; border: 1px solid var(--rule);
  padding: 9px 16px; white-space: nowrap;
  transition: color .16s, border-color .16s, background .16s;
}
.arch-chip:hover { color: var(--red); border-color: var(--red); background: rgba(255,62,54,.05); }
.arch-chip.is-active { color: #fff; background: var(--ink); border-color: var(--ink); }
.arch-chip.is-active:hover { color: #fff; }
.arch-chip--plus { color: #9a7a00; border-color: rgba(154,122,0,.35); }
.arch-chip--plus:hover { color: var(--black); border-color: var(--yellow); background: rgba(255,230,0,.18); }

/* ── 3 · DESTAQUE PRINCIPAL (opcional) ───────────────────── */
.arch-feat-wrap { padding-bottom: clamp(28px, 3.2vw, 44px); }
.arch-page.ctx-tag .arch-feat-wrap { display: none; }   /* tag pequena: sem destaque */
.arch-feat {
  display: grid; grid-template-columns: 1.12fr 1fr;
  gap: clamp(22px, 2.4vw, 40px); align-items: center;
}
.arch-feat__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); }
.arch-feat__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.arch-feat:hover .arch-feat__media img { transform: scale(1.04); }
.arch-feat__body { display: flex; flex-direction: column; min-width: 0; }
.arch-feat__cat {
  font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); margin-bottom: 14px;
}
.arch-feat__title {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.028em;
  font-size: clamp(31px, 3.5vw, 50px); line-height: 1.02; color: var(--ink);
  margin: 0; text-wrap: pretty; transition: color .16s;
}
[data-type="franklin"] .arch-feat__title, [data-type="atf"] .arch-feat__title { font-weight: 800; }
.arch-feat:hover .arch-feat__title { color: var(--red); }
.arch-feat__dek {
  font-family: var(--serif); font-size: clamp(17px, 1.3vw, 19px); line-height: 1.5;
  color: var(--fg-soft); margin: 16px 0 0; max-width: 46ch; text-wrap: pretty;
}
.arch-feat__meta {
  margin-top: 22px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-muted);
}
.arch-feat__meta b { color: var(--red); font-weight: 700; }

/* ── 4 · GRID PRINCIPAL ──────────────────────────────────── */
.arch-list { padding-bottom: clamp(44px, 5vw, 80px); }
.arch-list__bar {
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  margin-bottom: clamp(24px, 2.6vw, 36px); padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.arch-list__title {
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink);
  display: inline-flex; align-items: center; gap: 9px;
}
.arch-list__title::before {
  content: ""; width: 13px; height: 10px; background: var(--red);
  clip-path: polygon(0 0, 100% 0, 72% 100%, 0 100%);
}
.arch-list__sort { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--fg-muted); }

.arch-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(30px, 3vw, 48px) clamp(24px, 2.6vw, 40px);
}
.acard { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.acard__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); position: relative; }
.acard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.acard:hover .acard__media img { transform: scale(1.05); }
.acard__cat {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--red);
}
.acard__title {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.018em;
  font-size: 20px; line-height: 1.2; color: var(--ink); margin: 0; text-wrap: pretty;
  transition: color .16s;
}
[data-type="franklin"] .acard__title, [data-type="atf"] .acard__title { font-weight: 700; }
.acard:hover .acard__title { color: var(--red); }
.acard__excerpt {
  font-family: var(--serif); font-size: 15.5px; line-height: 1.46;
  color: var(--fg-soft); margin: 0; text-wrap: pretty;
}
.acard__time {
  margin-top: auto; padding-top: 4px; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted);
}

/* selo B9+ no card (cadeado discreto) */
.acard__plus {
  position: absolute; top: 12px; left: 12px; display: none;
  align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  background: var(--yellow); color: var(--black); padding: 4px 8px;
}
.acard__plus svg { width: 11px; height: 11px; }
.arch-page.ctx-plus .acard__plus { display: inline-flex; }
.arch-page.ctx-plus .acard__cat { color: #9a7a00; }

/* ── 5 · LINHA DO TEMPO (variação arquivo geral) ─────────── */
.arch-timeline { display: none; padding-bottom: clamp(48px, 6vw, 86px); }
.arch-page.ctx-arquivo .arch-timeline { display: block; }
.arch-tl__head { margin-bottom: 10px; }
.arch-tl__head .eyebrow { margin-bottom: 8px; }
.arch-tl__head h2 {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(24px, 2.4vw, 34px); color: var(--ink);
}
.arch-tl__list { border-top: 1px solid var(--ink); }
.arch-tl__item {
  display: grid; grid-template-columns: 116px 1fr 132px; gap: 22px; align-items: baseline;
  padding: 18px 0; border-bottom: 1px solid var(--rule);
}
.arch-tl__item:hover { background: linear-gradient(90deg, rgba(255,62,54,.04), transparent 70%); }
.arch-tl__date { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--fg-muted); white-space: nowrap; }
.arch-tl__title {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.015em;
  font-size: 19px; line-height: 1.25; color: var(--ink); text-wrap: pretty; transition: color .16s;
}
.arch-tl__item:hover .arch-tl__title { color: var(--red); }
.arch-tl__cat {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--red);
  justify-self: end; text-align: right;
}

/* ── 6 · CARREGAR MAIS / PAGINAÇÃO ───────────────────────── */
.arch-more { margin-top: clamp(38px, 4.4vw, 58px); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.arch-more__btn {
  font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
  background: #fff; border: 1px solid var(--ink); padding: 16px 34px;
  cursor: pointer; transition: color .16s, background .16s, border-color .16s;
}
.arch-more__btn:hover { background: var(--ink); color: #fff; }
.arch-more__count { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-muted); }
.arch-more__bar { width: 180px; height: 3px; background: var(--rule); margin-top: 2px; }
.arch-more__bar span { display: block; height: 100%; background: var(--red); width: 28%; }

/* ── PAGINAÇÃO PREV/NEXT (componente .b9pg, usado por {{pagination}}) ── */
.b9pg { margin: clamp(44px, 5vw, 72px) 0 clamp(6px, 1vw, 14px); display: flex; align-items: center; justify-content: center; gap: clamp(16px, 2.4vw, 40px); flex-wrap: wrap; }
.b9pg__btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); background: #fff; border: 1px solid var(--rule); padding: 14px 22px;
  transition: color .16s, background .16s, border-color .16s;
}
a.b9pg__btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.b9pg__arrow { transition: transform .16s; display: inline-block; }
a.b9pg__btn--next:hover .b9pg__arrow { transform: translateX(3px); }
a.b9pg__btn--prev:hover .b9pg__arrow { transform: translateX(-3px); }
.b9pg__btn.is-disabled { opacity: .3; pointer-events: none; }
.b9pg__status { font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-muted); position: relative; padding-bottom: 9px; }
.b9pg__status::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; width: 26px; height: 3px; background: var(--red); }
@media (max-width: 560px) {
  .b9pg { flex-direction: column; gap: 14px; align-items: stretch; text-align: center; }
  .b9pg__btn { width: 100%; justify-content: center; padding: 15px 22px; }
  .b9pg__status { order: -1; }
}

/* ── RESPONSIVO ──────────────────────────────────────────── */
@media (max-width: 1000px) {
  .arch-grid { grid-template-columns: repeat(2, 1fr); }
  .arch-feat { grid-template-columns: 1fr; gap: 22px; }
  .arch-feat__media { aspect-ratio: 16 / 9; }
  .arch-tl__item { grid-template-columns: 96px 1fr; }
  .arch-tl__cat { grid-column: 2; justify-self: start; text-align: left; margin-top: 2px; }
}
@media (max-width: 620px) {
  .arch-grid { grid-template-columns: 1fr; }
  .arch-tl__item { grid-template-columns: 1fr; gap: 6px; }
  .arch-tl__date { order: -1; }
}

/* MOBILE — cabeçalho editorial (arquivo/editoria) recua à direita pra não ser
   coberto pelo raio, que desce no canto sup-esq. O raio fica INTACTO (tamanho,
   proporção e posição); só o bloco de texto (eyebrow/título/desc/CTA) ganha
   respiro. Chips e grid seguem na margem normal. */
@media (max-width: 767px) {
  .arch-head__label,
  .arch-head__title,
  .arch-head__desc,
  .arch-head__benefit,
  .arch-head__meta,
  .arch-head__cta,
  .arch-chips {
    margin-left: clamp(30px, 8.5vw, 40px);
  }
}

/* ============================================================
   PÁGINA DE AUTOR — arquivo + camada de perfil (author.hbs)
   Texto à esquerda, foto à direita; consistente com o arquivo.
   ============================================================ */
.auth-hero { padding: clamp(34px, 5vw, 60px) 0 clamp(20px, 2.4vw, 30px); }
.auth-hero__inner {
  display: grid; grid-template-columns: 1fr auto;
  gap: clamp(30px, 4.5vw, 72px); align-items: center;
}
.auth-hero__label {
  font-family: var(--mono); font-weight: 700; font-size: 12px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--red);
  margin: 0 0 16px; display: inline-flex; align-items: center; gap: 9px;
}
.auth-hero__label::before {
  content: ""; width: 13px; height: 10px; background: var(--red);
  clip-path: polygon(0 0, 100% 0, 72% 100%, 0 100%);
}
.auth-hero__name {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.03em;
  font-size: clamp(40px, 5vw, 74px); line-height: 0.98; color: var(--ink);
  margin: 0; text-wrap: balance;
}
[data-type="franklin"] .auth-hero__name, [data-type="atf"] .auth-hero__name { font-weight: 800; }
.auth-hero__bio {
  font-family: var(--serif); font-size: clamp(17px, 1.5vw, 21px); line-height: 1.5;
  color: var(--fg-soft); margin: 18px 0 0; max-width: 54ch; text-wrap: pretty;
}
.auth-hero__meta {
  margin: 18px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-muted);
}
.auth-hero__meta span:not(:last-child)::after { content: "·"; margin-left: 16px; color: var(--rule); }
.auth-hero__links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 22px 0 0; }
.auth-hero__links a {
  font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-soft); transition: color .16s;
  display: inline-flex; align-items: center; gap: 7px;
}
.auth-hero__links a:hover { color: var(--red); }
.auth-hero__photo {
  width: clamp(150px, 17vw, 208px); aspect-ratio: 1 / 1; flex-shrink: 0;
  border-radius: 12px; overflow: hidden; background: var(--paper-2);
}
.auth-hero__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* fallback sem foto: monograma com iniciais (evita banco de imagem) */
.auth-hero__mono {
  width: clamp(150px, 17vw, 208px); aspect-ratio: 1 / 1; border-radius: 12px;
  background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 800; font-size: clamp(56px, 7vw, 92px); letter-spacing: -0.03em;
}

/* selo B9+ marcado por card (conteúdo exclusivo do autor) */
.acard--plus .acard__plus { display: inline-flex; }

@media (max-width: 760px) {
  .auth-hero__inner { grid-template-columns: 1fr; }
  .auth-hero__photo, .auth-hero__mono { width: 116px; order: -1; }
}
