:root {
  --paper: #ede8f6;
  --paper-deep: #dfd7ef;
  --ink: #1d1535;
  --ink-soft: #564d73;
  --violet: #542e91;
  --stamp: #e5386a;
  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
}

a { color: var(--violet); text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--stamp); outline-offset: 3px; }

.wrap { width: min(1120px, 100% - 3rem); margin-inline: auto; }

/* ---------- header ---------- */

.masthead { display: flex; align-items: baseline; justify-content: space-between; padding-block: 1.5rem; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.masthead p { margin: 0; font-size: 0.9375rem; color: var(--ink-soft); }

/* ---------- hero ---------- */

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; padding-block: clamp(2rem, 7vw, 5.5rem) clamp(3rem, 8vw, 6rem); }

.hero h1 {
  margin: 0 0 1.5rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.75rem, 7.2vw, 5.5rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero .lede { margin: 0 0 1.25rem; max-width: 34rem; font-size: 1.25rem; line-height: 1.45; }
.hero .status { margin: 0; color: var(--ink-soft); max-width: 34rem; }

.demo { perspective: 1100px; }
.demo .kc-card { width: 100%; }
.demo-note { margin: 1.25rem 0 0.75rem; font-weight: 600; min-height: 1.6em; }
.demo-note button { font: inherit; font-weight: 600; color: var(--violet); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }

.shops { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.shops button {
  font: inherit; font-size: 0.9375rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.85rem 0.4rem 0.45rem;
  color: var(--ink); background: transparent;
  border: 1.5px solid rgba(29, 21, 53, 0.22); border-radius: 999px; cursor: pointer;
}
.shops button::before { content: ""; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: inset 0 0 0 1px rgba(29, 21, 53, 0.18); }
.shops button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- the two sides ---------- */

.sides { display: grid; grid-template-columns: 1fr 1fr; background: var(--paper-deep); border-radius: 28px; }
.side { padding: clamp(1.75rem, 4vw, 3.25rem); }
/* The dashed line is the perforation down the middle of a paper card. */
.side + .side { border-left: 2px dashed rgba(29, 21, 53, 0.28); }
.side h2 { margin: 0 0 1.25rem; font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.05; letter-spacing: -0.03em; }
.side ul { margin: 0; padding: 0; list-style: none; }
.side li { padding-block: 0.8rem; border-top: 1px solid rgba(29, 21, 53, 0.14); max-width: 30rem; }
.side li strong { display: block; }
.side li span { color: var(--ink-soft); }

/* ---------- how a stamp happens ---------- */

.steps { padding-block: clamp(3.5rem, 9vw, 7rem); }
.steps h2 { margin: 0 0 2.5rem; font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1; letter-spacing: -0.04em; max-width: 14em; }
.steps ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem); margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; }
/* Each step is a slot on a card, already stamped with its number. */
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 4.25rem; height: 4.25rem; margin-bottom: 1.25rem;
  font-family: var(--display); font-weight: 800; font-size: 1.75rem;
  color: var(--paper); background: var(--stamp); border-radius: 50%;
  box-shadow: 0 0 0 6px var(--paper), 0 0 0 8px rgba(29, 21, 53, 0.3);
  outline: 2px dashed transparent;
}
.steps li:nth-child(1)::before { transform: rotate(-9deg); }
.steps li:nth-child(2)::before { transform: rotate(6deg); }
.steps li:nth-child(3)::before { transform: rotate(-4deg); }
.steps h3 { margin: 0 0 0.4rem; font-family: var(--display); font-weight: 700; font-size: 1.375rem; letter-spacing: -0.02em; }
.steps p { margin: 0; color: var(--ink-soft); max-width: 22rem; }

/* ---------- footer ---------- */

.colophon { padding-block: 2rem 3rem; border-top: 2px dashed rgba(29, 21, 53, 0.28); display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; color: var(--ink-soft); font-size: 0.9375rem; }
.colophon p { margin: 0; max-width: 44rem; }

/* ---------- the card ---------- */

