/* ==========================================================================
   Projects list + project detail (templates/webapp/projects_list.html, project_detail.html)
   Uses the glass system from service.css (.sv-glass, .sv-spot, .sv-btn, .sv-hero …)
   ========================================================================== */

/* gold italic word inside the glossy hero title */
.lux-home .sv-hero h1 em { font-style: italic; color: #E8C97A; -webkit-text-fill-color: #E8C97A; }

.pj-hero { min-height: clamp(480px, 66vh, 640px); }
.pj-hero .sv-hero__inner { padding-bottom: 56px; }

/* ── Status chips ─────────────────────────────────────────────────── */
.pj-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px 7px 11px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(20, 20, 16, .62), rgba(20, 20, 16, .35));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.pj-status--inline {
  padding: 4px 11px 4px 9px;
  border-color: var(--hp-line-strong);
  background: var(--hp-gold-soft);
  box-shadow: none;
  color: var(--hp-heading);
}

.pj-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #E8C97A; box-shadow: 0 0 0 3px rgba(232, 201, 122, .22), 0 0 10px rgba(232, 201, 122, .8); }
.pj-dot--running { background: #4FD18B; box-shadow: 0 0 0 3px rgba(79, 209, 139, .2), 0 0 10px rgba(79, 209, 139, .8); animation: pj-pulse 2s ease-in-out infinite; }
.pj-dot--upcoming { background: #7FB2FF; box-shadow: 0 0 0 3px rgba(127, 178, 255, .2), 0 0 10px rgba(127, 178, 255, .8); }
@keyframes pj-pulse { 50% { box-shadow: 0 0 0 6px rgba(79, 209, 139, 0), 0 0 14px rgba(79, 209, 139, 1); } }

/* ── Filter bar (sticky glass) ────────────────────────────────────── */
.pj-filters {
  position: sticky;
  top: calc(var(--nav-h, 62px) + 10px);
  z-index: 40;
  margin-top: -34px;
  pointer-events: none;
}

.pj-filters .container { pointer-events: auto; }

.pj-filters__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  padding: 12px 16px;
}

.pj-filters__group { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pj-filters__group--scroll { flex: 1; overflow-x: auto; scrollbar-width: none; }
.pj-filters__group--scroll::-webkit-scrollbar { display: none; }

.pj-filters__label {
  flex: none;
  margin-right: 6px;
  color: var(--hp-gold);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.pj-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--hp-line);
  border-radius: 999px;
  color: var(--hp-text);
  font-size: 12.5px;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}

.pj-pill:hover { border-color: var(--hp-gold-line); color: var(--hp-heading); }
.pj-pill .pj-dot { width: 6px; height: 6px; box-shadow: none; animation: none; }

.lux-home .pj-pill.is-active {
  border-color: transparent;
  background: linear-gradient(180deg, #E8C97A 0%, #C9A84C 55%, #A8862F 100%);
  color: #0D0D0B;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 8px 20px -10px rgba(201, 168, 76, .9);
}

.pj-portfolio { padding-top: clamp(64px, 7vw, 96px); }

/* ── Project cards ────────────────────────────────────────────────── */
.pj-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }

.pj-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform .45s var(--hp-ease), box-shadow .45s ease;
}

.lux-home .pj-card.visible:hover { transform: translateY(-6px); }

.pj-card__media {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0D0D0B;
}

.pj-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--hp-ease); }
.pj-card:hover .pj-card__media img { transform: scale(1.07); }

.pj-card__media::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 10, 8, .35) 0%, transparent 35%, transparent 65%, rgba(10, 10, 8, .35) 100%);
  pointer-events: none;
}

.pj-card__media::after {
  content: '';
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -50%;
  z-index: 2;
  width: 40%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .26), transparent);
  transform: skewX(-16deg) translateX(-160%);
  transition: transform 1.1s var(--hp-ease);
  pointer-events: none;
}

.pj-card:hover .pj-card__media::after { transform: skewX(-16deg) translateX(520%); }

.pj-card__media .pj-status { position: absolute; top: 14px; left: 14px; z-index: 3; }
.pj-card__media .sv-project__go { z-index: 3; top: 12px; right: 12px; }
.pj-card:hover .sv-project__go { opacity: 1; transform: none; }

.pj-card__body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 22px; }

.lux-home .pj-card h3 {
  margin: 8px 0 0;
  font-family: var(--hp-serif);
  font-size: clamp(22px, 1.8vw, 26px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--hp-heading);
  transition: color .3s ease;
}

.pj-card:hover h3 { color: var(--hp-gold); }
.pj-card__text { margin: 10px 0 0; color: var(--hp-muted); font-size: 14px; line-height: 1.65; }

.pj-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--hp-line);
  list-style: none;
}

.pj-meta li { display: flex; align-items: center; gap: 7px; color: var(--hp-text); font-size: 13px; }
.pj-meta svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--hp-gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.pj-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--hp-gold);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.pj-card__cta svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .3s var(--hp-ease); }
.pj-card:hover .pj-card__cta svg { transform: translateX(5px); }

