/* Pixel project cards: home work list (.work-item), "More projects" on case pages
   (.suggested-project-item) and the explorations list (.exploration-container).

   Layers (all on the 1px grid, same corner as the theme toggle knob):
   - ::before  the shadow: the card's own stepped shape, offset down-right. It stays
               on the "ground" while the card moves, so the light never shifts:
               the visible offset is always (4px + lift), and 0 when pressed.
               Light: solid warm ink. Dark: 50% checker dither, which reads on black.
   - ::after   fill + the 1px stepped outline, clipped to the card shape.
   - media     clipped to the outline's inner edge (no gap, no double edge); on
               hover it steps in by one more pixel, leaving a 1px mat.
   - focus     the toggle's corner brackets, drawn with border-image outside the box.

   Motion runs on two registered properties, rounded to whole pixels:
   --pc-lift  (px)  hover: 0 > -1 (anticipation) > 1 > 3 (overshoot) > 2 (settle),
                    40ms frames; leaving: 2 > 1 > 0 in 2 frames.
   --pc-press (0-1) press: instant drop onto the shadow, held; release pops back
                    with a 1px overshoot. */

@property --pc-lift { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --pc-base { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --pc-press { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --pc-line { syntax: "<color>"; inherits: true; initial-value: transparent; }

.work-item,
.suggested-project-item,
.exploration-container {
  --pc-line-rest: var(--swatch--ecru-50);
  --pc-line-on: var(--swatch--neutral-100);
  --pc-line: var(--pc-line-rest);
  --pc-shadow: color-mix(in srgb, var(--swatch--neutral-100) 78%, var(--swatch--ecru-50));
  --pc-shadow-paint: var(--pc-shadow);
  --pc-fill: var(--color--background); /* never transparent: the shadow would show through */
  --pc-brackets: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' shape-rendering='crispEdges' fill='%233d4653'%3E%3Cpath d='M0 0h10v2H2v8H0z M30 0h-10v2h8v8h2z M0 30h10v-2H2v-8H0z M30 30h-10v-2h8v-8h2z'/%3E%3C/svg%3E");
  --pc-lift: 0px;
  --pc-base: 0px; /* mock: flat at rest, the shadow belongs to the hovered card only */
  --pc-press: 0;
  position: relative;
  isolation: isolate;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  filter: none;
  outline: none !important;
  overflow: visible;
  scale: 1;
  translate:
    round(calc(var(--pc-press) * (var(--pc-base) + var(--pc-lift)) - var(--pc-lift)), 1px)
    round(calc(var(--pc-press) * (var(--pc-base) + var(--pc-lift)) - var(--pc-lift)), 1px);
  border: 0 none;
  border-image: none;
  /* leaving hover: a shorter, plain reverse; releasing a press: pop with 1px overshoot */
  transition:
    --pc-lift 80ms steps(2, end),
    --pc-base 80ms steps(2, end),
    --pc-line 80ms steps(2, end),
    --pc-press 120ms linear(0, 0 0%, 1.1667 0%, 1.1667 33.3%, 1 33.3%, 1),
    /* un-dim waits 120ms, so moving across the gap between cards hands the
       spotlight over instead of flashing the whole grid back to full */
    opacity 80ms steps(2, end) 120ms,
    filter 80ms steps(2, end) 120ms;
  -webkit-tap-highlight-color: transparent;
}

html.dark-mode :is(.work-item, .suggested-project-item, .exploration-container) {
  --pc-line-rest: var(--swatch--neutral-80);
  --pc-line-on: var(--swatch--neutral-10);
  --pc-shadow: var(--swatch--neutral-60);
  --pc-shadow-paint: repeating-conic-gradient(var(--pc-shadow) 0 25%, transparent 0 50%) 0 0 / 2px 2px;
  --pc-brackets: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' shape-rendering='crispEdges' fill='%23bfc8d4'%3E%3Cpath d='M0 0h10v2H2v8H0z M30 0h-10v2h8v8h2z M0 30h10v-2H2v-8H0z M30 30h-10v-2h8v-8h2z'/%3E%3C/svg%3E");
}

/* Card fills (the brand colours that used to sit on the card itself). */
.work-item { --pc-fill: var(--swatch--neutral-10); }
.work-item.brxs, .work-item.brxs-copy { --pc-fill: #1e76dd; }
.work-item.bunq-s { --pc-fill: var(--black); }
.work-item.studocu { --pc-fill: var(--brands--studocu-burgundy); }
.work-item.housinganywhere { --pc-fill: var(--brands--ha-secondary); }

.work-item.brxs,
.work-item.brxs-copy,
.work-item.bunq-s,
.work-item.studocu,
.work-item.housinganywhere {
  background-color: transparent;
}

/* The home grid clipped the card; the media clips itself now. */
.projects.new > .work-item {
  overflow: visible;
}

/* Shadow: same stepped shape, offset. Absolute offset from the card's rest
   position is always 4px: (4 + lift) * (1 - press) relative to the moving card. */
:is(.work-item, .suggested-project-item, .exploration-container)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--pc-shadow-paint);
  clip-path: polygon(0px 5px, 1px 5px, 1px 3px, 2px 3px, 2px 2px, 3px 2px, 3px 1px, 5px 1px, 5px 0px, calc(100% - 5px) 0px, calc(100% - 5px) 1px, calc(100% - 3px) 1px, calc(100% - 3px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 3px, calc(100% - 1px) 3px, calc(100% - 1px) 5px, 100% 5px, 100% calc(100% - 5px), calc(100% - 1px) calc(100% - 5px), calc(100% - 1px) calc(100% - 3px), calc(100% - 2px) calc(100% - 3px), calc(100% - 2px) calc(100% - 2px), calc(100% - 3px) calc(100% - 2px), calc(100% - 3px) calc(100% - 1px), calc(100% - 5px) calc(100% - 1px), calc(100% - 5px) 100%, 5px 100%, 5px calc(100% - 1px), 3px calc(100% - 1px), 3px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 3px), 1px calc(100% - 3px), 1px calc(100% - 5px), 0px calc(100% - 5px));
  translate:
    round(calc((var(--pc-base) + var(--pc-lift)) * (1 - var(--pc-press))), 1px)
    round(calc((var(--pc-base) + var(--pc-lift)) * (1 - var(--pc-press))), 1px);
  pointer-events: none;
}

/* Fill + outline. */
:is(.work-item, .suggested-project-item, .exploration-container)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(var(--pc-line), var(--pc-line)), linear-gradient(var(--pc-line), var(--pc-line)), linear-gradient(var(--pc-line), var(--pc-line)), linear-gradient(var(--pc-line), var(--pc-line)), linear-gradient(var(--pc-line), var(--pc-line)), linear-gradient(var(--pc-line), var(--pc-line)), linear-gradient(var(--pc-line), var(--pc-line)), linear-gradient(var(--pc-line), var(--pc-line)), linear-gradient(var(--pc-line), var(--pc-line)), linear-gradient(var(--pc-line), var(--pc-line)), linear-gradient(var(--pc-line), var(--pc-line)), linear-gradient(var(--pc-line), var(--pc-line)), linear-gradient(var(--pc-line), var(--pc-line)), linear-gradient(var(--pc-line), var(--pc-line)), linear-gradient(var(--pc-line), var(--pc-line)), linear-gradient(var(--pc-line), var(--pc-line)), linear-gradient(var(--pc-fill), var(--pc-fill));
  background-position: left 5px top 0, left 5px bottom 0, left 0 top 5px, right 0 top 5px, left 3px top 1px, left 2px top 2px, left 1px top 3px, left 3px bottom 1px, left 2px bottom 2px, left 1px bottom 3px, right 3px top 1px, right 2px top 2px, right 1px top 3px, right 3px bottom 1px, right 2px bottom 2px, right 1px bottom 3px, 0 0;
  background-size: calc(100% - 10px) 1px, calc(100% - 10px) 1px, 1px calc(100% - 10px), 1px calc(100% - 10px), 2px 1px, 1px 1px, 1px 2px, 2px 1px, 1px 1px, 1px 2px, 2px 1px, 1px 1px, 1px 2px, 2px 1px, 1px 1px, 1px 2px, 100% 100%;
  background-repeat: no-repeat;
  clip-path: polygon(0px 5px, 1px 5px, 1px 3px, 2px 3px, 2px 2px, 3px 2px, 3px 1px, 5px 1px, 5px 0px, calc(100% - 5px) 0px, calc(100% - 5px) 1px, calc(100% - 3px) 1px, calc(100% - 3px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 3px, calc(100% - 1px) 3px, calc(100% - 1px) 5px, 100% 5px, 100% calc(100% - 5px), calc(100% - 1px) calc(100% - 5px), calc(100% - 1px) calc(100% - 3px), calc(100% - 2px) calc(100% - 3px), calc(100% - 2px) calc(100% - 2px), calc(100% - 3px) calc(100% - 2px), calc(100% - 3px) calc(100% - 1px), calc(100% - 5px) calc(100% - 1px), calc(100% - 5px) 100%, 5px 100%, 5px calc(100% - 1px), 3px calc(100% - 1px), 3px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 3px), 1px calc(100% - 3px), 1px calc(100% - 5px), 0px calc(100% - 5px));
  pointer-events: none;
}

/* Media: flush with the outline's inner edge. */
.work-item .project-wrapper-img,
.projects.new > .work-item .project-wrapper-img {
  border-radius: 0;
  clip-path: polygon(1px 5px, 2px 5px, 2px 3px, 3px 3px, 3px 2px, 5px 2px, 5px 1px, calc(100% - 5px) 1px, calc(100% - 5px) 2px, calc(100% - 3px) 2px, calc(100% - 3px) 3px, calc(100% - 2px) 3px, calc(100% - 2px) 5px, calc(100% - 1px) 5px, calc(100% - 1px) calc(100% - 5px), calc(100% - 2px) calc(100% - 5px), calc(100% - 2px) calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) calc(100% - 2px), calc(100% - 5px) calc(100% - 2px), calc(100% - 5px) calc(100% - 1px), 5px calc(100% - 1px), 5px calc(100% - 2px), 3px calc(100% - 2px), 3px calc(100% - 3px), 2px calc(100% - 3px), 2px calc(100% - 5px), 1px calc(100% - 5px));
}
.suggested-project-item .suggested-project-image,
.suggested-projects .suggested-project-image,
.exploration-container .project-image-wrapper {
  border-radius: 0;
  clip-path: polygon(0px 5px, 1px 5px, 1px 3px, 2px 3px, 2px 2px, 3px 2px, 3px 1px, 5px 1px, 5px 0px, calc(100% - 5px) 0px, calc(100% - 5px) 1px, calc(100% - 3px) 1px, calc(100% - 3px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 3px, calc(100% - 1px) 3px, calc(100% - 1px) 5px, 100% 5px, 100% calc(100% - 5px), calc(100% - 1px) calc(100% - 5px), calc(100% - 1px) calc(100% - 3px), calc(100% - 2px) calc(100% - 3px), calc(100% - 2px) calc(100% - 2px), calc(100% - 3px) calc(100% - 2px), calc(100% - 3px) calc(100% - 1px), calc(100% - 5px) calc(100% - 1px), calc(100% - 5px) 100%, 5px 100%, 5px calc(100% - 1px), 3px calc(100% - 1px), 3px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 3px), 1px calc(100% - 3px), 1px calc(100% - 5px), 0px calc(100% - 5px));
}
.work-item .work-image {
  border-radius: 0;
}

