/* ---------------------------------------------------------------------------
   WordPress additions.

   global.css is the design as it came out of the static build. Everything in
   this file exists only because the site is now a CMS: accessibility helpers,
   editor notices, form states, and the handful of elements the static pages
   faked (photo placeholders that now hold real photos, links that used to be
   divs, block tone and spacing modifiers).
   --------------------------------------------------------------------------- */

/* Hiding ------------------------------------------------------------------ */
/* The insights and portfolio filters hide cards with the `hidden` property.
   `.post-card` and `.inv-card` both set `display`, and an author rule beats the
   browser's built-in [hidden] rule, so the cards stayed visible. State it. */
[hidden]{display:none!important}

/* Accessibility ---------------------------------------------------------- */
.screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip-link{position:absolute;left:-9999px;z-index:9999;padding:.9rem 1.4rem;background:var(--gold);color:#fff;font-size:.8rem;letter-spacing:.08em;text-transform:uppercase}
.skip-link:focus{left:1rem;top:1rem}
:focus-visible{outline:2px solid var(--gold);outline-offset:3px}

/* Editor-facing notices --------------------------------------------------- */
.sig-notice,.sig-missing-block{max-width:900px;margin:8rem auto;padding:1.6rem 1.8rem;border:1px dashed var(--border-dark);background:var(--ivory-2);color:var(--text-mid);font-size:.9rem;line-height:1.7}
.sig-missing-block{margin:2rem auto;border-color:#c0392b;color:#c0392b}
.sig-notice a{color:var(--gold-dark);border-bottom:1px solid currentColor}

/* Forms ------------------------------------------------------------------- */
.sig-hp{position:absolute!important;left:-9999px;width:1px;height:1px;overflow:hidden}
.f-error{display:none;margin-top:1rem;padding:.9rem 1.1rem;border-left:2px solid #c0392b;background:rgba(192,57,43,.06);color:#9c2c20;font-size:.85rem;line-height:1.6}
.f-error.show{display:block}
[dir="rtl"] .f-error{border-left:none;border-right:2px solid #c0392b}
.sig-form button[disabled]{opacity:.55;cursor:progress}

/* Elements the static pages only mocked up ------------------------------- */
.team-ph.has-photo{padding:0;background:none}
.team-ph.has-photo img{width:100%;height:100%;object-fit:cover;display:block}
.team-bio{margin-top:.9rem;font-size:.84rem;line-height:1.75;color:var(--text-dim)}
.team-social{display:inline-flex;margin-top:1rem;color:var(--gold-dark);transition:var(--tr)}
.team-social svg{width:18px;height:18px;fill:currentColor;stroke:none}
.team-social:hover{color:var(--gold)}

.why-desc{margin-top:.6rem;font-size:.86rem;line-height:1.8;color:var(--text-dim)}

.nav-logo-text{font-family:var(--serif);font-size:1.5rem;letter-spacing:.04em;color:#fff}
nav.solid .nav-logo-text{color:var(--text)}
.logo-slide-text{font-family:var(--serif);font-size:1.1rem;color:var(--gold)}

.foot-social{display:flex;flex-wrap:wrap;gap:1.1rem;margin-top:1.4rem}
.foot-social a{font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;color:var(--text-dim);transition:var(--tr)}
.foot-social a:hover{color:var(--gold)}
.foot-legal{display:flex;gap:1.4rem;flex-wrap:wrap}

/* Cards that became links ------------------------------------------------- */
a.sector-card,a.insight-main,a.insight-row,a.post-card-img{color:inherit;text-decoration:none;display:block}
a.insight-row{display:flex;gap:1rem;align-items:flex-start}

/* Legal pages: sections are now real markup rather than JS-injected HTML --- */
.legal-section{scroll-margin-top:120px}
.legal-section+.legal-section{margin-top:2.8rem}
.legal-h{font-family:var(--serif);font-size:1.6rem;font-weight:400;color:var(--text);margin-bottom:.9rem}
.legal-p{font-size:.92rem;line-height:1.95;color:var(--text-mid)}
.legal-p p+p{margin-top:1rem}
.legal-p a{color:var(--gold-dark);border-bottom:1px solid rgba(135,122,65,.4)}

/* Fallback template ------------------------------------------------------- */
.sig-generic{padding:11rem 4rem 6rem}
.sig-generic-inner{max-width:900px;margin:0 auto}
.post-card-wide+.post-card-wide{margin-top:3rem;padding-top:3rem;border-top:1px solid var(--border)}

/* Block tone + spacing modifiers ------------------------------------------ */
.sig-block.space-none{padding-top:0;padding-bottom:0}
.sig-block.space-tight{padding-top:3.5rem;padding-bottom:3.5rem}
.sig-block.space-loose{padding-top:9rem;padding-bottom:9rem}
.sig-block.tone-pale{background:var(--gold-pale)}
.sig-block.tone-dark{background:var(--dark);color:#fff}
.sig-block.tone-dark .display,.sig-block.tone-dark .section-eyebrow{color:#fff}
.sig-block.tone-dark .body-p{color:rgba(255,255,255,.78)}

@media(max-width:900px){
	.sig-generic{padding:8rem 1.5rem 4rem}
	.sig-block.space-loose{padding-top:5rem;padding-bottom:5rem}
}

/* Gallery: two pages, one class name -------------------------------------- */
/*
 * index.html carried `.gallery{display:none}` — the homepage gallery was
 * switched off in the static build — and gallery.html reused the same class
 * name. Merging the fifteen stylesheets carried that page-level override onto
 * the gallery page and hid it, and left the two `.gallery-masonry` variants
 * (homepage CSS-grid masonry vs gallery-page justified rows) overwriting each
 * other. Both are now scoped to the layout the block declares.
 *
 * The homepage block keeps the original behaviour: still hidden. Delete that
 * block from the Home page if you want it gone for good, or remove this
 * comment's counterpart rule to switch it on.
 */
.gallery.gallery-justified{display:block}

.gallery-masonry[data-layout="masonry"]{display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:4px;column-gap:10px;row-gap:0}
.gallery-masonry[data-layout="justified"]{display:flex;flex-wrap:wrap;gap:1.5rem}

@media(max-width:1100px){.gallery-masonry[data-layout="masonry"]{grid-template-columns:repeat(3,1fr)}}
@media(max-width:720px){.gallery-masonry[data-layout="masonry"]{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.gallery-masonry[data-layout="justified"]{display:block}}

/*
 * The gallery heading, continued.
 *
 * On the homepage the gallery sits on a dark ground, so index.html styled the
 * heading white and centred it. gallery.html reuses `.gallery-head` on an ivory
 * ground and relied on the defaults — but the merged stylesheet handed it the
 * homepage's white title, which was invisible against ivory. These restore the
 * gallery page's own appearance, measured off the static file.
 */
.gallery-justified .gallery-head{text-align:left}
.gallery-justified .gallery-head .section-eyebrow{justify-content:flex-start;color:var(--gold-dark)}
.gallery-justified .gallery-head .section-eyebrow::before{background:var(--gold)}
.gallery-justified .gallery-head .display{color:var(--dark)}
.gallery-justified .gallery-head .display em{color:var(--gold-dark)}
.gallery-justified .gallery-head p{text-align:left}
