/* ============================================================
   CATerpillar — construction-site x GeoCities, built with craft
   ============================================================ */

:root {
  /* --- full palette (OKLCH, tinted, contrast-checked) --- */
  --lime:        oklch(0.84 0.20 132);
  --lime-deep:   oklch(0.66 0.18 135);
  --hazard:      oklch(0.86 0.17 96);
  --hazard-deep: oklch(0.74 0.16 80);
  --magenta:     oklch(0.62 0.25 350);
  --magenta-lt:  oklch(0.74 0.20 348);
  --cyan:        oklch(0.80 0.12 205);
  --cyan-deep:   oklch(0.58 0.11 218);

  --paper:  oklch(0.95 0.018 95);   /* warm parchment base   */
  --bone:   oklch(0.98 0.01 95);    /* near-white            */
  --dirt:   oklch(0.46 0.045 70);   /* brown                 */
  --ink:    oklch(0.22 0.02 90);    /* tinted near-black     */
  --ink-soft: oklch(0.36 0.02 90);

  /* win98 chrome (slightly warm grey) */
  --chrome:    oklch(0.83 0.006 95);
  --chrome-hi: oklch(0.99 0.004 95);
  --chrome-sh: oklch(0.62 0.008 95);
  --chrome-dk: oklch(0.34 0.01 95);

  /* spacing scale (4pt) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  /* type */
  --font-display: "Bungee", system-ui, sans-serif;
  --font-body: "Rubik", system-ui, sans-serif;
  --font-pixel: "Pixelify Sans", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;

  /* motion */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);

  --maxw: 1140px;
  --radius: 6px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  /* tiled "dirt + leaf" texture, pure CSS so it stays crisp */
  background-image:
    radial-gradient(oklch(0.84 0.16 132 / 0.35) 1.5px, transparent 1.6px),
    radial-gradient(oklch(0.46 0.045 70 / 0.18) 1.5px, transparent 1.6px),
    repeating-linear-gradient(135deg, oklch(0.93 0.02 95) 0 18px, oklch(0.95 0.018 95) 18px 36px);
  background-size: 26px 26px, 26px 26px, auto;
  background-position: 0 0, 13px 13px, 0 0;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; height: auto; }
a { color: var(--cyan-deep); text-underline-offset: 2px; text-decoration-thickness: 2px; }
a:hover { color: var(--magenta); }

.visually-hidden, .skip-link {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: var(--s2); left: var(--s2); z-index: 999;
  width: auto; height: auto; clip: auto;
  background: var(--ink); color: var(--bone);
  padding: var(--s2) var(--s4); border-radius: var(--radius);
  font-weight: 700;
}

/* ---------- shared focus ---------- */
:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ============================================================
   TICKER
   ============================================================ */