/* No zoom on the image: scaling resamples the pixels. */
.projects.new > .work-item:hover .work-image,
.work-item:hover .work-image,
.work-item:focus-visible .work-image {
  transform: none;
  scale: 1;
}

/* Overlay text steps in. */
.card-overlay {
  transition: opacity 160ms steps(4, end), transform 160ms steps(4, end);
}

/* "More projects" cards on case pages. */
.suggested-project-item,
.suggested-projects .suggested-project-item {
  border-radius: 0;
  background-color: transparent;
  border: 0 none; /* case-pixel.css gave it a 1px border */
}

/* Hover (mouse only). */
@media (hover: hover) and (pointer: fine) {
  .work-item:hover,
  .suggested-project-item:hover,
  .suggested-projects .suggested-project-item:hover,
  .exploration-container:hover {
    --pc-lift: 2px;
    --pc-base: 4px;
    --pc-line: var(--pc-line-on);
    box-shadow: none;
    scale: 1;
    border-color: transparent;
    /* 4 frames of 40ms: -1px (anticipation), 1px, 3px (overshoot), 2px (settle) */
    transition:
      --pc-lift 160ms linear(0, 0 0%, -0.5 0%, -0.5 25%, 0.5 25%, 0.5 50%, 1.5 50%, 1.5 75%, 1 75%, 1),
      --pc-base 80ms steps(2, end),
      --pc-line 80ms steps(2, end) 40ms,
      --pc-press 120ms linear(0, 0 0%, 1.1667 0%, 1.1667 33.3%, 1 33.3%, 1),
      opacity 80ms steps(2, end),
      filter 80ms steps(2, end);
  }

  /* Media steps in by 1px, leaving a 1px mat of the card colour. */
  .work-item:hover .project-wrapper-img,
  .projects.new > .work-item:hover .project-wrapper-img {
    clip-path: polygon(2px 5px, 3px 5px, 3px 3px, 5px 3px, 5px 2px, calc(100% - 5px) 2px, calc(100% - 5px) 3px, calc(100% - 3px) 3px, calc(100% - 3px) 5px, calc(100% - 2px) 5px, calc(100% - 2px) calc(100% - 5px), calc(100% - 3px) calc(100% - 5px), calc(100% - 3px) calc(100% - 3px), calc(100% - 5px) calc(100% - 3px), calc(100% - 5px) calc(100% - 2px), 5px calc(100% - 2px), 5px calc(100% - 3px), 3px calc(100% - 3px), 3px calc(100% - 5px), 2px calc(100% - 5px));
  }

  .suggested-project-item:hover,
  .suggested-projects .suggested-project-item:hover {
    --pc-fill: var(--color--background-2);
    background-color: transparent;
  }
}

