:root {
  --sky: #52afe6;
  --orange: #e55d2d;
  --sage: #9eb680;
  --navy: #1f335e;
  --taupe: #887c63;
  --ink: #1e1e1e;
  --white: #ffffff;
  --display: "Luckiest Guy", "Comic Sans MS", cursive;
  --mono: "Inconsolata", ui-monospace, monospace;
  --hand: "Indie Flower", cursive;
  --shadow: 4px 4px 0 0 #1e1e1e;
  --radius: 12px;
  --header-h: 88px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--mono);
  line-height: 1.5;
  min-height: 100%;
}

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

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

button,
.btn {
  font-family: inherit;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--ink);
  color: var(--white);
  padding: 8px 14px;
  z-index: 1000;
  border-radius: 6px;
}

.skip-link:focus {
  top: 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: 12px 16px 0;
}

.nav-shell {
  max-width: 1180px;
  margin: 0 auto;
  background: var(--white);
  border: 2px solid #000;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 8px 14px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #000;
  object-fit: cover;
  background: #8a9274;
}

.brand-name {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.5px;
  line-height: 1;
  color: #000;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border-radius: 999px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 0.7;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.socials {
  display: none;
  align-items: center;
  gap: 6px;
}

.social {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.social:hover {
  transform: scale(1.1);
}

.social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.menu-btn {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #000;
}

.menu-btn svg {
  width: 24px;
  height: 24px;
}

.mobile-nav {
  display: none;
  position: absolute;
  left: 16px;
  right: 16px;
  top: 84px;
  background: #fff;
  border: 2px solid #000;
  border-radius: 24px;
  padding: 16px;
  box-shadow: var(--shadow);
  z-index: 90;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-socials {
  display: flex;
  gap: 8px;
  padding: 12px 8px 4px;
}

@media (min-width: 980px) {
  .nav-links,
  .socials {
    display: flex;
  }
  .menu-btn {
    display: none;
  }
  .mobile-nav {
    display: none !important;
  }
}

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: #fff;
  font-family: var(--mono);
  font-weight: 800;
  border: 4px solid var(--ink);
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 10px 22px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  min-height: 48px;
  letter-spacing: 0.04em;
}

.btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 0 var(--ink);
}

.btn:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.btn-buy {
  padding: 8px 18px;
  min-width: 72px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
  font-size: clamp(16px, 2vw, 24px);
}

.btn-lg {
  font-size: clamp(18px, 3vw, 32px);
  padding: 14px 36px;
}

/* Banner */
.hero-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #3aa0e0;
  aspect-ratio: 16 / 7.2;
  min-height: 220px;
}

.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
}

.banner-copy {
  position: absolute;
  left: 5%;
  top: 50%;
  transform: translateY(-54%) rotate(-7deg);
  pointer-events: none;
}

.banner-copy h1 {
  margin: 0;
  font-family: var(--display);
  color: #fff;
  font-size: clamp(48px, 10vw, 140px);
  line-height: 0.82;
  letter-spacing: 1px;
  text-shadow:
    5px 5px 0 #000,
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000,
    0 8px 0 rgba(0, 0, 0, 0.25);
}

.cto-pill {
  display: inline-block;
  margin-top: 10px;
  background: var(--orange);
  color: #fff;
  font-family: var(--display);
  font-size: clamp(22px, 4vw, 48px);
  padding: 4px 28px 8px;
  border: 4px solid #000;
  border-radius: 18px;
  text-shadow: 2px 2px 0 #000;
  box-shadow: 4px 4px 0 #000;
}

/* Page canvas */
.sky {
  position: relative;
  background: var(--sky);
  overflow: hidden;
}

.sparkle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fde68a;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  opacity: 0.55;
  animation: twinkle 2.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.15);
  }
}

.wrap {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Contract */
.ca-block {
  text-align: center;
  padding: 28px 0 8px;
}

.ca-block h2 {
  font-family: var(--display);
  font-size: clamp(22px, 4vw, 36px);
  margin: 0 0 12px;
}

.ca-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 16px;
  padding: 10px 12px;
  max-width: 720px;
  margin: 0 auto;
}

.ca-label {
  background: var(--orange);
  color: #fff;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 10px;
  flex-shrink: 0;
}

