/* LumaSign portfolio: hub (projects.html) and the project pages. Static pass, no JavaScript, no motion.
   Loaded AFTER lsg-home-v3.css (read-only): it reuses its tokens (--lsg-*), header, buttons, footer, hero,
   section rhythm, .lsg-split, .lsg-section-head, .lsg-h2, .lsg-lead, .lsg-text and .lsg-badge, and overrides none of them.
   Every rule below uses a new class: lsg-pj-* (project pages) or lsg-hub-* (hub). */

/* ---------- Section backgrounds (explicit on every section) ---------- */
.lsg-pj-bg--black { background: var(--lsg-black); }
.lsg-pj-bg--navy { background: var(--lsg-navy); }

/* ---------- Project hero: the home hero (video behind, title at the bottom) plus a line of place and badge ---------- */
.lsg-pj-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.lsg-pj-place { color: var(--lsg-gold); font-size: 0.9375rem; font-weight: 600; line-height: 1.4; }

/* ---------- Numbers: thin-rule rows, big values ---------- */
.lsg-pj-nums { border-bottom: 1px solid var(--lsg-rule); }
.lsg-pj-num { display: grid; gap: 8px 40px; align-items: end; padding-block: clamp(18px, 2.6vw, 38px); border-top: 1px solid var(--lsg-rule); }
.lsg-pj-num__value { font-weight: 800; font-size: clamp(2.6rem, 7.4vw, 6.5rem); line-height: 0.9; letter-spacing: -0.055em; font-variant-numeric: tabular-nums; color: var(--lsg-text); overflow-wrap: anywhere; }
.lsg-pj-num__label { max-width: 30ch; color: var(--lsg-muted); font-size: clamp(1.0625rem, 1.5vw, 1.375rem); line-height: 1.35; }
@media (min-width: 860px) { .lsg-pj-num { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }

/* ---------- Split sections (title left, content right): the home .lsg-split does the layout ---------- */
.lsg-pj-split__body { min-width: 0; }
.lsg-pj-lead { font-size: clamp(1.25rem, 2vw, 1.875rem); line-height: 1.35; color: var(--lsg-text); max-width: 44rem; }
.lsg-pj-lead p { margin: 0; }
.lsg-pj-lead p + p { margin-top: 0.75em; }

/* ---------- What we did: numbered by a CSS counter, thin rules ---------- */
.lsg-pj-scope { counter-reset: lsg-pj-scope; border-bottom: 1px solid var(--lsg-rule); }
.lsg-pj-scope__item { counter-increment: lsg-pj-scope; display: grid; grid-template-columns: minmax(3.4rem, 5.5rem) minmax(0, 1fr); gap: 8px clamp(16px, 3vw, 40px); align-items: start; padding-block: clamp(18px, 2.4vw, 34px); border-top: 1px solid var(--lsg-rule); }
.lsg-pj-scope__item::before { content: counter(lsg-pj-scope, decimal-leading-zero); font-weight: 800; font-size: clamp(2.2rem, 5vw, 4.5rem); line-height: 0.9; letter-spacing: -0.06em; color: transparent; -webkit-text-stroke: 1.5px rgba(192, 173, 105, 0.85); }
.lsg-pj-scope__text { font-size: clamp(1.125rem, 1.7vw, 1.5rem); line-height: 1.4; color: var(--lsg-text); max-width: 40rem; }

/* ---------- Specs: a list (not a table). Columns on desktop, stacked at phone width ---------- */
.lsg-pj-specs { border-bottom: 1px solid var(--lsg-rule); }
.lsg-pj-spec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px 24px; align-items: baseline; padding-block: clamp(16px, 2vw, 28px); border-top: 1px solid var(--lsg-rule); }
.lsg-pj-spec__name { font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; font-size: clamp(1.25rem, 2vw, 1.75rem); }
.lsg-pj-spec__size, .lsg-pj-spec__res { min-width: 0; font-family: var(--lsg-mono); font-size: 0.9375rem; line-height: 1.45; overflow-wrap: anywhere; }
.lsg-pj-spec__size { color: var(--lsg-text); }
.lsg-pj-spec__res { color: var(--lsg-muted); }
.lsg-pj-spec__label { color: var(--lsg-muted); font-family: var(--lsg-mono); font-size: 0.9375rem; line-height: 1.45; }
.lsg-pj-spec__value { font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-size: clamp(1.25rem, 2vw, 1.75rem); overflow-wrap: anywhere; }
.lsg-pj-specs__note { margin-top: 24px; color: var(--lsg-muted); font-size: 0.9375rem; line-height: 1.45; padding-left: 12px; border-left: 2px solid var(--lsg-gold); max-width: 40rem; }
@media (max-width: 719px) { .lsg-pj-spec__size:empty { display: none; } }
@media (min-width: 720px) {
  .lsg-pj-spec { grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr); }
  .lsg-pj-specs--pairs .lsg-pj-spec { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
}

