/* It Ate My Dollar: game site. Palette and fonts follow the game's ART_BIBLE (toy satire: flat colours,
   thick Ink outline, hard shadow, no gradients). No scripts, no external requests. */

@font-face {
  font-family: "Rubik";
  font-weight: 900;
  font-display: swap;
  src: url("fonts/Rubik-Black.ttf") format("truetype");
}

@font-face {
  font-family: "Manrope";
  font-weight: 600;
  font-display: swap;
  src: url("fonts/Manrope-SemiBold.ttf") format("truetype");
}

@font-face {
  font-family: "Manrope";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/Manrope-Bold.ttf") format("truetype");
}

/* Light: the office hallway (mint wall, paper, red machine). */
:root {
  color-scheme: light;
  --bg: #9cc5c0;          /* EnvWall */
  --bg-band: #7ba8a6;     /* EnvWallDark */
  --surface: #fffdf5;     /* EnvPaper */
  --surface-alt: #fff0d4; /* MachineCream */
  --ink: #1c1930;         /* Ink: outline and hard shadow */
  --text: #1c1930;
  --text-muted: #4e5873;  /* EnvBaseboard */
  --on-bg: #1c1930;
  --link: #b8343a;        /* MachineBodyDark */
  --red: #e5483d;         /* MachineBody */
  --yellow: #ffc83d;      /* MachineYellow */
  --teal: #2ec4b6;        /* MachineTeal */
  --outline: 4px;
  --shadow: 7px;
  --radius: 22px;
}

/* Dark: the arcade at night (ArcadeFloorA, ArcadeWall, cream text). */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #2a2150;
    --bg-band: #1c1930;
    --surface: #3b2a6e;
    --surface-alt: #2c2c48;
    --text: #fff0d4;
    --text-muted: #c9cedc;
    --on-bg: #fff0d4;
    --link: #ffc83d;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--on-bg);
  font: 600 1.0625rem/1.6 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

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

a {
  color: var(--link);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.doc a[href^="mailto:"] {
  overflow-wrap: anywhere;
}

a:hover {
  text-decoration-thickness: 3px;
}

a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: "Rubik", "Manrope", system-ui, sans-serif;
  font-weight: 900;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
}

h3 {
  font-size: 1.2rem;
  margin-top: 1.6em;
}

p,
ul,
ol {
  margin: 0 0 1em;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--yellow);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 12px;
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header ---------- */

.site-header {
  padding: 18px 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--on-bg);
  text-decoration: none;
  font-family: "Rubik", sans-serif;
  font-weight: 900;
  font-size: 1.2rem;
  line-height: 1.1;
}

.brand img {
  width: 44px;
  height: 44px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--ink);
}

.site-nav {
  display: flex;
  gap: 6px 18px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--on-bg);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 3px;
}

/* ---------- Cards and buttons (toy UI: outline + hard shadow) ---------- */

.card {
  background: var(--surface);
  color: var(--text);
  border: var(--outline) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 var(--shadow) 0 var(--ink);
  padding: clamp(20px, 3vw, 36px);
}

.card .muted {
  color: var(--text-muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.chip {
  display: inline-block;
  padding: 6px 14px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}

.chip--yellow {
  background: var(--yellow);
  color: var(--ink);
}

.chip--teal {
  background: var(--teal);
  color: var(--ink);
}

/* ---------- Hero ---------- */

.hero {
  padding: 8px 0 28px;
}

.hero-art {
  overflow: hidden;
  padding: 0;
  background: var(--ink);
}

.hero-art img {
  width: 100%;
  aspect-ratio: 1024 / 500;
}

.hero-intro {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px 28px;
  align-items: center;
  margin-top: 32px;
}

.hero-icon {
  width: clamp(96px, 18vw, 148px);
  border: var(--outline) solid var(--ink);
  border-radius: 28px;
  box-shadow: 0 var(--shadow) 0 var(--ink);
}

.title {
  font-size: clamp(2rem, 1.5rem + 2.6vw, 3.2rem);
  margin: 0 0 10px;
}

.tagline {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  font-weight: 700;
  margin-bottom: 16px;
}

/* ---------- Sections ---------- */

.section {
  padding: 28px 0;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.lede {
  font-family: "Rubik", sans-serif;
  font-weight: 900;
  font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.7rem);
  line-height: 1.25;
}

.features {
  padding-left: 0;
  list-style: none;
}

.features li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 0.7em;
}

.features li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 14px;
  height: 14px;
  background: var(--red);
  border: 3px solid var(--ink);
  border-radius: 4px;
  transform: rotate(45deg);
}

