/* ==========================================================================
   VibeCat — comic book reader
   Pages float in 3D over a neon backdrop; every page is a real comic grid.
   ========================================================================== */

:root {
  --ink: #0a0810;
  --paper: #f6efdd;
  --paper-2: #ece1c6;
  --pink: #ff2d9b;
  --green: #46ff77;
  --gold: #ffcf3a;
  --cyan: #3fe4ff;
  --gutter: 14px;
  --edge: 5px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #06040c;
  color: #fff;
  font-family: "Comic Neue", "Comic Sans MS", cursive;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; }

/* ---------- backdrop -------------------------------------------------- */

.backdrop {
  position: fixed;
  inset: -6vh -6vw;
  z-index: -3;
  background: url("./banner.png") center / cover no-repeat;
  filter: blur(7px) saturate(1.25) brightness(0.5);
  transform: scale(1.08);
}

.backdrop-dots {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1.15px);
  background-size: 6px 6px;
}

.backdrop-rays {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 45, 155, 0.28), transparent 55%),
    radial-gradient(circle at 10% 80%, rgba(70, 255, 119, 0.16), transparent 50%),
    conic-gradient(from 200deg at 50% -10%,
      rgba(255, 255, 255, 0.05) 0 6deg, transparent 6deg 14deg,
      rgba(255, 255, 255, 0.05) 14deg 20deg, transparent 20deg 30deg);
}

/* ---------- masthead -------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px clamp(12px, 3vw, 28px);
  background: rgba(8, 6, 14, 0.82);
  border-bottom: var(--edge) solid #000;
  box-shadow: 0 6px 0 rgba(255, 207, 58, 0.55);
  backdrop-filter: blur(8px);
}

.masthead__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-family: "Luckiest Guy", cursive;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 #000;
}

.masthead__logo img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid #000;
  box-shadow: 0 0 0 3px var(--gold);
  object-fit: cover;
}

.masthead__nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  font-family: "Bangers", cursive;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
}

.masthead__nav a {
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  transition: color 0.15s, transform 0.15s;
}

.masthead__nav a:hover {
  color: var(--green);
  transform: rotate(-2deg);
}

.masthead__links {
  display: flex;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 12px;
  border: 3px solid #000;
  border-radius: 10px;
  box-shadow: 3px 3px 0 #000;
  color: #000;
  font-family: "Luckiest Guy", cursive;
  font-size: 1.05rem;
  transition: transform 0.12s, box-shadow 0.12s;
}

.chip:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 #000; }
.chip--x { background: #fff; }
.chip--dex { background: var(--cyan); }
.chip--buy { background: var(--green); }

/* ---------- reader / pages ------------------------------------------- */

.reader {
  perspective: 1900px;
  perspective-origin: 50% 40%;
  padding: clamp(24px, 5vw, 60px) clamp(10px, 4vw, 40px) 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(28px, 6vw, 72px);
}

.page {
  width: min(1180px, 100%);
  transform-style: preserve-3d;
  transform:
    rotateX(var(--rx, 12deg))
    rotateY(var(--ry, -7deg))
    rotateZ(var(--rz, -1deg))
    translateZ(var(--tz, -80px));
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.page[data-tilt="right"] { --ry: 7deg; --rz: 1deg; }

.page__inner {
  position: relative;
  background:
    linear-gradient(180deg, var(--paper), var(--paper-2));
  border: 7px solid #000;
  border-radius: 4px;
  padding: clamp(14px, 2vw, 22px);
  box-shadow:
    14px 18px 0 rgba(0, 0, 0, 0.9),
    0 40px 90px rgba(0, 0, 0, 0.6);
}

.page__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(0, 0, 0, 0.14) 1px, transparent 1.1px);
  background-size: 5px 5px;
  opacity: 0.5;
  mix-blend-mode: multiply;
}

