/* Spacing system (4 Nov 2026). Layout-only: no content, no animation.
   8px scale + fluid section rhythm. Loaded site-wide after motion.css. */
:root{
  --space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:24px;
  --space-6:32px;--space-7:48px;--space-8:64px;--space-9:96px;--space-10:128px;
  /* section vertical rhythm: 48px @390 -> ~82px @1440, capped 96px */
  --section-y:clamp(48px,2rem + 3.5vw,96px);
  --section-y-half:calc(var(--section-y) / 2);
  --gutter:clamp(20px,5vw,40px);
  --measure:40em;      /* ~75 characters per line at 16px Montserrat */
  --measure-article:38em; /* ~72 characters per line in blog posts */
}
/* 1. Breathing room between stacked content blocks (Elementor flex containers had 0 vertical padding). */
#dc-root .elementor > .e-con.e-parent:not(.e-con-full){
  --padding-top:var(--section-y-half);--padding-bottom:var(--section-y-half);
  padding-block-start:var(--section-y-half);padding-block-end:var(--section-y-half);
}
/* 2. Body copy rhythm inside text blocks */
#dc-root .elementor-widget-text-editor p:not(:last-child),#dc-root .pxl-text-editor p:not(:last-child),
#dc-root .pxl-item--content p:not(:last-child){margin-bottom:var(--space-4)}
#dc-root .elementor-widget-text-editor p + ul,#dc-root .elementor-widget-text-editor p + ol{margin-top:calc(var(--space-2) * -1)}
#dc-root .elementor-widget-text-editor ul:not(:last-child),#dc-root .elementor-widget-text-editor ol:not(:last-child),
#dc-root .pxl-item--content ul:not(:last-child),#dc-root .pxl-item--content ol:not(:last-child){margin-bottom:var(--space-5)}
#dc-root .elementor-widget-text-editor li + li,#dc-root .pxl-text-editor li + li,#dc-root .pxl-item--content li + li{margin-top:var(--space-2)}
/* Social icons are a row, not stacked copy. This beats the rule above so the second icon stays on the same line. */
#dc-root :is(.elementor-widget-text-editor,.pxl-text-editor,.pxl-item--content) .dc-social > li + li{margin-top:0}
/* 3. Sub-headings inside copy: clear space above, tight to their own text below */
#dc-root .elementor-widget-text-editor :is(h2,h3,h4):not(:first-child),
#dc-root .pxl-item--content :is(h2,h3,h4):not(:first-child){margin-top:var(--space-6)}
#dc-root .elementor-widget-text-editor :is(h2,h3,h4),#dc-root .pxl-item--content :is(h2,h3,h4){margin-bottom:var(--space-3)}
/* 4. Heading widget followed by copy / copy followed by a button */
#dc-root .elementor-widget-heading + .elementor-widget-text-editor{margin-top:var(--space-2)}
#dc-root .elementor-widget-text-editor + .elementor-widget-button{margin-top:var(--space-4)}
/* 5. Blog articles: images and quotes get room */
#dc-root .pxl-item--content :is(figure,img,blockquote):not(:last-child){margin-bottom:var(--space-5)}
#dc-root .pxl-item--content{line-height:1.65}
/* 6. Phones: consistent 20px+ side gutters */
@media (max-width:767px){
  #dc-root .elementor > .e-con.e-parent:not(.e-con-full){padding-inline:max(var(--padding-left,0px),4px)}
  #dc-root .elementor > .elementor-top-section > .elementor-container{padding-inline:4px}
}

/* 7. Readable line length (desktop). The theme's text block (.pxl-item--inner) is inline-block, so a capped
   width keeps each block's own alignment: centred blocks stay centred, left-aligned blocks stay on the left.
   Blocks that hold images, tables, forms or video keep their full width. */
#dc-root .pxl-text-editor .pxl-item--inner:not(:has(img,picture,table,iframe,form,video)){max-width:var(--measure)}
/* .dc-prose fills the column. A 40em stub under a full-width heading leaves a hole on the right. */
#dc-root :is(.dc-residential,.dc-commercial) .dc-prose .pxl-text-editor .pxl-item--inner{display:block;width:100%;max-width:none;text-align:left}
/* .dc-band-end / .dc-band-follow: one section saved as separate containers. The section pad
   would otherwise land on each piece. Join them, and leave a short gap where the next piece starts. */
