/* murdville.com: the book page. Ink on paper, one red, square corners everywhere
   (the book draws boxes, not pills). Fonts are the book's own, self hosted. */

@font-face {
  font-family: "League Gothic";
  src: url("../v1/assets/fonts/LeagueGothic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("../v1/assets/fonts/BarlowCondensed.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Light only: the product is a black and white book, the page is its paper. */
  color-scheme: light;
  --paper: #f2f2f0;
  --sheet: #ffffff;
  --ink: #161616;
  --quiet: #575757;
  --rule: #cdcdc9;
  --red: #c7132f;          /* sampled from the cover */
  --red-deep: #a20f26;
  --display: "League Gothic", "Arial Narrow", sans-serif;
  --text: "Barlow Condensed", "Arial Narrow", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 20px;
  line-height: 1.45;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 20px;
}

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* ── type ─────────────────────────────────────────────────────────────── */
.title {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}

.lede {
  margin: 0 0 24px;
  max-width: 34em;
  color: var(--quiet);
  font-size: 21px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── buttons: rectangles, one line, one label per intent ──────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px 10px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--display);
  font-size: 23px;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn[hidden] { display: none; }

.btn-buy { background: var(--red); border-color: var(--red); color: #fff; }
.btn-buy:hover { background: var(--red-deep); border-color: var(--red-deep); }

.btn-line:hover { background: var(--ink); color: var(--paper); }

.btn-invert { background: #fff; border-color: #fff; color: var(--red); }
.btn-invert:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ── header ───────────────────────────────────────────────────────────── */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.bar-row {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
}
.wordmark {
  font-family: var(--display);
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.bar .btn { margin-left: auto; padding: 9px 16px 8px; font-size: 20px; }

/* ── hero ─────────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
  min-height: min(calc(100dvh - 66px), 860px);
  padding-top: 40px;
  padding-bottom: 56px;
}
.hero-title {
  margin: 0 0 22px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(64px, 8.6vw, 120px);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: -0.005em;
}
.hero-sub {
  margin: 0 0 32px;
  max-width: 27em;
  font-size: 23px;
  line-height: 1.4;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-book { display: flex; justify-content: center; }
.cover {
  width: 100%;
  max-width: 420px;
  box-shadow: 0 28px 50px -18px rgba(90, 10, 22, 0.45), 0 2px 0 rgba(22, 22, 22, 0.15);
  transform: none;
}

/* ── suspects reel ────────────────────────────────────────────────────── */
.suspects { padding: 72px 0 80px; border-top: 2px solid var(--ink); }
.reel {
  overflow: hidden;
  margin-top: 8px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.reel-track {
  display: flex;
  width: max-content;
  margin: 0;
  padding: 8px 0;
  list-style: none;
}
.reel-item {
  flex: 0 0 auto;
  width: 168px;
  margin-right: 16px;   /* not gap: the two copies then measure exactly half the track,
                           so the loop wraps without a jump */
  background: var(--sheet);
  border: 2px solid var(--ink);
}
.reel-item img { width: 100%; height: 172px; object-fit: contain; padding: 14px 18px 6px; }
.reel-name {
  display: block;
  padding: 8px 6px 9px;
  border-top: 2px solid var(--ink);
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: nowrap;
}

/* ── how a case works: four real crops, uneven grid ───────────────────── */
.how { padding-top: 88px; padding-bottom: 88px; }
.how-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-areas:
    "brief brief brief town town"
    "outline outline killer killer killer";
  gap: 22px;
  margin-top: 30px;
}
.how-cell {
  margin: 0;
  background: var(--sheet);
  border: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
}
/* one height per row, each crop framed on the part that matters */
.how-cell img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-bottom: 2px solid var(--ink);
}
.how-cell figcaption { padding: 18px 22px 22px; }
.how-cell h3 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 34px;
  line-height: 1;
  text-transform: uppercase;
}
.how-cell p { margin: 0; color: var(--quiet); }
.how-brief { grid-area: brief; }
.how-brief img { padding: 26px 30px 20px; background: var(--sheet); object-position: left top; }
.how-town { grid-area: town; }
.how-outline { grid-area: outline; }
.how-outline img { height: 300px; object-position: 40% 45%; }
.how-killer { grid-area: killer; }
.how-killer img { height: 300px; object-fit: contain; padding: 24px 20px; background: var(--sheet); }

/* ── inside the book ──────────────────────────────────────────────────── */
.inside { padding-top: 88px; padding-bottom: 72px; }
.spread { margin: 30px 0 0; }
.spread img {
  width: 100%;
  background: var(--sheet);
  border: 2px solid var(--ink);
  box-shadow: 0 30px 50px -30px rgba(22, 22, 22, 0.35);
}
.spread figcaption { margin-top: 12px; color: var(--quiet); font-size: 18px; }

/* the three levels drawn to scale: 5, 30 and 5 cases */
.levels {
  display: grid;
  grid-template-columns: minmax(190px, 5fr) 30fr minmax(190px, 5fr);
  gap: 10px;
  margin-top: 56px;
}
.level { border-top: 14px solid var(--ink); padding-top: 12px; }
.level-hard { border-top-color: var(--red); }
.level-count {
  display: block;
  font-family: var(--display);
  font-size: 64px;
  line-height: 0.9;
}
.level-name {
  display: block;
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.level-desc { display: block; color: var(--quiet); font-size: 18px; }
.format { margin: 36px 0 0; max-width: 40em; font-size: 21px; }

/* ── answers ──────────────────────────────────────────────────────────── */
.answers {
  padding-top: 72px;
  padding-bottom: 96px;
}

/* ── buy ──────────────────────────────────────────────────────────────── */
.buy { background: var(--red); color: #fff; }
.buy-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 64px;
}
.buy-cover {
  width: 100%;
  border: 3px solid #fff;
  box-shadow: 0 24px 40px -20px rgba(40, 0, 6, 0.6);
  transform: none;
}
.buy-title {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(44px, 5.6vw, 72px);
  line-height: 0.95;
  text-transform: uppercase;
}
.buy-copy p { margin: 0 0 26px; font-size: 22px; }

/* ── footer ───────────────────────────────────────────────────────────── */
.foot { padding: 26px 0 40px; color: var(--quiet); font-size: 17px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; }
.foot p { margin: 0; }

/* ── motion: entrance, reveal, reel ───────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 0.8s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.18s; }
  .cover { animation: land 1s var(--ease) 0.1s both; }

  .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
}

/* the reel loops for every viewer, reduced motion included (the owner's call) */
.reel-track { animation: reel 70s linear infinite; }
.reel:hover .reel-track,
.reel:focus-within .reel-track { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes land { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes reel { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── small screens ────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 36px;
    padding-top: 36px;
  }
  .hero-book { justify-content: flex-start; }
  .cover { max-width: 300px; }
  .how-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "brief" "town" "outline" "killer";
  }
  .how-grid .how-cell img { height: auto; }
  .levels { grid-template-columns: 1fr; gap: 22px; }
  .buy-row { grid-template-columns: 1fr; gap: 32px; }
  .buy-cover { max-width: 180px; }
}

@media (max-width: 520px) {
  body { font-size: 19px; }
  .wrap { padding-inline: 16px; }
  .wordmark { font-size: 30px; }
  .bar .btn { font-size: 18px; padding: 8px 12px 7px; }
  .hero-sub { font-size: 21px; }
  .reel-item { width: 140px; }
  .reel-item img { height: 148px; }
  /* phones: the desktop rhythm scaled down, never zero */
  .hero { padding-top: 32px; padding-bottom: 52px; }
  .suspects { padding: 56px 0 60px; }
  .how { padding-top: 64px; padding-bottom: 56px; }
  .inside { padding-top: 64px; padding-bottom: 48px; }
  .answers { padding-top: 48px; padding-bottom: 72px; }
  .buy-row { padding-top: 52px; padding-bottom: 56px; }
  .levels { margin-top: 44px; }
}
