:root {
  --wall: #1b252d;
  --wall-2: #24323c;
  --lamp: #f2b84b;
  --paper: #efe3c8;
  --ink: #15111a;
  --pin: #c8453a;
  --mirror: #7fa3b5;
  --cork: #b88a5a;
  --sticky: #fff3a8;
  --lx: 50%;
  --ly: 46%;
  --r: 120px;
  --swing: 0deg;
}

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

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

body {
  margin: 0;
  background: var(--wall);
  color: var(--paper);
  font-family: Rubik, system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
}

a {
  color: var(--lamp);
}

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

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

/* ---------- The room (hero) ---------- */

.room {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  overflow: hidden;
  background: radial-gradient(120% 80% at 50% 30%, var(--wall-2), var(--wall) 70%);
}

.bar {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: max(14px, env(safe-area-inset-top)) 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
}

.brand img {
  border-radius: 7px;
  border: 2px solid var(--ink);
}

.bar-play {
  color: var(--ink);
  background: var(--lamp);
  text-decoration: none;
  font-weight: 900;
  padding: 8px 18px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--ink);
}

.scene {
  position: relative;
  min-height: 56svh;
  overflow: hidden;
  touch-action: pan-y;
}

.lamp {
  position: absolute;
  left: 50%;
  top: -6px;
  width: clamp(120px, 13vw, 190px);
  height: auto;
  translate: -50% 0;
  z-index: 2;
}

.lamp-head {
  transform-origin: 100px 96px;
  rotate: var(--swing);
  transition: rotate 0.25s ease-out;
}

.suspect {
  position: absolute;
  left: 50%;
  bottom: 14%;
  width: clamp(220px, 58vw, 400px);
  height: auto;
  translate: -50% 0;
  z-index: 1;
}

.pupil {
  transition: cx 0.12s linear, cy 0.12s linear;
}

.brows line {
  transition: transform 0.3s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.room.nervous .brow-l {
  transform: rotate(-12deg) translateY(-8px);
}

.room.nervous .brow-r {
  transform: rotate(12deg) translateY(-8px);
}

.sweat .drop {
  opacity: 0;
}

.room.nervous .sweat .drop {
  animation: drip 1.6s ease-in infinite;
}

.room.nervous .sweat .d2 {
  animation-delay: 0.7s;
}

@keyframes drip {
  0% { opacity: 0; transform: translateY(-6px); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translateY(34px); }
}

.table {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 18%;
  background: linear-gradient(#7d9284, #4a5b52);
  border-top: 6px solid var(--ink);
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
  z-index: 1;
}

/* Darkness over the whole room except where the lamp is pointed.
   Text sits above it so the pitch stays readable. */
.dark {
  position: absolute;
  inset: 0;
  --r: clamp(110px, 14vw, 170px);
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--lx) var(--ly),
    rgba(255, 214, 140, 0.12) 0,
    rgba(8, 11, 14, 0) var(--r),
    rgba(8, 11, 14, 0.93) calc(var(--r) * 2.7)
  );
  transition: opacity 0.08s linear;
}

.room.off .dark {
  background: rgba(8, 11, 14, 0.97);
}

.subtitle {
  position: relative;
  z-index: 4;
  justify-self: center;
  margin: -64px 16px 0;
  max-width: 34rem;
  padding: 10px 16px;
  background: rgba(15, 20, 24, 0.9);
  border: 2px solid var(--ink);
  border-radius: 14px;
  font-size: 17px;
  line-height: 1.4;
  text-align: center;
}

.subtitle .who {
  display: block;
  color: var(--mirror);
  font-size: 13px;
  font-style: italic;
}

.pitch {
  position: relative;
  z-index: 4;
  padding: 28px 20px max(32px, env(safe-area-inset-bottom));
  max-width: 44rem;
  justify-self: center;
  text-align: center;
}

.headline {
  margin: 0;
  font-weight: 900;
  font-size: clamp(56px, 15vw, 128px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--paper);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0.06em 0.06em 0 var(--ink);
}