#dc-root .dc-commercial.elementor > .dc-band-end.e-con.e-parent{padding-block-end:0;--padding-bottom:0px}
#dc-root .dc-commercial.elementor > .dc-band-follow.e-con.e-parent{padding-block-start:var(--space-5);--padding-top:0px}
/* .dc-section-top: the paint-brands row only had padding on the bottom, so it sat flush under the catalogues. */
#dc-root .dc-commercial .dc-section-top{padding-top:var(--section-y)}
/* Vinyl intro is three containers (title, paragraphs, button). Same join, desktop only. */
@media (min-width:768px){
  #dc-root .dc-vinyl.elementor > .dc-band-end.e-con.e-parent{padding-block-end:0;--padding-bottom:0px}
  #dc-root .dc-vinyl.elementor > .dc-band-follow.e-con.e-parent{padding-block-start:var(--space-5);--padding-top:0px}
  #dc-root .dc-vinyl .dc-prose{width:100%;max-width:100%}
  #dc-root .dc-vinyl .dc-prose .pxl-item--inner{display:block;width:100%;max-width:none;text-align:left}
}
/* 8. Blog articles: text column ~72 characters, left edge lined up with the title and cover image; images keep the full column width. */
#dc-root .pxl-item--content > :is(p,ul,ol,h2,h3,h4,h5,h6,blockquote,dl){max-width:var(--measure-article);margin-inline:0}
/* 9. Intro groups (approved by Eric, 4 Nov): where a width-capped text block sits directly above a centred
   button, the block is centred to line up with the button (plain paragraphs centred; blocks with lists keep
   left-aligned text inside the centred block), and a heading directly above it is centred to match.
   Blocks found by the 1440px audit (qa/measure-audit.py); narrow-column cards and numbered/step sequences
   (parquet patterns, vinyl steps) are left as designed so siblings stay consistent. */
@media (min-width:768px){
  #dc-root .dc-lead:has(+ :is(.elementor-widget-pxl_button,.elementor-widget-button).elementor-align-center) .pxl-text-editor{text-align:center}
  #dc-root .dc-lead:has(+ :is(.elementor-widget-pxl_button,.elementor-widget-button).elementor-align-center) .pxl-item--inner:has(ul,ol){text-align:left}
  #dc-root .elementor-widget-heading:has(+ .dc-lead + :is(.elementor-widget-pxl_button,.elementor-widget-button).elementor-align-center) .elementor-heading-title{text-align:center}
  /* Same block on residential painting stays left with that page. Parquet and engineered wood keep the centre above. */
  #dc-root .dc-residential .dc-title-start.elementor-widget-heading .elementor-widget-container .elementor-heading-title{text-align:left}
}
/* 10. "Areas We Serve" on Outdoor Decking and Commercial Painting (approved by Eric, 4 Nov): heading and
   copy centred. Residential painting is left out; its list is left-aligned with the rest of that page. */
@media (min-width:768px){
  #dc-root .dc-center,
  #dc-root .dc-center :is(h1,h2,h3,h4,.elementor-heading-title,[class*=pxl-heading]),
  #dc-root .dc-center .pxl-text-editor{text-align:center}
}
/* 11. Keep intros attached to their content (approved by Eric, 4 Nov). Section gaps stay roomy, but:
   a) a heading/intro-only block directly followed by its card/grid row sits ~32px (phone) to ~48px (desktop) above it;
   b) consecutive card rows sit ~28px apart, close to the gap between cards in a row. */
