/* Noir homepage styles — transplanted from design/nynoir-home-handoff.html
   (the visual source of truth), scoped under the .nyn-home body class so they
   coexist with Bootstrap. Design tokens (--nyn-*) come from siteChrome.css,
   which also owns the navbar and footer styles. Bootstrap's reboot replaces
   the mockup's global `* { margin:0 }` reset, so margins are zeroed explicitly
   where the mockup relied on it. */

/* (page background comes from body.base-layout in siteChrome.css, site-wide) */

body.nyn-home {
  /* shared image-column width for the box lid and the carousel case
     thumbnails; sized so a typical card's height gives the column roughly
     the 8.5x11 letter ratio of the generated casebook cover thumbnails */
  --nyn-art-col-w: 230px;
}

/* navbar sits flush above the first section on the homepage only (mb-2 is a
   Bootstrap utility with !important, so this must out-important it) */
body.nyn-home > header.site-header {
  margin-bottom: 0 !important;
}

/* full-bleed content area: kill the container-fluid gutters; sections manage
   their own width via .nyn-wrap */
.nyn-home-container {
  padding-left: 0;
  padding-right: 0;
}
.nyn-home-main {
  margin: 0;
  padding: 0;
}

.nyn-home main {
  color: var(--nyn-ink);
  font-family: 'Newsreader', Georgia, serif;
  font-size: 17px;
  line-height: 1.55;
}

.nyn-home main a {
  color: inherit;
}

/* django messages (login notices etc.) rendered by the base layout above the
   sections: keep them readable inside the full-bleed main */
.nyn-home main > .alert,
.nyn-home main > hr {
  max-width: var(--nyn-max-w);
  margin: 12px auto;
}
.nyn-home main > .alert {
  padding-left: 24px;
  padding-right: 24px;
}

/* ---------- Eyebrow / evidence-tag labels ---------- */
.nyn-home .tag-label {
  font-family: 'Courier Prime', monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--nyn-smoke);
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
}
.nyn-home .tag-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--nyn-hairline);
}
.nyn-home .tag-label .hole {
  width: 9px; height: 9px;
  border: 1.5px solid var(--nyn-smoke);
  border-radius: 50%;
  flex: none;
}

/* ---------- Sections ---------- */
.nyn-home section.block {
  padding: 40px 0 0;
}
.nyn-home .block h2 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 14px 0 8px;
}
.nyn-home .block .sub {
  color: var(--nyn-smoke);
  max-width: 62ch;
}

/* ---------- Shared panels & headers ---------- */
.nyn-home .panel {
  background: var(--nyn-paper-raised);
  border: 1px solid var(--nyn-hairline);
}
.nyn-home .panel-head {
  padding: 10px 12px 10px 10px;
  border-bottom: 1px solid var(--nyn-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nyn-home .panel-head h3 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 23px;
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 0;
}
.nyn-home .panel-head .mono-note,
.nyn-home a.mono-note {
  font-family: 'Courier Prime', monospace;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nyn-smoke);
  white-space: nowrap;
}
.nyn-home a.mono-note {
  text-decoration: none;
  border-bottom: 1px solid var(--nyn-hairline);
}
.nyn-home a.mono-note:hover {
  color: var(--nyn-cab-deep);
  border-bottom-color: var(--nyn-cab);
}

