/* One centered, full-width logo layer. Keep it out of print and leave form
   controls on their original solid surfaces. */
@media screen {
  :is(.jobdesk.account-page, .jobdesk.customer-page,
      body:has(> main.request-form, > main.pro-page),
      main.gallery-page, .fn-reviews-view > main) {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    background: linear-gradient(145deg, #eaf2fc 0%, #f7faff 56%, #edf4fc 100%);
  }

  :is(.jobdesk.account-page, .jobdesk.customer-page,
      body:has(> main.request-form, > main.pro-page),
      main.gallery-page, .fn-reviews-view > main)::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    /* Use only the logo silhouette so black lettering and saturated blues
       have the same quiet slate-blue tint behind headings and labels. */
    background-color: rgb(139 164 191 / var(--fn-watermark-alpha, .065));
    mask: url("/assets/fn-comfort-logo-transparent.webp")
      center var(--fn-logo-top, clamp(4rem, 12svh, 9rem)) / 104% auto no-repeat;
    mask-mode: alpha;
    pointer-events: none;
  }

  /* Visit details and calendar notes sit directly on the page background. */
  .jobdesk.customer-page { --fn-watermark-alpha: .045; }

  /* Keep the artwork in the content area rather than under the dark heroes. */
  :is(main.gallery-page, .fn-reviews-view > main) { --fn-logo-top: 17rem; }

  .account-page .account-entry .email-signin {
    background: rgb(255 255 255 / .80);
  }

  body:has(> main.pro-page) { color: #102c45; }
  .pro-page {
    width: min(calc(100% - 2rem), 52rem);
    margin: 0 auto;
    padding: 1.25rem clamp(1rem, 4vw, 3rem) 3rem;
    background: rgb(255 255 255 / .82);
    border-inline: 1px solid #dce6f0;
    min-height: 100vh;
    line-height: 1.65;
    overflow-wrap: anywhere;
  }
  .pro-page > h1 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin: 1.5rem 0 .5rem; font-weight: 700; line-height: 1.15; }
  .pro-page > h2 { font-size: 1.25rem; font-weight: 700; margin: 1.5rem 0 .35rem; }
  .pro-page > p { margin: .6rem 0; }
  .pro-page a { color: #124878; text-decoration: underline; }
  .pro-page .customer-brand { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #dce6f0; }
  .pro-page .customer-brand nav a { text-decoration: none; }
  .pro-page .customer-brand nav a:hover { text-decoration: underline; }

  .gallery-page .gallery-callout,
  .fn-reviews-view .review-form-section {
    background: rgb(237 246 252 / .72);
  }

  @media (max-width: 48rem) {
    :is(.jobdesk.account-page, .jobdesk.customer-page,
        body:has(> main.request-form, > main.pro-page),
        main.gallery-page, .fn-reviews-view > main)::before {
      mask-size: 116% auto;
      mask-position: center var(--fn-logo-top, clamp(10rem, 29svh, 17rem));
    }
  }

  @media (forced-colors: active) {
    :is(.jobdesk.account-page, .jobdesk.customer-page,
        body:has(> main.request-form, > main.pro-page),
        main.gallery-page, .fn-reviews-view > main)::before { display: none; }
  }
}

@media screen {
  .visit-back-nav { margin: 0 0 1rem; }
  .visit-back {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-height: 44px;
    border: 1px solid #bdccdf;
    border-radius: 8px;
    padding: .55rem .85rem;
    background: #fff;
    color: #14466e;
    font-weight: 700;
    text-decoration: none;
  }
  .visit-back:hover { background: #edf5fd; text-decoration: underline; }
  .visit-back:focus-visible { outline: 2px solid #176897; outline-offset: 3px; }
}
@media print { .visit-back-nav { display: none !important; } }