.lede {
  margin: 18px auto 0;
  max-width: 32rem;
  font-size: clamp(17px, 2.6vw, 20px);
  color: #d9d0bd;
}

.ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  font-weight: 900;
  font-size: 17px;
  text-decoration: none;
  box-shadow: 0 6px 0 var(--ink);
  transition: translate 0.08s ease, box-shadow 0.08s ease;
}

.btn:active {
  translate: 0 4px;
  box-shadow: 0 2px 0 var(--ink);
}

.btn-primary {
  background: var(--lamp);
  color: var(--ink);
}

.btn-quiet {
  background: var(--wall-2);
  color: var(--paper);
}

.hint {
  margin: 18px 0 0;
  font-family: Caveat, cursive;
  font-size: 24px;
  color: var(--lamp);
  rotate: -2deg;
}

@media (min-width: 900px) {
  .room {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr auto;
  }
  .bar {
    grid-column: 1 / -1;
  }
  .scene {
    grid-column: 2;
    grid-row: 2 / 4;
    min-height: auto;
  }
  .subtitle {
    grid-column: 2;
    grid-row: 3;
    align-self: end;
    margin: 0 24px 40px;
  }
  .pitch {
    grid-column: 1;
    grid-row: 2 / 4;
    align-self: center;
    text-align: left;
    padding-left: max(48px, 6vw);
  }
  .lede {
    margin-left: 0;
  }
  .ctas {
    justify-content: flex-start;
  }
}

/* ---------- Case board ---------- */

main {
  display: grid;
  gap: 72px;
  padding: 72px 16px 96px;
}

.board {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 36px 20px 28px;
  background-color: var(--cork);
  background-image: radial-gradient(rgba(90, 56, 36, 0.35) 1px, transparent 1.5px),
    radial-gradient(rgba(255, 235, 200, 0.18) 1px, transparent 1.5px);
  background-size: 9px 9px, 13px 13px;
  background-position: 0 0, 4px 6px;
  border: 10px solid #5a3824;
  border-radius: 6px;
  box-shadow: inset 0 0 0 3px var(--ink), 0 10px 0 var(--ink);
  display: grid;
  gap: 26px;
  grid-template-columns: 1fr;
}

.card {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 0 6px 0 rgba(21, 17, 26, 0.55);
}

.pin {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 18px;
  height: 18px;
  translate: -50% 0;
  background: var(--pin);
  border: 3px solid var(--ink);
  border-radius: 50%;
  z-index: 1;
}

.case-file {
  padding: 22px 22px 18px;
  rotate: -1deg;
}

.doc-kicker {
  margin: 0;
  font-family: 'Special Elite', monospace;
  font-size: 15px;
  color: #6b2a24;
}

.case-file h2 {
  margin: 4px 0 10px;
  font-weight: 900;
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1;
}

.doc {
  margin: 0;
  font-family: 'Special Elite', monospace;
  font-size: 16px;
  line-height: 1.6;
  max-width: 60ch;
}

.victim {
  justify-self: start;
  margin: 0;
  padding: 10px 10px 12px;
  width: 210px;
  rotate: 2deg;
  background: #fff;
}

.victim figcaption {
  display: grid;
  margin-top: 8px;
  font-size: 15px;
}

.victim figcaption span {
  font-size: 14px;
  color: #4a443a;
}

.mug {
  display: block;
  aspect-ratio: 1;
  width: 100%;
  background: #8e9aa0;
  border: 2px solid var(--ink);
}

.mug svg {
  display: block;
  width: 100%;
  height: 100%;
}

.poi {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 16px;
}

.person {
  font: inherit;
  text-align: left;
  padding: 10px 10px 12px;
  background: #fff;
  cursor: pointer;
  min-height: 210px;
  perspective: 800px;
}

.person:nth-child(odd) {
  rotate: -1.5deg;
}

.person:nth-child(even) {
  rotate: 1.5deg;
}

