/* v1.0.26 — selectable curves, gradients and native WordPress section colours.
   The sampled Bézier follows the approved homepage/footer profile.
   Curves are decoration only: they do not add block margins or padding. */
.sprucen-curve-section {
  position:relative;
  --sprucen-depth:var(--sprucen-mobile-depth,18px);
  --sprucen-fade:var(--sprucen-mobile-fade,160px);
  --sprucen-lower-curve:polygon(0.000% 82.143%,1.345% 80.065%,2.709% 78.179%,4.093% 76.480%,5.495% 74.961%,6.915% 73.615%,8.352% 72.437%,9.805% 71.419%,11.275% 70.557%,12.760% 69.842%,14.260% 69.270%,15.774% 68.834%,17.302% 68.528%,18.842% 68.344%,20.395% 68.278%,21.960% 68.322%,23.535% 68.471%,25.121% 68.718%,26.717% 69.056%,28.322% 69.480%,29.935% 69.984%,31.557% 70.560%,33.185% 71.203%,34.821% 71.906%,36.462% 72.663%,38.109% 73.468%,39.761% 74.315%,41.417% 75.196%,43.077% 76.106%,44.740% 77.039%,46.405% 77.989%,48.072% 78.948%,49.740% 79.911%,51.408% 80.871%,53.076% 81.822%,54.744% 82.758%,56.410% 83.673%,58.074% 84.560%,59.736% 85.413%,61.395% 86.225%,63.049% 86.991%,64.700% 87.704%,66.345% 88.357%,67.984% 88.945%,69.617% 89.461%,71.243% 89.899%,72.862% 90.252%,74.473% 90.515%,76.074% 90.681%,77.666% 90.743%,79.249% 90.696%,80.820% 90.533%,82.381% 90.247%,83.929% 89.834%,85.465% 89.285%,86.988% 88.595%,88.497% 87.758%,89.992% 86.767%,91.471% 85.617%,92.935% 84.299%,94.383% 82.810%,95.814% 81.141%,97.228% 79.288%,98.623% 77.243%,100.000% 75.000%,100.000% 100.000%,0.000% 100.000%);
  --sprucen-upper-curve:polygon(0.000% 0.000%,100.000% 0.000%,100.000% 75.000%,98.623% 77.243%,97.228% 79.288%,95.814% 81.141%,94.383% 82.810%,92.935% 84.299%,91.471% 85.617%,89.992% 86.767%,88.497% 87.758%,86.988% 88.595%,85.465% 89.285%,83.929% 89.834%,82.381% 90.247%,80.820% 90.533%,79.249% 90.696%,77.666% 90.743%,76.074% 90.681%,74.473% 90.515%,72.862% 90.252%,71.243% 89.899%,69.617% 89.461%,67.984% 88.945%,66.345% 88.357%,64.700% 87.704%,63.049% 86.991%,61.395% 86.225%,59.736% 85.413%,58.074% 84.560%,56.410% 83.673%,54.744% 82.758%,53.076% 81.822%,51.408% 80.871%,49.740% 79.911%,48.072% 78.948%,46.405% 77.989%,44.740% 77.039%,43.077% 76.106%,41.417% 75.196%,39.761% 74.315%,38.109% 73.468%,36.462% 72.663%,34.821% 71.906%,33.185% 71.203%,31.557% 70.560%,29.935% 69.984%,28.322% 69.480%,26.717% 69.056%,25.121% 68.718%,23.535% 68.471%,21.960% 68.322%,20.395% 68.278%,18.842% 68.344%,17.302% 68.528%,15.774% 68.834%,14.260% 69.270%,12.760% 69.842%,11.275% 70.557%,9.805% 71.419%,8.352% 72.437%,6.915% 73.615%,5.495% 74.961%,4.093% 76.480%,2.709% 78.179%,1.345% 80.065%,0.000% 82.143%);
}
.sprucen-curve-section[data-sprucen-edge="reverse"] {
  --sprucen-lower-curve:polygon(0.000% 75.000%,1.377% 77.243%,2.772% 79.288%,4.186% 81.141%,5.617% 82.810%,7.065% 84.299%,8.529% 85.617%,10.008% 86.767%,11.503% 87.758%,13.012% 88.595%,14.535% 89.285%,16.071% 89.834%,17.619% 90.247%,19.180% 90.533%,20.751% 90.696%,22.334% 90.743%,23.926% 90.681%,25.527% 90.515%,27.138% 90.252%,28.757% 89.899%,30.383% 89.461%,32.016% 88.945%,33.655% 88.357%,35.300% 87.704%,36.951% 86.991%,38.605% 86.225%,40.264% 85.413%,41.926% 84.560%,43.590% 83.673%,45.256% 82.758%,46.924% 81.822%,48.592% 80.871%,50.260% 79.911%,51.928% 78.948%,53.595% 77.989%,55.260% 77.039%,56.923% 76.106%,58.583% 75.196%,60.239% 74.315%,61.891% 73.468%,63.538% 72.663%,65.179% 71.906%,66.815% 71.203%,68.443% 70.560%,70.065% 69.984%,71.678% 69.480%,73.283% 69.056%,74.879% 68.718%,76.465% 68.471%,78.040% 68.322%,79.605% 68.278%,81.158% 68.344%,82.698% 68.528%,84.226% 68.834%,85.740% 69.270%,87.240% 69.842%,88.725% 70.557%,90.195% 71.419%,91.648% 72.437%,93.085% 73.615%,94.505% 74.961%,95.907% 76.480%,97.291% 78.179%,98.655% 80.065%,100.000% 82.143%,100.000% 100.000%,0.000% 100.000%);
  --sprucen-upper-curve:polygon(0.000% 0.000%,100.000% 0.000%,100.000% 82.143%,98.655% 80.065%,97.291% 78.179%,95.907% 76.480%,94.505% 74.961%,93.085% 73.615%,91.648% 72.437%,90.195% 71.419%,88.725% 70.557%,87.240% 69.842%,85.740% 69.270%,84.226% 68.834%,82.698% 68.528%,81.158% 68.344%,79.605% 68.278%,78.040% 68.322%,76.465% 68.471%,74.879% 68.718%,73.283% 69.056%,71.678% 69.480%,70.065% 69.984%,68.443% 70.560%,66.815% 71.203%,65.179% 71.906%,63.538% 72.663%,61.891% 73.468%,60.239% 74.315%,58.583% 75.196%,56.923% 76.106%,55.260% 77.039%,53.595% 77.989%,51.928% 78.948%,50.260% 79.911%,48.592% 80.871%,46.924% 81.822%,45.256% 82.758%,43.590% 83.673%,41.926% 84.560%,40.264% 85.413%,38.605% 86.225%,36.951% 86.991%,35.300% 87.704%,33.655% 88.357%,32.016% 88.945%,30.383% 89.461%,28.757% 89.899%,27.138% 90.252%,25.527% 90.515%,23.926% 90.681%,22.334% 90.743%,20.751% 90.696%,19.180% 90.533%,17.619% 90.247%,16.071% 89.834%,14.535% 89.285%,13.012% 88.595%,11.503% 87.758%,10.008% 86.767%,8.529% 85.617%,7.065% 84.299%,5.617% 82.810%,4.186% 81.141%,2.772% 79.288%,1.377% 77.243%,0.000% 75.000%);
}
.sprucen-curve-section::after,
.sprucen-refresh.sprucen-curve-section::after {
  content:"";
  position:absolute;
  left:0;
  right:auto;
  top:calc(-1 * var(--sprucen-depth));
  bottom:auto;
  width:100%;
  height:calc(var(--sprucen-depth) + 1px);
  background:var(--sprucen-section-paint,transparent);
  clip-path:var(--sprucen-lower-curve);
  transform:none;
  pointer-events:none;
  z-index:2;
}
/* Equal-colour joins have no visible edge; zero depth is also a flat join. */
.sprucen-curve-section[data-sprucen-edge="straight"]::after,
.sprucen-curve-section[data-sprucen-same-background="true"]::after,
.sprucen-curve-section[data-sprucen-zero-depth="true"]::after {display:none}
@media(min-width:782px) {
  .sprucen-curve-section {--sprucen-depth:var(--sprucen-desktop-depth,28px);--sprucen-fade:var(--sprucen-desktop-fade,200px)}
}
/* WordPress's narrower page canvas may be inside a desktop-sized editor. */
@container(max-width:781px) {
  .sprucen-designed-page .sprucen-curve-section {--sprucen-depth:var(--sprucen-mobile-depth,18px);--sprucen-fade:var(--sprucen-mobile-fade,160px)}
  .editor-styles-wrapper .sprucen-curve-section {--sprucen-fade:var(--sprucen-mobile-fade,160px)}
}
/* No second edge from the former inner-page or footer implementation. */
.sprucen-curve-section:not(.sprucen-home-band):not(.wp-block-cover)::before {content:none}
.sprucen-footer-frame.sprucen-curve-section > .sprucen-footer-curve {display:none}
/* Columns keep their approved content width; only their colour extends
   to the page edges. JS replaces the fallback with the exact canvas width. */
