/* ------------------------------------------------------------------------------------------------
   The design every page of jigsawaddict.com shares. index.html carries only what its own sections
   need on top of this (the hero art, the gallery strip, the table, the tickets); every other page
   is this sheet alone.

   The paper-and-ink sheet, transcribed from the Unity client's JigsawTheme.uss (the sheet
   family and the paper finish). One accent, the brand coral, and it is spent on the control
   that commits: the Play button. Hyphenated names here mirror the USS tokens so a value can
   be checked against the game by name.
   ---------------------------------------------------------------------------------------- */
:root {
  --bg: #f1e6d2;
  --sheet: #f5e9d5;
  --sheet-raised: #ecdcc0;
  --sheet-edge: #d5bf9c;
  --ink: #16304f;
  --ink-80: rgba(22, 48, 79, 0.82);
  --ink-soft: #546475;
  --line: rgba(22, 48, 79, 0.16);
  --wash: rgba(22, 48, 79, 0.07);
  --stitch: #a9aaa7;
  --rule: #9c9f9f;
  --coral: #ee7a52;
  --coral-deep: #d8623b;
  --coral-light: #f3906f;
  --on-accent: #fff8ef;
  --contour: 1.5px;
  --radius-card: 14px;
  --radius-pill: 999px;
  --display: "Fredoka", "Baloo 2", system-ui, sans-serif;
  --text: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --drop: 4px 5px 0 var(--ink);
  --drop-sm: 2px 3px 0 var(--ink);
  --mark-face: #ee7a52;
  --mark-drop: #16304f;
  --pattern-alpha: 0.055;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1b2c;
    --sheet: #142338;
    --sheet-raised: #1c2f4a;
    --sheet-edge: #0c1524;
    --ink: #f5e9d5;
    --ink-80: rgba(245, 233, 213, 0.84);
    --ink-soft: #b6b2a9;
    --line: rgba(245, 233, 213, 0.16);
    --wash: #21324c;
    --stitch: #585e67;
    --rule: #6e7277;
    --coral-deep: #f08a66;
    --coral-light: #f6a98c;
    --drop: 4px 5px 0 #0c1524;
    --drop-sm: 2px 3px 0 #0c1524;
    --mark-face: #f5e9d5;
    --mark-drop: #ee7a52;
    --pattern-alpha: 0.05;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  font-family: var(--text);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-80);
  background-color: var(--bg);
  /* One jigsaw piece, the brand's outline, printed faintly across the whole sheet so the page
     still reads as paper on an ultrawide. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Cpath d='M 23.399 39.248 l 63.19742 0 c -8.31545 -43.24034 48.2296 -43.24034 39.91416 0 l 63.19742 0 l 0 63.19742 c 43.24034 -8.31545 43.24034 48.2296 0 39.91416 l 0 63.19742 l -63.19742 0 c 8.31545 -43.24034 -48.2296 -43.24034 -39.91416 0 l -63.19742 0 l 0 -63.19742 c 43.24034 8.31545 43.24034 -48.2296 0 -39.91416 l 0 -63.19742 Z' fill='none' stroke='%2316304f' stroke-opacity='0.11' stroke-width='3' transform='rotate(-10 106.554 122.403) scale(0.62) translate(70 70)'/%3E%3C/svg%3E");
  background-size: 168px 168px;
  background-attachment: fixed;
  overflow-x: hidden;
}
@media (prefers-color-scheme: dark) {
  body {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Cpath d='M 23.399 39.248 l 63.19742 0 c -8.31545 -43.24034 48.2296 -43.24034 39.91416 0 l 63.19742 0 l 0 63.19742 c 43.24034 -8.31545 43.24034 48.2296 0 39.91416 l 0 63.19742 l -63.19742 0 c 8.31545 -43.24034 -48.2296 -43.24034 -39.91416 0 l -63.19742 0 l 0 -63.19742 c 43.24034 8.31545 43.24034 -48.2296 0 -39.91416 l 0 -63.19742 Z' fill='none' stroke='%23f5e9d5' stroke-opacity='0.09' stroke-width='3' transform='rotate(-10 106.554 122.403) scale(0.62) translate(70 70)'/%3E%3C/svg%3E");
  }
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: var(--ink);
  text-decoration-color: var(--coral-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--coral-deep);
}
:focus-visible {
  outline: 3px solid var(--coral-deep);
  outline-offset: 3px;
  border-radius: 4px;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
}
h3 {
  font-size: 1.25rem;
}
p {
  margin: 0 0 1em;
}
.wrap {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The printed papers: a cream sheet, one ink contour, a dashed stitch just inside it. */
.sheet {
  position: relative;
  background: var(--sheet);
  border: var(--contour) solid var(--ink);
  border-radius: var(--radius-card);
}
.sheet::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px dashed var(--stitch);
  border-radius: calc(var(--radius-card) - 6px);
  pointer-events: none;
}
.sheet > * {
  position: relative;
}

