/**
 * static/css/rescue.css — the "Help & adopt" section.
 *
 * Its own file rather than more of inner-pages.css: this is the one public
 * section whose subject is a set of individual animals rather than a service
 * the clinic sells, and it is the only place on the site where a photograph
 * carries the page. Keeping it separate also keeps it off the seven pages
 * that never render a card.
 *
 * Restraint is the whole design brief here. A page about street animals can
 * very easily start shouting — red urgency banners, progress bars, countdown
 * language — and none of that is honest when the clinic quotes no target and
 * takes no money online. The section states facts in the site's own warm
 * palette and lets the photographs do the asking.
 */

/* ── The opening ──────────────────────────────────────────────────────── */
.rescue-open {
  padding-block: var(--sp-7) var(--sp-4);
}
/* One animal's page opens on a breadcrumb and nothing else — the section's
   own bottom padding plus the next section's top left a phone screen mostly
   empty above the animal's name, which is the one thing the reader came
   for. */
.rescue-open--crumb-only {
  padding-block: var(--sp-5) 0;
}
.rescue-open__content {
  max-width: 46rem;
  margin-block-start: var(--sp-5);
}
.rescue-open h1 {
  font-size: var(--fs-3xl);
  margin: 0 0 var(--sp-3);
  text-wrap: balance;
}
.rescue-open .lede {
  margin: 0;
}

/* ── The grid of animals ──────────────────────────────────────────────── */
.rescue-grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: 1fr;
}
@media (min-width: 34rem) {
  .rescue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 62rem) {
  .rescue-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.rescue-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-raised);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--sh-sm);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.rescue-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}
.rescue-card:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 3px;
}
/* Already home: still shown, but it should not compete for attention with
   the animals who are still being paid for. */
.rescue-card--adopted { opacity: 0.92; }

.rescue-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--brand-50);
}
.rescue-card__media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  display: block;
}
.rescue-card__nophoto {
  block-size: 100%;
  display: grid;
  place-items: center;
  color: var(--brand-300);
}

.rescue-card__body {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.rescue-card__name {
  font-size: var(--fs-lg);
  margin: 0;
}
.rescue-card__meta {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}
.rescue-card__line {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-sm);
  color: var(--c-text);
}
/* The money line is deliberately quiet — a statement of what has been spent,
   not a call to action dressed up as one. */
.rescue-card__cost {
  margin: var(--sp-3) 0 0;
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}

/* ── Status chip ──────────────────────────────────────────────────────── */
.rescue-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.5;
}
.rescue-card__media .rescue-chip {
  position: absolute;
  inset-block-start: var(--sp-3);
  inset-inline-start: var(--sp-3);
  background: var(--surface-raised);
  box-shadow: var(--sh-sm);
}
.rescue-chip--in_treatment { color: var(--accent-800); background: var(--accent-100); }
.rescue-chip--ready        { color: var(--brand-700);  background: var(--brand-50); }
.rescue-chip--adopted      { color: var(--sage-700);   background: var(--sage-50); }

/* ── Happy endings ────────────────────────────────────────────────────── */
.rescue-endings {
  background: var(--sage-50);
}
.rescue-endings__head {
  margin-block-end: var(--sp-5);
}
.rescue-endings__head h2 {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-2xl);
}

/* ── One animal ───────────────────────────────────────────────────────── */
.rescue-detail {
  display: grid;
  gap: var(--sp-6);
  align-items: start;
}
@media (min-width: 62rem) {
  .rescue-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-7); }
}

.rescue-detail__photo {
  inline-size: 100%;
  border-radius: var(--r-xl);
  display: block;
  /* Capped rather than free: a portrait photograph from a phone is taller
     than the screen otherwise, and the reader meets the animal's name only
     after a scroll. */
  max-block-size: 30rem;
  object-fit: cover;
}
.rescue-detail__strip {
  display: flex;
  gap: var(--sp-3);
  margin-block-start: var(--sp-3);
  overflow-x: auto;
  padding-block-end: var(--sp-2);
}
.rescue-detail__strip figure {
  margin: 0;
  flex: 0 0 9rem;
}
.rescue-detail__strip img {
  inline-size: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r-lg);
  display: block;
}
.rescue-detail__strip figcaption {
  margin-block-start: var(--sp-1);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}

.rescue-detail__text h1 {
  font-size: var(--fs-3xl);
  margin: var(--sp-3) 0 var(--sp-1);
}
.rescue-detail__meta {
  margin: 0 0 var(--sp-5);
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
}
.rescue-prose p {
  margin: 0 0 var(--sp-3);
}
.rescue-prose p:last-child { margin-block-end: 0; }

.rescue-note {
  margin-block-start: var(--sp-5);
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  background: var(--brand-50);
}
.rescue-note--good { background: var(--sage-50); }
.rescue-note__label {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.rescue-detail__cost {
  margin-block-start: var(--sp-5);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

/* ── The two asks ─────────────────────────────────────────────────────── */
.rescue-asks {
  background: var(--brand-50);
}
.rescue-asks__grid {
  display: grid;
  gap: var(--sp-5);
}
@media (min-width: 55rem) {
  .rescue-asks__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }
}
.rescue-ask {
  background: var(--surface-raised);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-sm);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.rescue-ask h2 {
  margin: 0;
  font-size: var(--fs-lg);
}
.rescue-ask__lede {
  margin: calc(var(--sp-3) * -1) 0 0;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}
