:root {
  --paper: #f8dc48;
  --cream: #fff7cf;
  --ink: #172129;
  --red: #e23025;
  --blue: #185e9e;
  --line: 3px solid var(--ink);
}

/* Base */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  background: var(--cream);
  color: var(--ink);
  font-family: Fredoka, system-ui, sans-serif;
  font-size: 1.08rem;
}

h1,
h2,
h3 {
  font-family: "Permanent Marker", cursive;
  line-height: 1.05;
}

h1 {
  font-size: clamp(3rem, 7vw, 6.4rem);
  letter-spacing: -2px;
}

h2 {
  font-size: clamp(2.3rem, 4vw, 4rem);
}

h3 {
  font-size: 1.6rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
}

.eyebrow.light {
  color: #ffe674;
}

.subtitle {
  font-size: 1.2rem;
}

.py-lg-6 {
  padding-top: 6rem !important;
  padding-bottom: 6rem !important;
}

/* Navigation and buttons */

.paper-nav {
  border-bottom: var(--line);
  background: rgb(248 220 72 / 94%);
  backdrop-filter: blur(8px);
}

.navbar-brand.brand {
  font-family: "Permanent Marker", cursive;
  font-size: 2rem;
  letter-spacing: -2px;
}

.brand span {
  color: var(--red);
  font-size: 1rem;
  vertical-align: top;
}

.nav-link {
  color: var(--ink) !important;
  font-weight: 600;
}

.nav-link:hover {
  color: var(--red) !important;
}

