/* jia — page-level additions (investigation tiles, case pages, justice page).
   Loaded after style.css; reuses its variables. Sharp corners, hairlines, violet only as signal. */

/* ---------- section label (mono, quiet) ---------- */

.section-label {
  margin: 0 0 1.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.block { margin-top: 5rem; }

/* ---------- investigation tiles ---------- */

.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 18rem));
  gap: 1.5rem;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 1 / 1;
  padding: 1.25rem;
  border: 1px solid var(--stone);
  text-decoration: none;
  color: var(--graphite);
  transition: border-color .2s;
}

.tile .num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.tile h3,
.tile .tile-title {
  margin: 0;
  max-width: 12ch;
  font-weight: 600;
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.tile .meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.tile .meta .arrow { transition: transform .2s, color .2s; }

/* violet point, shown on hover / focus */
.tile::after {
  content: "";
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  width: 0.375rem; height: 0.375rem;
  border-radius: 50%;
  background: var(--signal);
  opacity: 0;
  transition: opacity .2s;
}

.tile:hover,
.tile:focus-visible { border-color: var(--signal); }
.tile:hover::after,
.tile:focus-visible::after { opacity: 1; }
.tile:hover .arrow,
.tile:focus-visible .arrow { transform: translateY(0.15rem); color: var(--signal); }

/* ---------- investigations index ---------- */

/* page eyebrow in signal violet (investigations) */
.eyebrow-signal { color: var(--signal); }

/* first block directly under the title: tighter than between sections */
h1 + .block { margin-top: 3.5rem; }

/* a tile with its status update alongside */
.case {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 34rem);
  gap: 1.5rem 3rem;
  align-items: end;
}
.case .tiles { grid-template-columns: minmax(0, 1fr); }

.case-update { min-width: 0; }

/* status bar: done steps in graphite, the current step in violet and still filling */
.progress {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.5rem;
}
.step { position: relative; padding-top: 1.75rem; }
.step-bar {
  position: absolute;
  top: 0.45rem; left: 0; right: -1.5rem;   /* runs on to the next step */
  height: 2px;
  background: var(--stone);
}
.step:last-child .step-bar { right: 0; }
.step-bar::before {                        /* the marker */
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 0.75rem; height: 0.75rem;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--graphite);
}
.is-done .step-bar { background: var(--graphite); }
.is-current .step-bar { background: linear-gradient(90deg, var(--signal) 0 45%, var(--stone) 45%); }
.is-current .step-bar::before { background: var(--signal); box-shadow: 0 0 0 0.35rem rgb(79 29 240 / .15); }

.step-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.is-current .step-label { color: var(--signal); }
.step-num { margin-right: 0.35rem; font-family: var(--mono); font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.step p { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--muted); }

/* the current marker breathes gently to say "ongoing" */
@media (prefers-reduced-motion: no-preference) {
  .is-current .step-bar::before { animation: ongoing 2.4s ease-in-out infinite; }
  @keyframes ongoing { 50% { box-shadow: 0 0 0 0.6rem rgb(79 29 240 / .05); } }
}

/* narrow screens: steps stack, the bar turns vertical */
@media (max-width: 30rem) {
  .progress { grid-template-columns: 1fr; gap: 1.5rem; }
  .step { padding: 0 0 0 1.75rem; }
  .step-bar { top: 0.3rem; bottom: -1.5rem; left: 0.3rem; right: auto; width: 2px; height: auto; }
  .step:last-child .step-bar { bottom: 0; }
  .step-bar::before { left: 50%; top: 0; transform: translate(-50%, 0); }
  .is-current .step-bar { background: linear-gradient(180deg, var(--signal) 0 45%, var(--stone) 45%); }
}

/* ---------- small screens ---------- */

@media (max-width: 44rem) {
  .case { grid-template-columns: minmax(0, 18rem); }
}

@media (max-width: 34rem) {
  .block { margin-top: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tile, .tile::after, .tile .arrow { transition: none; }
}

/* the tile is a button that opens the overview */
button.tile { width: 100%; background: none; font: inherit; text-align: left; cursor: pointer; }
.tile .tile-title { display: block; }
.tile[aria-expanded="true"] { border-color: var(--graphite); }
.tile[aria-expanded="true"] .arrow { transform: rotate(180deg); color: var(--signal); }

/* investigation overview */
.overview {
  max-width: var(--measure);
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--stone);
}
.overview h3 { margin: 0 0 0.4rem; font-weight: 600; font-size: clamp(1.35rem, 2.6vw, 1.75rem); line-height: 1.15; letter-spacing: -0.02em; }
.overview-sub { margin: 0 0 0.5rem; font-style: italic; color: var(--muted); }
.overview-meta { margin: 0 0 1.75rem; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.overview p { margin: 0 0 1.1em; }
.overview p:last-child { margin-bottom: 0; }
.js .overview:not([hidden]) { animation: fade-up .35s ease both; }
@media (prefers-reduced-motion: reduce) { .js .overview:not([hidden]) { animation: none; } }
