/* kithland.com: one stylesheet, phones first. Colours from the game: the logo's leaf green and sun yellow, its plum
   ink, the console's dark glass and case, the face buttons (src/shell/shell.css). Pixel art is drawn at 1× by
   site/build.ts and scaled here by whole numbers (--s) with image-rendering: pixelated. */
:root {
  --night: #16181e;
  --night-2: #262a35;
  --glass: #0d0e12;
  --paper: #f6f1e4;
  --paper-2: #ede5d1;
  --card: #fffcf4;
  --line: #d8ccb2;
  --ink: #2a1438;
  --text: #2b2532;
  --muted: #5b5263;
  --leaf: #4ea82c;
  --leaf-hi: #9ee050;
  --leaf-deep: #2e7a2c;
  --sun: #ffc840;
  --sun-hi: #ffe878;
  --sun-deep: #f07820;
  --rust: #c0501c;
  --cream: #f3eee3;
  --btn-a: #d14b3a;
  --btn-b: #e0a431;
  --btn-x: #2f9690;
  --btn-y: #7b5aa6;
  --rubber: #6f6c79;
  --gutter: 16px;
  --s: 3; /* pixel scale for headings */
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--night); }
/* the page is paper; below a short page's footer (and past the ends when overscrolling) the console's dark shows */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}
img { max-width: 100%; }
a { color: var(--leaf-deep); text-decoration-thickness: 2px; text-underline-offset: 2px; }
a:hover { color: var(--rust); }
:focus-visible { outline: 3px solid var(--sun-deep); outline-offset: 3px; border-radius: 4px; }
code { font: 0.9em ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
h1, h2, h3 { color: var(--ink); line-height: 1.25; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 10; background: var(--sun); color: var(--ink); padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; }

/* pixel art from the game */
.px-h, .logo {
  display: block;
  width: calc(var(--w) * var(--s) * 1px);
  height: auto;
  max-width: 100%;
  image-rendering: pixelated;
}
.logo { --s: 2; margin: 0 auto; }

/* the big button: sun-yellow face, plum ink edge, the logo's extruded side under it */
.btn-play {
  display: inline-block;
  padding: 16px 30px 15px;
  background: linear-gradient(var(--sun-hi), var(--sun) 55%, #ffa028);
  color: var(--ink);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: 0 5px 0 var(--rust), 0 5px 0 3px var(--ink);
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.btn-play:hover { color: var(--ink); transform: translateY(-1px); box-shadow: 0 6px 0 var(--rust), 0 6px 0 3px var(--ink); }
.btn-play:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--rust), 0 1px 0 3px var(--ink); }
.btn-small { padding: 7px 16px 6px; font-size: 16px; border-width: 2px; border-radius: 8px; box-shadow: 0 3px 0 var(--rust), 0 3px 0 2px var(--ink); }
.btn-small:hover { box-shadow: 0 4px 0 var(--rust), 0 4px 0 2px var(--ink); }
.btn-small:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--rust), 0 1px 0 2px var(--ink); }