/* Pills and buttons: ink outline on cream; the primary state is filled ink; the one that
   commits is coral. */
.pill,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  color: var(--ink);
  background: var(--sheet);
  border: var(--contour) solid var(--ink);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background-color 120ms ease;
}
.pill:hover,
.btn:hover {
  color: var(--ink);
  background: var(--sheet-raised);
}
.btn {
  padding: 15px 28px;
  font-size: 1.2rem;
  box-shadow: var(--drop);
}
.btn:hover {
  transform: translate(1px, 1px);
  box-shadow: 3px 4px 0 var(--ink);
}
.btn:active {
  transform: translate(4px, 5px);
  box-shadow: none;
}
.btn-commit {
  background: var(--coral);
  color: var(--ink);
}
.btn-commit:hover {
  background: var(--coral-light);
  color: var(--ink);
}
.btn-primary {
  background: var(--ink);
  color: var(--sheet);
}
.btn-primary:hover {
  background: var(--ink);
  color: var(--sheet);
}
@media (prefers-color-scheme: dark) {
  .btn {
    box-shadow: var(--drop);
  }
  .btn:hover {
    box-shadow: 3px 4px 0 #0c1524;
  }
}
.mark {
  flex: none;
  width: 1em;
  height: 1em;
}

/* ---- header ----------------------------------------------------------------------------- */
.top {
  padding: 18px 0 10px;
}
.top .wrap {
  display: flex;
  align-items: center;
  gap: 12px 18px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand .mark {
  width: 34px;
  height: 34px;
}
.top nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  order: 3;
  width: 100%;
}
.top nav a {
  font-family: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 6px 12px;
}
.top .play-top {
  padding: 10px 18px;
  font-size: 1rem;
  box-shadow: var(--drop-sm);
}
.top .play-top:hover {
  box-shadow: 1px 2px 0 var(--ink);
}
@media (min-width: 900px) {
  .top nav {
    order: 0;
    width: auto;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--coral-deep);
  margin: 0 0 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: var(--coral-deep);
}
h1 {
  font-size: clamp(2.6rem, 7.2vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  max-width: 11ch;
}
.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  margin: 22px 0 0;
  max-width: 34em;
}
.cta {
  display: flex;
  align-items: center;
  gap: 14px 18px;
  flex-wrap: wrap;
  margin: 28px 0 0;
}
.fine {
  margin: 18px 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.fine b {
  color: var(--ink);
  font-weight: 600;
}

/* ---- sections --------------------------------------------------------------------------- */
section {
  padding: 44px 0;
}
section + section .wrap {
  border-top: 1.5px dashed var(--rule);
  padding-top: 44px;
}
.section-head {
  max-width: 40em;
  margin-bottom: 26px;
}
.section-head p {
  margin: 10px 0 0;
}
.cards {
  display: grid;
  gap: 18px;
}
.card {
  padding: 22px 22px 18px;
}
.card h3 {
  margin-bottom: 8px;
}
.card p:last-child {
  margin-bottom: 0;
}
.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--sheet);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 12px;
}
@media (min-width: 640px) {
  .cards-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cards-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 960px) {
  .cards-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 640px) and (max-width: 959px) {
  .cards-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Lists on the sheet: a coral dot on an ink keyline per bullet, a filled ink disc per step. */
.table li,
.prose li,
.entry li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
}
.table li::before,
.prose ul > li::before,
.entry li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--coral);
  border: var(--contour) solid var(--ink);
}