.ticker {
  position: sticky; top: 0; z-index: 500;
  display: flex; align-items: stretch;
  background: var(--ink);
  color: var(--lime);
  border-bottom: 3px solid var(--lime-deep);
  font-family: var(--font-mono);
  font-size: 0.8rem; letter-spacing: 0.02em;
}
.ticker__toggle {
  flex: none; width: 38px; border: 0; cursor: pointer;
  background: var(--lime-deep); color: var(--ink);
  font-size: 0.7rem; line-height: 1;
  border-right: 2px solid var(--ink);
}
.ticker__toggle:hover { background: var(--lime); }
.ticker__toggle[aria-pressed="true"] .ticker__toggle-play { content: ""; }
.ticker__viewport { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker__track {
  display: inline-flex; gap: 0; white-space: nowrap;
  padding: 7px 0; will-change: transform;
  animation: ticker-scroll 38s linear infinite;
}
.ticker.is-paused .ticker__track { animation-play-state: paused; }
.ticker__unit { padding: 0 var(--s4); text-transform: uppercase; }
.ticker__sep { color: var(--magenta-lt); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   NAV TOOLBAR
   ============================================================ */
.nav {
  position: sticky; top: 35px; z-index: 480;
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s2) clamp(var(--s3), 3vw, var(--s6));
  background: var(--chrome);
  border-bottom: 2px solid var(--chrome-dk);
  box-shadow: inset 0 2px 0 var(--chrome-hi), 0 2px 6px oklch(0 0 0 / 0.18);
}
.nav__brand { display: flex; align-items: center; gap: var(--s2); text-decoration: none; color: var(--ink); }
.nav__coin {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--ink);
  transition: transform 0.5s var(--ease-out-quart);
}
.nav__brand:hover .nav__coin { transform: rotate(360deg); }
.nav__name { font-family: var(--font-display); font-size: 1.15rem; line-height: 1; }
.nav__name i { font-style: normal; color: var(--ink-soft); }
.nav__links { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }
.nav__links a {
  font-weight: 700; font-size: 0.95rem; text-decoration: none; color: var(--ink);
  padding: var(--s2) var(--s3); border-radius: 4px;
  transition: background 0.15s var(--ease-out-quart), color 0.15s;
}
.nav__links a:hover { background: var(--ink); color: var(--lime); }
.nav__chip {
  background: var(--cyan); border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
.nav__chip:hover { background: var(--cyan-deep) !important; color: var(--bone) !important; }
.nav__buy { flex: none; }

/* ============================================================
   BUTTONS (beveled chrome / chunky)
   ============================================================ */
.btn {
  --btn-face: var(--lime);
  --btn-text: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font-family: var(--font-display); font-size: 0.95rem; line-height: 1;
  text-decoration: none; color: var(--btn-text);
  background: var(--btn-face);
  padding: 14px 20px; min-height: 44px;
  border: 3px solid var(--ink);
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.08s var(--ease-out-quart),
              box-shadow 0.08s var(--ease-out-quart),
              filter 0.15s;
}
.btn:hover { filter: brightness(1.06) saturate(1.1); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn--buy   { --btn-face: var(--lime); }
.btn--copy  { --btn-face: var(--magenta); --btn-text: var(--bone); }
.btn--copy.is-copied { --btn-face: var(--lime); --btn-text: var(--ink); }
.btn--big   { font-size: 1.2rem; padding: 18px 28px; box-shadow: 5px 5px 0 var(--ink); }
.btn--block { width: 100%; }
.btn__leaf { font-size: 1.1em; }

/* ============================================================
   WINDOW + FRAMES (Win98 chrome)
   ============================================================ */
.window {
  background: var(--chrome);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow:
    inset 2px 2px 0 var(--chrome-hi),
    inset -2px -2px 0 var(--chrome-sh),
    6px 6px 0 var(--ink),
    0 14px 30px oklch(0 0 0 / 0.18);
}
.window__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3);
  padding: 7px var(--s3);
  background: linear-gradient(90deg, var(--magenta), var(--magenta-lt) 70%, var(--cyan));
  color: var(--bone);
  border-bottom: 3px solid var(--ink);
  border-radius: 3px 3px 0 0;
}
.window__bar--mini { background: linear-gradient(90deg, var(--cyan-deep), var(--cyan)); }
.window__title {
  font-family: var(--font-pixel); font-weight: 700; font-size: 1rem;
  text-shadow: 2px 2px 0 oklch(0 0 0 / 0.35);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.window__btns { display: flex; gap: 5px; flex: none; }
.window__btns i {
  display: grid; place-items: center;
  width: 22px; height: 20px; font-style: normal; font-size: 0.7rem;
  background: var(--chrome); color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: inset 1px 1px 0 var(--chrome-hi);
}
.window__body { padding: clamp(var(--s4), 3vw, var(--s6)); }

.frame {
  background: var(--bone);
  border: 3px solid var(--ink);
  border-radius: 4px;
  padding: var(--s2);
}
.frame--sunken { box-shadow: inset 3px 3px 0 var(--chrome-sh), inset -2px -2px 0 var(--chrome-hi); }
.frame--raised { box-shadow: inset 2px 2px 0 var(--chrome-hi), inset -2px -2px 0 var(--chrome-sh), 4px 4px 0 var(--ink); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(var(--s6), 6vw, var(--s9)) clamp(var(--s4), 4vw, var(--s7)) var(--s7);
}
.hero__window { position: relative; z-index: 2; }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(var(--s4), 3vw, var(--s6)); align-items: center;
}
.hero__mascot { margin: 0; }
.hero__mascot .frame--sunken { padding: var(--s2); background: var(--ink); }
.hero__mascot img, .hero__mascot-vid { width: 100%; border-radius: 2px; display: block; }
.hero__mascot-vid { aspect-ratio: 1 / 1; object-fit: cover; background: var(--ink); }
.live-tag { color: var(--lime-deep); font-weight: 700; letter-spacing: 0.04em; }
.live-tag::first-letter { animation: blink 1.2s steps(2) infinite; }