/* Press (mouse and touch): instant drop onto the shadow, held while pressed. */
.work-item:active,
.suggested-project-item:active,
.suggested-projects .suggested-project-item:active,
.exploration-container:active {
  --pc-press: 1;
  --pc-base: 4px;
  --pc-line: var(--pc-line-on);
  scale: 1;
  box-shadow: none;
  transition: --pc-lift 0s, --pc-base 0s, --pc-line 0s, --pc-press 0s, opacity 0s, filter 0s;
}

/* Keyboard focus: the toggle's corner brackets, 6px outside the card. */
:is(.work-item, .suggested-project-item, .exploration-container):focus-visible {
  --pc-line: var(--pc-line-on);
  box-shadow: none;
  border-image: var(--pc-brackets) 10 / 10px / 6px;
}



/* Spotlight: while one card in a list is hovered or keyboard-focused, the others
   step down in 2 frames (40ms each) to 62% with a little colour taken out, so the
   maroon, blue, white and black cards all fall back evenly. Mouse only for hover. */
@media (hover: hover) and (pointer: fine) {
  .projects.new:has(> .work-item:hover) > .work-item:not(:hover),
  .suggested-wrapper:has(> .suggested-project-item:hover) > .suggested-project-item:not(:hover) {
    --pc-vis: var(--pc-dim-o);
    opacity: var(--pc-dim-o);
    filter: var(--pc-dim-f);
    transition:
      --pc-lift 80ms steps(2, end),
      --pc-base 80ms steps(2, end),
      --pc-line 80ms steps(2, end),
      --pc-press 120ms linear(0, 0 0%, 1.1667 0%, 1.1667 33.3%, 1 33.3%, 1),
      opacity 80ms steps(2, end),
      filter 80ms steps(2, end);
  }
}