:root{--intro-gap:clamp(32px,1.5rem + 1.6vw,48px);--row-gap:8px}
/* (no nested :has(), so each rule stands alone) */
#dc-root .elementor > .e-parent:not(.e-con-full):has(> .e-con-inner > :is(.elementor-widget-heading,.elementor-widget-pxl_heading)):not(:has(> .e-con-inner > :not(.elementor-widget-heading,.elementor-widget-pxl_heading,.elementor-widget-pxl_text_editor,.elementor-widget-text-editor,.elementor-widget-divider))):has(+ .e-parent:not(.e-con-full) > .e-con-inner > .e-con.e-child:first-child),
#dc-root .elementor > .e-parent:not(.e-con-full):has(> .e-con-inner > :is(.elementor-widget-heading,.elementor-widget-pxl_heading)):not(:has(> .e-con-inner > :not(.elementor-widget-heading,.elementor-widget-pxl_heading,.elementor-widget-pxl_text_editor,.elementor-widget-text-editor,.elementor-widget-divider))):has(+ .e-parent:not(.e-con-full) > .e-con-inner > .e-con.e-child:first-child) > .e-con-inner{padding-block-end:0}
#dc-root .elementor > .e-parent:not(.e-con-full):has(> .e-con-inner > .e-con.e-child:first-child):not(:has(> .e-con-inner > .elementor-widget)):has(+ .e-parent:not(.e-con-full) > .e-con-inner > .e-con.e-child:first-child),
#dc-root .elementor > .e-parent:not(.e-con-full):has(> .e-con-inner > .e-con.e-child:first-child):not(:has(> .e-con-inner > .elementor-widget)):has(+ .e-parent:not(.e-con-full) > .e-con-inner > .e-con.e-child:first-child) > .e-con-inner{padding-block-end:0}
#dc-root .elementor > .e-parent:not(.e-con-full):has(> .e-con-inner > :is(.elementor-widget-heading,.elementor-widget-pxl_heading)):not(:has(> .e-con-inner > :not(.elementor-widget-heading,.elementor-widget-pxl_heading,.elementor-widget-pxl_text_editor,.elementor-widget-text-editor,.elementor-widget-divider))) + .e-parent:not(.e-con-full):has(> .e-con-inner > .e-con.e-child:first-child):not(:has(> .e-con-inner > .elementor-widget)){padding-block-start:0}
#dc-root .elementor > .e-parent:not(.e-con-full):has(> .e-con-inner > :is(.elementor-widget-heading,.elementor-widget-pxl_heading)):not(:has(> .e-con-inner > :not(.elementor-widget-heading,.elementor-widget-pxl_heading,.elementor-widget-pxl_text_editor,.elementor-widget-text-editor,.elementor-widget-divider))) + .e-parent:not(.e-con-full):has(> .e-con-inner > .e-con.e-child:first-child):not(:has(> .e-con-inner > .elementor-widget)) > .e-con-inner{padding-block-start:var(--intro-gap)}
#dc-root .elementor > .e-parent:not(.e-con-full):has(> .e-con-inner > .e-con.e-child:first-child):not(:has(> .e-con-inner > .elementor-widget)) + .e-parent:not(.e-con-full):has(> .e-con-inner > .e-con.e-child:first-child):not(:has(> .e-con-inner > .elementor-widget)){padding-block-start:0}
#dc-root .elementor > .e-parent:not(.e-con-full):has(> .e-con-inner > .e-con.e-child:first-child):not(:has(> .e-con-inner > .elementor-widget)) + .e-parent:not(.e-con-full):has(> .e-con-inner > .e-con.e-child:first-child):not(:has(> .e-con-inner > .elementor-widget)) > .e-con-inner{padding-block-start:var(--row-gap)}
/* Category archives and single posts zeroed #pxl-main's bottom padding, so the last
   line and the sidebar sit on the footer. */
body:is(.category,.single-post) #pxl-main{padding-bottom:var(--section-y)!important}
/* 12. Legal pages (Privacy Policy, Terms and Conditions; 15 Nov 2026): blog-width reading column, roomy rhythm. */
#dc-root .dc-legal .pxl-entry-content{width:100%;min-width:0;max-width:var(--measure-article);padding-block:var(--section-y);line-height:1.65}
#dc-root .dc-legal h1{margin:0 0 var(--space-4);font-size:clamp(34px,1.2rem + 3.6vw,64px);line-height:1.1;overflow-wrap:break-word}
#dc-root .dc-legal .dc-legal-meta{color:#5f5a52;margin-bottom:var(--space-7)}
#dc-root .dc-legal h2{margin:var(--space-7) 0 var(--space-3);font-size:clamp(24px,1rem + 1vw,30px);line-height:1.25}
#dc-root .dc-legal h3{margin:var(--space-6) 0 var(--space-3);font-size:clamp(19px,.9rem + .5vw,22px);line-height:1.3}
#dc-root .dc-legal p{margin:0 0 var(--space-4)}
#dc-root .dc-legal :is(ul,ol){margin:0 0 var(--space-5);padding-left:1.25em}
#dc-root .dc-legal li + li{margin-top:var(--space-2)}
#dc-root .dc-legal .dc-legal-contact a{text-decoration:underline;text-underline-offset:3px}
/* 14. Home "Why Choose DeCraftsmen Company" (client feedback, 15 Nov 2026): intro centred above, the three
   services as left-aligned cards (stacked on phones/tablets, 3 equal-height columns from 1024px), closing line
   and button centred below. CSS only, same markup/text/headings. Each card is its h3 (top half) + the paragraph
   after it (bottom half), so the halves share one background and border. */
