/* Sprucen Services and Projects refinements.
   Scoped plugin overrides keep the approved native page structure editable.
   Important declarations counter the installed plugin's important rules. */

/* v1.0.92 — align About, Services, Projects and Contact page titles with
   the higher title position used on individual project pages. Keep the existing
   header, intro typography and internal section spacing unchanged. */
.sprucen-designed-main,
.wp-site-blocks main:has(.wp-block-post-content .sprucen-designed-page){
  --sprucen-page-title-top:72px;
  margin-top:0!important;
  padding-top:calc(var(--sprucen-page-title-top) - 14px)!important;
}
.wp-site-blocks main .wp-block-group:has(.wp-block-post-content .sprucen-designed-page){
  margin-top:0!important;
  padding-top:0!important;
}
:is(.sprucen-page-about,.sprucen-page-services,.sprucen-page-projects,.sprucen-page-contact)
  :is(.sa-intro,.sp-intro,.sc-intro){
  padding-top:14px;
}
@media(min-width:600px) and (max-width:781px){
  .sprucen-designed-main,
  .wp-site-blocks main:has(.wp-block-post-content .sprucen-designed-page){
    --sprucen-page-title-top:72px;
  }
}
@media(min-width:782px){
  .sprucen-designed-main,
  .wp-site-blocks main:has(.wp-block-post-content .sprucen-designed-page){
    --sprucen-page-title-top:calc(2 * var(--wp--preset--spacing--60,clamp(30px,7vw,70px)) - 26px);
  }
}

/* Bring the first curve 8px closer to the introduction on the mobile layout.
   Scope by page width so the same spacing also appears in the narrow editor. */
@container (max-width:699px){
  .sprucen-page-services .sa-intro,
  .sprucen-page-projects .sp-intro,
  .sprucen-page-contact .sc-intro{
    padding-bottom:48px;
  }
}

/* Desktop introductory copy uses the same full content width as its title.
   The selectors follow the blocks, so edits to their wording need no CSS. */
@media(min-width:783px){
 @container (min-width:700px){
  .sprucen-page-services .sa-intro>p,
  .sprucen-page-projects .sp-intro>p,
  .sprucen-page-contact .sc-intro>p{
    width:100%;
    max-width:none;
    font-size:24px;
    line-height:1.5;
  }
  /* Both text blocks flow down the left column; the half-width portrait
     starts alongside the quote. Auto-placement lets added text blocks flow
     into subsequent rows instead of overlapping the existing paragraph. */
  .sprucen-page-about .sa-intro{padding-bottom:28px}
  .sprucen-page-about .sa-about-intro{
    grid-template-rows:auto auto;
    row-gap:24px;
    align-items:start;
  }
  .sprucen-page-about .sa-about-intro>*:not(.wp-block-image){
    grid-column:1;
    grid-row:auto;
  }
  .sprucen-page-about .sa-about-intro>h2{
    max-width:none;
    align-self:end;
  }
  .sprucen-page-about .sa-about-intro>.wp-block-image{
    grid-column:2;
    grid-row:1 / span 2;
    align-self:start;
  }
  .sprucen-page-about .sa-about-intro>.wp-block-image,
  .sprucen-page-about .sa-about-intro>.wp-block-image img{
    aspect-ratio:8/5;
  }
  .sprucen-page-about .sa-about-intro>.wp-block-image img{
    object-position:center 30%;
  }
 }
}

/* Equal space on both sides of the editable note after the workflow steps. */
.sprucen-page-services .sa-process + p{
  margin-block:32px;
}
.sprucen-page-services .sa-process + p + .sprucen-link-wrap .sa-process-cta{
  margin-top:0;
  padding-top:0;
  vertical-align:top;
}
@container sprucenservicesthreecolumns (min-width:700px){
  .sprucen-page-services .sa-process + p{margin-block:40px}
}

