/* Tired Monkey site: plain CSS, no build step, no external requests.
   Always light: the cream of the logo, whatever the device's colour mode. */

:root {
  --bg: #fefdf9;            /* the logo's own background, so it sits on the page seamlessly */
  --bg-soft: #f7f1e7;
  --surface: #ffffff;
  --text: #2a1712;
  --muted: #6b5a52;
  --line: #ebe1d4;
  --brand: #3b1f18;         /* the logo's lettering */
  --accent: #b4440e;
  --button: #3b1f18;
  --button-text: #fefdf9;
  --chip: #fff1dc;
  --chip-text: #8a3a0c;
  --shadow: 0 1px 2px rgb(59 31 24 / 0.06), 0 8px 24px rgb(59 31 24 / 0.07);
  --shadow-lift: 0 2px 4px rgb(59 31 24 / 0.08), 0 16px 36px rgb(59 31 24 / 0.12);
  --ph-bg: #fff3bf;
  --ph-text: #5c3c00;
  --ph-line: #f0c94a;
  --radius: 18px;
  --max: 68rem;
  --prose: 44rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Arial Rounded MT Bold", system-ui, sans-serif;
  color-scheme: light;
}


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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

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

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .wrap {
    padding: 0 28px;
  }
}

.prose {
  max-width: var(--prose);
}

/* Support and privacy are reading pages: one narrower column, header and footer included. */
.doc .wrap {
  max-width: calc(var(--prose) + 56px);
}

/* Header */

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--line);
}

.site-header nav {
  display: flex;
  gap: 4px;
  font-size: 0.95rem;
  font-weight: 600;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
}

.site-header nav a:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.site-header nav a[aria-current="page"] {
  color: var(--text);
  background: var(--chip);
}

main {
  padding: 8px 0 64px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 28px 0 40px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
}

.site-footer .brand {
  font-size: 1rem;
  margin-right: auto;
}

.site-footer .brand img {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.site-footer a:not(.brand) {
  color: var(--muted);
}

@media (max-width: 639px) {
  .site-footer .brand {
    flex-basis: 100%;
  }

  .site-footer span {
    order: 1;
    flex-basis: 100%;
  }
}

.site-footer a:not(.brand):hover {
  color: var(--text);
}

/* Text */

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--brand);
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem);
  font-weight: 800;
  line-height: 1.08;
  margin: 0 0 14px;
}

h2 {
  font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.7rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 44px 0 10px;
}

h3 {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 28px 0 6px;
}

p,
ul,
ol {
  margin: 0 0 12px;
}

ul,
ol {
  padding-left: 1.3rem;
}

li {
  margin-bottom: 4px;
}