/* ---------- The game panel ---------- */
.nyn-home .game-panel-body {
  display: grid;
  grid-template-columns: var(--nyn-art-col-w) 1fr;
  gap: 0;
  /* manila interior, same as the FEATURED CASES .case-card */
  background: var(--nyn-manila);
}
.nyn-home .game-art {
  background: #241C27;
  border-right: 1px solid var(--nyn-hairline);
}
.nyn-home .game-art a {
  display: block;
  height: 100%;
}
.nyn-home .game-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover; /* source is square; column is near-square */
}
.nyn-home .game-copy {
  padding: 16px 22px 16px;
  font-size: 20px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.nyn-home .game-copy p {
  max-width: 68ch;
  margin-bottom: 10px;
}
.nyn-home .game-copy p:last-of-type {
  margin-bottom: 0;
}

/* ---------- Featured case carousel ---------- */
.nyn-home .car-btn {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--nyn-ink);
  background: var(--nyn-paper-raised);
  color: var(--nyn-ink);
  font-family: 'Courier Prime', monospace;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  border-radius: 0;
  padding: 0;
}
.nyn-home .car-btn:hover {
  background: var(--nyn-cab);
  border-color: var(--nyn-cab);
}
.nyn-home .carousel {
  overflow: hidden;
  position: relative;
}
.nyn-home .car-overlay {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: color-mix(in srgb, var(--nyn-paper-raised) 85%, transparent);
  box-shadow: 0 2px 10px rgba(25,25,33,0.25);
}
.nyn-home .car-overlay.prev { left: 14px; }
.nyn-home .car-overlay.next { right: 14px; }
.nyn-home .car-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.33, 1, 0.68, 1);
}
.nyn-home .car-slide {
  flex: 0 0 100%;
  min-width: 0;
}
.nyn-home .car-dots {
  padding: 14px 0 16px;
  border-top: 1px solid var(--nyn-hairline);
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 0;
}
.nyn-home .car-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--nyn-smoke);
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.nyn-home .car-dot[aria-current="true"] {
  background: var(--nyn-cab);
  border-color: var(--nyn-cab-deep);
}

.nyn-home .case-card {
  background: var(--nyn-manila);
  display: grid;
  grid-template-columns: var(--nyn-art-col-w) 1fr;
  position: relative;
  min-height: 224px;
}
.nyn-home .case-thumb {
  background: var(--nyn-ink);
  position: relative;
  overflow: hidden;
}
.nyn-home .case-thumb img {
  width: 100%;
  height: 100%;
  /* contain, not cover: always show the whole 8.5x11 casebook cover,
     letterboxed on the dark panel when the card runs taller than letter ratio */
  object-fit: contain;
  display: block;
  filter: saturate(0.85) contrast(1.05);
  /* out-important core.css's generic thumbnail cap should the class ever match */
  max-width: 100% !important;
  max-height: 100% !important;
}
.nyn-home .case-body {
  padding: 20px 26px 22px;
  position: relative;
}
.nyn-home .case-body .tag-label { color: #7A6F52; }
.nyn-home .case-body .tag-label::after { background: #CFC5A8; }
.nyn-home .case-body .tag-label .hole { border-color: #7A6F52; }
.nyn-home .case-body h3 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 28px;
  letter-spacing: 0.01em;
  line-height: 1;
  margin: 8px 0 3px;
}
.nyn-home .case-body .byline {
  font-style: italic;
  color: var(--nyn-smoke);
  margin: 0 0 8px;
}
.nyn-home .case-body p.summary {
  max-width: 56ch;
  margin: 0;
}
.nyn-home .case-stats {
  margin: 12px 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-family: 'Courier Prime', monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #55503F;
}
.nyn-home .case-stats b {
  color: var(--nyn-ink);
  font-weight: 700;
}
.nyn-home .stamp {
  position: absolute;
  top: 20px;
  right: 24px;
  font-family: 'Courier Prime', monospace;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nyn-stamp);
  border: 2.5px solid var(--nyn-stamp);
  padding: 5px 12px 4px;
  transform: rotate(6deg);
  opacity: 0.85;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='40'><filter id='n'><feTurbulence baseFrequency='0.6' numOctaves='2'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.85 0'/></filter><rect width='120' height='40' filter='url(%23n)'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='40'><filter id='n'><feTurbulence baseFrequency='0.6' numOctaves='2'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0.85 0'/></filter><rect width='120' height='40' filter='url(%23n)'/></svg>");
}
.nyn-home .case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.nyn-home .btn-case {
  font-family: 'Courier Prime', monospace;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 18px;
  border: 1.5px solid var(--nyn-ink);
}
.nyn-home .btn-case.solid {
  background: var(--nyn-ink);
  color: var(--nyn-manila);
}
.nyn-home .btn-case:hover {
  background: var(--nyn-cab);
  border-color: var(--nyn-cab);
  color: var(--nyn-ink);
}

/* ---------- The wire ---------- */
.nyn-home .wire-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 18px;
  align-items: baseline;
  /* row text size matches the compact door panels (Recent Chatter); rows are
     packed a bit tighter than those. Top-heavy padding: the fonts + the
     bordered kind chip leave extra space below the baseline, so an even
     padding makes the text sit visually high in the row */
  padding: 7px 24px 4px;
  border-bottom: 1px solid var(--nyn-hairline);
  text-decoration: none;
}
.nyn-home .wire-row:last-of-type {
  border-bottom: none;
}
.nyn-home a.wire-row:hover {
  background: color-mix(in srgb, var(--nyn-cab) 12%, var(--nyn-paper-raised));
}
.nyn-home .wire-date {
  font-family: 'Courier Prime', monospace;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nyn-smoke);
}
.nyn-home .wire-what {
  font-size: 15px;
}
.nyn-home .wire-what b {
  font-weight: 500;
}
.nyn-home .wire-kind {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nyn-cab-deep);
  border: 1px solid color-mix(in srgb, var(--nyn-cab) 60%, var(--nyn-hairline));
  padding: 2px 8px;
  white-space: nowrap;
  /* center the bordered chip in the row; baseline-aligning it (the row
     default) hangs its border+padding below the text baseline */
  align-self: center;
}