.tag,
.entry .cat {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--coral-deep);
}

/* ---- footer ----------------------------------------------------------------------------- */
footer {
  margin-top: 24px;
  padding: 36px 0 56px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
footer .wrap {
  border-top: 1.5px dashed var(--rule);
  padding-top: 32px;
}
footer .brand {
  margin: 0 0 14px;
}
footer p {
  max-width: 60em;
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 18px 0 14px;
}
.links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.links a:hover {
  color: var(--coral-deep);
  text-decoration: underline;
}

/* ---- the inner pages ------------------------------------------------------------------------ */
/* Skip link: off the page until it takes focus, then a sheet pill at the top left. */
.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 18px;
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  background: var(--sheet);
  border: var(--contour) solid var(--ink);
  border-radius: var(--radius-pill);
  text-decoration: none;
}
.skip:focus-visible {
  top: 16px;
}

/* The page you are on reads as the filled-ink pill in the header nav. */
.top nav a[aria-current="page"],
.top nav a[aria-current="page"]:hover {
  background: var(--ink);
  color: var(--sheet);
}

/* An inner page's opening: the hero's copy column without the art. Its headlines are whole
   sentences, so a smaller size and a wider measure than the landing page's four words. */
.intro {
  padding: 36px 0 8px;
}
.intro h1 {
  font-size: clamp(2.1rem, 4.8vw, 3.3rem);
  max-width: 18ch;
}
.intro .updated {
  margin: 14px 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
@media (min-width: 760px) {
  .intro {
    padding: 56px 0 16px;
  }
}

/* Long-form text: support, the legal pages, and the explaining half of the topic pages. */
.prose {
  max-width: 44rem;
}
.prose h2 {
  font-size: 1.5rem;
  margin: 40px 0 10px;
}
.prose h2:first-child {
  margin-top: 0;
}
.prose h3 {
  font-size: 1.15rem;
  margin: 26px 0 6px;
}
.prose ul,
.prose ol {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.prose ol {
  counter-reset: step;
}
.prose ol > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--sheet);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1;
}
.prose li > ul {
  margin: 10px 0 0;
}
.prose strong,
.prose b {
  color: var(--ink);
  font-weight: 600;
}
.prose a {
  overflow-wrap: anywhere;
}
.prose code {
  font-size: 0.9em;
  padding: 1px 6px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* The blog: one sheet per entry, in the long-form measure. */
.feed {
  display: grid;
  gap: 18px;
  max-width: 44rem;
}
.entry .date {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.entry h2 {
  font-size: 1.4rem;
  margin: 0 0 4px;
}
.entry .cat {
  margin: 14px 0 6px;
}
.entry ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.entry li:last-child {
  margin-bottom: 0;
}
.feed + .fine {
  margin-top: 28px;
}
.entry .more {
  margin: 12px 0 0;
  font-weight: 600;
}

/* A blog post: its own page under /blog/, the long-form measure plus a row of screenshots. */
.back {
  margin: 0 0 18px;
  font-weight: 600;
  font-size: 0.95rem;
}
.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 44rem;
  margin: 30px 0 10px;
}
.shots figure {
  margin: 0;
}
.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: var(--contour) solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: var(--drop-sm);
}
.shots .fine {
  grid-column: 1 / -1;
  margin: 6px 0 0;
}
@media (min-width: 640px) {
  .shots {
    gap: 18px;
  }
}

/* 404: one small sheet in the middle of the page. */
.lost {
  padding: 48px 0;
}
.lost-card {
  max-width: 520px;
  margin: 0 auto;
  padding: 40px 28px 36px;
  text-align: center;
}
.lost-card .mark {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
}
.lost-card h1 {
  font-size: 2.1rem;
  max-width: none;
}
.lost-card p {
  margin: 12px 0 0;
}
.lost-card .cta {
  justify-content: center;
}
