/* ═══════════════════════════════════════════════════════
   ARISE POOLS: GOLDEN HOUR PROJECT PAGES
   Loads after arise-v2.css on every /portfolio/<slug> page
   (generated by scripts/build-project-pages.py, do not hand-edit
   the pages). Hero facts, editorial story, numbered details, a
   gallery that walks from daylight into dusk, services and
   nearby area, more projects, and the project photo viewer.
   ═══════════════════════════════════════════════════════ */

/* ── Hero ── */
.pj-hero { min-height: clamp(560px, 90vh, 900px); }
.pj-hero .eyebrow-text { color: var(--gold-light); }
.pj-hero .gh-crumbs { margin-bottom: 22px; }
.pj-hero .gh-crumbs [aria-current] { color: var(--gold-light); }
.pj-hero .hero-subtitle { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 300; font-size: clamp(1.35rem, 2.3vw, 1.8rem); line-height: 1.3; color: rgba(247,241,232,.92); }
.pj-hero-ctas { margin-top: 30px; }
.pj-facts { display: flex; flex-wrap: wrap; gap: 16px 48px; margin: 46px 0 0; padding-top: 22px; border-top: 1px solid rgba(247,241,232,.2); max-width: 920px; }
.pj-facts dt { font-size: .62rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 6px; }
.pj-facts dd { margin: 0; font-size: .95rem; color: rgba(247,241,232,.92); }

/* ── Left-aligned heading variant ── */
.pj-left.section-heading { text-align: left; margin-bottom: 30px; }
.pj-left .eyebrow { justify-content: flex-start; }
.pj-left .eyebrow-line:last-child { display: none; }
.pj-left .gold-rule { margin-left: 0; }

/* ── Story: editorial split ── */
.pj-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.pj-story-media { position: sticky; top: 96px; margin: 0; }
.pj-story-media a { display: block; overflow: hidden; border-radius: 3px; }
.pj-story-media img { width: 100%; height: auto; transition: transform 1.6s var(--ease); }
.pj-story-media a:hover img { transform: scale(1.035); }
.pj-story-media figcaption { margin-top: 14px; font-size: .78rem; letter-spacing: .04em; color: var(--mist); }
.pj-lead { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: clamp(1.45rem, 2.4vw, 1.95rem); line-height: 1.32; color: var(--stone); margin-bottom: 28px; }
.pj-p { line-height: 1.85; color: rgba(26,24,20,.74); margin-bottom: 18px; }
.pj-lead + .pj-p::first-letter { float: left; font-family: 'Cormorant Garamond', serif; font-size: 4.3em; line-height: .78; padding: 8px 12px 0 0; color: var(--gold-dark); }
.pj-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 32px 0 0; }
.pj-tags li { font-size: .64rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; padding: 9px 14px; border: 1px solid rgba(139,105,20,.32); border-radius: 2px; color: var(--gold-dark); background: rgba(255,255,255,.35); }

