/* $WOFL: flat MS Paint colour, fat outlines, stickers. The meme is the design. */

:root {
  --ink: #111111;
  --paper: #fffdf4;
  --cream: #ffffee;
  --lav: #d6d8ff;
  --yellow: #ffd60a;
  --blue: #2b50ff;
  --pink: #ff9ecb;
  --red: #ff3d2e;
  --muted: #55524a;

  /* the wofl itself: changed by "roll a rare one" */
  --fur: #a3a3a3;
  --detail: #000000;

  --display: "Titan One", "Arial Black", Impact, sans-serif;
  --body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --line: 4px;
  --radius: 18px;
  --drop: 6px 6px 0 var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 600 17px/1.5 var(--body); overflow-x: clip; }
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ol, dl, figure { margin: 0; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
[hidden] { display: none !important; }
.defs { position: absolute; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- Buttons and chips ---------- */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: .72em 1.15em;
  border: var(--line) solid var(--ink);
  border-radius: 14px;
  background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  font: 400 18px/1 var(--display);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: translate .08s, box-shadow .08s;
}
.btn:hover { translate: -1px -1px; box-shadow: 6px 6px 0 var(--ink); }
.btn:active { translate: 3px 3px; box-shadow: 1px 1px 0 var(--ink); }
.btn--primary { background: var(--yellow); }
.btn--small { padding: .6em .9em; font-size: 15px; border-width: 3px; border-radius: 12px; box-shadow: 3px 3px 0 var(--ink); }
.btn:disabled, .btn[aria-disabled="true"] {
  border-color: #6f6c63;
  background: #ebe8dc;
  box-shadow: 4px 4px 0 #6f6c63;
  color: #6f6c63;
  translate: none;
  cursor: default;
}

.chip {
  appearance: none;
  padding: .55em .9em;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 800 14px/1 var(--body);
  cursor: pointer;
}
.chip:hover { background: var(--lav); }
.chip.is-on { background: var(--ink); color: #fff; }
.chip:disabled { border-color: #9a978d; background: #fff; color: #9a978d; cursor: default; }

.tag {
  padding: 5px 8px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--lav);
  font: 500 11px/1 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-radius: 999px;
  background: var(--ink);
  translate: -50% 0;
}
.nav a { padding: 9px 14px; border-radius: 999px; color: #fff; font: 800 14px/1 var(--body); text-decoration: none; white-space: nowrap; }
.nav a:hover { background: #343434; }
.nav a:focus-visible { outline-color: var(--yellow); }
.nav .nav__logo { font: 400 17px/1 var(--display); }
.nav .nav__buy { background: var(--yellow); color: var(--ink); }
.nav .nav__buy:hover { background: #ffe45c; }

/* ---------- Hero ---------- */

.hero { position: relative; overflow: hidden; padding-top: 78px; background: var(--lav); }
.stage { position: relative; width: min(100%, 185svh); aspect-ratio: 1000 / 557; container-type: inline-size; }
.stage__art { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }

.fur { fill: var(--fur); }
.line { stroke: #000; stroke-width: 9; stroke-linejoin: round; stroke-linecap: round; }
.detail { fill: none; stroke: var(--detail); stroke-width: 9; stroke-linejoin: round; stroke-linecap: round; }
.eye { fill: #fff; }
.pupil, .nose { fill: #000; }
#wofl-art { shape-rendering: crispEdges; }
.pupil { transition: transform .12s linear; }

.hand { transform-box: fill-box; }
.hand--top { transform-origin: 0% 70%; animation: jazz-a .7s step-end infinite; }
.hand--bottom { transform-origin: 50% 100%; animation: jazz-b .7s step-end infinite; }
@keyframes jazz-a { 0% { transform: rotate(-5deg); } 50% { transform: rotate(6deg); } }
@keyframes jazz-b { 0% { transform: rotate(5deg); } 50% { transform: rotate(-6deg); } }

.hero__title {
  position: absolute;
  left: 33%;
  top: 0;
  color: #fff;
  font: 400 11.6cqw/.9 var(--display);
  letter-spacing: .01em;
  -webkit-text-stroke: .1em var(--ink);
  paint-order: stroke fill;
  text-shadow: .06em .07em 0 var(--ink);
}
.hero__kicker {
  position: absolute;
  left: 34%;
  top: 23.6%;
  padding: .5em .9em;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  font: 500 max(12px, 1.05cqw)/1 var(--mono);
  white-space: nowrap;
}
.hero__lede { position: absolute; left: 77.5%; top: 31%; width: 20.5%; font: 800 max(15px, 1.42cqw)/1.42 var(--body); }

.clip {
  position: absolute;
  left: 79.5%;
  top: 2.5%;
  width: 17.5%;
  padding: 1cqw 1.1cqw 1.2cqw;
  border: 3px solid var(--ink);
  background: #fff;
  box-shadow: 5px 5px 0 var(--ink);
  rotate: calc(5deg + var(--drift, 0) * 9deg);
  translate: 0 calc(var(--drift, 0) * -30px);
}
.clip__mast { padding-bottom: .25em; border-bottom: 3px double var(--ink); font: 700 2.5cqw/1 "UnifrakturCook", Georgia, serif; text-align: center; }
.clip__head { margin-top: .5em; font: 800 1.06cqw/1.15 Georgia, "Times New Roman", serif; }
.clip__row { display: grid; grid-template-columns: 46% 1fr; gap: 8%; align-items: center; margin-top: .7cqw; }
.clip__row svg { width: 100%; border: 2px solid var(--ink); background: var(--lav); }
.clip__lines { height: 100%; min-height: 2.4cqw; background: repeating-linear-gradient(180deg, var(--ink) 0 2px, transparent 2px 7px); opacity: .7; }

.rarity { position: absolute; left: 2.2%; top: 70%; display: grid; gap: 10px; justify-items: start; }
.rarity__name { padding: .45em .8em; border: 3px solid var(--ink); border-radius: 10px; background: #fff; box-shadow: 3px 3px 0 var(--ink); font: 400 max(15px, 1.5cqw)/1.1 var(--display); rotate: -3deg; }
.rarity__name small { margin-left: .4em; font: 500 .62em/1 var(--mono); color: var(--muted); }

.hero__cta { position: absolute; left: 65.5%; top: 79.5%; width: 33%; display: grid; gap: 1.1cqw; }
.cta-row { display: flex; flex-wrap: wrap; gap: 1cqw; }
.btn--xl { font-size: max(17px, 1.75cqw); }
.ca { display: flex; align-items: center; gap: .7em; width: fit-content; max-width: 100%; padding: .5em .8em; border: 3px solid var(--ink); border-radius: 10px; background: #fff; font: 500 max(12px, 1cqw)/1.25 var(--mono); overflow-wrap: anywhere; }
.ca b { padding: .2em .45em; border-radius: 5px; background: var(--ink); color: #fff; font-weight: 500; }

/* ---------- Marquee ---------- */

.marquee { overflow: hidden; padding: 14px 0; background: var(--ink); color: var(--yellow); }
.marquee__track { display: flex; width: max-content; animation: marquee 34s linear infinite; }
.marquee__track span { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; font: 400 clamp(20px, 3vw, 34px)/1 var(--display); white-space: nowrap; }
.marquee__track svg { width: 1.3em; height: 1.3em; flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Bands ---------- */

.band { padding: clamp(64px, 10vw, 128px) clamp(16px, 4vw, 48px); }
.band__inner { max-width: 1180px; margin: 0 auto; }
.band--paper { background: var(--paper); }
.band--yellow { background: var(--yellow); }
.band--blue { background: var(--blue); }
.band--pink { background: var(--pink); }
.band__head h2 { font: 400 clamp(46px, 8.5vw, 104px)/.92 var(--display); letter-spacing: .005em; }
.band__head p { max-width: 54ch; margin-top: 16px; font-size: clamp(17px, 1.6vw, 21px); font-weight: 800; }
.band--blue .band__head { color: #fff; }
.band--blue .band__head h2 { -webkit-text-stroke: .08em var(--ink); paint-order: stroke fill; text-shadow: .05em .06em 0 var(--ink); }

.motion [data-enter] { transform: translateY(34px) scale(.97); }
.motion [data-enter].is-in { transform: none; transition: transform .45s cubic-bezier(.2, 1.5, .4, 1); }

/* ---------- Lore ---------- */

.timeline { position: relative; margin-top: 52px; }
.timeline::before, .timeline__fill { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 6px; border-radius: 3px; }
.timeline::before { background: #e3dece; }
.timeline__fill { background: var(--ink); transform: scaleY(var(--p, 1)); transform-origin: top; }
.beats { position: relative; display: grid; gap: 34px; padding: 0; list-style: none; }
.beat { position: relative; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 22px; align-items: start; padding-left: 52px; }
.beat::before { content: ""; position: absolute; left: 0; top: 2px; width: 28px; height: 28px; border: 4px solid var(--ink); border-radius: 50%; background: var(--yellow); }
.beat__time { padding-top: 3px; font: 500 16px/1.3 var(--mono); }
.beat__time small { display: block; color: var(--muted); font-size: 12px; }
.beat__card { padding: 20px 22px 22px; border: var(--line) solid var(--ink); border-radius: var(--radius); background: #fff; box-shadow: var(--drop); }
.beat__card h3 { margin-bottom: 8px; font: 400 clamp(23px, 3vw, 32px)/1.05 var(--display); }
.beat__card p { max-width: 62ch; }
.pull { margin-top: 12px; padding: 12px 16px; border-left: 6px solid var(--ink); background: var(--lav); font: 400 clamp(20px, 2.8vw, 30px)/1.15 var(--display); }
.receipt { width: auto; height: auto; margin-top: 16px; border: 3px solid var(--ink); border-radius: 8px; background: var(--cream); }
.note { margin-top: 26px; padding-left: 52px; color: var(--muted); font: 500 13px/1.4 var(--mono); }

/* ---------- Rare wofls ---------- */

.rares { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 30px 24px; align-items: start; margin-top: 52px; }
.rare { position: relative; border: var(--line) solid var(--ink); border-radius: var(--radius); background: #fff; box-shadow: var(--drop); rotate: var(--tilt, 0deg); transition: rotate .15s, translate .15s; }
.rare:hover { rotate: 0deg; translate: 0 -6px; }
.rare--wide { grid-column: span 2; }
.rare__img { overflow: hidden; border-bottom: var(--line) solid var(--ink); border-radius: 13px 13px 0 0; background: #fff; }
.rare__img img { width: 100%; height: auto; }
.rare figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; padding: 11px 12px 12px; }
.rare__name { font: 400 17px/1.1 var(--display); overflow-wrap: anywhere; }
.rare__seal { position: absolute; right: -16px; top: -18px; width: 56px; height: 56px; rotate: calc(12deg + var(--spin, 0deg)); filter: drop-shadow(2px 2px 0 var(--ink)); }

/* ---------- Maker ---------- */

.maker { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: start; margin-top: 44px; }
.maker__main { display: grid; gap: 20px; min-width: 0; }
.maker__canvas { position: relative; overflow: hidden; border: var(--line) solid var(--ink); border-radius: var(--radius); background: #fff; box-shadow: 8px 8px 0 var(--ink); line-height: 0; }
.maker__canvas canvas { width: 100%; height: auto; touch-action: none; cursor: crosshair; }
.maker__stickers { position: absolute; inset: 0; pointer-events: none; }
.sticker { position: absolute; max-width: none; height: auto; pointer-events: auto; touch-action: none; user-select: none; -webkit-user-drag: none; cursor: grab; }
.sticker:active { cursor: grabbing; }
.sticker:focus-visible { outline: 3px dashed var(--ink); outline-offset: 3px; }

.sticker-frame { position: absolute; z-index: 5; outline: 3px dashed var(--ink); outline-offset: 4px; pointer-events: none; }
.handle { position: absolute; width: 28px; height: 28px; padding: 0; border: 3px solid var(--ink); background-color: var(--yellow); background-position: center; background-repeat: no-repeat; background-size: 16px; pointer-events: auto; touch-action: none; }
.handle--turn {
  left: 50%;
  top: -48px;
  margin-left: -14px;
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M15.5 10.5a5.5 5.5 0 1 1-2.2-4.4' fill='none' stroke='%23111' stroke-width='2.6' stroke-linecap='round'/%3E%3Cpath d='M14 2.4v4.2H9.8' fill='none' stroke='%23111' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  cursor: grab;
}
.handle--turn::after { content: ""; position: absolute; left: 50%; top: 100%; width: 3px; height: 13px; margin: 3px 0 0 -1.5px; background: var(--ink); }
.sticker-frame[data-side="bottom"] .handle--turn { top: auto; bottom: -48px; }
.sticker-frame[data-side="bottom"] .handle--turn::after { top: auto; bottom: 100%; margin: 0 0 3px -1.5px; }
.handle--size {
  right: -20px;
  bottom: -20px;
  border-radius: 7px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 5l10 10M5 10V5h5M15 10v5h-5' fill='none' stroke='%23111' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  cursor: nwse-resize;
}
.handle:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.tray { display: grid; gap: 14px; padding: 16px 18px 18px; border: var(--line) solid var(--ink); border-radius: var(--radius); background: #fff; box-shadow: var(--drop); }
.tray__label { font: 400 21px/1 var(--display); }
.tray__label small { margin-left: .6em; color: var(--muted); font: 500 12px/1 var(--mono); }
.tray__groups { display: flex; flex-wrap: wrap; gap: 8px; }
.tray__groups small { margin-left: .15em; font: 500 .85em/1 var(--mono); opacity: .7; }
.tray__items { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
.item { position: relative; aspect-ratio: 1; padding: 0; border: 3px solid var(--ink); border-radius: 12px; background: var(--lav); cursor: pointer; }
.item:hover { background: var(--yellow); }
.item img { position: absolute; inset: 7px; width: calc(100% - 14px); height: calc(100% - 14px); object-fit: contain; }
.tray__edit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font: 800 14px/1 var(--body); }
.tray__edit label { display: flex; align-items: center; gap: 8px; }
.tray__edit input[type="range"] { width: 150px; accent-color: var(--ink); }
.maker__side { display: grid; gap: 16px; padding: 18px; border: var(--line) solid var(--ink); border-radius: var(--radius); background: #fff; box-shadow: var(--drop); }
.maker__group { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.swatch { aspect-ratio: 1; padding: 0; border: 3px solid var(--ink); border-radius: 8px; cursor: pointer; }
.swatch.is-on { outline: 3px solid var(--ink); outline-offset: 2px; }
.maker__side .btn { width: 100%; }
.maker__status { min-height: 2.9em; color: var(--muted); font: 500 13px/1.45 var(--mono); }

/* ---------- Buy ---------- */

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 48px; padding: 0; list-style: none; }
.step { padding: 18px 18px 20px; border: var(--line) solid var(--ink); border-radius: var(--radius); background: #fff; box-shadow: var(--drop); }
.step b { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 12px; border: var(--line) solid var(--ink); border-radius: 50%; background: var(--yellow); font: 400 22px/1 var(--display); }
.step h3 { margin-bottom: 6px; font: 400 22px/1.05 var(--display); }
.step p { font-size: 16px; }

.cabox { display: grid; gap: 16px; margin-top: 28px; padding: 22px; border: var(--line) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: 8px 8px 0 var(--ink); }
.cabox__field { display: grid; gap: 8px; font: 500 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.cabox__field input { width: 100%; padding: 14px 16px; border: var(--line) solid var(--ink); border-radius: 12px; background: #fff; color: var(--ink); font: 500 clamp(14px, 2vw, 20px)/1.2 var(--mono); }
.cabox__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cabox__actions .btn--primary { margin-left: auto; }
.cabox__warn { font-size: 15px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; }
.facts div { display: flex; gap: 8px; padding: 7px 12px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; font: 500 13px/1 var(--mono); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* ---------- Footer ---------- */

.foot { padding: clamp(56px, 8vw, 96px) clamp(16px, 4vw, 48px) 48px; background: var(--ink); color: #f1eee2; }
.foot__seal { width: 72px; height: 72px; margin-bottom: 20px; }
.foot__big { max-width: 18ch; color: var(--yellow); font: 400 clamp(30px, 5vw, 56px)/1 var(--display); }
.foot__legal { max-width: 70ch; margin-top: 20px; font-size: 15px; }
.foot__links { margin-top: 24px; font: 500 14px/1.4 var(--mono); }
.foot a:focus-visible { outline-color: var(--yellow); }

/* ---------- Narrow screens: the hero stops being a poster and stacks ---------- */

@media (max-width: 899px) {
  .hero { padding-top: 84px; }
  .stage { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; width: 100%; aspect-ratio: auto; padding-bottom: 28px; }
  .stage > * { position: static; width: auto; margin-inline: 16px; }
  .hero__kicker { order: 1; white-space: normal; }
  .hero__title { order: 2; font-size: 24cqw; }
  .hero__lede { order: 3; max-width: 34ch; font-size: 17px; }
  .stage__art { order: 4; width: 100%; height: auto; margin-inline: 0; aspect-ratio: 1000 / 557; }
  .rarity { order: 5; grid-auto-flow: column; align-items: center; }
  .rarity__name { font-size: 16px; }
  .hero__cta { order: 6; gap: 12px; }
  .cta-row { gap: 10px; }
  .btn--xl { font-size: 18px; }
  .ca { font-size: 13px; }
  .clip { display: none; }

  .beat { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-left: 44px; }
  .note { padding-left: 44px; }
  .maker { grid-template-columns: minmax(0, 1fr); }
  .tray__items { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tray__label small { display: block; margin: 8px 0 0; }
  .tray__edit label { flex: 1 1 100%; }
  .tray__edit input[type="range"] { flex: 1; width: auto; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cabox__actions .btn--primary { margin-left: 0; flex: 1 1 100%; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav a { padding: 9px 10px; font-size: 13px; }
  .nav .nav__logo { font-size: 15px; }
  .rares { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .rare__name { font-size: 15px; }
  .rare__seal { right: -10px; top: -14px; width: 44px; height: 44px; }
  .beat__card { padding: 16px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .swatches { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hand, .marquee__track { animation: none; }
  .pupil, .btn, .rare { transition: none; }
}
