@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Libre+Baskerville:wght@400;700&family=Courier+Prime:wght@400;700&display=swap');

:root {
  --bw-cream: #f1e8d0;
  --bw-cream-soft: #faf4e4;
  --bw-blue: #141a6e;
  --bw-maroon-deep: #3e0b12;
  --bw-gold: #c9a227;
  --bw-ink: #241c15;
  --bw-slate: #232e2b;
  --bw-slate-chalk: #eef1ea;

  --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-body: 'Arial', sans-serif;
  --font-mono: 'Courier Prime', 'Courier New', monospace;

  --container: 68rem;
}

/* ---------- Reset básico ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bw-blue);
  color: var(--bw-ink);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

header>p,
#historia>p {
  color: var(--bw-cream-soft);
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin: 0;
}

a {
  color: var(--bw-cream-soft);
}

:focus-visible {
  outline: 3px solid var(--bw-gold);
  outline-offset: 3px;
}

/* Textura sutil de papel envelhecido no fundo da página */
body {
  background-image:
    repeating-linear-gradient(0deg,
      rgba(110, 20, 35, 0.035) 0px,
      rgba(110, 20, 35, 0.035) 1px,
      transparent 1px,
      transparent 34px);
}

header {
  /* position: relative;
  background: var(--bw-maroon);
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(0, 0, 0, 0.12) 0px,
      rgba(0, 0, 0, 0.12) 2px,
      transparent 2px,
      transparent 26px
    ); */
  /* border-top: 6px solid var(--bw-gold);
  border-bottom: 6px solid var(--bw-gold); */
  padding: 3.5rem 1.5rem;
  text-align: left;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header>img {
  width: 300px;
}

.eyebrow {
  margin: 3.6rem 0 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bw-gold);
}

header h1 {
  color: var(--bw-cream);
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  text-transform: uppercase;
  text-align: center;
  /* text-shadow: 3px 3px 30px var(--bw-maroon-deep); */
}

/* Cartão de introdução "colado" sobre o banner, como um bilhete na parede */
.intro {
  position: relative;
  max-width: 42rem;
  margin: -3rem auto 0;
  padding: 1.6rem 1.8rem;
  background: var(--bw-cream-soft);
  color: var(--bw-cream);
  font-size: 0.98rem;
  text-align: left;
  border: 1px solid rgba(36, 28, 21, 0.15);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
  transform: rotate(-0.6deg);
}

.intro::before,
.intro::after {
  content: "";
  position: absolute;
  width: 2.4rem;
  height: 0.9rem;
  background: rgba(201, 162, 39, 0.55);
  top: -0.45rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.intro::before {
  left: 1.2rem;
  transform: rotate(-6deg);
}

.intro::after {
  right: 1.2rem;
  transform: rotate(5deg);
}

main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 4.5rem 0 2.5rem;
}

section h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--bw-cream);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

section h2::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 4px;
  margin-top: 0.5rem;
  background: var(--bw-gold);
}

.lista-personagens {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 2rem 1.6rem;
}

.personagem {
  position: relative;
  background: var(--bw-cream-soft);
  border: 1px dashed rgba(110, 20, 35, 0.55);
  padding: 1.4rem 1.2rem 1.2rem;
  clip-path: polygon(0 0.6rem, 0.6rem 0, calc(100% - 0.6rem) 0, 100% 0.6rem,
      100% calc(100% - 0.6rem), calc(100% - 0.6rem) 100%,
      0.6rem 100%, 0 calc(100% - 0.6rem));
  box-shadow: 0 6px 14px rgba(36, 28, 21, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.personagem:nth-child(odd) {
  transform: rotate(-1.4deg);
}

.personagem:nth-child(even) {
  transform: rotate(1.2deg);
}

.personagem:hover,
.personagem:focus-within {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 14px 22px rgba(36, 28, 21, 0.26);
}

/* Furo de perfuração do crachá */
.personagem::before {
  content: "";
  position: absolute;
  top: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 0.9rem;
  height: 0.9rem;
  background: var(--bw-cream);
  border: 2px solid var(--bw-maroon);
  border-radius: 50%;
}

/* Carimbo de cargo, lido a partir de data-role no HTML */
.personagem::after {
  content: attr(data-role);
  position: absolute;
  top: 0.8rem;
  right: -1.9rem;
  transform: rotate(35deg);
  background: var(--bw-maroon);
  color: var(--bw-cream-soft);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.personagem figure {
  margin: 0.6rem 0 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.personagem figure img {
  width: 6.5rem;
  height: 6.5rem;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--bw-maroon);
  outline: 2px solid var(--bw-gold);
  outline-offset: 2px;
  filter: sepia(15%) contrast(1.05) saturate(0.9);
}

.personagem figcaption {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bw-maroon-deep);
}

.personagem h3 {
  font-size: 1.4rem;
  color: var(--bw-ink);
  text-align: center;
  margin-bottom: 0.4rem;
}

.personagem p {
  font-size: 0.92rem;
  text-align: center;
  color: var(--bw-ink);
  margin: 0;
}

#gameplay {
  background: var(--bw-slate);
  margin: 4.5rem -1.5rem 0;
  padding: 3.5rem 1.5rem;
  border-top: 4px solid var(--bw-gold);
  border-bottom: 4px solid var(--bw-gold);
}

#gameplay h2 {
  color: var(--bw-slate-chalk);
}

