/* Someone Is Lying store
   A black table under one lamp, late at night, in the logo's three colours:
   black, off-white paper and evidence red. Evidence lands on the table as
   thermal receipts, case files, redacted statements and a gift tag.
   The page's one loud moment is the hero printer buzzing and feeding out a slip;
   everything else stays quiet so the paper does the talking. */

:root {
  /* The logo's colours */
  --black: #101010;
  --paper: #f5f5f3;
  --red: #c8102e;

  --felt: var(--black);         /* the table */
  --felt-deep: #0a0a0a;
  --lamp: #262626;
  --printer: #050505;
  --ink: var(--black);
  --fade: #6b6b68;              /* thermal print fading to grey */
  --accent: var(--red);         /* tabs, trail, tags, focus */
  --stamp: var(--red);          /* rubber stamps and red pencil */
  --wash: #e9e9e6;
  --danger: var(--red);
  --ok: #2f5d46;
  --on-felt: #dcdcd8;
  --on-felt-dim: #9d9d98;

  --display: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
  --type: 'Courier Prime', 'Courier New', ui-monospace, monospace;

  --receipt-w: 34rem;
  --table-w: 70rem;
  --gutter: clamp(1.25rem, 5vw, 2rem);
  --zig: 0.6rem;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #ecece9;   /* dim the paper a touch at night */
    --wash: #dfdfdb;
  }
}
:root[data-theme='dark'] {
  --paper: #ecece9;
  --wash: #dfdfdb;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70rem 42rem at 50% -8rem, var(--lamp), transparent 70%),
    var(--felt-deep);
  background-color: var(--felt);
  color: var(--on-felt);
  font: 400 1.0625rem/1.6 var(--type);
  overflow-x: hidden;
}

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--paper);
  color: var(--ink);
}
.skip:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- type ---------------------------------------------------------------- */

h1, h2 {
  font-family: var(--display);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
}
h1 { margin: 0 0 1.25rem; font-size: clamp(2.6rem, 12vw, 4.1rem); }
h2 { margin: 0 0 1rem; font-size: clamp(1.9rem, 7vw, 2.4rem); font-weight: 800; }
h3 { margin: 0 0 0.35rem; font-size: 1.0625rem; font-weight: 700; }

p { margin: 0 0 1rem; }
.lede { font-size: 1.125rem; }
.sign-off { font-weight: 700; }

/* ---- desk furniture ------------------------------------------------------ */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  width: min(var(--table-w), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 1.5rem;
}

.brand { display: block; line-height: 0; }
.brand img { display: block; width: auto; height: clamp(2.1rem, 6vw, 2.9rem); }

.masthead ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}
.masthead nav a { text-decoration: none; padding: 0.5rem 0; }
.masthead nav a:hover,
.masthead nav a[aria-current='page'] { text-decoration: underline; }

.printer {
  position: relative;
  width: min(calc(var(--receipt-w) + 2rem), calc(100% - 0.5rem));
  height: 1.75rem;
  margin: 0 auto;
  background: linear-gradient(var(--printer), #1c1c1c);
  border-radius: 0.9rem 0.9rem 0.25rem 0.25rem;
  box-shadow: 0 0.6rem 1.2rem rgb(0 0 0 / 0.35);
  z-index: 1;
}
.printer-slot {
  position: absolute;
  left: 0.6rem; right: 0.6rem; bottom: 0.35rem;
  height: 3px;
  border-radius: 2px;
  background: #000;
}
.printer.small { width: min(20rem, 100%); height: 1.4rem; }

.tablefoot {
  width: min(var(--table-w), calc(100% - 2rem));
  margin: 5rem auto 0;
  padding: 2.5rem 0 3rem;
  border-top: 2px dashed rgb(220 216 204 / 0.25);
  font-size: 0.9rem;
}
.foot-brand { margin: 0 0 1.25rem; line-height: 0; }
.foot-brand img { width: min(22rem, 100%); height: auto; }
.foot-line { color: var(--on-felt-dim); }
.tablefoot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 1.5rem 0 0.75rem;
  padding: 0;
  list-style: none;
}
.tablefoot .fine { margin: 0; color: var(--on-felt-dim); }

/* ---- paper --------------------------------------------------------------- */

/* Thermal paper with a torn bottom edge. Used by the single-column receipt
   pages and by every slip lying on the home page table. */
.receipt,
.paper {
  background: var(--paper);
  color: var(--ink);
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--zig)) no-repeat,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--zig)) var(--zig) repeat-x;
  mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--zig)) no-repeat,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--zig)) var(--zig) repeat-x;
}
.receipt a, .receipt p, .paper a, .paper p { overflow-wrap: anywhere; }

