/* ===========================================================
   ДОПРОСЫ — доска расследования
   (фон, доска с карточками-показаниями, нити, карточка протокола)
   =========================================================== */

/* ---------- Фон: стол следователя (лампа, магнитофон, блокнот) ---------- */
.dopros-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("../img/bg-interrogation.jpg") center 35% / cover no-repeat;
}
.dopros-bg::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 680px at 76% 12%, rgba(160,124,58,.22) 0%, transparent 60%),
    linear-gradient(180deg, rgba(8,6,5,.60) 0%, rgba(8,6,5,.70) 55%, rgba(8,6,5,.88) 100%);
}

/* ---------- Заголовок раздела ---------- */
.board-intro {
  max-width: 760px;
  margin: 0 auto;
  padding: 44px 22px 10px;
  text-align: center;
}
.board-intro .back-link { display: flex; width: max-content; }
.board-intro .eyebrow { display: block; margin-bottom: 14px; }
.board-intro h1 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .2em;
  padding-left: .2em; /* компенсация хвостового трекинга — заголовок на истинной оси */
  font-size: clamp(34px, 8vw, 58px);
  line-height: 1;
  margin: 0 0 16px;
  color: var(--ink);
  text-shadow: 0 2px 30px rgba(0,0,0,.6);
}
.board-intro .sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 18px;
}
.board-intro .sub::before,
.board-intro .sub::after {
  content: "";
  flex: none;
  height: 1px;
  width: clamp(28px, 5vw, 64px);
  background: linear-gradient(90deg, transparent, var(--gold-deep));
}
.board-intro .sub::after { background: linear-gradient(90deg, var(--gold-deep), transparent); }
.board-intro p.lede {
  max-width: 520px;
  margin: 18px auto 0;
  color: var(--ink-dim);
  font-size: 15.5px;
  font-style: italic;
}

/* ---------- Доска ---------- */
.board {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 28px 90px;
}

.board__strings {
  position: absolute;
  top: 0; left: 0;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}
.board__string {
  fill: none;
  stroke: var(--blood);
  stroke-width: 2.2;
  stroke-linecap: round;
  opacity: .82;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.55));
}

/* ---------- Булавка (общая) ---------- */
.pin {
  position: absolute;
  top: -7px; left: 50%;
  transform: translate(-50%, 0);
  width: 15px; height: 15px;
  border-radius: 50%;
  z-index: 3;
  background: radial-gradient(circle at 36% 30%, #e8717c 0%, #a4242f 46%, #6e1320 100%);
  box-shadow: 0 3px 6px -1px rgba(0,0,0,.7), inset 0 1px 1px rgba(255,210,210,.5);
}
.pin::after {
  content: "";
  position: absolute; left: 50%; top: 11px;
  width: 8px; height: 8px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(0,0,0,.4);
  filter: blur(2px);
}
.pin--lg { width: 22px; height: 22px; top: -10px; }
.pin--lg::after { top: 16px; width: 11px; height: 11px; }

/* ---------- Карточка-улика "ДЕЛО" (хаб, наверху доски) ---------- */
.board__case-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin-bottom: 64px;
}
.board__case {
  position: relative;
  display: block;
  width: min(310px, 84vw);
  padding: 28px 24px 24px;
  border-radius: 4px;
  text-align: center;
  background: linear-gradient(165deg, #1d1410 0%, #120c09 100%);
  border: 1px solid rgba(164,36,47,.4);
  box-shadow: 0 22px 44px -22px rgba(0,0,0,.85), inset 0 0 0 1px rgba(201,168,106,.16);
  transform: rotate(-1.2deg);
  transition: transform .25s ease, box-shadow .25s ease;
}
.board__case:hover,
.board__case:focus-visible {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 30px 54px -22px rgba(0,0,0,.9), inset 0 0 0 1px rgba(201,168,106,.22);
}
.board__case:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.board__case-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #f0dcc0;
  background: var(--blood);
  border-radius: 3px;
  padding: 3px 10px;
  margin-bottom: 14px;
}
.board__case-photo {
  width: 88px; height: 110px;
  margin: 2px auto 14px;
  border-radius: 2px;
  overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 38%, #6b5638 0%, #3a2e1d 70%, #261d11 100%);
  border: 3px solid rgba(201,168,106,.35);
  box-shadow: inset 0 0 18px rgba(0,0,0,.5);
}
.board__case-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 24%;
  display: block;
}
.board__case-photo span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: .04em;
  color: rgba(240,225,195,.85);
}
.board__case-name {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 25px;
  color: var(--ink);
  margin: 0 0 8px;
}
.board__case-no {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--ink-faint);
  margin: 0 0 14px;
}
.board__case-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
}
.board__case:hover .board__case-cta { color: var(--gold-2); }