/* first card featured when there are 3+ projects */
.pj-grid--feature .pj-card:first-child { grid-column: span 2; flex-direction: row; }
.pj-grid--feature .pj-card:first-child .pj-card__media { flex: 1.25; aspect-ratio: auto; min-height: 380px; }
.pj-grid--feature .pj-card:first-child .pj-card__body { flex: 1; padding: 30px 30px 28px; justify-content: center; }
.lux-home .pj-grid--feature .pj-card:first-child h3 { font-size: clamp(28px, 2.6vw, 36px); }

/* empty state */
.pj-empty { max-width: 640px; margin: 0 auto; padding: 48px 36px; text-align: center; }
.pj-empty__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #F6E3A8, #C9A84C 55%, #8B6E2E 100%); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .7); }
.pj-empty__icon svg { width: 26px; height: 26px; fill: none; stroke: #1A1408; stroke-width: 1.8; stroke-linecap: round; }
.lux-home .pj-empty h3 { margin: 20px 0 8px; font-family: var(--hp-serif); font-size: 28px; font-weight: 600; color: var(--hp-heading); }
.pj-empty p { margin: 0; color: var(--hp-muted); }
.pj-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }

/* ══ Project detail ═══════════════════════════════════════════════════ */
.lux-home .pjd-hero h1 { font-size: clamp(40px, 5.4vw, 76px); }

.pjd-hero__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 4px; }
.pjd-hero__loc { display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .85); font-size: 15px; }
.pjd-hero__loc svg { width: 17px; height: 17px; fill: none; stroke: #E8C97A; stroke-width: 1.5; }

/* facts panel: label + value rows, any number of items */
.pjd-facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; margin: 16px 0 0; }
.pjd-facts dl > div,
.pjd-facts dl > div + div { padding: 0 0 12px; border-left: 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.lux-home .pjd-facts dt { font-family: var(--hp-sans); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.lux-home .pjd-facts dd { margin: 5px 0 0; font-family: var(--hp-serif); font-size: 19px; letter-spacing: 0; text-transform: none; color: #fff; line-height: 1.25; }

/* overview */
.pjd-overview__layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: clamp(40px, 6vw, 88px); align-items: start; }

.pjd-prose { margin-top: 24px; }
.pjd-prose p { margin: 0 0 1em; color: var(--hp-text); font-size: 16.5px; font-weight: 300; line-height: 1.85; }
.pjd-prose p:first-child { font-size: 18px; color: var(--hp-heading); opacity: .9; }

.pjd-card { position: sticky; top: calc(var(--nav-h, 62px) + 30px); padding: 28px 26px 26px; }
.lux-home .pjd-card h3 { margin: 8px 0 18px; font-family: var(--hp-serif); font-size: 24px; font-weight: 600; line-height: 1.2; color: var(--hp-heading); }

.pjd-card__list { margin: 0 0 22px; }
.pjd-card__list > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--hp-line); }
.pjd-card__list dt { color: var(--hp-muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.pjd-card__list dd { margin: 0; color: var(--hp-heading); font-size: 14.5px; text-align: right; }
.pjd-card__list a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--hp-gold-line); }
.pjd-card__list a:hover { color: var(--hp-gold); }

.pjd-card__cta { width: 100%; }
.pjd-card__call { display: block; margin-top: 12px; color: var(--hp-muted); font-size: 13px; text-align: center; text-decoration: none; }
.pjd-card__call:hover { color: var(--hp-gold); }

/* timeline */
.pjd-timeline { margin-top: 34px; padding: 24px 24px 22px; }
.pjd-timeline__head { display: flex; align-items: baseline; justify-content: space-between; }
.pjd-timeline__pct { font-family: var(--hp-serif); font-size: 34px; font-weight: 500; color: var(--hp-gold); }

.pjd-timeline__bar {
  position: relative;
  height: 10px;
  margin: 14px 0 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--hp-line);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .2);
}

.pjd-timeline__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #8B6E2E, #E8C97A 60%, #F6E3A8);
  box-shadow: 0 0 14px rgba(232, 201, 122, .7);
  transition: width 1.8s var(--hp-ease);
}

.pjd-timeline__fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: pj-shine 2.8s linear infinite;
}

@keyframes pj-shine { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.pjd-timeline__dates { display: flex; justify-content: space-between; gap: 16px; color: var(--hp-heading); font-size: 14px; }
.pjd-timeline__dates span:last-child { text-align: right; }
.pjd-timeline__dates small { display: block; color: var(--hp-muted); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }

/* gallery */
.pjd-shots { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 220px; }
.pjd-shots--1 { grid-template-columns: 1fr; grid-auto-rows: clamp(320px, 52vw, 600px); }
.pjd-shots--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 400px; }
.pjd-shots--3 { grid-template-columns: 2fr 1fr; grid-auto-rows: 240px; }
.pjd-shots--3 .pj-shot--lead { grid-row: span 2; }
.pjd-shots--4 .pj-shot--lead,
.pjd-shots--many .pj-shot--lead { grid-column: span 2; grid-row: span 2; }
.pjd-shots--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.pj-shot {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0D0D0B;
  box-shadow: var(--hp-shadow-sm);
}

