:root {
  --ink: #000;
  --paper: #fff;
  --fur: #EFAF42;
  --fur-deep: #D0A253;
  --fur-light: #FFE3B2;
  --nip: #187C40;
  --bowl: #CBF2FF;
  --bowl-edge: #A2CCDA;
  --tongue: #C43F83;
  --muted: #4a4a4a;

  --stroke: 3px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-pill: 999px;

  --font-display: "Bagel Fat One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Gabarito", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

h1, h2, h3 { margin: 0; font-weight: 400; }

h1, h2 {
  font-family: var(--font-display);
  line-height: 0.95;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(2.25rem, 5.2vw, 3.75rem); max-width: 16ch; }

h3 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.25;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85em;
}

/* Catnip that spills out of the hero */

.nip-layer {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  pointer-events: none;
  z-index: 0;
}

.nip-burst {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  overflow: visible;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 52px;
  padding: 0.7em 1.4em;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink);
  font: 800 1.05rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease;
}

.btn:hover { transform: rotate(-2deg) scale(1.03); }
.btn:active { transform: scale(0.97); }

.btn-fur { background: var(--fur); }
.btn-fur:hover { background: #F5BB57; }

.btn-small { min-height: 42px; padding: 0.5em 1.1em; font-size: 0.95rem; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Nav */

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  text-decoration: none;
}

.wordmark img {
  border: var(--stroke) solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.5vw, 28px);
  font-weight: 700;
}

.nav-links a:not(.btn) {
  text-decoration: none;
  background-image: linear-gradient(var(--nip), var(--nip));
  background-size: 0 3px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 160ms ease;
}

.nav-links a:not(.btn):hover { background-size: 100% 3px; }

/* Hero */

main { position: relative; z-index: 1; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  padding-block: clamp(24px, 5vw, 64px) clamp(40px, 6vw, 80px);
}

.hero h1 {
  font-size: clamp(3.4rem, 8.4vw, 7.4rem);
  line-height: 0.88;
  max-width: 9ch;
}

.lede {
  max-width: 34ch;
  margin: 28px 0 32px;
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  line-height: 1.5;
}

.ca {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  width: fit-content;
  margin-bottom: 20px;
  padding: 6px 6px 6px 16px;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--bowl);
}

.ca-label { font-weight: 800; font-size: 0.9rem; }

.ca-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
}

.ca-copy {
  flex: none;
  min-height: 38px;
  padding: 0 16px;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--paper);
  font: 800 0.9rem/1 var(--font-body);
  cursor: pointer;
}

.ca-copy[data-copied] { background: var(--nip); color: var(--paper); }

.hero-cat { position: relative; }

.cat-stage {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: grab;
  -webkit-tap-highlight-color: transparent;
}

.cat-stage:active { cursor: grabbing; }

/* The artwork is a 1000×1000 square with the cat in the middle band; crop to that band. */
.cat-frame {
  position: relative;
  display: block;
  width: 118%;
  margin-left: -8%;
  aspect-ratio: 1000 / 580;
  overflow: hidden;
}

.cat-poster,
.cat-lottie {
  position: absolute;
  left: 0;
  top: -37.9%;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.cat-lottie svg { display: block; }

.cat-frame.is-animating .cat-poster { visibility: hidden; }

.cat-stage.is-petted .cat-frame { animation: wiggle 420ms ease; }

@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  30% { transform: rotate(-2.5deg) scale(1.02); }
  65% { transform: rotate(2deg); }
}

.cat-hint {
  margin: 0 0 0 8%;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Live stats */

.stats { padding-block: 0 clamp(64px, 9vw, 120px); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--paper);
  overflow: hidden;
}

.stat {
  padding: 22px 24px;
  border-left: var(--stroke) solid var(--ink);
}

.stat:first-child { border-left: 0; }

.stat dt { font-weight: 700; color: var(--muted); font-size: 0.95rem; }

.stat dd {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stats-note {
  margin: 12px 4px 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Steps (used in both sequences) */

.steps {
  list-style: none;
  margin: 32px 0 36px;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 22px;
}

.steps li {
  position: relative;
  padding-left: 64px;
  counter-increment: step;
  max-width: 44ch;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -4px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: var(--stroke) solid var(--ink);
  border-radius: 50%;
  background: var(--fur);
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1;
}

.steps p { margin: 4px 0 0; color: var(--muted); }

/* Easter egg section */

.found {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  padding-block: 0 clamp(80px, 11vw, 140px);
}

.browser {
  margin: 0;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--paper);
  overflow: hidden;
  transform: rotate(1.5deg);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px;
  padding: 8px 16px;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
}

.browser-page {
  display: grid;
  gap: 10px;
  padding: 18px 28px 0;
  border-top: var(--stroke) solid var(--ink);
}

.ghost-line {
  display: block;
  height: 12px;
  width: 78%;
  border-radius: var(--radius-pill);
  background: #ececec;
}

.ghost-title { height: 22px; width: 52%; margin-bottom: 6px; }
.ghost-short { width: 44%; }

.browser-cat {
  position: relative;
  aspect-ratio: 1000 / 520;
  overflow: hidden;
  margin-inline: -28px;
}

.browser-cat img {
  position: absolute;
  top: -50%;
  left: 0;
  width: 100%;
  height: auto;
}

.marker-circle {
  position: absolute;
  left: 7%;
  top: 2%;
  width: 88%;
  height: 90%;
  overflow: visible;
}

.browser figcaption {
  padding: 14px 20px;
  border-top: var(--stroke) solid var(--ink);
  background: var(--fur-light);
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}

/* Rewards section: the bowl */

.pays {
  position: relative;
  background: var(--bowl);
  padding-block: clamp(72px, 10vw, 128px);
}

.pays::before,
.pays::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 18px;
  background-repeat: repeat-x;
  background-size: 36px 18px;
}

