/* Site-wide section spacing (all pages). Spacing only: no colours, fonts, content, images or layout are changed here.

   WHY THE GAPS WERE SO BIG
   Every section carried 180px (up to 210px) of padding on BOTH its top and its bottom edge, so two neighbouring sections
   added up to 360px+ of empty space. Dark bands added another 158-187px inside themselves, the testimonials band was
   forced to min-height 900px, and a few pages stacked an extra bottom padding on top of the next section's top padding.

   THE FIX
   One variable, applied on ONE side. A light section gets space above it only; the section above it gets none below, so the
   gap between any two sections is exactly --section-space and never doubles. Dark bands get a smaller equal padding
   inside the band. The theme and the Novamira snippets use rules with higher specificity, so the values here are marked
   !important; they live only in this one file, which is the single place to change spacing.

   Tight pairs that are deliberate (page title -> its first block, e.g. 52-64px) are left as they were. */
:root{
  --section-space:clamp(56px,7vw,110px);     /* gap between any two sections (desktop 56-110px) */
  --band-space:clamp(48px,6vw,92px);         /* padding inside a dark band, top and bottom */
  --hero-clear:clamp(112px,10vw,150px);      /* clears the fixed header on page titles */
}
@media(max-width:767px){:root{--section-space:56px;--band-space:48px;--hero-clear:104px}}  /* phones: 40-72px target */

/* ---- 1) Light sections: no bottom padding; space above (low specificity so rule 3 can override) ---- */
:where(html body main)>:where(.k-sec:not(.k-blog):not(.k-scope):not(.kts):not(.k-works):not(.k-values),.kpj-gal,.kcl,.kpj-body,.kpj-close,.kb-body,.kbl-list,.k360-frame){padding-bottom:0!important}
:where(html body main)>:where(.k-sec:not(.k-blog):not(.k-scope):not(.kts):not(.k-works):not(.k-values):not(.k-aboutp):not(.k-svc--page),.kpj-gal,.kcl){padding-top:var(--section-space)!important}

/* ---- 2) Dark bands: equal padding inside the band; forced heights released ---- */
html body main>.k-sec.k-blog,
html body main>.k-sec.k-scope,
html body main>.k-sec.k-values,
html body main>.k-sec.k-works,
html body main>.k-sec.kts{padding-top:var(--band-space)!important;padding-bottom:var(--band-space)!important}
html body main>.k-sec.kts{min-height:0!important}
html body .k-cta{padding-top:var(--band-space)!important;padding-bottom:var(--band-space)!important}

/* ---- 3) A light section that sits right above a dark band keeps one gap below it ---- */
html body main>:is(.k-sec:not(.k-blog):not(.k-scope):not(.k-values):not(.k-works):not(.kts),.kpj-gal,.kcl,.kpj-body,.kpj-close,.kb-body,.kbl-list,.k360-frame):has(+ :is(.k-blog,.k-scope,.k-values,.kts,.k-works,.kp2,.k-dark)){padding-bottom:var(--section-space)!important}
/* The call-to-action band comes right after </main>: it carries the gap above it */
html body main + .k-cta{margin-top:var(--section-space)!important}

/* Two plain black bands back to back read as one black area: do not stack the second band's top padding on the first one's bottom.
   (Not for the photo band .kts: the next band keeps its own padding so its label never touches the photo edge.) */
html body main>.k-sec:is(.k-blog,.k-scope,.k-values,.k-works,.k-dark):not(.kts)+.k-sec:is(.k-blog,.k-scope,.k-values,.k-works,.k-dark):not(.kts){padding-top:0!important}

/* ---- 4) Page titles: less blank space under the fixed header ---- */
html body .k-phero.k-dark{padding-top:var(--hero-clear)!important;padding-bottom:var(--band-space)!important}
html body .k-phero--light{padding-top:var(--hero-clear)!important}
html body main>:is(.kb-head,.kbl-head,.kpj-head){padding-top:var(--hero-clear)!important}

/* ---- 5) Services listing page and About intro: their own tuned bottom padding stacked onto the next section's top padding ---- */
html body main>.k-sec.k-svc--page,
html body main>.k-sec.k-aboutp{padding-bottom:0!important}
html body main>.k-sec.k-svc--page:has(+ .k-sec),
html body main>.k-sec.k-aboutp:has(+ .k-sec){padding-bottom:0!important}

/* About intro followed by the Core Values band: keep one gap between the intro text and the black band */
html body main>.k-sec.k-aboutp:has(+ .k-values){padding-bottom:var(--section-space)!important}