.navbar-toggler {
  border: var(--line);
  font-size: 1.3rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.btn {
  border: var(--line);
  border-radius: 6px;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  box-shadow: 6px 7px 0 var(--ink);
  transform: translateY(-2px);
}

.btn-ink {
  background: var(--ink);
  color: #fff;
}

.btn-ink:hover {
  background: var(--red);
  color: #fff;
}

.btn-danger-ink {
  padding: 0.85rem 1.25rem;
  background: var(--red);
  color: #fff;
}

.btn-danger-ink:hover {
  background: #bf241c;
  color: #fff;
}

.btn-paper {
  --bs-btn-bg: #fff7cf;
  --bs-btn-color: var(--ink);
  --bs-btn-border-color: var(--ink);
  --bs-btn-hover-bg: #fff1a8;
  --bs-btn-hover-color: var(--ink);
  --bs-btn-hover-border-color: var(--ink);
  padding: 0.85rem 1.25rem;
  background-color: #fff7cf;
  color: var(--ink);
}

.btn-paper:hover {
  background-color: #fff1a8;
  color: var(--ink);
}

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  background: var(--paper);
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    repeating-linear-gradient(20deg, transparent 0 18px, #edc92f 19px 20px),
    repeating-linear-gradient(105deg, transparent 0 29px, #fff1a0 30px 31px);
  content: "";
  opacity: 0.3;
}

.min-vh-75 {
  min-height: 74vh;
}

.hero h1 em {
  display: inline-block;
  color: var(--red);
  font-style: normal;
  transform: rotate(-2deg);
}

.lead {
  max-width: 560px;
  font-size: 1.3rem;
}

.tiny-note {
  font-size: 0.9rem;
  font-weight: 600;
}

.scribble {
  position: absolute;
  color: var(--blue);
  font-family: "Permanent Marker", cursive;
  font-size: 2.2rem;
}

.s1 {
  top: 15%;
  left: 8%;
  transform: rotate(-15deg);
}

.s2 {
  bottom: 25%;
  left: 45%;
  color: var(--red);
}

.s3 {
  top: 20%;
  right: 8%;
  color: var(--red);
}

.hero-bottom {
  height: 28px;
  background: var(--cream);
  clip-path: polygon(0 35%, 5% 80%, 11% 20%, 18% 70%, 27% 18%, 34% 75%, 42% 25%, 52% 65%, 60% 10%, 67% 80%, 77% 25%, 84% 70%, 92% 18%, 100% 65%, 100% 100%, 0 100%);
}

.mascot-wrap {
  position: relative;
  width: min(360px, 100%);
  height: 345px;
  overflow: hidden;
  border: var(--line);
  border-radius: 46% 54% 44% 56% / 53% 41% 59% 47%;
  background: #ffe96f;
  box-shadow: 8px 8px 0 #eebd21;
  text-align: center;
  transform: rotate(2deg);
}

.mascot-wrap::after,
.mascot-wrap .mascot,
.mascot-wrap .flame {
  display: none;
}

.mascot-wrap::before {
  position: absolute;
  z-index: 2;
  top: 13px;
  left: 50%;
  display: block;
  width: 256px;
  height: 240px;
  background: center / contain no-repeat url("assets/mascota-roleplaygrounds.png");
  content: "";
  transform: translateX(-50%);
}

.mascot-wrap p {
  position: absolute;
  z-index: 3;
  bottom: 15px;
  width: 100%;
  margin: 0;
  font-family: "Permanent Marker", cursive;
  font-size: 1.5rem;
  line-height: 0.9;
}

.mascot-wrap small {
  font-family: Fredoka, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Content sections */

.section-paper {
  background-color: var(--cream);
  background-image: radial-gradient(#f0d35d 1px, transparent 1px);
  background-size: 13px 13px;
}

.big-copy {
  font-size: 1.4rem;
  line-height: 1.45;
}

.doodle-line {
  width: 180px;
  border-top: 6px wavy var(--red);
  transform: rotate(-2deg);
}

.mini-card {
  display: flex;
  min-height: 135px;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  border: var(--line);
  background: #fff8da;
  box-shadow: 4px 5px 0 #e6c83c;
  font-weight: 700;
  text-align: center;
}

.mini-card b {
  font-size: 2rem;
}

.mini-card,
.game-card {
  animation: card-idle 4.8s ease-in-out infinite;
}

.mini-card.tilt,
.game-card.tilt {
  animation-delay: -2.1s;
}

.tilt {
  transform: rotate(2deg);
}

.section-red {
  position: relative;
  background: var(--red);
}

.section-red::before {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(-40deg, transparent 0 22px, #c8201b 23px 24px);
  content: "";
  opacity: 0.4;
}

.section-red .container {
  position: relative;
}

.game-card {
  min-height: 270px;
  padding: 1.65rem;
  border: var(--line);
  background: #f9df54;
  box-shadow: 7px 8px 0 #821b1a;
}

.game-icon {
  display: block;
  color: var(--blue);
  font-family: "Permanent Marker", cursive;
  font-size: 3rem;
}

.game-logo {
  display: block;
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  object-position: left center;
}

.game-logo[alt="Logo de Broforce"] {
  width: 3.65rem;
  height: 3.65rem;
  margin: -0.3rem 0;
}

.game-logo-wide {
  width: 5.5rem;
  height: 3.2rem;
}

.game-card h3 {
  margin-top: 0.45rem;
}

.game-card a {
  color: var(--red);
  font-weight: 700;
  text-decoration-color: var(--ink);
  text-underline-offset: 4px;
}

.tag {
  padding: 0.3rem 0.5rem;
  border: 2px solid var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
}

/* Chronicles */

.stamp {
  display: inline-block;
  min-width: 155px;
  padding: 13px 16px;
  border: 3px solid var(--red);
  color: var(--red);
  font-family: "Permanent Marker", cursive;
  font-size: 1.1rem;
  line-height: 1;
  text-align: center;
  transform: rotate(9deg);
}

.timeline {
  margin-left: 9px;
  border-left: 3px solid var(--ink);
}

.chronicle {
  position: relative;
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 1rem;
  padding: 0 0 2.2rem 2.1rem;
}

.chronicle::before {
  position: absolute;
  top: 2px;
  left: -10px;
  width: 17px;
  height: 17px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  content: "";
}

.chronicle.featured::before {
  background: var(--red);
  transform: scale(1.2);
}

.date {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.chronicle h3 {
  margin: -0.25rem 0 0.3rem;
  font-size: 1.5rem;
}

.chronicle p {
  max-width: 600px;
  margin: 0;
}

.event-icon {
  display: none;
}

/* Gallery and rules */

.gallery-strip {
  background: #e7c539;
}

.photo-card {
  margin: 0;
  padding: 10px 10px 15px;
  border: var(--line);
  background: #fff9dc;
  box-shadow: 6px 6px 0 var(--ink);
}

.photo-card img {
  width: 100%;
  height: 195px;
  object-fit: cover;
  object-position: top;
  filter: saturate(1.1);
}

.photo-card figcaption {
  padding-top: 10px;
  font-family: "Permanent Marker", cursive;
  text-align: center;
}

.rotate-left {
  transform: rotate(-2deg);
}

.rotate-right {
  transform: rotate(2deg);
}

.section-dark {
  background: var(--ink);
}

.section-dark h2 {
  color: var(--paper);
}

.signed {
  color: #f7df62;
  font-family: "Permanent Marker", cursive;
  font-size: 1.25rem;
}

.rules-sheet {
  padding: 1.8rem;
  border: var(--line);
  background: #fff3bd;
  box-shadow: 8px 8px 0 #000;
  transform: rotate(1deg);
}

.rule {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 2px dashed #b59839;
}

.rule:last-of-type {
  border-bottom: 0;
}

.rule > b {
  color: var(--red);
  font-family: "Permanent Marker", cursive;
  font-size: 1.6rem;
}

.rule h3 {
  margin: 0;
  font-family: Fredoka, sans-serif;
  font-size: 1.12rem;
  font-weight: 700;
}

.rule p {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
}

.rules-foot {
  margin: 1rem 0 0;
  font-family: "Permanent Marker", cursive;
  text-align: center;
}

.join-section {
  background-color: var(--paper);
  background-image: linear-gradient(140deg, transparent 45%, #efc92d 46%, transparent 47%), linear-gradient(45deg, transparent 68%, #efc92d 69%, transparent 70%);
}

.join-section .subtitle {
  max-width: 600px;
}

footer {
  padding: 1.5rem 0;
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
}

/* Motion: excludes the official mascot. */

.hero .col-lg-7 > * {
  animation: rise-in 0.75s both;
}

.hero .col-lg-7 .eyebrow {
  animation-delay: 0.08s;
}

.hero .col-lg-7 h1 {
  animation-delay: 0.16s;
}

.hero .col-lg-7 .lead {
  animation-delay: 0.28s;
}

.hero .col-lg-7 .d-flex {
  animation-delay: 0.4s;
}

.hero .col-lg-7 .tiny-note {
  animation-delay: 0.52s;
}

.reveal {
  opacity: 0;
  transform: translateY(25px) rotate(var(--reveal-tilt, 0));
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) rotate(var(--reveal-tilt, 0));
}

.section-reveal {
  opacity: 0;
  scale: 0.98;
  translate: 0 24px;
  transition: opacity 0.7s ease, scale 0.7s ease, translate 0.7s ease;
}

.section-reveal.is-visible {
  opacity: 1;
  scale: 1;
  translate: 0;
}

.game-card.tilt,
.mini-card.tilt {
  --reveal-tilt: 2deg;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-idle {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Tablet */

@media (max-width: 991.98px) {
  .paper-nav .container {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
  }

  .navbar-collapse {
    padding: 1rem 0 0.25rem;
  }

  .navbar-nav {
    align-items: stretch !important;
    gap: 0.2rem !important;
  }

  .nav-link {
    padding: 0.7rem 0;
  }

  .navbar-nav .btn {
    margin: 0.55rem 0 0 !important;
    text-align: center;
  }

  .hero .lead {
    margin-right: auto;
    margin-left: auto;
  }

  .chronicle {
    grid-template-columns: 120px 1fr;
  }
}

/* Mobile */

@media (max-width: 575.98px) {
  body {
    font-size: 1rem;
  }

  .container {
    padding-right: 1.2rem;
    padding-left: 1.2rem;
  }

  .paper-nav .container {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .navbar-brand.brand {
    font-size: 1.75rem;
  }

  .navbar-toggler {
    padding: 0.25rem 0.55rem;
  }

  .min-vh-75 {
    min-height: 0;
  }

  .hero .row {
    padding-top: 2rem !important;
    padding-bottom: 2.25rem !important;
  }

  .hero h1 {
    font-size: clamp(2.75rem, 14vw, 4rem);
    letter-spacing: -1px;
    line-height: 1.08;
  }

  .hero .lead {
    font-size: 1.08rem;
    line-height: 1.45;
  }

  .hero .d-flex {
    display: grid !important;
    max-width: 360px;
    grid-template-columns: 1fr;
    margin-right: auto;
    margin-left: auto;
  }

  .hero .btn {
    width: 100%;
  }

  .scribble {
    font-size: 1.6rem;
  }

  .s1 {
    top: 12%;
    left: 5%;
  }

  .s2 {
    bottom: 6%;
    left: 88%;
  }

  .s3 {
    top: 13%;
    right: 7%;
  }

  .mascot-wrap {
    width: min(86vw, 320px);
    height: 310px;
    margin-bottom: -20px;
    transform: scale(0.9);
    transform-origin: center top;
  }

  .mascot-wrap::before {
    top: 16px;
    width: 238px;
    height: 223px;
  }

  .py-lg-6 {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  .big-copy {
    font-size: 1.14rem;
  }

  .mini-card {
    min-height: 110px;
    padding: 1rem;
  }

  .game-card {
    min-height: 0;
    padding: 1.4rem;
  }

  .timeline {
    margin-left: 6px;
  }

  .chronicle {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 0 0 1.8rem 1.45rem;
  }

  .chronicle::before {
    left: -9px;
    width: 15px;
    height: 15px;
  }

  .chronicle h3 {
    font-size: 1.35rem;
  }

  .event-icon {
    display: none;
  }

  .gallery-strip .row {
    gap: 2rem !important;
  }

  .photo-card {
    max-width: 360px;
    margin-right: auto;
    margin-left: auto;
  }

  .photo-card img {
    height: 170px;
  }

  .rules-sheet {
    padding: 1.1rem;
    box-shadow: 5px 5px 0 #000;
    transform: none;
  }

  .rule {
    gap: 0.6rem;
    padding: 0.85rem 0;
  }

  .rule > b {
    font-size: 1.35rem;
  }

  .rule h3 {
    font-size: 1rem;
  }

  .rule p {
    font-size: 0.9rem;
  }

  .join-section .btn {
    width: min(100%, 340px);
  }

  footer {
    padding: 1.2rem 0;
    text-align: center;
  }
}
