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

:root {
  --papel:  #F5F0E8;
  --ink:    #1C1208;
  --ocre:   #C4872A;
  --green:  #3D6B4F;
  --muted:  #7A6A55;
  --borda:  #D4C9B4;
  --escuro: #0e0a06;
}

html { scroll-behavior: smooth; }

body {
  background: #2a2018;
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* ── PÁGINA ── */
.pagina {
  background: var(--papel);
  width: 100%;
  max-width: 680px;
  min-height: 880px;
  padding: 5rem 5.5rem;
  position: relative;
  box-shadow:
    -6px 0 16px rgba(0,0,0,0.4),
    6px 0 16px rgba(0,0,0,0.25),
    0 30px 60px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
}

/* Lombada esquerda */
.pagina::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(to right, #b8a898, #e8e0d0);
}

/* ── NAVEGAÇÃO ENTRE PÁGINAS ── */
.nav-pagina {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  z-index: 100;
}

.btn-nav {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.5);
  text-decoration: none;
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(245,240,232,0.15);
  transition: all 0.2s;
  background: rgba(14,10,6,0.7);
  backdrop-filter: blur(8px);
}
.btn-nav:hover { color: var(--ocre); border-color: rgba(196,135,42,0.4); }
.btn-nav.destaque {
  background: var(--ocre);
  color: var(--ink);
  border-color: var(--ocre);
}
.btn-nav.destaque:hover { background: #d49530; }

.nav-sep {
  width: 1px; height: 12px;
  background: rgba(245,240,232,0.15);
}

/* ── TIPOGRAFIA ── */
.mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.1;
}

h2 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

p { margin-bottom: 1.25rem; color: var(--ink); }
p:last-child { margin-bottom: 0; }

em { font-style: italic; }
strong { font-weight: 600; }

.recuo { text-indent: 2rem; }
.sem-recuo { text-indent: 0; }

/* ── ORNAMENTOS ── */
.ornamento {
  text-align: center;
  color: var(--ocre);
  opacity: 0.5;
  font-size: 1.2rem;
  margin: 2.5rem 0;
  letter-spacing: 0.5rem;
}

.linha-ocre {
  border: none;
  border-top: 1px solid var(--ocre);
  opacity: 0.3;
  margin: 2rem 0;
}

/* ── RODAPÉ DA PÁGINA ── */
.rodape-pagina {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--borda);
}
.rodape-pagina span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* ── MOBILE ── */
@media (max-width: 720px) {
  body { padding: 0; }
  .pagina {
    max-width: 100%;
    min-height: 100vh;
    padding: 3.5rem 2rem;
    box-shadow: none;
  }
  .pagina::before { display: none; }
}
