/* Uncle Fuzz Books: an open box of crayons, one crayon per book. */

@font-face { font-family: "Titan One"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/titan-one-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Titan One"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/titan-one-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("../fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --box: #2438b8;
  --box-deep: #182a8c;
  --poppy: #d93222;
  --sun: #ffc61a;
  --ink: #14161f;
  --paper: #f7f9ff;
  --pink: #fbb1c9;
  --tan: #d9a56b;
  --leaf: #8fd16f;
  --lilac: #d9c2ff;
  --display: "Titan One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section: clamp(3.5rem, 8vw, 6rem);
  --lift: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scrollbar-color: var(--sun) var(--box-deep); }
body { margin: 0; overflow-x: clip; font: 400 1.125rem/1.6 var(--body); color: var(--ink); background: var(--ink); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
::selection { background: var(--sun); color: var(--ink); }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding-inline: var(--gutter); }

a { color: inherit; }
:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; border-radius: 4px; }
.band--sun :focus-visible, .band--book :focus-visible { outline-color: var(--box); }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 20; background: var(--sun); color: var(--ink); font-weight: 800; padding: 0.6rem 1rem; border-radius: 8px; }
.skip:focus { top: 1rem; }

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; line-height: 1.05; text-wrap: balance; letter-spacing: 0.005em; }
h2 { font-size: clamp(2rem, 5.2vw, 3.4rem); max-width: 20ch; }
h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 2.2rem; }
p { margin: 0.9rem 0 0; max-width: 62ch; text-wrap: pretty; }

/* The lid: the box, seen from above */
.lid {
  position: relative; padding: clamp(1.5rem, 4vw, 2.5rem) 0 0; color: #fff;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 7px),
    var(--box);
}
.wrapper {
  max-width: 40rem; margin: 0 auto; text-align: center; transform: rotate(-1.2deg);
  background: linear-gradient(var(--poppy) 0 0.7rem, var(--sun) 0.7rem calc(100% - 0.7rem), var(--poppy) calc(100% - 0.7rem));
  color: var(--ink); border: 3px solid var(--ink); border-radius: 10px; padding: 1.2rem 1.5rem 1.1rem;
}
.wrapper__name { font-size: clamp(2.8rem, 10vw, 5.5rem); text-transform: uppercase; line-height: 0.95; }
.wrapper__line { margin: 0.4rem auto 0; font-weight: 800; font-size: clamp(1rem, 2.6vw, 1.3rem); max-width: none; }

.wrapper { position: relative; margin-top: clamp(4.5rem, 9vw, 6.5rem); }
.wrapper__peek { position: absolute; left: 50%; bottom: calc(100% - 3px); width: clamp(6.5rem, 12vw, 8.5rem); height: auto; transform: translateX(-50%); }