.sprucen-home-band {position:relative;isolation:isolate}
.sprucen-home-band::before,
.sprucen-refresh.sprucen-home-band::before {
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:var(--sprucen-bleed-left,calc((100% - 100vw) / 2));
  width:var(--sprucen-bleed-width,100vw);
  transform:none;
  background:var(--sprucen-section-paint,transparent)!important;
  pointer-events:none;
  z-index:-2;
}
.sprucen-home-band.sprucen-curve-section::after {
  left:var(--sprucen-bleed-left,calc((100% - 100vw) / 2));
  width:var(--sprucen-bleed-width,100vw);
  z-index:-1;
  background:var(--sprucen-section-paint,transparent);
}
/* Extend only the sides: the block itself retains its native paint. This
   also avoids applying semi-transparent colours twice over the content. */
.sprucen-home-band[data-sprucen-band-sized="true"]::before {
  clip-path:polygon(0 0,var(--sprucen-bleed-inset) 0,var(--sprucen-bleed-inset) 100%,0 100%,0 0,100% 0,100% 100%,calc(var(--sprucen-bleed-inset) + var(--sprucen-band-width)) 100%,calc(var(--sprucen-bleed-inset) + var(--sprucen-band-width)) 0,100% 0);
}
/* These three old blocks had theme overrides, rather than saved colours.
   Selecting them once in the editor prepares native attributes. Thereafter
   these compatibility rules no longer match, including after Clear colour. */