.projects.new:has(> .work-item:focus-visible) > .work-item:not(:focus-visible),
.suggested-wrapper:has(> .suggested-project-item:focus-visible) > .suggested-project-item:not(:focus-visible) {
  --pc-vis: var(--pc-dim-o);
  opacity: var(--pc-dim-o);
  filter: var(--pc-dim-f);
  transition: opacity 80ms steps(2, end), filter 80ms steps(2, end);
}

/* Opacity alone dims unevenly: the white KYC card barely moves on ecru while the
   black bunq card turns grey (and the reverse in dark mode). So the dim first
   squeezes contrast toward the page tone, then fades a little: every card, light
   or dark, lands in the same narrow band. */
.projects.new,
.suggested-wrapper {
  --pc-dim-o: 0.82;
  --pc-dim-f: saturate(0.45) contrast(0.6) brightness(1.2);
}
html.dark-mode :is(.projects.new, .suggested-wrapper) {
  --pc-dim-o: 0.82;
  --pc-dim-f: saturate(0.45) contrast(0.6) brightness(0.7);
}

@media (prefers-reduced-motion: reduce) {
  .work-item,
  .suggested-project-item,
  .exploration-container,
  .work-item:hover,
  .suggested-project-item:hover,
  .exploration-container:hover,
  .card-overlay {
    transition: none !important;
  }
}

