/* Service pages (/services/<slug>/) and town pages (/painters-<town>-ma/), built by build.py.
   Each page sets --c (its paint colour), --tint (a light wash of it) and --on (text that reads on --c). */
body.lp { --c: #24324f; --tint: #dfe3ea; --on: #fff; }
.lp main section { position: relative; }
.lp-h3 { margin: 0 0 18px; font: 700 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lp-crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; font: 500 14px/1.3 var(--sans); color: var(--muted); }
.lp-crumbs a { color: inherit; text-decoration: none; }
.lp-crumbs a:hover { color: var(--ink); text-decoration: underline; }
.lp-crumbs [aria-current] { color: var(--ink); }
.lp-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.lp-sec { padding: clamp(80px, 11vw, 160px) 0; }

/* ---------- service hero: copy + a frame that a paint roller keeps re-painting with the next job ---------- */
.lp-hero { padding: clamp(130px, 15vw, 190px) 0 clamp(70px, 9vw, 120px); background: var(--tint); overflow: hidden; }
.lp-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.lp-hero h1 { font-size: clamp(54px, 8.4vw, 148px); }
.lp-hero h1 em { color: var(--c); }
.lp-hero .lede { margin-top: 26px; }
.lp-roll { position: relative; margin: 0; aspect-ratio: 4 / 3.1; border-radius: 26px; overflow: hidden; background: var(--c); box-shadow: 0 40px 80px -40px rgba(17, 19, 22, .45); isolation: isolate; }
.lp-roll__f { position: absolute; inset: 0; margin: 0; z-index: 0; visibility: hidden; }
.lp-roll__f.is-on, .lp-roll__f.is-in { visibility: visible; }
.lp-roll__f.is-in { z-index: 2; }
.lp-roll__f.is-on { z-index: 1; }
.lp-roll__f img { width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: 60% 50%; }
.lp-roll__f.is-on img, .lp-roll__f.is-in img { animation: lp-push 9s linear both; }
@keyframes lp-push { from { transform: scale(1.02); } to { transform: scale(1.12); } }
.lp-roll__roller { position: absolute; top: -4%; bottom: -4%; left: 0; z-index: 3; width: 34px; margin-left: -17px; border-radius: 17px; pointer-events: none; opacity: 0;
  background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--c) 82%, #fff) 0 3px, var(--c) 3px 7px); box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 18px 30px rgba(0, 0, 0, .35); }
.lp-roll__cap { position: absolute; left: 18px; bottom: 18px; z-index: 4; max-width: calc(100% - 36px); padding: 9px 14px; border-radius: 12px; background: rgba(255, 253, 248, .94); color: var(--ink); font: 600 14px/1.3 var(--sans); }

/* ---------- intro + what's included ---------- */
.lp-intro__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.lp-intro__txt h2 { margin-bottom: 34px; }
.lp-intro__txt h2 em { color: var(--c); }
.lp-intro__txt p { max-width: 34em; margin: 0 0 1.1em; font-size: clamp(17px, 1.25vw, 19.5px); line-height: 1.65; color: var(--ink-2); }
.lp-inc { padding: clamp(26px, 3vw, 40px); border-radius: 24px; background: #fff; box-shadow: 0 30px 60px -40px rgba(17, 19, 22, .3); }
.lp-inc ul { list-style: none; margin: 0; padding: 0; }
.lp-inc li { display: grid; gap: 4px; padding: 16px 0 16px 34px; border-top: 1px solid var(--line); position: relative; }
.lp-inc li:first-child { border-top: 0; padding-top: 4px; }
.lp-inc li::before { content: ""; position: absolute; left: 0; top: 19px; width: 18px; height: 10px; border-left: 2.5px solid var(--c); border-bottom: 2.5px solid var(--c); transform: rotate(-45deg); }
.lp-inc li:first-child::before { top: 7px; }
.lp-inc b { font: 700 18px/1.25 var(--display); letter-spacing: -.01em; }
.lp-inc span { color: var(--muted); font-size: 15.5px; line-height: 1.5; }

/* ---------- steps: plays on its own, pointing at a step switches it at once ---------- */
.lp-steps { background: var(--c); color: var(--on); }
.lp-steps h2 em { opacity: .85; }
.lp-steps__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 100px); margin-top: clamp(40px, 5vw, 70px); align-items: center; }
.lp-steps__list { list-style: none; margin: 0; padding: 0; }
.lp-steps__list li { border-top: 1px solid color-mix(in srgb, var(--on) 22%, transparent); }
.lp-steps__list li:last-child { border-bottom: 1px solid color-mix(in srgb, var(--on) 22%, transparent); }
.lp-steps__list button { display: flex; align-items: baseline; gap: 18px; width: 100%; padding: 20px 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: 700 clamp(22px, 2.3vw, 34px)/1.1 var(--display); letter-spacing: -.02em; opacity: .5; transition: opacity .35s, transform .45s var(--ease); }
.lp-steps__list .lp-n { font: 400 italic .8em/1 var(--serif); opacity: .8; min-width: 1.2em; }
.lp-steps__list li.is-on button { opacity: 1; transform: translateX(10px); }
.lp-steps__list p { display: grid; grid-template-rows: 0fr; margin: 0; padding-left: calc(1.2em + 18px); font-size: 16.5px; line-height: 1.55; opacity: 0; transition: grid-template-rows .5s var(--ease), opacity .4s, padding .5s var(--ease); }
.lp-steps__list p > span { overflow: hidden; }
.lp-steps__list li.is-on p { grid-template-rows: 1fr; opacity: .9; padding-bottom: 22px; }
.lp-steps__media { position: relative; aspect-ratio: 4 / 3.2; border-radius: 24px; overflow: hidden; background: rgba(0, 0, 0, .2); }
.lp-steps__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .7s, transform 1.4s var(--ease); }
.lp-steps__media img.is-on { opacity: 1; transform: none; }

