/* ─────────────────────────────────────────
   VOICES OF COURAGE — home page

   Loaded after style.css, by the home page only. Every rule is scoped to
   body.home-v2, so nothing here can reach the subpages.

   Register: a publication, not a landing page. Left-aligned headings,
   hairline rules instead of cards and shadows, the photograph shown whole,
   every figure printed once.
───────────────────────────────────────── */

.home-v2 {
  --hv-gutter: var(--space-md);
  --hv-rule: 1px solid var(--border);
  --hv-rule-strong: 1px solid var(--text-primary);
  --hv-col-gap: clamp(2rem, 4.5vw, 4.5rem);
  --hv-section-pad: clamp(2.5rem, 5vw, 4rem);
  --hv-measure: 34rem;
  --hv-dur: 200ms;
  --hv-chip-bg: rgba(22, 19, 26, 0.86);

  /* style.css fixes the navbar at 80px (56px once scrolled). */
  --hv-nav-height: 80px;
  --hv-sticky-top: 96px;

  /* The only type sizes used by the rules in this file. */
  --hv-t-micro: 0.75rem;
  --hv-t-small: 0.875rem;
  --hv-t-body: 1rem;
  --hv-t-lead: 1.125rem;
  --hv-t-h3: 1.375rem;
  --hv-t-h2: 1.75rem;
  --hv-t-quote: clamp(1.375rem, 2.4vw, 2rem);
  --hv-t-display: clamp(2.25rem, 5vw, 4rem);
}

/* ── shared pieces ─────────────────────────────────────────────────────── */

.home-v2 .hv-section {
  padding: 0 var(--hv-gutter) var(--hv-section-pad);
}

/* The rule above each section is as wide as the text column, like a column
   rule in print — not a band across the whole window. */
.home-v2 .hv-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.home-v2 .hv-section > .hv-inner {
  padding-top: var(--hv-section-pad);
  border-top: var(--hv-rule);
}

.home-v2 .hv-section h2,
.home-v2 .hv-head h2 {
  font-size: var(--hv-t-h2);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
}

.home-v2 .hv-link {
  display: inline-block;
  font-size: var(--hv-t-small);
  font-weight: 600;
  line-height: 1.4;
  color: var(--amber);
  border-bottom: 1px solid currentColor;
}

.home-v2 .hv-link:hover {
  color: var(--ember);
}

/* style.css sets this ring to pale gold for a dark hero; the lede is paper. */
body.home-v2 #navbar:not(.scrolled) a:focus-visible {
  outline-color: var(--amber);
}

/* ── lede ──────────────────────────────────────────────────────────────── */

.home-v2 .lede {
  padding: calc(var(--hv-nav-height) + clamp(1.5rem, 5vw, 4rem)) var(--hv-gutter) clamp(2rem, 4vw, 3.5rem);
}

/* The figure spans both text rows; the spare height is shared between them,
   so with the head pinned down and the foot pinned up the text block sits
   centred against the photograph. */
.home-v2 .lede-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas:
    "head figure"
    "foot figure";
  column-gap: var(--hv-col-gap);
}

.home-v2 .lede-head { grid-area: head; align-self: end; }
.home-v2 .lede-foot { grid-area: foot; align-self: start; padding-top: 1.75rem; }
.home-v2 .lede-figure { grid-area: figure; align-self: center; }

.home-v2 .lede-figure img {
  width: 100%;
  height: auto;
}

.home-v2 .lede-title {
  font-size: var(--hv-t-display);
  line-height: 1.04;
  letter-spacing: -0.028em;
  margin-bottom: 1.25rem;
}

.home-v2 .lede-accent {
  display: block;
  color: var(--amber);
}

.home-v2 .lede-sub {
  max-width: var(--hv-measure);
  font-size: var(--hv-t-lead);
  line-height: 1.6;
  color: var(--text-secondary);
}

.home-v2 .lede-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.home-v2 .lede-cta .btn-primary,
.home-v2 .lede-cta .btn-ghost,
.home-v2 .lede-cta .btn-primary:hover,
.home-v2 .lede-cta .btn-ghost:hover {
  box-shadow: none;
  transform: none;
}

/* Next hearing: app.js fills the two data-hearing-* spans and removes
   `hidden`. Tag and countdown share the first line, the hearing the second. */