.receipt {
  display: block;
  width: min(var(--receipt-w), calc(100% - 1.5rem));
  margin: -0.4rem auto 0;
  padding: 2.25rem var(--gutter) calc(2.5rem + var(--zig));
}
@media (min-width: 40rem) {
  .receipt { padding-top: 2.75rem; }
}

.paper { padding: 1.75rem var(--gutter) calc(1.75rem + var(--zig)); }

.slip > :first-child, .paper > :first-child { margin-top: 0; }
.slip > :last-child, .paper > :last-child { margin-bottom: 0; }

.tear {
  height: 0;
  margin: 2.25rem calc(var(--gutter) * -1);
  border: 0;
  border-top: 2px dashed var(--fade);
  opacity: 0.55;
}

.receipt-head {
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--fade);
}

/* The case title prints at double height, the way receipt printers shout. */
.case-title {
  margin: 0 0 1.6rem;
  font-size: clamp(3.2rem, 17vw, 5.6rem);
  line-height: 0.86;
  transform: scaleY(1.08);
  transform-origin: top left;
}
h2.case-title { font-size: clamp(2.8rem, 14vw, 4.4rem); }

.case-no { margin: 0 0 0.5rem; color: var(--fade); }

.code {
  padding: 0.05em 0.35em;
  background: var(--wash);
  white-space: nowrap;
}

/* key ........ value */
.lines { margin: 0 0 1.5rem; }
.line {
  display: flex;
  align-items: baseline;
  gap: 0.5ch;
  padding: 0.15rem 0;
}
.line dt {
  display: flex;
  flex: 1 1 auto;
  align-items: baseline;
  min-width: 0;
}
.line dt::after {
  content: '';
  flex: 1 1 1.5rem;
  min-width: 1.5rem;
  margin: 0 0 0 1ch;
  border-bottom: 2px dotted var(--fade);
  transform: translateY(-0.3em);
  opacity: 0.6;
}
.line dd { margin: 0; max-width: 60%; text-align: right; }
.lines.total { padding-top: 0.6rem; border-top: 2px dashed rgb(107 107 104 / 0.55); font-weight: 700; font-size: 1.15rem; }

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 0 0 1.25rem 3ch;
  counter-increment: step;
}
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}
.steps p { margin: 0; }

.items { margin: 0 0 1rem; padding: 0; list-style: none; }
.items li { padding: 0.15rem 0 0.15rem 2ch; text-indent: -2ch; }
.items li::before { content: '1×'; display: inline-block; width: 2ch; text-indent: 0; margin-right: 0.5ch; color: var(--fade); }

.fine { font-size: 0.875rem; color: var(--fade); }
.fine a { color: var(--ink); }

/* A rubber stamp, slammed on at an angle. Only the 404 gets one. */
.stamp {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.15rem 0.7rem;
  border: 4px double var(--stamp);
  color: var(--stamp);
  font: 900 2rem/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transform: rotate(-7deg);
  opacity: 0.85;
}

/* ---- buying -------------------------------------------------------------- */

.hero-cta { margin: 1.75rem 0 0; }

