/* Site-wide corrections applied on top of the mirrored theme CSS.
 * Loaded on every page by tools/postprocess.py.
 */

/* Height of the mobile header (the top contact bar is hidden below 768px).
 * The services sub-nav offsets itself by this much, so both read one value. */
:root {
  --wd-mobile-header-height: 82px;
}

@media (max-width: 767px) {
  /* The theme styles the services sub-nav as `sticky; top: 8rem`, which only
   * makes sense with a sticky header above it — but the header was left
   * `position: relative`, so it scrolled away and the sub-nav pinned itself
   * 80px down the viewport with page content showing through the gap. */
  #brx-header {
    position: sticky;
    top: 0;
    /* Above the sub-nav (10) and the sticky bottom call bar (99). */
    z-index: 100;
  }

  /* The nav bar is 50% black, which was fine while nothing passed beneath it.
   * Sticky, it let scrolled content show through. Over the white page that
   * translucency composites to exactly #7f7f7f, so the header keeps its
   * appearance at rest while becoming opaque once the page scrolls. */
  .header-nav {
    background-color: #7f7f7f;
  }

  /* Sit the sub-nav flush under the header rather than 2px behind it. */
  .sticky-serv.brxe-container {
    top: var(--wd-mobile-header-height);
  }
}

/* ------------------------------------------------------------------------- *
 * Treatment pages — content/services/*.md, rendered by tools/build_pages.py.
 *
 * The mirrored pages get their layout from per-element rules Bricks emits into
 * each document's own <style> block, keyed on generated #brxe-… ids. Generated
 * pages have no such block and no such ids, so their typography lives here,
 * namespaced wd- to stay clear of the theme and the framework.
 * ------------------------------------------------------------------------- */

.wd-page {
  padding-top: var(--space-l);
  padding-bottom: var(--space-xl);
}

.wd-page__inner {
  /* Narrower than the theme's 1100px container: this is reading matter, and
   * ~75 characters a line is where long prose stays comfortable. */
  max-width: 76rem;
  align-items: stretch;
}

.wd-breadcrumb {
  font-size: var(--text-s);
  color: var(--shade-medium);
  margin-bottom: var(--space-m);
}

.wd-breadcrumb a {
  color: inherit;
}

.wd-hero h1 {
  font-size: clamp(2.8rem, calc(2.8rem + ((1vw - 0.48rem) * 1.4)), 4.4rem);
  line-height: 1.15;
  margin: 0 0 var(--space-s);
}

.wd-hero__intro {
  font-size: clamp(1.8rem, calc(1.8rem + ((1vw - 0.48rem) * 0.28)), 2.2rem);
  line-height: 1.55;
  color: var(--shade-dark);
  margin: 0 0 var(--space-m);
}

.wd-hero__image {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: var(--space-l);
}

.wd-prose {
  font-size: var(--text-m);
  line-height: 1.7;
}

.wd-prose h2 {
  font-size: clamp(2.2rem, calc(2.2rem + ((1vw - 0.48rem) * 0.56)), 2.8rem);
  line-height: 1.25;
  margin: var(--space-l) 0 var(--space-s);
  /* Cleared by the sticky mobile header when an in-page anchor is followed. */
  scroll-margin-top: calc(var(--wd-mobile-header-height) + 1.6rem);
}

.wd-prose h3 {
  font-size: 2rem;
  margin: var(--space-m) 0 var(--space-xs);
}

.wd-prose p,
.wd-prose ul,
.wd-prose ol {
  margin: 0 0 var(--space-s);
}

.wd-prose ul,
.wd-prose ol {
  padding-left: 2.4rem;
}

.wd-prose li {
  margin-bottom: 0.6rem;
}

.wd-prose a {
  color: var(--primary-dark);
  text-underline-offset: 2px;
}

/* Wide content scrolls inside its own box, so the page body never scrolls
 * sideways on a phone. */
.wd-table-scroll {
  overflow-x: auto;
  margin: 0 0 var(--space-m);
  -webkit-overflow-scrolling: touch;
}

.wd-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 48rem;
  font-size: var(--text-s);
}

.wd-table th,
.wd-table td {
  border: 1px solid var(--shade-light);
  padding: 1rem 1.2rem;
  text-align: left;
  vertical-align: top;
}

.wd-table thead th {
  background-color: var(--shade-ultra-light);
  font-weight: 700;
}

.wd-callout {
  border-left: 4px solid var(--primary);
  background-color: var(--shade-ultra-light);
  padding: var(--space-s) var(--space-m);
  margin: 0 0 var(--space-m);
}

.wd-callout p {
  margin: 0;
}

.wd-callout--cost {
  border-left-color: var(--shade-medium);
}

/* Shown on any page whose front matter still says `draft: true`. It is meant to
 * be impossible to mistake for page content — anyone who reaches one of these
 * has reached it deliberately or by accident, and either way should know the
 * copy has not been signed off. */
.wd-draft {
  border: 2px dashed #8a6d00;
  background-color: #fff8e1;
  color: #4a3b00;
  border-radius: 4px;
  padding: var(--space-s) var(--space-m);
  margin-bottom: var(--space-l);
}

.wd-draft p {
  margin: 0;
  font-size: var(--text-s);
  line-height: 1.55;
}

/* Deliberately louder than a callout: it is the one block on the page telling
 * someone not to wait for us. */
.wd-urgent {
  border: 2px solid #b3261e;
  border-radius: 4px;
  padding: var(--space-s) var(--space-m);
  margin: var(--space-l) 0;
}

.wd-urgent__title {
  font-size: 2rem;
  margin: 0 0 var(--space-xs);
  color: #b3261e;
}

.wd-urgent p {
  margin: 0;
  font-size: var(--text-m);
  line-height: 1.6;
}

.wd-faq {
  margin-top: var(--space-xl);
}

.wd-faq h2 {
  font-size: clamp(2.2rem, calc(2.2rem + ((1vw - 0.48rem) * 0.56)), 2.8rem);
  margin: 0 0 var(--space-m);
}

.wd-faq__item {
  border-top: 1px solid var(--shade-light);
  padding: var(--space-s) 0;
}

.wd-faq__q {
  font-size: 1.9rem;
  margin: 0 0 0.8rem;
}

.wd-faq__a {
  font-size: var(--text-m);
  line-height: 1.65;
}

.wd-faq__a p {
  margin: 0 0 var(--space-xs);
}

.wd-faq__a p:last-child {
  margin-bottom: 0;
}

.wd-cta {
  margin-top: var(--space-xl);
  padding: var(--space-m);
  background-color: var(--shade-ultra-light);
  border-radius: 4px;
}

.wd-cta h2 {
  margin: 0 0 var(--space-xs);
  font-size: 2.4rem;
}

.wd-cta p {
  margin: 0 0 var(--space-s);
  font-size: var(--text-m);
}

.wd-page__footer {
  margin-top: var(--space-l);
  padding-top: var(--space-s);
  border-top: 1px solid var(--shade-light);
}

.wd-reviewed,
.wd-disclaimer {
  font-size: var(--text-s);
  color: var(--shade-medium);
  margin: 0 0 var(--space-xs);
  line-height: 1.5;
}

/* The "Read more" links tools/postprocess.py inserts into the /services/
 * accordion, and the whitening panel it adds. */
.wd-read-more-wrap {
  margin: 1.6rem 0 0;
}

.wd-read-more {
  display: inline-block;
  font-weight: 700;
}

.wd-accordion-icon {
  font-size: 2.4rem;
}
