/* Jornal do Eleitor — leitor digital do informativo impresso.
   Mesma linguagem do estúdio de avatar: fundo azul em degradê, superfícies
   translúcidas, amarelo só como destaque. O flipbook (StPageFlip) desenha o
   jornal; este CSS cuida do palco em volta. */

@font-face {
  font-family: 'Effra';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Effra_Trial_Bd.ttf') format('truetype');
}
@font-face {
  font-family: 'Effra';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/Effra_Trial_XBd.ttf') format('truetype');
}

:root {
  --jn-navy: #003281;
  --jn-ink: #001f54;
  --jn-yellow: #FFCB20;
  --jn-white: #FFFFFF;
  --jn-green: #008F65;
  --jn-red: #EA1D36;

  --jn-muted: rgba(255, 255, 255, 0.66);
  --jn-line: rgba(255, 255, 255, 0.14);
  --jn-surface: rgba(255, 255, 255, 0.055);

  --jn-r-md: 14px;
  --jn-r-sm: 10px;
  --jn-r-pill: 999px;

  --jn-font-display: 'Effra', 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --jn-font-body: 'Roboto', 'Segoe UI', system-ui, sans-serif;
  --jn-pad: 20px;
  --jn-max: 1040px;
}

@media (min-width: 768px) {
  :root { --jn-pad: 40px; }
}

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

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--jn-font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--jn-white);
  background: var(--jn-ink);
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--jn-yellow); text-decoration: none; }
a:hover { filter: brightness(1.08); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--jn-yellow);
  outline-offset: 3px;
  border-radius: var(--jn-r-sm);
}

[hidden] { display: none !important; }

.jn-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.jn-page__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 82% -5%, rgba(255, 203, 32, 0.2), transparent 60%),
    radial-gradient(ellipse 50% 40% at 8% 105%, rgba(0, 143, 101, 0.16), transparent 55%),
    linear-gradient(168deg, #00398f 0%, #002a6d 48%, #001b49 100%);
}

.jn-watermark {
  position: absolute;
  right: -3%;
  bottom: 4%;
  font-family: var(--jn-font-display);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(120px, 24vw, 260px);
  line-height: 0.8;
  color: var(--jn-yellow);
  opacity: 0.055;
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
}

/* --- Cabeçalho ----------------------------------------------------------- */
.jn-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: var(--jn-max);
  margin: 0 auto;
  padding: 18px var(--jn-pad);
}

.jn-brand { display: block; }

.jn-brand__logo {
  width: auto;
  height: 44px;
  object-fit: contain;
  object-position: left center;
}

@media (min-width: 768px) {
  .jn-brand__logo { height: 54px; }
}

.jn-back {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: var(--jn-r-pill);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--jn-line);
  background: var(--jn-surface);
  font-family: var(--jn-font-body);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.jn-back:hover {
  border-color: rgba(255, 203, 32, 0.6);
  color: var(--jn-yellow);
  background: rgba(255, 203, 32, 0.1);
}

/* --- Corpo --------------------------------------------------------------- */
.jn-main {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;
  max-width: var(--jn-max);
  margin: 0 auto;
  padding: 12px var(--jn-pad) 48px;
}

.jn-intro {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 26px;
}

.jn-eyebrow {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--jn-navy);
  background: var(--jn-yellow);
  padding: 7px 14px;
  margin-bottom: 16px;
}

.jn-title {
  margin: 0 0 12px;
  font-family: var(--jn-font-display);
  font-weight: 800;
  font-size: clamp(30px, 6vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.jn-title span { color: var(--jn-yellow); }

.jn-lead {
  margin: 0;
  font-size: 15.5px;
  color: var(--jn-muted);
}

/* --- Flipbook ------------------------------------------------------------ */
.jn-book-wrap {
  max-width: 900px;
  margin: 0 auto;
}

/* Janela do zoom: o transform de pinça/toque duplo é aplicado no .jn-book e
   o que passar do quadro é cortado aqui. touch-action pan-y desliga a pinça
   nativa do navegador SOBRE o jornal (nosso JS assume o gesto), mas mantém a
   rolagem vertical da página com um dedo. */
.jn-zoom {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}

.jn-book { transform-origin: 0 0; }

/* O StPageFlip cria a própria árvore (.stf__parent) dentro deste nó. */
.jn-book .stf__parent { margin: 0 auto; }

.jn-book__page {
  overflow: hidden;
  background: #FFFFFF;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.25);
}
.jn-book__page img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

/* Fallback sem biblioteca: as páginas empilhadas, uma embaixo da outra. */
.jn-book--fallback {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 640px;
  margin: 0 auto;
}
.jn-book--fallback img {
  width: 100%;
  border-radius: var(--jn-r-sm);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

/* --- Navegação ----------------------------------------------------------- */
.jn-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
}

.jn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--jn-r-pill);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--jn-font-body);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--jn-line);
  background: var(--jn-surface);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.jn-btn:hover {
  border-color: rgba(255, 203, 32, 0.6);
  color: var(--jn-yellow);
  background: rgba(255, 203, 32, 0.1);
}
.jn-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.jn-count {
  min-width: 130px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--jn-muted);
  font-variant-numeric: tabular-nums;
}

.jn-hint {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.45);
}

@media (min-width: 768px) {
  .jn-hint { display: none; } /* a dica de arrastar é coisa de celular */
}

.jn-download {
  margin: 18px 0 0;
  text-align: center;
}

.jn-download__peso {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 4px;
}

/* --- Rodapé -------------------------------------------------------------- */
.jn-foot {
  position: relative;
  z-index: 2;
  padding: 26px var(--jn-pad) 34px;
  text-align: center;
}

.jn-rs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 132px;
  margin: 0 auto 16px;
}
.jn-rs span {
  display: block;
  height: 3px;
  border-radius: var(--jn-r-pill);
  background: linear-gradient(90deg, transparent, currentColor, transparent);
}
.jn-rs span:nth-child(1) { color: var(--jn-green); }
.jn-rs span:nth-child(2) { color: var(--jn-yellow); }
.jn-rs span:nth-child(3) { color: var(--jn-red); }

.jn-footer-note {
  margin: 0;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.4);
}