/* One horizontal card per phone row, with room between the cards. */
.sprucen-page-projects .sprucen-projects-grid{
  grid-template-columns:minmax(0,1fr)!important;
  grid-auto-rows:minmax(11.25rem,1fr)!important;
  row-gap:32px!important;
  column-gap:24px!important;
  align-items:stretch!important;
}
.sprucen-page-projects .sprucen-projects-grid .sprucen-project-card{
  display:grid!important;
  grid-template-columns:44% minmax(0,1fr);
  align-items:stretch!important;
  align-self:stretch!important;
  height:auto!important;
  min-height:0!important;
  padding:0!important;
  border-radius:14px!important;
}
.sprucen-page-projects .sprucen-projects-grid .sprucen-project-card__body{
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  align-items:stretch;
  align-self:stretch;
  min-height:0!important;
  padding:16px 14px!important;
}
.sprucen-page-projects .sprucen-projects-grid .sprucen-project-card__title{
  order:1;
  margin:0 0 8px!important;
  font-family:var(--wp--preset--font-family--lora,Lora,Georgia,serif)!important;
  font-size:clamp(20px,5.4cqw,22px)!important;
  font-weight:400!important;
  line-height:1.28!important;
  letter-spacing:-.022em!important;
  text-transform:none;
  overflow-wrap:break-word;
}
.sprucen-page-projects .sprucen-projects-grid .sprucen-project-card__title a{
  font:inherit;
  text-decoration:none;
}
.sprucen-page-projects .sprucen-projects-grid .sprucen-project-card__location{
  order:2;
  margin:0 0 12px!important;
  font-size:15px!important;
  font-weight:300!important;
  line-height:1.5!important;
  letter-spacing:0!important;
}
.sprucen-page-projects .sprucen-projects-grid .sprucen-project-card__link{
  order:3;
  align-self:flex-start;
  margin-top:auto!important;
  margin-bottom:0!important;
  min-height:44px;
  padding:10px 0!important;
  font:500 17px/1.4 Manrope,Arial,sans-serif!important;
  letter-spacing:normal!important;
  text-decoration:underline!important;
  text-decoration-thickness:1px!important;
  text-underline-offset:6px!important;
  text-decoration-skip-ink:auto;
}
.sprucen-page-projects .sprucen-projects-grid .sprucen-project-card__link:after{
  content:none;
  display:none;
}
@container sprucenprojectsequal (min-width:700px){
  .sprucen-page-projects .sprucen-projects-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-auto-rows:auto!important;
    row-gap:36px!important;
    column-gap:clamp(16px,2.35cqw,24px)!important;
  }
  .sprucen-page-projects .sprucen-projects-grid .sprucen-project-card{
    display:flex!important;
    flex-direction:column;
  }
  .sprucen-page-projects .sprucen-projects-grid .sprucen-project-card__body{
    flex:1 1 auto!important;
    padding:22px clamp(16px,2cqw,24px) 24px!important;
  }
  .sprucen-page-projects .sprucen-projects-grid .sprucen-project-card__title{
    font-size:clamp(22px,2.5cqw,26px)!important;
    line-height:1.3!important;
  }
  .sprucen-page-projects .sprucen-projects-grid .sprucen-project-card__location{margin-bottom:16px!important;font-size:16px!important}
  .sprucen-page-projects .sprucen-projects-grid .sprucen-project-card__link{font-size:18px!important}
}

/* Project detail headings follow the same Lora hierarchy as the main pages.
   Shared selectors also style an editor preview containing the plugin markup. */
