/* ============================================================
   overA Capital, page: Conteúdo  (editorial insights listing)
   A calm, TYPE-FIRST article wall: masthead -> featured piece ->
   theme filter -> borderless tonal-ring card grid -> espresso CTA.
   Models the Transações sibling (paper gallery header + filter +
   grid) but the cards are typography-first (no cover images),
   flatter, and read as a publication via the Newsreader/Barlow duet.

   Page-scoped under .cnt- ; the shell (header/footer + site.js
   nav/reveal/year) is shared. Imagery is ALL-OR-NOTHING and ships
   OFF (type-first) by design — see the research notes in conteudo.html.
   ============================================================ */

/* ------------------------------------------------------------
   HEADER OVER PAPER HERO (page-scoped): base.css styles the
   unscrolled header for dark heroes (cream links / ghost CTA).
   Conteúdo opens on paper, so repaint the nav controls in ink tones
   until the header solidifies. (Copied verbatim from page-transacoes.css
   so the page reads as a sibling, not a foreign template.)
   ------------------------------------------------------------ */
.site-header:not(.site-header--solid) .nav-links a { color: var(--ink-muted); opacity: 1; }
.site-header:not(.site-header--solid) .nav-links a:hover,
.site-header:not(.site-header--solid) .nav-links a.is-active { color: var(--ink); opacity: 1; }
.site-header:not(.site-header--solid) .nav-cta.btn--ghost { border-color: var(--line); color: var(--ink); }
.site-header:not(.site-header--solid) .nav-cta.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.site-header:not(.site-header--solid) .nav-toggle span { background: var(--ink); }

/* ------------------------------------------------------------
   MASTHEAD — a compact gallery header: H1 + a one-line standfirst
   on the same baseline axis, a hairline, then the theme filter.
   Same register as Transações; deliberately NOT .page-hero (which
   locks a near-empty tall title screen on wide viewports).
   ------------------------------------------------------------ */
.cnt-top {
  background: var(--paper);
  padding-top: calc(var(--header-h) + clamp(2.4rem, 5vw, 4.5rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
}
.cnt-top__head {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(1.4rem, 4vw, 4rem);
  align-items: end;
  padding-bottom: clamp(1.8rem, 3vw, 2.6rem);
  border-bottom: 1px solid var(--line);
}
.cnt-top__head h1 {
  font-size: var(--fs-page-title);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
}
.cnt-top__lede {
  font-family: var(--sans);
  font-size: var(--fs-lead);
  line-height: 1.45;
  color: var(--ink-muted);
  max-width: 46ch;
  margin: 0 0 0.35rem;
}
@media (max-width: 760px) {
  .cnt-top__head { grid-template-columns: 1fr; align-items: start; gap: 1.1rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .cnt-top > .container { animation: heroSettle 0.9s var(--ease-out) both; }
}

/* the theme filter row sits under the masthead, left-aligned, flat */
.cnt-filter { margin-top: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 0; }

/* ------------------------------------------------------------
   FEED wrapper — paper, generous bottom rhythm before the CTA band.
   ------------------------------------------------------------ */
.cnt-feed {
  background: var(--paper);
  padding-top: clamp(2.6rem, 5vw, 4rem);
  padding-bottom: var(--section-y);
}

/* ------------------------------------------------------------
   FEATURED — one curated piece, asymmetric 2-up, marked special by
   size + a typographic brand plate (NEVER a stock photo; imagery is
   off site-wide here). Render ONLY when >=3 posts exist; with fewer,
   drop the featured and go straight to the grid.
   ------------------------------------------------------------ */
.cnt-featured {
  position: relative;               /* anchor for the stretched title link */
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(1.6rem, 4vw, 3.5rem);
  align-items: stretch;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.cnt-featured__plate {
  position: relative;
  min-height: clamp(220px, 30vw, 340px);
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: linear-gradient(155deg, var(--paper-2), var(--oat) 60%, var(--oat-deep));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cnt-featured__plate img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) sepia(0.42) contrast(1.04) brightness(1.03);
  transition: filter var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.cnt-featured:hover .cnt-featured__plate img { filter: grayscale(0.1) sepia(0.05) contrast(1.03); transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) {
  .cnt-featured__plate img { transition: none; }
  .cnt-featured:hover .cnt-featured__plate img { transform: none; }
}
.cnt-featured__mark {
  font-family: var(--display);
  font-size: clamp(8rem, 20vw, 15rem);
  line-height: 1;
  color: var(--accent);
  opacity: 0.14;
  user-select: none;
}
.cnt-featured__body { display: flex; flex-direction: column; justify-content: center; }
.cnt-featured__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0.8rem 0 0;
  color: var(--ink);
}
.cnt-featured__title a { color: inherit; text-decoration: none; }
.cnt-featured__title a:hover { color: var(--accent-deep); }
/* whole-featured hit area via the title link (same a11y device as the cards);
   the wordless arrow in the foot is the read affordance — no "Ler" label */
.cnt-featured__title a::after { content: ""; position: absolute; inset: 0; }
.cnt-featured__dek {
  font-family: var(--sans);
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--ink-muted);
  margin: 1rem 0 0;
  max-width: 48ch;
}
.cnt-featured__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(1.4rem, 3vw, 2rem);
}
.cnt-featured__foot time { font-family: var(--sans); font-size: var(--fs-small); color: var(--ink-faint); }
.cnt-featured__foot .msym {
  color: var(--ink-faint);
  font-size: 1.3rem;
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.cnt-featured:hover .cnt-featured__foot .msym { color: var(--accent); transform: translate(2px, -2px); }
@media (prefers-reduced-motion: reduce) {
  .cnt-featured:hover .cnt-featured__foot .msym { transform: none; }
}
@media (max-width: 760px) {
  .cnt-featured { grid-template-columns: 1fr; }
  .cnt-featured__plate { min-height: 170px; }
}

/* ------------------------------------------------------------
   CATEGORY EYEBROW — quiet uppercase Barlow (never a filled colored
   pill on every card; that reads SaaS). Terracotta only on featured.
   ------------------------------------------------------------ */
.cnt-cat {
  display: inline-block;
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}
.cnt-cat--accent { color: var(--accent); }

/* ------------------------------------------------------------
   THE GRID — type-first cards on warm paper. Borderless feel via an
   offdeal-style tonal RING (box-shadow:0 0 0 1px), never a drop shadow.
   1 / 2 / 3 columns by viewport. NOTE (count-driven): with a low real
   post count, step the grid down — drop the 980px 3-up rule for <=8
   posts, and the 620px 2-up rule for <=2 posts — so rows never sit
   half-empty.
   ------------------------------------------------------------ */
.cnt-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.4rem, 2.2vw, 2rem) clamp(1.4rem, 1.8vw, 1.5rem);
}
@media (min-width: 620px) { .cnt-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cnt-grid { grid-template-columns: repeat(3, 1fr); } }