.sprucen-home-band.sprucen-legacy-colours {background:var(--sprucen-section-paint)!important}
/* At a photo entry, the adjoining section's paint lies over the photograph.
   Core Cover colours/opacity and the photo itself remain independent. */
.sprucen-curve-section.wp-block-cover:not(.sprucen-home-hero)::after {
  top:-1px;
  background:var(--sprucen-previous-paint,transparent);
  clip-path:var(--sprucen-upper-curve);
}
.sprucen-area-cover.sprucen-curve-section::before {
  content:"";
  position:absolute;
  top:auto;
  bottom:-1px;
  left:0;
  right:0;
  width:100%;
  height:160px;
  background:linear-gradient(to bottom,transparent,var(--sprucen-next-paint,transparent));
  clip-path:none;
  pointer-events:none;
  z-index:2;
}
/* What I do owns the first curve. The existing hero height reserves enough
   space for every allowed mobile/desktop depth below the landing view. */
.sprucen-home-hero.sprucen-joined-hero > .sprucen-hero-curve,
.sprucen-home-hero:has(+ .sprucen-refresh-intro.sprucen-curve-section) > .sprucen-hero-curve {display:none}
.editor-styles-wrapper .sprucen-home-hero.sprucen-joined-hero::before {content:none!important;display:none}