.page__slug {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 3px dashed rgba(0, 0, 0, 0.5);
  color: #221a12;
  font-family: "Permanent Marker", cursive;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page__title {
  margin: 6px 0 14px;
  color: #12100a;
  font-family: "Luckiest Guy", cursive;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-shadow:
    -3px 0 var(--pink),
    3px 0 var(--cyan),
    4px 5px 0 rgba(0, 0, 0, 0.35);
}

.page__num {
  margin: 12px 0 0;
  text-align: right;
  color: #2a2018;
  font-family: "Bangers", cursive;
  font-size: 1.1rem;
  letter-spacing: 0.2em;
}

/* ---------- panel grids ---------------------------------------------- */

.grid {
  display: grid;
  gap: var(--gutter);
}

.grid--hero {
  grid-template-columns: 1.65fr 1fr;
  grid-template-areas:
    "splash face"
    "splash ca";
  grid-template-rows: 1fr auto;
  min-height: 74vh;
}

.panel--splash { grid-area: splash; }
.panel--face { grid-area: face; min-height: 240px; }
.panel--ca { grid-area: ca; }

.grid--about {
  grid-template-columns: 1fr 1.35fr;
  grid-template-areas:
    "tall story"
    "wide wide";
}

.panel--tall { grid-area: tall; min-height: 420px; }
.panel--story { grid-area: story; }
.panel--wide { grid-area: wide; min-height: 300px; }

.grid--steps {
  grid-template-columns: repeat(4, 1fr);
}

.panel--step { min-height: 320px; }
.panel--action { grid-column: 1 / -1; }

.grid--community {
  grid-template-columns: 1.3fr 1fr;
  grid-template-areas:
    "banner banner"
    "join square"
    "join endca";
}

.panel--banner { grid-area: banner; }
.panel--join { grid-area: join; }
.panel--square { grid-area: square; min-height: 240px; }
.panel--endca { grid-area: endca; }

/* ---------- panel shell ----------------------------------------------- */

.panel {
  position: relative;
  overflow: hidden;
  border: var(--edge) solid #000;
  border-radius: 3px;
  background: #14101c;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.panel__img {
  position: absolute;
  inset: 0;
  background: var(--img) center / cover no-repeat;
  transform: scale(1.06);
  filter: saturate(1.2) contrast(1.06);
  transition: transform 0.6s ease;
}

.panel:hover .panel__img { transform: scale(1.12); }

.panel__img--contain {
  background-size: cover;
  background-position: center top;
}

.panel__img--dim { filter: saturate(0.9) brightness(0.62) contrast(1.1); }

.panel__ink {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 4, 12, 0.28) 0%, rgba(6, 4, 12, 0) 35%, rgba(6, 4, 12, 0.86) 100%),
    repeating-linear-gradient(-24deg, transparent 0 16px, rgba(0, 0, 0, 0.07) 16px 17px);
}

.panel__ink--soft {
  background: linear-gradient(180deg, rgba(6, 4, 12, 0) 45%, rgba(6, 4, 12, 0.85) 100%);
}

.panel__body {
  position: relative;
  z-index: 2;
  padding: clamp(16px, 2.4vw, 28px);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-start;
}

.panel__body--bottom { justify-content: flex-end; }

.panel--paper {
  background: linear-gradient(180deg, #fffaf0, #f0e6cd);
  color: #14100a;
  padding: clamp(16px, 2.4vw, 26px);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.12);
}

/* ---------- lettering -------------------------------------------------- */

.logotype {
  margin: 6px 0 4px;
  font-family: "Luckiest Guy", cursive;
  font-size: clamp(3.4rem, 9vw, 7.5rem);
  line-height: 0.82;
  letter-spacing: 0.01em;
  color: #fffdf6;
  text-shadow:
    -4px 0 var(--pink),
    4px 0 var(--cyan),
    0 6px 0 #000,
    8px 12px 0 rgba(0, 0, 0, 0.55);
}

.logotype span { display: block; }
.logotype span:last-child { margin-left: 0.35em; color: var(--gold); }

.tagline {
  margin: 0;
  font-family: "Bangers", cursive;
  font-size: clamp(1.4rem, 3vw, 2.3rem);
  letter-spacing: 0.06em;
  color: var(--green);
  text-shadow: 3px 3px 0 #000;
}

.caption {
  align-self: flex-start;
  max-width: 34ch;
  padding: 7px 12px;
  background: var(--gold);
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  color: #17110a;
  font-family: "Permanent Marker", cursive;
  font-size: 0.95rem;
  line-height: 1.25;
}