.ca-value {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.copy-btn {
  border: 0;
  background: transparent;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  cursor: pointer;
  color: #000;
  display: grid;
  place-items: center;
}

.copy-btn:hover {
  background: var(--orange);
  color: #fff;
}

.copy-btn svg {
  width: 22px;
  height: 22px;
}

.toast {
  position: fixed;
  top: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #000;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.future-title {
  font-family: var(--display);
  font-size: clamp(28px, 5vw, 48px);
  text-align: center;
  margin: 48px 0 8px;
  color: #000;
}

/* Join */
.join {
  display: grid;
  gap: 24px;
  align-items: center;
  padding: 16px 0 40px;
}

.join-copy h2 {
  font-family: var(--display);
  text-align: center;
  margin: 0 0 18px;
  color: var(--orange);
  font-size: clamp(32px, 6vw, 72px);
  line-height: 0.95;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.15);
}

.join-copy h2 span {
  display: block;
  color: #000;
  font-size: 0.55em;
}

.facts {
  border: 2px solid #000;
  border-radius: 12px;
  padding: 20px 18px 24px;
  transform: rotate(-2deg);
  max-width: 560px;
  margin: 0 auto;
}

.facts h3 {
  font-family: var(--display);
  color: #fff;
  text-align: center;
  font-size: clamp(28px, 5vw, 56px);
  margin: 0 0 12px;
  text-shadow: 2px 2px 0 #000;
}

.facts ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.facts li {
  font-family: var(--display);
  color: #fff;
  font-size: clamp(16px, 2.4vw, 26px);
  text-align: left;
  display: flex;
  gap: 10px;
  line-height: 1.25;
  text-shadow: 1px 1px 0 #000;
}

.facts li svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 4px;
}

.blurb {
  font-family: var(--display);
  text-align: center;
  font-size: clamp(16px, 2vw, 22px);
  max-width: 640px;
  margin: 22px auto 0;
  color: #111;
}

.join-art {
  display: flex;
  justify-content: center;
}

.join-art img {
  width: min(520px, 92%);
  transition: transform 0.3s ease;
}

.join-art img:hover {
  transform: scale(1.05);
}

@media (min-width: 980px) {
  .join {
    grid-template-columns: 1fr 1fr;
  }
}

/* Generator teaser */
.generator-cta {
  text-align: center;
  padding: 28px 0 12px;
}

.generator-cta h2 {
  font-family: var(--display);
  font-size: clamp(32px, 6vw, 64px);
  margin: 0 0 8px;
}

.generator-cta p {
  font-family: var(--display);
  font-size: clamp(16px, 2.4vw, 24px);
  margin: 0 0 18px;
}

/* Become */
.become {
  text-align: center;
  padding: 40px 0 20px;
}

.become h2 {
  font-family: var(--display);
  font-size: clamp(28px, 5vw, 48px);
  margin: 0;
}

.become .with {
  font-family: var(--display);
  font-size: clamp(20px, 3vw, 36px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 22px;
}

.pay-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.pay-chip {
  background: #fff;
  border: 2px solid #000;
  border-radius: 10px;
  padding: 8px 16px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
}

/* How to buy */
.howto {
  padding: 28px 0 48px;
}

.howto h2 {
  font-family: var(--display);
  text-align: center;
  font-size: clamp(28px, 5vw, 48px);
  margin: 0 0 28px;
  line-height: 1.15;
}

.steps {
  display: grid;
  gap: 16px;
}

.step {
  background: var(--sage);
  border: 4px solid #000;
  border-radius: 28px;
  padding: 22px 18px 20px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.12);
}

.step h3 {
  font-family: var(--display);
  color: #fff;
  text-align: center;
  font-size: clamp(22px, 2.4vw, 30px);
  margin: 0 0 14px;
  text-shadow: 2px 2px 0 #000;
}

