/* ═══════════ PÁGINAS LEGAIS · MANUAL.TXT ═══════════ */
/* inspiração: o manual de papel que vinha dentro da caixa do jogo */

.legal-page {
  min-height: 100svh;
  display: flex; flex-direction: column;
  background:
    radial-gradient(ellipse 90% 55% at 50% 115%, rgba(49,137,175,0.22), transparent 60%),
    radial-gradient(ellipse 45% 30% at 88% 0%, rgba(221,166,29,0.14), transparent 70%),
    var(--preto);
  position: relative; overflow: hidden;
}

/* ── topo ── */
.legal-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem clamp(1rem, 4vw, 2.5rem);
  position: relative; z-index: 3;
}
.legal-nav img { height: 34px; width: auto; }
.legal-back {
  font-family: var(--display);
  font-weight: 800; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--branco); text-decoration: none;
  border: 2px solid var(--branco); padding: 0.55rem 1rem;
  transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.14s var(--ease-out);
}
@media (hover: hover) {
  .legal-back:hover { background: var(--branco); color: var(--preto); }
}
.legal-back:active { transform: scale(0.97); }

.legal-head {
  text-align: center; padding: clamp(1.4rem, 4vw, 2.8rem) 1rem 0;
  position: relative; z-index: 2;
}
.legal-head .tape-label { background: var(--azul); color: var(--branco); transform: rotate(-1.2deg); margin-bottom: 1.3rem; }
.legal-title {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2rem, 6vw, 4.2rem); line-height: 0.95; color: var(--branco);
  padding-bottom: 0.14em; margin-bottom: -0.08em;
}
.legal-title em { font-style: italic; color: var(--amarelo); }
.legal-sub {
  margin: 1.1rem auto 0; max-width: 54ch; color: var(--branco-dim);
  font-weight: 500; font-size: clamp(0.92rem, 1.3vw, 1.05rem);
}

/* ── a janela do documento ── */
.legal-window {
  width: min(920px, 94vw);
  margin: clamp(1.6rem, 4vw, 3rem) auto clamp(2.5rem, 5vw, 4rem);
  background: #d8d5c8;
  border: 3px solid var(--preto);
  box-shadow: inset 2px 2px 0 #fdfcf5, inset -2px -2px 0 #8b897e, 12px 12px 0 rgba(8,15,15,0.45);
  position: relative; z-index: 2;
  transform: rotate(-0.35deg);
}
.legal-window .win95-bar { cursor: default; }
.legal-paper {
  background: #fdfcf5;
  border: 2px solid #8b897e;
  margin: 10px;
  padding: clamp(1.4rem, 4vw, 3rem) clamp(1.2rem, 4vw, 3.2rem);
  color: var(--preto);
}

/* cabeçalho do documento, tipo folha de rosto */
.doc-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem;
  padding-bottom: 1.1rem; margin-bottom: 2rem;
  border-bottom: 2px solid var(--preto);
  font-family: var(--display); font-weight: 800;
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.doc-meta span { color: var(--preto-dim); }
.doc-meta b { color: var(--vermelho); font-weight: 800; }

/* secções numeradas como faixas */
.doc-sec { margin-bottom: 2.2rem; }
.doc-sec:last-child { margin-bottom: 0; }
.doc-sec > h2 {
  display: flex; align-items: baseline; gap: 0.7rem;
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1rem, 2.1vw, 1.25rem); line-height: 1.15;
  margin-bottom: 0.75rem;
}
.doc-num {
  flex: 0 0 auto;
  background: var(--preto); color: var(--amarelo);
  font-size: 0.72rem; letter-spacing: 0.08em;
  padding: 0.22em 0.5em;
  transform: translateY(-0.12em);
}
.doc-sec p { line-height: 1.62; margin-bottom: 0.8rem; font-size: 0.96rem; }
.doc-sec p:last-child { margin-bottom: 0; }
.doc-sec a { color: var(--vermelho); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .doc-sec a:hover { background: var(--amarelo); color: var(--preto); text-decoration: none; } }

