/* Home 03: work showcase — photo bento of AI case studies. */
.th-work {
  padding-block: clamp(72px, 9vw, 128px);
  background: #fff;
}
.th-work-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
  flex-wrap: wrap;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.th-work-head .tm-eyebrow { margin-bottom: 18px; }
.th-work-title {
  font: 500 clamp(2.2rem, 4.6vw, 3.9rem)/1.04 Gellix, Arial, sans-serif;
  letter-spacing: -.04em;
  color: var(--tm-ink);
  max-width: 14ch;
  margin: 0;
}
.th-work-all { flex-shrink: 0; }

.th-work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 20px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.th-work-item--wide { grid-column: 1 / -1; }

.th-work-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 20px;
  background: var(--tm-ink);
  color: #fff;
  text-decoration: none;
  aspect-ratio: 4 / 3.4;
  isolation: isolate;
}
.th-work-item--wide .th-work-card { aspect-ratio: 16 / 7; }

.th-work-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform .7s cubic-bezier(.16, 1, .3, 1);
}
/* Scrim: light at the top for the tag, deep at the bottom for the name and line. */
.th-work-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(16, 18, 24, .45) 0%, rgba(16, 18, 24, 0) 22%),
    linear-gradient(0deg, rgba(16, 18, 24, .92) 0%, rgba(16, 18, 24, .62) 32%, rgba(16, 18, 24, 0) 62%);
}

.th-work-tag {
  position: absolute;
  top: clamp(18px, 2vw, 28px);
  left: clamp(20px, 2.4vw, 36px);
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 999px;
  background: rgba(16, 18, 24, .35);
  font: 500 .66rem/1 var(--tm-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.th-work-body {
  position: absolute;
  inset: auto clamp(20px, 2.4vw, 36px) clamp(20px, 2.4vw, 34px);
  display: grid;
  gap: 12px;
}
/* Uniform wordmark: no logo files, so every client gets the same treatment. */
.th-work-client {
  font: 600 clamp(2rem, 4.2vw, 3.4rem)/.95 Gellix, Arial, sans-serif;
  letter-spacing: -.045em;
  color: #fff;
  margin: 0;
}
.th-work-item--wide .th-work-client { font-size: clamp(2.3rem, 6vw, 5.2rem); }
.th-work-result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  max-width: 46ch;
  font-size: clamp(.95rem, 1.1vw, 1.05rem);
  line-height: 1.45;
  color: rgba(255, 255, 255, .86);
}
.th-work-item--wide .th-work-result { max-width: 56ch; }

.th-work-card:hover .th-work-photo,
.th-work-card:focus-visible .th-work-photo { transform: scale(1.03); }
.th-work-card:focus-visible {
  outline: 3px solid var(--tm-blue);
  outline-offset: 4px;
}

@media (max-width: 800px) {
  .th-work-grid { grid-template-columns: 1fr; }
  .th-work-card,
  .th-work-item--wide .th-work-card { aspect-ratio: 4 / 5; border-radius: 16px; }
  .th-work-client,
  .th-work-item--wide .th-work-client { font-size: clamp(2rem, 9vw, 2.6rem); }
}
@media (prefers-reduced-motion: reduce) {
  .th-work-photo { transition: none; }
  .th-work-card:hover .th-work-photo,
  .th-work-card:focus-visible .th-work-photo { transform: none; }
}

/* Arrow chip: hints the whole card is a link. */
.th-work-go {
  position: absolute;
  right: clamp(20px, 2.4vw, 36px);
  bottom: clamp(20px, 2.4vw, 34px);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  color: var(--tm-ink);
  font: 1.2rem/1 Arial, sans-serif;
  transition: transform .4s cubic-bezier(.16, 1, .3, 1), background-color .3s, color .3s;
}
.th-work-body { padding-right: 64px; }
.th-work-card:hover .th-work-go,
.th-work-card:focus-visible .th-work-go {
  transform: translateX(4px);
  background: var(--tm-blue);
  color: #fff;
}
@media (max-width: 800px) {
  .th-work-go { width: 40px; height: 40px; }
  .th-work-body { padding-right: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .th-work-go { transition: none; }
  .th-work-card:hover .th-work-go,
  .th-work-card:focus-visible .th-work-go { transform: none; }
}
