/* Approved R55 case-list layout; existing media and their controls stay intact. */
.home-page .work-section {
  container: cases / inline-size;
}

.home-page .work-section > h2 {
  font-size: clamp(40px, 4.6vw, 64px);
  font-weight: 450;
  line-height: 1.05;
  letter-spacing: -.055em;
  margin-bottom: 44px;
}

.home-page .work-section > h2 strong { font-weight: 800; }
.home-page .work-section .project-list { gap: 52px; }

.home-page .work-section .project-featured,
.home-page .work-section .project-featured:first-child,
.home-page .work-section .project-featured:last-child {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 32px;
  border: 0;
  padding: 0;
}

.home-page .work-section .project-featured::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -16px -20px;
  pointer-events: none;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 28%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.home-page .work-section .project-caption-link { display: flex; }

.home-page .work-section .project-caption-link::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: -16px -20px;
  border-radius: 12px;
}

.home-page .work-section .project-caption {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.home-page .work-section .project-featured > :is(.deck-preview, .project-preview, .video-preview) {
  align-self: start;
  position: relative;
  z-index: 2;
}

.home-page .work-section .project-caption-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
}

.home-page .work-section .project-logo {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  object-fit: contain;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.home-page .work-section .project-title-group { min-width: 0; }

.home-page .work-section .project h3 {
  font-size: 28px;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -.035em;
}

.home-page .work-section .project-role {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.home-page .work-section .project-arrow {
  display: inline-flex;
  align-self: flex-start;
  flex: none;
  width: auto;
  height: auto;
  margin-left: auto;
  padding: 4px 0 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: var(--muted);
  transition: transform 180ms ease, color 180ms ease;
}

.home-page .work-section .project-arrow .icon { width: 19px; height: 19px; }

.home-page .work-section .project-summary {
  margin-top: 12px;
  max-width: 45ch;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  text-wrap: pretty;
}

.home-page .work-section .project-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 24px;
  margin-top: 14px;
}

.home-page .work-section .project-facts > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.home-page .work-section .project-facts dt {
  order: 2;
  margin-top: 5px;
  max-width: 23ch;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.home-page .work-section .project-facts dd {
  order: 1;
  margin: 0;
  font-size: 27px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -.035em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.home-page .work-section .project-facts.project-facts--capabilities dd {
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -.015em;
  white-space: normal;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.home-page .work-section .project-money {
  font-weight: 650;
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: none;
}

.home-page .work-section .project-notes { margin-top: 14px; }

.home-page .work-section .project-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.home-page .work-section .project-note:is(ul, ol) {
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.home-page .work-section .project-note li + li,
.home-page .work-section .project-note + .project-note { margin-top: 4px; }

.home-page .work-section .project-note .project-money {
  color: var(--ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.home-page .work-section .project:hover .project-preview {
  outline-color: transparent;
  box-shadow: none;
}

.home-page .work-section .project:focus-visible { outline: none; }

.home-page .work-section .project:focus-visible::before,
.home-page .work-section .project:has(:focus-visible)::before {
  opacity: 1;
  box-shadow: inset 0 0 0 2px var(--muted);
}

.home-page .work-section .project:focus-visible .project-arrow,
.home-page .work-section .project:has(:focus-visible) .project-arrow {
  color: var(--ink);
  transform: translate(3px, -3px);
}

@media (hover: hover) and (pointer: fine) {
  .home-page .work-section .project:hover::before { opacity: 1; }
  .home-page .work-section .project:hover .project-arrow {
    color: var(--ink);
    transform: translate(3px, -3px);
  }
}

@container cases (max-width: 820px) {
  .home-page .work-section .project-featured,
  .home-page .work-section .project-featured:first-child,
  .home-page .work-section .project-featured:last-child {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .home-page .work-section .project-caption-link { display: block; }
  .home-page .work-section .project-caption { display: block; }
  .home-page .work-section .project-facts { max-width: 500px; }
}

@media (max-width: 900px) {
  .home-page .work-section > h2 {
    font-size: clamp(36px, 8vw, 56px);
    margin-bottom: 32px;
  }

  .home-page .work-section .project-list { gap: 42px; }
  .home-page .work-section .project-featured::before,
  .home-page .work-section .project-caption-link::after { inset: -12px; }
  .home-page .work-section .project h3 { font-size: 26px; }
  .home-page .work-section .project-logo { flex-basis: 38px; width: 38px; height: 38px; }
  .home-page .work-section .project-caption-header { gap: 10px; }
  .home-page .work-section .project-facts { gap: 20px; }
  .home-page .work-section .project-facts dd { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .work-section .project::before,
  .home-page .work-section .project-arrow { transition: none; }
  .home-page .work-section .project .project-arrow { transform: none !important; }
}