/* ── Design details: hairline grid ── */
.pj-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(201,164,100,.34); border: 1px solid rgba(201,164,100,.34); }
.pj-feature { background: #FBF7F0; padding: clamp(28px, 3.4vw, 44px); transition: background .5s var(--ease); }
.pj-feature:hover { background: #fff; }
.pj-feature-num { font-family: 'Cormorant Garamond', serif; font-size: 3.4rem; line-height: .9; color: transparent; -webkit-text-stroke: 1px var(--gold); transition: color .6s var(--ease); }
.pj-feature:hover .pj-feature-num { color: var(--gold); }
.pj-feature h3 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 1.65rem; line-height: 1.15; margin: 18px 0 10px; }
.pj-feature p { font-size: .98rem; line-height: 1.75; color: rgba(26,24,20,.68); }

/* ── Gallery: daylight into dusk ── */
.section.pj-gallery-sec { background: linear-gradient(180deg, var(--cream) 0%, var(--sand) 26%, #D2AE88 60%, #6A4A40 84%, var(--dusk) 100%); }
/* Justified rows: registry order reads left to right, no cropping, every row the same height.
   Each tile carries --r (width / height); flex-grow and flex-basis scale with it. */
.pj-masonry { --row: 200px; display: flex; flex-wrap: wrap; gap: 12px; }
.pj-masonry::after { content: ""; flex-grow: 999999; }
.pj-shot { position: relative; display: block; flex: var(--r) 1 calc(var(--r) * var(--row)); aspect-ratio: var(--r); overflow: hidden; border-radius: 3px; background: rgba(26,24,20,.1); }
.pj-shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.3s var(--ease); }
.pj-shot::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(229,203,154,0); border-radius: 3px; transition: border-color .5s; pointer-events: none; }
.pj-shot:hover img { transform: scale(1.045); }
.pj-shot:hover::after { border-color: rgba(229,203,154,.85); }
.pj-shot:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.pj-gallery-sec .gh-more .btn-gold { box-shadow: 0 18px 40px -18px rgba(10,9,8,.8); }

/* ── Services + nearby: dusk ── */
.section.pj-dusk { background: linear-gradient(180deg, var(--dusk) 0%, #1C2631 100%); color: var(--cream); }
.pj-dusk .section-heading h2, .pj-more-sec .section-heading h2 { color: var(--cream); }
.pj-dusk .section-heading h2 em, .pj-more-sec .section-heading h2 em { color: var(--gold-light); }
.pj-dusk .eyebrow-text, .pj-more-sec .eyebrow-text { color: var(--gold-light); }
.pj-split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.pj-svc-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid rgba(229,203,154,.2); }
.pj-svc-list a { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: baseline; gap: 16px; padding: 22px 0; border-bottom: 1px solid rgba(229,203,154,.2); color: var(--cream); text-decoration: none; transition: padding .45s var(--ease), color .3s; }
.pj-svc-list li:last-child a { border-bottom: 0; }
.pj-svc-list a:hover { padding-left: 10px; color: var(--gold-light); }
.pj-svc-num { font-size: .68rem; letter-spacing: .22em; color: var(--gold-light); }
.pj-svc-name { display: block; font-family: 'Cormorant Garamond', serif; font-size: 1.65rem; line-height: 1.1; }
.pj-svc-desc { display: block; margin-top: 6px; font-size: .9rem; line-height: 1.6; color: rgba(247,241,232,.62); }
.pj-svc-arrow { color: var(--gold); transition: transform .45s var(--ease); }
.pj-svc-list a:hover .pj-svc-arrow { transform: translateX(5px); }
.pj-near { padding: clamp(28px, 3vw, 40px); border: 1px solid rgba(229,203,154,.24); border-radius: 3px; background: rgba(7,24,33,.35); }
.pj-near .eyebrow { justify-content: flex-start; margin-bottom: 18px; }
.pj-near .eyebrow-line:last-child { display: none; }
.pj-near h3 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: clamp(1.8rem, 2.6vw, 2.3rem); line-height: 1.08; margin-bottom: 14px; }
.pj-near p { color: rgba(247,241,232,.76); line-height: 1.75; }
.pj-near-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.pj-near-links .btn-ghost { padding: 14px 22px; }
.pj-posts { margin-top: 30px; padding-top: 24px; border-top: 1px solid rgba(229,203,154,.2); }
.pj-posts-label { font-size: .62rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 10px; }
.pj-posts ul { list-style: none; padding: 0; margin: 0; }
.pj-posts li + li { margin-top: 10px; }
.pj-posts a { color: var(--cream); font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; line-height: 1.3; text-decoration: none; border-bottom: 1px solid rgba(229,203,154,.35); transition: color .3s, border-color .3s; }
.pj-posts a:hover { color: var(--gold-light); border-color: var(--gold-light); }

/* ── More projects: deep water ── */
.section.pj-more-sec { background: linear-gradient(180deg, #1C2631 0%, var(--pool-deep) 100%); color: var(--cream); }
.pj-more { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.pj-card { display: block; color: var(--cream); text-decoration: none; }
.pj-card-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 3px; background: rgba(0,0,0,.25); }
.pj-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.pj-card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,9,8,.55), rgba(10,9,8,0) 50%); }
.pj-card:hover .pj-card-media img { transform: scale(1.06); }
.pj-card h3 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 1.6rem; line-height: 1.1; margin: 16px 0 6px; }
.pj-card-meta { font-size: .64rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-light); }
.pj-card-link { display: inline-block; margin-top: 14px; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: 4px; opacity: .8; transition: opacity .3s, color .3s; }
.pj-card:hover .pj-card-link { opacity: 1; color: var(--gold-light); }

