.projects-page { background: var(--black); }
.projects-page .desktop-nav a[aria-current="page"]::after { transform: scaleX(1); }

.project-hero {
  min-height: 710px;
  display: grid;
  grid-template-columns: 47% 53%;
  color: var(--white);
  background: var(--black);
}
.project-hero__copy { position: relative; z-index: 2; display: flex; align-items: center; }
.project-hero__copy-inner { width: min(650px, calc(100% - 72px)); margin-left: max(36px, calc((100vw - 1392px) / 2)); padding: 90px 0; }
.project-hero h1 { max-width: 690px; margin-bottom: 30px; font-size: clamp(54px, 5.45vw, 88px); line-height: .96; letter-spacing: -.058em; font-weight: 580; }
.project-hero p { max-width: 570px; margin-bottom: 34px; color: #bdc9d7; font-size: 19px; line-height: 1.55; }
.project-hero__media { position: relative; min-width: 0; margin: 0; overflow: hidden; background: #0a1828; }
.project-hero__media::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, var(--black), transparent 23%), linear-gradient(180deg, transparent 64%, rgb(1 6 12 / 55%)); pointer-events: none; }
.project-hero__media > img { width: 100%; height: 100%; object-fit: cover; object-position: 52% center; }

.photo-watermark { position: absolute; right: 22px; bottom: 18px; z-index: 2; width: clamp(145px, 17vw, 230px); padding: 8px 11px; background: rgb(0 8 18 / 46%); border: 1px solid rgb(255 255 255 / 18%); border-radius: 4px; backdrop-filter: blur(5px); pointer-events: none; }
.photo-watermark img { width: 100%; height: auto; }

