/* PROJECTS PAGE */
#projects-page {
  background: #160504;
  font-family: 'Outfit', sans-serif;
}

#projects-page .pp-hero {
  padding: 180px 60px 80px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

#projects-page .pp-label {
  font-size: 10px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: #C4976A;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

#projects-page .pp-label::before {
  content: '';
  width: 40px;
  height: 1px;
  background: #C4976A;
}

#projects-page .pp-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(60px, 8vw, 110px);
  font-weight: 300;
  line-height: 0.92;
  color: #F5EDE0;
  margin-bottom: 32px;
}

#projects-page .pp-title em {
  font-style: italic;
  color: #C4976A;
}

#projects-page .pp-sub {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.9;
  color: rgba(245,237,224,0.5);
  max-width: 520px;
}

#projects-page .pp-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 60px 160px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

#projects-page .pp-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #230B09;
  cursor: none;
  display: block;
  text-decoration: none;
}

#projects-page .pp-card:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 7;
}

#projects-page .pp-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.9s cubic-bezier(0.25,0.46,0.45,0.94);
}

#projects-page .pp-card:hover .pp-card-img {
  transform: scale(1.05);
}

#projects-page .pp-card-placeholder {
  width: 100%;
  height: 100%;
  background: #230B09;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

#projects-page .pp-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(22,5,4,0.92) 0%,
    rgba(22,5,4,0.2) 50%,
    rgba(22,5,4,0.05) 100%
  );
  transition: background 0.5s ease;
}

#projects-page .pp-card:hover .pp-card-overlay {
  background: linear-gradient(
    to top,
    rgba(22,5,4,0.97) 0%,
    rgba(22,5,4,0.35) 55%,
    rgba(22,5,4,0.1) 100%
  );
}

#projects-page .pp-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px;
  transform: translateY(6px);
  transition: transform 0.5s ease;
}

#projects-page .pp-card:hover .pp-card-info {
  transform: translateY(0);
}

#projects-page .pp-card-num {
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #C4976A;
  margin-bottom: 10px;
}

#projects-page .pp-card-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 300;
  color: #F5EDE0;
  margin-bottom: 10px;
  line-height: 1.1;
}

#projects-page .pp-card:first-child .pp-card-name {
  font-size: 44px;
}

#projects-page .pp-card-location {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: rgba(245,237,224,0.45);
  margin-bottom: 20px;
}

#projects-page .pp-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

#projects-page .pp-tag {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid rgba(196,151,106,0.25);
  color: rgba(245,237,224,0.45);
}

#projects-page .pp-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #C4976A;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.4s ease 0.1s;
}

#projects-page .pp-card-cta::after {
  content: '→';
  transition: transform 0.3s ease;
}

#projects-page .pp-card:hover .pp-card-cta {
  opacity: 1;
  transform: translateY(0);
}

#projects-page .pp-card:hover .pp-card-cta::after {
  transform: translateX(5px);
}

#projects-page .pp-cta {
  text-align: center;
  padding: 120px 60px;
  background: #230B09;
  border-top: 1px solid rgba(196,151,106,0.12);
}

#projects-page .pp-cta-label {
  font-size: 10px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: #C4976A;
  margin-bottom: 24px;
}

#projects-page .pp-cta-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(40px,5vw,72px);
  font-weight: 300;
  line-height: 1;
  color: #F5EDE0;
  margin-bottom: 24px;
}

#projects-page .pp-cta-title em {
  font-style: italic;
  color: #C4976A;
}

#projects-page .pp-cta-sub {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(245,237,224,0.5);
  max-width: 440px;
  margin: 0 auto 44px;
}

#projects-page .pp-btn {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 18px 48px;
  background: #C4976A;
  color: #160504;
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  border: none;
  cursor: none;
  transition: background 0.4s ease;
}

#projects-page .pp-btn:hover {
  background: #A8804A;
}


/* PROJECT DETAIL PAGE */
#project-detail-page {
  background: #160504;
  font-family: 'Outfit', sans-serif;
}

.pdp-back {
  position: fixed;
  top: 100px;
  left: 60px;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245,237,224,0.5);
  cursor: none;
  transition: color 0.3s ease;
  text-decoration: none;
  background: none;
  border: none;
  font-family: 'Outfit', sans-serif;
}

