/* hummus world: the game's palette, its pixel font, its panels and buttons. */
@font-face {
  font-family: "Hummus Pixel";
  src: url("/fonts/hummus-pixel.woff2") format("woff2");
  font-display: swap;
}
:root {
  --ink: #33223a; --ink-deep: #1e1424; --night: #1e1a3a;
  --cream: #fff4d6; --sand: #f4dca7; --sand-d: #e4bb7c; --wood: #5a3329; --wood-l: #855139;
  --terra: #bd4b3a; --terra-l: #e0784b; --terra-d: #8a3131;
  --teal: #3a9188; --teal-d: #226366; --teal-deep: #173a46; --teal-l: #6fc1a8;
  --gold: #f7d158; --gold-d: #e39e33; --gold-l: #fff0a2; --sky: #a3d4ec; --sky-d: #66a7d9;
  --pixel: "Hummus Pixel", ui-monospace, monospace;
  --body: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  /* the panel look: a light top-left edge, a darker bottom-right, a hard drop */
  --bevel: inset 3px 3px 0 #fffbec, inset -3px -3px 0 var(--sand-d), 0 4px 0 rgba(30, 20, 36, 0.25);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sand); color: var(--ink); font: 18px/1.6 var(--body); }
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--teal-d); }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--teal-d); outline-offset: 3px; }
.hero :focus-visible, .band.teal :focus-visible, .band.night :focus-visible, footer :focus-visible { outline-color: var(--gold); }

/* ---------------------------------------------------------------- the city */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: var(--sky); }
#city { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; opacity: 0;
  transition: opacity 0.9s ease; cursor: grab; touch-action: pan-y; }
#city.ready { opacity: 1; }
#city:active { cursor: grabbing; }
.shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(30, 20, 36, 0.38), rgba(30, 20, 36, 0) 34%); }
.copy-top { position: absolute; left: 0; right: 0; top: max(28px, env(safe-area-inset-top)); display: grid; justify-items: center;
  gap: 18px; padding: 0 16px; text-align: center; pointer-events: none; }
.copy-top > * { pointer-events: auto; }
.title { margin: 0; line-height: 0; }
/* the logo is 90 x 14 art pixels, always shown at a whole number of screen pixels each */
.logo { --k: 3; width: calc(90px * var(--k)); height: calc(14px * var(--k)); image-rendering: pixelated;
  filter: drop-shadow(0 4px 0 rgba(30, 20, 36, 0.35)); }
@media (min-width: 400px) { .logo { --k: 4; } }
@media (min-width: 520px) { .logo { --k: 5; } }
@media (min-width: 900px) { .logo { --k: 7; } }
@media (min-width: 1400px) { .logo { --k: 9; } }
.tagline { margin: 0; max-width: 24ch; padding: 9px 14px 7px; font: 20px/1.3 var(--pixel); color: var(--cream);
  background: rgba(30, 20, 36, 0.66); border: 3px solid rgba(30, 20, 36, 0.85); border-radius: 6px;
  text-shadow: 0 2px 0 var(--ink-deep); }
@media (min-width: 900px) { .tagline { max-width: none; white-space: nowrap; font-size: 28px; padding: 10px 18px 8px; } }
.cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; align-items: center; }
@media (max-width: 599px) { .cta .wide-only { display: none; } }

.copy-bottom { position: absolute; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom)); display: grid;
  justify-items: center; gap: 12px; padding: 0 16px; pointer-events: none; }
.copy-bottom .cta { pointer-events: auto; margin-bottom: 6px; }
.hint { margin: 0; padding: 7px 12px 5px; font: 18px/1 var(--pixel); color: var(--cream); background: rgba(30, 20, 36, 0.6);
  border-radius: 6px; text-shadow: 0 2px 0 var(--ink-deep); }
.down { pointer-events: auto; font: 30px/1 var(--pixel); color: var(--cream); text-decoration: none;
  animation: bob 1.6s ease-in-out infinite; text-shadow: 0 2px 0 var(--ink-deep), 2px 0 0 var(--ink-deep), -2px 0 0 var(--ink-deep); }
@keyframes bob { 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .down { animation: none; } html { scroll-behavior: auto; } }

