/* =========================================================
   TOKENS
   ========================================================= */
:root {
  --ink: #141414;
  --paper: #fffaf0;
  --lime: #b8ff3c;
  --cyan: #38d7ff;
  --pink: #ff4fb8;
  --orange: #ffb238;
  --violet: #7047ff;
  --panel: rgba(255, 255, 255, 0.88);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

/* =========================================================
   RESET / BASE
   ========================================================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 15%, rgba(56, 215, 255, 0.36), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(255, 79, 184, 0.28), transparent 26%),
    linear-gradient(135deg, #fffaf0 0%, #f1fff0 45%, #eff9ff 100%);
}

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

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

/* =========================================================
   HEADER / NAV
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 250, 240, 0.86);
  border-bottom: 3px solid var(--ink);
  backdrop-filter: blur(14px);
}

.navbar {
  width: min(1120px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.logo-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  background: var(--lime);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: "Bangers", cursive;
  font-size: 1.25rem;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 2px solid transparent;
  font-weight: 700;
}

.nav-links a:hover {
  border-color: var(--ink);
  background: #ffffff;
  box-shadow: 3px 3px 0 var(--ink);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 3px solid var(--ink);
  background: var(--cyan);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 22px;
  height: 3px;
  margin: 4px auto;
  background: var(--ink);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  width: min(1120px, calc(100% - 32px));
  min-height: calc(100vh - 74px);
  margin: 0 auto;
  padding: 64px 0 44px;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 450px);
  align-items: center;
  gap: 48px;
}

.tag {
  margin: 0 0 10px;
  color: #0a6758;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: "Bangers", cursive;
  font-size: clamp(4rem, 11vw, 8.5rem);
  line-height: 0.88;
  letter-spacing: 0;
  text-shadow: 6px 6px 0 var(--lime), 10px 10px 0 var(--ink);
}

.hero-text {
  max-width: 620px;
  margin: 32px 0 0;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.7;
  font-weight: 600;
}

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

/* =========================================================
   BUTTONS
   ========================================================= */
.primary-button,
.secondary-button,
.click-button,
.reset-button {
  min-height: 48px;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  cursor: pointer;
  font: 800 1rem "Poppins", Arial, sans-serif;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
}

.primary-button {
  background: var(--pink);
  color: #ffffff;
}

.secondary-button {
  background: #ffffff;
}

.primary-button:hover,
.secondary-button:hover,
.click-button:hover,
.reset-button:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--ink);
}

/* =========================================================
   GAME PREVIEW
   ========================================================= */
.game-preview {
  min-height: 520px;
  padding: 20px;
  border: 4px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(20, 20, 20, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(20, 20, 20, 0.08) 1px, transparent 1px),
    linear-gradient(145deg, #ffffff, #defcff 55%, #fff0a6);
  background-size: 34px 34px, 34px 34px, auto;
  box-shadow: var(--shadow), 9px 9px 0 var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.screen-top,
.screen-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.screen-top span,
.screen-bottom span {
  border: 3px solid var(--ink);
  background: #ffffff;
  padding: 8px 10px;
  font-weight: 800;
  box-shadow: 3px 3px 0 var(--ink);
}

.brainrot-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 260px;
}

.avatar {
  position: relative;
  z-index: 2;
  width: 180px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 5px solid var(--ink);
  background: conic-gradient(from 20deg, var(--lime), var(--cyan), var(--pink), var(--orange), var(--lime));
  box-shadow: 10px 10px 0 var(--ink);
  transform: rotate(-4deg);
}

.avatar span {
  width: 112px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 5px solid var(--ink);
  background: #ffffff;
  font-family: "Bangers", cursive;
  font-size: 3rem;
}

.pulse-ring {
  position: absolute;
  width: 250px;
  aspect-ratio: 1;
  border: 5px dashed var(--violet);
  animation: spin 10s linear infinite;
}

/* =========================================================
   SECTIONS
   ========================================================= */
.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2,
.play-section h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.05;
}