.pj-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--hp-ease), filter .5s ease; }
.pj-shot:hover img { transform: scale(1.06); filter: brightness(1.05); }

.pj-shot::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(232, 201, 122, .2), transparent 60%), linear-gradient(180deg, transparent 55%, rgba(10, 10, 8, .55));
  opacity: 0;
  transition: opacity .4s ease;
}

.pj-shot:hover::before { opacity: 1; }

.pj-shot::after {
  content: '';
  position: absolute;
  inset: 10px;
  z-index: 2;
  border: 1px solid rgba(232, 201, 122, 0);
  transition: border-color .4s ease, inset .4s var(--hp-ease);
  pointer-events: none;
}

.pj-shot:hover::after { inset: 8px; border-color: rgba(232, 201, 122, .6); }

.pj-shot__zoom {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .06));
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: scale(.8);
  transition: opacity .35s ease, transform .35s var(--hp-ease);
}

.pj-shot__zoom svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; }
.pj-shot:hover .pj-shot__zoom { opacity: 1; transform: none; }

.pj-shot__cap {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 3;
  color: #fff;
  font-size: 13px;
  letter-spacing: .04em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s var(--hp-ease);
}

.pj-shot:hover .pj-shot__cap { opacity: 1; transform: none; }

/* full-screen viewer */
.pj-lb {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: rgba(6, 6, 5, .9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity .3s ease;
}

.pj-lb.is-open { opacity: 1; }
.pj-lb[hidden] { display: none; }

.pj-lb__stage { position: relative; display: grid; place-items: center; margin: 0; height: 100%; min-height: 0; }

.pj-lb__stage img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .9);
  opacity: 0;
  transform: scale(.97);
  transition: opacity .35s ease, transform .45s var(--hp-ease);
}

.pj-lb__stage img.is-in { opacity: 1; transform: none; }

.pj-lb__stage figcaption {
  --sv-glass-bg: linear-gradient(145deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04));
  --sv-glass-line: rgba(255, 255, 255, .16);
  --sv-glass-hi: rgba(255, 255, 255, .22);
  --sv-glass-shadow: none;
  --sv-edge: rgba(232, 201, 122, .6);
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  padding: 9px 18px;
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
}

.pj-lb__btn {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
  color: #fff;
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease, transform .25s var(--hp-ease);
}

.pj-lb__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pj-lb__btn:hover { border-color: #E8C97A; background: linear-gradient(180deg, #E8C97A, #B8902F); color: #0D0D0B; transform: scale(1.05); }
.pj-lb__btn[hidden] { visibility: hidden; display: grid; }
.pj-lb__close { position: absolute; top: 20px; right: 20px; width: 48px; height: 48px; z-index: 2; }
.pj-lb__count { position: absolute; top: 32px; left: 32px; color: rgba(255, 255, 255, .7); font-size: 12px; letter-spacing: .2em; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .pj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pjd-shots, .pjd-shots--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
  .pjd-overview__layout { grid-template-columns: minmax(0, 1fr); }
  .pjd-card { position: static; }
  .pj-filters { margin-top: 18px; position: static; }
}

@media (max-width: 760px) {
  .pj-grid { grid-template-columns: 1fr; }
  .pj-grid--feature .pj-card:first-child { grid-column: auto; flex-direction: column; }
  .pj-grid--feature .pj-card:first-child .pj-card__media { flex: none; min-height: 0; aspect-ratio: 4 / 3; }
  .pj-filters__bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .pj-filters__group { width: 100%; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .pj-filters__group::-webkit-scrollbar { display: none; }
  .pjd-shots, .pjd-shots--2, .pjd-shots--3, .pjd-shots--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 180px; }
  .pjd-shots--3 .pj-shot--lead, .pjd-shots--4 .pj-shot--lead, .pjd-shots--many .pj-shot--lead { grid-column: span 2; grid-row: span 1; }
  .pjd-shots--1 { grid-template-columns: 1fr; grid-auto-rows: 260px; }
  .pj-lb { grid-template-columns: 1fr; padding: 70px 12px 90px; }
  .pj-lb__prev, .pj-lb__next { position: absolute; bottom: 20px; }
  .pj-lb__prev { left: calc(50% - 64px); }
  .pj-lb__next { right: calc(50% - 64px); }
  .pj-lb__stage figcaption { white-space: normal; max-width: 90%; text-align: center; }
  .pj-shot__zoom { opacity: 1; transform: none; width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .pj-dot--running, .pjd-timeline__fill::after { animation: none; }
  .pjd-timeline__fill { transition: none; }
}