/* ===== Phone and tablet (up to 991px) ====================================
   Below the desktop grid, Webflow's old side-by-side card layout was still in
   play: negative margins pushed the image out of the pixel frame, a 40%-wide
   media column left a pale strip, and the hover overlay (absolute, masked to its
   bottom 40%) clipped the title and description over the phone mockup. Here each
   card is a plain stack (also on touch tablets up to 1366px, e.g. iPad landscape,
   where there is no hover to reveal the overlay): image, then title, then description, all in flow. */
@media (max-width: 991px), (hover: none) and (max-width: 1366px) {
  .projects.new {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
  }
  .projects.new > .section-title { grid-column: 1 / -1; }

  /* Webflow's scroll-in interaction only runs at desktop breakpoints, so on
     phones and tablets the cards after the first were left at their inline
     start state (opacity 0, 50px down) and never appeared. Show them outright;
     the spotlight dim still works through --pc-vis. */
  .projects.new > .work-item {
    opacity: var(--pc-vis, 1) !important;
    transform: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  /* Cards in a row share a height; the caption band fills the rest. */
  .projects.new > .work-item:not(.hidden, .housinganywhere) { display: flex; flex-direction: column; }
  .projects.new > .work-item .work-item-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    position: relative;
  }
  .projects.new > .work-item .project-wrapper-img {
    display: flex;
    flex-direction: column;
    position: relative;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
    margin: 0;
    background: none;
    overflow: hidden;
  }
  .projects.new > .work-item .work-image.desktop { display: none; }
  .projects.new > .work-item .work-image:not(.desktop) {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    /* Show the whole asset: a 5:4 plate (the docviewer gif's own ratio) with
       contain, so squarer or wider assets sit on the card's brand colour
       instead of being cropped. Every card in a row keeps the same height. */
    aspect-ratio: 5 / 4;
    object-fit: contain;
    object-position: 50% 50%;
    border-radius: 0;
    transform: none;
    scale: 1;
  }
  .projects.new .pixel-morph { display: none; }

  /* The overlay becomes the card's caption band, always visible. */
  .projects.new > .work-item .card-overlay,
  .projects.new > .work-item:hover .card-overlay {
    position: static;
    inset: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    justify-content: flex-start;
    padding: 16px 16px 20px;
    background: var(--color--background);
    border-top: 1px solid var(--pc-line);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    -webkit-mask-image: none;
    mask-image: none;
    opacity: 1 !important;
    transform: none !important;
    transition: none;
    pointer-events: none;
  }
  .projects.new > .work-item .card-overlay .project-title-item {
    margin: 0;
    color: var(--color--text);
    text-shadow: none;
    font-size: 24px;
    line-height: 1.1;
    text-wrap: balance;
  }
  .projects.new > .work-item .card-overlay .work-description {
    display: block;
    margin: 0;
    color: var(--color--text-light);
    font-size: 14px;
    line-height: 1.5;
  }

  /* The KYC card is white in both themes: its white logo needs ink. */
  .projects.new > .work-item:not(.studocu, .brxs, .bunq-s, .housinganywhere) .card-overlay-logo {
    filter: brightness(0);
  }

  /* "More projects": the same stack. */
  .suggested-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .suggested-wrapper > .projects-suggestions { grid-column: 1 / -1; margin-bottom: 8px; }
  .suggested-project-item,
  .suggested-projects .suggested-project-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 8px 8px 16px;
  }
  .suggested-project-item .suggested-project-image,
  .suggested-projects .suggested-project-image {
    width: 100%;
    min-width: 0;
    height: auto;
    aspect-ratio: 23 / 9; /* both assets are ~2.56:1, so nothing is cut */
    margin: 0;
    object-fit: contain;
    background: var(--pc-plate, transparent);
  }
  .suggested-project-text-wrapper {
    margin: 16px 8px 0;
  }
  .suggested-project-title {
    font-size: 24px;
    line-height: 1.1;
    text-wrap: balance;
  }
  .suggested-project-description {
    margin: 8px 0 12px;
    font-size: 14px;
    line-height: 1.5;
  }

  /* Text is on the card now, so the cursor tag would only repeat it. */
  .cursor-label-tag { display: none !important; }
}