.doc-list { list-style: none; margin: 0.5rem 0 0.9rem; }
.doc-list li {
  position: relative; padding-left: 1.5rem; margin-bottom: 0.42rem;
  line-height: 1.55; font-size: 0.95rem;
}
.doc-list li::before {
  content: '▶'; position: absolute; left: 0; top: 0.06em;
  color: var(--azul); font-size: 0.66rem;
}
.doc-list li b { font-weight: 800; }

/* bloco de contacto da entidade responsável */
.doc-card {
  border: 2px solid var(--preto);
  background: #ecead9;
  padding: 1rem 1.2rem;
  box-shadow: 4px 4px 0 var(--preto);
}
.doc-card p { margin-bottom: 0.3rem; font-size: 0.95rem; }
.doc-card p:first-child { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }

/* rodapé do documento */
.doc-stamp {
  margin-top: 2.4rem; padding-top: 1.1rem;
  border-top: 2px solid var(--preto);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem;
  font-family: var(--display); font-weight: 800;
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--preto-dim);
}
.doc-stamp .stamp-badge {
  background: var(--amarelo); color: var(--preto);
  border: 2px solid var(--preto); padding: 0.35rem 0.7rem;
  transform: rotate(-1.6deg);
}

/* navegação entre documentos legais */
.legal-switch {
  width: min(920px, 94vw); margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center;
  position: relative; z-index: 2;
}
.legal-switch a {
  font-family: var(--display); font-weight: 800;
  font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--branco); text-decoration: none;
  border: 2px solid rgba(220,219,205,0.4); padding: 0.6rem 1.1rem;
  transition: border-color 0.2s var(--ease-out), color 0.2s var(--ease-out), background 0.2s var(--ease-out), transform 0.14s var(--ease-out);
}
@media (hover: hover) {
  .legal-switch a:hover { border-color: var(--amarelo); background: var(--amarelo); color: var(--preto); }
}
.legal-switch a:active { transform: scale(0.97); }
.legal-switch a[aria-current="page"] {
  background: var(--branco); color: var(--preto); border-color: var(--branco);
}

.legal-foot {
  margin-top: auto; text-align: center; padding: 1.2rem;
  font-size: 0.72rem; letter-spacing: 0.18em; font-weight: 700;
  color: var(--branco-dim); text-transform: uppercase;
  border-top: 1px solid rgba(220,219,205,0.18);
  position: relative; z-index: 2;
}

/* ── entrada: sem bounce, só ease-out curto (Emil) ──
   Reveal feito em CSS puro, não em GSAP: o texto legal é visível por omissão e
   só é escondido enquanto <html> tiver .js-anim, posta por um script inline que
   agenda a sua própria remoção. Assim o documento aparece sempre — sem JS, sem
   GSAP, ou com o rAF parado (separador em segundo plano). */
.doc-sec, .doc-meta {
  transition: opacity 0.42s var(--ease-out), transform 0.42s var(--ease-out);
}
html.js-anim .doc-sec,
html.js-anim .doc-meta { opacity: 0; transform: translateY(10px); }

/* stagger sem JS */
.doc-meta { transition-delay: 0s; }
.doc-sec:nth-of-type(1) { transition-delay: 0.045s; }
.doc-sec:nth-of-type(2) { transition-delay: 0.09s; }
.doc-sec:nth-of-type(3) { transition-delay: 0.135s; }
.doc-sec:nth-of-type(4) { transition-delay: 0.18s; }
.doc-sec:nth-of-type(5) { transition-delay: 0.225s; }
.doc-sec:nth-of-type(n+6) { transition-delay: 0.27s; }

@media (prefers-reduced-motion: reduce) {
  .doc-sec, .doc-meta { transition: none; }
}

@media (max-width: 700px) {
  .legal-stickers { display: none; }
  .legal-window { transform: none; }
  .doc-sec > h2 { flex-wrap: wrap; }
}