.cnt-card { display: flex; transition: opacity 0.12s var(--ease); }
.cnt-card > article {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--paper);
  border-radius: var(--r);
  box-shadow: 0 0 0 1px var(--oat-deep);   /* tonal ring, never a drop shadow (manual: brand is flat) */
  overflow: hidden;                        /* clip the cover image to the card radius */
  transition: box-shadow var(--dur) var(--ease);
}
.cnt-card > article:hover { box-shadow: 0 0 0 1px var(--line-strong); }
.cnt-card > article:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ------------------------------------------------------------
   COVER IMAGE — editorial photo, unified into one publication by a
   warm DUOTONE (grayscale + sepia tone) that matches the brand's
   espresso/sepia photographic voice (see sp-skyline). Subtly warms +
   eases up toward color on hover. The whole-card link (.cnt-card__title
   a::after) still spans the image, so the cover is decorative (alt="").
   ------------------------------------------------------------ */
.cnt-card__cover {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--oat);
  border-bottom: 1px solid var(--line);
}
.cnt-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1) sepia(0.42) contrast(1.04) brightness(1.03);
  transition: filter var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.cnt-card > article:hover .cnt-card__cover img { filter: grayscale(0.12) sepia(0.06) contrast(1.03); transform: scale(1.04); }

/* the text block now carries the padding (was on <article>) */
.cnt-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: clamp(1.3rem, 1.8vw, 1.7rem);
}

@media (prefers-reduced-motion: reduce) {
  .cnt-card__cover img { transition: none; }
  .cnt-card > article:hover .cnt-card__cover img { transform: none; }
}

.cnt-card__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--fs-h3);
  line-height: 1.15;
  letter-spacing: -0.012em;
  margin: 0.7rem 0 0;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cnt-card__title a { color: inherit; text-decoration: none; }
/* whole-card hit area WITHOUT wrapping the card in one giant anchor (a11y:
   a screen reader would otherwise read the entire card as a single link) */
.cnt-card__title a::after { content: ""; position: absolute; inset: 0; }

.cnt-card__dek {
  font-family: var(--sans);
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--ink-muted);
  margin: 0.6rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cnt-card__foot {
  margin-top: auto;                 /* keep the meta baseline even across a row */
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.cnt-card__dek + .cnt-card__foot { margin-top: clamp(1.3rem, 2.5vw, 1.8rem); }
.cnt-card__foot time { font-family: var(--sans); font-size: var(--fs-xs); color: var(--ink-faint); }
.cnt-card__foot .msym {
  color: var(--ink-faint);
  font-size: 1.15rem;
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.cnt-card > article:hover .cnt-card__foot .msym { color: var(--accent); transform: translate(2px, -2px); }

/* the sanctioned 120ms filter fade (mirrors the Transações deal wall) */
.cnt-card.is-leaving,
.cnt-card.is-entering { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .cnt-card { transition: none; }
  .cnt-card > article:hover .cnt-card__foot .msym { transform: none; }
}

/* switcher summary must match the nav links over the light hero (added 2026-07-07) */
.site-header:not(.site-header--solid) .lang-switch > summary { color: var(--ink-muted); }
.site-header:not(.site-header--solid) .lang-switch > summary:hover,
.site-header:not(.site-header--solid) .lang-switch[open] > summary { color: var(--ink); }

/* editoria with no post yet (Imprensa launches empty): one quiet line where
   the grid would be, same measure as a card dek */
.cnt-empty {
  margin: 0; padding: clamp(2rem, 4vw, 3rem) 0 0;
  font-size: var(--fs-body); line-height: 1.6; color: var(--ink-muted); max-width: 52ch;
}
.cnt-empty a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