.lid__ask { text-align: center; margin: 1.25rem 0 0.25rem; max-width: none; }
.peel {
  display: inline-block; font-family: var(--display); font-size: clamp(1.4rem, 3.4vw, 1.9rem); line-height: 1.1;
  color: #fff; background: var(--poppy); text-decoration: none; padding: 0.7em 1.3em;
  border: 3px solid var(--ink); border-radius: 14px; transform: rotate(0.8deg);
  transition: transform 0.25s var(--lift), background-color 0.25s;
}
.peel:hover { transform: rotate(0.8deg) translateY(-3px); background: #c22617; }
.peel:active { transform: rotate(0.8deg) translateY(0); }
.peel--small { font-size: 0.95rem; padding: 0.6em 0.8em; white-space: nowrap; }

.box { list-style: none; margin: 1rem auto 0; padding: 0; max-width: 42rem; --gap: clamp(0.7rem, 1.6vw, 1.4rem);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 1.6rem; align-items: start; }

.crayon { position: relative; }
.crayon__tip, .crayon__body { transition: transform 0.4s var(--lift); }
.crayon:hover .crayon__tip, .crayon:focus-within .crayon__tip, .crayon:hover .crayon__body, .crayon:focus-within .crayon__body { transform: translateY(-1.1rem); }
.crayon::after { content: ""; position: absolute; left: calc(var(--gap) / -2); right: calc(var(--gap) / -2); bottom: -0.9rem; height: 0.9rem; background: #1b2a8f; border: 3px solid var(--ink); border-radius: 3px; }
.crayon__tip { display: block; width: 58%; height: 4.5rem; margin: 0 auto -2px; fill: var(--wax); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.crayon { margin-top: var(--drop, 0rem); }
.crayon:nth-child(4n+1) { --drop: 0rem; }
.crayon:nth-child(4n+2) { --drop: 1.8rem; }
.crayon:nth-child(4n+3) { --drop: 0.6rem; }
.crayon:nth-child(4n+4) { --drop: 2.2rem; }
.crayon__body::before { content: ""; display: block; height: 0.95rem; margin: -0.8rem -0.8rem 0.7rem;
  background: linear-gradient(var(--ink) 0 3px, transparent 3px calc(100% - 3px), var(--ink) calc(100% - 3px)); }
.crayon__body {
  position: relative; color: var(--ink);
  background: repeating-linear-gradient(90deg, rgba(20, 22, 31, 0.16) 0 2px, transparent 2px 10px), var(--wax); border: 3px solid var(--ink); border-bottom: 0;
  border-radius: 12px 12px 0 0; padding: 0.8rem 0.8rem calc(6.4rem - var(--drop, 0rem));
}
.crayon__main { display: block; text-decoration: none; }
.crayon__cover { display: block; border-radius: 6px; }
.crayon__main { position: relative; display: block; }
.crayon .soon { left: -1.15rem; width: calc(100% + 2.3rem); top: 24%; transform: rotate(-8deg); }
.crayon__main img { display: block; width: 100%; border: 3px solid var(--ink); border-radius: 6px; background: #fff; }
.soon { position: absolute; left: -3%; width: 106%; height: auto; top: 36%; transform: rotate(-10deg); overflow: visible; pointer-events: none;
  filter: drop-shadow(0 3px 0 rgba(20, 22, 31, 0.28)); }
.soon__band { fill: var(--poppy); stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.soon__tail { fill: #a8190d; stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.soon__fold { fill: #6f0f07; stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.soon text { font-family: var(--display); font-size: 33px; fill: #fff; stroke: var(--ink); stroke-width: 6px; paint-order: stroke fill; stroke-linejoin: round; }
.crayon__label {
  display: block; margin: 0.8rem -0.8rem 0; padding: 0.3rem 0.5rem; text-align: center;
  font-family: var(--display); font-size: min(1.9rem, 12cqi); letter-spacing: 0.01em; line-height: 1.2; white-space: nowrap;
  background: var(--paper); border-block: 3px solid var(--ink);
}
.crayon__free {
  display: block; margin-top: 0.8rem; text-align: center; font-weight: 800; font-size: clamp(0.56rem, 0.7vw, 1rem); white-space: nowrap; text-decoration: none;
  background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 999px; padding: 0.4rem 0.5rem;
  transition: background-color 0.2s;
}
.crayon__free:hover { background: var(--sun); }
.crayon__main:focus-visible, .crayon__free:focus-visible { outline-color: #fff; }

.tray {
  position: relative; z-index: 0; margin-top: -3.2rem; height: 6.5rem; background: var(--box-deep);
  border-top: 4px solid var(--ink); box-shadow: inset 0 8px 10px -6px rgba(255, 255, 255, 0.22);
}

/* Colour bands, joined by a rough wax edge */
.band { position: relative; padding: var(--section) 0; background: var(--band, var(--sun)); }
.band::before {
  content: ""; position: absolute; left: -3%; right: -3%; top: -26px; height: 52px; background: var(--band, var(--sun));
  filter: url(#wax); pointer-events: none; z-index: 1;
}
.band > .wrap { position: relative; z-index: 2; }
.band--sun { --band: var(--sun); }
.band--axolotl { --band: var(--pink); }
.band--capybara { --band: var(--tan); }
.band--frog { --band: var(--leaf); }
.band--sloth { --band: #c9b08a; }
.band--penguin { --band: #8fb8e8; }
.band--fox { --band: #f2a35a; }
.band--owl { --band: #c49a6c; }
.band--bunny { --band: #7fd6d0; }
.band--bear { --band: #f0897d; }
.band--dog { --band: #f2c46d; }
.band--pig { --band: #ef7fae; }
.band--abc { --band: #d9c2ff; }
.band--box { --band: var(--box); color: #fff; }
.band--box :focus-visible { outline-color: var(--sun); }
.band__intro { font-size: 1.25rem; font-weight: 600; }
.band__fine { margin-top: 2.5rem; font-weight: 600; }

.sheets { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); justify-items: center; align-items: start; gap: 1.5rem clamp(0.6rem, 1.8vw, 1.75rem); margin: 2.5rem auto 0; max-width: 64rem; }
.sheet { position: relative; margin: 0; width: 100%; max-width: 11rem; background: #fff; border: 3px solid var(--ink); border-radius: 4px; padding: 0.8rem 0.8rem 0;
  box-shadow: 0 14px 20px -12px rgba(20, 22, 31, 0.5); }
.sheet img { display: block; width: 100%; }
.sheet::before { content: ""; position: absolute; left: 50%; top: -0.9rem; width: 5rem; height: 1.7rem; transform: translateX(-50%) rotate(-3deg);
  background: rgba(255, 255, 255, 0.7); border: 2px solid rgba(20, 22, 31, 0.25); }
.sheet--1 { transform: rotate(-2.2deg); }
.sheet--2 { transform: rotate(1.6deg); margin-top: 2.2rem; }
.sheet--3 { transform: rotate(-1deg); margin-top: 0.6rem; }
.sheet--4 { transform: rotate(1.4deg); margin-top: 1.6rem; }
.sheet--5 { transform: rotate(-1.6deg); margin-top: 0.4rem; }
.sheet--6 { transform: rotate(1.2deg); margin-top: 1.4rem; }
.sheet--7 { transform: rotate(-1.4deg); margin-top: 0.3rem; }
.sheet--8 { transform: rotate(1.5deg); margin-top: 1.5rem; }
.sheet--9 { transform: rotate(-1.2deg); margin-top: 0.6rem; }
.sheet--10 { transform: rotate(1.3deg); margin-top: 1.6rem; }
.sheet--11 { transform: rotate(-1.1deg); margin-top: 0.8rem; }
.sheet--12 { transform: rotate(1.4deg); margin-top: 1.8rem; }
.sheet figcaption { padding: 0.9rem 0 1rem; text-align: center; }

.book { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: clamp(1.5rem, 6vw, 5rem); align-items: center; }
.band--flip .book__cover { order: 2; transform: rotate(2deg); }
.book__cover { position: relative; margin: 0; width: 100%; max-width: 21rem; justify-self: center; border: 3px solid var(--ink); border-radius: 6px; background: #fff; transform: rotate(-2deg);
  box-shadow: 0 18px 24px -14px rgba(20, 22, 31, 0.55); }
.book__cover img { display: block; width: 100%; height: auto; }
.band--flip .book { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); }
.facts { margin: 1.25rem 0 0; max-width: 40rem; padding-left: 1.3rem; font-weight: 600; }
.facts li { margin-top: 0.35rem; padding-left: 0.2rem; }
.facts li::marker { color: var(--ink); }
.book__status { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; align-items: center; margin-top: 1.5rem; }
.chip { display: inline-block; font-weight: 800; font-size: 0.95rem; background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 0.15em 0.9em; }
.textlink { font-weight: 800; text-decoration-thickness: 3px; text-underline-offset: 0.2em; }
.textlink:hover { text-decoration-color: var(--poppy); }

.about__row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(1.5rem, 6vw, 5rem); align-items: center; }
.about h2, .about h3 { color: #fff; }
.about__art { justify-self: center; width: min(17rem, 70%); aspect-ratio: 1; background: var(--sun); border: 3px solid var(--ink); border-radius: 50%;
  display: grid; place-items: center; transform: rotate(3deg); }
.mascot { width: 72%; height: auto; }

.footer { position: relative; background: var(--ink); color: #fff; padding: 3rem 0 3.5rem; }
.footer::before { content: ""; position: absolute; left: -3%; right: -3%; top: -26px; height: 52px; background: var(--ink); filter: url(#wax); pointer-events: none; }
.footer__row { position: relative; z-index: 2; }
.footer__name { font-family: var(--display); font-size: 1.9rem; margin: 0; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1rem; }
.footer__nav a { font-weight: 700; }
.footer__fine { font-size: 0.95rem; opacity: 0.85; }
.footer__credit { margin: 1.25rem 0 0; font-size: 0.95rem; }
.footer__credit a { font-weight: 700; text-underline-offset: 0.2em; }

/* Plain pages */
.lid--slim { padding-bottom: 1.5rem; }
.wrapper--slim { padding: 1rem; font-family: var(--display); font-size: 2rem; transform: rotate(-1deg); }
.wrapper--slim a { text-decoration: none; }
.plain { background: var(--paper); padding: 3rem 0 5rem; min-height: 50vh; }
.plain__col { max-width: 46rem; }
.plain h1 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 1rem; }

@media (max-width: 900px) {
  .book, .band--flip .book { grid-template-columns: 1fr; }
  .band--flip .book__cover { order: 0; }
  .about__row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); --gap: 0.9rem; column-gap: var(--gap); row-gap: 1.8rem; max-width: 26rem; margin-inline: auto; padding: 1.2rem 0 0; overflow: visible; }
  .crayon, .crayon:nth-child(n) { --drop: 0rem; margin-top: 0; }
  .crayon__tip { height: 2.6rem; }
  .crayon__body { padding-bottom: 3.6rem; }
  .crayon__free { font-size: 0.9rem; }
  .tray { margin-top: -3rem; }
  .crayon:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - var(--gap) / 2); }
  .sheet:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .sheets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1rem; }
  .sheet { max-width: 12rem; }
  .sheet--2, .sheet--3, .sheet--4, .sheet--5, .sheet--6, .sheet--7, .sheet--8, .sheet--9, .sheet--10, .sheet--11, .sheet--12 { margin-top: 0; }
}
@media (max-width: 600px) {
  :root { --section: 2.75rem; }
  .book, .band--flip .book { grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
  .band--flip .book__cover { order: 0; transform: rotate(-2deg); }
  .book__cover { max-width: 11rem; }
  .book__text h2 { font-size: 1.35rem; line-height: 1.15; margin-bottom: 0.5rem; }
  .book__text p { font-size: 0.98rem; line-height: 1.45; margin-block: 0 0.4rem; }
  .book__status { margin-top: 0.8rem; gap: 0.5rem 0.9rem; }
  .textlink { display: inline-block; padding-block: 0.6rem; }
  .chip { font-size: 0.85rem; }
  .peel, .crayon__free { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .crayon__tip, .crayon__body, .peel, .crayon__free { transition: none; }
  .crayon:hover, .crayon:focus-within { transform: none; }
}

.crayon { container-type: inline-size; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