/* Gradients use existing section space, never a spacer or extra block.
   Masking supports native custom colours without recolouring images/text.
   The black/transparent mask controls opacity only, not brand colours. */
.sprucen-curve-section[data-sprucen-edge="gradient"]::after,
.sprucen-curve-section.wp-block-cover:not(.sprucen-home-hero)[data-sprucen-edge="gradient"]::after,
.sprucen-home-band.sprucen-curve-section[data-sprucen-edge="gradient"]::after {
  content:"";
  display:block;
  position:absolute;
  top:-1px;
  bottom:auto;
  left:0;
  right:auto;
  width:100%;
  height:min(var(--sprucen-fade,var(--sprucen-mobile-fade,160px)),100%);
  background:var(--sprucen-previous-paint,transparent);
  clip-path:none;
  -webkit-mask-image:linear-gradient(to bottom,#000,transparent);
  mask-image:linear-gradient(to bottom,#000,transparent);
  transform:none;
  pointer-events:none;
  z-index:2;
}
.sprucen-home-band.sprucen-curve-section[data-sprucen-edge="gradient"]::after {
  left:var(--sprucen-bleed-left,calc((100% - 100vw) / 2));
  width:var(--sprucen-bleed-width,100vw);
  z-index:-1;
}
/* Content stays above the fade, including the Cover overlay/photo layers. */
.sprucen-curve-section[data-sprucen-edge="gradient"] > :not(.wp-block-cover__background):not(.wp-block-cover__image-background):not(.wp-block-cover__video-background):not(.sprucen-hero-picture):not(.sprucen-footer-inner):not(.sprucen-footer-curve) {
  position:relative;
  z-index:3;
}
/* Footer light text keeps its dark background. Its gradient uses the empty
   space above the Footer, limited at runtime to avoid covering earlier text. */
.sprucen-footer-frame[data-sprucen-edge="gradient"]::after {
  top:calc(-1 * var(--sprucen-footer-fade,0px));
  height:calc(var(--sprucen-footer-fade,0px) + 1px);
  background:var(--sprucen-section-paint,transparent);
  -webkit-mask-image:linear-gradient(to bottom,transparent,#000);
  mask-image:linear-gradient(to bottom,transparent,#000);
}
/* The painted Footer Group must not draw a second edge. */
.sprucen-footer-inner:not(.sprucen-curve-section)[data-sprucen-edge="gradient"]::after {content:none;display:none}
/* Photo-to-colour fades are drawn over the photo, never as a second join. */
.sprucen-curve-section[data-sprucen-edge="gradient"][data-sprucen-gradient-on-photo="true"]::after,
.sprucen-curve-section[data-sprucen-edge="gradient"][data-sprucen-same-background="true"]::after,
.sprucen-curve-section[data-sprucen-edge="gradient"][data-sprucen-zero-depth="true"]::after,
.sprucen-curve-section.wp-block-cover[data-sprucen-edge="gradient"][data-sprucen-zero-depth="true"]::after {display:none}
.wp-block-cover[data-sprucen-exit-fade="gradient"]::before {
  content:"";
  display:block;
  position:absolute;
  top:auto;
  bottom:-1px;
  left:0;
  right:0;
  width:100%;
  height:min(var(--sprucen-exit-fade,160px),100%);
  background:var(--sprucen-next-paint,transparent);
  clip-path:none;
  -webkit-mask-image:linear-gradient(to bottom,transparent,#000);
  mask-image:linear-gradient(to bottom,transparent,#000);
  transform:none;
  pointer-events:none;
  z-index:2;
}
.wp-block-cover[data-sprucen-exit-fade="gradient"] > .wp-block-cover__inner-container {position:relative;z-index:3}
.editor-styles-wrapper .sprucen-home-hero.sprucen-joined-hero[data-sprucen-exit-fade="gradient"]::before {content:""!important;display:block}
.sprucen-area-cover.sprucen-curve-section[data-sprucen-exit-fade="none"]::before {content:none;display:none}
