/* chessfart.com: the front page and the plain pages. The game's sticker look (DESIGN.md section 4): flat colours,
   3 px ink outlines, hard offset shadows, rounded everything, on the cream bean pattern. Fredoka for sentences,
   Lilita One for headings. */
@font-face { font-family: "Fredoka CF"; src: url("/fonts/FredokaBB-W500.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fredoka CF"; src: url("/fonts/FredokaBB-W600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fredoka CF"; src: url("/fonts/FredokaBB-W700.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Lilita CF"; src: url("/fonts/LilitaOne-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jersey CF"; src: url("/fonts/Jersey10.ttf") format("truetype"); font-weight: 400; font-display: swap; }

:root {
  --ink: #2A1E3B; --cream: #FFF4E0; --card: #FFFDF7; --panel: #FFF9EE; --grape: #6A4FB0; --frame: #5B3F9A; --lilac: #9C88D8; --light: #F7E9CB;
  --sky: #45B7F5; --sun: #FFC233; --gum: #FF6FB5; --mint: #2ED3A0; --fart: #8CCB3F; --fartdark: #5E9A22;
  --body: 18px; --line: 28px;
}
@media (max-width: 640px) { :root { --body: 17px; --line: 26px; } }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream) url("/img/game/bg_tile.png") repeat; background-size: 128px 128px;
  font: 500 var(--body)/var(--line) "Fredoka CF", "Fredoka", system-ui, sans-serif; overflow-x: hidden; }
h1, h2, h3 { font-family: "Lilita CF", "Fredoka CF", system-ui, sans-serif; font-weight: 400; letter-spacing: 0.01em; margin: 0 0 14px; }
h1 { font-size: clamp(40px, 7vw, 64px); line-height: 1.02; }
h2 { font-size: clamp(30px, 5vw, 44px); line-height: 1.05; }
h3 { font-size: 24px; line-height: 1.15; }
p { margin: 0 0 16px; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 4px; }
b { font-weight: 700; }
.small { font-size: 15px; line-height: 22px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border: 3px solid var(--ink); border-radius: 12px; z-index: 10; }
.skip:focus { left: 8px; }

.sticker { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 3px solid var(--ink); border-radius: 18px; background: var(--card);
  box-shadow: 0 4px 0 var(--ink); padding: 10px 22px 12px; font: 700 19px/1.1 "Fredoka CF", system-ui, sans-serif; color: var(--ink); text-decoration: none; cursor: pointer; }
.sticker:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.sticker.sun { background: var(--sun); }
.sticker.small { font-size: 16px; padding: 7px 14px 9px; border-radius: 14px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1180px; margin: 0 auto; padding: 14px 16px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 400 30px/1 "Lilita CF", system-ui, sans-serif; }
.brand img { border-radius: 12px; border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }

main { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.hero { display: grid; gap: 22px; padding: 22px 0 30px; align-items: center; }
.hero .lead { font-size: calc(var(--body) + 2px); line-height: calc(var(--line) + 3px); max-width: 560px; }
.hero .try { font-weight: 700; color: var(--grape); }
@media (min-width: 920px) {
  .hero { grid-template-columns: 1fr 420px; gap: 48px; padding: 44px 0 50px; }
}

.demo { position: relative; width: 100%; max-width: 420px; margin: 0 auto; height: min(640px, 152vw); background: var(--panel); border: 3px solid var(--ink);
  border-radius: 30px; box-shadow: 0 6px 0 var(--ink); overflow: hidden; background-image: url("/img/game/bg_tile.png"); background-size: 128px 128px; }
.demo canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; }
.demoresult { position: absolute; left: 10px; right: 10px; bottom: 10px; background: var(--card); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 4px 0 var(--ink);
  padding: 12px 14px 14px; text-align: center; }
.demoresult p { margin: 0 0 8px; }
.demoresult img { vertical-align: middle; image-rendering: pixelated; }
.verdictline { font-weight: 700; font-size: 19px; }
.others { font-size: 15px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; align-items: center; }
.others span { white-space: nowrap; }
.others img { height: 20px; }
.demoloading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; gap: 8px; margin: 0; }
.demoloading span { width: 14px; height: 14px; border-radius: 50%; background: var(--grape); animation: dot 0.9s ease-in-out infinite; }
.demoloading span:nth-child(2) { animation-delay: 0.15s; }
.demoloading span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 100% { opacity: 0.25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-6px); } }

