/* Text-only depth: large headings lead, labels stay defined, copy stays crisp. */
:root {
  --type-shadow-copy: 0 1px 1px rgb(2 10 34 / 10%);
  --type-shadow-label: 0 1px 0 rgb(2 10 34 / 18%), 0 2px 2px rgb(2 10 34 / 14%);
  --type-shadow-heading: 0 1px 0 rgb(2 10 34 / 24%), 1px 3px 3px rgb(2 10 34 / 22%);
}

body { text-shadow: var(--type-shadow-copy); }
body :is(h1, h2, h3, h4) { text-shadow: var(--type-shadow-heading); }
body :is(p, li, dd, figcaption) { text-shadow: var(--type-shadow-copy); }
body :is(a, button, summary, dt, label, .eyebrow, .roof-tab, .service-county-name) {
  text-shadow: var(--type-shadow-label);
}

/* White and orange lettering on the existing dark/photo surfaces. */
:is(.site-header, .mobile-nav, .home-hero, .work-brand-banner, .services-carousel,
    .service-area, .service-card-featured, .service-enquiry, .finance-next-panel,
    .contact-band) {
  --type-shadow-copy: 0 1px 2px rgb(0 0 0 / 38%);
  --type-shadow-label: 0 1px 0 rgb(2 10 34 / 65%), 1px 3px 3px rgb(0 0 0 / 40%);
  --type-shadow-heading: 1px 2px 0 rgb(2 10 34 / 80%), 2px 5px 5px rgb(0 0 0 / 50%);
  text-shadow: var(--type-shadow-copy);
}

/* The family block uses a restrained edge against orange, with depth on its title. */
.home-page .home-about-heading h2 {
  text-shadow: 0 1px 0 rgb(2 10 34 / 35%), 2px 4px 4px rgb(2 10 34 / 28%);
}
.home-page .home-about-family {
  text-shadow: 1px 2px 0 rgb(2 10 34 / 70%), 1px 3px 3px rgb(0 0 0 / 35%);
}
.home-about-intro { text-shadow: 0 1px 1px rgb(2 10 34 / 18%); }
.home-about-kicker, .about-photo-kicker { text-shadow: var(--type-shadow-label); }

/* Button text retains the treatment through hover, keyboard focus, and press. */
body .button { justify-content: center; }
body :is(.button, .about-estimate, .service-card-link, .service-county, .service-city-links button) {
  text-shadow: var(--type-shadow-label);
}
:is(.button-blue, .home-about-link, .about-estimate, .home-hero-estimate) {
  --type-shadow-label: 0 1px 0 rgb(2 10 34 / 70%), 1px 3px 3px rgb(0 0 0 / 40%);
}
:is(.button-orange, .services-explore, .finance-button) {
  --type-shadow-label: 0 1px 0 rgb(2 10 34 / 24%), 0 2px 2px rgb(2 10 34 / 20%);
}
.home-hero .home-hero-estimate {
  --type-shadow-label: 0 1px 0 rgb(2 10 34 / 70%), 1px 3px 3px rgb(0 0 0 / 40%);
}
.home-hero-estimate-copy > span { text-shadow: 0 1px 2px rgb(0 0 0 / 45%); }
.services-explore:is(:hover, :focus-visible),
.finance-card-grant .finance-button:is(:hover, :focus-visible, :active) {
  --type-shadow-label: 0 1px 0 rgb(2 10 34 / 65%), 1px 3px 3px rgb(0 0 0 / 40%);
}

/* Light panels inside dark sections retain the lighter copy and label treatment. */
:is(.service-map-frame, .contact-dialog, .contact-form-panel, .iggy-chat) {
  --type-shadow-copy: 0 1px 1px rgb(2 10 34 / 10%);
  --type-shadow-label: 0 1px 0 rgb(2 10 34 / 18%), 0 2px 2px rgb(2 10 34 / 14%);
  --type-shadow-heading: 0 1px 0 rgb(2 10 34 / 24%), 1px 3px 3px rgb(2 10 34 / 22%);
  text-shadow: var(--type-shadow-copy);
}
.site-header .header-credentials { text-shadow: 0 1px 1px rgb(0 0 0 / 28%); }
.site-header .header-credentials strong { text-shadow: inherit; }
.site-footer { text-shadow: 0 1px 1px rgb(2 10 34 / 8%); }
.site-footer :is(p, a) { text-shadow: 0 1px 1px rgb(2 10 34 / 12%); }

/* Patterned headings already use glyph-only filters; don't paint over the fill. */
body :is(.finance-heading h1, .finance-title-lettering, .services-title h1, .services-title-lettering) {
  text-shadow: none;
}
body .services-title h1 {
  filter: drop-shadow(0 1px 0 rgb(24 35 55 / 40%)) drop-shadow(0 3px 3px rgb(24 35 55 / 22%));
}

/* Native input, logo artwork, and small map attribution stay sharp. */
body :is(input, textarea, select, option, .logo, .brand-logo, .finance-program-logo,
    .leaflet-control-attribution, .leaflet-control-attribution a,
    .maplibregl-ctrl-attrib, .maplibregl-ctrl-attrib a) { text-shadow: none; }

@media (forced-colors: active), print {
  body, body * { text-shadow: none !important; }
  body .services-title h1 { filter: none; }
}