.home-v2 .lede-hearing {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.75rem;
  row-gap: 0.2rem;
  align-items: baseline;
  max-width: var(--hv-measure);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: var(--hv-rule);
  font-size: var(--hv-t-small);
  line-height: 1.45;
  color: var(--text-primary);
}

.home-v2 .lede-hearing[hidden] { display: none; }

.home-v2 .lede-hearing-tag {
  grid-area: 1 / 1;
  font-size: var(--hv-t-micro);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.home-v2 .lede-hearing-when {
  grid-area: 1 / 2;
  font-size: var(--hv-t-micro);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--amber);
}

.home-v2 .lede-hearing-label { grid-area: 2 / 1 / 3 / 3; }

.home-v2 .lede-hearing:hover .lede-hearing-label {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ── ledger ────────────────────────────────────────────────────────────── */

.home-v2 .ledger-wrap {
  padding: 0 var(--hv-gutter);
}

.home-v2 .ledger {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr));
  border-top: var(--hv-rule-strong);
  border-bottom: var(--hv-rule);
}

/* dt comes first in the markup (label, then value) and is shown under it. */
.home-v2 .ledger-item {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 0.4rem;
  padding: 1.25rem 1.25rem 1.25rem 0;
}

.home-v2 .ledger-item + .ledger-item {
  padding-left: 1.25rem;
  border-left: var(--hv-rule);
}

.home-v2 .ledger dt {
  font-size: var(--hv-t-micro);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.home-v2 .ledger dd {
  font-family: var(--font-heading);
  font-size: var(--hv-t-h2);
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
  font-variant-numeric: lining-nums tabular-nums;
}

.home-v2 .ledger-item--lead dd { color: var(--amber); }

.home-v2 .ledger dd small {
  font-size: var(--hv-t-body);
  color: var(--text-muted);
}

/* ── the nine ──────────────────────────────────────────────────────────── */

/* The ledger's bottom rule is directly above; a second one would double it. */
.home-v2 .nine > .hv-inner { border-top: 0; }

.home-v2 .nine-layout {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  column-gap: var(--hv-col-gap);
  align-items: start;
}

.home-v2 .nine-intro {
  position: sticky;
  top: var(--hv-sticky-top);
}

.home-v2 .nine-intro p {
  max-width: 26rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.home-v2 .nine-wall {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 1.25rem;
}

.home-v2 .nine-cell {
  display: block;
}

.home-v2 .nine-photo {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--snow);
}

/* A light common grade so nine photographs from nine sources sit together.
   Not monochrome: these women are alive, and a memorial look would lie. */
.home-v2 .nine-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  filter: saturate(0.9);
  transition: filter var(--hv-dur) ease;
}

.home-v2 .nine-cell:hover .nine-photo img,
.home-v2 .nine-cell:focus-visible .nine-photo img {
  filter: none;
}

/* Framing per portrait. The sources are 16:9, 4:3, square and upright, with
   the face in a different place and at a different size in each; these lines
   bring the nine faces to a similar position and scale in a 4:5 frame.
   Re-tune the matching line whenever a photo file is replaced. */
.home-v2 .nine-cell[data-id="1"] img { object-position: 58% 50%; }
.home-v2 .nine-cell[data-id="2"] img { object-position: 79% 50%; transform: scale(1.12); transform-origin: 50% 35%; }
.home-v2 .nine-cell[data-id="3"] img { object-position: 50% 30%; transform: scale(1.12); transform-origin: 50% 35%; }
.home-v2 .nine-cell[data-id="4"] img { object-position: 60% 50%; transform: scale(1.4); transform-origin: 50% 32%; }
.home-v2 .nine-cell[data-id="5"] img { object-position: 59% 50%; transform: scale(1.18); transform-origin: 50% 100%; }
.home-v2 .nine-cell[data-id="6"] img { object-position: 50% 30%; transform: scale(1.1); transform-origin: 50% 38%; }
.home-v2 .nine-cell[data-id="7"] img { object-position: 60% 50%; }
.home-v2 .nine-cell[data-id="8"] img { object-position: 50% 35%; }
.home-v2 .nine-cell[data-id="9"] img { object-position: 50% 50%; }