/* ── hero ── */
.hero {
  background: radial-gradient(ellipse at 50% 22%, var(--night-2) 0%, var(--night) 68%);
  color: var(--cream);
  padding: 36px 0 0;
  overflow: hidden;
}
.hero-in { display: grid; gap: 28px; justify-items: center; text-align: center; }
.hero h1 { margin: 0; }
.pitch { font-size: 21px; line-height: 1.4; font-weight: 700; margin: 18px auto 8px; max-width: 30ch; color: #fff; }
.sub { margin: 0 auto 26px; max-width: 34ch; color: #cfcad8; }
.cta { margin: 0 0 22px; }
.facts { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; padding: 0; margin: 0; font-size: 15px; }
.facts li {
  padding: 4px 12px 4px 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  position: relative;
}
.facts li::before {
  /* a little pixel tick: leaf green */
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  background: var(--leaf-hi);
  box-shadow: 0 0 0 2px var(--leaf);
}
.hero-shot { margin: 0; width: min(300px, 82vw); }
.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 26px 26px 0 0;
  border: 6px solid #2e313b;
  border-bottom: 0;
  box-shadow: 0 -2px 0 1px rgba(255, 255, 255, 0.06), 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ── sections ── */
.section { padding: 56px 0; }
.section h2 { margin: 0 0 20px; }
.section h2 .px-h { margin: 0; }
.prose { max-width: 68ch; }
.prose p { margin: 0 0 14px; }
.kith, .faq { background: var(--paper-2); }

/* the four reaches */
.reaches { list-style: none; padding: 0; margin: 24px 0 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.reaches li {
  background: var(--card);
  border: 2px solid var(--line);
  border-top: 6px solid var(--season);
  border-radius: 8px;
  padding: 10px 12px;
  line-height: 1.3;
}
.reaches b { display: block; color: var(--ink); font-size: 16px; }
.reaches span { font-size: 14px; color: var(--muted); }
.r-spring { --season: #4cbf4a; }
.r-summer { --season: #f0583a; }
.r-autumn { --season: #e0a040; }
.r-winter { --season: #8fd8f0; }

/* screenshots, each in the console's dark glass */
.gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gallery figure { margin: 0; }
.gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  background: var(--glass);
  border: 5px solid var(--glass);
  border-radius: 8px;
}
.gallery figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.35; }

/* kith cards */
.kith-grid { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.kith-card {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 14px;
  align-items: start;
  align-content: start;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px 12px 10px;
}
.kith-art {
  width: 128px;
  height: 128px;
  border-radius: 8px;
  background:
    radial-gradient(ellipse 46% 9% at 50% 88%, rgba(42, 20, 56, 0.16) 0 99%, transparent 100%),
    color-mix(in srgb, var(--tint) 16%, var(--card));
}
.kith-art img { display: block; width: 128px; height: 128px; image-rendering: pixelated; }
.kith-text h3 { margin: 2px 0 4px; font-size: 19px; }
.first {
  display: inline-block;
  vertical-align: 2px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: var(--sun-hi);
  border: 1px solid #e2b73a;
  border-radius: 4px;
  padding: 0 5px;
  margin-left: 4px;
}
.kith-meta { margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; }
.type {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--c);
  color: var(--on);
  border-radius: 4px;
  padding: 1px 6px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}
.kind { color: var(--muted); font-style: italic; }
.blurb { margin: 0; font-size: 15px; line-height: 1.5; }

/* how to play */
.loop { list-style: none; counter-reset: step; padding: 0; margin: 0 0 32px; display: grid; gap: 14px; }
.loop li { counter-increment: step; position: relative; padding-left: 50px; max-width: 70ch; }
.loop li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--ink);
  background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 2px 2px 0 var(--rust);
}
.loop b { color: var(--ink); }
.tips { display: grid; gap: 12px; margin: 0 0 36px; }
.tip { background: var(--card); border: 2px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.tip h3 { margin: 0 0 6px; font-size: 18px; }
.tip p { margin: 0; font-size: 16px; }
.t { font-weight: 800; padding: 0 4px; border-radius: 3px; }
.t-bloom { background: #4cbf4a; color: #fff; }
.t-frost { background: #8fd8f0; color: var(--ink); }
.t-gale { background: #e0a040; color: var(--ink); }
.t-ember { background: #f0583a; color: #fff; }

.controls-h { font-size: 22px; margin: 0 0 8px; }
.controls-intro { max-width: 70ch; margin: 0 0 16px; }
.controls { display: grid; border: 2px solid var(--line); border-radius: 10px; background: var(--card); overflow: hidden; }
.c-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  grid-template-areas: "btn keys" "btn does";
  gap: 2px 12px;
  align-items: center;
  padding: 10px 14px 10px 10px;
  border-top: 1px solid var(--line);
}
.c-row > :nth-child(1) { grid-area: btn; justify-self: center; }
.c-row > :nth-child(2) { grid-area: keys; font-size: 14px; color: var(--muted); }
.c-row > :nth-child(3) { grid-area: does; }
.c-head { display: none; }
.fb {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25), 0 2px 0 rgba(0, 0, 0, 0.2);
}
.fb-a { background: var(--btn-a); }
.fb-b { background: var(--btn-b); }
.fb-x { background: var(--btn-x); }
.fb-y { background: var(--btn-y); }
.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--rubber);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25);
}
.pad { display: inline-block; position: relative; width: 40px; height: 40px; }
.pad::before, .pad::after, .pad i {
  content: "";
  position: absolute;
  background: #33353e;
  border-radius: 4px;
}
.pad::before { left: 13px; top: 0; width: 14px; height: 40px; }
.pad::after { left: 0; top: 13px; width: 40px; height: 14px; }
.pad i { left: 16px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: #1d1e23; z-index: 1; }
kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0 5px;
  margin: 1px 1px;
  font: 600 13px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  text-align: center;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  border-radius: 5px;
}
.cta-mid { margin: 36px 0 0; text-align: center; }

/* questions */
.qa { display: grid; gap: 10px; max-width: 760px; }
.qa details { background: var(--card); border: 2px solid var(--line); border-radius: 10px; padding: 0 16px; }
.qa summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--ink);
  padding: 13px 28px 13px 0;
  position: relative;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 800;
  color: var(--leaf);
}
.qa details[open] summary::after { content: "−"; }
.qa details p { margin: 0 0 14px; }

/* footer */
.footer { background: var(--night); color: #bdb7c8; padding: 32px 0 40px; font-size: 14px; }
.footer-in { display: grid; gap: 14px; justify-items: center; text-align: center; }
.footer p { margin: 0; }
.footer a:not(.btn-play) { color: var(--cream); }
.footer nav { display: flex; gap: 18px; }
.footer code { color: #e4dff0; }

/* privacy and 404 */
.bar { background: var(--night); padding: 12px 0; }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bar-home { display: block; }
.bar .logo { --s: 1; margin: 0; }
.doc h1 { margin: 0 0 18px; }
.doc h2 { font-size: 21px; margin: 32px 0 8px; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 8px; }
.lede { font-size: 19px; color: var(--ink); }
.updated { color: var(--muted); font-size: 14px; }
.lost { text-align: center; }
.lost .px-h { margin: 0 auto; }
.lost-kith { width: 192px; height: 192px; image-rendering: pixelated; display: block; margin: -40px auto -8px; }

/* ── wider screens ── */
@media (min-width: 560px) {
  .reaches { grid-template-columns: repeat(4, 1fr); }
  .kith-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 760px) {
  :root { --s: 4; }
  .section { padding: 72px 0; }
  .gallery { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .tips { grid-template-columns: 1fr 1fr; }
  .c-head { display: grid; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); border-top: 0; background: var(--paper-2); }
  .c-row { grid-template-columns: 90px 280px 1fr; grid-template-areas: "btn keys does"; gap: 16px; }
  .c-row > :nth-child(2) { font-size: 15px; }
  .c-head > :nth-child(1) { justify-self: center; }
}
@media (min-width: 960px) {
  .hero { padding-top: 56px; }
  .hero-in { grid-template-columns: 1.15fr 0.85fr; align-items: end; text-align: left; justify-items: start; gap: 48px; }
  .hero-text { align-self: center; padding-bottom: 56px; }
  .logo { --s: 3; margin: 0; }
  .pitch { font-size: 26px; margin-left: 0; max-width: 34ch; }
  .sub { margin-left: 0; font-size: 18px; }
  .facts { justify-content: flex-start; }
  .hero-shot { width: 340px; justify-self: center; }
  .kith-grid { grid-template-columns: repeat(5, 1fr); gap: 14px; }
  .kith-card { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
  .kith-art { width: 100%; display: grid; place-items: center; }
  .footer-in { grid-template-columns: auto 1fr auto; text-align: left; justify-items: start; align-items: center; }
  .footer-in > p { justify-self: end; }
}
