.project-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  position: relative;
  display: grid;
  min-height: 390px;
  overflow: hidden;
  border-radius: 26px;
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow);
}

.project-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
  transition: opacity 220ms ease, transform 360ms ease;
}

.project-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.08), rgba(17, 17, 17, 0.88));
  content: "";
}

.project-card:hover img {
  opacity: 0.54;
  transform: scale(1.05);
}

.project-card__content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  gap: 14px;
  padding: 28px;
}

.project-card__content span,
.project-meta span,
.project-stage__eyebrow,
.project-cta__eyebrow {
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-card__content h3 {
  margin: 0;
  color: var(--white);
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 900;
  line-height: 1.04;
}

.project-card__content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  line-height: 1.6;
}

.project-card__content strong {
  color: var(--white);
  font-size: 15px;
  font-weight: 900;
}

.project-hero-gallery {
  display: flex;
  gap: 16px;
  margin-top: 42px;
}

.project-hero-gallery img {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  height: clamp(190px, 18vw, 300px);
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.project-hero-gallery img:nth-child(2) {
  transform: none;
}

.project-meta-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: -42px;
}

.project-meta {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.project-meta strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.14;
}

.project-stage {
  display: grid;
  grid-template-columns: minmax(280px, 0.48fr) minmax(0, 1fr);
  gap: 42px;
  align-items: start;
}

.project-stage + .project-stage {
  margin-top: 84px;
}

.project-stage__copy {
  position: sticky;
  top: 130px;
}

.project-stage__copy h2,
.project-compare__copy h2,
.project-cta h2 {
  margin: 14px 0 18px;
  color: var(--ink);
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 900;
  line-height: 1;
}

.project-stage__copy p,
.project-compare__copy p,
.project-cta p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-gallery a {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  background: var(--ink);
  box-shadow: 0 14px 36px rgba(17, 17, 17, 0.12);
}

.project-gallery img {
  width: 100%;
  height: 330px;
  object-fit: cover;
  transition: opacity 200ms ease, transform 300ms ease;
}

.project-gallery a:hover img {
  opacity: 0.82;
  transform: scale(1.04);
}

.project-step-media {
  display: grid;
  gap: 18px;
}

.project-step-media > img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.project-step-media .project-compare__frame {
  aspect-ratio: 16 / 10;
}

.project-compare {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr);
  gap: 44px;
  align-items: center;
}

.project-compare__frame {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-radius: 28px;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.project-compare__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-compare__before {
  position: absolute;
  inset: 0;
  width: var(--comparison-position, 50%);
  overflow: hidden;
}

.project-compare__before img {
  max-width: none;
}

.project-compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--comparison-position, 50%);
  width: 2px;
  background: var(--white);
  transform: translateX(-1px);
}

.project-compare__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 999px;
  background: var(--orange);
  color: var(--white);
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.project-compare__label {
  position: absolute;
  top: 18px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.72);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-compare__label--before {
  left: 18px;
}

.project-compare__label--after {
  right: 18px;
}

.project-compare__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: ew-resize;
  opacity: 0;
}

.project-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: clamp(32px, 5vw, 56px);
  border-radius: 30px;
  background: var(--ink);
  color: var(--white);
}

.project-cta h2 {
  color: var(--white);
}

.dark-band .project-compare__copy h2 {
  color: var(--white);
}

.dark-band .project-compare__copy p:not(.section-kicker) {
  color: rgba(255, 255, 255, 0.76);
}

.project-cta p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.76);
}

.project-contact-section {
  padding-top: 0;
}

.project-contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.45fr 1fr 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 14px 38px rgba(17, 17, 17, 0.1);
}

.project-contact-grid .contact-card {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 112px;
  padding: 24px 28px 24px 84px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.project-contact-grid .contact-card + .contact-card {
  border-left: 1px solid rgba(29, 53, 87, 0.22);
}

.project-contact-grid .contact-card::before {
  position: absolute;
  top: 33%;
  left: 28px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background: rgba(242, 94, 35, 0.14);
  color: var(--orange);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 21px 21px;
  content: "";
  transform: translateY(-50%);
}

.project-contact-grid .contact-card:nth-child(1)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 -960 960 960' width='24' fill='%23f25e23'%3E%3Cpath d='M798-120q-125 0-247-54.5T329-329Q229-429 174.5-551T120-798q0-18 12-30t30-12h162q14 0 25 9.5t14 22.5l26 140q2 16-1 27t-11 19l-97 98q20 37 47.5 71.5T387-386q31 31 65 57.5t72 48.5l94-94q9-9 23.5-13.5T670-390l138 28q14 4 23 14.5t9 23.5v162q0 18-12 30t-30 12Z'/%3E%3C/svg%3E");
}

