:root {
  --azul: #0e4a8a;
  --azul-escuro: #0a3268;
  --azul-vivo: #1a6fbf;
  --ouro: #e0b03a;
  --ouro-escuro: #a67c12;
  --creme: #fbf6ea;
  --tinta: #10243f;
  --ceu: #e7f2fb;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Source Serif 4", Georgia, serif;
  color: var(--tinta);
  background: linear-gradient(180deg, #eef5fb 0%, var(--creme) 100%);
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.topo {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #fff;
  border-bottom: 2px solid var(--ouro);
  box-shadow: 0 8px 24px rgba(10, 50, 104, .08);
}
.marca {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 4px;
}
.logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
}
.marca-kicker {
  margin: 0;
  font-family: Montserrat, sans-serif;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--azul);
}
.marca h1 {
  margin: 0;
  font-family: Montserrat, sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--azul-escuro);
  line-height: 1.1;
}

nav {
  display: flex;
  gap: 6px;
  padding: 6px 10px 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
nav::-webkit-scrollbar { display: none; }
nav button {
  flex: 0 0 auto;
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--azul);
  background: var(--ceu);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}
nav button[aria-current="true"] {
  background: var(--ouro);
  color: var(--azul-escuro);
}

#album {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}
.trilho {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform .38s cubic-bezier(.22, .8, .28, 1);
  will-change: transform;
}
.trilho.arrastando { transition: none; }
.folha {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  padding: 12px 14px 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.capa, .texto {
  justify-content: safe center;
  gap: 12px;
  overflow-y: auto;
}
.capa {
  justify-content: flex-start;
  gap: 8px;
}
.capa .manchete {
  font-size: clamp(22px, 6.4vw, 32px);
}
.capa .lead {
  font-size: 15px;
  line-height: 1.4;
  max-width: none;
}
.mosaico {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 0 0 auto;
}
.tile {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: #d7e6f4;
  aspect-ratio: 4 / 3;
  box-shadow: 0 10px 22px rgba(10, 50, 104, .14);
}
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tile span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 10px 7px;
  background: linear-gradient(transparent, rgba(10, 50, 104, .88));
  color: #fff;
  font-family: Montserrat, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: left;
}
.kicker {
  margin: 0;
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ouro-escuro);
}
.manchete {
  font-family: Montserrat, sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 8vw, 36px);
  color: var(--azul-escuro);
  margin: 0;
  line-height: 1.08;
}
.lead, .texto p {
  font-size: 17px;
  line-height: 1.45;
  margin: 0;
  max-width: 42ch;
}
.dica {
  margin: 8px 0 0;
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  color: var(--azul);
}

.secao {
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--azul);
  margin: 0 0 8px;
}

.pagina-foto {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.moldura {
  position: relative;
  flex: 0 1 auto;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: min(58dvh, 420px);
  min-height: 200px;
  background: #f4f8fc;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,.8) inset,
    0 16px 36px rgba(10, 50, 104, .16);
}
.moldura .fundo {
  position: absolute;
  inset: -20px;
  background-position: center;
  background-size: cover;
  filter: blur(18px) saturate(1.05) brightness(.9);
}
.moldura img,
.moldura video {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.moldura img.respira {
  animation: ken 16s ease-in-out infinite alternate;
  transform-origin: center;
}
.moldura::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255, 255, 255, .7) 0.7px, transparent 0.8px),
    radial-gradient(rgba(224, 176, 58, .4) 0.8px, transparent 0.9px);
  background-size: 130px 80px, 190px 110px;
  animation: dust 8s linear infinite;
  opacity: .4;
}
.legenda-bloco {
  padding: 10px 4px 0;
}
.legenda-bloco h4 {
  font-family: Montserrat, sans-serif;
  font-size: 15px;
  margin: 0 0 4px;
  color: var(--azul-escuro);
}
.legenda-bloco p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 4px 0;
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  color: var(--azul);
}
.passadores {
  display: flex;
  gap: 8px;
}
.passadores button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--ceu);
  color: var(--azul-escuro);
  font-size: 20px;
  cursor: pointer;
}
.passadores button:disabled {
  opacity: .35;
}

@media (min-width: 720px) {
  body { max-width: 520px; margin: 0 auto; }
}

@keyframes ken {
  from { transform: scale(1); }
  to { transform: scale(1.06) translate3d(-1%, 1%, 0); }
}
@keyframes dust {
  from { background-position: 0 0, 0 0; }
  to { background-position: 48px 22px, -36px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .trilho { transition: none; }
  .moldura img,
  .moldura::after { animation: none; }
}