/* caterpillar-cam (lore) */
.catcam {
  margin-top: var(--s4);
  border: 3px solid var(--ink); border-radius: 4px; overflow: hidden;
  box-shadow: 3px 3px 0 var(--ink); background: var(--ink);
}
.catcam__bar {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.72rem;
  color: var(--lime); background: oklch(0.28 0.02 90);
  padding: 5px 8px; text-transform: uppercase; letter-spacing: 0.05em;
}
.catcam__rec { color: oklch(0.62 0.22 25); animation: blink 1s steps(2) infinite; }
.catcam__vid { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bone); }
.hero__mascot-cap {
  margin-top: var(--s2); text-align: center;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink);
}

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--magenta);
  background: var(--bone); border: 2px solid var(--ink);
  padding: 4px 10px; border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink);
}
.blink-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lime-deep); box-shadow: 0 0 0 2px var(--ink); animation: blink 1.1s steps(2) infinite; }

.wordmark {
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 1.6rem + 6vw, 5.4rem);
  line-height: 0.9; letter-spacing: -0.01em;
  margin: var(--s3) 0 var(--s2);
  text-wrap: balance;
}
.wordmark__cat {
  color: var(--magenta);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 5px 5px 0 var(--ink);
  display: inline-block;
  animation: wiggle 6s var(--ease-out-quart) infinite;
}
.wordmark__rest {
  color: var(--lime);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 5px 5px 0 var(--ink);
}
.hero__tag {
  font-size: clamp(1.05rem, 0.9rem + 0.7vw, 1.4rem);
  font-weight: 500; color: var(--ink); max-width: 30ch;
  margin-bottom: var(--s5);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s4); }

.ca-line {
  display: flex; align-items: center; gap: var(--s2);
  font-family: var(--font-mono); font-size: 0.8rem;
  margin-bottom: var(--s4);
}
.ca-line__label {
  flex: none; background: var(--ink); color: var(--lime);
  padding: 2px 8px; border-radius: 4px; font-weight: 700;
}
.ca-line__code {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink);
}

.counter {
  display: inline-flex; align-items: center; gap: var(--s3);
  background: var(--ink); color: var(--lime);
  border: 3px solid var(--ink); border-radius: 6px;
  padding: var(--s2) var(--s3);
  box-shadow: 4px 4px 0 var(--magenta);
  margin-bottom: var(--s3);
}
.counter__label { font-family: var(--font-pixel); font-size: 0.85rem; color: var(--bone); }
.counter__digits {
  font-family: var(--font-mono); font-weight: 700; font-size: 1.3rem;
  letter-spacing: 0.08em; font-variant-numeric: tabular-nums;
  color: var(--lime);
  text-shadow: 0 0 8px oklch(0.84 0.20 132 / 0.6);
}
.hero__visitor { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink); }
.hero__visitor strong { color: var(--magenta); }
.hero__visitor sup { font-size: 0.6em; }

.hero__sticker {
  position: absolute; right: clamp(0px, 2vw, 40px); bottom: -22px;
  width: clamp(120px, 15vw, 180px); height: auto; z-index: 3;
  filter: drop-shadow(4px 4px 0 var(--ink));
  pointer-events: none;
  transform: rotate(6deg);
}

/* ============================================================
   HAZARD DIVIDERS
   ============================================================ */
.hazard {
  position: relative;
  height: 46px; margin: var(--s6) 0;
  background: repeating-linear-gradient(45deg, var(--hazard) 0 26px, var(--ink) 26px 52px);
  background-size: 73.5px 73.5px;
  border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  display: flex; align-items: center; overflow: hidden;
  animation: hazard-roll 2.6s linear infinite;
}
.hazard--alt { background: repeating-linear-gradient(45deg, var(--cyan) 0 26px, var(--ink) 26px 52px); background-size: 73.5px 73.5px; }
.hazard__tape {
  white-space: nowrap; font-family: var(--font-pixel); font-weight: 700;
  font-size: 0.95rem; color: var(--bone);
  background: var(--ink); padding: 5px var(--s4);
  border-block: 2px solid var(--bone);
  animation: tape-scroll 24s linear infinite;
  text-shadow: 1px 1px 0 var(--magenta);
}
@keyframes hazard-roll { to { background-position: 73.5px 0; } }
@keyframes tape-scroll { from { transform: translateX(40vw); } to { transform: translateX(-100%); } }

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-head { max-width: var(--maxw); margin: 0 auto var(--s6); padding: 0 clamp(var(--s4), 4vw, var(--s7)); text-align: center; }
.section-head__title {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.3rem + 3.5vw, 3.4rem);
  color: var(--hazard); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-1.5deg);
}
.section-head__kicker {
  margin-top: var(--s3); font-family: var(--font-mono);
  font-size: 0.85rem; color: var(--dirt); text-transform: lowercase;
}

