/* imperial64.dev
   One stylesheet, no fonts or scripts from anywhere else. The palette and the 9-slice frames come
   from Pet Salon Tycoon (src/ui/pixel.css, the "earthy" tokens; docs/store/promo-src/sprites). */

:root {
  color-scheme: light dark;
  /* game tokens */
  --cream: #f1e9d6;
  --linen: #e2d5ba;
  --cocoa: #3b2e25;
  --cocoa-soft: #6b5646;
  --umber: #2f231e;
  --wood: #87624a;
  --butter: #e3c47e;
  --gold: #d8a24a;
  --berry: #b5554e;
  --leaf: #7f9665;
  --moss: #56633f; /* the promo frames' green, darkened so cream text passes 4.5:1 */

  /* roles (light) */
  --page: #eee5d0;
  --dots: rgba(47, 35, 30, 0.1);
  --ink: var(--cocoa);
  --ink-soft: var(--cocoa-soft);
  --panel: var(--cream);
  --rule: #cdbb9c;
  --link: #8e3a33;
  --link-hover: var(--umber);
  --focus: var(--gold);
  --todo-bg: var(--butter);
  --todo-ink: var(--umber);
  --th-bg: var(--linen);
  --frame-panel: url("img/frame-panel.png");
  --frame-soft: url("img/frame-secondary.png");

  --gutter: 16px;
  --measure: 68ch;
  font-family: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 100%;
  line-height: 1.55;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #221a15;
    --dots: rgba(241, 233, 214, 0.06);
    --ink: var(--cream);
    --ink-soft: #cdbb9c;
    --panel: #3b2e25;
    --rule: #5a4838;
    --link: #f0bfae;
    --link-hover: var(--cream);
    --focus: var(--butter);
    --th-bg: #4a3a2f;
    --frame-panel: url("img/frame-panel-dark.png");
    --frame-soft: url("img/frame-secondary-dark.png");
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background-color: var(--page);
  background-image: radial-gradient(var(--dots) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  overflow-wrap: break-word;
}

main {
  flex: 1 0 auto;
}

img {
  max-width: 100%;
  height: auto;
}

.px {
  image-rendering: pixelated;
}

a {
  color: var(--link);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--link-hover);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--panel);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 10;
}
.skip:focus {
  top: 8px;
}

/* ------------------------------------------------------------ pixel frames (9-slice) */
.frame {
  border: 16px solid var(--wood);
  border-image: var(--frame-panel) 8 fill / 16px stretch;
  image-rendering: pixelated;
  background: var(--panel);
  background-clip: padding-box;
}
.frame-soft {
  border: 8px solid var(--linen);
  border-image: var(--frame-soft) 8 fill / 8px stretch;
  image-rendering: pixelated;
}

/* ------------------------------------------------------------ header band */
.band {
  background-color: var(--moss);
  background-image: radial-gradient(rgba(241, 233, 214, 0.14) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  color: var(--cream);
  border-bottom: 4px solid var(--umber);
  position: relative;
}
.band a {
  color: var(--cream);
}
.band-hero {
  padding: 48px 0 0;
}
.wordmark {
  display: block;
  width: calc(61px * 4);
  height: calc(13px * 4);
  max-width: none;
}
.band h1 {
  margin: 0;
  line-height: 0;
}
.tagline {
  margin: 14px 0 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.pets {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  margin: 12px 0 -4px; /* the pets sit on the band's umber edge */
  padding: 0;
  list-style: none;
}
.pets img {
  display: block;
  width: 64px;
  height: 64px;
  max-width: none;
}
.band-slim {
  padding: 10px 0;
}
.band-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.home-mark {
  display: inline-block;
  line-height: 0;
  padding: 6px 0;
}
.wordmark-sm {
  width: calc(61px * 2);
  height: calc(13px * 2);
  max-width: none;
}
.pet-peek {
  width: 64px;
  height: 64px;
  max-width: none;
  margin: -10px 0 -14px;
}

@media (min-width: 720px) {
  .band-hero {
    padding-top: 72px;
  }
  .wordmark {
    width: calc(61px * 6);
    height: calc(13px * 6);
  }
  .tagline {
    font-size: 1.4rem;
  }
  .pets img {
    width: 96px;
    height: 96px;
  }
  .pets {
    margin-top: -40px;
  }
}

/* ------------------------------------------------------------ home: the game */
.game {
  margin: 40px 0 0;
  padding: 16px;
}
.game-grid {
  display: grid;
  gap: 24px;
}
.game-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.app-icon {
  width: 80px;
  height: 80px;
  flex: none;
  border-radius: 18px;
  border: 3px solid var(--umber);
  background: var(--cream);
}
.game h2 {
  margin: 0;
  line-height: 0;
}
.sign {
  display: inline-block;
  background: var(--wood);
  border: 3px solid var(--umber);
  box-shadow: inset 0 2px 0 #a37d5c, inset 0 -3px 0 #6b4a3a;
  padding: 9px 12px 11px;
}
.sign img {
  display: block;
  width: calc(102px * 2);
  height: calc(13px * 2);
  max-width: none;
}
.subtitle {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-weight: 600;
}
.game p.lede {
  margin: 20px 0 12px;
  max-width: var(--measure);
  font-size: 1.0625rem;
}
.game p {
  max-width: var(--measure);
}
.status {
  display: inline-block;
  margin: 8px 0 4px;
  padding: 6px 10px;
  color: var(--ink);
  font-weight: 700;
}
.game-links {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-weight: 600;
}
.shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  align-self: start;
}
.shots img {
  display: block;
  width: 100%;
  aspect-ratio: 540 / 960;
  border: 3px solid var(--umber);
  background: var(--moss);
}

@media (min-width: 760px) {
  .game {
    padding: 24px 28px;
  }
  .game-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 36px;
    align-items: start;
  }
  .app-icon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
  }
  .sign img {
    width: calc(102px * 3);
    height: calc(13px * 3);
  }
}

