/* Homepage work grid — alternating 2 / 3 rows (see partials/work-grid.php) */
.wt { padding: 6rem 3.5rem 7rem; background: var(--bg); border-top: 1px solid var(--border); }
.wt__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; max-width: calc(var(--container) - 7rem); margin: 0 auto 3rem; }
.wt__label { display: block; margin-bottom: 1.1rem; font-family: var(--font-b); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); }
.wt__title { font-family: var(--font-d); font-weight: 400; line-height: 1; letter-spacing: -0.02em; color: var(--text); font-size: clamp(2rem, 3.6vw, 3.6rem); max-width: 16ch; }

/* 6-column grid. Rows alternate: 2 cards (a wide feature of 4 cols beside a narrow one of 2 cols, flipping side each time) and 3 equal cards (2 cols each).
   The pattern repeats every 10 cards: 1 wide + 2 narrow | 3,4,5 equal | 6 narrow + 7 wide | 8,9,10 equal. */
.wt__grid { --w: min(100vw - 7rem, var(--container) - 7rem); --gap: 1rem; display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap); max-width: calc(var(--container) - 7rem); margin: 0 auto; }
.wt__card { position: relative; display: block; overflow: hidden; border-radius: 14px; color: #fff; text-decoration: none; grid-column: span 2; height: calc((var(--w) - 2 * var(--gap)) / 3 * 0.95); }
.wt__card:nth-child(10n+1), .wt__card:nth-child(10n+7) { grid-column: span 4; height: calc(var(--w) * 0.3); }
.wt__card:nth-child(10n+2), .wt__card:nth-child(10n+6) { grid-column: span 2; height: calc(var(--w) * 0.3); }
.wt__img { position: absolute; inset: 0; background-size: cover; background-position: center 25%; transition: transform 0.7s var(--ease-out); }
.wt__card:hover .wt__img, .wt__card:focus-visible .wt__img { transform: scale(1.05); }
.wt__card::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(10,9,8,0.6), transparent 45%); pointer-events: none; }
.wt__cap { position: absolute; left: 1.5rem; right: 1.5rem; bottom: 1.3rem; z-index: 2; }
.wt__name { display: block; font-family: var(--font-d); font-weight: 400; font-size: clamp(1.2rem, 1.6vw, 1.7rem); letter-spacing: -0.02em; line-height: 1.1; }
/* top-right arrow button */
.wt__card::after {
  content: ""; position: absolute; top: 1rem; right: 1rem; z-index: 3; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%230A0908%27 stroke-width=%271.8%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M7 17L17 7M8 7h9v9%27/%3E%3C/svg%3E") center / 1.1rem no-repeat;
  transition: background-color 0.3s, transform 0.4s var(--ease-out);
}
.wt__card:hover::after, .wt__card:focus-visible::after {
  background-color: var(--red); transform: scale(1.08);
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%271.8%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M7 17L17 7M8 7h9v9%27/%3E%3C/svg%3E");
}
@media (max-width: 1024px) {
  .wt { padding: 4.5rem 1.5rem 5rem; }
  .wt__grid { --w: calc(100vw - 3rem); --gap: 0.75rem; max-width: none; }
}
@media (max-width: 768px) {
  .wt__grid { grid-template-columns: 1fr; }
  .wt__card:nth-child(n) { grid-column: auto; height: auto; aspect-ratio: 4 / 3; }
}

/* "View project ———" slides up under the name on hover; the line draws out to the right */
.wt__cta { display: flex; align-items: center; gap: 0.75rem; max-height: 0; opacity: 0; overflow: hidden; margin-top: 0;
  font-family: var(--font-b); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.06em; color: #fff;
  transition: max-height 0.4s var(--ease-out), opacity 0.3s, margin-top 0.4s var(--ease-out); }
.wt__cta::after { content: ""; width: 0; height: 1px; background: currentColor; transition: width 0.5s var(--ease-out) 0.1s; }
.wt__card:hover .wt__cta, .wt__card:focus-visible .wt__cta { max-height: 1.6rem; opacity: 1; margin-top: 0.55rem; }
.wt__card:hover .wt__cta::after, .wt__card:focus-visible .wt__cta::after { width: 3.5rem; }
@media (hover: none) { .wt__cta { max-height: 1.6rem; opacity: 1; margin-top: 0.55rem; } .wt__cta::after { width: 3.5rem; } }
