/* ================================================================
   REVISTA PEN — MOVIMENTO GRITA!
   Design executivo premium — versão refatorada
================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --navy:   #12213a;
  --navy2:  #1e3254;
  --green:  #00955c;
  --green2: #00b870;
  --gold:   #c8a84b;
  --red:    #e74c3c;
  --orange: #e67e22;
  --ink:    #1a1a2e;
  --muted:  #5a6476;
  --rule:   #d8dee8;
  --bg:     #f7f8fb;
  --white:  #ffffff;
  --page-w: 210mm;
  --page-h: 297mm;
}

/* ── Reset & base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  background: #e8ebf0;
  color: var(--ink);
  font-size: 9.5pt;
  line-height: 1.55;
}

/* ── Page shell ─────────────────────────────────────────── */
.page {
  width: var(--page-w);
  min-height: var(--page-h);
  background: var(--white);
  margin: 24px auto;
  padding: 2.2cm 2.4cm;
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Running footer ─────────────────────────────────────── */
.page-foot {
  margin-top: auto;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 7.5pt;
  color: var(--muted);
  letter-spacing: .03em;
}
.page-foot .org { font-weight: 600; color: var(--navy); }

/* ── ================================================ COVER */
.cover {
  background: var(--navy);
  color: var(--white);
  padding: 0;
  justify-content: flex-end;
}
.cover-top-band {
  position: absolute; top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--green) 0%, var(--gold) 100%);
}
.cover-body {
  padding: 2.8cm 2.8cm 3.2cm;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.cover-logo {
  position: absolute; top: 2cm; right: 2.6cm;
  opacity: .9;
}
.cover-logo img { height: 54px; filter: brightness(0) invert(1); }

.cover-eyebrow {
  font-size: 8pt; font-weight: 600; letter-spacing: .18em;
  color: var(--green2); text-transform: uppercase; margin-bottom: 1.6rem;
}
.cover-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 52pt; font-weight: 900; line-height: .92;
  color: var(--white); margin-bottom: 2rem;
}
.cover-title span { color: var(--green2); display: block; }
.cover-rule { width: 60px; height: 3px; background: var(--gold); margin-bottom: 1.8rem; }
.cover-sub {
  font-size: 12pt; font-weight: 300; line-height: 1.45;
  color: rgba(255,255,255,.75); max-width: 380px; margin-bottom: 2.8rem;
}
.cover-meta {
  display: flex; gap: 2rem; align-items: center;
  font-size: 8pt; color: rgba(255,255,255,.5); letter-spacing: .04em;
}
.cover-meta strong { color: var(--white); font-weight: 600; }
.cover-accent-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 8px;
  background: linear-gradient(180deg, var(--green) 0%, var(--navy2) 100%);
}

/* ── ============================================== SECTION OPENER */
.section-opener {
  background: var(--navy2);
  color: var(--white);
  padding: 2.8cm 2.8cm;
  justify-content: center;
  gap: 1.2rem;
}
.section-opener .letter {
  font-family: 'Playfair Display', serif;
  font-size: 72pt; font-weight: 900; color: rgba(255,255,255,.08);
  line-height: 1; margin-bottom: -.4rem;
}
.section-opener .pillar-label {
  font-size: 7.5pt; font-weight: 700; letter-spacing: .2em;
  color: var(--green2); text-transform: uppercase; margin-bottom: .6rem;
}
.section-opener h2 {
  font-family: 'Playfair Display', serif;
  font-size: 26pt; font-weight: 700; color: var(--white);
  line-height: 1.15; margin-bottom: 1.2rem;
}
.section-opener .opener-desc {
  font-size: 10pt; line-height: 1.6; color: rgba(255,255,255,.72);
  max-width: 480px; font-weight: 300;
}

.pillar-letter {
  position: absolute;
  top: 1cm;
  right: 1.5cm;
  font-family: 'Playfair Display', serif;
  font-size: 120pt;
  font-weight: 900;
  color: rgba(0, 149, 92, 0.05);
  line-height: 1;
  z-index: 0;
  pointer-events: none;
}

/* ── ============================================== CONTENT PAGES */
.page-label {
  font-size: 7pt; font-weight: 700; letter-spacing: .18em;
  color: var(--muted); text-transform: uppercase;
  border-bottom: 2px solid var(--green);
  display: inline-block; padding-bottom: 3px; margin-bottom: 1.6rem;
}
h2.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 20pt; font-weight: 700; color: var(--navy);
  line-height: 1.2; margin-bottom: 1.2rem;
}
h3.sub-title {
  font-size: 10.5pt; font-weight: 700; color: var(--navy);
  margin-bottom: .5rem;
}
p { margin-bottom: .8rem; }
p.lead {
  font-size: 11.5pt; font-weight: 300; line-height: 1.6;
  color: var(--muted); margin-bottom: 1.4rem;
}

