/* ============================================================
   SRM Bouw — project gallery (projecten.html), data from js/gallery-data.js
   ============================================================ */
.pg { padding-top: 10px; }
.pg [hidden] { display: none !important; }

/* filter: segmented control with counts */
.pg-seg { display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: var(--paper); box-shadow: 0 1px 0 var(--line), inset 0 0 0 1px var(--line);
  width: max-content; max-width: 100%; overflow: auto; scrollbar-width: none; }
.pg-seg::-webkit-scrollbar { display: none; }
.pg-tools { margin-bottom: 26px; }
.pg-seg__b { white-space: nowrap; padding: 10px 16px; border-radius: 999px; font-weight: 800; font-size: .92rem; display: flex; gap: 8px; align-items: center; color: var(--ink); transition: background .3s var(--ease), color .3s var(--ease); }
.pg-seg__b i { font-style: normal; font-size: .72rem; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 99px; background: var(--sand); color: var(--muted); }
.pg-seg__b:hover { background: var(--sand); }
.pg-seg__b.is-on { background: var(--ink); color: var(--cream); }
.pg-seg__b.is-on i { background: var(--ember); color: #fff; }

.pg-chip { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 99px; background: var(--sand); color: #7a5a1c; }
.pg-chip--e { background: rgba(31,63,191,.14); color: var(--ember); }
.pg-chip--solid { background: var(--ember); color: #fff; }
.pg-chip--live { background: var(--gold); color: var(--ink); margin-left: 6px; }
.pg-cta { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 12px 20px; border-radius: 99px; background: var(--ember); color: #fff; font-weight: 800; text-decoration: none; transition: background .3s var(--ease); }
.pg-cta:hover { background: var(--ember-d); }
.pg-cta--ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.28); }
.pg-cta--ghost:hover { background: rgba(255,255,255,.08); }
/* SRM: the logo blue is too dark for chips on ink (NSV's ember read fine there) */
.pg-feat .pg-chip--e, .pg-endcta .pg-chip--e { background: rgba(75,108,214,.28); color: #C3D0FF; }
.pg-facts strong { white-space: nowrap; }
.pg-link { font-weight: 800; color: var(--ember); text-decoration: underline; text-underline-offset: 3px; }

@keyframes pgIn { from { opacity: 0; transform: translateY(14px); } }

/* featured project */
.pg-feat { display: grid; grid-template-columns: 1.5fr 1fr; border-radius: var(--r-lg); overflow: hidden; background: var(--ink); color: var(--cream);
  margin-bottom: 22px; min-height: 440px; animation: pgIn .6s var(--ease) both; box-shadow: var(--shadow); }
.pg-feat__ph { overflow: hidden; min-height: 280px; }
.pg-feat__ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.pg-feat:hover .pg-feat__ph img { transform: scale(1.05); }
.pg-feat__tx { padding: clamp(24px, 3.2vw, 40px); display: flex; flex-direction: column; gap: 14px; justify-content: flex-end; }
.pg-feat h3 { font-family: var(--font-display); font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.15; margin: 0; }
.pg-feat p { opacity: .75; line-height: 1.6; margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pg-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 4px; }
.pg-stats div { font-size: .8rem; color: rgba(251,247,240,.65); }
.pg-stats strong { display: block; font-family: var(--font-display); font-size: 1.35rem; color: var(--gold); }

/* cards */
.pg-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pg-card { display: block; text-align: left; border-radius: var(--r); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s; animation: pgIn .6s var(--ease) both; }
.pg-card:nth-child(3n+2) { animation-delay: .06s; } .pg-card:nth-child(3n) { animation-delay: .12s; }
.pg-card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.pg-card__ph { aspect-ratio: 4/3; overflow: hidden; position: relative; background: var(--sand); }
.pg-card__ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.pg-card:hover .pg-card__ph img { transform: scale(1.06); }
.pg-n, .pg-live { position: absolute; top: 12px; font-size: .72rem; font-weight: 800; padding: 5px 9px; border-radius: 99px; }
.pg-n { right: 12px; background: rgba(16,14,11,.7); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pg-live { left: 12px; background: var(--gold); color: var(--ink); }
.pg-card__bd { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.pg-card h4 { font-family: var(--font-display); font-size: 1.08rem; line-height: 1.25; margin: 0; }
.pg-card__mt { display: flex; justify-content: space-between; gap: 10px; font-size: .85rem; color: var(--muted); }
.pg-card__mt span:last-child { color: var(--ember); font-weight: 800; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* states */
.pg-skel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pg-skel div { aspect-ratio: 4/3.6; border-radius: var(--r); background: linear-gradient(100deg, var(--sand) 40%, var(--cream) 50%, var(--sand) 60%) 0 0 / 300% 100%; animation: pgSk 1.4s linear infinite; }
.pg-skel div:first-child { grid-column: 1 / -1; aspect-ratio: auto; height: 380px; }
@keyframes pgSk { to { background-position: -150% 0; } }
.pg-empty { text-align: center; padding: 40px 20px; background: var(--paper); border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); }
.pg-empty p { margin: 0 0 12px; color: var(--muted); }
.pg-soon { background: var(--ink); color: var(--cream); border-radius: var(--r-lg); padding: clamp(28px, 5vw, 56px); display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.pg-soon h3 { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2.1rem); line-height: 1.15; margin: 0; }
.pg-soon p { margin: 0; opacity: .72; line-height: 1.65; }

/* ---------- album ---------- */
html.pg-lock, html.pg-lock body { overflow: hidden; }
.pg-alb { position: fixed; inset: 0; z-index: 600; background: var(--cream); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  opacity: 0; visibility: hidden; transform: translateY(24px); transition: opacity .4s var(--ease), transform .5s var(--ease), visibility 0s .5s; }
.pg-alb.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .4s var(--ease), transform .5s var(--ease); }
.pg-alb__top { position: sticky; top: 0; z-index: 5; background: rgba(251,247,240,.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.pg-alb__top .container { display: flex; align-items: center; gap: 14px; height: 64px; }
.pg-back { display: flex; align-items: center; gap: 8px; font-weight: 800; padding: 9px 16px; border-radius: 99px; box-shadow: inset 0 0 0 1.5px var(--line); flex: none; transition: background .3s, color .3s; }
.pg-back:hover { background: var(--ink); color: var(--cream); }
.pg-alb__ttl { font-family: var(--font-display); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .3s; min-width: 0; }
.pg-alb.is-scrolled .pg-alb__ttl { opacity: 1; }
.pg-x { margin-left: auto; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: var(--cream); font-size: 1.1rem; flex: none; }
.pg-alb__load { height: 60vh; display: grid; place-items: center; }
.pg-alb__load::after { content: ""; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--sand); border-top-color: var(--ember); animation: pgSpin .8s linear infinite; }
@keyframes pgSpin { to { transform: rotate(360deg); } }

.pg-hero { position: relative; height: min(62vh, 560px); border-radius: 0 0 var(--r-lg) var(--r-lg); overflow: hidden; background: var(--ink); }
.pg-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.pg-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(16,14,11,.88), rgba(16,14,11,0) 62%); }
.pg-hero .container { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding-bottom: 34px; color: var(--cream); }
.pg-hero h2 { font-family: var(--font-display); font-size: clamp(1.7rem, 4.6vw, 3.4rem); line-height: 1.08; margin: 12px 0 0; max-width: 860px; }
.pg-intro { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; padding: 38px 0 10px; align-items: start; }
.pg-intro p { font-size: 1.05rem; line-height: 1.7; color: #3f3a33; margin: 0; white-space: pre-line; }
.pg-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pg-facts div { background: var(--paper); border-radius: var(--r); padding: 16px 18px; box-shadow: inset 0 0 0 1px var(--line); font-size: .8rem; color: var(--muted); }
.pg-facts strong { display: block; font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); margin-bottom: 2px; }
.pg-stnav { position: sticky; top: 64px; z-index: 4; padding: 14px 0; background: linear-gradient(var(--cream) 75%, rgba(251,247,240,0)); }
.pg-stg { padding: 26px 0 8px; }
.pg-stg__h { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.pg-stg__h b { font-family: var(--font-display); font-size: .8rem; color: var(--ember); }
.pg-stg__h h3 { font-family: var(--font-display); font-size: 1.45rem; margin: 0; }
.pg-stg__h span { color: var(--muted); font-size: .9rem; }
.pg-stg__h::after { content: ""; flex: 1; height: 1px; background: var(--line); min-width: 40px; }
.pg-mas { columns: 3; column-gap: 14px; }
.pg-mas button { display: block; width: 100%; margin: 0 0 14px; border-radius: 16px; overflow: hidden; break-inside: avoid; position: relative; background: var(--sand); }
.pg-mas img { display: block; width: 100%; height: auto; transition: transform .8s var(--ease); }
.pg-mas button:hover img { transform: scale(1.04); }
.pg-mas small { position: absolute; left: 10px; bottom: 10px; right: 10px; width: max-content; max-width: calc(100% - 20px); background: rgba(16,14,11,.68); color: #fff; font-size: .74rem; font-weight: 700;
  padding: 5px 10px; border-radius: 99px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-end { margin: 40px 0 60px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.pg-end--one { grid-template-columns: 1fr; }
.pg-endcta { background: var(--ink); color: var(--cream); border-radius: var(--r-lg); padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.pg-endcta h3 { font-family: var(--font-display); font-size: 1.5rem; margin: 0; }
.pg-endcta p { opacity: .7; margin: 0; }
.pg-endcta__b { display: flex; flex-wrap: wrap; gap: 10px; }
.pg-next { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 220px; text-align: left; color: #fff; }
.pg-next img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.pg-next:hover img { transform: scale(1.05); }
.pg-next::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(16,14,11,.85), rgba(16,14,11,.1)); }
.pg-next div { position: absolute; left: 24px; right: 24px; bottom: 22px; z-index: 2; }
.pg-next small { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.pg-next h4 { font-family: var(--font-display); font-size: 1.3rem; margin: 6px 0 0; }

/* ---------- lightbox ---------- */
.pg-lb { position: fixed; inset: 0; z-index: 700; background: #0A0907; display: none; flex-direction: column; color: #fff; touch-action: pan-y; }
.pg-lb.is-on { display: flex; }
.pg-lb__top { display: flex; align-items: center; gap: 18px; padding: 16px 20px; font-size: .9rem; }
.pg-lb__top > div { min-width: 0; }
.pg-lb__st { display: block; color: var(--gold); font-weight: 800; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-lb__t { font-family: var(--font-display); font-size: .85rem; }
.pg-lb__n { opacity: .7; flex: none; }
.pg-lb__x { margin-left: auto; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 1.1rem; flex: none; }
.pg-lb__stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 76px; }
.pg-lb__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 10px; user-select: none; -webkit-user-drag: none; }
.pg-lb__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 1.3rem; transition: background .25s; }
.pg-lb__nav:hover { background: var(--ember); }
.pg-lb__nav.p { left: 14px; } .pg-lb__nav.n { right: 14px; }
.pg-lb__th { display: flex; gap: 8px; padding: 14px 20px 20px; overflow-x: auto; scrollbar-width: none; }
.pg-lb__th::-webkit-scrollbar { display: none; }
.pg-lb__th button { flex: none; width: 74px; height: 54px; border-radius: 8px; overflow: hidden; opacity: .4; transition: opacity .25s; }
.pg-lb__th button img { width: 100%; height: 100%; object-fit: cover; }
.pg-lb__th button.is-on { opacity: 1; outline: 2px solid var(--ember); outline-offset: 2px; }

@media (max-width: 960px) {
  .pg-cards, .pg-skel { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 860px) {
  .pg-feat { grid-template-columns: 1fr; min-height: 0; }
  .pg-feat__ph { aspect-ratio: 4/3; min-height: 0; }
  .pg-intro { grid-template-columns: 1fr; gap: 22px; padding-top: 26px; }
  .pg-mas { columns: 2; column-gap: 10px; }
  .pg-mas button { margin-bottom: 10px; border-radius: 12px; }
  .pg-mas small { display: none; }
  .pg-end { grid-template-columns: 1fr; }
  .pg-lb__stage { padding: 0 8px; }
  .pg-lb__nav { display: none; }
}
@media (max-width: 560px) {
  .pg-cards, .pg-skel { grid-template-columns: 1fr; }
  .pg-seg { flex-wrap: wrap; border-radius: 22px; width: auto; }
  .pg-seg__b { padding: 9px 12px; font-size: .85rem; }
  .pg-back { padding: 8px 12px; }
  .pg-facts strong { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pg-feat, .pg-card { animation: none; }
  .pg-alb { transition: none; }
}