.step p {
  font-weight: 800;
  text-align: center;
  font-size: 14px;
  flex: 1;
  margin: 0 0 20px;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Exchanges */
.exchanges {
  background: var(--navy);
  padding: 48px 0 64px;
  margin-top: 24px;
}

.exchanges h2 {
  font-family: var(--display);
  color: #fff;
  text-align: center;
  font-size: clamp(36px, 6vw, 64px);
  margin: 0 0 8px;
  text-shadow: 2px 2px 0 #000;
}

.exchanges .sub {
  font-family: var(--display);
  color: #fff;
  text-align: center;
  font-size: clamp(16px, 2.4vw, 24px);
  margin: 0;
}

.ex-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.ex-card {
  background: #fff;
  border: 2px solid #000;
  border-radius: 8px;
  min-height: 72px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  padding: 12px;
  text-align: center;
}

.ex-card:hover {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 0 #000;
}

@media (min-width: 700px) {
  .ex-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1100px) {
  .ex-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* About */
.what {
  font-family: var(--display);
  font-size: clamp(24px, 4vw, 36px);
  text-align: left;
  margin: 48px 0 0;
  color: #000;
}

.about,
.mission {
  display: grid;
  gap: 20px;
  align-items: center;
  padding: 24px 0 12px;
}

.panel {
  border: 2px solid #000;
  border-radius: 12px;
  padding: 22px 18px;
  transform: rotate(-2deg);
  max-width: 640px;
}

.panel h2 {
  font-family: var(--display);
  color: var(--orange);
  text-align: center;
  font-size: clamp(32px, 6vw, 64px);
  margin: 0 0 12px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.12);
}

.panel p {
  font-family: var(--display);
  text-align: center;
  font-size: clamp(16px, 2.2vw, 22px);
  margin: 0;
}

.about-art,
.mission-art {
  display: flex;
  justify-content: center;
}

.about-art img,
.mission-art img {
  width: min(420px, 90%);
  transition: transform 0.3s ease;
}

.about-art img:hover,
.mission-art img:hover {
  transform: scale(1.05);
}

.mission {
  padding-bottom: 40px;
}

.mission-art img {
  transform: scaleX(-1);
}

.mission-art img:hover {
  transform: scaleX(-1) scale(1.05);
}

@media (min-width: 980px) {
  .about,
  .mission {
    grid-template-columns: 1fr 1fr;
  }
}

/* Stage / memes */
.stage {
  position: relative;
  min-height: 80vh;
  background: #4a0d12 url("assets/stage.jpg") center / cover no-repeat;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 40px 16px 60px;
  overflow: hidden;
}

.stage-inner {
  width: min(1100px, 100%);
  position: relative;
  z-index: 2;
}

.carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 12px 8px 20px;
  scrollbar-width: none;
  max-width: 920px;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.meme-card {
  flex: 0 0 220px;
  height: 280px;
  background: #111;
  border: 4px solid #000;
  border-radius: 8px;
  overflow: hidden;
  scroll-snap-align: center;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
}

.meme-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.car-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid #000;
  background: var(--orange);
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

/* Footer */
.site-footer {
  background: #fff;
  color: #fff;
  position: relative;
  padding: 0;
}

.footer-art {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  pointer-events: none;
  background: #fff;
}

.footer-art img {
  width: min(520px, 90%);
  max-height: 280px;
  object-fit: contain;
  object-position: center bottom;
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  background: var(--taupe);
  padding: 18px 24px 22px;
}

.footer-socials {
  display: flex;
  gap: 8px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.footer-meta a:hover {
  text-decoration: underline;
}

/* Inner pages */
.page-hero {
  padding: 40px 0 20px;
  text-align: center;
}

.page-hero img {
  mix-blend-mode: multiply;
}

.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(32px, 6vw, 64px);
  margin: 0 0 12px;
  line-height: 1.05;
}

.page-hero p {
  font-family: var(--display);
  font-size: clamp(16px, 2.4vw, 24px);
  margin: 0 auto;
  max-width: 640px;
}

.prose {
  max-width: 820px;
  margin: 0 auto;
  padding: 8px 0 48px;
}

.prose h2 {
  font-family: var(--display);
  font-size: clamp(24px, 4vw, 40px);
  color: var(--orange);
}

.prose p,
.prose li {
  font-size: 18px;
  font-weight: 700;
}

.theory-grid {
  display: grid;
  gap: 16px;
  padding-bottom: 48px;
}

.theory-card {
  background: #fff;
  border: 3px solid #000;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.theory-card h3 {
  font-family: var(--display);
  margin: 0 0 6px;
  font-size: 24px;
}

.theory-card .year {
  font-weight: 800;
  color: var(--orange);
  margin-bottom: 8px;
}

.theory-card blockquote {
  margin: 0 0 10px;
  font-family: var(--hand);
  font-size: 20px;
}

@media (min-width: 800px) {
  .theory-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Meme generator */
.gen-layout {
  display: grid;
  gap: 24px;
  padding: 12px 0 56px;
}

.gen-panel {
  background: #fff;
  border: 3px solid #000;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.gen-panel label {
  display: block;
  font-weight: 800;
  margin: 12px 0 6px;
}

.gen-panel input[type="text"],
.gen-panel select {
  width: 100%;
  min-height: 44px;
  border: 2px solid #000;
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
}

.templates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.templates button {
  border: 2px solid #000;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #eee;
  min-height: 72px;
}

.templates button.active {
  outline: 3px solid var(--orange);
}

.templates img {
  width: 100%;
  height: 80px;
  object-fit: cover;
}

.canvas-wrap {
  display: flex;
  justify-content: center;
}

#memeCanvas {
  width: min(520px, 100%);
  height: auto;
  background: #8a9274;
  border: 4px solid #000;
  border-radius: 8px;
}

@media (min-width: 980px) {
  .gen-layout {
    grid-template-columns: 340px 1fr;
    align-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}