.home-v2 .nine-name {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--font-heading);
  font-size: var(--hv-t-lead);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  /* Three columns on a 320px phone are narrower than "Absalamova". */
  overflow-wrap: anywhere;
}

.home-v2 .nine-cell:hover .nine-name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.home-v2 .nine-outlet {
  display: block;
  margin-top: 0.15rem;
  font-size: var(--hv-t-small);
  line-height: 1.4;
  color: var(--text-secondary);
}

.home-v2 .nine-meta {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.6rem;
  margin-top: 0.3rem;
  font-size: var(--hv-t-micro);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* The same two colours the profile cards use for "on trial" and "sentenced";
   home.js sets .is-sentenced from the record's status. */
.home-v2 .nine-meta [data-nine-status] { color: var(--on-trial); }
.home-v2 .nine-cell.is-sentenced [data-nine-status] { color: var(--sentenced); }
.home-v2 .nine-meta span:empty { display: none; }

/* ── why this matters ──────────────────────────────────────────────────── */

.home-v2 .why-grid,
.home-v2 .latest-grid,
.home-v2 .closing-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  column-gap: var(--hv-col-gap);
  align-items: start;
}

.home-v2 .why-text p {
  max-width: 62ch;
  margin-bottom: 1rem;
  line-height: 1.65;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.home-v2 .why-quote {
  padding-left: 1.5rem;
  border-left: 3px solid var(--amber);
}

.home-v2 .why-quote blockquote,
.home-v2 .letter-quote {
  font-family: var(--font-accent);
  font-size: var(--hv-t-quote);
  font-style: italic;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-wrap: balance;
}

.home-v2 .why-quote figcaption {
  font-size: var(--hv-t-small);
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ── the questions (markup and behaviour unchanged) ────────────────────── */

/* Was rgba(179,18,31,.58) on #F0EBE2 — 2.94:1 at 13px. This is 8:1. */
.home-v2 .question-attr { color: var(--ember); }

/* ── latest ────────────────────────────────────────────────────────────── */

/* The tinted questions band above already separates this section. */
.home-v2 .latest > .hv-inner { border-top: 0; }

.home-v2 .latest-list {
  list-style: none;
  margin-bottom: 1.5rem;
  border-top: var(--hv-rule-strong);
}

.home-v2 .latest-list[hidden],
.home-v2 .letter-holder[hidden] { display: none; }

.home-v2 .latest-item {
  padding: 1.1rem 0;
  border-bottom: var(--hv-rule);
}

.home-v2 .latest-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.75rem;
  margin-bottom: 0.35rem;
  font-size: var(--hv-t-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.home-v2 .latest-cat { color: var(--amber); }

.home-v2 .latest-title {
  font-family: var(--font-heading);
  font-size: var(--hv-t-h3);
  line-height: 1.22;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.home-v2 .latest-title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.home-v2 .latest-source {
  margin-top: 0.35rem;
  font-size: var(--hv-t-small);
  line-height: 1.4;
  color: var(--text-secondary);
}

/* Stretch so the rule between the two columns runs their full height. */
.home-v2 .latest-grid { align-items: stretch; }

.home-v2 .latest-letter {
  padding-left: var(--hv-col-gap);
  margin-left: calc(-1 * var(--hv-col-gap) / 2);
  border-left: var(--hv-rule);
}

.home-v2 .letter-holder { margin-bottom: 1.5rem; }

.home-v2 .letter-by {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
  font-size: var(--hv-t-small);
  line-height: 1.5;
  color: var(--text-secondary);
}

.home-v2 .letter-by strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* ── video ─────────────────────────────────────────────────────────────── */

.home-v2 #video-gallery {
  padding-top: 0;
  padding-bottom: var(--hv-section-pad);
}

.home-v2 .hv-head {
  margin-bottom: 2rem;
  padding-top: var(--hv-section-pad);
  border-top: var(--hv-rule);
}

.home-v2 .hv-head h2 { margin-bottom: 0.5rem; }

.home-v2 .hv-head p {
  line-height: 1.6;
  color: var(--text-secondary);
}

/* The lead film and three more; the rest are on the updates page. */
.home-v2 #video-gallery .vid-grid > .vid-card:nth-child(n+4) { display: none; }

/* The name used to float over the poster as white text and ran into the
   lettering baked into the thumbnails. A solid chip stays legible on any. */
.home-v2 .vid-person,
.home-v2 .vid-lead .vid-person {
  top: auto;
  bottom: 0.75rem;
  left: 0.75rem;
  max-width: calc(100% - 1.5rem);
  padding: 0.4rem 0.55rem;
  border-radius: 2px;
  background: var(--hv-chip-bg);
  font-family: var(--font-body);
  font-size: var(--hv-t-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-shadow: none;
  text-transform: uppercase;
}

.home-v2 .hv-more { margin: 2rem auto 0; }

/* ── what you can do ───────────────────────────────────────────────────── */

.home-v2 .closing-list {
  list-style: none;
  border-top: var(--hv-rule-strong);
}

.home-v2 .closing-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1rem;
  align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: var(--hv-rule);
}

.home-v2 .closing-item-title {
  font-family: var(--font-heading);
  font-size: var(--hv-t-h3);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  text-wrap: balance;
}

.home-v2 .closing-arrow {
  font-size: var(--hv-t-h3);
  line-height: 1.2;
  color: var(--amber);
}

.home-v2 .closing-item-desc {
  grid-column: 1;
  max-width: 48ch;
  margin-top: 0.3rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.home-v2 .closing-list a:hover .closing-item-title { color: var(--amber); }

.home-v2 .closing-about h2 {
  font-family: var(--font-body);
  font-size: var(--hv-t-micro);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.home-v2 .closing-about p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.home-v2 .closing-about a {
  color: var(--text-primary);
  border-bottom: 1px solid currentColor;
}

/* ── persistent call to action ─────────────────────────────────────────── */

/* On a wide screen "Take Action" is always in the navbar; a second fixed bar
   only covers the page. On a phone that link is inside the menu, so it stays. */
@media (min-width: 901px) {
  .home-v2 .sticky-cta { display: none; }
}

/* ── narrower screens ──────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .home-v2 .lede { padding-top: calc(var(--hv-nav-height) + 1.5rem); }

  /* style.css drops the video grid to two columns here; three cards would
     leave one alone on a second row. */
  .home-v2 #video-gallery .vid-grid > .vid-card:nth-child(n+3) { display: none; }

  .home-v2 .lede-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "figure"
      "foot";
    row-gap: 1.5rem;
  }

  .home-v2 .lede-foot { padding-top: 0; }

  .home-v2 .nine-layout,
  .home-v2 .why-grid,
  .home-v2 .latest-grid,
  .home-v2 .closing-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2rem;
  }

  .home-v2 .nine-intro { position: static; }

  .home-v2 .latest-letter {
    margin-left: 0;
    padding: 2rem 0 0;
    border-left: 0;
    border-top: var(--hv-rule);
  }
}

@media (max-width: 720px) {
  .home-v2 .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .home-v2 .ledger-item { padding: 1rem 0; }

  .home-v2 .ledger-item + .ledger-item {
    padding-left: 0;
    border-left: 0;
    border-top: var(--hv-rule);
  }

  .home-v2 .ledger-item--lead { grid-column: 1 / -1; }

  /* After the full-width lead figure, the 3rd and 5th items fall in the
     right-hand column. */
  .home-v2 .ledger-item:nth-child(2n+3) {
    padding-left: 1rem;
    border-left: var(--hv-rule);
  }
}

@media (max-width: 560px) {
  /* On a phone the whole frame would shrink the woman at its left edge to a
     few pixels. Show the left half of the photograph at twice the width —
     the window runs from 5% to 55% across and from 2% to 82% down. */
  .home-v2 .lede-figure {
    aspect-ratio: 4 / 5;
    overflow: hidden;
  }

  .home-v2 .lede-figure img {
    width: 200%;
    max-width: none;
    margin: -3.1% 0 0 -10%;
  }

  .home-v2 .lede-cta > a {
    flex: 1 1 auto;
    text-align: center;
  }

  .home-v2 .nine-wall { gap: 1.25rem 0.6rem; }

  .home-v2 .nine-name {
    margin-top: 0.45rem;
    font-size: var(--hv-t-small);
  }

  /* Status stays (sentenced or on trial is the fact that matters most);
     the outlet is on the profile. */
  .home-v2 .nine-outlet { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .home-v2 .nine-photo img { transition: none; }
}
