/* ==========================================================================
   IEDI — mockup r1
   Cores e tipografia conforme o "Brand manual IEDI final.pdf".
   Títulos: Jost (substituta da Futura BT). Texto: Helvetica (auxiliar do manual).
   ========================================================================== */

:root {
  /* Marca */
  --teal: #1087a1;          /* cor institucional — Pantone 7712C */
  --teal-dark: #0b6379;     /* links e textos sobre fundo claro */
  --teal-deep: #083f4e;
  --gray: #939598;          /* apoio do manual (uso decorativo) */
  --orange: #f7941d;        /* apoio do manual */
  --green: #0fa998;         /* apoio do manual */
  --pale: #d0dde5;          /* faixa clara do manual */

  /* Interface */
  --ink: #172126;
  --text: #2b353b;
  --muted: #5e696f;
  --line: #d5dce0;
  --surface: #ffffff;
  --surface-alt: #eef3f6;

  /* Etiquetas por tipo de conteúdo */
  --k-carta: var(--teal-dark);
  --k-analise: #0a7d70;
  --k-estudo: #a85700;
  --k-destaque: #46525a;
  --k-imprensa: #5e696f;

  --font-display: "Jost", "Futura", "Century Gothic", "Trebuchet MS", sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --container: 1240px;
  --gutter: 24px;
  --gap: 32px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--teal-dark); }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

[hidden] { display: none !important; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 100;
  padding: 8px 14px; background: var(--ink); color: #fff;
}
.skip-link:focus { top: 8px; color: #fff; }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon--solid { fill: currentColor; stroke: none; }

/* --------------------------------------------------------------------------
   Barra utilitária
   -------------------------------------------------------------------------- */
.utility {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--muted);
}
.utility .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 36px;
}
.utility__name { display: none; }
.utility__links { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.utility__links a { display: inline-flex; align-items: center; min-height: 36px; }
.utility__social { display: flex; gap: 4px; }
.utility__social a { justify-content: center; width: 32px; }
.utility__social .icon { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   Cabeçalho
   -------------------------------------------------------------------------- */
.masthead {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.masthead .container {
  display: flex; align-items: center; gap: 16px;
  min-height: 72px;
}
/* O logotipo nunca é exibido abaixo de 1,5 cm (≈57 px), conforme o manual. */
.brand { display: block; flex: none; padding-block: 8px; }
.brand img { width: auto; height: 58px; }

.nav { display: none; }
.nav ul { display: flex; align-items: stretch; gap: 4px; }
.nav a {
  display: flex; align-items: center;
  padding: 0 12px; min-height: 88px;
  font-family: var(--font-display); font-weight: 500;
  font-size: 0.9375rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink);
  border-bottom: 3px solid transparent; border-top: 3px solid transparent;
}
.nav a:hover { color: var(--teal-dark); border-bottom-color: var(--pale); }
.nav a[aria-current="page"] { color: var(--teal-dark); border-bottom-color: var(--teal); }

.masthead__actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; height: 44px; padding: 0 10px;
  font-family: var(--font-display); font-weight: 500; font-size: 0.9375rem;
  color: var(--ink); border-radius: 2px;
}
.icon-btn:hover { background: var(--surface-alt); color: var(--teal-dark); }
.icon-btn__label { display: none; }

/* Busca */
.search-panel { background: var(--surface-alt); border-bottom: 1px solid var(--line); }
.search-panel form { display: flex; gap: 8px; padding-block: 16px; }
.search-panel input {
  flex: 1; min-width: 0; height: 48px; padding: 0 14px;
  border: 1px solid var(--gray); border-radius: 2px; background: #fff;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.9375rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--teal-dark); color: #fff; border-radius: 2px;
  white-space: nowrap;
}
.btn:hover { background: var(--teal-deep); color: #fff; }
.btn--light { background: #fff; color: var(--teal-deep); }
.btn--light:hover { background: var(--pale); color: var(--teal-deep); }

/* Menu lateral */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(23, 33, 38, 0.5);
}
.drawer {
  position: fixed; inset: 0 auto 0 0; z-index: 60;
  width: min(360px, 88vw); overflow-y: auto;
  background: var(--surface); box-shadow: 4px 0 24px rgba(23, 33, 38, 0.18);
  padding: 16px 20px 32px;
}
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.drawer__head img { height: 58px; width: auto; }
.drawer details, .drawer__link { border-bottom: 1px solid var(--line); }
.drawer summary, .drawer__link {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 52px; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 500; font-size: 1.0625rem;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink);
}
.drawer summary::-webkit-details-marker { display: none; }
.drawer summary::after {
  content: ""; width: 8px; height: 8px; margin-right: 6px;
  border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal);
  transform: rotate(45deg); transition: transform 0.15s;
}
.drawer details[open] summary::after { transform: rotate(-135deg); }
.drawer details ul { padding: 0 0 12px; }
.drawer details li a { display: block; padding: 8px 0 8px 12px; font-size: 0.9375rem; color: var(--text); }
.drawer details li a:hover { color: var(--teal-dark); }
.drawer__contact { margin-top: 24px; font-size: 0.9375rem; color: var(--muted); }
.drawer__contact a { color: var(--teal-dark); }