/* ============================================================
   PROPHECY (LORE)
   ============================================================ */
.prophecy { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(var(--s4), 4vw, var(--s7)); }
.prophecy__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(var(--s4), 3vw, var(--s6)); align-items: start; }
.prophecy__text {
  background: var(--bone); border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  padding: clamp(var(--s4), 3vw, var(--s6));
  font-size: 1.08rem;
}
.prophecy__text p { margin-bottom: var(--s4); max-width: 62ch; text-wrap: pretty; }
.prophecy__text p:last-child { margin-bottom: 0; }
.prophecy__text strong { color: var(--magenta); }
.prophecy__text em { font-style: italic; color: var(--cyan-deep); font-weight: 700; }
.hl { background: var(--hazard); padding: 0 6px; border: 2px solid var(--ink); border-radius: 3px; font-weight: 700; box-decoration-break: clone; }
.prophecy__sign { font-family: var(--font-pixel); font-size: 1.1rem; color: var(--ink-soft); text-align: right; }

.prophecy__facts { padding: var(--s4); background: var(--cyan); }
.prophecy__facts-title { font-family: var(--font-pixel); text-align: center; font-size: 1.3rem; margin-bottom: var(--s3); color: var(--ink); }
.facts { list-style: none; padding: 0; display: grid; gap: 5px; margin-bottom: var(--s4); }
.facts li {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3);
  background: var(--bone); border: 2px solid var(--ink); border-radius: 4px;
  padding: 6px 10px; font-family: var(--font-mono); font-size: 0.85rem;
}
.facts span { color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.facts b { color: var(--magenta); }
.prophecy__machine { width: 100%; border: 3px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 var(--ink); }

/* ============================================================
   MEME WALL
   ============================================================ */
.wall { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(var(--s4), 4vw, var(--s7)); }
.gallery {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(var(--s4), 2.5vw, var(--s6));
}
.meme { position: relative; }
.meme__btn {
  display: block; width: 100%; padding: 7px; cursor: pointer;
  background: var(--bone); border: 3px solid var(--ink); border-radius: 4px;
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s var(--ease-out-expo), filter 0.25s;
}
.meme__btn img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 2px; background: var(--chrome); }
.meme__btn:hover, .meme__btn:focus-visible {
  transform: rotate(0deg) translateY(-6px) scale(1.03);
  box-shadow: 8px 12px 0 var(--ink);
  filter: saturate(1.12);
  z-index: 4;
}
.meme__new {
  position: absolute; top: -12px; left: -10px; z-index: 5;
  font-family: var(--font-pixel); font-weight: 700; font-size: 0.85rem;
  background: var(--magenta); color: var(--bone);
  padding: 4px 9px; border: 2px solid var(--ink); border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-12deg);
  animation: pop-blink 1.4s steps(1) infinite;
}
.wall__cta { text-align: center; margin-top: var(--s6); font-family: var(--font-pixel); font-size: 1.15rem; }

/* ============================================================
   HOW TO APE
   ============================================================ */
.ape { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(var(--s4), 4vw, var(--s7)); }
.ape__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(var(--s4), 3vw, var(--s6)); align-items: start; }
.steps { list-style: none; padding: 0; display: grid; gap: var(--s4); counter-reset: step; }
.step {
  display: flex; gap: var(--s4); align-items: flex-start;
  background: var(--bone); border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--ink);
  padding: var(--s4);
  transition: transform 0.18s var(--ease-out-quart), box-shadow 0.18s var(--ease-out-quart);
}
.step:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--lime-deep); }
.step__no {
  flex: none; display: grid; place-items: center;
  width: 46px; height: 46px;
  font-family: var(--font-display); font-size: 1.3rem; color: var(--bone);
  background: var(--magenta); border: 3px solid var(--ink); border-radius: 50%;
  box-shadow: 2px 2px 0 var(--ink);
}
.step h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 4px; }
.step p { font-size: 0.96rem; color: var(--ink-soft); max-width: 46ch; }

