/* The play pages (ADR 0174, 0178) in the game's look (docs/game-design/style.md), over the
   site's style sheet: paper with grain, ink edges with hard ink shadows, Shantell Sans for what
   is said loud and Nunito for the rest, yellow for the thing to press. Only the play pages link
   it; the rest of the site keeps its own look. */
@font-face {
  font-family: "Shantell Sans"; src: url("/fonts/ShantellSans.woff2") format("woff2");
  font-weight: 800; font-display: swap;
}
@font-face {
  font-family: "Nunito"; src: url("/fonts/Nunito.woff2") format("woff2");
  font-weight: 200 1000; font-display: swap;
}
:root {
  --paper: #f0ebe0;
  --paper-hi: #faf6ec;
  --paper-lo: #e4dbc8;
  --ink: #211d18;
  --ink-2: #5c5448;
  --muted: #5c5448;
  --yellow: #ffd23f;
  --yellow-2: #e9b200;
  --coral: #ff6b4a;
  --mint: #2fb491;
  --sky: #4a9fe0;
  --display: "Shantell Sans", "Comic Neue", "Chalkboard SE", cursive;
  --face: "Nunito", ui-rounded, system-ui, sans-serif;
  --pill: 18px 22px 17px 23px / 21px 17px 23px 18px;
  --card: 18px 24px 17px 23px / 22px 17px 23px 18px;
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .32  0 0 0 0 .25  0 0 0 0 .15  0 0 0 .10 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
html { background: var(--paper) var(--grain); }
body { font-family: var(--face); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration-color: var(--yellow-2); text-decoration-thickness: 2.5px; }
:focus-visible { outline-color: var(--sky); }

/* The bar: paper, with an ink line under it. */
.site-bar { background: var(--paper-hi); color: var(--ink); border-bottom: 2.5px solid var(--ink); }
.site-bar .mark { font: 800 19px var(--display); white-space: nowrap; }
@media (max-width: 400px) { .site-bar .mark { font-size: 16px; } .site-bar .mark svg { display: none; } }
.site-bar nav a { color: var(--ink-2); font: 800 16px var(--face); border-radius: 12px; }
.site-bar nav a:hover, .site-bar nav a[aria-current="page"] { color: var(--ink); background: var(--paper-lo); }
.bar-draw {
  color: var(--ink); background: var(--yellow); font: 800 16px var(--display); padding: 5px 14px 7px;
  border: 2.2px solid var(--ink); border-radius: var(--pill); box-shadow: 0 3px 0 var(--ink);
}

/* Buttons: yellow, with a hard shadow they sink onto. */
.button {
  min-height: 54px; padding: 0 26px 3px; border: 2.5px solid var(--ink); border-radius: 22px 26px 20px 28px / 26px 20px 28px 22px;
  background: var(--yellow); color: var(--ink); font: 800 22px var(--display);
  box-shadow: 0 5px 0 var(--ink); transition: transform 0.09s ease, box-shadow 0.09s ease;
}
.button:hover { background: var(--yellow); transform: translateY(-1px); box-shadow: 0 6px 0 var(--ink); }
.button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }

/* The page's head. */
.play-head h1, .play-page > h1 { font: 800 clamp(40px, 6vw, 64px)/1.02 var(--display); letter-spacing: 0; text-wrap: balance; }
.play-page > h1 { margin: 0 0 16px; }
.lede { font-weight: 600; color: var(--ink-2); }
.kicker a {
  display: inline-block; padding: 2px 12px 3px; rotate: -2deg; text-decoration: none;
  background: rgb(255 107 74 / 0.6); clip-path: polygon(3% 0, 97% 6%, 100% 30%, 96% 55%, 100% 100%, 4% 94%, 0 70%, 3% 42%);
  font: 900 13px var(--face); text-transform: uppercase; letter-spacing: 0.1em;
}
.packs h2, .more-title { font: 800 32px/1.1 var(--display); letter-spacing: 0; }

/* A world: a paper card, its picture framed in ink, its stars and Play. */
.pack {
  padding: 18px; background: var(--paper-hi); border: 2.5px solid var(--ink); border-radius: var(--card);
  box-shadow: 0 6px 0 var(--ink);
}
.pack:nth-child(odd) { rotate: -0.4deg; }
.pack:nth-child(even) { rotate: 0.4deg; }
.pack-pictures { border: 2.5px solid var(--ink); border-radius: 12px 14px 11px 15px / 14px 11px 15px 12px; box-shadow: none; }
.pack-pictures:hover { box-shadow: 0 5px 0 var(--ink); }
.pack-title { text-decoration: none; }
.pack-title strong { font: 800 30px/1.1 var(--display); }
.pack-words p { color: var(--ink-2); font-weight: 600; }
.pack-stars, .level-stars { color: var(--ink); font-weight: 900; }
.pack-stars { padding: 1px 8px 2px; border-radius: 8px; background: var(--yellow); }
.challenge-by { color: var(--ink-2); font-weight: 700; }

/* A level or a challenge: its picture as a ticket. */
.challenges { gap: 26px 22px; }
.challenge { text-decoration: none; }
.challenge-picture {
  border: 2.5px solid var(--ink); border-radius: 12px 14px 11px 15px / 14px 11px 15px 12px;
  background: var(--paper-hi); box-shadow: 0 5px 0 var(--ink);
}
.challenges > li:nth-child(odd) .challenge-picture { rotate: -0.8deg; }
.challenges > li:nth-child(even) .challenge-picture { rotate: 0.8deg; }
.challenge:hover .challenge-picture { transform: translateY(-3px); box-shadow: 0 8px 0 var(--ink); }
.challenge strong { margin-top: 8px; font: 800 21px/1.2 var(--display); }
.challenge-cover { color: var(--ink-2); }
.level-number {
  min-width: 38px; height: 38px; border: 2.2px solid var(--ink); border-radius: 50% 46% 52% 48% / 48% 52% 46% 50%;
  background: var(--yellow); color: var(--ink); font: 800 19px/1 var(--display); rotate: -6deg;
}
.level.locked .challenge-picture { filter: grayscale(1); opacity: 0.5; box-shadow: none; }
.level.locked .level-number { background: var(--paper-lo); }
.pack-rules, .none { color: var(--ink-2); font-weight: 600; }

/* The footer: ink, as the game's dark is. */
.site-foot { background: var(--ink); color: #c9bfae; }
.site-foot a { color: var(--paper-hi); }