/* --------------------------------------------------------------------------
   Elementos editoriais
   -------------------------------------------------------------------------- */
.kicker {
  display: block; margin-bottom: 6px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.8125rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--k-imprensa);
}
.kicker--carta { color: var(--k-carta); }
.kicker--analise { color: var(--k-analise); }
.kicker--estudo { color: var(--k-estudo); }
.kicker--destaque { color: var(--k-destaque); }
.kicker--imprensa { color: var(--k-imprensa); }

.headline {
  font-family: var(--font-display); font-weight: 500;
  color: var(--ink); line-height: 1.18; letter-spacing: -0.005em;
  text-wrap: balance;
}
.headline a:hover { color: var(--teal-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.headline--xl { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem); font-weight: 600; line-height: 1.1; }
.headline--lg { font-size: 1.375rem; }
.headline--md { font-size: 1.1875rem; }
.headline--sm { font-size: 1.0625rem; line-height: 1.25; }

.deck { margin-top: 10px; color: var(--text); }
.meta { display: block; margin-top: 10px; font-size: 0.8125rem; color: var(--muted); }

.thumb { display: block; overflow: hidden; background: var(--surface-alt); }
.thumb img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.3s; }
a.thumb:hover img { transform: scale(1.03); }

.section { padding-block: 40px 8px; }
.section__head {
  position: relative;
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding-top: 14px; margin-bottom: 24px;
  border-top: 1px solid var(--ink);
}
.section__head::before {
  content: ""; position: absolute; top: -1px; left: 0;
  width: 56px; height: 4px; background: var(--teal);
}
.section__title {
  font-family: var(--font-display); font-weight: 600; font-size: 1.5rem;
  line-height: 1.2; color: var(--ink);
}
.section__more {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.8125rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-dark);
  white-space: nowrap;
}
.section__more:hover { text-decoration: underline; text-underline-offset: 3px; }
.section__more .icon { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   Home — bloco de manchete
   -------------------------------------------------------------------------- */
.lead { padding-top: 28px; }
.lead__grid { display: grid; gap: 28px; }
.lead__main { display: grid; gap: 18px; }
.lead__main .thumb { order: -1; }
.lead__main .thumb img { aspect-ratio: 3 / 2; }
.lead__main .deck { font-size: 1.0625rem; }
.lead__side { display: grid; gap: 24px; align-content: start; }
.lead__side .story { padding-top: 24px; border-top: 1px solid var(--line); }
.story--row { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: start; }
.story--row .thumb img { aspect-ratio: 1 / 1; }

/* Faixa de chamadas em texto */
.strip { display: grid; }
.strip .story { padding-block: 16px; border-top: 1px solid var(--line); }
.strip .story:first-child { border-top: 0; padding-top: 0; }

/* Grade de cartões */
.cards { display: grid; gap: 32px 24px; }
.card { display: flex; flex-direction: column; }
.card .thumb { margin-bottom: 14px; }
.card .deck { font-size: 0.9375rem; }

/* Duas colunas de listas */
.columns { display: grid; gap: 8px; }
.list .story { padding-block: 18px; border-top: 1px solid var(--line); }
.list .story:first-child { border-top: 0; padding-top: 0; }
.list .deck { font-size: 0.9375rem; }

/* Estudos */
.feature { display: grid; gap: 20px; padding-bottom: 28px; }
.feature .thumb img { aspect-ratio: 16 / 9; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.875rem; color: var(--text);
}
.chip:hover { border-color: var(--teal); color: var(--teal-dark); }

/* --------------------------------------------------------------------------
   Faixa de cadastro
   -------------------------------------------------------------------------- */
.newsletter { margin-top: 48px; background: var(--teal-dark); color: #fff; }
.newsletter .container { display: grid; gap: 24px; padding-block: 40px; }
.newsletter__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.15; color: #fff; }
.newsletter__text { margin-top: 8px; color: #e3eef2; max-width: 46ch; }
.newsletter form { display: grid; gap: 10px; align-content: center; }
.newsletter label { display: block; }
.newsletter input {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1px solid transparent; border-radius: 2px; background: #fff; color: var(--ink);
}
.newsletter input::placeholder { color: var(--muted); }
.newsletter :focus-visible { outline-color: #fff; }
.newsletter__msg { min-height: 1.4em; font-size: 0.875rem; color: #e3eef2; }

/* --------------------------------------------------------------------------
   Rodapé
   -------------------------------------------------------------------------- */
.footer { background: var(--surface-alt); border-top: 4px solid var(--teal); }
.footer .container { display: grid; gap: 32px; padding-block: 40px; }
.footer__brand img { height: 76px; width: auto; }
.footer__brand p { margin-top: 16px; font-size: 0.9375rem; color: var(--muted); max-width: 30ch; }
.footer h2 {
  margin-bottom: 12px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.875rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
}
.footer li a, .footer address a { display: inline-block; padding-block: 5px; font-size: 0.9375rem; }
.footer address { font-style: normal; font-size: 0.9375rem; line-height: 1.5; }
.footer__phone { font-family: var(--font-display); font-weight: 500; font-size: 1.375rem; color: var(--ink); }
.footer__social { display: flex; gap: 8px; margin-top: 16px; }
.footer__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--gray); border-radius: 50%; color: var(--ink);
}
.footer__social a:hover { border-color: var(--teal); color: var(--teal-dark); }
.footer__legal { border-top: 1px solid var(--line); }
.footer__legal .container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  padding-block: 16px; font-size: 0.8125rem; color: var(--muted);
}
.to-top { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--teal-dark); }

/* --------------------------------------------------------------------------
   Página de conteúdo (Carta IEDI)
   -------------------------------------------------------------------------- */
.breadcrumb { padding-top: 20px; font-size: 0.8125rem; color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--gray); }
.breadcrumb a { color: var(--teal-dark); }
.breadcrumb a:hover { text-decoration: underline; }

