/* ==========================================================================
 * CLIFF cases archive — unique organisms only
 * Base rhythm comes from site-pages + cliff-page-editorial + cliff-events.
 * Do not re-theme page-hero / section-head / cta-band here.
 * ========================================================================== */

.cases-page {
  background: var(--page-bg);
  color: var(--text-main);
  font-family: var(--font-body);
}

.cases-page a:focus-visible,
.cases-page button:focus-visible {
  outline: 2px solid var(--swatch--brand);
  outline-offset: 4px;
}

/* Hero media: keep page-hero grid, sharpen photo plane */
.cases-page .page-hero--dark {
  background: var(--charcoal-950);
}

.cases-page .page-hero__media {
  position: relative;
  min-width: 0;
}

.cases-page .page-hero__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 620px;
  object-fit: cover;
  display: block;
  background: var(--charcoal-800);
  filter: saturate(0.86) contrast(1.03);
}

.cases-page .page-hero h1 {
  max-width: 12ch;
  text-wrap: balance;
}

/* Collection — page-section supplies vertical rhythm */
.page-section.cases-collection {
  background: var(--page-bg);
}

.cases-collection .section-head {
  margin-bottom: clamp(36px, 4vw, 56px);
}

.cases-collection .section-head h2 {
  max-width: 12ch;
}

.cases-collection__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 64px;
  margin-bottom: 28px;
  border-top: 1px solid var(--hairline-strong);
  border-bottom: 1px solid var(--hairline-strong);
}

.cases-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  align-items: center;
}

/* Sharp editorial filters — not pill chips */
.cases-filter {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  min-height: 44px;
  padding: 18px 0;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cases-filter::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--swatch--brand);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms ease;
}

.cases-filter:hover,
.cases-filter.is-active {
  color: var(--text-main);
}

.cases-filter.is-active::after {
  transform: scaleX(1);
}

.cases-collection__hint {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-light);
  white-space: nowrap;
}

.cases-demo-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding: 14px 18px;
  background: var(--page-bg-linen);
  border: 1px solid var(--hairline);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.cases-demo-banner[hidden] {
  display: none !important;
}

.cases-demo-banner__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--swatch--brand);
  flex: 0 0 auto;
}

/* Feed */
.cases-feed {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(24px, 4vw, 56px);
  row-gap: clamp(48px, 6vw, 88px);
  align-items: start;
}

.cases-spotlight {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(28px, 4vw, 64px);
  padding-bottom: clamp(40px, 5vw, 72px);
  margin-bottom: clamp(8px, 1vw, 16px);
  border-bottom: 1px solid var(--hairline-strong);
}

.cases-cover {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--charcoal-900);
  text-decoration: none;
}

.cases-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.02);
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1), filter 500ms ease;
}

.cases-cover:hover img {
  transform: scale(1.035);
  filter: saturate(1) contrast(1.04);
}

.cases-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 68%, rgba(10, 9, 9, 0.22));
}

.cases-spotlight__cover {
  aspect-ratio: 1.35;
}

.cases-spotlight__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  padding-block: 8px;
}

.cases-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--swatch--brand);
}

.cases-meta__line {
  display: inline-block;
  width: 22px;
  height: 1px;
  background: currentColor;
}

.cases-spotlight__title {
  margin: 22px 0 16px;
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 58px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}

.cases-spotlight__description {
  margin: 0 0 18px;
  max-width: 42ch;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-muted);
}

.cases-dossier {
  display: grid;
  gap: 10px;
  margin: 0 0 28px;
  max-width: 44ch;
  padding-top: 4px;
}

.cases-dossier p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
}

.cases-dossier b {
  color: var(--text-main);
  font-weight: 650;
}

.cases-card {
  min-width: 0;
}

.cases-card:nth-child(4n + 3) {
  padding-top: 56px;
}

.cases-card__cover {
  aspect-ratio: 1.28;
  margin-bottom: 20px;
}

.cases-card:nth-child(4n + 2) .cases-card__cover {
  aspect-ratio: 0.96;
}

.cases-card__title {
  margin: 14px 0 12px;
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  text-wrap: balance;
}

.cases-card__description {
  margin: 0 0 20px;
  max-width: 42ch;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
}

.cases-storylink {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 0 8px;
  border-bottom: 1px solid currentColor;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  transition: gap 200ms ease, color 200ms ease;
}

.cases-storylink:hover {
  gap: 14px;
  color: var(--swatch--brand);
}

.cases-storylink span {
  color: var(--swatch--brand);
  font-size: 16px;
  line-height: 1;
  font-weight: 400;
}

.cases-more-wrap {
  text-align: center;
  padding-top: 56px;
}

.cases-more-button[hidden] {
  display: none !important;
}

.cases-state {
  padding: 64px 20px;
  text-align: center;
  border-top: 1px solid var(--hairline-strong);
  border-bottom: 1px solid var(--hairline-strong);
}

.cases-state[hidden] {
  display: none;
}

.cases-state h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.cases-state p {
  margin: 0 auto;
  max-width: 48ch;
  color: var(--text-muted);
  line-height: 1.7;
}

.cases-state a {
  display: inline-block;
  margin-top: 18px;
  color: var(--swatch--brand);
}

/* Interlude uses page-section--alt; keep quiet */
.cases-interlude {
  background: var(--page-bg-alt);
}

.cases-interlude .section-head h2 {
  max-width: 16ch;
}

.cases-interlude .section-head p {
  max-width: 48ch;
}

@media (max-width: 900px) {
  .cases-feed {
    grid-template-columns: 1fr;
    row-gap: 48px;
  }

  .cases-spotlight {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cases-card:nth-child(4n + 3) {
    padding-top: 0;
  }

  .cases-card__cover,
  .cases-card:nth-child(4n + 2) .cases-card__cover {
    aspect-ratio: 1.3;
  }

  .cases-page .page-hero__media img {
    aspect-ratio: 16 / 10;
    max-height: 420px;
  }
}

@media (max-width: 760px) {
  .cases-collection__toolbar {
    display: block;
  }

  .cases-filters {
    gap: 0 20px;
  }

  .cases-collection__hint {
    display: none;
  }

  .cases-filter {
    padding: 16px 0;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cases-cover img,
  .cases-storylink,
  .cases-filter::after {
    transition: none !important;
  }
}
