:root {
  --bg: #101a13;
  --panel: #f7f0de;
  --ink: #0c1710;
  --green: #48d978;
  --headline-green: #62cc8a;
  --green-dark: #0b6d35;
  --yellow: #ffe65a;
  --red: #ff5959;
  --blue: #45c8ff;
  --muted: #536456;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 230, 90, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(69, 200, 255, 0.08) 1px, transparent 1px),
    var(--bg);
  background-size: 46px 46px;
  font-family:
    Arial Rounded MT Bold, Arial, Helvetica, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.site {
  min-height: 100svh;
}

.hero-section {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1.2rem;
  padding: 1.4rem;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  width: min(42rem, 96vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 230, 90, 0.34), transparent 35%),
    radial-gradient(circle at 50% 50%, rgba(72, 217, 120, 0.22), transparent 66%);
  filter: blur(1px);
  z-index: -1;
  animation: pulseGlow 4s ease-in-out infinite;
}

.hero-title {
  position: relative;
  z-index: 4;
  margin: 0 0 -0.35rem;
  color: var(--headline-green);
  font-family:
    Cooper Black, Arial Rounded MT Bold, Impact, Arial, Helvetica, sans-serif;
  font-size: 5.2rem;
  font-weight: 950;
  line-height: 0.82;
  letter-spacing: 0;
  text-transform: uppercase;
  -webkit-text-stroke: 2px var(--ink);
  text-shadow:
    5px 5px 0 #fff,
    9px 9px 0 rgba(12, 23, 16, 0.35);
  transform: rotate(-2deg);
  animation: titleBoop 3.4s ease-in-out infinite;
}

.hero-title::after {
  content: "";
  position: absolute;
  right: -0.42em;
  top: 0.08em;
  width: 0.28em;
  aspect-ratio: 1 / 1;
  border: 2px solid var(--ink);
  background: var(--blue);
  box-shadow: 3px 3px 0 rgba(12, 23, 16, 0.24);
  transform: rotate(18deg);
}

.hero-character {
  position: relative;
  width: min(24rem, 78vw);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  animation: heroFloat 4.5s ease-in-out infinite;
}

.hero-pup {
  position: relative;
  z-index: 2;
  width: 86%;
  height: 86%;
  border-radius: 22px;
  object-fit: cover;
  filter:
    drop-shadow(9px 12px 0 var(--green-dark))
    drop-shadow(0 20px 35px rgba(0, 0, 0, 0.38));
  transform: rotate(-2deg);
  user-select: none;
  -webkit-user-drag: none;
  animation: heroWiggle 5s ease-in-out infinite;
}

.hero-ring {
  position: absolute;
  inset: 3%;
  z-index: 1;
  border: 4px solid rgba(255, 230, 90, 0.86);
  border-left-color: var(--blue);
  border-bottom-color: transparent;
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(255, 230, 90, 0.08);
  animation: heroSpin 13s linear infinite;
}

.hero-pop {
  position: absolute;
  z-index: 3;
  display: block;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(12, 23, 16, 0.22);
}

.hero-pop-one {
  left: 2%;
  top: 18%;
  width: 2.7rem;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--yellow);
  animation: popDrift 3.2s ease-in-out infinite;
}

.hero-pop-two {
  right: 0;
  top: 32%;
  width: 3.1rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--blue);
  transform: rotate(12deg);
  animation: popDrift 3.8s ease-in-out infinite reverse;
}

.hero-pop-three {
  left: 12%;
  bottom: 11%;
  width: 2.4rem;
  aspect-ratio: 1 / 1;
  background: var(--red);
  transform: rotate(14deg);
  animation: popDrift 4.2s ease-in-out infinite;
}

.hero-pop-three::before,
.hero-pop-three::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62%;
  height: 4px;
  border-radius: 999px;
  background: #fff;
  transform: translate(-50%, -50%);
}

.hero-pop-three::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.pfp-section {
  min-height: 100svh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1rem;
  padding: 1.4rem;
  background: rgba(247, 240, 222, 0.08);
}

.pfp-card {
  width: min(38rem, 100%);
  display: grid;
  justify-items: center;
  gap: 1rem;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  padding: 1.25rem;
  box-shadow: 12px 12px 0 var(--green-dark), var(--shadow);
}

.pfp-card h1 {
  margin: 0;
  color: var(--headline-green);
  font-family:
    Cooper Black, Arial Rounded MT Bold, Impact, Arial, Helvetica, sans-serif;
  font-size: 3.2rem;
  font-weight: 950;
  line-height: 0.9;
  text-transform: uppercase;
  -webkit-text-stroke: 1.5px var(--ink);
  text-shadow: 4px 4px 0 #fff;
}

