/* Projects: stacking cards. Each card is sticky, so the next one slides up and covers it
   (same behaviour as the Figma prototype). Figma 1920px values in vw. */
.projects { padding-top: 6.67vw; }


.projects__head { text-align: center; }
.projects__title { margin-top: .5vw; font-size: 4.17vw; line-height: 1.19; font-weight: 600; letter-spacing: -.02em; }  /* 80px */

.projects__list { margin-top: 5.1vw; display: flow-root; }  /* flow-root: the last card's margin stays inside the list, so all 4 cards unpin at the same time */                                  /* card top at y=3182 */
.project {
  /* Pinned in the vertical centre of the screen (never closer than 7.5rem to the top, so the header stays clear).
     Card height = 31.6vw. All four cards use the same margin so they leave the stack at the same point. */
  position: sticky; top: max(7.5rem, calc((100vh - 31.6vw) / 2));
  width: 75.4vw; margin: 0 auto 8.5vw;                                    /* 1448 wide, 163 gap */
}
.projects__outro { margin-top: -2.15vw; }                                 /* keeps the 122px gap after the last card */
.project__link { position: relative; display: block; aspect-ratio: 1448 / 607; border-radius: 1.5vw; overflow: hidden; background: #111; }
.project__img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.project__link:hover .project__img { transform: scale(1.03); }
.project__shade { position: absolute; inset: 55% 0 0; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.45)); pointer-events: none; }

.project__tags { position: absolute; left: 11.9%; top: 79.2%; display: flex; gap: .47vw; }
.project__tags li {
  height: 1.15vw; min-height: 20px; padding: 0 .94vw; display: flex; align-items: center;
  font-size: max(11px, .68vw); font-weight: 500; color: #fff; white-space: nowrap;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); border-radius: 99px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.project__name { position: absolute; left: 12.5%; top: 84.5%; font-size: 2.19vw; line-height: 1.143; font-weight: 600; color: #fff; white-space: nowrap; }   /* text box y=513, 48px tall */
.project__year { position: absolute; left: 79.9%; top: 84.5%; font-size: 2.19vw; line-height: 1.143; font-weight: 600; color: #fff; }

/* ---------- Outro: paragraph, button and the big faint word ---------- */
.projects__outro { position: relative; height: 17.3vw; overflow: hidden; text-align: center; }  /* 6221 -> 6554 */
.projects__intro { position: relative; z-index: 1; width: 29.7vw; margin: 0 auto; font-size: max(14px, 1.04vw); line-height: 1.55; font-weight: 500; }
.projects__btn { position: relative; z-index: 1; margin: 1.97vw auto 0; width: 240px; }
.projects__btn .btn__label { margin-right: 0; }
.projects__mark {
  position: absolute; left: 50%; top: 3.3vw; transform: translateX(-50%);
  font-size: 21.7vw; line-height: 1; font-weight: 700; letter-spacing: -.04em; white-space: nowrap;
  color: rgba(30,30,30,.05); user-select: none; pointer-events: none;
}

@media (max-width: 900px) {
  .projects { padding-top: 3.5rem; }
  .eyebrow { height: auto; font-size: .75rem; gap: .5rem; }
  .projects__title { font-size: clamp(2rem, 9vw, 3.25rem); margin-top: .5rem; }
  .projects__list { margin-top: 2rem; }
  .project { width: calc(100% - 2 * var(--gutter)); top: max(6rem, calc((100vh - (100vw - 2 * var(--gutter)) * .75) / 2)); margin-bottom: 3rem; }
  .projects__outro { margin-top: 0; }
  .project__link { border-radius: 1rem; aspect-ratio: 4 / 3; }
  .project__tags { left: 1rem; top: auto; bottom: 3.4rem; gap: .35rem; }
  .project__tags li { height: 1.35rem; padding: 0 .65rem; font-size: .68rem; }
  .project__name { left: 1rem; top: auto; bottom: .9rem; font-size: clamp(1.05rem, 5vw, 1.6rem); white-space: normal; max-width: 70%; }
  .project__year { left: auto; right: 1rem; top: auto; bottom: .9rem; font-size: clamp(1.05rem, 5vw, 1.6rem); }
  .projects__outro { height: auto; padding: 1rem var(--gutter) 3rem; }
  .projects__intro { width: 100%; }
  .projects__btn { margin-top: 1.25rem; }
  .projects__mark { font-size: 26vw; top: auto; bottom: -.15em; }
}