.pdp-back::before {
  content: '←';
  transition: transform 0.3s ease;
}

.pdp-back:hover {
  color: #C4976A;
}

.pdp-back:hover::before {
  transform: translateX(-5px);
}

.pdp-hero {
  height: 90vh;
  position: relative;
  overflow: hidden;
  background: #230B09;
}

.pdp-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.pdp-hero-placeholder {
  width: 100%;
  height: 100%;
  background: #230B09;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(196,151,106,0.2);
}

.pdp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(22,5,4,0.3) 0%,
    rgba(22,5,4,0.05) 40%,
    rgba(22,5,4,0.7) 100%
  );
}

.pdp-hero-info {
  position: absolute;
  bottom: 80px;
  left: 60px;
  right: 60px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}

.pdp-hero-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(48px,6vw,88px);
  font-weight: 300;
  line-height: 0.95;
  color: #F5EDE0;
}

.pdp-hero-name em {
  font-style: italic;
  color: #C4976A;
}

.pdp-hero-location {
  font-size: 13px;
  letter-spacing: 0.15em;
  color: rgba(245,237,224,0.5);
  margin-bottom: 12px;
}

.pdp-hero-tags {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.pdp-tag {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 5px 14px;
  border: 1px solid rgba(196,151,106,0.3);
  color: rgba(245,237,224,0.5);
}

.pdp-intro {
  max-width: 1400px;
  margin: 0 auto;
  padding: 100px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: start;
}

.pdp-intro-left h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px,3.5vw,50px);
  font-weight: 300;
  line-height: 1.15;
  color: #F5EDE0;
}

.pdp-intro-left h2 em {
  font-style: italic;
  color: #C4976A;
}

.pdp-intro-right p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.9;
  color: rgba(245,237,224,0.55);
  margin-bottom: 20px;
}

.pdp-stats {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  border-top: 1px solid rgba(196,151,106,0.15);
  border-bottom: 1px solid rgba(196,151,106,0.15);
  margin: 0 0 80px;
  padding: 40px 0;
}

.pdp-stat {
  text-align: center;
  padding: 0 20px;
  border-right: 1px solid rgba(196,151,106,0.1);
}

.pdp-stat:last-child {
  border-right: none;
}

.pdp-stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 40px;
  font-weight: 300;
  color: #C4976A;
  line-height: 1;
  margin-bottom: 8px;
}

.pdp-stat-label {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(245,237,224,0.35);
}



/* PROJECT GALLERY — EDITORIAL MAGAZINE */
.pdp-gallery {
  width: min(1540px, calc(100% - 72px));
  max-width: none;
  margin: 0 auto;
  padding: 0 0 170px;
}

.pdp-gallery-grid {
  display: block;
}

.eg-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 48px;
  padding-bottom: 30px;
  margin-bottom: clamp(30px, 4vw, 56px);
  border-bottom: 1px solid rgba(196,151,106,0.18);
}

.eg-head-kicker {
  display: block;
  margin-bottom: 12px;
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #C4976A;
}

.eg-head-title {
  max-width: 760px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(38px, 4.5vw, 68px);
  font-weight: 300;
  line-height: 0.98;
  color: #F5EDE0;
}

.eg-head-count {
  flex: none;
  padding-bottom: 7px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(245,237,224,0.45);
  white-space: nowrap;
}

.eg-justified {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 24px;
  row-gap: 24px;
}

.eg-tile {
  position: relative;
  margin: 0;
  background: #230B09;
  overflow: hidden;
  cursor: zoom-in;
  width: 320px;       /* fallback before JS measures; JS sets exact size */
  height: 240px;
  flex: none;
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.85s ease,
    transform 0.85s cubic-bezier(0.2,0.7,0.2,1);
}

.eg-tile.is-visible {
  opacity: 1;
  transform: none;
}

.eg-frame {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.eg-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;     /* tile is sized to image ratio, so nothing is cropped */
}

/* Floating caption — number always faintly visible, full caption on hover */
.eg-meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 50px 18px 16px;
  background: linear-gradient(
    to top,
    rgba(22,5,4,0.92) 0%,
    rgba(22,5,4,0.55) 45%,
    rgba(22,5,4,0) 100%);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.eg-tile:hover .eg-meta {
  opacity: 1;
  transform: none;
}