.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 10px 0 0; }
.stores a { display: block; line-height: 0; }
.stores a.sticker { line-height: 1.1; }
.stores img { height: 52px; width: auto; }
.get .stores { justify-content: center; }

.band { background: var(--card); border: 3px solid var(--ink); border-radius: 30px; box-shadow: 0 6px 0 var(--ink); padding: 28px 20px 24px; margin: 0 0 30px; }
.band .wide { max-width: 760px; }
@media (min-width: 720px) { .band { padding: 40px 40px 34px; } }
/* the cast: each animal on its own canvas at a whole number of device pixels per art pixel (js/site.js), its name in Jersey 10 */
.cast { list-style: none; margin: 18px 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.member { width: 100%; display: grid; justify-items: center; gap: 4px; padding: 6px 4px 10px; background: var(--light); border: 3px solid var(--ink); border-radius: 18px;
  box-shadow: 0 3px 0 var(--ink); font: 400 21px/1 "Jersey CF", "Jersey 10", monospace; color: var(--ink); cursor: pointer; text-align: center; }
.member:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.member canvas { width: 100%; height: 104px; display: block; image-rendering: pixelated; }
.gang { background: var(--panel); }
.friends { background: #E9F6FE; }
.unlock { background: #FFF6D6; }
.get { text-align: center; background: var(--panel); }
.get .wide { margin: 0 auto 8px; }
.cols { display: grid; gap: 24px; align-items: center; }
@media (min-width: 860px) { .cols { grid-template-columns: 1.3fr 1fr; gap: 40px; } }
.linkcard { display: flex; align-items: flex-end; gap: 12px; justify-content: center; }
.linkcard img { border-radius: 16px; border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); flex: none; }
.bubble { background: var(--sky); color: #fff; border: 3px solid var(--ink); border-radius: 22px 22px 6px 22px; box-shadow: 0 4px 0 var(--ink); padding: 14px 18px 16px; margin: 0;
  font-weight: 600; max-width: 300px; }
.bubble b { color: var(--ink); background: #fff; border-radius: 8px; padding: 0 6px; display: inline-block; margin-top: 6px; font-weight: 700; }
.perks { list-style: none; padding: 0; margin: 18px 0 4px; display: grid; gap: 14px; }
@media (min-width: 860px) { .perks { grid-template-columns: repeat(3, 1fr); } }
.perks li { background: var(--card); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 4px 0 var(--ink); padding: 16px 16px 18px; }
.perks b { display: block; font: 400 24px/1.1 "Lilita CF", system-ui, sans-serif; margin-bottom: 6px; }
.perks li:nth-child(1) b { color: var(--grape); }
.perks li:nth-child(2) b { color: #C9971A; }
.perks li:nth-child(3) b { color: var(--fartdark); }

footer { max-width: 1180px; margin: 0 auto; padding: 10px 16px 40px; text-align: center; }
footer p { margin: 0 0 8px; }
.privacy-choice { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.consent { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(560px, calc(100% - 24px)); background: var(--card); border: 3px solid var(--ink);
  border-radius: 20px; box-shadow: 0 5px 0 var(--ink); padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; z-index: 30; }
.consent p { margin: 0; flex: 1 1 260px; font-size: 16px; line-height: 22px; }
.noscript { text-align: center; }

/* the plain pages: privacy, terms, support, 404 */
.doc main { max-width: 760px; padding: 18px 16px 60px; }
.doc main > * { position: relative; }
.doc .home { margin: 0 0 20px; }
.doc .home a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 400 26px/1 "Lilita CF", system-ui, sans-serif; }
.doc .home img { border-radius: 10px; border: 3px solid var(--ink); }
.doc h1 { font-size: 46px; }
.doc h2 { font-size: 28px; margin-top: 30px; }
.doc main { background: transparent; }
.doc main p, .doc main ul { background: none; }
.doc article { background: var(--card); border: 3px solid var(--ink); border-radius: 26px; box-shadow: 0 6px 0 var(--ink); padding: 24px 22px 18px; }