.eyebrow {
  margin: 0;
  color: var(--headline-green);
  font-size: 0.9rem;
  font-weight: 950;
  text-transform: uppercase;
}

.pup-stage {
  position: relative;
  width: min(32rem, 86vw, 64svh);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #fff6dc;
  box-shadow: 8px 8px 0 var(--green-dark), 0 14px 36px rgba(0, 0, 0, 0.18);
  transform-origin: center bottom;
}

.pup-stage.is-bouncing {
  animation: bounce 360ms ease;
}

.pup-base {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.accessory {
  position: absolute;
  z-index: 2;
  display: block;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.82) rotate(-3deg);
  transition: opacity 160ms ease, transform 180ms ease;
  user-select: none;
  -webkit-user-drag: none;
}

.accessory.is-active {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.accessory-glasses-thug {
  left: 17.3%;
  top: 32.4%;
  width: 65.4%;
  height: 14.4%;
}

.accessory-glasses-thug::before,
.accessory-glasses-thug::after,
.accessory-glasses-slim::before,
.accessory-glasses-slim::after,
.accessory-glasses-pixel::before,
.accessory-glasses-pixel::after {
  content: "";
  position: absolute;
  background: #050505;
  image-rendering: pixelated;
}

.accessory-glasses-thug::before {
  left: 0;
  top: 0;
  width: 46%;
  height: 72%;
  clip-path: polygon(0 0, 100% 0, 78% 74%, 34% 100%, 12% 66%);
}

.accessory-glasses-thug::after {
  right: 0;
  top: 0;
  width: 46%;
  height: 72%;
  clip-path: polygon(0 0, 100% 0, 88% 66%, 66% 100%, 22% 74%);
}

.accessory-glasses-thug span,
.accessory-glasses-slim span,
.accessory-glasses-pixel span {
  position: absolute;
  z-index: 2;
  width: 4.6%;
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(90deg, #fff 50%, transparent 50%) 0 0 / 50% 50%,
    linear-gradient(90deg, transparent 50%, #fff 50%) 0 50% / 50% 50%;
  image-rendering: pixelated;
}

.accessory-glasses-thug span:first-child {
  left: 20%;
  top: 22%;
  box-shadow: 0.9rem 0.55rem 0 #fff, 1.8rem 1.1rem 0 #fff;
}

.accessory-glasses-thug span:last-child {
  right: 23%;
  top: 20%;
  box-shadow: 0.9rem 0.55rem 0 #fff, 1.8rem 1.1rem 0 #fff;
}

.accessory-glasses-thug .bridge,
.accessory-glasses-slim .bridge {
  display: none;
}

.accessory-glasses-thug::selection,
.accessory-glasses-slim::selection {
  background: transparent;
}

.accessory-glasses-thug {
  border-top: 10px solid #050505;
}

.accessory-glasses-slim {
  left: 19.6%;
  top: 33.1%;
  width: 60.8%;
  height: 10.8%;
}

.accessory-glasses-slim::before {
  left: 0;
  top: 20%;
  width: 47%;
  height: 54%;
  clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%);
}

.accessory-glasses-slim::after {
  right: 0;
  top: 20%;
  width: 47%;
  height: 54%;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 20% 100%);
}

.accessory-glasses-slim span:first-child {
  left: 24%;
  top: 18%;
  box-shadow: 0.7rem 0.4rem 0 #fff;
}

.accessory-glasses-slim span:last-child {
  right: 24%;
  top: 18%;
  box-shadow: 0.7rem 0.4rem 0 #fff;
}

.accessory-glasses-slim {
  border-top: 8px solid #050505;
}

.accessory-glasses-cyber {
  left: 21.3%;
  top: 32.9%;
  width: 57.4%;
  height: 12.2%;
  border: 6px solid #050505;
  border-radius: 14px 14px 20px 20px;
  background:
    linear-gradient(90deg, rgba(255, 230, 90, 0.82), rgba(69, 200, 255, 0.95), rgba(72, 217, 120, 0.86));
  box-shadow:
    inset 0 -12px 0 rgba(5, 5, 5, 0.18),
    0 4px 0 rgba(0, 0, 0, 0.22);
  clip-path: polygon(0 0, 100% 0, 95% 72%, 58% 100%, 42% 100%, 5% 72%);
}

.accessory-glasses-cyber span {
  position: absolute;
  left: 48%;
  top: 0;
  width: 4%;
  height: 100%;
  background: #050505;
}

.accessory-glasses-pixel {
  left: 17.9%;
  top: 31.6%;
  width: 64.2%;
  height: 15.4%;
}

.accessory-glasses-pixel::before {
  left: 0;
  top: 8%;
  width: 46%;
  height: 76%;
  clip-path: polygon(0 0, 100% 0, 100% 55%, 78% 55%, 78% 78%, 56% 78%, 56% 100%, 0 100%);
}

.accessory-glasses-pixel::after {
  right: 0;
  top: 8%;
  width: 46%;
  height: 76%;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 44% 100%, 44% 78%, 22% 78%, 22% 55%, 0 55%);
}