.ape__side { display: grid; gap: var(--s5); position: sticky; top: 96px; }
.ca-box { display: grid; gap: var(--s3); }
.ca-box__code {
  display: block; font-family: var(--font-mono); font-size: 0.82rem;
  word-break: break-all; line-height: 1.5;
  background: var(--ink); color: var(--lime);
  padding: var(--s3); border-radius: 4px;
}
.tokenomics { display: grid; gap: var(--s2); padding: var(--s4); background: var(--hazard); }
.tokenomics div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); border-bottom: 2px dashed var(--ink); padding-bottom: var(--s2); }
.tokenomics div:last-child { border-bottom: 0; padding-bottom: 0; }
.tokenomics dt { font-family: var(--font-pixel); font-weight: 700; }
.tokenomics dd { font-family: var(--font-mono); font-weight: 700; text-align: right; }

/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  margin-top: var(--s8);
  background: var(--ink); color: var(--paper);
  border-top: 4px solid var(--lime-deep);
  padding: var(--s7) clamp(var(--s4), 4vw, var(--s7)) var(--s6);
  display: grid; gap: var(--s6); justify-items: center;
}
.webring { background: var(--bone); color: var(--ink); padding: var(--s4) var(--s5); text-align: center; max-width: 420px; width: 100%; }
.webring__title { font-family: var(--font-pixel); font-weight: 700; display: block; margin-bottom: var(--s2); }
.webring__nav { display: flex; align-items: center; justify-content: center; gap: var(--s3); }
.webring__arrow {
  width: 40px; height: 40px; cursor: pointer;
  background: var(--cyan); border: 2px solid var(--ink); border-radius: 4px;
  font-size: 1rem; box-shadow: 2px 2px 0 var(--ink);
  transition: transform 0.1s var(--ease-out-quart);
}
.webring__arrow:hover { background: var(--cyan-deep); color: var(--bone); }
.webring__arrow:active { transform: translate(2px, 2px); box-shadow: none; }
.webring__center { font-family: var(--font-mono); font-weight: 700; }

.buttons88 {
  list-style: none; padding: 0; max-width: 760px;
  display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: center;
}
.b88 {
  display: flex; align-items: center; gap: 6px;
  width: 150px; height: 42px; padding: 0 8px;
  background: var(--chrome); color: var(--ink);
  border: 2px solid var(--bone); outline: 2px solid var(--ink);
  text-decoration: none; font-size: 0.62rem; line-height: 1.05; font-weight: 700;
  box-shadow: 2px 2px 0 oklch(0 0 0 / 0.5);
  transition: transform 0.12s var(--ease-out-quart), background 0.12s;
}
.b88 b { font-size: 1.2rem; line-height: 1; }
.b88--static { cursor: default; opacity: 0.92; }
a.b88:hover { transform: translateY(-3px) rotate(-1deg); background: var(--lime); }
.foot__guest { font-family: var(--font-pixel); font-size: 1.05rem; text-align: center; color: var(--lime); }
.foot__guest a { color: var(--hazard); }
.foot__legal { max-width: 70ch; text-align: center; font-size: 0.72rem; color: oklch(0.72 0.02 90); line-height: 1.6; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  border: 4px solid var(--ink); border-radius: var(--radius); padding: 0;
  background: var(--chrome); max-width: min(92vw, 820px); width: 100%;
  box-shadow: 10px 10px 0 var(--ink);
}
.lightbox::backdrop { background: oklch(0.22 0.02 90 / 0.78); }
.lightbox[open] { animation: pop-in 0.28s var(--ease-out-expo); }
.lightbox__close {
  position: absolute; top: 8px; right: 8px;
  width: 38px; height: 34px; cursor: pointer; z-index: 2;
  background: var(--magenta); color: var(--bone);
  border: 2px solid var(--ink); box-shadow: inset 1px 1px 0 var(--chrome-hi);
  font-size: 0.9rem; font-weight: 700;
}
.lightbox__img { width: 100%; max-height: 76vh; object-fit: contain; background: var(--ink); border-bottom: 3px solid var(--ink); }
.lightbox__cap { padding: var(--s3) var(--s4); font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink); }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 700;
  transform: translate(-50%, 140%);
  background: var(--ink); color: var(--lime);
  font-family: var(--font-pixel); font-weight: 700; font-size: 1rem;
  padding: var(--s3) var(--s5);
  border: 3px solid var(--lime-deep); border-radius: 8px;
  box-shadow: 4px 4px 0 var(--magenta);
  pointer-events: none; opacity: 0;
  transition: transform 0.4s var(--ease-out-expo), opacity 0.3s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ============================================================
   SOUND TOGGLE
   ============================================================ */
