:root {
  --cyan: #09b8d8;
  --aqua: #24d8d0;
  --ink: #07090f;
  --black: #03040a;
  --paper: #fff9ef;
  --pink: #ff4f94;
  --hot: #ff2d55;
  --orange: #ff7a00;
  --yellow: #ffe45e;
  --lime: #b5ff4d;
  --line: #11131b;
  --shadow: 8px 8px 0 var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 228, 94, 0.95) 0 8rem, transparent 8.1rem),
    radial-gradient(circle at 88% 12%, rgba(255, 79, 148, 0.9) 0 7rem, transparent 7.1rem),
    radial-gradient(circle at 82% 82%, rgba(181, 255, 77, 0.72) 0 8rem, transparent 8.1rem),
    linear-gradient(135deg, #0bc7df 0%, #28d5ce 42%, #fdf4df 42%, #fdf4df 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  position: fixed;
  inset: auto;
  z-index: -2;
  width: 34vw;
  min-width: 280px;
  aspect-ratio: 1;
  content: "";
  border: 4px solid rgba(7, 9, 15, 0.14);
  transform: rotate(18deg);
  animation: drift 12s ease-in-out infinite alternate;
}

body::before {
  top: 16%;
  left: -12vw;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.42) 0 14px, transparent 14px 28px);
}

body::after {
  right: -10vw;
  bottom: 5%;
  background: repeating-linear-gradient(-45deg, rgba(255, 122, 0, 0.38) 0 12px, transparent 12px 24px);
  animation-delay: -4s;
}

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

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

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(7, 9, 15, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 9, 15, 0.09) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
  animation: gridShift 9s linear infinite;
}

.ticker {
  width: 100%;
  overflow: hidden;
  border-block: 3px solid var(--ink);
  color: var(--paper);
  background: var(--ink);
}

.top-ticker {
  position: relative;
  z-index: 10;
}

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

.ticker span {
  flex: 0 0 auto;
  padding: 0.55rem 1.5rem;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(1rem, 2vw, 1.45rem);
  letter-spacing: 0;
  text-transform: uppercase;
}

.ticker span:nth-child(3n + 1) {
  color: var(--yellow);
}

.ticker span:nth-child(3n + 2) {
  color: var(--pink);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 32px));
  margin: 1rem auto 0;
  padding: 0.65rem 0.8rem;
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 5px 5px 0 var(--ink);
  background: rgba(255, 249, 239, 0.86);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 1.45rem;
}

.brand img {
  width: 42px;
  height: 42px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  object-fit: cover;
}

nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  padding: 0.58rem 0.82rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
  transition: background 180ms ease, transform 180ms ease;
}

nav a:hover {
  background: var(--yellow);
  transform: translateY(-2px) rotate(-1deg);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  min-height: calc(86svh - 76px);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2rem, 6vw, 4rem);
}

.hero::before {
  position: absolute;
  inset: 7% auto auto 34%;
  z-index: -1;
  content: "BRAT";
  color: rgba(255, 255, 255, 0.32);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(6rem, 20vw, 18rem);
  line-height: 1;
  text-shadow: 4px 4px 0 rgba(7, 9, 15, 0.12);
  transform: rotate(-9deg);
  animation: thump 3.6s ease-in-out infinite;
}

.hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--hot);
}

h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  max-width: 100%;
  font-size: clamp(4.6rem, 15vw, 13rem);
  line-height: 0.82;
  color: var(--paper);
  white-space: nowrap;
  text-shadow:
    5px 5px 0 var(--ink),
    10px 10px 0 var(--pink),
    15px 15px 0 var(--orange);
  transform-origin: left center;
  animation: titlePop 3.2s ease-in-out infinite;
}

.hero-text {
  max-width: 680px;
  margin: 2rem 0 0;
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  font-weight: 800;
  line-height: 1.45;
}

.hero-actions,
.community-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.8rem;
}

.hero-ca {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 44px;
  margin: 1rem 0 0;
  padding: 0.7rem 0.9rem;
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--paper);
  font-weight: 900;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.9rem 1.15rem;
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 5px 5px 0 var(--ink);
  font-weight: 900;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.button:hover {
  transform: translate(3px, 3px) rotate(-1deg);
  box-shadow: 2px 2px 0 var(--ink);
  filter: saturate(1.16);
}

.primary {
  background: var(--pink);
  color: white;
}

.secondary {
  background: var(--yellow);
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
}