.accessory-glasses-pixel span:first-child {
  left: 22%;
  top: 20%;
  box-shadow: 0.75rem 0.42rem 0 #fff, 1.5rem 0.84rem 0 #fff;
}

.accessory-glasses-pixel span:last-child {
  right: 24%;
  top: 20%;
  box-shadow: 0.75rem 0.42rem 0 #fff, 1.5rem 0.84rem 0 #fff;
}

.accessory-mustache {
  left: 37.1%;
  top: 56.7%;
  width: 25.5%;
}

.accessory-bowtie {
  left: 38.6%;
  top: 76%;
  width: 22.8%;
}

.contract-box {
  display: grid;
  width: min(46rem, 100%);
  grid-template-columns: minmax(0, 1fr) repeat(3, 48px);
  align-items: center;
  gap: 0.65rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  padding: 0.75rem;
  box-shadow: 8px 8px 0 rgba(72, 217, 120, 0.54);
}

.contract-box strong {
  display: block;
  min-width: 0;
  color: var(--ink);
  font-size: clamp(0.88rem, 2vw, 1.05rem);
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.contract-box button,
.controls button {
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-weight: 950;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.contract-box button {
  width: 48px;
  height: 40px;
  background: var(--yellow);
  color: var(--ink);
  padding: 0;
  box-shadow: 4px 4px 0 rgba(12, 23, 16, 0.18);
}

.social-link {
  display: grid;
  width: 48px;
  height: 40px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 0.8rem;
  box-shadow: 4px 4px 0 rgba(12, 23, 16, 0.2);
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.social-link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(12, 23, 16, 0.18);
  background: var(--yellow);
}

.x-link span {
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.comm-link img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.controls-shell {
  width: min(42rem, 100%);
  display: grid;
  gap: 0.65rem;
}

.controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.controls button {
  min-height: 48px;
  background: #fff;
  color: var(--ink);
  padding: 0 0.75rem;
  box-shadow: 4px 4px 0 rgba(12, 23, 16, 0.2);
}

.icon {
  position: relative;
  display: block;
}

.icon-copy {
  width: 22px;
  height: 22px;
}

.icon-copy::before,
.icon-copy::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 15px;
  border: 3px solid var(--ink);
  border-radius: 4px;
  background: var(--yellow);
}

.icon-copy::before {
  left: 2px;
  top: 5px;
}

.icon-copy::after {
  right: 2px;
  top: 1px;
  background: #fff7a8;
}

.controls button:hover,
.contract-box button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(12, 23, 16, 0.18);
}

.controls button.is-active {
  background: var(--green);
}

.controls button[data-random] {
  background: var(--blue);
}

.controls button[data-reset] {
  background: var(--red);
  color: #fff;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 10;
  max-width: min(22rem, calc(100vw - 2rem));
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--green);
  color: var(--ink);
  padding: 0.8rem 1rem;
  font-weight: 950;
  transform: translateY(150%);
  transition: transform 180ms ease;
}

.toast.is-visible {
  transform: translateY(0);
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }

  35% {
    transform: translateY(-10px) rotate(-1deg);
  }

  70% {
    transform: translateY(4px) rotate(1deg);
  }
}

@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

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

  48% {
    transform: rotate(1.6deg) scale(1.02);
  }
}

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

@keyframes popDrift {
  0%,
  100% {
    translate: 0 0;
  }

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

@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.78;
    transform: scale(0.96);
  }

  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes titleBoop {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateY(-6px) rotate(1deg);
  }
}

@media (max-width: 780px) {
  .controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .hero-section,
  .pfp-section {
    padding: 0.8rem;
  }

  .pfp-card {
    padding: 0.85rem;
  }

  .pfp-card h1 {
    font-size: 2.4rem;
  }

  .hero-title {
    font-size: 3.4rem;
    -webkit-text-stroke-width: 1px;
    text-shadow:
      3px 3px 0 #fff,
      6px 6px 0 rgba(12, 23, 16, 0.35);
  }

  .contract-box {
    grid-template-columns: minmax(0, 1fr) repeat(3, 48px);
    gap: 0.5rem;
  }

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

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