.single-sprucen_project,
.editor-styles-wrapper{
  --sprucen-project-title-size:40px;
  --sprucen-project-heading-size:32px;
  --sprucen-project-subheading-size:26px;
  --sprucen-project-support-heading-size:28px;
}
:is(body.single-sprucen_project,.editor-styles-wrapper) .sprucen-project-detail__title-wrap h1.sprucen-project-detail__title,
:is(body.single-sprucen_project,.editor-styles-wrapper) .sprucen-project-detail h2,
:is(body.single-sprucen_project,.editor-styles-wrapper) .sprucen-project-detail h3{
  font-family:var(--wp--preset--font-family--lora,Lora,Georgia,serif)!important;
  font-weight:400!important;
  font-style:normal!important;
  letter-spacing:-.022em!important;
  line-height:1.22!important;
  text-transform:none!important;
  color:var(--wp--preset--color--contrast,#44413d)!important;
  text-wrap:pretty;
  overflow-wrap:break-word;
}
:is(body.single-sprucen_project,.editor-styles-wrapper) .sprucen-project-detail__title-wrap h1.sprucen-project-detail__title{
  font-size:var(--sprucen-project-title-size)!important;
  margin-bottom:24px!important;
}
:is(body.single-sprucen_project,.editor-styles-wrapper) .sprucen-project-detail h2{
  font-size:var(--sprucen-project-heading-size)!important;
  margin-bottom:22px!important;
}
:is(body.single-sprucen_project,.editor-styles-wrapper) .sprucen-project-detail h3{
  font-size:var(--sprucen-project-subheading-size)!important;
}
/* Give the work, finishes and enquiry headings a quieter supporting scale.
   The main project title and Project gallery heading retain their hierarchy. */
:is(body.single-sprucen_project,.editor-styles-wrapper)
  :is(.sprucen-project-detail__fact--work,.sprucen-project-detail__fact--materials,.sprucen-project-cta) h2{
  font-size:var(--sprucen-project-support-heading-size)!important;
}
@media(min-width:700px){
  .single-sprucen_project,
  .editor-styles-wrapper{
    --sprucen-project-title-size:56px;
    --sprucen-project-heading-size:44px;
    --sprucen-project-subheading-size:30px;
    --sprucen-project-support-heading-size:38px;
  }
}

/* v1.0.45 — matching project introductions and a full-width desktop toolbar.
   Explicit body scoping wins the plugin's saved typography in either load
   order. The Projects listing and other page introductions keep their styles. */
body.single-sprucen_project .sprucen-project-detail__title-wrap .sprucen-project-detail__summary{
  font-size:19px!important;
  font-weight:300!important;
  line-height:1.5!important;
}
body.single-sprucen_project .sprucen-project-detail__location{
  font-size:16px!important;
}
/* Share the existing mobile pill colours and selected state with desktop. */
body.single-sprucen_project .sprucen-project-compare__tabs{
  padding:3px;
  background:#e7e2d9;
}
body.single-sprucen_project .sprucen-project-compare__selection{
  top:3px;
  bottom:3px;
  left:3px;
  width:calc((100% - 6px) / 2);
  background:#53584c;
}
body.single-sprucen_project .sprucen-project-compare__tabs .sprucen-project-compare__tab{
  color:#53584c!important;
  font-weight:400;
}
body.single-sprucen_project .sprucen-project-compare__tabs .sprucen-project-compare__tab[aria-selected="true"]{
  color:#f5f2ec!important;
  font-weight:400;
}
/* Match the Projects page's intermediate width before its desktop intro. */
@media(min-width:700px){
  body.single-sprucen_project .sprucen-project-detail__title-wrap .sprucen-project-detail__summary{
    font-size:22px!important;
  }
}
@media(min-width:782px){
  body.single-sprucen_project .sprucen-project-detail__location{
    font-size:18px!important;
  }
  /* Span both image columns: location left, tabs at the far right. */
  body.single-sprucen_project .sprucen-project-compare__controls{
    grid-column:1/-1;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:12px;
    width:100%;
  }
  body.single-sprucen_project .sprucen-project-detail__location--comparison{
    display:block;
    flex:1 1 6rem;
    min-width:0;
    margin:0!important;
    color:#53584c!important;
    line-height:1.35!important;
    letter-spacing:normal!important;
  }
  body.single-sprucen_project .sprucen-project-detail__location--comparison .sprucen-location-text{
    white-space:normal;
    overflow-wrap:anywhere;
  }
  body.single-sprucen_project .sprucen-project-compare__tabs{
    flex:0 0 auto;
    margin-left:auto;
  }
  /* Hide the former desktop location only when this row contains its copy.
     Gallery-only projects keep their original location header. */
  body.single-sprucen_project .sprucen-project-detail:has(>.sprucen-project-media--comparison .sprucen-project-detail__location--comparison)>.sprucen-project-detail__header{
    display:none;
  }
}
@media(min-width:783px){
  body.single-sprucen_project .sprucen-project-detail__title-wrap .sprucen-project-detail__summary{
    font-size:24px!important;
  }
}