.toast { position: absolute; left: 50%; top: 42%; transform: translate(-50%, 10px); opacity: 0; transition: 0.3s;
  pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* the app icon: 60 x 60 art pixels, shown at 60 or 120 css pixels so every pixel stays square */
.appicon { box-sizing: content-box; width: 60px; height: 60px; border: 3px solid var(--ink); border-radius: 16px;
  background: var(--cream); image-rendering: pixelated; box-shadow: 0 5px 0 var(--ink); }
.appicon.big { width: 120px; height: 120px; border-width: 4px; border-radius: 30px; box-shadow: 0 8px 0 rgba(0, 0, 0, 0.35); }

/* ---------------------------------------------------------------- the game's ui */
.panel { background: var(--cream); border: 3px solid var(--wood); border-radius: 6px; box-shadow: var(--bevel);
  padding: 14px 18px; font: 20px/1.3 var(--pixel); color: var(--ink); }
.btn { display: inline-block; font: 20px/1 var(--pixel); color: var(--cream); text-decoration: none; padding: 14px 20px 12px;
  background: var(--teal); border: 3px solid var(--ink); border-radius: 6px;
  box-shadow: inset 3px 3px 0 var(--teal-l), inset -3px -3px 0 var(--teal-d), 0 5px 0 var(--ink);
  text-shadow: 0 2px 0 var(--teal-d); transition: transform 0.06s, box-shadow 0.06s; cursor: pointer; }
.btn:active { transform: translateY(5px); box-shadow: inset 3px 3px 0 var(--teal-l), inset -3px -3px 0 var(--teal-d), 0 0 0 var(--ink); }
.btn.warm { background: var(--terra); box-shadow: inset 3px 3px 0 var(--terra-l), inset -3px -3px 0 var(--terra-d), 0 5px 0 var(--ink);
  text-shadow: 0 2px 0 var(--terra-d); }
.btn.warm:active { box-shadow: inset 3px 3px 0 var(--terra-l), inset -3px -3px 0 var(--terra-d), 0 0 0 var(--ink); }
/* a sign, not a link, until the store page exists */
.btn.soon, .btn.soon:active { cursor: default; transform: none;
  box-shadow: inset 3px 3px 0 var(--terra-l), inset -3px -3px 0 var(--terra-d), 0 5px 0 var(--ink); }
.btn small { display: block; font-size: 10px; letter-spacing: 1px; opacity: 0.85; margin-bottom: 6px; }

/* ---------------------------------------------------------------- the story */
.band { position: relative; padding: 72px 16px 84px; }
@media (min-width: 860px) { .band { padding: 112px 24px; } }
.band::before { content: ""; position: absolute; left: 0; right: 0; top: -15px; height: 16px; background: inherit;
  -webkit-mask: linear-gradient(to right, #000 50%, transparent 0) 0 0 / 32px 8px repeat-x,
                linear-gradient(#000, #000) 0 8px / 100% 8px no-repeat;
  mask: linear-gradient(to right, #000 50%, transparent 0) 0 0 / 32px 8px repeat-x,
        linear-gradient(#000, #000) 0 8px / 100% 8px no-repeat; }
.band.sand { background: var(--sand); }
.band.cream { background: var(--cream); }
.band.sky { background: var(--sky); }
.band.teal { background: var(--teal-deep); color: var(--cream); }
.band.night { background: var(--night); color: var(--cream); }
.band.terra { background: var(--terra-d); color: var(--cream); }
.wrap { max-width: 1080px; margin: 0 auto; }
.wrap.wide { max-width: 1240px; }
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } .split.flip > :first-child { order: 2; } }

.kicker { margin: 0 0 8px; font: 20px/1 var(--pixel); letter-spacing: 1px; color: var(--terra); }
.band.sky .kicker { color: var(--terra-d); }
.band.teal .kicker, .band.night .kicker, .band.terra .kicker { color: var(--gold); }
/* one font pixel is a tenth of the font size: sizes in tens keep every pixel whole */
h2 { margin: 0 0 18px; font: 40px/1.05 var(--pixel); }
@media (min-width: 860px) { h2 { font-size: 50px; } }
h3 { margin: 0 0 12px; font: 30px/1.1 var(--pixel); }
.split p { margin: 0 0 14px; max-width: 48ch; }
.center { text-align: center; }
.center h2 { margin-inline: auto; }
.lede { max-width: 46ch; margin: 0 auto; }
.bits { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; max-width: 48ch; }
.bits li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; line-height: 1.45; }
.bits img { justify-self: center; image-rendering: pixelated; }
.split .aside { margin: 24px 0 0; padding-top: 16px; border-top: 3px dotted var(--sand-d); font-size: 16px; color: var(--wood); }

.phone { margin: 0 auto; width: min(290px, 72vw); border: 6px solid var(--ink-deep); border-radius: 36px; overflow: hidden;
  box-shadow: 0 10px 0 rgba(30, 20, 36, 0.3); background: var(--ink-deep); }
.clip { margin: 0 auto; width: 100%; max-width: 420px; border: 4px solid var(--ink-deep); border-radius: 12px; overflow: hidden;
  background: var(--ink-deep); box-shadow: 0 8px 0 rgba(30, 20, 36, 0.3); }
.clip video { width: 100%; height: auto; image-rendering: pixelated; }
.phone video, .phone img { width: 100%; height: auto; }
/* two phones side by side, the second a step lower */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; width: 100%; max-width: 520px; margin: 0 auto; }
.duo figure { margin: 0; }
.duo figure + figure { margin-top: 40px; }
.duo .phone { width: 100%; border-width: 4px; border-radius: 24px; box-shadow: 0 6px 0 rgba(30, 20, 36, 0.3); }
.duo figcaption { margin-top: 14px; text-align: center; font: 16px/1.2 var(--pixel); color: var(--wood); }
@media (min-width: 480px) {
  .duo { gap: 20px; }
  .duo figure + figure { margin-top: 64px; }
  .duo .phone { border-width: 6px; border-radius: 34px; box-shadow: 0 10px 0 rgba(30, 20, 36, 0.3); }
  .duo figcaption { font-size: 20px; }
}
.art { image-rendering: pixelated; width: 100%; margin: 0 auto; border-radius: 10px; border: 4px solid var(--ink-deep);
  background: rgba(30, 20, 36, 0.25); }
/* 956 art pixels wide: one css pixel each, two on a retina screen */
.art.machines { max-width: 964px; margin-top: 48px; }

/* chapter two: the grand buildings. long lines read left-aligned on a phone, centered when there's room */
.skyline { margin-top: 88px; }
.wrap.skyline { max-width: 1400px; }
@media (min-width: 860px) { .skyline h3 { font-size: 40px; } }
.skyline p { max-width: 54ch; margin: 0; }
@media (min-width: 860px) { .skyline { margin-top: 112px; text-align: center; } .skyline p { margin: 0 auto; } }
/* the skyline strip stands on the band at one css pixel per art pixel: a row you swipe on a phone,
   the whole skyline when it fits, gently scaled down in between */
.strip { margin: 32px -16px; padding: 0 16px 8px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.strip::-webkit-scrollbar { display: none; }
.strip img { width: auto; max-width: none; margin: 0 auto; image-rendering: pixelated; }
@media (min-width: 700px) {
  .strip { margin: 40px 0; padding: 0; overflow: visible; }
  .strip img { max-width: 100%; image-rendering: auto; }
}
@media (min-width: 1421px) { .strip img { image-rendering: pixelated; } }

/* chapter three: the coin counter, like the game's top bar */
.split .hud { display: inline-flex; align-items: center; gap: 12px; margin: 10px 0 24px; padding: 10px 20px 8px 14px;
  background: var(--cream); border: 3px solid var(--wood); border-radius: 6px; box-shadow: var(--bevel);
  font: 40px/1 var(--pixel); color: var(--ink); }
.hud img { image-rendering: pixelated; }
.hud .count { min-width: 5.5ch; }

/* chapter three: the route, 24 stops in the order the family travels */
.route-wrap { margin-top: 64px; }
@media (min-width: 860px) { .route-wrap { margin-top: 96px; } }
.route-head { display: flex; align-items: center; gap: 12px; margin: 0; }
.route-head img, .route-note img { image-rendering: pixelated; flex: none; }
.route { list-style: none; margin: 18px -16px 0; padding: 8px 16px 22px; display: grid; grid-auto-flow: column;
  grid-auto-columns: max-content; gap: 18px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 16px;
  overscroll-behavior-x: contain; scrollbar-width: none; }
.route::-webkit-scrollbar { display: none; }
.stop { position: relative; scroll-snap-align: start; display: grid; grid-template-columns: auto 1fr; align-items: baseline;
  align-content: center; gap: 8px 6px; min-width: 120px; min-height: 68px; padding: 10px 16px 8px 12px; background: var(--cream);
  border: 3px solid var(--wood); border-radius: 6px; box-shadow: var(--bevel); color: var(--ink); }
.stop .n { font: 16px/1 var(--pixel); color: var(--terra-d); }
.stop b { font: 20px/1 var(--pixel); white-space: nowrap; }
.stop small { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font: 14px/1 var(--pixel); color: var(--teal-d);
  white-space: nowrap; }
.stop small img { image-rendering: pixelated; flex: none; }
/* the first and the last stop, in gold */
.stop.home, .stop.last { background: var(--gold-l);
  box-shadow: inset 3px 3px 0 #fffbe2, inset -3px -3px 0 var(--gold), 0 4px 0 rgba(30, 20, 36, 0.25); }
/* two dots between stops, like the route on the game's world map */
.stop::before { content: ""; position: absolute; top: 50%; left: -19px; width: 14px; height: 4px; margin-top: -2px;
  background: linear-gradient(to right, var(--wood) 0 4px, transparent 4px 10px, var(--wood) 10px 14px); }
.stop:first-child::before { content: none; }
/* wider: every stop at once, four or six to a row */
@media (min-width: 800px) {
  .route { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); gap: 16px 18px; margin: 22px 0 0; padding: 0; overflow: visible; }
  .stop { min-width: 0; }
}
@media (min-width: 800px) and (max-width: 1239px) { .stop:nth-child(4n+1)::before { content: none; } }
@media (min-width: 1240px) {
  .route { grid-template-columns: repeat(6, 1fr); }
  .stop:nth-child(6n+1)::before { content: none; }
}
.route-note { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; font: 16px/1.2 var(--pixel); color: var(--wood); }
@media (min-width: 800px) { .route-head, .route-note { justify-content: center; } .route-note { margin-top: 24px; } }

/* chapter five: three little panels */
.cards { list-style: none; margin: 40px auto 0; padding: 0; display: grid; gap: 16px; max-width: 980px; text-align: left; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.cards .panel { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 4px 14px; padding: 16px 18px 14px; }
.cards img { grid-row: span 2; justify-self: center; image-rendering: pixelated; }
.cards h3 { margin: 0; font-size: 20px; }
.cards p { margin: 0; font: 16px/1.45 var(--body); color: var(--wood); }

/* phones: a row you swipe, edge to edge, the next shot peeking in. wider: all six at once */
.shots { display: grid; grid-auto-flow: column; grid-auto-columns: min(70vw, 290px); gap: 14px; margin: 28px -16px 0;
  padding: 8px 16px 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.shots::-webkit-scrollbar { display: none; }
.shots figure { margin: 0; scroll-snap-align: center; }
.shots img { width: 100%; border-radius: 18px; border: 4px solid var(--ink-deep); background: var(--sand);
  box-shadow: 0 6px 0 rgba(30, 20, 36, 0.25); }
.shots figcaption { margin-top: 14px; font: 20px/1.2 var(--pixel); color: var(--wood); }
@media (min-width: 700px) {
  .shots { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); gap: 28px 22px; margin: 36px auto 0; padding: 8px 0 0;
    max-width: 780px; overflow: visible; }
}
@media (min-width: 1100px) { .shots { grid-template-columns: repeat(6, 1fr); gap: 18px; max-width: none; } }

footer { background: var(--ink-deep); color: var(--sand); padding: 80px 16px 48px; text-align: center; }
footer .appicon { margin: 0 auto 32px; }
footer h2 { color: var(--cream); }
footer p { margin: 0 auto; }
footer nav { display: flex; gap: 22px; justify-content: center; margin-top: 30px; font: 20px/1 var(--pixel); }
footer a { color: var(--gold); }
footer .small { margin-top: 26px; font-size: 14px; color: var(--sand-d); }

/* ---------------------------------------------------------------- plain pages */
.page { max-width: 720px; margin: 0 auto; padding: 32px 16px 64px; }
.page header { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
/* the 60 x 60 icon, one css pixel per art pixel */
.page header img { flex: none; width: 60px; height: 60px; border-radius: 14px; image-rendering: pixelated; }
.page h1 { margin: 0; font: 40px/1.05 var(--pixel); color: var(--terra); }
.page h2 { font-size: 30px; margin: 32px 0 6px; }
.page .muted { color: var(--wood-l); font-size: 15px; margin: 4px 0 0; }
.page .panel { font: 17px/1.5 var(--body); margin: 18px 0; }
.page footer { background: none; color: var(--wood-l); padding: 40px 0 0; text-align: left; font-size: 15px; }
.page footer a { color: var(--teal-d); }

/* ---------------------------------------------------------------- the story behind the game */
.maker { position: relative; width: 100%; max-width: 340px; margin: 0 auto; }
.maker .photo { position: relative; padding: 8px; }
.maker .photo img { width: 100%; height: auto; border-radius: 3px; }
/* teta signs the photo: her pixel portrait, stuck on the corner */
.maker .teta { position: absolute; right: 12px; bottom: -22px; width: 30%; max-width: 104px; padding: 6px; transform: rotate(5deg); }
.maker .teta img { width: 100%; height: auto; image-rendering: pixelated; }
.maker figcaption { margin-top: 34px; text-align: center; font: 24px/1.2 var(--pixel); color: var(--ink); }
.maker figcaption span { display: block; margin-top: 6px; font: 16px/1.4 var(--body); color: var(--wood-l); }
.story .sign { margin-top: 26px; font: 22px/1.35 var(--pixel); color: var(--terra-d); }
.story .links { display: flex; gap: 20px; flex-wrap: wrap; font: 18px/1 var(--pixel); }
.story .links a { color: var(--teal-d); }
/* on wide screens the photo keeps you company while you read */
@media (min-width: 860px) { .story { align-items: start; } .maker { position: sticky; top: 48px; margin-top: 8px; } }