.lede {
  color: var(--muted);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  margin-bottom: 24px;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.eyebrow {
  display: inline-block;
  background: var(--chip);
  color: var(--chip-text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}

/* Placeholders the owner must fill in before publishing. Remove the class once filled. */

.ph {
  background: var(--ph-bg);
  color: var(--ph-text);
  border-bottom: 1px dashed var(--ph-line);
  padding: 0 3px;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.decision {
  background: var(--ph-bg);
  color: var(--ph-text);
  border-left: 4px solid var(--ph-line);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 12px 0 16px;
  font-size: 0.92rem;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--button);
  color: var(--button-text);
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 12px 22px;
  border: 2px solid var(--button);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.button.secondary {
  background: transparent;
  color: var(--brand);
  border-color: var(--line);
}

.button.secondary:hover {
  border-color: var(--brand);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Home: hero */

.hero {
  display: grid;
  gap: 8px 48px;
  align-items: center;
  padding: 8px 0 24px;
}

.hero-art {
  margin: 0 auto;
  max-width: 30rem;
  width: 100%;
}

.hero-art img {
  width: 100%;
  border-radius: 28px;
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.05fr 1fr;
    padding: 32px 0 40px;
  }

  .hero-art {
    order: 2;
  }
}


/* Home: the promises under the hero */

.promises {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.promises li {
  margin: 0;
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.promises strong {
  display: block;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 2px;
}

/* Home: games */

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin: 56px 0 18px;
}

.section-head h2 {
  margin: 0;
}

.section-head p {
  color: var(--muted);
  margin: 0;
}

.games {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .games {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Pocket Pantheon plays in landscape, so its card is landscape too. */
  .game.wide {
    grid-column: span 2;
    grid-template-areas:
      "icon title"
      "icon desc"
      "icon badge";
    grid-template-rows: auto auto auto;
    align-content: center;
    gap: 8px 24px;
    background:
      radial-gradient(120% 140% at 0% 100%, rgb(240 138 75 / 0.14), transparent 55%),
      var(--surface);
  }

  .game.wide .icon {
    width: 104px;
    height: 104px;
  }
}

@media (min-width: 980px) {
  .games {
    grid-template-columns: repeat(3, 1fr);
  }
}

.game {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon title"
    "desc desc"
    "badge badge";
  grid-template-rows: auto 1fr auto;
  align-items: center;
  gap: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.icon {
  grid-area: icon;
  width: 72px;
  height: 72px;
  border-radius: 22.5%;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.06), 0 4px 12px rgb(11 16 38 / 0.18);
}

.game .title {
  grid-area: title;
}

.game h3 {
  margin: 0;
  font-size: 1.25rem;
}

.genre {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0;
}

.game p.desc {
  grid-area: desc;
  align-self: start;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.55;
  margin: 0;
}

.game .badge {
  grid-area: badge;
  justify-self: start;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 3px 11px;
  background: var(--bg-soft);
  color: var(--muted);
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

.badge.soon-first {
  background: var(--chip);
  color: var(--chip-text);
}

/* The game launching first gets the full row. */

@media (min-width: 640px) {
  .game.featured {
    grid-column: 1 / -1;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "icon title"
      "icon desc"
      "icon badge";
    grid-template-rows: auto auto auto;
    align-content: center;
    gap: 8px 28px;
    padding: 28px;
    background:
      radial-gradient(120% 140% at 0% 0%, rgb(61 178 255 / 0.12), transparent 55%),
      var(--surface);
  }

  .game.featured .icon {
    width: 132px;
    height: 132px;
    align-self: center;
  }

  .game.featured h3 {
    font-size: 1.6rem;
  }

  .game.featured p.desc {
    max-width: 38rem;
    font-size: 1.02rem;
  }
}

/* Cards, help and FAQ */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin: 16px 0;
}

.card > :first-child {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.help {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.help .card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.help .card h3 {
  margin: 0;
}

.help .card p {
  color: var(--muted);
  margin: 0;
  flex: 1;
}

.help .card .actions {
  margin-top: 6px;
}

/* Inner pages: title band */

.page-head {
  padding: 24px 0 8px;
}

@media (min-width: 640px) {
  .page-head {
    padding: 40px 0 12px;
  }
}

.page-head .lede {
  margin-bottom: 8px;
}

.contact-card {
  display: grid;
  gap: 4px 22px;
  margin-top: 24px;
}

@media (min-width: 640px) {
  .contact-card {
    grid-template-columns: auto 1fr;
  }

  .contact-card > img {
    grid-row: 1 / span 6;
  }

  .contact-card > :not(img) {
    grid-column: 2;
  }
}

.contact-card > img {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--line);
}

@media (max-width: 639px) {
  .contact-card > img {
    display: none;
  }
}

.contact-card h2 {
  margin: 0 0 4px;
}

.faq-group {
  margin-top: 32px;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 20px;
  margin: 10px 0;
  transition: box-shadow 0.15s ease;
}

details[open] {
  box-shadow: var(--shadow);
}

summary {
  cursor: pointer;
  font-weight: 650;
  padding: 16px 28px 16px 0;
  list-style: none;
  position: relative;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s ease;
}

details[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

details[open] summary {
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

details > :last-child {
  margin-bottom: 18px;
}

details:target {
  border-color: var(--accent);
}

/* Privacy policy */

.policy h2 {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.toc {
  font-size: 0.95rem;
  background: var(--bg-soft);
  border: 0;
  box-shadow: none;
}

.toc ol {
  margin: 0;
  columns: 2 15rem;
  column-gap: 28px;
}

.toc li {
  break-inside: avoid;
}

.table-scroll {
  overflow-x: auto;
  margin: 12px 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

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

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

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--bg-soft);
  font-weight: 700;
}