.brat-logo {
  width: min(100%, 520px);
  aspect-ratio: 1;
  border: 5px solid var(--ink);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow);
  transform: rotate(3deg);
  animation: floatLogo 4s ease-in-out infinite;
}

.orbit {
  position: absolute;
  border: 3px dashed rgba(7, 9, 15, 0.48);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}

.orbit-one {
  width: min(110%, 610px);
  aspect-ratio: 1;
}

.orbit-two {
  width: min(82%, 460px);
  aspect-ratio: 1;
  animation-duration: 12s;
  animation-direction: reverse;
}

.coin {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(54px, 8vw, 86px);
  aspect-ratio: 1;
  border: 4px solid var(--ink);
  border-radius: 50%;
  box-shadow: 5px 5px 0 var(--ink);
  color: var(--ink);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--yellow);
  animation: coinBounce 2.8s ease-in-out infinite;
}

.coin-one {
  top: 7%;
  right: 4%;
}

.coin-two {
  left: 0;
  bottom: 24%;
  background: var(--lime);
  animation-delay: -0.9s;
}

.coin-three {
  right: 12%;
  bottom: 6%;
  background: var(--orange);
  animation-delay: -1.7s;
}

.meme-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto clamp(3rem, 8vw, 6rem);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  background: var(--paper);
  transform: rotate(-1deg);
}

.meme-strip span {
  display: grid;
  place-items: center;
  min-height: 72px;
  padding: 0.9rem;
  border-right: 3px solid var(--ink);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  text-align: center;
  text-transform: uppercase;
  animation: colorFlip 4s ease-in-out infinite;
}

.meme-strip span:last-child {
  border-right: 0;
}

.meme-strip span:nth-child(2) {
  animation-delay: -0.6s;
}

.meme-strip span:nth-child(3) {
  animation-delay: -1.2s;
}

.meme-strip span:nth-child(4) {
  animation-delay: -1.8s;
}

.meme-strip span:nth-child(5) {
  animation-delay: -2.4s;
}

.story-section,
.memes-section,
.roadmap-section,
.contract-section,
.community-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto clamp(3rem, 8vw, 6rem);
}

.section-heading {
  max-width: 820px;
}

h2 {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.96;
}

.story-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
  padding: clamp(2rem, 5vw, 4rem) 0;
  border-block: 4px solid var(--ink);
}

.story-text {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.6;
}

.meme-gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}

.meme-card,
.roadmap article {
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 6px 6px 0 var(--ink);
  background: var(--paper);
}

.meme-card {
  position: relative;
  grid-column: span 2;
  aspect-ratio: 1;
  margin: 0;
  padding: 0.65rem;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
  animation: liftCard 6s ease-in-out infinite;
}

.meme-card:nth-child(2) {
  animation-delay: -1.2s;
}

.meme-card:nth-child(3) {
  animation-delay: -2.4s;
}

.meme-card:nth-child(4) {
  animation-delay: -3.6s;
}

.meme-card:nth-child(5) {
  animation-delay: -4.8s;
}

.meme-card:nth-child(-n + 2) {
  grid-column: span 3;
  aspect-ratio: 4 / 3;
}

.meme-card:hover {
  transform: translateY(-8px) rotate(1deg);
  box-shadow: 9px 9px 0 var(--ink);
}

.meme-card img {
  display: block;
  width: 100%;
  height: 100%;
  border: 3px solid var(--ink);
  border-radius: 6px;
  object-fit: contain;
  background: var(--cyan);
  filter: saturate(1.18) contrast(1.04);
  transition: transform 220ms ease, filter 220ms ease;
}

.meme-card:hover img {
  transform: scale(1.04) rotate(-1deg);
  filter: saturate(1.35) contrast(1.08);
}

.roadmap h3 {
  margin-top: 0.9rem;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.roadmap p,
.community-copy p,
footer p,
footer span {
  line-height: 1.55;
}

.roadmap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
  counter-reset: brat-road;
}

.roadmap article {
  position: relative;
  min-height: 250px;
  padding: 1.25rem;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.92)),
    repeating-linear-gradient(45deg, var(--cyan) 0 10px, var(--pink) 10px 20px, var(--yellow) 20px 30px);
}

.roadmap article::after {
  position: absolute;
  right: -2rem;
  bottom: -3.2rem;
  content: "$";
  color: rgba(7, 9, 15, 0.08);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 10rem;
  transform: rotate(-18deg);
}

.roadmap span {
  display: inline-grid;
  place-items: center;
  width: 48px;
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--pink);
  color: white;
  font-weight: 900;
}