.facts {
  background: var(--surface-alt);
}

.facts dl {
  margin: 0;
}

.facts dt {
  font-family: "Rubik", sans-serif;
  font-weight: 900;
  font-size: 1.05rem;
}

.facts dd {
  margin: 0 0 14px;
}

.facts dd:last-child {
  margin-bottom: 0;
}

/* ---------- Screenshots ---------- */

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(200px, 26vw, 250px);
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 4px 22px;
  margin: 0 -4px;
  list-style: none;
  scrollbar-color: var(--ink) transparent;
}

.shots li {
  scroll-snap-align: start;
}

.shots figure {
  margin: 0;
}

.shots a {
  display: block;
  border: var(--outline) solid var(--ink);
  border-radius: 20px;
  box-shadow: 0 var(--shadow) 0 var(--ink);
  overflow: hidden;
  background: var(--ink);
}

.shots img {
  width: 100%;
  aspect-ratio: 9 / 16;
}

.shots figcaption {
  margin-top: 14px;
  font-weight: 700;
  text-align: center;
  color: var(--on-bg);
}

.hint {
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Policy page ---------- */

.doc {
  max-width: 820px;
  margin: 0 auto;
}

.doc h1 {
  font-size: clamp(2rem, 1.5rem + 2.4vw, 3rem);
}

.doc h2 {
  font-size: clamp(1.3rem, 1.15rem + 0.8vw, 1.7rem);
  margin-top: 1.8em;
  scroll-margin-top: 16px;
}

.doc ul,
.doc ol {
  padding-left: 1.3em;
}

.doc li {
  margin-bottom: 0.45em;
}

.doc .meta {
  font-weight: 700;
}

.summary {
  background: var(--surface-alt);
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 18px 22px 6px;
  margin: 24px 0;
}

.summary h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.toc {
  columns: 2 220px;
  column-gap: 32px;
  padding-left: 1.4em;
}

.toc li {
  break-inside: avoid;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1em;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border: 2px solid var(--ink);
}

thead th {
  background: var(--surface-alt);
}

th {
  font-weight: 700;
}

/* Narrow screens: each table row becomes a small card. */
@media (max-width: 600px) {
  table,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  tr {
    border: 2px solid var(--ink);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
  }

  table th,
  table td {
    border: 0;
    padding: 2px 0;
  }

  tbody th {
    font-family: "Rubik", sans-serif;
    font-weight: 900;
    margin-bottom: 4px;
  }

  td::before {
    content: attr(data-label) ": ";
    font-weight: 700;
  }
}

code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.92em;
  background: var(--surface-alt);
  padding: 1px 6px;
  border-radius: 6px;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 36px;
  padding: 28px 0 36px;
  background: var(--bg-band);
  border-top: var(--outline) solid var(--ink);
  color: var(--on-bg);
}

@media (prefers-color-scheme: dark) {
  .site-footer {
    color: var(--text);
  }
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
  align-items: center;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: inherit;
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}

/* ---------- Small screens ---------- */

@media (max-width: 720px) {
  :root {
    --outline: 3px;
    --shadow: 5px;
    --radius: 18px;
  }

  body {
    font-size: 1rem;
  }

  .hero-intro {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .about {
    grid-template-columns: 1fr;
  }

  .summary {
    padding: 14px 16px 4px;
  }

  th,
  td {
    padding: 8px;
  }
}

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