/* =========================================================
   FX Studio AI — Newsletter / Insights
   Folha de estilo compartilhada pelo índice e pelas páginas
   de artigo (landing/insights.html e landing/insights/*.html).
   ========================================================= */

:root {
  --bg: #091019;
  --bg-soft: #0d1622;
  --panel: rgba(255, 255, 255, 0.05);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(160, 168, 181, 0.18);
  --text: #f4f8fd;
  --muted: #dbe3ee;
  --muted-soft: #c1ccda;
  --accent: #91b0da;
  --accent-strong: #5b86c2;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --radius: 28px;
  --font-display: 'Sora', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top right, rgba(91, 134, 194, 0.14), transparent 22%),
    linear-gradient(180deg, #0b121c 0%, #091019 48%, #070d15 100%);
}

a { color: inherit; }
img { max-width: 100%; }

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 72px;
}

.reading-shell {
  width: min(760px, calc(100% - 32px));
}

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.brand-link,
.back-link,
.cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .03em;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.brand-link,
.back-link {
  border: 1px solid rgba(145, 176, 218, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.cta-link {
  background: linear-gradient(135deg, var(--accent-strong), #7ca4da);
  color: #08111d;
  box-shadow: 0 16px 30px rgba(91, 134, 194, 0.24);
}

.brand-link:hover,
.back-link:hover,
.cta-link:hover,
.post-card:hover,
.newsletter-panel:hover {
  transform: translateY(-1px);
}

.brand-link:focus-visible,
.back-link:focus-visible,
.cta-link:focus-visible,
.post-card:focus-visible,
.newsletter-panel a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Eyebrows / meta ---------- */
.eyebrow,
.article-meta,
.list-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ---------- Photo treatment (dark tint to match theme) ---------- */
.ph {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0d1828, #0a1320);
}

.ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.84) saturate(0.92) contrast(1.02);
}

.ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 16, 25, 0.18), rgba(9, 16, 25, 0.60));
  pointer-events: none;
}

/* =========================================================
   ÍNDICE
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 38px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, rgba(13, 22, 34, 0.98), rgba(8, 14, 22, 1));
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(145, 176, 218, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(246, 248, 251, 0.06), transparent 18%);
  pointer-events: none;
}

.hero h1 {
  margin-top: 12px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.04;
  max-width: 14ch;
}

.hero-copy {
  max-width: 72ch;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.pillars span {
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(145, 176, 218, 0.24);
  background: rgba(91, 134, 194, 0.12);
  color: #afc8ec;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.section {
  margin-top: 28px;
  padding: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: var(--shadow);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-head p {
  max-width: 60ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

/* Post grid (cards with photo) */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.post-card {
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  text-decoration: none;
  border: 1px solid rgba(160, 168, 181, 0.14);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.post-card:hover {
  border-color: rgba(145, 176, 218, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

.post-thumb {
  aspect-ratio: 16 / 10;
}

.post-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 20px 22px 22px;
}

.post-body h3 {
  margin-top: 10px;
  font-size: 21px;
  line-height: 1.24;
}

.post-body p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

.post-body .read-more {
  display: inline-flex;
  margin-top: 16px;
  color: #afc8ec;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* =========================================================
   PÁGINA DE ARTIGO
   ========================================================= */
.article-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(320px, 46vw, 460px);
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.82) saturate(0.95) contrast(1.03);
}

.article-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 13, 21, 0.10) 0%, rgba(7, 13, 21, 0.22) 42%, rgba(7, 13, 21, 0.55) 66%, rgba(7, 13, 21, 0.90) 100%);
  pointer-events: none;
}

.article-hero__inner {
  position: relative;
  z-index: 2;
  padding: clamp(24px, 4vw, 40px);
  width: 100%;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), 0 2px 22px rgba(0, 0, 0, 0.65);
}

.article-hero h1 {
  color: #ffffff;
}

.article-dek {
  color: #f3f7fc;
}

.article-hero h1 {
  margin-top: 12px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.06;
  max-width: 20ch;
}

.article-dek {
  margin: 16px 0 0;
  max-width: 60ch;
  color: #f3f7fc;
  font-weight: 500;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.6;
}

/* Long-form reading column */
.prose {
  margin: 36px auto 0;
}

.prose > * + * { margin-top: 20px; }

.prose p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.prose .lead {
  color: var(--text);
  font-size: 21px;
  line-height: 1.7;
}

.prose h2 {
  margin-top: 38px;
  font-size: clamp(23px, 3.2vw, 30px);
  line-height: 1.2;
  color: #eaf1fb;
}

.prose h3 {
  margin-top: 34px;
  font-size: clamp(20px, 2.6vw, 24px);
  line-height: 1.28;
  color: #dbe5f5;
}

.prose ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 17px;
}

.prose li + li { margin-top: 8px; }

.prose figure {
  margin: 32px 0 0;
}

.prose figure .ph {
  border-radius: 20px;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
}

.prose figcaption {
  margin-top: 10px;
  color: var(--muted-soft);
  font-size: 13px;
  line-height: 1.6;
  font-family: var(--font-mono);
  letter-spacing: .02em;
}

.pullquote {
  margin: 34px 0 0;
  padding: 22px 26px;
  border-left: 3px solid var(--accent);
  background: rgba(91, 134, 194, 0.10);
  border-radius: 0 16px 16px 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 26px);
  line-height: 1.35;
  color: #eaf1fb;
}

/* Key points callout */
.keypoints {
  margin: 40px 0 0;
  padding: 26px 28px;
  border-radius: 22px;
  border: 1px solid rgba(145, 176, 218, 0.24);
  background: linear-gradient(180deg, rgba(91, 134, 194, 0.12), rgba(255, 255, 255, 0.04));
}

.keypoints ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 16px;
}

.keypoints li + li { margin-top: 9px; }

/* "Leia também" */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* =========================================================
   Newsletter + rodapé (compartilhado)
   ========================================================= */
.newsletter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 28px;
  border-radius: 26px;
  border: 1px solid rgba(145, 176, 218, 0.24);
  background: linear-gradient(180deg, rgba(91, 134, 194, 0.12), rgba(255, 255, 255, 0.04));
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.newsletter-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.72;
  max-width: 60ch;
}

.newsletter-panel ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.newsletter-panel li + li { margin-top: 8px; }

.newsletter-panel .cta-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  min-width: 240px;
}

.newsletter-panel .cta-stack small {
  color: var(--muted-soft);
  text-align: center;
  line-height: 1.5;
}

.footer-note {
  margin-top: 18px;
  color: var(--muted-soft);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width: 980px) {
  .post-grid,
  .related-grid,
  .newsletter-panel {
    grid-template-columns: 1fr;
  }

  .post-grid { gap: 16px; }

  .newsletter-panel .cta-stack { min-width: 0; }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 24px, 1180px);
    padding: 16px 0 56px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .hero,
  .section,
  .newsletter-panel {
    padding: 24px;
    border-radius: 24px;
  }

  .hero-copy,
  .section-head p {
    font-size: 16px;
  }

  .prose p { font-size: 17px; }
  .prose .lead { font-size: 19px; }
}

/* =========================================================
   Movimento reduzido (acessibilidade)
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .brand-link,
  .back-link,
  .cta-link,
  .post-card,
  .newsletter-panel {
    transition: none;
  }

  .brand-link:hover,
  .back-link:hover,
  .cta-link:hover,
  .post-card:hover,
  .newsletter-panel:hover {
    transform: none;
  }
}