.article-head { padding-block: 20px 28px; border-bottom: 1px solid var(--line); }
.article-head .kicker { font-size: 0.875rem; margin-bottom: 12px; }
.article-head h1 {
  max-width: 22ch;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); line-height: 1.06; letter-spacing: -0.01em;
  color: var(--ink); text-wrap: balance;
}
.article-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  margin-top: 24px;
}
.article-bar__meta { font-size: 0.9375rem; color: var(--muted); }
.article-bar__meta strong { color: var(--ink); font-weight: 600; }
.share { display: flex; align-items: center; gap: 8px; }
.share__label { font-size: 0.8125rem; color: var(--muted); margin-right: 4px; }
.share a, .share button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 2px; color: var(--ink);
  font-family: var(--font-display); font-weight: 500; font-size: 0.875rem;
}
.share a:hover, .share button:hover { border-color: var(--teal); color: var(--teal-dark); }

.article-layout { display: grid; gap: 40px; padding-block: 32px 72px; }
.article { min-width: 0; }

.summary {
  padding: 24px 24px 8px;
  background: var(--surface-alt);
  border-left: 4px solid var(--teal);
}
.summary .summary__title {
  margin: 0 0 14px; padding: 0; border: 0;
  font-family: var(--font-display); font-weight: 600; font-size: 0.875rem; line-height: 1.4;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal-dark);
}
.summary p { margin-bottom: 16px; font-size: 1.0625rem; line-height: 1.6; color: var(--ink); }