.project-index { position: relative; z-index: 4; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: -50px; color: var(--white); background: #07182b; box-shadow: 0 28px 75px rgb(0 0 0 / 35%); }
.project-index a { min-height: 150px; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 18px; align-content: center; padding: 30px 32px; border-right: 1px solid #2b4057; transition: background 180ms ease; }
.project-index a:last-child { border-right: 0; }
.project-index a:hover { background: #0d2a49; }
.project-index span { grid-row: 1 / 3; align-self: start; margin-top: 3px; color: var(--blue-bright); font-size: 11px; font-weight: 750; letter-spacing: .12em; }
.project-index strong { font-size: 16px; line-height: 1.3; }
.project-index small { margin-top: 6px; color: #9dafc1; font-size: 12px; line-height: 1.4; }
.project-index b { grid-column: 3; grid-row: 1 / 3; align-self: center; color: var(--blue-bright); font-size: 20px; font-weight: 450; }

.case-study { scroll-margin-top: 24px; padding: 138px 0 128px; }
.case-study--light { color: var(--ink); background: var(--white); }
.case-study--dark { color: var(--white); background: #03101f; }
.case-header { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 90px; align-items: end; margin-bottom: 56px; }
.case-number, .case-meta { margin-bottom: 17px; color: var(--blue); font-size: 12px; font-weight: 780; letter-spacing: .14em; text-transform: uppercase; }
.case-study--dark .case-number, .case-study--dark .case-meta { color: var(--blue-bright); }
.case-header h2 { max-width: 840px; margin: 0; font-size: clamp(48px, 5vw, 76px); line-height: .99; letter-spacing: -.05em; font-weight: 580; }
.case-summary { max-width: 510px; margin: 0; color: var(--cool-500); font-size: 17px; line-height: 1.64; }
.case-study--dark .case-summary { color: #adbdcc; }

.case-grid { display: grid; gap: 18px; }
.case-grid--cabling { grid-template-columns: repeat(12, 1fr); grid-auto-rows: 240px; }
.case-grid--cabling .project-photo:nth-child(1) { grid-column: 1 / span 7; grid-row: 1 / span 2; }
.case-grid--cabling .project-photo:nth-child(2) { grid-column: 8 / span 5; grid-row: 1 / span 2; }
.case-grid--cabling .project-photo:nth-child(3) { grid-column: 1 / span 4; grid-row: 3 / span 2; }
.case-grid--cabling .project-photo:nth-child(4) { grid-column: 5 / span 4; grid-row: 3 / span 2; }
.case-grid--cabling .project-photo:nth-child(5) { grid-column: 9 / span 4; grid-row: 3 / span 2; }
.case-grid--cabling .project-photo:nth-child(6) { grid-column: 1 / span 7; grid-row: 5 / span 2; }
.case-grid--cabling .project-photo:nth-child(7) { grid-column: 8 / span 5; grid-row: 5 / span 2; }
.case-grid--feature { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); grid-template-rows: repeat(2, 330px); }
.case-grid--feature .project-photo--feature { grid-row: 1 / span 2; }
.case-grid--residential { grid-template-columns: minmax(0, 1.72fr) minmax(300px, .78fr); grid-template-rows: 680px; }

.project-photo { position: relative; min-width: 0; min-height: 0; padding: 0; overflow: hidden; color: var(--white); background: #0b1826; border: 0; cursor: zoom-in; isolation: isolate; }
.project-photo::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 64%, rgb(1 6 12 / 34%)); opacity: .72; transition: opacity 220ms ease; pointer-events: none; }
.project-photo > img:first-child { width: 100%; height: 100%; object-fit: cover; transition: transform 560ms cubic-bezier(.2,.8,.2,1), filter 280ms ease; }
.project-photo:hover > img:first-child, .project-photo:focus-visible > img:first-child { transform: scale(1.035); filter: saturate(1.06) contrast(1.02); }
.project-photo:hover::after, .project-photo:focus-visible::after { opacity: 1; }
.project-photo .photo-watermark { width: clamp(120px, 13vw, 188px); right: 16px; bottom: 14px; }
.photo-expand { position: absolute; top: 16px; right: 16px; z-index: 2; padding: 8px 11px; color: var(--white); background: rgb(0 8 18 / 58%); border: 1px solid rgb(255 255 255 / 20%); border-radius: 4px; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; opacity: 0; transform: translateY(-4px); transition: opacity 180ms ease, transform 180ms ease; }
.project-photo:hover .photo-expand, .project-photo:focus-visible .photo-expand { opacity: 1; transform: none; }

.projects-cta { padding: 100px 0; color: var(--white); background: #061b32; }
.projects-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 50px; }
.projects-cta p { margin-bottom: 15px; color: var(--blue-bright); font-size: 12px; font-weight: 780; letter-spacing: .14em; text-transform: uppercase; }
.projects-cta h2 { max-width: 820px; margin: 0; font-size: clamp(44px, 4.8vw, 70px); line-height: 1; letter-spacing: -.045em; font-weight: 580; }
.projects-cta .button { flex: 0 0 auto; min-width: 190px; }

.lightbox-dialog { width: min(1280px, calc(100% - 48px)); height: min(900px, calc(100dvh - 48px)); padding: 0; color: var(--white); background: #01060c; border: 1px solid #28394b; overflow: hidden; }
.lightbox-dialog::backdrop { background: rgb(0 4 10 / 88%); backdrop-filter: blur(8px); }
.lightbox-dialog figure { width: 100%; height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; margin: 0; }
.lightbox-image { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.lightbox-dialog figcaption { min-height: 58px; display: flex; align-items: center; justify-content: center; padding: 15px 90px; color: #c4cfdb; border-top: 1px solid #263748; font-size: 14px; text-align: center; }
.lightbox-close, .lightbox-nav { position: absolute; z-index: 3; display: grid; place-items: center; color: var(--white); background: rgb(0 10 22 / 74%); border: 1px solid rgb(255 255 255 / 24%); cursor: pointer; backdrop-filter: blur(4px); }
.lightbox-close { top: 18px; right: 18px; width: 46px; height: 46px; border-radius: 50%; }
.lightbox-close svg { width: 21px; height: 21px; }
.lightbox-nav { top: 50%; width: 48px; height: 60px; font-size: 22px; transform: translateY(-50%); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

@media (max-width: 1180px) {
  .project-hero__copy-inner { width: calc(100% - 48px); margin-left: 24px; }
  .case-grid--cabling { grid-auto-rows: 210px; }
  .case-grid--feature { grid-template-rows: repeat(2, 280px); }
  .case-grid--residential { grid-template-rows: 580px; }
}

@media (max-width: 900px) {
  .project-hero { min-height: 0; grid-template-columns: 1fr; }
  .project-hero__copy { min-height: 560px; }
  .project-hero__copy-inner { width: var(--shell); margin-inline: auto; }
  .project-hero__media { height: 580px; }
  .project-hero__media::before { background: linear-gradient(180deg, var(--black), transparent 18%, transparent 72%, rgb(1 6 12 / 55%)); }
  .project-index { width: 100%; margin-top: 0; }
  .project-index a { min-height: 132px; padding: 25px 20px; }
  .case-study { padding: 100px 0 94px; }
  .case-header { grid-template-columns: 1fr; gap: 28px; }
  .case-grid--cabling { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 330px; }
  .case-grid--cabling .project-photo { grid-column: auto !important; grid-row: auto !important; }
  .case-grid--cabling .project-photo:nth-child(1), .case-grid--cabling .project-photo:nth-child(6) { grid-column: span 2 !important; }
  .case-grid--cabling .project-photo:nth-child(7) { grid-column: span 2 !important; min-height: 520px; }
  .case-grid--feature { grid-template-columns: 1.4fr 1fr; grid-template-rows: repeat(2, 300px); }
  .case-grid--residential { grid-template-columns: 1.45fr 1fr; grid-template-rows: 560px; }
  .projects-cta__inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 580px) {
  .project-hero__copy { min-height: 490px; }
  .project-hero h1 { font-size: 51px; }
  .project-hero p { font-size: 17px; }
  .project-hero__media { height: 390px; }
  .photo-watermark { right: 12px; bottom: 12px; width: 150px; }
  .project-index { grid-template-columns: 1fr; }
  .project-index a { min-height: 105px; border-right: 0; border-bottom: 1px solid #2b4057; }
  .project-index a:last-child { border-bottom: 0; }
  .case-study { padding: 78px 0 72px; }
  .case-header { margin-bottom: 35px; }
  .case-header h2 { font-size: 43px; }
  .case-summary { font-size: 15px; }
  .case-grid, .case-grid--cabling, .case-grid--feature, .case-grid--residential { display: grid; grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: 310px; gap: 12px; }
  .case-grid .project-photo, .case-grid--cabling .project-photo, .case-grid--feature .project-photo, .case-grid--residential .project-photo { grid-column: auto !important; grid-row: auto !important; min-height: 0 !important; }
  .case-grid--cabling .project-photo:nth-child(1), .case-grid--cabling .project-photo:nth-child(6), .case-grid--cabling .project-photo:nth-child(7) { grid-column: auto !important; }
  .case-grid .project-photo--portrait { grid-row: span 2 !important; }
  .project-photo .photo-watermark { width: 142px; }
  .photo-expand { opacity: 1; transform: none; }
  .projects-cta { padding: 78px 0; }
  .projects-cta h2 { font-size: 44px; }
  .lightbox-dialog { width: calc(100% - 20px); height: calc(100dvh - 20px); }
  .lightbox-dialog figcaption { padding-inline: 58px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .project-photo > img:first-child { transition: none; }
}