/* ---------- Сетка карточек-показаний ----------
   flex вместо grid: 7 карточек ложатся центрированной «пирамидой» 4+3,
   без дырки-сироты в последнем ряду */
.board__grid {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 60px 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.board__grid > li {
  flex: 1 1 240px;
  max-width: 280px;
}
.pin-card {
  position: relative;
  display: block;
  padding: 22px 18px 18px;
  border-radius: 3px;
  background: linear-gradient(168deg, #f4ebd7 0%, #ece0c6 55%, #e3d4b6 100%);
  box-shadow: 0 18px 30px -16px rgba(0,0,0,.65), 0 1px 0 rgba(255,255,255,.15) inset;
  color: #3c2d1c;
  /* backwards, не both: иначе финальный кадр анимации навсегда
     перекрывает hover-transform и карточка не «отклеивается» */
  animation: pin-in .5s cubic-bezier(.2,.7,.2,1) backwards;
  transition: transform .22s ease, box-shadow .22s ease;
}
@keyframes pin-in { from { opacity: 0; transform: scale(.93) rotate(var(--tilt, 0deg)) } to { opacity: 1; transform: scale(1) rotate(var(--tilt, 0deg)) } }
.pin-card:hover,
.pin-card:focus-visible {
  transform: rotate(0deg) translateY(-5px) scale(1.015);
  box-shadow: 0 26px 40px -18px rgba(0,0,0,.7);
  z-index: 4;
}
.pin-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.board__grid > li:nth-child(1) .pin-card { --tilt: -2.4deg; animation-delay: .05s; }
.board__grid > li:nth-child(2) .pin-card { --tilt: 1.6deg; animation-delay: .12s; }
.board__grid > li:nth-child(3) .pin-card { --tilt: -1deg; animation-delay: .19s; }
.board__grid > li:nth-child(4) .pin-card { --tilt: 2.2deg; animation-delay: .26s; }
.board__grid > li:nth-child(5) .pin-card { --tilt: -1.8deg; animation-delay: .33s; }
.board__grid > li:nth-child(6) .pin-card { --tilt: 1.1deg; animation-delay: .40s; }
.board__grid > li:nth-child(7) .pin-card { --tilt: -2.6deg; animation-delay: .47s; }
.pin-card { transform: rotate(var(--tilt, 0deg)); }

.pin-card__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  margin-bottom: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    linear-gradient(155deg, rgba(255,244,214,.06) 0%, transparent 40%),
    radial-gradient(circle at 50% 38%, #6b5638 0%, #3a2e1d 70%, #261d11 100%);
  border: 4px solid #f6f0e2;
  box-shadow: 0 1px 4px rgba(0,0,0,.3), inset 0 0 34px rgba(0,0,0,.5);
}
.pin-card__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  display: block;
}
.pin-card__photo span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  letter-spacing: .1em;
  color: rgba(240,225,195,.85);
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0,0,0,.55);
}
.pin-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.15;
  margin: 0 0 4px;
  color: #2e2114;
}
.pin-card__role {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: #6a5234;
  margin: 0 0 14px;
}
.pin-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(120,90,50,.3);
}
.pin-card__no {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: #8a6a3e;
}
.pin-card__listen {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #7a1320;
}
.pin-card__listen svg { flex: none; }

