/*
 * Joxli games site. One bright look on purpose (a children's games shelf),
 * so there is no dark version. Layout idea: everything stands on wooden
 * shelves, the same shelf the jars stand on in Masala Sort. The deep purple
 * ink is the outline colour of the Joxli fox logo.
 */
@font-face { font-family: "Nunito"; font-weight: 600; font-display: swap; src: url("../fonts/nunito-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("../fonts/nunito-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("../fonts/nunito-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 900; font-display: swap; src: url("../fonts/nunito-latin-900-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --sun: #fff3c4;
  --sky: #a9e0ff;
  --sky-deep: #5fb8ef;
  --paper: #f4fbff;
  --card: #ffffff;
  --edge: #cfe6f6;
  --ink: #2b1b63;
  --ink-soft: #55478c;
  --orange: #f58a1f;
  --orange-deep: #b9590a;
  --orange-ink: #3d1c05;
  --wood: #e3ab6b;
  --wood-deep: #c0844a;
  --chilli: #d62839;
  --leaf: #2f8f45;
  --beet: #7b3aa6;
  --turmeric: #f2c230;
  --night: #21124d;
  --night-text: #d9d0ff;
  --display: "Nunito", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --text: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.55;
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--orange-deep); text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 10px; }
h1, h2, h3 { font-family: var(--display); font-weight: 900; line-height: 1.12; text-wrap: balance; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1080px; margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.skip { position: absolute; left: -999px; top: 0; background: var(--card); padding: 8px 14px; border-radius: 0 0 10px 0; font-weight: 900; z-index: 20; }
.skip:focus { left: 0; }

/* Sky: the band behind the header and the opening of every page */
.sky {
  background:
    radial-gradient(58% 62% at 50% -6%, var(--sun) 0, rgba(255, 243, 196, 0) 72%),
    linear-gradient(180deg, var(--sky) 0, var(--sky-deep) 100%);
}

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 18px; padding-block: 12px 4px; }
.brand { display: inline-flex; text-decoration: none; }
.brand .logo { display: block; height: 92px; width: auto; filter: drop-shadow(0 4px 0 rgba(43, 27, 99, .16)); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 800; font-size: 16px; padding: 7px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255, 255, 255, .72); }

/* Buttons: the chunky, pressable look of the game's Play button */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display); font-weight: 900; font-size: 20px; line-height: 1.1; text-decoration: none;
  padding: 15px 28px 17px; border-radius: 22px; border: 0; cursor: pointer;
  color: var(--orange-ink); background: linear-gradient(180deg, #f6a53a, var(--orange));
  box-shadow: 0 6px 0 var(--orange-deep), 0 12px 22px rgba(29, 43, 83, .18);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--orange-deep), 0 4px 10px rgba(29, 43, 83, .18); }