/* ------------------------------------------------------------ home: contact */
.hello {
  margin: 40px 0 48px;
  display: grid;
  gap: 8px 32px;
}
.hello h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
}
.hello dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 16px;
}
.hello dt {
  font-weight: 700;
  color: var(--ink-soft);
}
.hello dd {
  margin: 0;
  min-width: 0;
}

/* ------------------------------------------------------------ placeholders still to fill */
mark.todo {
  background: var(--todo-bg);
  color: var(--todo-ink);
  outline: 2px dashed var(--berry);
  outline-offset: 1px;
  padding: 0 3px;
  border-radius: 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
mark.todo mark.todo {
  background: #f4dc9f;
  outline-color: var(--umber);
}

/* ------------------------------------------------------------ footer */
.foot {
  border-top: 4px solid var(--umber);
  background: var(--moss);
  color: var(--cream);
  padding: 20px 0 24px;
  font-size: 0.9375rem;
}
.foot a {
  color: var(--cream);
}
.foot p {
  margin: 4px 0;
}
.foot .fine {
  opacity: 0.92;
}

/* ------------------------------------------------------------ privacy policy */
.policy {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 0 48px;
}
.crumb {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.policy h1 {
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  line-height: 1.2;
  margin: 0 0 8px;
}
.updated {
  color: var(--ink-soft);
  margin: 0 0 24px;
}
.policy h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 40px 0 10px;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--rule);
  scroll-margin-top: 16px;
}
.policy p,
.policy li {
  max-width: var(--measure);
}
.policy ul {
  padding-left: 1.3em;
}
.policy li {
  margin: 6px 0;
}
.policy li::marker {
  color: var(--wood);
}
.toc {
  padding: 8px 16px 12px;
  margin: 0 0 8px;
}
.policy .toc-title {
  margin: 4px 0 6px;
  padding: 0;
  border: 0;
  font-size: 1.05rem;
}
.toc ol {
  margin: 0;
  padding-left: 1.6em;
  columns: 1;
}
.toc li {
  margin: 3px 0;
  break-inside: avoid;
}
@media (min-width: 640px) {
  .toc ol {
    columns: 2;
    column-gap: 36px;
  }
}
code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  font-size: 0.84em;
  background: color-mix(in srgb, var(--ink) 9%, transparent);
  padding: 1px 4px;
  border-radius: 3px;
  overflow-wrap: anywhere;
}
.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 3px solid var(--umber);
  background: var(--panel);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 0.9375rem;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
}
th {
  background: var(--th-bg);
  color: var(--ink);
}
tr:last-child td {
  border-bottom: 0;
}
td code {
  overflow-wrap: normal; /* the page inserts <wbr> between the identifiers' words */
}

/* ------------------------------------------------------------ 404 */
.lost {
  padding: 48px 0 64px;
  text-align: center;
}
.lost .lost-pet {
  width: 128px;
  height: 128px;
  max-width: none;
}
.lost h1 {
  margin: 12px 0 0;
  line-height: 0;
}
.lost h1 img {
  width: calc(90px * 3);
  height: calc(13px * 3);
  max-width: 100%;
  display: inline-block;
}
.lost .plaque {
  display: inline-block;
  background: var(--moss);
  border: 3px solid var(--umber);
  padding: 12px 14px 14px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
