/* ==================================================================
   CEG — Project detail template
   Shared by every /project-*.html page. Structure:
   .phero → .pfacts → .pbody (main + sticky aside) → gallery → .pnext
   ================================================================== */

/* ---------- HERO ---------- */
.phero { position: relative; min-height: 80vh; display: flex; align-items: flex-end; overflow: hidden; background: var(--forest); }
.phero-img { position: absolute; inset: -8% 0 0; width: 100%; height: 116%; object-fit: cover; z-index: 0; }
.phero-scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(30,51,40,.62) 0%, rgba(30,51,40,.28) 38%, rgba(30,51,40,.94) 100%); }
.phero-inner { position: relative; z-index: 2; width: 100%; padding-top: 168px; padding-bottom: 60px; }
.phero .crumb { display: flex; align-items: center; gap: 10px; color: var(--on-dark-muted); font-size: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.phero .crumb a:hover { color: var(--sage); }
.phero h1 { color: #fff; max-width: 900px; margin: 20px 0 0; }
.phero-lead { color: #fff; font-weight: 300; font-size: var(--d-md); line-height: 1.15; max-width: 760px; margin: 26px 0 0; letter-spacing: -.4px; }
.phero-place { display: inline-flex; align-items: center; gap: 9px; color: var(--sage); font-size: 15px; font-weight: 600; margin-top: 26px; }
.phero-place i { width: 17px; height: 17px; }

/* ---------- FACT STRIP ---------- */
.pfacts { background: var(--forest-deep); color: #fff; }
.pfacts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding: 40px 0; }
.pfact-k { font-size: 11.5px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--on-dark-faint); }
.pfact-v { font-size: 17px; font-weight: 600; line-height: 1.4; margin-top: 10px; color: #fff; }

/* ---------- BODY ---------- */
.pbody { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 80px; align-items: start; }
.pbody-main > p { font-size: 19px; line-height: 1.72; color: var(--fg-muted); margin: 0 0 24px; text-wrap: pretty; max-width: 66ch; }
.pbody-main > p:last-child { margin-bottom: 0; }
.pbody-main > p strong { color: var(--forest); font-weight: 600; }
.pull { margin: 46px 0; padding-left: 26px; border-left: 3px solid var(--accent); }
.pull span { display: block; font-size: 34px; font-weight: 300; line-height: 1.14; letter-spacing: -.6px; color: var(--forest); }
@media (max-width: 820px) { .pull span { font-size: 26px; } }

/* sticky aside */
.pside { position: sticky; top: 122px; display: grid; gap: 18px; }
.pside-card { background: var(--canvas-soft); border: 1px solid var(--line); border-radius: var(--r-md); padding: 28px; }
.pside-title { font-size: 11.5px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--fg-faint); margin-bottom: 18px; }
.pside-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.pside-list li { display: grid; grid-template-columns: auto 1fr; gap: 11px; font-size: 15px; line-height: 1.45; color: var(--fg-muted); }
.pside-list .tick { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.pside-list .tick i { width: 12px; height: 12px; }

/* ---------- GALLERY ---------- */
.pgal { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 215px; gap: 16px; }
.pgal figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--r-md); background: var(--forest); cursor: zoom-in; }
.pgal img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.pgal figure:hover img { transform: scale(1.05); }
.pgal figure::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(30,51,40,.55)); opacity: 0; transition: opacity .3s var(--ease); }
.pgal figure:hover::after { opacity: 1; }
.pgal figcaption { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 2; color: #fff; font-size: 14px; font-weight: 600;
  opacity: 0; transform: translateY(6px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.pgal figure:hover figcaption { opacity: 1; transform: none; }
.s2 { grid-column: span 2; } .s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s6 { grid-column: span 6; }
.r2 { grid-row: span 2; }
@media (max-width: 920px) { .pgal { grid-template-columns: repeat(2,1fr); grid-auto-rows: 200px; } .s2,.s3,.s4,.s6 { grid-column: span 2; } .r2 { grid-row: span 1; } }

/* ---------- BEFORE / AFTER WIPE ---------- */
.cmp { position: relative; border-radius: var(--r-md); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: ew-resize; background: var(--forest); }
.cmp img { width: 100%; display: block; }
.cmp-top { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; box-shadow: 0 0 14px rgba(0,0,0,.35); z-index: 3; }
.cmp-knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 48px; height: 48px; border-radius: 50%;
  background: #fff; color: var(--forest); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); }
.cmp-knob i { width: 22px; height: 22px; }
.cmp-tag { position: absolute; bottom: 16px; z-index: 4; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: #fff; background: rgba(30,51,40,.66); backdrop-filter: blur(5px); padding: 8px 14px; border-radius: var(--r-pill); }
.cmp-tag.l { left: 16px; } .cmp-tag.r { right: 16px; }

/* ---------- LIGHTBOX ---------- */
.lbx { position: fixed; inset: 0; z-index: 240; background: rgba(20,34,26,.94); display: none; align-items: center; justify-content: center; padding: 48px; cursor: zoom-out; }
.lbx.open { display: flex; }
.lbx img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: var(--r-sm); box-shadow: var(--shadow-lg); }
.lbx-close { position: absolute; top: 26px; right: 26px; width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.14); color: #fff; display: flex; align-items: center; justify-content: center; }

/* ---------- NEXT PROJECT ---------- */
.pnext { position: relative; overflow: hidden; background: var(--forest); display: block; }
.pnext img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .42; transition: transform .8s var(--ease), opacity .4s var(--ease); }
.pnext:hover img { transform: scale(1.05); opacity: .52; }
.pnext-inner { position: relative; z-index: 2; padding-top: 88px; padding-bottom: 88px; display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.pnext h2 { color: #fff; }

@media (max-width: 980px) {
  .pbody { grid-template-columns: 1fr; gap: 44px; }
  .pside { position: static; }
  .pfacts-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 820px) {
  .phero { min-height: 68vh; }
  .phero-inner { padding-top: 140px; padding-bottom: 48px; }
  .lbx { padding: 20px; }
}