.caption--sm { font-size: 0.82rem; background: #fffaf0; }

.caption--tab {
  display: inline-block;
  background: var(--pink);
  color: #fff;
  transform: rotate(-2deg);
  margin-bottom: 10px;
}

.balloon {
  position: relative;
  align-self: flex-start;
  max-width: 40ch;
  margin-top: 6px;
  padding: 14px 18px;
  background: #fffdf6;
  border: 4px solid #000;
  border-radius: 22px;
  box-shadow: 6px 7px 0 #000;
  color: #120d07;
}

.balloon b { display: block; font-size: 1.1rem; }
.balloon span { display: block; margin-top: 4px; font-size: 0.95rem; }

.balloon--tail::after {
  content: "";
  position: absolute;
  left: 34px;
  bottom: -18px;
  width: 24px;
  height: 24px;
  background: #fffdf6;
  border-right: 4px solid #000;
  border-bottom: 4px solid #000;
  transform: rotate(45deg);
}

.balloon--think {
  border-radius: 30px;
  border-style: solid;
}

.balloon--think::after,
.balloon--think::before {
  content: "";
  position: absolute;
  background: #fffdf6;
  border: 4px solid #000;
  border-radius: 50%;
}

.balloon--think::after { width: 20px; height: 20px; left: 26px; bottom: -26px; }
.balloon--think::before { width: 11px; height: 11px; left: 12px; bottom: -44px; }

.headline {
  margin: 0 0 12px;
  font-family: "Luckiest Guy", cursive;
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  line-height: 0.94;
  color: #12100a;
  text-shadow: 3px 3px 0 rgba(255, 45, 155, 0.35);
}

.headline--sm { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }

.pen {
  margin: 0 0 10px;
  font-family: "Bangers", cursive;
  font-size: 1.7rem;
  letter-spacing: 0.1em;
  color: #17110a;
}

.pen--sm { font-size: 1.3rem; }

.prose {
  margin: 0 0 12px;
  font-size: 1.02rem;
  line-height: 1.55;
  color: #241c12;
}

.prose--tight { margin: 0; max-width: 26ch; }

.facts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
}

.facts li {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  background: #fffdf6;
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
}

.facts span {
  font-family: "Permanent Marker", cursive;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7a3a63;
}

.facts b { font-family: "Bangers", cursive; font-size: 1.15rem; letter-spacing: 0.04em; }

/* ---------- stickers & sfx --------------------------------------------- */

.sfx {
  position: absolute;
  z-index: 3;
  padding: 12px 22px;
  background: var(--pink);
  color: #fff;
  border: 5px solid #000;
  font-family: "Luckiest Guy", cursive;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  letter-spacing: 0.06em;
  text-shadow: 3px 3px 0 #000;
  clip-path: polygon(8% 0, 92% 6%, 100% 50%, 90% 100%, 12% 94%, 0 48%);
  box-shadow: 6px 8px 0 rgba(0, 0, 0, 0.6);
}

.sfx--pump { right: -10px; top: 22px; transform: rotate(9deg); }
.sfx--moon { right: 14px; bottom: 16px; background: var(--green); color: #06280f; transform: rotate(-6deg); }

.sticker {
  position: absolute;
  z-index: 3;
  padding: 6px 12px;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  font-family: "Bangers", cursive;
  letter-spacing: 0.08em;
  font-size: 1rem;
}

.sticker--symbol { top: 12px; left: -6px; background: #fff; color: #111; transform: rotate(-6deg); }
.sticker--gold { top: 14px; right: 14px; background: var(--gold); color: #1a1206; transform: rotate(4deg); }

/* ---------- contract + buttons ----------------------------------------- */

.ca {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #14101c;
  border: 4px solid #000;
  box-shadow: 4px 5px 0 #000;
}

.ca code {
  flex: 1 1 220px;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--green);
  font-family: "Bangers", cursive;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
}

.ca--sm code { font-size: 0.92rem; }

.ca button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--gold);
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  color: #14100a;
  font-family: "Luckiest Guy", cursive;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}

.ca button:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 #000; }
.ca button:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 #000; }

.btnrow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.btnrow--right { justify-content: flex-end; }
.btnrow--stack { flex-direction: column; align-items: stretch; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 4px solid #000;
  box-shadow: 5px 6px 0 #000;
  font-family: "Luckiest Guy", cursive;
  font-size: 1rem;
  letter-spacing: 0.03em;
  transition: transform 0.12s, box-shadow 0.12s;
}