/* ---------- Two doors ---------- */
.nyn-home .doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
/* when the BGG discussions panel is hidden (cache empty / disabled), the
   remaining door spans the full row instead of leaving a hole */
.nyn-home .doors > .door:only-child {
  grid-column: 1 / -1;
}
.nyn-home .door ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nyn-home .door li {
  border-bottom: 1px solid var(--nyn-hairline);
}
.nyn-home .door li:last-child {
  border-bottom: none;
}
.nyn-home .door li a {
  display: block;
  padding: 17px 28px 18px;
  text-decoration: none;
}
.nyn-home .door li a:hover {
  background: color-mix(in srgb, var(--nyn-cab) 14%, var(--nyn-paper-raised));
}
.nyn-home .door li .li-title {
  font-weight: 500;
  font-size: 18px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.nyn-home .door li .li-sub {
  color: var(--nyn-smoke);
  font-size: 15.5px;
  margin-top: 2px;
  display: block;
}
.nyn-home .door.compact li a { padding: 8px 16px 9px; }
.nyn-home .door.compact .li-title { font-size: 15px; }
.nyn-home .door.compact .li-sub { font-size: 12.5px; margin-top: 0; }

/* ---------- Focus visibility & motion ---------- */
.nyn-home main a:focus-visible,
.nyn-home main button:focus-visible {
  outline: 3px solid var(--nyn-cab);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .nyn-home .car-track { transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nyn-home .case-card { grid-template-columns: 1fr; min-height: 0; }
  .nyn-home .case-thumb { min-height: 160px; }
  /* stacked layout: the thumb is a wide banner strip, so fill it (cover)
     rather than letterboxing a tiny full page in it */
  .nyn-home .case-thumb img { object-fit: cover; }
  .nyn-home .doors { grid-template-columns: 1fr; }
  .nyn-home .game-panel-body { grid-template-columns: 1fr; }
  .nyn-home .game-art { border-right: none; border-bottom: 1px solid var(--nyn-hairline); }
  .nyn-home .game-art img { max-height: 420px; }
}
@media (max-width: 560px) {
  .nyn-home .wire-row { grid-template-columns: 1fr; gap: 4px; }
  .nyn-home .wire-kind { justify-self: start; }
  .nyn-home .case-body { padding: 24px 22px; }
  .nyn-home .stamp { position: static; display: inline-block; margin-bottom: 12px; }
}