/* Tablet: two columns, still readable at 768. */
@media (min-width: 768px) and (max-width: 991px), (hover: none) and (min-width: 768px) and (max-width: 1366px) {
  .projects.new {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px 16px;
    padding-left: 40px;
    padding-right: 40px;
  }
  .suggested-wrapper {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px 16px;
  }
}

/* Touch: no hover, no dimming. Cards sit on a 2px stepped shadow, and a tap
   drops the card onto it in 2 frames (1px, then 2px; 40ms). */
@media (hover: none) {
  .work-item,
  .suggested-project-item,
  .exploration-container {
    --pc-base: 2px;
  }
  .work-item:active,
  .suggested-project-item:active,
  .suggested-projects .suggested-project-item:active,
  .exploration-container:active {
    --pc-press: 1;
    --pc-line: var(--pc-line-on);
    transition: --pc-press 80ms steps(2, start), --pc-line 0s;
  }
  .projects.new > .work-item .card-overlay {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===== More projects: the whole asset, never wider than its card ==========
   Both assets are ~2.56:1. The old 200x112 cover box cropped them (the BRXS
   phones lost their sides), so the frame now matches the asset and uses
   contain. The card and everything in it is held to its own width, so no
   inherited min-width, Webflow transform or long title can push the image or
   text past the card edge. */
.suggested-project-item,
.suggested-projects .suggested-project-item {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transform: none;
}
.suggested-project-item > *,
.suggested-projects .suggested-project-item > * {
  min-width: 0;
  max-width: 100%;
}
.suggested-project-item .suggested-project-image,
.suggested-projects .suggested-project-image {
  flex: none;
  width: 256px;
  min-width: 0;
  max-width: 100%;
  height: auto;
  aspect-ratio: 23 / 9;
  object-fit: contain;
  object-position: 50% 50%;
  transform: none;
}
.suggested-project-title,
.suggested-project-description {
  overflow-wrap: break-word;
}
@media (max-width: 991px), (hover: none) and (max-width: 1366px) {
  .suggested-project-item .suggested-project-image,
  .suggested-projects .suggested-project-image {
    width: 100%;
  }
  .suggested-wrapper,
  .suggested-projects .suggested-wrapper {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* ===== Card strip: year bottom left, logo bottom right ====================
   One strip along the bottom of the card, at the caption's own inset: the
   project year on the left, the company's square logo (24px, 3px stepped
   corner) on the right, the same pairing as the desk prints. It shows at rest
   on every breakpoint. Desktop: it sits on the image, and the hover overlay's
   title and description rise above it, so the strip is the overlay's last row.
   Phone and tablet: it is the last row of the caption band, under the text.
   The year is set exactly like the description and starts on its left edge. */
.projects.new > .work-item { --pc-pad: 20px; --pc-strip: 24px; }
.projects.new > .work-item .card-overlay { padding-left: var(--pc-pad); padding-right: var(--pc-pad); }
.projects.new > .work-item .card-meta {
  position: absolute;
  left: var(--pc-pad);
  right: var(--pc-pad);
  bottom: var(--pc-pad);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--pc-strip);
  pointer-events: none;
}
/* Set like the description (same font, size and line height) and flush with
   it: no chip, no inset, so its left edge is the title's left edge. On the
   image at rest it takes the overlay's light text with the title's shadow;
   on the white KYC plate it takes ink. */
.projects.new > .work-item .card-year {
  display: block;
  margin: 0;
  padding: 0;
  background: none;
  clip-path: none;
  color: #f2f1ec;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  font-family: var(--site-font, 'Departure Mono', monospace);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
}
@media (min-width: 992px) and (hover: hover), (min-width: 1367px) {
  .projects.new > .work-item:not(.studocu, .brxs, .bunq-s, .housinganywhere):not(:hover, :focus-visible) .card-year {
    color: var(--swatch--neutral-100, #0b1a2b);
    text-shadow: none;
  }
}
.projects.new > .work-item .card-logo {
  position: static;
  display: block;
  flex: none;
  width: 24px;
  height: 24px;
  pointer-events: none;
  clip-path: polygon(0 3px, 1px 3px, 1px 1px, 3px 1px, 3px 0, calc(100% - 3px) 0, calc(100% - 3px) 1px, calc(100% - 1px) 1px, calc(100% - 1px) 3px, 100% 3px, 100% calc(100% - 3px), calc(100% - 1px) calc(100% - 3px), calc(100% - 1px) calc(100% - 1px), calc(100% - 3px) calc(100% - 1px), calc(100% - 3px) 100%, 3px 100%, 3px calc(100% - 1px), 1px calc(100% - 1px), 1px calc(100% - 3px), 0 calc(100% - 3px));
}
.projects.new > .work-item .card-logo img {
  display: block;
  width: 24px;
  height: 24px;
  max-width: none;
  object-fit: cover;
  border-radius: 0;
  filter: none;
}
/* The old wordmark label (HousingAnywhere) sat top left; the strip carries the logo now. */
.projects.new > .work-item .card-overlay .company-name-work { display: none; }

/* Desktop hover overlay: lift the title and description clear of the strip,
   and grow the blur band by the same amount so they stay inside it. */
@media (min-width: 992px) and (hover: hover), (min-width: 1367px) {
  .projects.new > .work-item .card-overlay,
  .projects.new > .work-item:hover .card-overlay {
    padding-bottom: calc(var(--pc-pad) + var(--pc-strip) + 12px);
    background: linear-gradient(to top, rgba(11, 13, 20, 0.7) 0%, rgba(11, 13, 20, 0.6) calc(25% + 36px), rgba(11, 13, 20, 0) calc(40% + 36px));
    -webkit-mask-image: linear-gradient(to top, rgb(0, 0, 0) calc(35% + 36px), transparent calc(40% + 36px));
    mask-image: linear-gradient(to top, rgb(0, 0, 0) calc(35% + 36px), transparent calc(40% + 36px));
  }
}

@media (max-width: 991px), (hover: none) and (max-width: 1366px) {
  .projects.new > .work-item { --pc-pad: 16px; }
  .projects.new > .work-item .card-overlay,
  .projects.new > .work-item:hover .card-overlay {
    padding-left: var(--pc-pad);
    padding-right: var(--pc-pad);
    padding-bottom: 12px;
  }
  /* In the caption band: after the text, on the band's own colour. */
  .projects.new > .work-item .card-meta {
    position: static;
    order: 2;
    flex: none;
    box-sizing: content-box;
    padding: 0 var(--pc-pad) 20px;
    background: var(--color--background);
  }
  .projects.new > .work-item .card-overlay { order: 1; }
  .projects.new > .work-item .card-year {
    color: var(--color--text-light);
    text-shadow: none;
  }
}

/* ===== Nested corners: inner step = outer step - inset ======================
   The card corner is the 5px staircase (rows 5,3,2,1,1 on the 1px grid). The
   More projects image sits 8px (phone/tablet), 12px (case pages) or 16px
   (listing pages) inside it, and was clipped with the same 5px staircase, so
   the ecru band swelled at the corner. Every one of those insets is >= 5px,
   so the concentric inner corner is the smallest step there is: one 1px
   notch. (The home media is flush with the 1px outline, so its corner is the
   card staircase eroded by exactly 1px, which is already concentric.) */
.suggested-project-item .suggested-project-image,
.suggested-projects .suggested-project-image,
.suggested-project-item > .asset-dither {
  border-radius: 0;
  clip-path: polygon(0 1px, 1px 1px, 1px 0, calc(100% - 1px) 0, calc(100% - 1px) 1px, 100% 1px, 100% calc(100% - 1px), calc(100% - 1px) calc(100% - 1px), calc(100% - 1px) 100%, 1px 100%, 1px calc(100% - 1px), 0 calc(100% - 1px));
}

/* ===== Strip under the reveal ===============================================
   The desktop fan's dither print (canvas.pixel-morph, work-bouquet.js) is drawn
   inside .project-wrapper-img. The year and logo strip sits at 3, over the
   image and the hover overlay (2, whose backdrop blur would smear it), the
   print at 4: the pixels cover the strip and the caption, and both emerge with
   the image, also when scrolling back up and the print returns. The lock veil
   on the Studocu card (5) still covers everything. */
.projects.new > .work-item .card-meta { z-index: 3; }
.projects.new .pixel-morph { z-index: 4; }

/* ===== More projects, desktop: image as tall as the text ====================
   The 23:9 frame was shorter than the text column and centred, so its edges
   sat between the title and the logo row. On desktop the image now fills the
   row: top on the title's cap height, bottom on the logo row, cropped with
   cover from the centre. contain: size takes the bitmap out of the row height,
   so the text alone sets it. Tablet and phone keep the stacked 23:9 frame. */
@media (min-width: 992px) and (hover: hover), (min-width: 1367px) {
  .suggested-project-item,
  .suggested-projects .suggested-project-item {
    align-items: stretch;
  }
  .suggested-project-item .suggested-project-image,
  .suggested-projects .suggested-project-image {
    align-self: stretch;
    width: 256px;
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    contain: size;
    object-fit: cover;
    object-position: 50% 50%;
  }
  .suggested-project-text-wrapper {
    align-self: stretch;
  }
  /* Trim the half-leading above the first line, so the cap height and the
     image top share one edge. */
  .suggested-project-title {
    font-size: 28px; /* NeueBit caps are half the size: 14px caps over the description's 11px */
    line-height: 1.2;
    text-wrap: balance;
    text-box: trim-start cap alphabetic;
  }
}
@media (max-width: 991px), (hover: none) and (max-width: 1366px) {
  .suggested-project-item .suggested-project-image,
  .suggested-projects .suggested-project-image {
    object-fit: cover;
    object-position: 50% 50%;
  }
}

/* ===== More projects: year left, logo right ================================
   The company row under the description follows the project cards: the
   project year on the left, the company name and its logo on the right. */
.suggested-project-item .project-item-company {
  justify-content: flex-start;
}
.suggested-project-item .project-year {
  margin: 0 auto 0 0;
  padding: 0;
  color: var(--color--text-light);
  font-family: var(--site-font, 'Departure Mono', monospace);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px; /* the description's, desktop */
}
@media (max-width: 991px), (hover: none) and (max-width: 1366px) {
  .suggested-project-item .project-year { line-height: 1.5; } /* the description's, phone and tablet */
}
.suggested-project-item .project-item-company .company-logo-project { order: 2; }
