/* =====================================================================
   RCAPI polish layer (loads last): tighter rhythm, aligned project pages,
   even galleries, news layout. Safe to edit; nothing else depends on it.
   ===================================================================== */

/* ---------- rhythm: less dead space between sections ---------- */
.sec{padding:68px 0}.sec.tight{padding:36px 0}.sec.dark{padding:96px 0}.band{padding:92px 0}
.page-head{padding:64px 0 56px}
.sec-h{margin-bottom:30px}.sec-h h2{margin-bottom:.3rem}
.prose h3.up{margin-top:1.8rem}.prose>h3.up:first-child,.prose>h2+h3.up{margin-top:1.1rem}
@media (max-width:820px){.sec{padding:48px 0}.page-head{padding:48px 0 40px}.sec.dark{padding:72px 0}}

/* ---------- cards: equal heights, aligned text ---------- */
.grid.g3{align-items:stretch}
.pcard .photo,.ncard .photo{aspect-ratio:4/3;width:100%}
.pc-b{gap:0}
.pc-b h3{font-size:1.15rem;line-height:1.3;margin:0 0 .5rem;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.pc-b p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:1rem}
.pc-b .more{padding-top:4px}

/* ---------- project page ---------- */
.proj-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:52px;align-items:start}
.proj-main{min-width:0}
.proj-cover.photo{width:100%;aspect-ratio:16/9;border-radius:24px;margin:0 0 34px;box-shadow:var(--sh2)}
.proj-side{position:sticky;top:96px}
.proj-side .panel{margin:0;padding:26px}
.proj-side .panel h3{margin-bottom:.6rem}
.proj-side .facts div:first-child{padding-top:6px}
.proj-side .facts dd{max-width:60%}
.proj-side .btn{width:100%;justify-content:center;margin-top:20px}
.proj-main .prose h2{font-size:clamp(1.5rem,2.6vw,1.9rem);margin-bottom:.8rem}
.proj-gallery{margin-top:72px}
.proj-gallery .sec-h{margin-bottom:20px}
@media (max-width:900px){.proj-grid{grid-template-columns:1fr;gap:34px}.proj-side{position:static}.proj-gallery{margin-top:48px}.proj-cover.photo{border-radius:18px;margin-bottom:26px}}

/* ---------- galleries: identical tiles, short last row centred ---------- */
.gallery{--cols:3;--gap:14px;display:flex;flex-wrap:wrap;justify-content:center;gap:var(--gap);margin-top:0}
.gallery .g-item{flex:0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));aspect-ratio:var(--ratio,4/3);border-radius:16px;box-shadow:var(--sh)}
.gallery.c1{--cols:1;max-width:760px;margin-inline:auto}
.gallery.c2{--cols:2}
@media (max-width:820px){.gallery{--gap:10px}.gallery.c3{--cols:2}}
@media (max-width:420px){.gallery.c2,.gallery.c3{--cols:1}}

/* ---------- about ---------- */
.about-photo{margin:0}
.about-photo.photo{aspect-ratio:6/5;border-radius:26px;box-shadow:var(--sh2)}
.about-photo.tilt{transform:none}.js .about-photo.tilt.rv.in{transform:none}

/* ---------- news ---------- */
.news-feature{display:grid;grid-template-columns:1.15fr 1fr;gap:0;border-radius:26px;overflow:hidden;background:#fff;border:1px solid var(--line);box-shadow:var(--sh2);text-decoration:none;color:inherit;margin-bottom:34px;transition:transform .5s var(--ease),box-shadow .5s}
.news-feature:hover{transform:translateY(-5px)}
.news-feature .photo{border-radius:0;aspect-ratio:auto;min-height:340px;height:100%}
.nf-b{padding:40px 40px 36px;display:flex;flex-direction:column;justify-content:center;gap:2px}
.nf-b time{font:700 .85rem var(--f-head);color:var(--blue)}
.nf-b h2{font-size:clamp(1.5rem,2.6vw,2.1rem);margin:.4rem 0 .8rem}
.nf-b p{color:var(--mut);margin-bottom:1.3rem}
.nf-b .more{margin-top:0}
.nf-tag{align-self:flex-start;background:var(--gold);color:var(--ink);font:700 .72rem var(--f-head);padding:4px 12px;border-radius:99px;margin-bottom:6px}
.news-more{margin-top:46px}
.post-img.photo{aspect-ratio:16/9;border-radius:24px;box-shadow:var(--sh2);margin-bottom:34px}
.post-gallery{margin-top:50px}
.post-gallery .sec-h{margin-bottom:18px}
@media (max-width:820px){.news-feature{grid-template-columns:1fr}.news-feature .photo{min-height:0;aspect-ratio:16/10}.nf-b{padding:26px 24px 28px}}

/* ---------- showcase + placeholders ---------- */
.psh-shade{background:linear-gradient(180deg,rgba(9,32,78,.04) 12%,rgba(9,32,78,.5) 48%,rgba(9,32,78,.95))}
.psh-panel .ph{display:block}
.psh-panel .ph figcaption{display:none}
.psh-panel .ph .ic{position:absolute;right:7%;top:9%;width:210px;height:210px;opacity:.16;color:#fff}
/* dev-only "add photo" hint: small pill at the bottom of the tile so it never covers content */
.photo.ph{position:relative}
.photo.ph figcaption{position:absolute;left:10px;right:10px;bottom:10px;background:rgba(9,32,78,.72);color:#dbe7ff;border-radius:10px;padding:6px 10px;font-size:.68rem;line-height:1.35;max-width:none;text-align:left}
.photo.ph figcaption b{color:var(--gold)}
.pcard .photo.ph,.ncard .photo.ph{align-content:center}

/* ---------- mobile: header glass effect broke the fixed menu and caused sideways scrolling ---------- */
html,body{overflow-x:clip}
@media (max-width:1020px){.hdr,.hdr.sh{backdrop-filter:none;-webkit-backdrop-filter:none;background:#fff}}