/* ── Directives ─────────────────────────────────────────── */
.directives { display: flex; flex-direction: column; gap: .8rem; margin-top: 1rem; }
.dir-item {
  display: grid; grid-template-columns: 36px 1fr;
  gap: 0 1rem; align-items: start;
  padding: .9rem 1rem .9rem .8rem;
  background: var(--bg); border-radius: 6px;
  border-left: 3px solid var(--green);
}
.dir-code {
  font-size: 7.5pt; font-weight: 700; color: var(--green);
  background: var(--white); border-radius: 4px;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule); margin-top: 1px;
}
.dir-text h4 { font-size: 9pt; font-weight: 700; color: var(--navy); margin-bottom: .3rem; }
.dir-text p  { font-size: 8.5pt; line-height: 1.5; margin: 0; color: #3a4050; }
.dir-text ul { font-size: 8.5pt; line-height: 1.6; margin: .3rem 0 0 1rem; color: #3a4050; }

/* ── Pillars summary ────────────────────────────────────── */
.pillars-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1rem;
}
.pillar-chip {
  background: var(--bg); border-radius: 6px; padding: .7rem 1rem;
  display: flex; align-items: center; gap: .8rem;
  border: 1px solid var(--rule);
}
.pillar-chip .ltr {
  background: var(--navy); color: var(--white);
  font-size: 8.5pt; font-weight: 700; border-radius: 4px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pillar-chip span { font-size: 8.5pt; font-weight: 500; color: var(--ink); }

/* ── Indicators table ───────────────────────────────────── */
.indicators-table { width: 100%; border-collapse: collapse; font-size: 8pt; margin-top: 1rem; }
.indicators-table thead th {
  background: var(--navy); color: var(--white);
  padding: .55rem .7rem; text-align: left;
  font-size: 7.5pt; font-weight: 600; letter-spacing: .03em;
}
.indicators-table tbody tr:nth-child(even) { background: var(--bg); }
.indicators-table tbody td { padding: .5rem .7rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.indicators-table .num-cell { font-weight: 700; color: var(--navy); white-space: nowrap; }
.indicators-table .pos-cell { font-weight: 600; color: #c0392b; }
.indicators-table .meta-cell { color: var(--green); font-weight: 600; }

/* ── Quote / highlight ──────────────────────────────────── */
.pullquote {
  border-left: 4px solid var(--gold);
  padding: 1.2rem 1.4rem; background: #fffbf0;
  border-radius: 0 6px 6px 0; margin: 1.2rem 0;
}
.pullquote p {
  font-family: 'Playfair Display', serif;
  font-size: 11.5pt; font-style: italic; line-height: 1.5;
  color: var(--navy); margin: 0;
}

/* ── Stat pills ─────────────────────────────────────────── */
.stat-row { display: flex; gap: 1rem; margin: 1.2rem 0; }
.stat-pill {
  flex: 1; background: var(--bg); border-radius: 8px; padding: 1rem;
  text-align: center; border: 1px solid var(--rule);
}
.stat-pill .num {
  font-family: 'Playfair Display', serif;
  font-size: 26pt; font-weight: 900; line-height: 1;
}
.stat-pill .num.green { color: var(--green); }
.stat-pill .num.navy { color: var(--navy); }
.stat-pill .label { font-size: 7.5pt; color: var(--muted); font-weight: 600; letter-spacing: .04em; margin-top: .3rem; }

/* ── Print ──────────────────────────────────────────────── */
@page { size: A4; margin: 0; }
@media print {
  body { background: none; }
  .page { margin: 0; box-shadow: none; page-break-after: always; min-height: 100vh; }
}

/* ── Circular Diagram (Loyola) ──────────────────────────── */
.loyola-container {
  display: flex; justify-content: center; align-items: center;
  margin: 2rem 0 2.5rem;
}
.circle-diagram {
  position: relative; width: 340px; height: 340px;
  border-radius: 50%; border: 2px dashed #e74c3c;
}
.circle-diagram.virtuoso { border-color: var(--green); }

.circle-item {
  position: absolute; top: 50%; left: 50%; width: 130px;
  transform: translate(-50%, -50%) rotate(var(--angle)) translate(170px) rotate(calc(var(--angle) * -1));
  z-index: 2;
}
.circle-content {
  background: var(--white); border: 2px solid #e74c3c; color: #c0392b;
  padding: 0.5rem; border-radius: 8px; font-size: 7pt; text-align: center;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.15); font-weight: 600; line-height: 1.25;
}
.circle-diagram.virtuoso .circle-content {
  border-color: var(--green); color: var(--green); box-shadow: 0 4px 12px rgba(0, 184, 112, 0.15);
}

.circle-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 100px; height: 100px; background: #e74c3c; color: var(--white);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  text-align: center; font-weight: 800; font-size: 8pt; line-height: 1.2;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3); z-index: 1;
}
.circle-diagram.virtuoso .circle-center {
  background: var(--green); box-shadow: 0 4px 12px rgba(0, 184, 112, 0.3);
}

/* ── Charts (Gráficos Reconstruídos) ───────────────────────── */
.scatter-chart-container {
  margin: 1.5rem 0 2.5rem; text-align: center;
}
.scatter-title { font-weight: 800; font-size: 11pt; color: var(--navy); margin-bottom: 0.1rem; }
.scatter-subtitle { font-size: 7.5pt; color: var(--gold); font-weight: 600; margin-bottom: 1.5rem; }

.scatter-chart {
  position: relative; width: 90%; height: 260px; margin: 0 auto;
  border-left: 1.5px solid #ccc; border-bottom: 1.5px solid #ccc;
  background-image: linear-gradient(rgba(200,200,200,0.3) 1px, transparent 1px), linear-gradient(90deg, rgba(200,200,200,0.3) 1px, transparent 1px);
  background-size: 10% 16.6666%; /* 10 cols, 6 rows */
}
.scatter-point {
  position: absolute; width: 6px; height: 6px; background: var(--navy);
  border-radius: 50%; transform: translate(-50%, 50%); z-index: 2;
}
.scatter-point.highlight { background: var(--red); box-shadow: 0 0 0 3px rgba(231,76,60,0.2); }
.scatter-label {
  position: absolute; font-size: 7pt; font-weight: 600; color: #444;
  transform: translate(6px, 1px); white-space: nowrap; z-index: 3;
}
.scatter-label.highlight-label { color: var(--red); font-weight: 800; text-decoration: underline 3px var(--red); text-underline-offset: 3px; }

.y-axis-labels { position: absolute; left: -35px; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: space-between; font-size: 6.5pt; color: #777; padding-bottom: 0; transform: translateY(3px); }
.x-axis-labels { position: absolute; bottom: -20px; left: 0; right: 0; display: flex; justify-content: space-between; font-size: 6.5pt; color: #777; transform: translateX(-5%); width: 110%; }
.y-axis-title { position: absolute; left: -60px; top: 50%; transform: translateY(-50%) rotate(-90deg); font-size: 7pt; font-weight: 600; color: #555; }
.x-axis-title { position: absolute; bottom: -40px; left: 50%; transform: translateX(-50%); font-size: 7pt; font-weight: 600; color: #555; }

.scatter-trend {
  position: absolute; bottom: 20%; left: 14%; width: 75%; height: 1px;
  background: repeating-linear-gradient(90deg, #3498db, #3498db 4px, transparent 4px, transparent 8px);
  transform: rotate(-3.5deg); transform-origin: left bottom; z-index: 1; opacity: 0.7;
}

.bar-chart-container {
  background: var(--navy); padding: 1.5rem 2rem 2rem; border-radius: 8px; margin: 2rem 0;
}
.bar-chart-title { text-align: center; color: white; font-weight: 800; font-size: 13pt; margin-bottom: 0.1rem; letter-spacing: 0.5px; }
.bar-chart-subtitle { text-align: center; color: rgba(255,255,255,0.7); font-size: 7.5pt; font-weight: 500; margin-bottom: 2rem; }
.bar-row { display: flex; align-items: center; margin-bottom: 1rem; }
.bar-label { width: 180px; font-size: 7.5pt; font-weight: 600; color: rgba(255,255,255,0.9); }
.bar-track-wrapper { flex: 1; }
.bar-track { height: 18px; display: flex; position: relative; }
.bar-fill-green { background: #27ae60; height: 100%; position: relative; }
.bar-fill-orange { background: #d35400; height: 100%; flex: 1; }
.bar-value { position: absolute; right: 0; top: 50%; transform: translate(50%, -50%); font-size: 8pt; font-weight: 700; color: white; padding: 1px 0; border-left: 2px solid rgba(255,255,255,0.8); border-right: 2px solid rgba(255,255,255,0.8); z-index: 2; line-height: 1; text-align: center; }
.bar-total { position: absolute; right: -25px; top: 50%; transform: translateY(-50%); font-size: 7.5pt; color: rgba(255,255,255,0.8); }