.kc-card {
  --kc-x: 0; --kc-y: 0;
  position: relative; display: block;
  aspect-ratio: 1.586; container-type: inline-size;
  /* Percentages, not cqw: container units on the card itself would measure its parent. */
  border-radius: 7% / 11.1%; overflow: hidden;
  color: var(--kc-ink);
  background: var(--kc-pattern), linear-gradient(135deg, var(--kc-a), var(--kc-b));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 0 0 1px rgba(255, 255, 255, 0.16) inset,
    calc(var(--kc-x) * -14px) calc(24px + var(--kc-y) * -10px) 48px -14px rgba(29, 21, 53, 0.55);
  transform: rotateY(calc(var(--kc-x) * 9deg)) rotateX(calc(var(--kc-y) * -9deg));
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
  font-family: var(--body);
}
.kc-face { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 5.3cqw; }
.kc-top { display: flex; align-items: center; gap: 3cqw; }
.kc-logo { flex: none; display: grid; place-items: center; width: 11.8cqw; height: 11.8cqw; border-radius: 50%; font-family: var(--display); font-weight: 800; font-size: 5.6cqw; background: color-mix(in srgb, var(--kc-ink) 14%, transparent); }
.kc-names { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.kc-names strong { font-family: var(--display); font-weight: 700; font-size: 5.6cqw; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-names small { font-size: 3.2cqw; opacity: 0.75; margin-top: 0.6cqw; }
.kc-count { flex: none; font-weight: 700; font-size: 4.1cqw; font-variant-numeric: tabular-nums; padding: 1.4cqw 2.7cqw; border-radius: 999px; background: color-mix(in srgb, var(--kc-ink) 14%, transparent); }
.kc-reward { margin-top: auto; display: flex; flex-direction: column; line-height: 1.15; }
.kc-reward small { font-size: 2.6cqw; font-weight: 700; letter-spacing: 0.04em; opacity: 0.65; }
.kc-reward span { font-family: var(--display); font-weight: 600; font-size: 4.2cqw; }
.kc-slots { display: grid; grid-template-columns: repeat(var(--kc-per-row), minmax(0, 11.8cqw)); gap: 2cqw; margin-top: 2.6cqw; }
.kc-two-rows .kc-slots { grid-template-columns: repeat(var(--kc-per-row), minmax(0, 8.5cqw)); }

.kc-slot { position: relative; display: grid; place-items: center; aspect-ratio: 1; padding: 0; border-radius: 50%; color: inherit; font: inherit; background: color-mix(in srgb, var(--kc-ink) 7%, transparent); border: max(1px, 0.4cqw) dashed color-mix(in srgb, var(--kc-ink) 38%, transparent); }
button.kc-slot { cursor: pointer; }
button.kc-slot:hover { background: color-mix(in srgb, var(--kc-ink) 18%, transparent); }
.kc-gift { position: absolute; width: 44%; opacity: 0.4; display: grid; }
.kc-ink-mark { position: absolute; inset: -1px; display: grid; place-items: center; border-radius: 50%; background: var(--kc-ink); transform: rotate(var(--kc-turn)) scale(2.4); opacity: 0; }
.kc-ink-mark svg { width: 50%; }
.kc-slot.is-filled .kc-ink-mark { transform: rotate(var(--kc-turn)) scale(1); opacity: 1; }
.kc-slot.is-new .kc-ink-mark { animation: kc-land 0.42s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
@keyframes kc-land { from { transform: rotate(var(--kc-turn)) scale(2.4); opacity: 0; } to { transform: rotate(var(--kc-turn)) scale(1); opacity: 1; } }

.kc-glare { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: plus-lighter;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
  background-size: 220% 100%; background-position: calc(50% + var(--kc-x) * -40%) 0; }
.kc-finish-matte .kc-glare { opacity: 0.35; }
.kc-finish-holo .kc-glare { background-image: linear-gradient(105deg, transparent 22%, rgba(255, 80, 160, 0.26) 38%, rgba(120, 220, 255, 0.3) 50%, rgba(180, 255, 140, 0.22) 62%, transparent 78%); }

/* ---------- join page ---------- */

.join { min-height: 100svh; display: grid; align-content: center; gap: 1.5rem; padding-block: 2.5rem; width: min(30rem, 100% - 2.5rem); margin-inline: auto; }
.join h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 9vw, 2.75rem); line-height: 1; letter-spacing: -0.04em; }
.join p { margin: 0; }
.join .quiet { color: var(--ink-soft); font-size: 0.9375rem; }
.join .demo { margin-block: 0.5rem; }

/* ---------- small screens ---------- */

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .sides { grid-template-columns: 1fr; }
  .side + .side { border-left: 0; border-top: 2px dashed rgba(29, 21, 53, 0.28); }
  .steps ol { grid-template-columns: 1fr; }
  .masthead p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .kc-card { transition: none; transform: none; }
  .kc-slot.is-new .kc-ink-mark { animation: none; }
}
