/* ═══════════════════════════════════════
   OUR PROJECTS (section4)
   Scroll-driven horizontal carousel:
   each project centers, its side text fades
   in, then it slides left as the next enters.
═══════════════════════════════════════ */

.projects-scroll-container {
  position: relative;
  height: 500vh;            /* scroll length that drives the carousel */
  background: #fff;
  z-index: 2;
}

.projects-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: #fff;
}

/* Section heading (static, top-left) */
.projects-heading {
  position: absolute;
  top: 5vh;
  left: 6vw;
  z-index: 30;
}
.projects-heading .pe-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-primary-60);
}
.projects-heading .pe-eyebrow .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--hero-green);
}

/* ── Single project slide (stacked, full-stage) ── */
.pj {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Top label */
.pj-label {
  position: absolute;
  top: 9vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-primary-60);
  white-space: nowrap;
  opacity: 0;
  will-change: opacity, transform;
}

/* Center image */
.pj-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  width: 34vw;
  height: 76vh;
  border-radius: 26px;
  overflow: hidden;
  background: #c8ced6;
  box-shadow: 0 40px 90px -40px rgba(15, 37, 67, 0.45);
  will-change: transform, opacity;
}
.pj-image img,
.pj-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Left text (project identity) */
.pj-left {
  position: absolute;
  left: 6vw;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  max-width: 24vw;
  opacity: 0;
  will-change: opacity, transform;
}
.pj-left h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.9rem, 3vw, 3.1rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 22px;
}
.pj-left p {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary-60);
}

/* Right text (stats + logo) */
.pj-right {
  position: absolute;
  right: 6vw;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 22vw;
  text-align: right;
  opacity: 0;
  will-change: opacity, transform;
}
.pj-right .pj-watt {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1;
  color: var(--text-primary);
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pj-right .pj-watt-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary-60);
  margin-top: 8px;
}
.pj-right .pj-logo {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
}
.pj-right .pj-logo span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-primary-30);
  margin-bottom: 14px;
}
.pj-right .pj-logo img {
  height: 44px;
  width: auto;
  margin-left: auto;
  display: block;
  object-fit: contain;
}

/* ── Progress indicator ── */
.pj-progress {
  position: absolute;
  bottom: 5vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pj-progress .pj-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--text-primary-30);
  transition: background 0.35s ease, transform 0.35s ease;
}
.pj-progress .pj-dot.active {
  background: #ff8934;
  transform: scale(1.35);
}

/* ── View all projects link ── */
.pj-viewall {
  position: absolute;
  bottom: 5vh;
  right: 6vw;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  padding: 12px 24px;
  border: 1px solid var(--text-primary-30);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.pj-viewall svg { transition: transform 0.3s ease; }
.pj-viewall:hover {
  border-color: transparent;
  background: var(--brand-gradient);
  color: #fff;
  transform: translateY(-2px);
}
.pj-viewall:hover svg { transform: translateX(5px); }

/* ═══════════════════════════════════════
   MOBILE — static stacked layout
═══════════════════════════════════════ */
@media (max-width: 900px) {
  .projects-scroll-container { height: auto; }
  .projects-sticky {
    position: static;
    height: auto;
    overflow: visible;
    padding: 80px 22px;
  }
  .projects-heading {
    position: static;
    margin-bottom: 40px;
  }
  .pj {
    position: static;
    inset: auto;
    opacity: 1 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 70px;
  }
  .pj-label {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    margin-bottom: 18px;
  }
  .pj-image {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    width: 100%;
    max-width: 460px;
    height: 56vh;
    margin: 0 auto 28px;
  }
  .pj-left,
  .pj-right {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    max-width: 460px;
    width: 100%;
    text-align: center;
  }
  .pj-left { margin-bottom: 24px; }
  .pj-right .pj-watt,
  .pj-right .pj-watt-label { text-align: center; }
  .pj-right .pj-logo img { margin: 0 auto; }
  .pj-progress { display: none; }

  .pj-viewall {
    position: static;
    margin: 10px auto 0;
    display: inline-flex;
  }
  .projects-sticky { text-align: center; }
}
