/* Instagram previews remain separate links from the project websites. */
.project-showcase {
  position: relative;
  isolation: isolate;
  min-width: 0;
}

.project-phone {
  --phone-tilt: 7deg;
  position: absolute;
  z-index: 20;
  right: 13px;
  bottom: -32px;
  display: block;
  width: 154px;
  border-radius: 25px;
  color: var(--cream);
  transform: rotate(var(--phone-tilt));
  transform-origin: 50% 70%;
  filter: drop-shadow(0 14px 13px #0007);
  transition: transform .2s ease, filter .2s ease;
  touch-action: manipulation;
}

.phone-chili { --phone-tilt: -7deg; right: 19px; }
.phone-mixe { --phone-tilt: 7deg; }

.phone-device {
  position: relative;
  display: block;
  padding: 5px;
  background: #10111a;
  border: 2px solid #b9b9c7;
  border-radius: 25px;
  box-shadow: inset 0 0 0 1px #ffffff3b, 3px 3px 0 #060815;
}

.phone-device::before,
.phone-device::after {
  content: '';
  position: absolute;
  width: 3px;
  background: #92939d;
  border-radius: 2px;
}

.phone-device::before { left: -4px; top: 64px; height: 27px; }
.phone-device::after { right: -4px; top: 82px; height: 36px; }

.phone-screen {
  display: block;
  aspect-ratio: 691 / 1536;
  overflow: hidden;
  background: #0b0e13;
  border-radius: 18px;
}

.phone-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-phone:focus-visible {
  z-index: 22;
  outline: 3px solid var(--cream);
  outline-offset: 7px;
  transform: translateY(-6px) rotate(calc(var(--phone-tilt) - 2deg));
}

@media (hover: hover) and (pointer: fine) {
  .project-phone:hover {
    z-index: 22;
    transform: translateY(-6px) rotate(calc(var(--phone-tilt) - 2deg));
    filter: drop-shadow(0 20px 17px #0008);
  }
}

.project-phone:active {
  z-index: 22;
  transform: translateY(3px) rotate(var(--phone-tilt));
  filter: drop-shadow(0 6px 8px #0006);
}
.project-showcase-crit .crit-note { right: 173px; top: 12px; font-size: 19px; }
.project-showcase-crit .crit-polaroid { right: 155px; bottom: 35px; width: 135px; height: 98px; }
.project-showcase-chili .chili-polaroid { right: 161px; bottom: 48px; width: 129px; height: 134px; }
.project-showcase-chili .chili-note { right: 188px; top: 146px; font-size: 23px; }
.project-showcase-mixe .mixe-polaroid { right: 167px; bottom: 48px; width: 134px; height: 126px; }
.project-showcase-mixe .mixe-stamp { right: 183px; bottom: 187px; width: 94px; height: 94px; font-size: 6px; }
.project-showcase-mixe .mixe-stamp > b { font-size: 24px; }
.project-showcase-mixe .mixe-note { right: 25px; top: 15px; font-size: 24px; }
.projects-section { padding-top: 53px; }
.project-grid { row-gap: 72px; }
.approach-section { margin-top: 101px; }
.service-list summary { gap: 13px; }

@media (min-width: 1450px) {
  .project-phone { width: 169px; bottom: -34px; right: 16px; }
  .project-showcase-crit .crit-note { right: 193px; font-size: 22px; }
  .project-showcase-crit .crit-polaroid { right: 177px; width: 150px; height: 111px; }
  .project-showcase-chili .chili-polaroid { right: 179px; width: 145px; height: 147px; }
  .project-showcase-chili .chili-note { right: 211px; font-size: 26px; }
  .project-showcase-mixe .mixe-polaroid { right: 185px; width: 150px; height: 138px; }
  .project-showcase-mixe .mixe-stamp { right: 200px; bottom: 210px; }
}

@media (min-width: 851px) and (max-width: 1150px) {
  .project-phone { width: 125px; right: 8px; bottom: -27px; }
  .project-showcase-crit .crit-note { right: 130px; font-size: 17px; }
  .project-showcase-crit .crit-polaroid { right: 126px; width: 105px; height: 88px; bottom: 42px; }
  .project-showcase-chili .chili-polaroid,
  .project-showcase-mixe .mixe-polaroid { right: 125px; width: 104px; height: 105px; }
  .project-showcase-chili .chili-note { right: 130px; font-size: 20px; }
  .project-showcase-mixe .mixe-stamp { display: none; }
  .project-showcase-mixe .mixe-note { font-size: 20px; right: 15px; }
  .service-list summary { font-size: 23px; }
}

@media (max-width: 850px) {
  .project-phone { width: 161px; right: 18px; bottom: -32px; }
  .project-showcase-crit .crit-note { right: 186px; font-size: 22px; }
  .project-showcase-crit .crit-polaroid { right: 169px; width: 144px; height: 107px; }
  .project-showcase-chili .chili-polaroid,
  .project-showcase-mixe .mixe-polaroid { right: 170px; width: 140px; height: 136px; }
  .project-showcase-chili .chili-note { right: 188px; font-size: 25px; }
  .project-showcase-mixe .mixe-stamp { right: 190px; bottom: 200px; }
  .projects-section { padding-top: 61px; }
  .project-grid { gap: 76px; }
  .approach-section { margin-top: 90px; }
}

@media (max-width: 560px) {
  .hero h1 { font-size: clamp(72px, 22vw, 118px); }
  .hero-note { font-size: 23px; }
  .hero-baseline { gap: 6px; letter-spacing: .8px; }
  .header-caption { font-size: 7px; }
  .project-phone { width: 118px; right: 10px; bottom: -33px; }
  .phone-device { border-radius: 21px; padding: 4px; }
  .phone-screen { border-radius: 15px; }
  .project-showcase-crit .crit-note { right: 8px; top: 12px; font-size: 17px; }
  .project-showcase-crit .crit-polaroid,
  .project-showcase-crit .crit-logo-sticker,
  .project-showcase-chili .chili-polaroid,
  .project-showcase-mixe .mixe-polaroid,
  .project-showcase-mixe .mixe-stamp { display: none; }
  .project-showcase-chili .chili-note { right: 11px; top: 82px; font-size: 20px; }
  .project-showcase-mixe .mixe-note { right: 12px; top: 16px; font-size: 20px; }
  .chili-card h2 > span { font-size: 20px; max-width: 183px; }
  .crit-card .project-description { max-width: 158px; }
  .chili-card .project-role,
  .mixe-card .project-role { font-size: 8px; }
  .section-rule { align-items: flex-end; }
  .section-rule h2 { max-width: 60%; line-height: 1.6; }
  .section-rule > span { font-size: 5px; letter-spacing: .2px; }
  .projects-section { padding-top: 67px; }
  .project-grid { gap: 79px; }
  .approach-section { margin-top: 89px; }
  .service-list summary { font-size: 23px; gap: 9px; }
  .service-list summary .dot { margin-right: 3px; }
  .service-number { width: 14px; }
  .next-chapter-right > .handwritten { max-width: 175px; font-size: 22px; }
  .projects-page-heading h1 { font-size: clamp(62px, 20vw, 110px); }
  .gallery-coming-soon > .eyebrow { line-height: 1.8; }
}

@media (max-width: 360px) {
  .hero h1 { font-size: 22vw; }
  .project-phone { width: 106px; right: 7px; bottom: -30px; }
  .project-showcase-crit .crit-note { font-size: 15px; }
  .service-list summary { font-size: 21px; }
  .chili-card h2 > span { font-size: 18px; }
  .chili-card .project-description { max-width: 137px; }
}

@media (prefers-reduced-motion: reduce) {
  .project-phone { transition: none; }
  .project-phone:hover,
  .project-phone:active,
  .project-phone:focus-visible { transform: rotate(var(--phone-tilt)); }
}

/* Project photographs sit above the paper cards, with room for each story. */
.project-showcase .project-card { height: 480px; }
.project-showcase .card-copy { padding: 22px 26px; max-width: 56%; height: auto; }
.project-showcase .card-copy h2 { margin-top: 0; font-weight: 900; }
.project-showcase .crit-card h2 { font-weight: 700; -webkit-text-stroke: .5px currentColor; }
.project-showcase .chili-card h2 { font-weight: 700; }
.project-showcase .project-role { margin: 14px 0 8px; font-weight: 700; -webkit-text-stroke: .2px currentColor; }
.project-showcase .project-description { font-weight: 700; }
.project-showcase .handwritten { font-weight: 600; }
.project-showcase .mixe-card h2 { font-size: 50px; margin-bottom: 0; }
.project-showcase .mixe-card h2 > span { font-size: 92px; }
.project-showcase .mixe-star { left: 175px; top: 18px; width: 29px; height: 29px; }
.project-showcase .chili-card h2 { font-size: 57px; }
.project-showcase .chili-card h2 > span { font-size: 22px; }
.project-showcase .chili-card .project-role { margin-top: 16px; }
.project-showcase .chili-logo-sticker { width: 75px; right: 24px; top: 22px; }
.project-showcase .crit-card .card-copy { background: none; max-width: 51%; }
.crit-card::before {
  content: '';
  position: absolute;
  z-index: 3;
  inset: 0 47% 0 0;
  pointer-events: none;
  background: linear-gradient(90deg, #faf5eefa 0%, #faf5eef2 72%, #faf5ee00 100%);
}
.project-showcase .phone-crit { width: 142px; right: 8px; }

@media (min-width: 561px) {
  .project-showcase-crit .crit-main-photo { top: 70px; bottom: auto; }
}

.project-snapshots {
  position: absolute;
  z-index: 11;
  bottom: -25px;
  left: 21px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
.project-snapshot {
  --snapshot-angle: -7deg;
  --snapshot-lift: 0px;
  display: block;
  width: 190px;
  padding: 5px 5px 11px;
  background: #fff8ee;
  border-radius: 2px;
  box-shadow: 0 7px 15px #0004;
  transform: translateY(var(--snapshot-lift)) rotate(var(--snapshot-angle));
  transform-origin: 50% 65%;
  transition: transform .22s ease, box-shadow .22s ease;
  pointer-events: auto;
  touch-action: manipulation;
}
.project-snapshot img { display: block; width: 100%; height: auto; }
.snapshot-2 { --snapshot-angle: 6deg; --snapshot-lift: -12px; }
.project-snapshot:focus-visible { outline: 3px solid var(--pink); outline-offset: 5px; }
@media (hover: hover) and (pointer: fine) {
  .project-snapshot:hover {
    z-index: 11;
    transform: translateY(calc(var(--snapshot-lift) - 7px)) rotate(calc(var(--snapshot-angle) - 2deg));
    box-shadow: 0 15px 23px #0005;
  }
}
.project-snapshot:active {
  transform: translateY(calc(var(--snapshot-lift) + 3px)) rotate(var(--snapshot-angle));
  box-shadow: 0 4px 8px #0004;
}

@media (min-width: 1450px) {
  .project-showcase .project-card { height: 510px; }
  .project-showcase .card-copy { padding: 25px 31px; }
  .project-showcase .mixe-card h2 { font-size: 55px; }
  .project-showcase .mixe-card h2 > span { font-size: 101px; }
  .project-showcase .chili-card h2 { font-size: 65px; }
  .project-showcase .chili-card h2 > span { font-size: 24px; }
  .project-snapshots { left: 28px; }
  .project-snapshot { width: 208px; }
  .project-showcase .phone-crit { width: 160px; }
}

@media (min-width: 851px) and (max-width: 1150px) {
  .project-showcase .card-copy { padding: 21px; max-width: 60%; }
  .project-showcase .mixe-card h2 { font-size: 44px; }
  .project-showcase .mixe-card h2 > span { font-size: 82px; }
  .project-showcase .mixe-star { left: 156px; width: 24px; height: 24px; }
  .project-showcase .chili-card h2 { font-size: 49px; }
  .project-showcase .chili-card h2 > span { font-size: 20px; }
  .project-snapshots { left: 17px; gap: 6px; }
  .project-snapshot { width: 168px; }
  .project-showcase .phone-crit { width: 120px; right: 9px; }
}

@media (max-width: 850px) {
  .project-showcase .card-copy { padding: 24px 25px; }
  .project-showcase .mixe-card h2 { font-size: 54px; }
  .project-showcase .mixe-card h2 > span { font-size: 96px; }
  .project-showcase .mixe-star { left: 185px; }
  .project-showcase .chili-card h2 { font-size: 57px; }
  .project-showcase .chili-card h2 > span { font-size: 22px; }
  .project-snapshot { width: 190px; }
  .project-showcase .phone-crit { width: 150px; right: 12px; }
}

@media (max-width: 560px) {
  .project-showcase .project-card { height: 440px; }
  .project-showcase .card-copy { padding: 19px 17px; max-width: 65%; }
  .project-showcase .mixe-card .card-copy { max-width: 64%; }
  .project-showcase .crit-card .card-copy { max-width: 62%; }
  .project-showcase .mixe-card h2 { font-size: 44px; }
  .project-showcase .mixe-card h2 > span { font-size: 82px; }
  .project-showcase .mixe-star { left: 151px; top: 18px; width: 25px; height: 25px; }
  .project-showcase .chili-card h2 { font-size: 48px; }
  .project-showcase .chili-card h2 > span { font-size: 20px; }
  .project-showcase .project-role { margin-top: 13px; font-size: 8px; }
  .project-showcase .project-description { max-width: 158px; }
  .project-showcase .chili-logo-sticker { right: 16px; top: 19px; width: 63px; }
  .project-showcase .project-phone { width: clamp(92px, 27vw, 118px); right: 10px; bottom: -30px; }
  .project-snapshots { bottom: -25px; left: 13px; gap: 0; }
  .project-snapshot { width: clamp(106px, 32vw, 154px); padding: 4px 4px 9px; }
  .snapshot-2 { --snapshot-lift: -44px; margin-left: -12px; }
  .project-showcase-crit .snapshot-2 { --snapshot-lift: -104px; }
}

@media (max-width: 360px) {
  .project-showcase .mixe-card h2 { font-size: 39px; }
  .project-showcase .mixe-card h2 > span { font-size: 75px; }
  .project-showcase .mixe-star { left: 135px; width: 22px; }
  .project-showcase .chili-card h2 { font-size: 44px; }
  .project-showcase .chili-card h2 > span { font-size: 18px; }
  .project-showcase .project-description { max-width: 142px; }
  .project-showcase .project-phone { right: 8px; }
  .project-snapshots { left: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .project-snapshot { transition: none; }
  .project-snapshot:hover,
  .project-snapshot:active {
    transform: translateY(var(--snapshot-lift)) rotate(var(--snapshot-angle));
  }
}
