:root {
  --preto: #0a0a0a;
  --branco: #f5f0eb;
  --cinza-escuro: #1a1a1a;
  --cinza-medio: #3a3a3a;
  --cinza-claro: #888;
  --creme: #e8e0d5;
  --accent: #c8b89a;
}

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

html { scroll-behavior: smooth; scroll-snap-type: y mandatory; }

body {
  background: var(--preto);
  color: var(--branco);
  font-family: 'Crimson Pro', Georgia, serif;
  overflow-x: hidden;
  cursor: default;
}

/* ── CAPA ── */
.capa {
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  scroll-snap-align: start;
  overflow: hidden;
}

.capa::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(200,184,154,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 80% 30%, rgba(255,255,255,0.03) 0%, transparent 50%);
}

.capa-ruido {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}

.capa-conteudo {
  position: relative;
  text-align: center;
  padding: 2rem;
  animation: fadeUp 1.2s ease forwards;
  opacity: 0;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.logo-balao {
  width: 90px;
  height: 100px;
  margin: 0 auto 2.5rem;
  display: block;
  opacity: 0;
  animation: fadeUp 1s ease 0.3s forwards;
}

.capa-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.5s forwards;
}

.capa-titulo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--branco);
  margin-bottom: 0.3rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.6s forwards;
}

.capa-titulo em {
  font-style: italic;
  color: var(--accent);
}

.capa-subtitulo {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 300;
  font-style: italic;
  color: var(--cinza-claro);
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.8s forwards;
}

.capa-autor {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cinza-claro);
  opacity: 0;
  animation: fadeUp 1s ease 1s forwards;
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeUp 1s ease 1.5s forwards;
}

.scroll-hint span {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cinza-claro);
}

.scroll-hint .seta {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ── PÁGINA DE POEMA ── */
.pagina-poema {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
}

.pagina-poema::before {
  content: attr(data-num);
  position: absolute;
  font-family: 'Playfair Display', serif;
  font-size: clamp(8rem, 20vw, 18rem);
  font-weight: 700;
  font-style: italic;
  color: rgba(255,255,255,0.02);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  line-height: 1;
  user-select: none;
}

.poema-inner {
  max-width: 680px;
  width: 100%;
  position: relative;
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.poema-inner.visivel {
  opacity: 1;
  transform: translateY(0);
}

.poema-numero {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.poema-numero::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.poema-titulo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--branco);
  margin-bottom: 2.5rem;
}

.poema-corpo {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 300;
  line-height: 2;
  color: var(--creme);
}

/* Versos gerados pelo deltaToHtml */
.poema-corpo .verse {
  display: block;
  text-align: center;
  min-height: 1em;
}

.poema-data {
  margin-top: 3rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--cinza-claro);
  text-transform: uppercase;
}

/* ── PÁGINA SOBRE ── */
.pagina-sobre {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  scroll-snap-align: start;
  position: relative;
  background: radial-gradient(ellipse 50% 60% at 80% 50%, rgba(200,184,154,0.05) 0%, transparent 70%);
}

.sobre-inner {
  max-width: 680px;
  width: 100%;
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.sobre-inner.visivel {
  opacity: 1;
  transform: translateY(0);
}

.sobre-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.sobre-titulo {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--branco);
  margin-bottom: 2rem;
  line-height: 1.2;
}

.sobre-texto {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  font-weight: 300;
  line-height: 1.9;
  color: var(--creme);
}

.sobre-texto p + p { margin-top: 1.2rem; }

/* ── COLOFÃO ── */
.colofao {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  scroll-snap-align: start;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.colofao::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(200,184,154,0.05) 0%, transparent 70%);
}

.colofao-logo {
  width: 50px;
  margin-bottom: 2rem;
  opacity: 0.6;
  position: relative;
}

.colofao-frase {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-style: italic;
  color: var(--accent);
  margin-bottom: 1.5rem;
  position: relative;
}

.colofao-cite {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--cinza-claro);
  margin-bottom: 3rem;
  position: relative;
}

.linha-divisoria {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  margin: 0 auto 3rem;
  opacity: 0.4;
  position: relative;
}

.colofao-info {
  font-family: 'Crimson Pro', serif;
  font-size: 0.9rem;
  color: var(--cinza-claro);
  line-height: 2;
  position: relative;
}

.colofao-info a {
  color: var(--accent);
  text-decoration: none;
}

/* ── NAVEGAÇÃO LATERAL ── */
.nav-lateral {
  position: fixed;
  right: 1.8rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  z-index: 100;
}

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cinza-claro);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.nav-dot:hover,
.nav-dot.ativo { background: var(--accent); transform: scale(1.5); }

.nav-dot .tooltip {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--cinza-escuro);
  color: var(--branco);
  font-family: 'Space Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.6rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border: 1px solid rgba(200,184,154,0.15);
}

.nav-dot:hover .tooltip { opacity: 1; }

/* ── BOTÕES FLUTUANTES ── */
.ebook-acoes {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  z-index: 200;
  opacity: 0;
  animation: fadeUp 1s ease 2s forwards;
}

.ebook-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 2rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(200,184,154,0.3);
  background: rgba(10,10,10,0.85);
  color: var(--accent);
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.ebook-btn:hover {
  background: rgba(200,184,154,0.12);
  border-color: var(--accent);
}

.ebook-btn svg { flex-shrink: 0; }

/* ── MEDIA QUERIES ── */
@media (max-width: 600px) {
  .nav-lateral { display: none; }
  .capa-titulo { font-size: 2.8rem; }
  .ebook-acoes { bottom: 1.2rem; }
}

/* ── PRINT / PDF ── */
@media print {
  .nav-lateral,
  .scroll-hint,
  .ebook-acoes { display: none !important; }

  html { scroll-snap-type: none; }

  .capa,
  .pagina-poema,
  .pagina-sobre,
  .colofao {
    page-break-after: always;
    min-height: auto;
    padding: 4rem 3rem;
  }

  .poema-inner,
  .sobre-inner { opacity: 1 !important; transform: none !important; }

  .capa-conteudo,
  .logo-balao,
  .capa-tag,
  .capa-titulo,
  .capa-subtitulo,
  .capa-autor { opacity: 1 !important; animation: none !important; }

  body { background: white; color: #1a1a1a; }
  .capa-titulo em { color: #9a7a50; }
  .poema-corpo { color: #333; }
  .pagina-poema::before { display: none; }
}