/* ---------- always-moving rows (photos, quotes) ---------- */
.lp-work { padding: clamp(60px, 8vw, 110px) 0; overflow: hidden; }
.lp-row { display: flex; gap: 18px; width: max-content; animation: lp-row var(--dur, 60s) linear infinite; }
.lp-row:hover { animation-play-state: paused; }
@keyframes lp-row { to { transform: translateX(-50%); } }
.lp-row figure { flex: none; width: clamp(240px, 26vw, 380px); margin: 0; }
.lp-row figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; display: block; }
.lp-row figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* ---------- why it lasts + paint cans ---------- */
.lp-lasts { background: var(--paper-2); }
.lp-lasts__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 100px); align-items: center; }
.lp-lasts h2 em { color: var(--c); }
.lp-lasts .lede { margin-top: 28px; }
.lp-cans { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 26px 14px; }
.lp-can { position: relative; padding: 46px 18px 22px; border-radius: 14px 14px 20px 20px; background: linear-gradient(90deg, #c9ccd2, #f2f3f5 30%, #d3d6db 70%, #a9adb4); text-align: center; animation: lp-bob 4.6s ease-in-out infinite; animation-delay: calc(var(--i) * -1.1s); }
.lp-can::before { content: ""; position: absolute; left: -4px; right: -4px; top: -6px; height: 16px; border-radius: 8px; background: linear-gradient(90deg, #9da1a8, #e6e8eb 35%, #b7bbc1); }
.lp-can::after { content: ""; position: absolute; left: 8%; right: 8%; top: 20px; height: 10px; border-radius: 50%; border: 2px solid rgba(17, 19, 22, .18); border-bottom: 0; }
.lp-can b { display: block; padding: 18px 10px; border-radius: 6px; background: var(--can); color: var(--canink, #fff); font: 700 18px/1.1 var(--display); letter-spacing: -.01em; }
.lp-can span { display: block; margin-top: 12px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
@keyframes lp-bob { 50% { transform: translateY(-6px); } }

/* ---------- one big quote ---------- */
.lp-quote { padding: clamp(80px, 10vw, 150px) 0; text-align: center; }
.lp-quote blockquote { margin: 0 auto; max-width: 22em; font: 400 italic clamp(28px, 3.6vw, 56px)/1.15 var(--serif); letter-spacing: -.02em; }
.lp-quote p { margin: 0; }
.lp-quote footer { margin-top: 26px; font: 600 16px/1 var(--sans); font-style: normal; color: var(--c); }

/* ---------- questions ---------- */
.lp-faq__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(36px, 6vw, 100px); align-items: start; }
.lp-faq h2 em { color: var(--c); }
.lp-faq .lede { margin-top: 24px; }
.lp-faq details { border-top: 1px solid var(--line); }
.lp-faq details:last-child { border-bottom: 1px solid var(--line); }
.lp-faq summary { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; cursor: pointer; list-style: none; font: 650 clamp(18px, 1.5vw, 21px)/1.3 var(--display); letter-spacing: -.01em; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary i { flex: none; position: relative; width: 22px; height: 22px; margin-top: 2px; }
.lp-faq summary i::before, .lp-faq summary i::after { content: ""; position: absolute; left: 3px; right: 3px; top: 10px; height: 2px; border-radius: 2px; background: var(--c); transition: transform .35s var(--ease); }
.lp-faq summary i::after { transform: rotate(90deg); }
.lp-faq details[open] summary i::after { transform: rotate(0); }
.lp-faq details p { margin: 0 0 24px; max-width: 38em; color: var(--ink-2); line-height: 1.6; }

/* ---------- town links (service pages) ---------- */
.lp-towns { background: var(--tint); }
.lp-towns h2 em { color: var(--c); }
.lp-towns .lede { margin-top: 20px; }
.lp-towns__list { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.lp-towns__list a { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .7); color: var(--ink); text-decoration: none; font: 650 18px/1.1 var(--display); transition: background .3s, color .3s, transform .35s var(--ease); }
.lp-towns__list small { font: 500 13px/1 var(--sans); color: var(--muted); transition: color .3s; }
.lp-towns__list a:hover { background: var(--c); color: var(--on); transform: translateY(-3px); }
.lp-towns__list a:hover small { color: inherit; }

/* ---------- cards: related services, nearby towns ---------- */
.lp-more { padding: clamp(70px, 9vw, 130px) 0; }
.lp-more h2 { margin-bottom: 34px; }
.lp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.lp-card { position: relative; display: block; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; color: #fff; text-decoration: none; background: var(--ink); }
.lp-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.lp-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 11, 14, .82), rgba(10, 11, 14, 0) 58%); }
.lp-card span { position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 1; display: grid; gap: 6px; }
.lp-card b { font: 700 clamp(24px, 2.2vw, 32px)/1 var(--display); letter-spacing: -.02em; }
.lp-card small { font-size: 14.5px; opacity: .85; }
.lp-card:hover img { transform: scale(1.06); }
.lp-credit { margin-top: 30px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.lp-credit a { color: inherit; }

/* ---------- town hero: the town itself, slowly moving, behind the headline ---------- */
.lp-thero { min-height: min(92svh, 900px); display: flex; align-items: flex-end; padding: clamp(130px, 14vw, 180px) 0 clamp(60px, 7vw, 100px); color: #fff; background: #15171b; overflow: hidden; }
.lp-thero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: lp-drift 22s ease-in-out infinite alternate; }
@keyframes lp-drift { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.14) translate(-2%, -1.5%); } }
.lp-thero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 11, 14, .86) 8%, rgba(10, 11, 14, .25) 62%, rgba(10, 11, 14, .45)); }
.lp-thero .wrap { position: relative; z-index: 1; }
.lp-thero .lp-crumbs, .lp-thero .lp-crumbs [aria-current] { color: rgba(255, 255, 255, .85); }
.lp-thero .lp-crumbs a:hover { color: #fff; }
.lp-thero h1 { font-size: clamp(50px, 8vw, 140px); }
.lp-thero h1 em { color: var(--lamp); }
.lp-thero .lede { color: rgba(255, 255, 255, .9); margin-top: 24px; }
.lp-thero .btn--ghost { color: #fff; }

/* ---------- route map: Stow to this town, painted on ---------- */
.lp-map { margin: 0; padding: clamp(18px, 2vw, 28px); border-radius: 24px; background: #fff; box-shadow: 0 30px 60px -40px rgba(17, 19, 22, .3); }
.lp-map svg { display: block; width: 100%; height: auto; overflow: hidden; border-radius: 14px; background: #f3f1ec; }
.lp-map .t text { font: 600 13px var(--sans); fill: var(--muted); paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.lp-map .t path { fill: #c9ccd2; }
.lp-map .t.is-home text, .lp-map .t.is-here text { fill: var(--ink); font-size: 15px; font-weight: 700; }
.lp-map .t.is-home path { fill: var(--crimson); }
.lp-map .t.is-here path { fill: var(--c); }
.lp-map .ring { fill: none; stroke: var(--line); stroke-dasharray: 4 6; }
.lp-map .route { fill: none; stroke: var(--c); stroke-width: 9; stroke-linecap: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); opacity: .9; transition: stroke-dashoffset 1.8s var(--ease-io) .3s; }
.lp-map.is-in .route { stroke-dashoffset: 0; }
.lp-map figcaption { margin-top: 14px; font-size: 15px; color: var(--ink-2); }

/* ---------- local homes ---------- */
.lp-homes { background: var(--paper-2); }
.lp-homes h2 em { color: var(--c); }
.lp-homes__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: clamp(36px, 5vw, 64px); }
.lp-home { border-radius: 22px; overflow: hidden; background: #fff; }
.lp-home img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.lp-home div { padding: 22px 24px 26px; }
.lp-home h3 { margin: 0 0 8px; font: 700 21px/1.2 var(--display); letter-spacing: -.01em; }
.lp-home p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.55; }

/* ---------- services in this town: rows light up in turn, the photo follows ---------- */
.lp-svc__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(30px, 5vw, 80px); margin-top: clamp(36px, 5vw, 64px); align-items: center; }
.lp-svc h2 em { color: var(--c); }
.lp-svc__list { list-style: none; margin: 0; padding: 0; }
.lp-svc__list li { border-top: 1px solid var(--line); }
.lp-svc__list li:last-child { border-bottom: 1px solid var(--line); }
.lp-svc__list a { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; padding: 22px 6px; color: var(--ink); text-decoration: none; transition: color .3s, padding .45s var(--ease); }
.lp-svc__list b { font: 700 clamp(24px, 2.6vw, 40px)/1.05 var(--display); letter-spacing: -.02em; opacity: .45; transition: opacity .3s, color .3s; }
.lp-svc__list span { grid-column: 1; font-size: 15.5px; color: var(--muted); }
.lp-svc__list .ic { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 26px; height: 26px; opacity: 0; transform: translateX(-10px); transition: opacity .3s, transform .4s var(--ease); }
.lp-svc__list li.is-on a { padding-left: 16px; }
.lp-svc__list li.is-on b { opacity: 1; color: var(--sc, var(--c)); }
.lp-svc__list li.is-on .ic { opacity: 1; transform: none; }
.lp-svc__media { position: relative; aspect-ratio: 4 / 4.4; border-radius: 26px; overflow: hidden; background: var(--paper-2); }
.lp-svc__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; clip-path: inset(0 0 100% 0); transition: clip-path .9s var(--ease-io); }
.lp-svc__media img.is-on { clip-path: inset(0 0 0 0); z-index: 1; }

/* ---------- moving quotes ---------- */
.lp-rev { padding: clamp(80px, 10vw, 140px) 0; overflow: hidden; background: var(--c); color: var(--on); }
.lp-rev h2 { margin-bottom: clamp(36px, 4vw, 56px); }
.lp-rev .lp-row { --dur: 80s; }
.lp-rq { flex: none; width: clamp(280px, 30vw, 440px); margin: 0; padding: 30px 30px 26px; border-radius: 22px; background: color-mix(in srgb, var(--on) 9%, transparent); }
.lp-rq blockquote { margin: 0; font: 400 italic clamp(20px, 1.7vw, 25px)/1.3 var(--serif); }
.lp-rq figcaption { margin-top: 18px; font: 600 15px/1 var(--sans); }

@media (max-width: 900px) {
  .lp-hero__grid, .lp-intro__grid, .lp-steps__grid, .lp-lasts__grid, .lp-faq__grid, .lp-svc__grid { grid-template-columns: 1fr; }
  .lp-roll { aspect-ratio: 4 / 3.3; }
  .lp-steps__media { order: -1; aspect-ratio: 16 / 10; }
  .lp-svc__media { order: -1; aspect-ratio: 16 / 10; }
  .lp-homes__grid { grid-template-columns: 1fr; }
  .lp-thero { min-height: 86svh; }
}
@media (max-width: 560px) {
  .lp-btns .btn { flex: 1 1 100%; justify-content: center; }
  .lp-cans { grid-template-columns: 1fr 1fr; }
  .lp-towns__list { grid-template-columns: 1fr 1fr; }
  .lp-towns__list a { flex-direction: column; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-row, .lp-can, .lp-thero__img, .lp-roll__f img { animation: none !important; }
}
.lp-map .t.dim text { font-size: 10.5px; font-weight: 500; opacity: .75; }
.lp-map .t.dim path { fill: #d9dbe0; }

/* ---------- level-up: every section after the first starts with a brushed edge, so colours meet like paint, not like boxes ---------- */
.lp main > section + section, .lp main > section + .r6-cta {
  margin-top: -38px;
  -webkit-mask: url(/assets/edge-brush.svg) top / 100% 40px no-repeat, linear-gradient(#000 0 0) 0 39px / 100% calc(100% - 39px) no-repeat;
  mask: url(/assets/edge-brush.svg) top / 100% 40px no-repeat, linear-gradient(#000 0 0) 0 39px / 100% calc(100% - 39px) no-repeat;
}
.lp-work, .lp-quote, .lp-more { padding-top: calc(clamp(60px, 8vw, 110px) + 20px); }

/* no decorative step numbers (AI habit) */
.lp-steps__list .lp-n { display: none; }
.lp-steps__list p { padding-left: 0; }

/* the outgoing photo waits until the next one has wiped in, so the frame is never empty */
.lp-svc__media img:not(.is-on) { transition-delay: .9s; }
/* the roller caption keeps room for two lines on phones, so the page doesn't twitch each cycle */
@media (max-width: 560px) { .lp-roll__cap { min-height: 54px; display: flex; align-items: center; } }

.lp-rev .lp-rq figcaption { color: inherit; opacity: .85; }