/* ── Photo viewer ── */
.pj-lb { position: fixed; inset: 0; z-index: 1300; display: flex; flex-direction: column; background: rgba(10,9,8,.96); color: var(--cream); opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility 0s linear .35s; }
.pj-lb.open { opacity: 1; visibility: visible; transition: opacity .35s var(--ease); }
.pj-lb-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px clamp(16px, 3vw, 32px); }
.pj-lb-title { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; line-height: 1.2; }
.pj-lb-title small { font-family: 'Jost', sans-serif; font-size: .64rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-light); margin-left: 12px; }
.pj-lb-x { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(247,241,232,.3); background: none; color: var(--cream); font-size: 1.35rem; line-height: 1; cursor: pointer; transition: border-color .3s, color .3s; }
.pj-lb-x:hover { border-color: var(--gold); color: var(--gold-light); }
.pj-lb-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 clamp(8px, 6vw, 96px); touch-action: pan-y; }
.pj-lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; transition: opacity .3s; }
.pj-lb-stage img.is-loading { opacity: .88; }
.pj-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(247,241,232,.25); background: rgba(26,24,20,.6); color: var(--cream); font-size: 1.2rem; cursor: pointer; transition: border-color .3s, color .3s; }
.pj-lb-nav:hover { border-color: var(--gold); color: var(--gold-light); }
.pj-lb-prev { left: clamp(8px, 2vw, 24px); }
.pj-lb-next { right: clamp(8px, 2vw, 24px); }
.pj-lb-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px 20px; padding: 14px clamp(16px, 3vw, 32px) calc(18px + env(safe-area-inset-bottom)); }
.pj-lb-meta { margin: 0; min-width: 0; }
.pj-lb-count { font-size: .7rem; letter-spacing: .22em; color: var(--gold-light); margin-right: 14px; white-space: nowrap; }
.pj-lb-cap { font-size: .92rem; color: rgba(247,241,232,.78); }
.pj-lb .btn-gold { padding: 13px 22px; font-size: .68rem; }
.pj-lb button:focus-visible, .pj-lb a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .pj-more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .pj-story, .pj-split { grid-template-columns: 1fr; }
  .pj-story-media { position: relative; top: 0; }
  .pj-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pj-masonry { --row: 150px; }
}
@media (max-width: 600px) {
  .pj-hero { min-height: clamp(560px, 88svh, 760px); }
  .pj-facts { gap: 14px 28px; margin-top: 34px; }
  .pj-features { grid-template-columns: 1fr; }
  .pj-masonry { --row: 100px; gap: 8px; }
  .pj-more { gap: 12px; }
  .pj-card h3 { font-size: 1.25rem; margin-top: 12px; }
  .pj-card-meta { font-size: .56rem; letter-spacing: .16em; }
  .pj-svc-list a { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; }
  .pj-svc-name { font-size: 1.4rem; }
  .pj-lb-stage { padding: 0 8px 64px; }
  .pj-lb-nav { top: auto; bottom: 8px; transform: none; width: 46px; height: 46px; }
  .pj-lb-prev { left: calc(50% - 56px); }
  .pj-lb-next { right: calc(50% - 56px); }
  .pj-lb .btn-gold { width: 100%; text-align: center; }
}