.person .front,
.person .back {
  display: grid;
  gap: 8px;
  backface-visibility: hidden;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.person .front strong {
  font-size: 15px;
}

.person .back {
  position: absolute;
  inset: 10px;
  transform: rotateY(180deg);
  font-family: 'Special Elite', monospace;
  font-size: 14px;
  line-height: 1.5;
  align-content: start;
}

.person .back strong {
  font-family: Rubik, sans-serif;
  font-size: 15px;
}

.person[aria-pressed='true'] .front {
  transform: rotateY(180deg);
}

.person[aria-pressed='true'] .back {
  transform: rotateY(0deg);
}

.board-note {
  margin: 0;
  font-family: Caveat, cursive;
  font-size: 22px;
  color: var(--ink);
  text-align: center;
}

@media (min-width: 760px) {
  .board {
    grid-template-columns: 1.4fr 1fr;
    padding: 44px 36px 32px;
  }
  .case-file {
    grid-column: 1;
  }
  .victim {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    align-self: center;
  }
  .poi {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .board-note {
    grid-column: 1 / -1;
  }
}

/* ---------- Partner's note ---------- */

.partner {
  display: grid;
  gap: 32px;
  max-width: 980px;
  margin: 0 auto;
  align-items: start;
}

.sticky {
  justify-self: center;
  max-width: 440px;
  padding: 26px 26px 20px;
  background: var(--sticky);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 0 8px 0 rgba(21, 17, 26, 0.6);
  rotate: -2deg;
  font-family: Caveat, cursive;
  font-size: 26px;
  line-height: 1.2;
}

.sticky p {
  margin: 0 0 12px;
}

.sticky .sign {
  text-align: right;
  margin: 6px 0 0;
}

.facts {
  display: grid;
  gap: 16px;
}

.stamp {
  margin: 0;
  padding: 14px 18px;
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  font-family: 'Special Elite', monospace;
  font-size: 16px;
  line-height: 1.55;
  max-width: 48ch;
}

.stamp:nth-child(2) {
  rotate: 1deg;
  justify-self: end;
}

.stamp:nth-child(3) {
  rotate: -0.6deg;
}

@media (min-width: 860px) {
  .partner {
    grid-template-columns: 1fr 1.1fr;
  }
}

/* ---------- iPhone ---------- */

.iphone {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}

.iphone h2 {
  margin: 0 0 12px;
  font-weight: 900;
  font-size: clamp(32px, 7vw, 48px);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0.05em 0.05em 0 var(--ink);
}

.iphone p {
  margin: 0 auto 24px;
  max-width: 34rem;
  color: #d9d0bd;
}

/* ---------- Footer & documents ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 28px 20px max(28px, env(safe-area-inset-bottom));
  border-top: 2px solid #2c3d47;
  color: #b9b1a0;
  font-size: 15px;
}

.foot p {
  margin: 0;
}

.foot nav {
  display: flex;
  gap: 20px;
}

.foot a {
  color: var(--paper);
}

.legal {
  max-width: 46rem;
  margin: 24px auto 64px;
  padding: 28px 22px 34px;
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 0 8px 0 var(--ink);
}

.legal h1 {
  margin: 0 0 6px;
  font-weight: 900;
  font-size: clamp(32px, 7vw, 46px);
  line-height: 1;
}

.legal .updated {
  margin: 0 0 22px;
  font-family: 'Special Elite', monospace;
  font-size: 15px;
  color: #4a443a;
}

.legal h2 {
  margin: 28px 0 8px;
  font-size: 21px;
}

.legal p,
.legal li {
  font-size: 17px;
  line-height: 1.6;
}

.legal a {
  color: #8a3a24;
}

.legal-bar {
  padding: max(14px, env(safe-area-inset-top)) 20px 0;
}

@media (prefers-reduced-motion: reduce) {
  .lamp-head,
  .pupil,
  .brows line,
  .person .front,
  .person .back,
  .btn {
    transition: none;
  }
  .room.nervous .sweat .drop {
    animation: none;
    opacity: 1;
  }
}