#gameplay h2::after {
  background: var(--bw-slate-chalk);
}

#gameplay p {
  max-width: 46rem;
  color: var(--bw-slate-chalk);
  font-size: 1.02rem;
  text-shadow: 0 0 6px rgba(238, 241, 234, 0.15);
}

#historia {
  counter-reset: capitulo;
}

#historia>.intro,
#historia>p {
  max-width: 44rem;
}

#historia article {
  position: relative;
  counter-increment: capitulo;
  max-width: 46rem;
  margin: 2.4rem 0;
  padding: 1.6rem 1.6rem 1.6rem 3.4rem;
  background:
    linear-gradient(90deg, transparent 2.2rem, rgba(110, 20, 35, 0.35) 2.2rem, rgba(110, 20, 35, 0.35) calc(2.2rem + 1px), transparent calc(2.2rem + 1px)),
    repeating-linear-gradient(0deg,
      transparent 0px,
      transparent 1.7rem,
      rgba(35, 46, 41, 0.12) 1.7rem,
      rgba(35, 46, 41, 0.12) calc(1.7rem + 1px)),
    var(--bw-cream-soft);
  border: 1px solid rgba(36, 28, 21, 0.12);
  box-shadow: 0 4px 10px rgba(36, 28, 21, 0.12);
}

#historia article h3 {
  font-size: 1.5rem;
  color: var(--bw-maroon);
  margin-bottom: 0.8rem;
}

#historia article h3::before {
  content: "Capítulo " counter(capitulo) " — ";
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--bw-gold);
  display: block;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

#historia article p {
  margin: 0 0 0.9rem;
}

#historia article p:last-child {
  margin-bottom: 0;
}

/* Lista de facções — ficha de time */
#historia ul {
  list-style: none;
  margin: 1.2rem 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

#historia ul li {
  padding-left: 1rem;
  border-left: 3px solid var(--bw-maroon);
  font-size: 0.95rem;
}

#historia ul li strong {
  font-family: var(--font-mono);
  color: var(--bw-maroon-deep);
}

.menu {
  display: flex;
  background-color: var(--bw-gold);
  align-items: center;
  padding: 10px;
  justify-content: space-between;
  width: 100%;
}

.menu ul {
  display: flex;
  gap: 30px;
  margin-right: 20px;
}

.menu li {
  list-style: none;
}

/* .menu button {
    background-color: var(--highlights);
    border: none;
    padding: 10px;
    transition: .4s;
    font-size: 20px;
    width: 150px
} */
.menu img {
  width: 50px;
  margin-left: 20px;
}

footer {
  background-color: #292b2e;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

footer>h4>a {
  text-decoration: none;
  color: var(--bw-cream);
}

footer div a {
  color: #d8dddf8f;
  text-decoration: none;
  transition: .4s;
}

footer div a:hover,
footer li:hover {
  color: var(--bw-cream-soft);
  transition: .4s;
}

footer li {
  list-style: none;
  color: #d8dddf8f;
}

footer>div {
  width: 90%;
  display: flex;
  justify-content: space-between;
}

footer h4 {
  text-transform: uppercase;
  font-size: 2rem;
  color: var(--bw-cream)
}

.credits>p,
.credits ul,
.footer-nav>p,
.footer-nav ul,
.wiki>p,
.wiki ul,
.technologies>p,
.technologies ul {
  margin-top: 0;
  color: var(--bw-gold)
}

li::before {
  content: "★";
  color: var(--highlights);
  /* position: absolute; */
  left: 0;
}

.menu button:hover {
  transition: .4s;
  transform: translateX(15px);
  cursor: pointer;
  filter: drop-shadow(var(--highlights) 0px 0px 10px);
}

.menu a {
  text-decoration: none;
  color: var(--pri);
  transition: .4s;
  font-weight: 900;
}

.menu a:hover {
  color: var(--text);
  transition: .4s;
}

menu::after {
  content: " ";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--text);
}

@media (max-width: 40rem) {
  header {
    padding: 3.5rem 1rem 4.5rem;
  }

  .intro {
    margin-top: -2.2rem;
    padding: 1.3rem 1.2rem;
  }

  #gameplay {
    margin-left: -1rem;
    margin-right: -1rem;
  }

  .personagem::after {
    right: -2.3rem;
    font-size: 0.56rem;
  }

  #historia article {
    padding-left: 2.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .personagem {
    transition: none;
  }
}