.project-contact-grid .contact-card:nth-child(2)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 -960 960 960' width='24' fill='%23f25e23'%3E%3Cpath d='M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm320-280L160-640v400h640v-400L480-440Zm0-80 320-200H160l320 200ZM160-640v-80 480-400Z'/%3E%3C/svg%3E");
}

.project-contact-grid .contact-card:nth-child(3)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 -960 960 960' width='24' fill='%23f25e23'%3E%3Cpath d='M480-480q33 0 56.5-23.5T560-560q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 33 23.5 56.5T480-480Zm0 294q122-112 181-203.5T720-552q0-109-69.5-178.5T480-800q-101 0-170.5 69.5T240-552q0 71 59 162.5T480-186Zm0 106Q319-217 239.5-334.5T160-552q0-150 96.5-239T480-880q127 0 223.5 89T800-552q0 100-79.5 217.5T480-80Z'/%3E%3C/svg%3E");
}

.project-contact-grid .contact-card:nth-child(4)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 -960 960 960' width='24' fill='%23f25e23'%3E%3Cpath d='M560-640h80v-120h-80q-83 0-141.5 58.5T360-560v80h-80v120h80v280h120v-280h100l20-120H480v-80q0-33 23.5-56.5T560-640Z'/%3E%3C/svg%3E");
}

.project-contact-grid .contact-card span {
  display: block;
  color: rgba(29, 53, 87, 0.55);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.project-contact-grid .contact-card h3 {
  margin: 6px 0 4px;
  color: var(--ink);
  font-size: clamp(18px, 1.35vw, 24px);
  line-height: 1.1;
}

.project-contact-grid .contact-card a {
  display: block;
  max-width: 100%;
  color: rgba(29, 53, 87, 0.82);
  font-size: clamp(12px, 0.8vw, 14px);
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  word-break: normal;
  overflow-wrap: anywhere;
}

.project-contact-grid .contact-card a:hover {
  color: var(--orange);
}

.project-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  place-items: center;
  padding: 24px;
}

.project-lightbox.is-open {
  display: grid;
}

.project-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.84);
}

.project-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 1100px);
}

.project-lightbox__image {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 18px;
  background: var(--ink);
}

.project-lightbox__caption {
  margin-top: 14px;
  color: var(--white);
  text-align: center;
}

.project-lightbox__close,
.project-lightbox__arrow {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.project-lightbox__close {
  top: -18px;
  right: -18px;
  width: 42px;
  height: 42px;
}

.project-lightbox__arrow {
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
}

.project-lightbox__arrow--previous {
  left: -18px;
}

.project-lightbox__arrow--next {
  right: -18px;
}

body.project-lightbox-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .project-card-grid,
  .project-meta-grid,
  .project-stage,
  .project-compare,
  .project-cta,
  .project-contact-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 360px;
  }

  .project-hero-gallery img:nth-child(2) {
    transform: none;
  }

  .project-meta-grid {
    margin-top: 22px;
  }

  .project-contact-grid .contact-card + .contact-card {
    border-top: 1px solid rgba(29, 53, 87, 0.16);
    border-left: 0;
  }

  .project-stage__copy {
    position: static;
  }
}

@media (max-width: 640px) {
  .project-gallery {
    grid-template-columns: 1fr;
  }

  .project-hero-gallery {
    flex-direction: column;
  }

  .project-gallery img {
    height: 300px;
  }

  .project-cta {
    align-items: stretch;
  }

  .project-lightbox__close {
    top: 8px;
    right: 8px;
  }

  .project-lightbox__arrow--previous {
    left: 8px;
  }

  .project-lightbox__arrow--next {
    right: 8px;
  }
}
