/* ---------- work & notes-&-talks card grid ----------
   Shared .work-card component for both sections (Figma nodes 98:229
   and 314:374). Uses the standard 12-col grid (.container/.grid/.col-*
   from grid.css) — unlike the hero, this content is meant to stretch
   with the grid at every breakpoint.

   Card content ("Beyond the Screen" / "description") and the card
   photo are placeholders straight from the Figma file itself — every
   card there reuses the same title, description and stock photo, so
   this section needs real project copy and images before it ships. */

.work,
.notes{
  padding: 80px 0;
}

.work-grid{
  row-gap: 40px;
}

.notes-heading{
  margin: 0 0 24px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 32px;
  line-height: normal;
  letter-spacing: 0;
  color: var(--color-body-text);
}

.work-card{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.work-card-body{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.work-card-media{
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--color-surface);
}
.work-card-media--4-3{ aspect-ratio: 4 / 3; }
.work-card-media--1-1{ aspect-ratio: 1 / 1; }
.work-card-media--16-9{ aspect-ratio: 16 / 9; }

.work-card-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--work-placeholder-bg);
  background-size: cover;
  background-position: center;
  transform: scale(1);
  transition: transform var(--work-hover-duration) var(--work-hover-ease);
}
.work-card-media:hover .work-card-img,
.work-card-media:focus-within .work-card-img{
  transform: scale(var(--work-image-scale));
}

/* tag pills: hidden until hover/focus, whole row rises together from
   below, top-left overlay inside the image — behavior copied from
   the reference mockup's .proj-tag */
.work-card-tags{
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: max-content;
  max-width: calc(100% - 32px);
}
.work-card-tag{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 100000px;
  background: var(--work-tag-bg);
  color: var(--color-body-text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 18px;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(12px);
  /* leaving (default state): same order as the entrance, just
     quicker — shorter duration and a tighter gap between items so
     the exit doesn't feel like it's dragging */
  transition: opacity var(--work-tag-leave-duration) var(--work-tag-leave-ease),
              transform var(--work-tag-leave-duration) var(--work-tag-leave-ease);
}
.work-card-tag:nth-child(1){ transition-delay: 0ms; }
.work-card-tag:nth-child(2){ transition-delay: var(--work-tag-leave-stagger); }
.work-card-tag:nth-child(3){ transition-delay: calc(var(--work-tag-leave-stagger) * 2); }
.work-card-tag:nth-child(4){ transition-delay: calc(var(--work-tag-leave-stagger) * 3); }

.work-card-media:hover .work-card-tag,
.work-card-media:focus-within .work-card-tag{
  opacity: 1;
  transform: translateY(0);
  /* entering: the slower, more deliberate staggered reveal */
  transition: opacity var(--work-hover-duration) var(--work-hover-ease),
              transform var(--work-hover-duration) var(--work-hover-ease);
}
.work-card-media:hover .work-card-tag:nth-child(1),
.work-card-media:focus-within .work-card-tag:nth-child(1){ transition-delay: 0ms; }
.work-card-media:hover .work-card-tag:nth-child(2),
.work-card-media:focus-within .work-card-tag:nth-child(2){ transition-delay: var(--work-hover-stagger); }
.work-card-media:hover .work-card-tag:nth-child(3),
.work-card-media:focus-within .work-card-tag:nth-child(3){ transition-delay: calc(var(--work-hover-stagger) * 2); }
.work-card-media:hover .work-card-tag:nth-child(4),
.work-card-media:focus-within .work-card-tag:nth-child(4){ transition-delay: calc(var(--work-hover-stagger) * 3); }

/* touch devices: no hover, so keep tags visible per the reference's
   own fallback */
@media (hover: none){
  .work-card-tag{
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce){
  .work-card-img{ transition: none; }
  .work-card-media:hover .work-card-img,
  .work-card-media:focus-within .work-card-img{ transform: none; }
  .work-card-tag{ transition: opacity 150ms ease; transition-delay: 0ms !important; }
}

.work-card-title{
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 0.8px;
  line-height: normal;
  color: var(--color-body-text);
}
.work-card-desc{
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 20px;
  color: var(--color-body-text);
}

/* M tier (980-1199px): 2-up. Boundary matches the S/M grid split at
   980px (see variables.css), not an arbitrary component breakpoint. */
@media (min-width: 980px) and (max-width: 1199px){
  .work-card{
    grid-column: span 6 !important;
  }
}

/* S and XS tiers (below 980px): 1-up. */
@media (max-width: 979px){
  .work-card{
    grid-column: span 12 !important;
  }
}

/* XS tier (360-639px): 1-up. */
@media (max-width: 639px){
  .notes-heading{
    margin-bottom: 40px;
  }
}