.btn:hover { transform: translate(-3px, -3px); box-shadow: 8px 9px 0 #000; }
.btn:active { transform: translate(1px, 2px); box-shadow: 2px 2px 0 #000; }

.btn--lg { padding: 14px 18px; font-size: 1.1rem; }
.btn--pink { background: var(--pink); color: #fff; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5); }
.btn--green { background: var(--green); color: #06280f; }
.btn--black { background: #0b0b0f; color: #fff; }

.action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.pumpbtn {
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 7px solid #2a0218;
  background: radial-gradient(circle at 34% 28%, #ff9ed6, var(--pink) 46%, #96004f 82%);
  color: #fff;
  font-family: "Luckiest Guy", cursive;
  font-size: 1.9rem;
  letter-spacing: 0.06em;
  text-shadow: 0 3px 0 #5a0328;
  box-shadow:
    0 0 0 7px var(--gold),
    0 0 0 12px #000,
    0 14px 0 #5a0328,
    0 22px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.14s, box-shadow 0.14s;
}

.pumpbtn:hover {
  transform: translateY(7px);
  box-shadow:
    0 0 0 7px var(--gold),
    0 0 0 12px #000,
    0 7px 0 #5a0328,
    0 12px 20px rgba(0, 0, 0, 0.4);
}

/* ---------- steps ------------------------------------------------------- */

.numbox {
  align-self: flex-start;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: var(--gold);
  border: 4px solid #000;
  box-shadow: 4px 4px 0 #000;
  color: #17110a;
  font-family: "Luckiest Guy", cursive;
  font-size: 1.5rem;
  transform: rotate(-4deg);
}

.steptitle {
  margin: 6px 0 0;
  font-family: "Bangers", cursive;
  font-size: 1.75rem;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 3px 3px 0 #000;
}

.steptext {
  margin: 0;
  color: #f2e9da;
  font-size: 0.98rem;
  line-height: 1.5;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.panel--step .panel__body { justify-content: flex-end; }

/* ---------- banner panel ------------------------------------------------ */

.panel--banner { background: #000; }

.bannerimg {
  width: 100%;
  height: clamp(180px, 26vw, 320px);
  object-fit: cover;
  filter: saturate(1.15);
}

.fineprint {
  margin: 12px 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #4a3d2d;
}

/* ---------- ticker ------------------------------------------------------- */

.ticker {
  width: min(1180px, 100%);
  overflow: hidden;
  border-top: 5px solid #000;
  border-bottom: 5px solid #000;
  background: repeating-linear-gradient(90deg,
    var(--gold) 0 60px, var(--pink) 60px 120px, var(--green) 120px 180px, var(--cyan) 180px 240px);
  padding: 8px 0;
  transform: rotate(-1.2deg);
  box-shadow: 8px 10px 0 rgba(0, 0, 0, 0.6);
}

.ticker__track {
  display: flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  animation: crawl 26s linear infinite;
  color: #0d0a06;
  font-family: "Luckiest Guy", cursive;
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.ticker__track i { font-style: normal; }

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

/* ---------- footer + toast ---------------------------------------------- */

.colophon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 26px 16px 40px;
  border-top: 5px solid var(--gold);
  background: rgba(6, 4, 12, 0.9);
  text-align: center;
}

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

.colophon p { margin: 0; color: #f3e9d6; font-size: 0.95rem; }
.colophon b { font-family: "Luckiest Guy", cursive; color: var(--gold); letter-spacing: 0.04em; }
.colophon__year { color: #9a8f7e !important; font-size: 0.8rem !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 90;
  transform: translate(-50%, 140%);
  padding: 12px 20px;
  background: var(--green);
  border: 4px solid #000;
  box-shadow: 6px 7px 0 #000;
  color: #06280f;
  font-family: "Luckiest Guy", cursive;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast.is-on { transform: translate(-50%, 0); }

/* ---------- responsive --------------------------------------------------- */

@media (max-width: 1024px) {
  .grid--steps { grid-template-columns: repeat(2, 1fr); }
  .masthead__nav { display: none; }
}

@media (max-width: 820px) {
  .reader { perspective: none; }

  .page {
    transform: none !important;
    transition: none;
  }

  .grid--hero,
  .grid--about,
  .grid--community,
  .grid--steps {
    grid-template-columns: 1fr;
    grid-template-areas: none;
    min-height: 0;
  }

  .panel--splash,
  .panel--face,
  .panel--ca,
  .panel--tall,
  .panel--story,
  .panel--wide,
  .panel--banner,
  .panel--join,
  .panel--square,
  .panel--endca {
    grid-area: auto;
  }

  .panel--splash { min-height: 70vh; }
  .panel--tall { min-height: 320px; }
  .panel--step { min-height: 260px; }
  .action { justify-content: center; text-align: center; }
  .btnrow--right { justify-content: center; }
  .sfx--pump { right: -6px; top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .page { transform: none !important; transition: none; }
  .ticker__track { animation: none; }
  .panel__img { transition: none; }
}