/* Fur edge, borrowed from the cat's outline */
.pays::before {
  top: -18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='18' viewBox='0 0 36 18'%3E%3Cpath d='M0 19V16C3 5 12 3 18 12C24 3 33 5 36 16V19Z' fill='%23CBF2FF'/%3E%3Cpath d='M0 16C3 5 12 3 18 12C24 3 33 5 36 16' fill='none' stroke='%23000' stroke-width='3'/%3E%3C/svg%3E");
}

.pays::after {
  bottom: -18px;
  transform: scaleY(-1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='18' viewBox='0 0 36 18'%3E%3Cpath d='M0 19V16C3 5 12 3 18 12C24 3 33 5 36 16V19Z' fill='%23CBF2FF'/%3E%3Cpath d='M0 16C3 5 12 3 18 12C24 3 33 5 36 16' fill='none' stroke='%23000' stroke-width='3'/%3E%3C/svg%3E");
}

.pays-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: start;
  gap: clamp(32px, 6vw, 80px);
}

.section-lede {
  max-width: 40ch;
  margin: 20px 0 0;
  font-size: 1.25rem;
}

.pays .steps li::before { background: var(--paper); }
.pays .steps p { color: #2c3d44; }

.calc {
  position: sticky;
  top: 24px;
  padding: clamp(24px, 3vw, 36px);
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.calc h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1;
  margin-bottom: 24px;
}

.calc label { display: block; font-weight: 700; margin-bottom: 8px; }

.calc-input {
  display: flex;
  align-items: center;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.calc-input:focus-within { outline: 3px solid var(--tongue); outline-offset: 3px; }

.calc-input input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border: 0;
  outline: 0;
  background: transparent;
  font: 700 1.4rem/1 var(--font-body);
  font-variant-numeric: tabular-nums;
}

.calc-input span {
  padding: 0 16px;
  align-self: stretch;
  display: grid;
  place-items: center;
  border-left: var(--stroke) solid var(--ink);
  background: var(--fur);
  font-weight: 800;
  font-size: 0.95rem;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.chips button {
  min-height: 40px;
  padding: 0 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--paper);
  font: 700 0.95rem/1 var(--font-body);
  cursor: pointer;
}

.chips button:hover,
.chips button[aria-pressed="true"] { background: var(--fur-light); }

.calc-result {
  display: block;
  margin-top: 28px;
  padding: 20px 22px;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius-md);
  background: var(--fur);
}

.calc-sats {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.calc-sub { display: block; margin-top: 6px; font-weight: 700; }

.calc-share { margin: 16px 0 0; }

.calc-note { margin: 10px 0 0; font-size: 0.9rem; color: var(--muted); }

/* Token facts */

.facts { padding-block: clamp(96px, 12vw, 150px) clamp(80px, 10vw, 120px); }

.fact-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 36px 0 0;
  border-top: var(--stroke) solid var(--ink);
}

.fact-list div {
  padding: 20px 20px 22px 0;
  border-bottom: var(--stroke) solid var(--ink);
}

.fact-list dt { font-weight: 700; color: var(--muted); font-size: 0.95rem; }

.fact-list dd {
  margin: 2px 0 0;
  font-weight: 800;
  font-size: 1.35rem;
}

/* Footer */

.footer {
  background: var(--fur);
  border-top: var(--stroke) solid var(--ink);
  padding-block: clamp(64px, 9vw, 110px) 40px;
}

.footer-inner { display: grid; gap: 40px; }

.footer-line {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: 0.95;
}

.footer .btn:not(.btn-fur) { background: var(--paper); }
.footer .btn-fur { background: var(--ink); color: var(--paper); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 700;
}

.disclaimer {
  max-width: 72ch;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Responsive */

@media (max-width: 960px) {
  .hero,
  .found,
  .pays-inner { grid-template-columns: minmax(0, 1fr); }

  .hero-cat { order: -1; }
  .cat-frame { width: 108%; margin-left: -4%; }
  .hero h1 { max-width: 12ch; }

  .browser { transform: none; }
  .calc { position: static; }

  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: var(--stroke) solid var(--ink); }

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

@media (max-width: 640px) {
  .nav-links a:not(.btn) { display: none; }
  .fact-list { grid-template-columns: minmax(0, 1fr); }
  .stat { padding: 16px 18px; }
  .stat dd { font-size: 1.45rem; }
  .steps li { padding-left: 58px; }
  .ca { width: 100%; }
}

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