.prose { max-width: 720px; font-size: 1.0625rem; line-height: 1.7; }
.prose > p { margin-top: 1.15em; }
.prose h2 {
  margin-top: 2.2em; padding-top: 18px;
  border-top: 1px solid var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: 1.75rem; line-height: 1.15;
  color: var(--ink);
}
.prose h2 + p { margin-top: 0.8em; }
.prose a { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 2px; }
.figure { margin-block: 28px; padding: 12px; border: 1px solid var(--line); background: #fff; }
.figure a { display: block; }
.figure img { width: 100%; }
.figure figcaption { margin-top: 10px; font-size: 0.8125rem; color: var(--muted); }

.sidebar { display: grid; gap: 32px; align-content: start; }
.sidebar__title {
  padding-top: 12px; margin-bottom: 12px;
  border-top: 1px solid var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; color: var(--ink);
}
.toc li a {
  display: block; padding: 9px 0 9px 14px;
  border-left: 2px solid var(--line);
  font-size: 0.9375rem; color: var(--text);
}
.toc li a:hover { color: var(--teal-dark); }
.toc li a.is-active { border-left-color: var(--teal); color: var(--teal-dark); font-weight: 600; }
.related .story { padding-block: 14px; border-top: 1px solid var(--line); }
.related .story:first-child { border-top: 0; padding-top: 4px; }

/* --------------------------------------------------------------------------
   Breakpoints: 640 (tablet), 1024 (desktop), 1100 (navegação em linha)
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
  .utility__name { display: block; }
  .brand img, .drawer__head img { height: 64px; }
  .icon-btn__label { display: inline; }

  .lead__main { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; align-items: start; }
  .lead__main .thumb { order: 0; }
  .lead__side { grid-template-columns: 1fr 1fr; gap: 28px; }
  .strip { grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .strip .story:nth-child(2) { border-top: 0; padding-top: 0; }
  .cards { grid-template-columns: 1fr 1fr; }
  .columns { grid-template-columns: 1fr 1fr; gap: 0 48px; }
  .feature { grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
  .newsletter form { grid-template-columns: 1fr 1fr; }
  .newsletter form .btn, .newsletter__msg { grid-column: 1 / -1; }
  .footer .container { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .masthead .container { min-height: 88px; gap: 28px; }
  .brand img { height: 68px; }

  .lead { padding-top: 36px; }
  .lead__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 0; }
  .lead__main { padding-right: 32px; }
  .lead__main .thumb img { aspect-ratio: 4 / 3; }
  .lead__side { grid-template-columns: 1fr; gap: 24px; padding-left: 32px; border-left: 1px solid var(--line); }
  .lead__side .story:first-child { padding-top: 0; border-top: 0; }

  .strip { grid-template-columns: repeat(4, 1fr); column-gap: 0; }
  .strip .story { padding: 0 24px; border-top: 0; border-left: 1px solid var(--line); }
  .strip .story:first-child { padding-left: 0; border-left: 0; }
  .strip .story:last-child { padding-right: 0; }

  .cards { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .columns { gap: 0 64px; }
  .columns > * + * { position: relative; }
  .columns > * + *::before { content: ""; position: absolute; top: 0; bottom: 0; left: -32px; border-left: 1px solid var(--line); }
  .feature { grid-template-columns: 1.1fr 1fr; gap: 40px; }
  .cards--3 { grid-template-columns: repeat(3, 1fr); }

  .newsletter .container { grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; padding-block: 48px; }
  .footer .container { grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; padding-block: 48px; }

  .article-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; }
  .sidebar { position: sticky; top: 112px; max-height: calc(100vh - 128px); overflow-y: auto; }
}

/* A navegação em linha só aparece quando cabe inteira; antes disso, fica no menu lateral. */
@media (min-width: 1100px) {
  .nav { display: block; }
  .icon-btn__label { display: none; }
}

@media (min-width: 1280px) {
  .icon-btn__label { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .utility, .masthead, .search-panel, .drawer, .drawer-backdrop, .breadcrumb,
  .share, .sidebar, .newsletter, .footer, .skip-link { display: none !important; }
  body { font-size: 11pt; }
  .article-layout { display: block; padding-top: 16px; }
  .prose { max-width: none; }
  .figure { break-inside: avoid; border: 0; padding: 0; }
  .summary { border-left: 2pt solid #000; background: none; }
}
