:root {
  --black: #050505;
  --white: #fff8ef;
  --paper: #ffeec9;
  --pink: #ff4eb8;
  --blue: #1664ff;
  --green: #00a650;
  --yellow: #ffd500;
  --orange: #ff7a00;
  --red: #ee161f;
  --purple: #7c1599;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  color: var(--black);
  background:
    linear-gradient(180deg, rgba(255, 248, 239, 0.72), rgba(255, 248, 239, 0.86)),
    repeating-linear-gradient(
      180deg,
      var(--red) 0 90px,
      var(--orange) 90px 180px,
      var(--yellow) 180px 270px,
      var(--green) 270px 360px,
      var(--blue) 360px 450px,
      var(--purple) 450px 540px
    );
  font-family: Inter, system-ui, sans-serif;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(5, 5, 5, 0.12) 2px, transparent 2px),
    linear-gradient(90deg, rgba(5, 5, 5, 0.12) 2px, transparent 2px);
  background-size: 38px 38px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: multiply;
  background-image:
    repeating-radial-gradient(circle at 12% 18%, rgba(0, 0, 0, 0.7) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(99deg, rgba(255, 255, 255, 0.7) 0 1px, transparent 1px 7px);
}

.topbar {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 24px), var(--max));
  min-height: 70px;
  padding: 10px 12px;
  border: 5px solid var(--black);
  border-radius: 8px;
  background: rgba(255, 238, 201, 0.94);
  box-shadow: 8px 8px 0 var(--black);
  transform: translateX(-50%) rotate(-0.5deg);
}

.brand,
nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-family: "Permanent Marker", Impact, sans-serif;
  font-size: clamp(1.1rem, 2.8vw, 1.65rem);
  line-height: 1;
}

.brand img {
  width: 48px;
  height: 48px;
  border: 4px solid var(--black);
  border-radius: 50%;
  object-fit: cover;
}

nav {
  gap: 8px;
}

nav a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 4px solid var(--black);
  border-radius: 7px;
  color: var(--black);
  background: var(--white);
  box-shadow: 5px 5px 0 var(--black);
  font-weight: 900;
  text-transform: uppercase;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease;
}

nav a {
  padding: 0 12px;
  font-size: 0.82rem;
}

nav a:hover,
.button:hover {
  transform: translate(3px, 3px) rotate(1deg);
  box-shadow: 2px 2px 0 var(--black);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.78fr);
  gap: 36px;
  align-items: center;
  min-height: 100svh;
  padding: 132px max(18px, calc((100vw - var(--max)) / 2)) 58px;
  overflow: hidden;
  border-bottom: 8px solid var(--black);
}

.flag-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: grid;
  grid-template-rows: repeat(6, 1fr);
}

.flag-bg span:nth-child(1) { background: var(--red); }
.flag-bg span:nth-child(2) { background: var(--orange); }
.flag-bg span:nth-child(3) { background: var(--yellow); }
.flag-bg span:nth-child(4) { background: var(--green); }
.flag-bg span:nth-child(5) { background: var(--blue); }
.flag-bg span:nth-child(6) { background: var(--purple); }

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(90deg, rgba(255, 248, 239, 0.34), rgba(255, 248, 239, 0.03));
}

.stamp,
.kicker {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin: 0 0 16px;
  padding: 0 13px;
  border: 4px solid var(--black);
  border-radius: 6px;
  background: var(--pink);
  box-shadow: 5px 5px 0 var(--black);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
  transform: rotate(-1.2deg);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Permanent Marker", Impact, sans-serif;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  font-size: clamp(5rem, 12vw, 11.25rem);
  line-height: 0.8;
  color: var(--white);
  -webkit-text-stroke: 4px var(--black);
  overflow-wrap: anywhere;
  text-shadow:
    9px 9px 0 var(--pink),
    15px 15px 0 var(--black);
}

.tagline {
  max-width: 690px;
  margin: 20px 0 0;
  color: var(--black);
  font-size: clamp(1.45rem, 3.2vw, 3.1rem);
  font-weight: 900;
  line-height: 1.02;
  text-shadow: 2px 2px 0 rgba(255, 248, 239, 0.88);
}

.hero-actions,
.contract-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.button {
  min-height: 56px;
  padding: 0 18px;
  cursor: pointer;
}

.button.primary {
  background: var(--yellow);
}

.button.secondary {
  background: #74e6ff;
}

.button.ghost {
  background: var(--pink);
}

.hero-logo {
  margin: 0;
  transform: rotate(2deg);
}

.hero-logo img {
  display: block;
  width: min(100%, 520px);
  aspect-ratio: 1;
  border: 7px solid var(--black);
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 13px 13px 0 var(--black);
}

.hero-logo figcaption {
  width: fit-content;
  max-width: 92%;
  margin: -20px auto 0;
  padding: 9px 14px;
  border: 4px solid var(--black);
  border-radius: 6px;
  background: var(--white);
  box-shadow: 5px 5px 0 var(--black);
  font-family: "Permanent Marker", Impact, sans-serif;
  font-size: clamp(1rem, 2vw, 1.35rem);
  text-align: center;
  transform: rotate(-3deg);
}

.ticker {
  overflow: hidden;
  border-block: 7px solid var(--black);
  background: var(--black);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: march 18s linear infinite;
}