.btn.soft { color: var(--ink); background: #fff; box-shadow: 0 6px 0 #a9c9e6, 0 12px 22px rgba(29, 43, 83, .12); }
.btn.soft:active { box-shadow: 0 2px 0 #a9c9e6; }
.btn.big { font-size: 24px; padding: 18px 36px 20px; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px 14px; }

/* Home: opening */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 20px 36px; align-items: end; padding-block: 26px 0; }
.hero-text { padding-bottom: 56px; display: grid; gap: 20px; justify-items: start; }
.hero h1 { font-size: clamp(38px, 6.2vw, 64px); letter-spacing: -.5px; }
.hero h1 em { font-style: normal; color: #fff; -webkit-text-stroke: 8px var(--ink); paint-order: stroke fill; padding-inline: 4px; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--ink); max-width: 30em; font-weight: 700; }
.stage { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 0; padding-inline: 8px; min-width: 0; }
.stage::after { /* the shelf plank */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px; border-radius: 9px 9px 0 0;
  background: linear-gradient(180deg, #f0bf85, var(--wood) 55%, var(--wood-deep));
  box-shadow: 0 -1px 0 rgba(255, 255, 255, .5) inset;
}
.phone {
  position: relative; z-index: 1; width: min(250px, 58%); margin-bottom: 18px; flex: none;
  border: 9px solid var(--ink); border-bottom-width: 12px; border-radius: 34px; overflow: hidden; background: var(--ink);
  box-shadow: 0 18px 34px rgba(29, 43, 83, .28);
  aspect-ratio: 360 / 640;
}
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; }
.stage .friend { position: relative; z-index: 2; width: min(190px, 42%); margin: 0 0 14px -26px; flex: none; }
.stage .friend img { display: block; width: 100%; }

/* Sections */
.section { padding-block: 56px; }
.section > .wrap { display: grid; gap: 26px; }
.section-head { display: grid; gap: 8px; max-width: 40em; }
.section h2 { font-size: clamp(28px, 4vw, 40px); }
.section-head p { color: var(--ink-soft); font-size: 18px; }
.tint { background: #e7f5ff; }

/* The games shelf */
.shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding-inline: 14px; position: relative; padding-bottom: 20px; }
.shelf::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 20px; border-radius: 10px;
  background: linear-gradient(180deg, #f0bf85, var(--wood) 55%, var(--wood-deep));
  box-shadow: 0 10px 18px rgba(29, 43, 83, .16);
}
.game {
  background: var(--card); border: 2px solid var(--edge); border-bottom: 0; border-radius: 26px 26px 0 0;
  padding: 22px 22px 24px; display: grid; gap: 14px; align-content: start; min-width: 0;
}
.game-top { display: flex; gap: 16px; align-items: center; min-width: 0; }
.game-icon { width: 84px; height: 84px; border-radius: 20px; flex: none; box-shadow: 0 5px 0 rgba(29, 43, 83, .14); }
.game h3 { font-size: 27px; }
.game h3 a { color: inherit; text-decoration: none; }
.game .kind { color: var(--ink-soft); font-weight: 800; font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.tags li { font-size: 14px; font-weight: 800; background: #eaf6ff; color: var(--ink); border-radius: 999px; padding: 3px 12px 4px; }
.game.soon { background: repeating-linear-gradient(135deg, #fbfdff 0 14px, #f0f8ff 14px 28px); border-style: dashed; border-color: #a9c9e6; }
.game.soon .game-icon { box-shadow: none; }
.game .btn { justify-self: start; }

/* Promise list */
.promises { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; padding: 0; margin: 0; list-style: none; }
.promises li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 4px 16px; align-items: start; }
.promises svg { width: 58px; height: 58px; grid-row: span 2; }
.promises b { font-family: var(--display); font-weight: 900; font-size: 21px; line-height: 1.2; align-self: end; }
.promises span { color: var(--ink-soft); }

/* Parents strip */
.parents { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px 30px; align-items: center; }
.parents img { width: 150px; display: block; }
.parents .words { display: grid; gap: 12px; justify-items: start; max-width: 36em; }
.parents h2 { font-size: clamp(26px, 3.6vw, 34px); }

/* Game page */
.game-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 20px 36px; align-items: end; padding-block: 20px 0; }
.game-hero .hero-text { padding-bottom: 50px; }
.crumb { font-weight: 800; font-size: 15px; }
.crumb a { color: var(--ink); }
.title-row { display: flex; align-items: center; gap: 18px; }
.title-row img { width: 92px; height: 92px; border-radius: 22px; box-shadow: 0 6px 0 rgba(29, 43, 83, .16); flex: none; }
.title-row h1 { font-size: clamp(38px, 6vw, 60px); }
.small-note { font-size: 15px; color: var(--ink); font-weight: 800; }
.shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 0; margin: 0; list-style: none; }
.shots li { display: grid; gap: 8px; text-align: center; font-size: 15px; color: var(--ink-soft); }
.shots img { display: block; width: 100%; aspect-ratio: 360 / 640; object-fit: cover; border-radius: 22px; border: 5px solid var(--ink); background: var(--sky); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 0; margin: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; background: var(--card); border: 2px solid var(--edge); border-radius: 22px; padding: 18px 20px 20px; display: grid; gap: 6px; align-content: start; }
.steps li::before {
  content: counter(step); font-family: var(--display); font-weight: 900; font-size: 22px; width: 40px; height: 40px;
  display: grid; place-items: center; border-radius: 50%; background: var(--turmeric); color: var(--orange-ink);
}
.steps b { font-family: var(--display); font-weight: 900; font-size: 20px; }
.steps span { color: var(--ink-soft); }
.inside { columns: 2; column-gap: 40px; padding: 0 0 0 22px; margin: 0; max-width: 54em; }
.inside li { break-inside: avoid; margin-bottom: 8px; }
.friends { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 760px; gap: 12px; padding: 0; margin: 0; list-style: none; align-items: end; }
.friends li { display: grid; gap: 4px; justify-items: center; text-align: center; font-weight: 900; font-family: var(--display); }
.friends img { width: 100%; max-width: 150px; height: 150px; object-fit: contain; object-position: bottom; }
.friends small { font-family: var(--text); font-weight: 700; color: var(--ink-soft); font-size: 14px; line-height: 1.3; }
.faq { display: grid; gap: 12px; max-width: 46em; }
.faq details { background: var(--card); border: 2px solid var(--edge); border-radius: 18px; padding: 4px 20px; }
.faq summary { cursor: pointer; font-family: var(--display); font-weight: 900; font-size: 19px; padding-block: 12px; }
.faq details p { padding-bottom: 16px; color: var(--ink-soft); }
.cta-band { text-align: center; }
.cta-band .wrap { justify-items: center; }

/* Reading pages (For parents, Privacy) */
.page-head { padding-block: 22px 40px; display: grid; gap: 10px; }
.page-head h1 { font-size: clamp(34px, 5.4vw, 52px); }
.page-head p { font-size: 19px; max-width: 34em; }
.prose { max-width: 42em; display: grid; gap: 14px; }
.prose h2 { font-size: 25px; margin-top: 18px; }
.prose ul { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.prose .box { background: var(--card); border: 2px solid var(--edge); border-radius: 18px; padding: 16px 20px; }
.prose address { font-style: normal; }
.date { color: var(--ink-soft); font-size: 15px; }

/* Not found */
.lost { text-align: center; padding-block: 30px 70px; }
.lost .wrap { display: grid; gap: 18px; justify-items: center; }
.lost img { width: 190px; }
.lost h1 { font-size: clamp(32px, 5vw, 46px); }

/* Footer */
.foot { background: var(--night); color: var(--night-text); padding-block: 34px 40px; font-size: 16px; }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 40px; align-items: start; }
.foot a { color: #fff; }
.foot .who { display: grid; gap: 6px; max-width: 32em; }
.foot .who b { font-family: var(--display); font-weight: 900; font-size: 20px; color: #fff; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }

/* Smaller screens */
@media (max-width: 860px) {
  .hero, .game-hero { grid-template-columns: minmax(0, 1fr); }
  .hero-text, .game-hero .hero-text { padding-bottom: 6px; }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 460px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .inside { columns: 1; }
  .friends { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; max-width: 420px; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .section { padding-block: 40px; }
  .shelf { grid-template-columns: minmax(0, 1fr); padding-inline: 8px; }
  .game.soon { border-radius: 26px 26px 0 0; }
  .promises { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .parents { grid-template-columns: minmax(0, 1fr); }
  .parents img { width: 120px; }
  .foot .wrap { grid-template-columns: minmax(0, 1fr); }
  .brand .logo { height: 72px; }
  .nav a { padding: 6px 10px; font-size: 15px; }
  .btn.big { font-size: 22px; padding: 16px 30px 18px; }
  .title-row img { width: 72px; height: 72px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