/* пометка маркером сверху одной из карточек — атмосфера, не несёт смысла */
.board__grid > li:nth-child(2) .pin-card::before,
.board__grid > li:nth-child(5) .pin-card::before {
  content: "алиби?";
  position: absolute;
  top: -26px; right: 4px;
  font-family: "Caveat", cursive;
  font-weight: 600;
  font-size: 20px;
  color: var(--gold-2);
  transform: rotate(-6deg);
  opacity: .8;
  pointer-events: none;
}
.board__grid > li:nth-child(5) .pin-card::before { content: "мотив?"; right: auto; left: 6px; transform: rotate(5deg); }

.board__foot {
  position: relative;
  z-index: 2;
  margin-top: 56px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--ink-faint);
}
.board__foot span { color: var(--gold-deep); }

/* ===========================================================
   СТРАНИЦА ПРОТОКОЛА — карточка-улика, приколотая к доске
   =========================================================== */
.evidence-wrap { position: relative; }
.evidence {
  position: relative;
  border-radius: 4px;
  padding: 44px 38px 32px;
  background: linear-gradient(168deg, #f4ebd7 0%, #ece0c6 55%, #e3d4b6 100%);
  box-shadow: 0 40px 80px -36px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.15) inset;
  color: #3c2d1c;
  transform: rotate(-0.6deg);
  animation: dossier-in .6s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes dossier-in { from { opacity: 0; transform: translateY(18px) rotate(-0.6deg) } to { opacity: 1; transform: translateY(0) rotate(-0.6deg) } }

.evidence__stamp {
  position: absolute;
  top: 26px; right: -40px;
  transform: rotate(28deg);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .2em;
  font-size: 14px;
  color: rgba(164,36,47,.72);
  border: 2.5px solid rgba(164,36,47,.45);
  border-radius: 6px;
  padding: 5px 50px;
  text-transform: uppercase;
}

.evidence__eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: 10.5px;
  color: #8a6a3e;
  margin-bottom: 18px;
}
.evidence__eyebrow .num { color: #a3895d; }

.evidence__head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}
.evidence__photo {
  width: 82px; height: 100px;
  flex: none;
  border-radius: 2px;
  overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 38%, #6b5638 0%, #3a2e1d 70%, #261d11 100%);
  border: 4px solid #f6f0e2;
  box-shadow: 0 1px 4px rgba(0,0,0,.3), inset 0 0 16px rgba(0,0,0,.35);
}
.evidence__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  display: block;
}
.evidence__photo span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  color: rgba(240,225,195,.85);
  text-transform: uppercase;
}
.evidence__name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.05;
  font-size: clamp(26px, 5vw, 38px);
  color: #2e2114;
  margin: 0 0 9px;
}
.evidence__role {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: #6a5234;
}
.evidence__role::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--blood);
}

.evidence__meta {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid rgba(120,90,50,.3);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 26px;
}
.evidence__meta div {
  flex: 1 1 33%;
  min-width: 110px;
  padding: 11px 14px;
  border-right: 1px solid rgba(120,90,50,.22);
}
.evidence__meta div:last-child { border-right: none; }
.evidence__meta dt {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 9.5px;
  color: #8a6a3e;
  margin: 0 0 4px;
}
.evidence__meta dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #3c2d1c;
}

.evidence-wrap .case__note,
.evidence-wrap .case__footer {
  color: var(--ink-faint);
}
.evidence-wrap .case__note svg,
.evidence-wrap .case__footer span { color: var(--gold-deep); }

/* ---------- Адаптив ---------- */
@media (min-width: 1680px) {
  .board { max-width: 1320px; padding: 72px 40px 110px; }
  .board__grid { gap: 72px 48px; }
  .board__case-wrap { margin-bottom: 84px; }
  .board-intro { padding-top: 60px; }
}

@media (max-width: 720px) {
  .board { padding: 40px 18px 70px; }
  .board__grid { gap: 50px 24px; }
}

@media (max-width: 560px) {
  .board__grid > li { flex: 0 0 auto; width: min(320px, 100%); max-width: none; }
  .board__case { width: min(260px, 86vw); }
  .evidence { padding: 34px 22px 26px; transform: none; }
  .evidence__stamp { top: 14px; right: -44px; font-size: 11px; padding: 4px 44px; }
  .evidence__eyebrow .num { display: none; }
  .evidence__head { gap: 14px; }
  .evidence__photo { width: 64px; height: 80px; }
}
