/* ==========================================================================
   Page background: fine-line wallpaper-install icons (rolls, brushes, tape
   measure, etc.). Loaded after styles.css on every page.

   To remove: delete this file and the <link ... tools-pattern.css> line in
   index.html, portfolio.html, contact.html and
   wallpaper-installation-palm-beach-county.html. Removing it restores the
   original solid section colors. New pages need the same <link> line.

   To tune: opacity lives in images/pattern-tools.svg (stroke-opacity);
   icon size is --pattern-size below.

   How the "no cut-off icons" part works
   -------------------------------------
   1. The pattern is ONE continuous layer on <body>. The tinted bands
      (.bg-alt / .bg-blush) no longer draw their own copy; they lay a color
      tint over the shared pattern (multiply), so an icon that crosses a
      color change stays whole.
   2. Where the pattern would run into something solid (photo headers, the
      white trust strip, the dark footer) a short fade in the page color
      hides any icon that would otherwise be sliced by that edge.
   ========================================================================== */

:root{
  --pattern-size: 480px;
  --pattern-fade-solid: 80px;   /* icons fully hidden this close to a solid edge */
  --pattern-fade-length: 150px; /* ...then fade back in by here */
}

body{
  background-image: url("../images/pattern-tools.svg");
  background-size: var(--pattern-size) var(--pattern-size);
  background-repeat: repeat;
}
@media (max-width: 640px){
  :root{ --pattern-size: 400px; }
  /* slightly softer on phones, where the icons sit closer to small text */
  body{ background-image: url("../images/pattern-tools-soft.svg"); }
}

/* ---- 1. tinted bands: transparent, tint multiplied over the pattern ------ */
.bg-alt,
.bg-blush{
  position: relative;
  background: transparent;
}
.bg-alt::before,
.bg-blush::before{
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: multiply;
}
/* values chosen so the result over the ivory page color is exactly the
   original #F5EBE3 (alt) and #F3DDD1 (blush) */
.bg-alt::before{ background: #F9F3EE; }
.bg-blush::before{ background: #F7E4DB; }

/* ---- 2. fades at solid edges --------------------------------------------- */

/* below the white trust strip */
.trust-strip{ position: relative; }
.trust-strip::after,
.page-header + section::after,
.site-footer::before{
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  z-index: -1;
  pointer-events: none;
  height: var(--pattern-fade-length);
}
.trust-strip::after{
  top: 100%;
  background: linear-gradient(to bottom, var(--color-bg) 0, var(--color-bg) var(--pattern-fade-solid), transparent var(--pattern-fade-length));
}

/* below the photo header on inner pages */
.page-header + section{ position: relative; }
.page-header + section::after{
  top: 0;
  background: linear-gradient(to bottom, var(--color-bg) 0, var(--color-bg) var(--pattern-fade-solid), transparent var(--pattern-fade-length));
}

/* above the dark footer (color follows whatever band sits right above it) */
.site-footer{
  position: relative;
  --pattern-fade-color: var(--color-bg);
}
body:has(main > section.bg-blush:last-child) .site-footer{ --pattern-fade-color: var(--color-blush); }
body:has(main > section.bg-alt:last-child) .site-footer{ --pattern-fade-color: var(--color-bg-alt); }
.site-footer::before{
  bottom: 100%;
  background: linear-gradient(to top, var(--pattern-fade-color) 0, var(--pattern-fade-color) var(--pattern-fade-solid), transparent var(--pattern-fade-length));
}