.print-btn {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  width: 100%;
  min-height: 3.4rem;
  padding: 0.85rem 1.1rem;
  border: 0;
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font: 700 1.4rem/1.1 var(--display);
  text-transform: uppercase;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.print-btn:hover { background: #000; }
.print-btn:active { transform: translateY(1px); }
.print-btn.is-unavailable {
  margin: 0;
  background: transparent;
  color: var(--ink);
  outline: 2px dashed var(--ink);
  outline-offset: -2px;
  cursor: default;
}
.print-btn-price { font-family: var(--type); font-size: 1.05rem; font-weight: 700; text-transform: none; }

/* On the bare table a button is a slip of paper, sized to its words. */
.print-btn.cta {
  display: inline-flex;
  width: auto;
  background: var(--paper);
  color: var(--ink);
}
.print-btn.cta:hover { background: #fff; }

.buy { margin: 0 0 1rem; }
.buy .fine { margin: 0.6rem 0 0; }

.picks { margin: 0 0 0.9rem; padding: 0.6rem 0.8rem; border: 2px dashed var(--ink); border-radius: 2px; }
.picks legend { padding: 0 0.3rem; font-weight: 700; }
.picks label { display: flex; gap: 0.6rem; align-items: center; padding: 0.3rem 0; cursor: pointer; }
.picks input { width: 1.1rem; height: 1.1rem; }
form.inline { display: inline; }
button.link { padding: 0; border: 0; background: none; color: inherit; font: inherit; font-size: 0.85em; text-decoration: underline; cursor: pointer; }

.qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.9rem;
}
select,
input[type='email'] {
  min-height: 2.9rem;
  padding: 0.5rem 0.7rem;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
select { min-width: 5.5rem; }

.stores { display: grid; gap: 0.75rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }

/* ---- signup -------------------------------------------------------------- */

.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 0.75rem;
}
.signup input[type='email'] { flex: 1 1 14rem; min-width: 0; }
.signup button {
  flex: 0 0 auto;
  min-height: 2.9rem;
  padding: 0.5rem 1.1rem;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font: 700 1.15rem/1 var(--display);
  text-transform: uppercase;
  cursor: pointer;
}
.signup button:hover { background: #000; }
.hp { position: absolute; left: -9999px; }

.notice { padding: 0.6rem 0.8rem; border-left: 4px solid currentColor; background: var(--wash); }
.notice.is-ok { color: var(--ok); }
.notice.is-error { color: var(--danger); }

/* ---- help ---------------------------------------------------------------- */

.faq { border-bottom: 2px dotted rgb(107 107 104 / 0.5); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; }
.faq[open] summary::after { content: '−'; }
.faq ol { margin: 0 0 1rem; padding-left: 2.5ch; }
.faq > p { margin-bottom: 1rem; }
.faq > p + p { margin-top: -0.5rem; }

.legal h2 { margin-top: 2rem; font-size: 1.6rem; }

/* Facts the owner still has to fill in. Loud on purpose. */
.tbc {
  padding: 0 0.2em;
  background: rgb(212 174 104 / 0.45);
  outline: 1px dashed #8a6a2a;
}
.tbc-block {
  padding: 0.75rem 0.9rem;
  background: rgb(212 174 104 / 0.35);
  border: 1px dashed #8a6a2a;
}

/* ---- checkout ------------------------------------------------------------ */

.checkout #checkout-form { min-height: 20rem; }
.loading { color: var(--fade); }

/* ==== the home page: a table with evidence on it ========================== */

.table {
  display: block;
  width: min(var(--table-w), calc(100% - 2rem));
  margin: 0 auto;
}

.scene { padding: clamp(3.5rem, 10vw, 7rem) 0 0; }
.scene h2 { color: var(--paper); font-size: clamp(2.4rem, 8vw, 4.4rem); max-width: 18ch; }
.scene .paper h2 { color: var(--ink); font-size: clamp(2rem, 6vw, 3rem); }
.copy { max-width: 36rem; }

.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 52rem) {
  .split { grid-template-columns: 1.15fr 0.85fr; gap: 4rem; }
  .split.flip > .copy { order: 2; }
}

/* -- hero: the printer buzzes, then the slip feeds out -- */

.scene.hero { padding-top: 1rem; text-align: center; }
.hero-slip {
  width: min(32rem, calc(100% - 1.5rem));
  margin: -0.4rem auto 0;
  padding-top: 2.5rem;
  text-align: left;
}
.hero-logo { margin: 0 -0.5rem 1.75rem; line-height: 0; }
.hero-logo img { display: block; width: 100%; height: auto; }
.hero-slip .lede { font-size: 1.2rem; }
.hero-slip .sign-off { margin-bottom: 1.5rem; font-size: 1.2rem; }

@media (prefers-reduced-motion: no-preference) {
  .scene.hero .printer { animation: buzz 0.45s steps(2, jump-none) 0.2s 3; }
  .hero-slip { animation: feed 1.4s steps(18, end) 0.9s both; }
  @keyframes buzz {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(2px) rotate(0.3deg); }
  }
  @keyframes feed {
    from { clip-path: inset(0 0 100% 0); }
    to { clip-path: inset(0 0 0 0); }
  }
}

/* -- evidence list: a receipt where every line costs "?" -- */

.evidence-slip { width: min(24rem, 100%); justify-self: center; transform: rotate(1.5deg); }
.evidence-slip .line dd { font-weight: 700; }
.evidence-slip .sign-off { margin-top: 1rem; }

/* -- the buzz: a fresh clue under a small printer -- */

.buzz { text-align: center; }
.buzz h2 { margin-inline: auto; margin-bottom: 2rem; }
.clue-slip {
  width: min(18rem, calc(100% - 2rem));
  margin: -0.3rem auto 2rem;
  text-align: left;
}
.buzz > .lede { max-width: 30rem; margin-inline: auto; }

/* -- how it works: a dashed trail, one footstep per step -- */

.trail {
  position: relative;
  margin: 2.5rem 0 2.5rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 2rem;
}
.trail::before {
  content: '';
  position: absolute;
  left: 1.1rem; top: 0.5rem; bottom: 0.5rem;
  border-left: 2px dashed var(--accent);
  opacity: 0.6;
}
.trail li { position: relative; padding-left: 3.75rem; counter-increment: step; }
.trail li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -0.2rem;
  display: grid;
  place-items: center;
  width: 2.3rem; height: 2.3rem;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--accent);
  color: var(--paper);
  font: 900 1.25rem/1 var(--display);
}
.trail h3 { color: var(--paper); font: 800 1.6rem/1 var(--display); text-transform: uppercase; }
.trail p { margin: 0 0 0.4rem; color: var(--on-felt); }
.bzz { font: 900 1.6rem/1 var(--display); color: var(--accent); }
@media (min-width: 56rem) {
  .trail { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
  .trail::before { left: 1.1rem; right: 1.1rem; top: 1rem; bottom: auto; border-left: 0; border-top: 2px dashed var(--accent); }
  .trail li { padding: 3.5rem 0 0; }
  .trail li::before { top: 0; }
}
.dare { font: 800 clamp(1.6rem, 5vw, 2.2rem)/1.1 var(--display); text-transform: uppercase; color: var(--paper); }
.questions { color: var(--paper); font-weight: 700; }

/* -- the cases: case files with a red tab -- */

.folders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 2.5rem 1.5rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}
.folder {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 12rem;
  padding: 1.4rem 1.25rem 1.25rem;
  background: var(--paper);
  color: var(--ink);
  border-top: 4px solid var(--accent);
  border-radius: 0 3px 3px 3px;
  text-decoration: none;
  box-shadow: 0 0.5rem 1.25rem rgb(0 0 0 / 0.3);
}
.folder:hover { background: #fff; }
.folder-tab {
  position: absolute;
  left: 0; bottom: 100%;
  padding: 0.3rem 0.9rem 0.15rem;
  background: var(--accent);
  color: var(--paper);
  border-radius: 6px 6px 0 0;
  font-size: 0.8rem;
  font-weight: 700;
}
.folder-title { font: 900 clamp(1.9rem, 5vw, 2.4rem)/0.9 var(--display); text-transform: uppercase; }
.folder-line { font-size: 0.95rem; }
.folder-meta { margin-top: auto; font-size: 0.85rem; color: var(--fade); }
.folder-price { font-weight: 700; }

/* -- the kit: its own receipt, totalled -- */

.kit-slip { width: min(26rem, 100%); justify-self: center; transform: rotate(-1deg); }

/* -- the table after a game: scraps of evidence, redacted -- */

.scatter { position: relative; min-height: 22rem; }
.scrap { position: absolute; width: 62%; padding: 1.1rem 1.1rem calc(1.2rem + var(--zig)); }
.scrap .receipt-head { margin-bottom: 0.9rem; font-size: 0.75rem; }
.s1 { left: 0; top: 0; transform: rotate(-6deg); }
.s2 { right: 0; top: 4.5rem; transform: rotate(4deg); }
.s3 { left: 12%; bottom: 0; width: 52%; transform: rotate(-2deg); }
.redact { display: block; height: 0.8rem; margin: 0 0 0.55rem; background: var(--ink); }
.circled { position: relative; margin-top: 0.9rem; }
.circled::after {
  content: '';
  position: absolute;
  inset: -0.6rem -0.9rem;
  border: 2px solid var(--stamp);
  border-radius: 50%;
  transform: rotate(-4deg);
}
.cipher { margin: 0; font-size: 1.3rem; letter-spacing: 0.15em; text-align: center; }

/* -- a night in: the biggest headline on the page -- */

.night { text-align: center; }
.night h2 { max-width: 14ch; margin-inline: auto; font-size: clamp(2.8rem, 10vw, 5.6rem); }
.night > p { max-width: 34rem; margin-inline: auto; }
.checklist { margin-top: 1.5rem; color: var(--paper); font-weight: 700; font-size: 1.15rem; }

.about { max-width: 40rem; }

/* -- FAQ: case notes on one sheet -- */

.notes { max-width: 44rem; }

/* -- gift: a red tag with a punched hole -- */

.tag {
  position: relative;
  max-width: 40rem;
  padding: 2.25rem var(--gutter) 2rem calc(var(--gutter) + 2.5rem);
  background:
    radial-gradient(circle at 1.6rem 50%, var(--felt-deep) 0 0.55rem, transparent 0.6rem),
    var(--accent);
  color: var(--paper);
  clip-path: polygon(1.75rem 0, 100% 0, 100% 100%, 1.75rem 100%, 0 calc(100% - 1.75rem), 0 1.75rem);
  transform: rotate(-1.5deg);
}
.scene .tag h2 { color: var(--paper); font-size: clamp(2.2rem, 7vw, 3.4rem); }
.tag .print-btn.cta { background: var(--paper); color: var(--ink); }
.tag .print-btn.cta:hover { background: #fff; }

/* -- signup slip next to the app download -- */

.signup-slip { width: min(28rem, 100%); justify-self: center; }