.roadmap article:nth-child(even) span {
  background: var(--orange);
}

.contract-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border: 4px solid var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--lime);
  animation: pulseBox 3s ease-in-out infinite;
}

.contract-section h2 {
  font-size: clamp(2rem, 5vw, 4.3rem);
}

.contract-pill {
  margin: 0;
  padding: 1rem;
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 5px 5px 0 var(--ink);
  background: var(--paper);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  text-align: center;
}

.community-section {
  display: block;
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.community-copy p {
  max-width: 720px;
  margin: 1rem 0 0;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 800;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem max(16px, calc((100vw - 1180px) / 2));
  border-top: 4px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.88rem;
  font-weight: 800;
}

footer p,
footer span {
  margin: 0;
}

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

@keyframes gridShift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 28px 28px, 28px 28px;
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) rotate(10deg);
  }
  to {
    transform: translate3d(2rem, -1.5rem, 0) rotate(23deg);
  }
}

@keyframes titlePop {
  0%,
  100% {
    transform: rotate(-2deg) scale(1);
  }
  50% {
    transform: rotate(1deg) scale(1.025);
  }
}

@keyframes thump {
  0%,
  100% {
    transform: rotate(-9deg) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: rotate(-6deg) scale(1.04);
    opacity: 0.45;
  }
}

@keyframes floatLogo {
  0%,
  100% {
    transform: translateY(0) rotate(3deg);
  }
  50% {
    transform: translateY(-18px) rotate(-2deg);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes coinBounce {
  0%,
  100% {
    transform: translateY(0) rotate(-8deg);
  }
  50% {
    transform: translateY(-18px) rotate(10deg);
  }
}

@keyframes colorFlip {
  0%,
  100% {
    background: var(--paper);
  }
  33% {
    background: var(--yellow);
  }
  66% {
    background: var(--pink);
    color: white;
  }
}

@keyframes liftCard {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes pulseBox {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-0.8deg);
  }
}

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
    width: min(100% - 24px, 780px);
    min-height: auto;
  }

  .hero-art {
    min-height: auto;
    padding: 1.4rem 0 0.4rem;
  }

  .brat-logo {
    width: min(100%, 430px);
  }
}

@media (max-width: 920px) {
  .site-header,
  .meme-strip,
  .story-section,
  .memes-section,
  .roadmap-section,
  .contract-section,
  .community-section {
    width: min(100% - 24px, 720px);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .meme-strip,
  .meme-gallery,
  .roadmap,
  .story-section,
  .community-section {
    grid-template-columns: 1fr;
  }

  .meme-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meme-card,
  .meme-card:nth-child(-n + 2) {
    grid-column: span 1;
    aspect-ratio: 1;
  }

  .meme-strip {
    transform: none;
  }

  .meme-strip span {
    border-right: 0;
    border-bottom: 3px solid var(--ink);
  }

  .meme-strip span:last-child {
    border-bottom: 0;
  }

  .contract-section {
    align-items: stretch;
    flex-direction: column;
  }

  .community-actions {
    margin-top: 0;
  }
}

@media (max-width: 560px) {
  body {
    background:
      radial-gradient(circle at 8% 14%, rgba(255, 228, 94, 0.95) 0 5.4rem, transparent 5.5rem),
      radial-gradient(circle at 92% 18%, rgba(255, 79, 148, 0.76) 0 4.8rem, transparent 4.9rem),
      linear-gradient(135deg, #0bc7df 0%, #28d5ce 50%, #fdf4df 50%, #fdf4df 100%);
  }

  .site-header {
    position: relative;
    margin-top: 0.75rem;
  }

  nav a {
    padding-inline: 0.58rem;
    font-size: 0.78rem;
  }

  h1 {
    font-size: clamp(3.3rem, 19vw, 6.25rem);
    text-shadow:
      3px 3px 0 var(--ink),
      6px 6px 0 var(--pink),
      9px 9px 0 var(--orange);
  }

  .hero-text {
    margin-top: 1.4rem;
  }

  .hero-actions,
  .community-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .meme-card img {
    height: 100%;
  }

  .button {
    width: 100%;
  }

  .coin {
    width: 50px;
  }

  .coin-one {
    top: 0;
    right: 0;
  }

  .coin-two {
    left: -6px;
    bottom: 18%;
  }

  .coin-three {
    right: 8%;
    bottom: 2%;
  }

  .contract-pill {
    font-size: 1rem;
  }

  footer {
    flex-direction: column;
  }
}

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