#dc-root .dc-why{--why-pad:clamp(20px,1rem + 1vw,32px);--why-line:#e4e1d8;--why-bg:#faf9f6}
#dc-root .dc-why .dc-why-title .pxl-item--title{font-size:clamp(26px,1rem + 2vw,40px)!important;line-height:1.15!important;max-width:22ch;margin-inline:auto;text-wrap:balance}
#dc-root .dc-why .dc-why-title > .elementor-widget-container{padding-bottom:var(--space-5)!important;margin-bottom:0!important}
#dc-root .dc-why .dc-why-copy .pxl-text-editor{text-align:left}
#dc-root .dc-why .dc-why-copy .pxl-item--inner{display:block;max-width:none;width:100%}
#dc-root .dc-why .dc-why-copy .pxl-item--inner > *{margin:0}
#dc-root .dc-why .dc-why-copy .pxl-item--inner > p:first-child,
#dc-root .dc-why .dc-why-copy .pxl-item--inner > p:last-child{max-width:var(--measure);margin-inline:auto;text-align:center}
#dc-root .dc-why .dc-why-copy .pxl-item--inner > p:first-child{margin-bottom:var(--intro-gap)}
#dc-root .dc-why .dc-why-copy .pxl-item--inner > p:last-child{margin-top:var(--space-7)}
#dc-root .dc-why .dc-why-copy h3{
  background:var(--why-bg);border:1px solid var(--why-line);border-bottom:0;
  padding:var(--why-pad) var(--why-pad) var(--space-3);font-size:clamp(20px,1rem + .5vw,24px);line-height:1.25;text-align:left}
#dc-root .dc-why .dc-why-copy h3::before{content:"";display:block;width:32px;height:2px;background:#A6A182;margin-bottom:var(--space-4)}
#dc-root .dc-why .dc-why-copy h3 + p{
  background:var(--why-bg);border:1px solid var(--why-line);border-top:0;
  padding:0 var(--why-pad) var(--why-pad);text-align:left;line-height:1.65}
#dc-root .dc-why .dc-why-copy h3 + p:not(:nth-last-child(2)){margin-bottom:var(--space-4)}
@media (min-width:768px) and (max-width:1023px){
  #dc-root .dc-why .dc-why-copy .pxl-item--inner > :is(h3,h3 + p){max-width:40rem;margin-inline:auto}
}
@media (min-width:1024px){
  #dc-root .dc-why .e-con-inner,#dc-root .dc-why .dc-why-frame{max-width:1180px}
  #dc-root .dc-why .dc-why-copy .pxl-item--inner{
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:var(--space-5);
    grid-template-areas:"intro intro intro" "t1 t2 t3" "b1 b2 b3" "close close close"}
  #dc-root .dc-why .dc-why-copy .pxl-item--inner > :nth-child(1){grid-area:intro}
  #dc-root .dc-why .dc-why-copy .pxl-item--inner > :nth-child(2){grid-area:t1}
  #dc-root .dc-why .dc-why-copy .pxl-item--inner > :nth-child(3){grid-area:b1}
  #dc-root .dc-why .dc-why-copy .pxl-item--inner > :nth-child(4){grid-area:t2}
  #dc-root .dc-why .dc-why-copy .pxl-item--inner > :nth-child(5){grid-area:b2}
  #dc-root .dc-why .dc-why-copy .pxl-item--inner > :nth-child(6){grid-area:t3}
  #dc-root .dc-why .dc-why-copy .pxl-item--inner > :nth-child(7){grid-area:b3}
  #dc-root .dc-why .dc-why-copy .pxl-item--inner > :nth-child(8){grid-area:close}
  #dc-root .dc-why .dc-why-copy h3 + p:not(:nth-last-child(2)){margin-bottom:0}
  /* accent line stays at the top of every card; titles sit on the paragraph so all three paragraphs start level */
  #dc-root .dc-why .dc-why-copy h3{display:flex;flex-direction:column;gap:var(--space-4)}
  #dc-root .dc-why .dc-why-copy h3::before{margin-bottom:auto}
}