/* ---------- Gallery and loops: fixed frames, soft corners ---------- */
.lsg-pj-gallery, .lsg-pj-videos { display: grid; gap: clamp(48px, 6vw, 96px); grid-template-columns: minmax(0, 1fr); }
.lsg-pj-videos { margin-top: clamp(48px, 6vw, 96px); }
.lsg-pj-media { width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--lsg-radius); background: var(--lsg-navy-lift); }
.lsg-pj-media img { width: 100%; height: 100%; object-fit: cover; }
.lsg-pj-video { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--lsg-radius); background: var(--lsg-navy-lift); }
.lsg-pj-video video { width: 100%; height: 100%; object-fit: cover; background: var(--lsg-black); }
/* one media per row: the media and its caption (below 900px the caption sits under the media) */
.lsg-pj-gallery > li, .lsg-pj-item { display: grid; gap: 16px 56px; align-items: center; margin: 0; --pj-cols: minmax(0, 7fr) minmax(0, 5fr); --pj-media-col: 1; --pj-cap-col: 2; --pj-align: left; }
.lsg-pj-caption { margin: 0; color: var(--lsg-text); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; font-size: clamp(1.375rem, 2.6vw, 2.5rem); text-wrap: balance; overflow-wrap: anywhere; text-align: left; }
@media (min-width: 900px) {
  .lsg-pj-gallery > li, .lsg-pj-item { grid-template-columns: var(--pj-cols); }
  .lsg-pj-gallery > li > :first-child, .lsg-pj-item > :first-child { grid-column: var(--pj-media-col); grid-row: 1; }
  .lsg-pj-caption { grid-column: var(--pj-cap-col); grid-row: 1; text-align: var(--pj-align); }
  /* odd rows: media left. Even rows: media right, caption on the left and aligned towards the media */
  .lsg-pj-gallery > li:nth-child(even), .lsg-pj-item:nth-child(even) { --pj-cols: minmax(0, 5fr) minmax(0, 7fr); --pj-media-col: 2; --pj-cap-col: 1; --pj-align: right; }
  /* the alternation continues from the gallery into the videos: after an odd gallery the first loop has its media on the right */
  .lsg-pj-gallery:has(> li:last-child:nth-child(odd)) + .lsg-pj-videos > .lsg-pj-item:nth-child(odd) { --pj-cols: minmax(0, 5fr) minmax(0, 7fr); --pj-media-col: 2; --pj-cap-col: 1; --pj-align: right; }
  .lsg-pj-gallery:has(> li:last-child:nth-child(odd)) + .lsg-pj-videos > .lsg-pj-item:nth-child(even) { --pj-cols: minmax(0, 7fr) minmax(0, 5fr); --pj-media-col: 1; --pj-cap-col: 2; --pj-align: left; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .lsg-pj-media img { transition: scale 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
  .lsg-pj-media:hover img { scale: 1.03; }
}

/* ---------- Call to action ---------- */
.lsg-pj-cta__inner { display: grid; gap: clamp(28px, 4vw, 56px); justify-items: start; }
.lsg-pj-cta__title { font-weight: 800; letter-spacing: -0.045em; line-height: 0.98; font-size: clamp(2.4rem, 6.6vw, 6.5rem); max-width: 18ch; }
.lsg-pj-cta__text { max-width: 36rem; }

/* ---------- Next project ---------- */
.lsg-pj-next__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px; }
.lsg-pj-next__link { font-weight: 800; letter-spacing: -0.04em; line-height: 1.02; font-size: clamp(1.75rem, 4.6vw, 4.5rem); text-decoration: underline; text-decoration-color: var(--lsg-gold); text-decoration-thickness: 3px; text-underline-offset: 0.18em; overflow-wrap: anywhere; }
.lsg-pj-next__link:hover { color: var(--lsg-gold); }

/* ---------- Hub: hero ---------- */
.lsg-hub-hero__body { padding-top: calc(var(--lsg-header-h) + clamp(40px, 8vw, 120px)); padding-bottom: var(--lsg-section-y); display: grid; gap: clamp(32px, 5vw, 72px); }
.lsg-hub-hero__title { font-weight: 800; letter-spacing: -0.05em; line-height: 0.88; font-size: clamp(3.2rem, 13vw, 13rem); color: var(--lsg-text); overflow-wrap: anywhere; }
.lsg-hub-hero__text { font-size: clamp(1.125rem, 1.8vw, 1.625rem); line-height: 1.4; max-width: 44rem; }
@media (min-width: 900px) { .lsg-hub-hero__text { margin-left: 41.66%; } }

/* ---------- Hub: project cards (list; every card has the same markup, the grid never depends on the position) ---------- */
.lsg-hub-list { display: grid; gap: clamp(56px, 7vw, 112px); }
.lsg-hub-card { display: grid; gap: 24px 56px; align-items: center; }
.lsg-hub-card__media { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--lsg-radius); background: var(--lsg-navy-lift); }
.lsg-hub-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* fixed theme loop (by card id), stacked over the editable photo; it never covers the photo while the client edits */
.lsg-hub-card__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
html.lds-selection-active .lsg-hub-card__video,
body.lds-selection-active .lsg-hub-card__video,
body.lds-editing .lsg-hub-card__video { display: none; }
.lsg-hub-card__body { display: grid; gap: 14px; align-content: start; justify-items: start; }
.lsg-hub-card__name { font-weight: 800; letter-spacing: -0.045em; line-height: 0.96; font-size: clamp(2.2rem, 4.6vw, 4.5rem); }
.lsg-hub-card__city { display: flex; align-items: center; gap: 8px; color: var(--lsg-gold); font-size: 0.9375rem; font-weight: 600; }
.lsg-hub-card__text { max-width: 34rem; }
.lsg-hub-card__body .lsg-btn { margin-top: 10px; }
@media (min-width: 900px) { .lsg-hub-card { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }

/* ---------- Motion pass (assets/js/lsg-projects.js): states and edit mode ----------
   The script adds .lsg-pj-fx to every element it animates. In edit mode (golden rule 14) the script already clears every
   inline style; this rule is the safety net: whatever is left, the element shows its final static state. Nothing here
   uses pointer-events, and nothing sits above an editable field. */
html.lds-selection-active .lsg-pj-fx,
body.lds-selection-active .lsg-pj-fx,
body.lds-editing .lsg-pj-fx { opacity: 1 !important; transform: none !important; clip-path: none !important; translate: none !important; scale: none !important; }