.ticker span {
  display: inline-flex;
  align-items: center;
  min-height: 72px;
  padding: 0 28px;
  color: var(--yellow);
  font-family: "Permanent Marker", Impact, sans-serif;
  font-size: clamp(1.35rem, 3vw, 2.5rem);
  white-space: nowrap;
  text-shadow: 3px 3px 0 var(--pink);
}

@keyframes march {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.manifesto,
.memes,
.traits,
.contract {
  width: min(calc(100% - 28px), var(--max));
  margin: 0 auto;
}

.full-image {
  width: 100%;
  min-height: clamp(300px, 52vw, 720px);
  border-bottom: 8px solid var(--black);
  overflow: hidden;
  background: var(--black);
}

.full-image img {
  display: block;
  width: 100%;
  height: clamp(300px, 52vw, 720px);
  object-fit: cover;
  object-position: center;
}

.manifesto {
  padding: 76px 0 52px;
}

.manifesto h2,
.section-head h2,
.traits h2,
.contract h2 {
  font-size: clamp(2.35rem, 7vw, 5.8rem);
  line-height: 0.92;
  text-shadow: 4px 4px 0 var(--white);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.section-head h2 {
  max-width: 760px;
}

.meme-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.meme-card {
  border: 6px solid var(--black);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 8px 8px 0 var(--black);
  transform: rotate(-0.6deg);
}

.meme-card:nth-child(even) {
  transform: rotate(0.8deg);
}

.meme-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-bottom: 6px solid var(--black);
  object-fit: cover;
}

.meme-card div {
  padding: 16px;
}

.meme-card span {
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 900;
}

.meme-card h3 {
  font-size: clamp(1.45rem, 2.2vw, 2.05rem);
  line-height: 0.98;
}

.meme-card p,
.traits p,
.contract p,
.trait-list span {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.traits {
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: 28px;
  padding: 86px 0 60px;
}

.traits-copy {
  align-self: start;
  padding: 26px;
  border: 6px solid var(--black);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 9px 9px 0 var(--black);
}

.trait-list {
  display: grid;
  gap: 15px;
}

.trait-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 92px;
  padding: 18px;
  border: 5px solid var(--black);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 6px 6px 0 var(--black);
}

.trait-list article:nth-child(1) { background: #a9f6ff; }
.trait-list article:nth-child(2) { background: #ff93d3; }
.trait-list article:nth-child(3) { background: #fff06b; }
.trait-list article:nth-child(4) { background: #77ff9d; }

.trait-list strong {
  font-family: "Permanent Marker", Impact, sans-serif;
  font-size: clamp(1.35rem, 3vw, 2.15rem);
  line-height: 0.95;
}

.contract {
  margin-bottom: 60px;
  padding: 44px;
  border: 7px solid var(--black);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(255, 238, 201, 0.9)),
    repeating-linear-gradient(90deg, var(--red) 0 70px, var(--orange) 70px 140px, var(--yellow) 140px 210px, var(--green) 210px 280px, var(--blue) 280px 350px, var(--purple) 350px 420px);
  box-shadow: 11px 11px 0 var(--black);
  text-align: center;
}

.contract h2 {
  overflow-wrap: anywhere;
}

.contract p {
  max-width: 640px;
  margin: 18px auto 0;
}

.contract-actions {
  justify-content: center;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px max(18px, calc((100vw - var(--max)) / 2));
  border-top: 7px solid var(--black);
  background: var(--black);
  color: var(--white);
  font-weight: 900;
}

footer p {
  margin: 0;
}

footer p:first-child {
  font-family: "Permanent Marker", Impact, sans-serif;
  font-size: 2rem;
}

@media (max-width: 920px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  nav a {
    min-height: 38px;
    padding: 0 8px;
    font-size: 0.75rem;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 178px;
  }

  .hero-logo {
    justify-self: center;
  }

  .meme-grid,
  .traits {
    grid-template-columns: 1fr 1fr;
  }

  .traits-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .topbar {
    top: 8px;
    right: 18px;
    left: 18px;
    width: auto;
    box-shadow: 3px 3px 0 var(--black);
    transform: none;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  nav {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    min-width: 0;
  }

  nav a {
    min-width: 0;
  }

  .hero {
    padding-top: 202px;
    padding-inline: 18px;
  }

  .hero-logo {
    width: 100%;
    transform: none;
  }

  .hero-logo img {
    width: calc(100% - 8px);
    box-shadow: 6px 6px 0 var(--black);
  }

  h1 {
    max-width: 100%;
    font-size: clamp(3.35rem, 20vw, 5.15rem);
    -webkit-text-stroke: 2px var(--black);
    text-shadow:
      5px 5px 0 var(--pink),
      9px 9px 0 var(--black);
  }

  .tagline {
    font-size: 1.35rem;
  }

  .button {
    width: 100%;
  }

  .section-head {
    display: block;
  }

  .meme-grid,
  .traits {
    grid-template-columns: 1fr;
  }

  .trait-list article {
    align-items: flex-start;
    flex-direction: column;
  }

  .contract {
    padding: 28px 16px;
  }

  .meme-card,
  .traits-copy,
  .trait-list article,
  .contract {
    box-shadow: 4px 4px 0 var(--black);
    transform: none;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