.sound {
  position: fixed; left: 16px; bottom: 18px; z-index: 650;
  display: inline-flex; align-items: center; gap: 9px;
  cursor: pointer;
  font-family: var(--font-pixel); font-weight: 700; font-size: 0.8rem;
  color: var(--ink); background: var(--hazard);
  padding: 9px 13px; min-height: 44px;
  border: 3px solid var(--ink); border-radius: 8px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.12s var(--ease-out-quart), background 0.15s;
}
.sound:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.sound:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.sound[aria-pressed="true"] { background: var(--lime); }
.sound__label b { color: var(--magenta); }
.sound[aria-pressed="true"] .sound__label b { color: var(--lime-deep); }
.sound__ico { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.sound__bar { width: 3px; height: 5px; background: var(--ink); border-radius: 1px; }
.sound[aria-pressed="true"] .sound__bar { animation: eq 0.9s ease-in-out infinite; }
.sound[aria-pressed="true"] .sound__bar:nth-child(2) { animation-delay: 0.15s; }
.sound[aria-pressed="true"] .sound__bar:nth-child(3) { animation-delay: 0.3s; }
.sound[aria-pressed="true"] .sound__bar:nth-child(4) { animation-delay: 0.45s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 15px; } }

@media (max-width: 560px) {
  .sound { left: 10px; bottom: 12px; font-size: 0.72rem; padding: 8px 10px; }
  .sound__label { display: none; }
}

/* ============================================================
   CURSOR TRAIL
   ============================================================ */
.trail-layer { position: fixed; inset: 0; pointer-events: none; z-index: 600; }
.trail-leaf {
  position: fixed; font-size: 18px; will-change: transform, opacity;
  animation: trail-fade 0.8s var(--ease-out-quart) forwards;
}

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.js .reveal { opacity: 0; transform: translateY(26px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 0.6s var(--ease-out-quart), transform 0.6s var(--ease-out-quart);
  transition-delay: var(--reveal-delay, 0ms);
}

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0.18; } }
@keyframes pop-blink { 0%, 60% { transform: rotate(-12deg) scale(1); } 70% { transform: rotate(-12deg) scale(1.16); } 80%, 100% { transform: rotate(-12deg) scale(1); } }
@keyframes wiggle { 0%, 92%, 100% { transform: rotate(0deg); } 94% { transform: rotate(-3deg); } 96% { transform: rotate(3deg); } 98% { transform: rotate(-2deg); } }
@keyframes float-bob { 0%, 100% { transform: rotate(6deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-12px); } }
.float-bob { animation: float-bob 4s ease-in-out infinite; }
@keyframes pop-in { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes trail-fade { from { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); } to { opacity: 0; transform: translate(-50%, 30px) scale(0.4) rotate(40deg); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__mascot { max-width: 420px; margin-inline: auto; }
  .prophecy__grid, .ape__grid { grid-template-columns: 1fr; }
  .ape__side { position: static; }
  .hero__sticker { width: 120px; bottom: -6px; right: 4px; }
}
@media (max-width: 560px) {
  .nav { flex-wrap: wrap; gap: var(--s2); top: 32px; }
  .nav__links { width: 100%; order: 3; justify-content: space-between; gap: 2px; }
  .nav__links a { padding: var(--s2); font-size: 0.82rem; }
  .nav__chip { display: none; }
  .nav__buy { margin-left: auto; }
  .hero { padding-top: var(--s6); }
  .counter { width: 100%; justify-content: space-between; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s4); }
  .b88 { width: 132px; }
  .section-head__title { font-size: 2rem; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .ticker__track { animation: none; }
  .float-bob, .wordmark__cat { animation: none; }
  .hero__sticker { transform: rotate(6deg); }
  .trail-layer { display: none; }
}
