/* =============================================================
   PROJECT DETAIL PAGE
   ============================================================= */
.project-detail-main {
  padding-top: 0;
  padding-bottom: 0;
}

/* ---------- Entrance animations ---------- */
@keyframes heroImgReveal {
  0%   { transform: scale(1.12); opacity: 0; }
  100% { transform: scale(1);    opacity: 1; }
}

@keyframes heroOverlayFade {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes titleSlideUp {
  0%   { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes navFadeIn {
  0%   { opacity: 0; transform: translateY(-20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Scroll-reveal for content sections */
@keyframes revealUp {
  0%   { opacity: 0; transform: translateY(50px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes mobileTitleReveal {
  0%   { opacity: 0; transform: translateY(calc(-50% + 40px)); }
  100% { opacity: 1; transform: translateY(-50%); }
}

/* ---------- Hero ---------- */
.project-hero-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
}

.project-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  animation: heroImgReveal 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s forwards;
}

.project-hero-container::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.18);
  pointer-events: none;
  opacity: 0;
  animation: heroOverlayFade 1.4s ease 0.1s forwards;
}

.project-hero-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: clamp(48px, 8vw, 120px);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #ffffff;
  mix-blend-mode: difference;
  opacity: 0;
  animation: titleSlideUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s forwards;
}

/* Desktop: show spacer title, hide in-hero title */
.project-hero-title--mobile {
  display: none;
}

.project-hero-title--desktop {
  display: block;
}

/* Spacer: same height as hero, holds the title, scrolls with page.
   No z-index here so mix-blend-mode can composite with the fixed hero image. */
.project-hero-spacer {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Nav entrance on project pages */
.project-detail-main ~ .nav,
body:has(.project-detail-main) .nav {
  opacity: 0;
  animation: navFadeIn 0.8s ease 0.4s forwards;
}

/* Scroll-reveal: hidden by default, revealed by JS */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Content that scrolls up over the hero */
.project-content {
  position: relative;
  z-index: 1;
  background: var(--bg);
  box-shadow: 0 -20px 60px rgba(0,0,0,0.08);
  padding-bottom: 80px;
}

.project-header-info {
  padding: 80px 48px 80px;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.project-header-info .meta-container {
  display: flex;
  justify-content: center;
  gap: 64px;
  margin-bottom: 60px;
}

.project-header-info .meta {
  font-size: 14px;
  letter-spacing: 0.05em;
  opacity: 0.7;
  text-align: left;
}

.project-header-info .meta .label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.45;
  margin-bottom: 8px;
}

.project-header-info .intro-text {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(14px, 2vw, 20px);
  line-height: 1.6;
  opacity: 0.85;
  max-width: 900px;
}

.project-section {
  padding: 0 90px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.project-section .section-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(16px, 3vw, 24px);
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.project-section .text-content {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.6;
  opacity: 0.85;
  margin-bottom: 28px;
}

.project-section .text-content:last-child {
  margin-top: 40px;
  margin-bottom: 0;
}

.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.grid-2-col img {
  width: 100%;
  height: auto;
  aspect-ratio: 3/2;
  object-fit: cover;
}

/* ---------- Grid layouts ---------- */
.grid-3-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.grid-4-col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.grid-3-col img,
.grid-4-col img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

.grid-4-col img.portrait {
  aspect-ratio: 2/3;
}

/* ---------- Cards ---------- */
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card-title {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 16px;
  margin-top: 16px;
  margin-bottom: 8px;
}

.card-text {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.75;
}

/* ---------- Full-width image ---------- */
.full-width-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: 4px;
}

.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}

.video-container {
  width: 100%;
  aspect-ratio: 16/9;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Footer on project pages needs same z-index treatment */
.project-content-footer {
  position: relative;
  z-index: 1;
  background: var(--bg);
}

@media (max-width: 768px) {
  .project-hero-container { height: 60vh; }
  .project-hero-spacer { height: 60vh; }

  /* Mobile: show in-hero title (blend mode works), hide spacer title */
  .project-hero-title--mobile {
    display: block;
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 1;
    will-change: transform;
    animation: mobileTitleReveal 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s forwards;
  }
  .project-hero-title--desktop {
    display: none;
  }

  .project-header-info { padding: 60px 20px 40px; }
  .project-header-info .meta-container { flex-direction: column; gap: 24px; align-items: center; text-align: center; margin-bottom: 40px; }
  .project-header-info .meta { text-align: center; }
  .project-section { padding: 0 20px 60px; }
  .grid-2-col { grid-template-columns: 1fr; gap: 32px; }
  .grid-3-col { grid-template-columns: 1fr; gap: 24px; }
  .grid-4-col { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}