.eg-tile-num {
  position: absolute;
  top: 14px;
  left: 16px;
  margin: 0;
  padding: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-style: italic;
  color: #F5EDE0;
  opacity: 0.7;
  text-shadow: 0 1px 12px rgba(0,0,0,0.55);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.eg-tile:hover .eg-tile-num { opacity: 1; }

.eg-cap-text {
  display: block;
  max-width: 60ch;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: rgba(245,237,224,0.92);
}


/* EMPTY-STATE SAFETY */
.pdp-img-wrap {
  overflow: hidden;
  background: #230B09;
}

.pdp-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .eg-tile {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .eg-frame img {
    transition: none;
  }
}


/* MOBILE */
@media (max-width: 900px) {
  #projects-page .pp-hero {
    padding: 140px 24px 60px;
  }

  #projects-page .pp-grid {
    grid-template-columns: 1fr;
    padding: 20px 24px 100px;
  }

  #projects-page .pp-card:first-child {
    aspect-ratio: 4 / 3;
  }

  #projects-page .pp-card-info {
    padding: 28px;
  }

  #projects-page .pp-card-name,
  #projects-page .pp-card:first-child .pp-card-name {
    font-size: 32px;
  }

  #projects-page .pp-cta {
    padding: 90px 24px;
  }

  .pdp-back {
    left: 24px;
    top: 90px;
  }

  .pdp-hero {
    height: 78vh;
  }

  .pdp-hero-info {
    left: 24px;
    right: 24px;
    bottom: 40px;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .pdp-hero-tags {
    justify-content: flex-start;
  }

  .pdp-intro {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 60px 24px;
  }

  .pdp-gallery {
    padding: 0 24px 100px;
  }

  .pdp-stats {
    grid-template-columns: repeat(2,1fr);
  }

  .pdp-stat {
    padding: 24px 12px;
  }

  .pdp-stat:nth-child(2) {
    border-right: none;
  }

  .pdp-stat:nth-child(1),
  .pdp-stat:nth-child(2) {
    border-bottom: 1px solid rgba(196,151,106,0.1);
  }

}


@media (max-width: 900px) {
  .pdp-gallery {
    width: calc(100% - 48px);
    padding-bottom: 110px;
  }

  .eg-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }}

@media (max-width: 620px) {
  .pdp-gallery {
    width: calc(100% - 32px);
    padding-bottom: 90px;
  }

  .eg-head-title {
    font-size: clamp(34px, 11vw, 50px);
  }.eg-meta {
    gap: 13px;
    padding-top: 11px;
  }

  .eg-cap-text {
    font-size: 11px;
    line-height: 1.55;
  }
}


/* FULL-SCREEN LIGHTBOX */
body.eg-lb-lock { overflow: hidden; }

.eg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(13, 3, 2, 0.97);
  animation: egLbFade 0.3s ease;
}

.eg-lightbox.is-open { display: flex; }

@keyframes egLbFade { from { opacity: 0; } to { opacity: 1; } }

.eg-lb-stage {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 92vw;
  max-height: 92vh;
}

.eg-lb-img {
  max-width: 92vw;
  max-height: 84vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
}

.eg-lb-cap {
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.05em;
  line-height: 1.6;
  color: rgba(245, 237, 224, 0.7);
  text-align: center;
  max-width: 60ch;
}

.eg-lb-close {
  position: fixed;
  top: 22px;
  right: 28px;
  width: 50px;
  height: 50px;
  border: none;
  background: transparent;
  color: #F5EDE0;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.eg-lb-close:hover { opacity: 1; transform: rotate(90deg); }

.eg-lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border: none;
  background: transparent;
  color: #F5EDE0;
  font-size: 48px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.3s ease;
}

.eg-lb-nav:hover { opacity: 1; }
.eg-lb-prev { left: 18px; }
.eg-lb-next { right: 18px; }

@media (max-width: 600px) {
  .eg-lb-close { top: 14px; right: 16px; }
  .eg-lb-nav { width: 44px; font-size: 36px; }
  .eg-lb-prev { left: 4px; }
  .eg-lb-next { right: 4px; }
}