/* =========================================================
   ABOUT GRID
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.about-grid article {
  border: 3px solid var(--ink);
  background: var(--panel);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 22px;
}

.about-grid h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.about-grid p {
  line-height: 1.65;
}

/* =========================================================
   FEATURE BAND
   ========================================================= */
.feature-band {
  width: 100%;
  max-width: none;
  padding: 72px max(16px, calc((100% - 1120px) / 2));
  background: #141414;
  color: #ffffff;
}

.feature-band .tag {
  color: var(--lime);
}

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

.feature {
  border: 3px solid var(--ink);
  background: var(--panel);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 22px;
  color: var(--ink);
}

.feature h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.feature p {
  line-height: 1.65;
}

.feature-number {
  display: inline-block;
  margin-bottom: 20px;
  font-family: "Bangers", cursive;
  font-size: 2.2rem;
  color: var(--pink);
}

/* =========================================================
   CLICKER / COUNTER
   ========================================================= */
.clicker-panel {
  border: 3px solid var(--ink);
  background: var(--panel);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(184, 255, 60, 0.55));
}

.counter-box {
  border: 3px solid var(--ink);
  background: var(--panel);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 22px;
  text-align: center;
  background: #ffffff;
}

.counter-box p {
  margin: 0;
  font-weight: 800;
}

.counter-box strong {
  display: block;
  margin: 8px 0 18px;
  font-family: "Bangers", cursive;
  font-size: 5rem;
  line-height: 1;
}

.clicker-panel p {
  line-height: 1.65;
}

.click-button,
.reset-button {
  width: 100%;
  margin-top: 12px;
}

.click-button {
  background: var(--lime);
}

.reset-button {
  background: var(--orange);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  margin-top: 60px;
  padding: 50px 20px 20px;
  background: #141414;
  color: white;
  border-top: 5px solid var(--lime);
}

.footer-content {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.footer-logo {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  background: var(--lime);
  color: #141414;
  border: 3px solid white;
  box-shadow: 5px 5px 0 var(--pink);
  font-family: "Bangers", cursive;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.footer-brand h2,
.footer-box h3 {
  margin: 0 0 12px;
}

.footer-brand h2 {
  font-size: 1.8rem;
}

.footer-brand p,
.footer-bottom p,
.footer-bottom span {
  margin: 0;
  color: #d8d8d8;
  line-height: 1.6;
}

.footer-box {
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.18);
}

.footer-box ul {
  margin: 0;
  padding-left: 18px;
}

.footer-box li {
  margin-bottom: 8px;
  color: #e7e7e7;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: white;
  font-weight: 700;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--lime);
}

.footer-bottom {
  width: min(1120px, 100%);
  margin: 34px auto 0;
  padding-top: 18px;
  border-top: 2px solid rgba(255, 255, 255, 0.18);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* =========================================================
   ANIMATIONS
   ========================================================= */
.pop {
  animation: pop 220ms ease;
}

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

@keyframes pop {
  50% {
    transform: scale(1.08);
  }
}

/* =========================================================
   MEDIA QUERIES
   ========================================================= */
@media (max-width: 860px) {
  .menu-button {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    background: #ffffff;
    border-bottom: 3px solid var(--ink);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    border: 2px solid var(--ink);
    background: var(--paper);
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .game-preview {
    min-height: 420px;
  }

  .about-grid,
  .features,
  .clicker-panel {
    grid-template-columns: 1fr;
  }

  .counter-box {
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .navbar,
  .hero,
  .section {
    width: min(100% - 22px, 1120px);
  }

  h1 {
    font-size: 4.15rem;
    text-shadow: 4px 4px 0 var(--lime), 7px 7px 0 var(--ink);
  }

  .game-preview {
    padding: 14px;
  }

  .avatar {
    width: 142px;
  }

  .pulse-ring {
    width: 210px;
  }

  .site-footer {
    align-items: flex-start;
  }
}