:root {
  --readability-paper-text: #202522;
  --readability-paper-copy: #454d47;
  --readability-paper-accent: #8f4022;
}

body[data-hero-family="article"] .page-hero h1 em,
body[data-hero-family="journal"] .page-hero h1 em,
body[data-hero-family="contact"] .page-hero h1 em,
body[data-hero-family="utility"] .page-hero h1 em {
  color: var(--readability-paper-accent);
}

body[data-hero-family="contact"] .page-hero-copy > p:not(.breadcrumb):not(.eyebrow) {
  color: var(--readability-paper-copy);
}

body[data-hero-family="article"] .page-hero::after,
body[data-hero-family="journal"] .page-hero::after,
body[data-hero-family="contact"] .page-hero::after,
body[data-hero-family="utility"] .page-hero::after {
  color: var(--readability-paper-copy);
}

/* The footer legal/planned-domain line is useful information, not a decorative fade. */
.footer-bottom {
  color: rgba(244, 240, 232, .62);
}

/* Give the shared service mark its own row on the three-column desktop footer. */
@media (min-width: 781px) {
  .footer-sen-badge {
    grid-column: 1 / -1;
  }

  /* Make hero evidence captions read as useful context, not a faint overlay. */
  body[data-hero-family="service-detail"] .page-hero figure figcaption {
    padding: 10px 13px !important;
    border-color: rgba(240, 191, 124, .56) !important;
    background: rgba(22, 27, 24, .88) !important;
    color: #fffdf8 !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
    letter-spacing: .08em !important;
    opacity: 1 !important;
  }
}

/* Use the same professional gold medallion in the full Guarantee certificate
   as in the permanent rail and offer card. The written terms stay live text. */
body[data-hero-family="trust"] .certificate-mark {
  position: relative;
  display: block;
  width: clamp(150px, 18vw, 220px);
  min-height: clamp(150px, 18vw, 220px);
  margin: 48px 0 36px;
  background: url("/images/gold-guarantee-seal-v1.png") center / contain no-repeat;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .28));
}

body[data-hero-family="trust"] .certificate-mark span,
body[data-hero-family="trust"] .certificate-mark i {
  opacity: 0;
}

body[data-hero-family="trust"] .certificate-mark span {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 !important;
  color: #4b3616 !important;
  font-size: 0 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .52);
  opacity: 1;
}

body[data-hero-family="trust"] .certificate-mark span::before {
  content: "5";
  display: block;
  font: 700 clamp(3.2rem, 6vw, 4.8rem) / .78 Arial, "Helvetica Neue", sans-serif;
  letter-spacing: -.08em;
}

body[data-hero-family="trust"] .certificate-mark span::after {
  content: "YEAR\A GUARANTEE";
  display: block;
  margin-top: 7px;
  white-space: pre;
  font: 700 8px / 1.18 Arial, "Helvetica Neue", sans-serif;
  letter-spacing: .1em;
}

@media (max-width: 780px) {
  body[data-hero-family="trust"] .certificate-mark {
    width: 154px;
    min-height: 154px;
    margin: 34px 0 28px;
  }
}

/* The offers route has five cards. On a wide desktop, let the final
   workmanship card close the grid as an intentional full-width panel rather
   than leaving a large, empty half-column beside it. Tablet and phone already
   collapse the grid to one column in the base stylesheet. */
@media (min-width: 1051px) {
  .discount-card-grid > .discount-card-dark:last-child {
    grid-column: 1 / -1;
    grid-template-columns: 116px minmax(0, 1fr);
    align-items: center;
    padding: 34px 42px;
  }
}

/* The About pillars use a light card surface in the refined route treatment;
   override the older dark-section copy colour so the supporting explanation
   remains comfortable for older readers. */
body[data-hero-family="about"] .about-pillar p {
  color: #4a514b !important;
}

/* Bring the article pages' truthful author/date metadata onto the Journal
   cards without making the category and reading-time line harder to scan. */
body[data-hero-family="journal"] .blog-card .blog-card-date {
  display: block;
  margin-top: 6px;
  color: #59615b;
  font-size: 9px;
  font-style: normal;
  letter-spacing: .08em;
  line-height: 1.35;
  text-transform: uppercase;
}

/* Give the Services hub a second, plain-English route into the catalogue:
   visitors can begin with the job they need to solve rather than guessing a
   material name. Keep the cards dark and quiet so this acts as a useful
   decision bridge between the full service list and the quote CTA. */
body[data-hero-family="services"] .service-choice-section {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: clamp(42px, 7vw, 110px);
  align-items: start;
  max-width: none;
  background: var(--white);
}

body[data-hero-family="services"] .service-choice-intro {
  max-width: 520px;
}

body[data-hero-family="services"] .service-choice-intro h2 {
  margin-bottom: 28px;
}

body[data-hero-family="services"] .service-choice-intro > p:last-child {
  max-width: 430px;
  font-size: 18px;
  line-height: 1.5;
}

body[data-hero-family="services"] .service-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body[data-hero-family="services"] .service-choice-card {
  position: relative;
  display: flex;
  min-height: 190px;
  flex-direction: column;
  gap: 9px;
  padding: 24px 26px 22px;
  border-top: 3px solid var(--amber);
  background: var(--ink);
  color: var(--paper);
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}

body[data-hero-family="services"] .service-choice-card:hover,
body[data-hero-family="services"] .service-choice-card:focus-visible {
  background: #2b332e;
  box-shadow: 0 16px 34px rgba(20, 28, 24, .16);
  transform: translateY(-3px);
}

body[data-hero-family="services"] .service-choice-label {
  color: var(--amber);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.3;
  text-transform: uppercase;
}

body[data-hero-family="services"] .service-choice-card strong {
  max-width: 260px;
  color: var(--white);
  font-size: 23px;
  letter-spacing: -.05em;
  line-height: 1.02;
}

body[data-hero-family="services"] .service-choice-card > span:not(.service-choice-label) {
  max-width: 300px;
  color: rgba(244, 240, 232, .76);
  font-size: 14px;
  line-height: 1.45;
}

body[data-hero-family="services"] .service-choice-card b {
  position: absolute;
  right: 20px;
  bottom: 17px;
  color: var(--amber);
  font-size: 22px;
  font-weight: 400;
}

@media (max-width: 780px) {
  body[data-hero-family="services"] .service-choice-section {
    display: block;
  }

  body[data-hero-family="services"] .service-choice-intro {
    margin-bottom: 38px;
  }

  body[data-hero-family="services"] .service-choice-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body[data-hero-family="services"] .service-choice-card {
    min-height: 164px;
    padding: 22px 22px 21px;
  }
}

/* Keep the fixed picture-led footer behind Home content throughout the tablet rail band. */
@media (min-width: 781px) and (max-width: 980px) {
  body[data-hero-family="home"] main {
    position: relative;
    z-index: 1;
  }

  /* Give long gallery provenance captions a stable reading band at tablet rail widths. */
  body[data-hero-family="work"] .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  body[data-hero-family="work"] .gallery-grid figure,
  body[data-hero-family="work"] .gallery-grid figure:nth-child(3n),
  body[data-hero-family="work"] .gallery-grid figure:nth-child(4n) {
    display: flex;
    flex-direction: column;
    aspect-ratio: auto;
    height: auto;
  }

  body[data-hero-family="work"] .gallery-grid figure img {
    flex: 0 0 auto;
    aspect-ratio: 1.08;
    height: auto;
  }

  body[data-hero-family="work"] .gallery-grid figcaption {
    position: static;
    display: block;
    min-height: 76px;
    padding: 11px 10px 12px;
    background: #202522;
    font-size: 10px;
    line-height: 1.35;
    letter-spacing: .07em;
  }

  body[data-hero-family="work"] .gallery-grid figcaption b,
  body[data-hero-family="work"] .gallery-grid figcaption span {
    display: block;
    text-align: left;
  }

  body[data-hero-family="work"] .gallery-grid figcaption span {
    margin-top: 5px;
    color: rgba(244, 240, 232, .78);
  }

  /* Keep service evidence captions readable beside the permanent rail. */
  body[data-hero-family="service-detail"] .page-hero figure figcaption {
    right: 26px !important;
    bottom: 78px !important;
    max-width: min(340px, 38vw) !important;
    padding: 10px 13px !important;
    border-color: rgba(240, 191, 124, .56) !important;
    background: rgba(22, 27, 24, .9) !important;
    color: #fffdf8 !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
    letter-spacing: .08em !important;
    opacity: 1 !important;
  }
}
