/*
Theme Name: JP Creative Maintenance
Theme URI: https://www.jpmaintain.com
Author: JP Creative Maintenance
Description: Custom theme for JP Creative Maintenance — handyman & home improvement, Greater Boston MA. Rebuilt from the original Wix design (cream/dark/gold, Cormorant Garamond + Inter).
Version: 1.9.37
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: jp-creative
*/

/* =========================================================
   1. DESIGN TOKENS (from original Wix design)
   ========================================================= */
:root {
  --cream: #F5F3EE;
  --cream-dark: #EAE6DC;
  --dark: #0F0E0C;
  --dark-mid: #1C1A16;
  --text: #28261F;
  --text-mid: #5A5649;
  --gold: #B8813A;
  --gold-light: #CFA05C;
  --white: #FFFFFF;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --nav-h: 76px;
}

/* =========================================================
   2. BASE
   ========================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--cream);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

h1, h2, h3, .serif { font-family: var(--serif); font-weight: 500; line-height: 1.1; color: var(--text); }
h1 { font-size: clamp(2.8rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h3 { font-size: 1.5rem; }
h1 em, h2 em { font-style: italic; color: var(--gold); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
section { padding: 96px 0; }

/* Eyebrow labels */
.eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 18px;
}

/* =========================================================
   3. BUTTONS
   ========================================================= */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 16px 30px;
  border: 1px solid var(--gold);
  transition: all .25s ease;
  cursor: pointer;
  line-height: 1;
}
.btn-solid { background: var(--gold); color: var(--white); }
.btn-solid:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--white); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.5); }
.btn-outline:hover { border-color: var(--white); color: var(--white); }
.btn-outline-dark { background: transparent; color: var(--text); border-color: var(--gold); }
.btn-outline-dark:hover { background: var(--gold); color: var(--white); }

/* =========================================================
   4. HEADER / NAV
   ========================================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(15,14,12,.92);
  backdrop-filter: blur(8px);
  transition: all .3s ease;
}
.site-header.scrolled { background: rgba(15,14,12,.98); box-shadow: 0 2px 24px rgba(0,0,0,.35); }
/* Keep the fixed header below the WP admin bar when logged in */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: var(--nav-h); max-width: 1320px; margin: 0 auto; padding: 0 24px;
}
.brand {
  font-family: var(--serif); font-size: 1.2rem; letter-spacing: .05em;
  color: var(--white); text-transform: uppercase; white-space: nowrap; flex-shrink: 0;
}
.brand em { color: var(--gold); font-style: normal; }
.brand:hover { color: var(--white); }
.nav-links { display: flex; align-items: center; gap: 20px; list-style: none; flex-wrap: nowrap; }
.nav-links > li { position: relative; white-space: nowrap; }
.nav-links a {
  color: rgba(255,255,255,.85); font-size: 11px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
}
.nav-links a:hover { color: var(--gold-light); }
.nav-cta { margin-left: 12px; }

/* Dropdowns (Services, Service Area) */
.nav-links .sub-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--dark-mid); border: 1px solid rgba(184,129,58,.25);
  list-style: none; min-width: 230px; padding: 12px 0;
  opacity: 0; visibility: hidden; transition: all .2s ease;
}
.nav-links li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-links .sub-menu li { padding: 0; }
.nav-links .sub-menu a { display: block; padding: 10px 22px; letter-spacing: .1em; }
.nav-links .sub-menu a:hover { background: rgba(184,129,58,.12); }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: all .3s; }
@media (max-width: 1280px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .site-header.menu-open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--dark); padding: 24px; gap: 18px;
    border-top: 1px solid rgba(184,129,58,.25);
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .site-header.menu-open .nav-links .sub-menu {
    position: static; transform: none; opacity: 1; visibility: visible;
    border: none; background: transparent; padding: 6px 0 0 16px; display: none;
  }
  .site-header.menu-open .nav-links li.open > .sub-menu { display: block; }

  /* No-JS fallback: if JavaScript never runs (html.js missing), the hamburger
     can't work — render the menu expanded instead so navigation always exists. */
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .nav-links {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--dark); padding: 24px; gap: 18px;
    border-top: 1px solid rgba(184,129,58,.25);
    max-height: 60vh; overflow-y: auto;
  }
  html:not(.js) .nav-links .sub-menu {
    position: static; transform: none; opacity: 1; visibility: visible;
    border: none; background: transparent; padding: 6px 0 0 16px; display: block;
  }
}

/* Address autocomplete dropdown (Photon) — matches dark/gold form style.
   JS enhancement only; hidden by default because it does not exist without JS. */
.addr-suggest {
  display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
  margin-top: 4px; list-style: none; padding: 6px 0;
  background: var(--dark-mid); border: 1px solid rgba(207,160,92,.45);
  box-shadow: 0 14px 34px rgba(0,0,0,.45); max-height: 240px; overflow-y: auto;
}
.addr-suggest li {
  padding: 10px 16px; font-size: 13px; color: rgba(255,255,255,.88);
  cursor: pointer; line-height: 1.45;
}
.addr-suggest li:hover, .addr-suggest li.active { background: rgba(184,129,58,.28); color: var(--white); }

/* =========================================================
   5. HERO
   ========================================================= */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  background-size: cover; background-position: center;
  padding: calc(var(--nav-h) + 60px) 0 120px;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,14,12,.72) 0%, rgba(15,14,12,.55) 55%, rgba(15,14,12,.82) 100%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero::before { z-index: 1; }
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } }
@media (max-width: 768px) { .hero-video { display: none; } } /* mobile: show poster image, save bandwidth */
.hero h1 { color: var(--white); margin-bottom: 26px; }
.hero h1 em { color: var(--gold-light); }
.hero p { color: rgba(255,255,255,.85); max-width: 480px; margin-bottom: 36px; font-size: 15px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.6); font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  animation: heroBob 2.4s ease-in-out infinite;
}
@keyframes heroBob { 0%,100% { transform: translate(-50%,0);} 50% { transform: translate(-50%,8px);} }

/* =========================================================
   6. STATS BAR
   ========================================================= */
.stats { background: var(--dark); padding: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.stat {
  padding: 44px 16px; text-align: center;
  border-left: 1px solid rgba(255,255,255,.08);
}
.stat:first-child { border-left: none; }
.stat .num { font-family: var(--serif); font-size: 2.8rem; color: var(--white); line-height: 1; }
.stat .num sup, .stat .num .accent { color: var(--gold); }
.stat .label { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-top: 10px; }
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border: none; padding: 28px 12px; }
  .stat:last-child { grid-column: 1 / -1; }
}

/* =========================================================
   7. SERVICES CARDS
   ========================================================= */
.services-head { max-width: 640px; margin-bottom: 56px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  background: var(--white); overflow: hidden; display: block; color: var(--text);
  box-shadow: 0 1px 3px rgba(15,14,12,.06);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 44px rgba(15,14,12,.14); color: var(--text); }
.card .card-img { height: 230px; overflow: hidden; }
.card .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 28px; }
.card-num { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.card h3 { margin: 10px 0 12px; }
.card p { font-size: 14px; color: var(--text-mid); margin-bottom: 18px; }
.card .card-link { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr !important; } } /* !important: beats per-page inline column counts on phones */

/* =========================================================
   8. WHY / ABOUT SPLIT
   ========================================================= */
.why { background: var(--cream-dark); }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.split ul.checks { list-style: none; margin: 26px 0 34px; }
.split ul.checks li {
  padding: 10px 0 10px 34px; position: relative; font-size: 15px;
  border-bottom: 1px solid rgba(40,38,31,.08);
}
.split ul.checks li::before {
  content: '✓'; position: absolute; left: 0; color: var(--gold); font-weight: 700;
}
.split-img { position: relative; }
.split-img img { width: 100%; object-fit: cover; }
.badge-float {
  position: absolute; left: -28px; bottom: 32px;
  background: var(--dark); color: var(--white); padding: 22px 28px;
}
.badge-float .num { font-family: var(--serif); font-size: 2rem; color: var(--gold-light); line-height: 1.1; }
.badge-float .label { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.7); }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .badge-float { left: 16px; }
}

/* =========================================================
   9. PROJECTS / GALLERY
   ========================================================= */
.projects { background: var(--dark); }
.projects .eyebrow { color: var(--gold-light); }
.projects h2 { color: var(--white); }
.projects p.lead { color: rgba(255,255,255,.65); max-width: 560px; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 48px; }
.gallery-item { position: relative; overflow: hidden; cursor: pointer; aspect-ratio: 16/9; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item::after {
  content: '⇱'; position: absolute; right: 14px; bottom: 10px;
  color: var(--white); font-size: 20px; opacity: 0; transition: opacity .3s;
}
.gallery-item:hover::after { opacity: 1; }
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(15,14,12,.85), transparent);
  color: var(--white); font-size: 13px; padding: 26px 16px 12px;
  opacity: 0; transition: opacity .3s;
}
.gallery-item:hover figcaption { opacity: 1; }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: 1fr; } }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 2000; background: rgba(15,14,12,.94);
  display: none; align-items: center; justify-content: center; padding: 4vw;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; object-fit: contain; }
.lightbox .lb-close, .lightbox .lb-prev, .lightbox .lb-next {
  position: absolute; background: none; border: none; color: var(--white);
  font-size: 34px; cursor: pointer; padding: 12px; line-height: 1; opacity: .8;
}
.lightbox .lb-close { top: 18px; right: 24px; }
.lightbox .lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lightbox button:hover { opacity: 1; }

/* =========================================================
   10. TESTIMONIALS
   ========================================================= */
.testimonials { text-align: center; }
.testimonials .stars { color: var(--gold); font-size: 22px; letter-spacing: .3em; margin: 24px 0; }
.testimonials blockquote {
  font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-style: italic; max-width: 820px; margin: 0 auto 22px; line-height: 1.5;
}
.testimonials cite { font-style: normal; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mid); }

/* =========================================================
   11. SERVICE AREA
   ========================================================= */
.service-area { background: var(--cream-dark); }
.area-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 48px; }
.area-col h3 { font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.area-col ul { list-style: none; }
.area-col li { padding: 7px 0; border-bottom: 1px solid rgba(40,38,31,.08); font-size: 14px; }
.area-col a { color: var(--text); }
.area-col a:hover { color: var(--gold); }
@media (max-width: 800px) { .area-grid { grid-template-columns: 1fr; } }

/* =========================================================
   12. CONTACT
   ========================================================= */
.contact { background: var(--dark); }
.contact .eyebrow { color: var(--gold-light); }
.contact h2, .contact h3 { color: var(--white); }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; margin-top: 24px; }
.contact-info p { color: rgba(255,255,255,.7); font-size: 15px; margin-bottom: 22px; }
.contact-meta { list-style: none; margin-top: 30px; }
.contact-meta li { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.85); font-size: 14px; }
.contact-meta strong { display: block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 4px; }
.contact-meta a { color: var(--white); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

/* Contact Form 7 styling */
.contact .wpcf7 label {
  display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.6); margin-bottom: 6px;
}
.contact .wpcf7 .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .contact .wpcf7 .form-row { grid-template-columns: 1fr; } }
.contact .wpcf7 input[type=text],
.contact .wpcf7 input[type=email],
.contact .wpcf7 input[type=tel],
.contact .wpcf7 select,
.contact .wpcf7 textarea {
  width: 100%; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.18);
  color: var(--white); padding: 13px 14px; font-family: var(--sans); font-size: 14px;
  margin-bottom: 18px; transition: border-color .25s;
}
.contact .wpcf7 select { appearance: auto; }
.contact .wpcf7 select option { color: var(--text); }
.contact .wpcf7 input:focus, .contact .wpcf7 select:focus, .contact .wpcf7 textarea:focus {
  outline: none; border-color: var(--gold);
}
.contact .wpcf7 input[type=file] { color: rgba(255,255,255,.7); font-size: 13px; margin-bottom: 18px; }
.contact .wpcf7 input[type=submit] {
  background: var(--gold); color: var(--white); border: 1px solid var(--gold);
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  padding: 16px 34px; cursor: pointer; transition: background .25s;
}
.contact .wpcf7 input[type=submit]:hover { background: var(--gold-light); }
.contact .wpcf7-response-output { color: var(--gold-light); border-color: var(--gold) !important; margin: 12px 0 0 !important; }

/* =========================================================
   13. FOOTER
   ========================================================= */
.site-footer { background: var(--dark-mid); padding: 56px 0 40px; text-align: center; }
.site-footer .brand { font-size: 1.2rem; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 26px; margin: 26px 0; }
.footer-links a { color: rgba(255,255,255,.7); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.footer-links a:hover { color: var(--gold-light); }
.site-footer .copyright { color: rgba(255,255,255,.4); font-size: 12px; }

/* =========================================================
   14. INTERIOR PAGES / BLOG
   ========================================================= */
.page-hero {
  background: var(--dark); padding: calc(var(--nav-h) + 80px) 0 70px; text-align: left;
}
.page-hero .eyebrow { color: var(--gold-light); }
.page-hero h1 { color: var(--white); font-size: clamp(2.4rem, 5vw, 3.6rem); }
.content-area { padding: 72px 0; max-width: 820px; margin: 0 auto; }
.content-area p, .content-area ul, .content-area ol { margin-bottom: 1.4em; color: var(--text); }
.content-area h2, .content-area h3 { margin: 1.6em 0 .6em; }
.content-area img { margin: 1.5em 0; }

.post-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 72px 0; }
@media (max-width: 900px) { .post-list { grid-template-columns: 1fr; } }
.post-card { background: var(--white); box-shadow: 0 1px 3px rgba(15,14,12,.06); transition: transform .3s, box-shadow .3s; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(15,14,12,.12); }
.post-card .thumb { aspect-ratio: 16/10; overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .post-body { padding: 24px; }
.post-card h3 { font-size: 1.25rem; }
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--gold); }
.post-card time { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mid); }

/* =========================================================
   14b. FAQ ACCORDION + PORTFOLIO FILTERS
   ========================================================= */
.faq-item {
  background: var(--white); margin-bottom: 12px;
  border: 1px solid rgba(40,38,31,.08);
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 20px 52px 20px 24px;
  font-family: var(--serif); font-size: 1.2rem; font-weight: 500; position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  color: var(--gold); font-size: 1.5rem; font-family: var(--sans); transition: transform .25s;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item .faq-answer { padding: 0 24px 22px; color: var(--text-mid); font-size: 15px; }
.faq-item[open] { border-left: 2px solid var(--gold); }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter-btn {
  background: transparent; border: 1px solid rgba(40,38,31,.2); color: var(--text-mid);
  font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; padding: 12px 20px; cursor: pointer; transition: all .25s;
}
.filter-btn:hover { border-color: var(--gold); color: var(--gold); }
.filter-btn.active { background: var(--gold); border-color: var(--gold); color: var(--white); }
.portfolio-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .portfolio-grid { grid-template-columns: 1fr; } }
.gallery-item.hide { display: none; }
.portfolio-grid .gallery-item { aspect-ratio: 4/3; }

/* =========================================================
   15. SCROLL REVEAL ANIMATIONS
   (elements get .reveal in templates; .in is added by main.js)
   ========================================================= */
/* Hide-for-animation ONLY when JS is confirmed running (html.js set inline in header.php).
   If JS is disabled, blocked, or fails, all content renders immediately — no invisible sections. */
html.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
html.js .reveal.in, .reveal { opacity: 1; }
html.js .reveal.in { transform: none; }
.reveal-d1 { transition-delay: .12s; }
.reveal-d2 { transition-delay: .24s; }
.reveal-d3 { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============ Before & After portfolio (v1.9.0) ============ */
.pfilter-btn {
  background: none; border: 1px solid var(--cream-dark); color: var(--text-mid);
  font: 500 0.78rem var(--sans); letter-spacing: .08em; text-transform: uppercase;
  padding: 10px 18px; cursor: pointer; transition: all .25s ease;
}
.pfilter-btn:hover { border-color: var(--gold); color: var(--gold); }
.pfilter-btn.active { background: var(--gold); border-color: var(--gold); color: var(--white); }
.ba-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 44px; }
@media (max-width: 1000px) { .ba-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .ba-grid { grid-template-columns: 1fr; } }
.ba-card { background: var(--white); border: 1px solid var(--cream-dark); display: flex; flex-direction: column; transition: transform .35s ease, box-shadow .35s ease; }
.ba-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(15,14,12,.10); }
.ba-card.hide { display: none; }
.ba-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; cursor: pointer; }
.ba-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-img-before { opacity: 0; transition: opacity .5s ease; }
.ba-thumb:hover .ba-img-before, .ba-thumb:focus-visible .ba-img-before { opacity: 1; }
.ba-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--gold); color: var(--white);
  font: 600 0.62rem var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 5px 10px;
}
.ba-hint { position: absolute; bottom: 10px; right: 12px; z-index: 2; color: var(--white); font: 500 0.62rem var(--sans); letter-spacing: .1em; text-transform: uppercase; text-shadow: 0 1px 6px rgba(0,0,0,.6); opacity: .85; }
.ba-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ba-cat { font: 600 0.66rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.ba-body h3 { font: 600 1.35rem var(--serif); color: var(--text); margin: 0; }
.ba-body p { font: 400 0.86rem/1.55 var(--sans); color: var(--text-mid); margin: 0; flex: 1; }
.ba-open {
  align-self: flex-start; margin-top: 6px; background: none; border: 1px solid var(--dark); color: var(--dark);
  font: 600 0.72rem var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 10px 18px; cursor: pointer; transition: all .25s ease;
}
.ba-open:hover { background: var(--dark); color: var(--white); }
/* modal */
.bam { display: none; position: fixed; inset: 0; z-index: 999; }
.bam.open { display: block; }
.bam-back { position: absolute; inset: 0; background: rgba(15,14,12,.92); }
.bam-dialog {
  position: relative; z-index: 2; max-width: 860px; margin: 4vh auto; background: var(--white);
  max-height: 92vh; overflow-y: auto; padding: 26px 28px 30px;
}
@media (max-width: 900px) { .bam-dialog { margin: 0; max-height: 100vh; height: 100%; padding: 20px 16px 40px; } }
.bam-close { position: sticky; float: right; top: 0; background: none; border: 0; font-size: 1.9rem; line-height: 1; cursor: pointer; color: var(--text-mid); z-index: 3; }
.bam-close:hover { color: var(--dark); }
.bam-cat { font: 600 0.68rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.bam-dialog h3 { font: 600 1.9rem var(--serif); color: var(--text); margin: 6px 0 2px; }
.bam-town { font: 500 0.85rem var(--sans); color: var(--text-mid); margin: 0 0 16px; }
.ba-slider { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--cream-dark); touch-action: pan-y; }
.ba-slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-slider .bam-before { clip-path: inset(0 calc(100% - var(--p, 50%)) 0 0); }
.ba-sl-handle { position: absolute; top: 0; bottom: 0; left: var(--p, 50%); width: 2px; background: var(--white); z-index: 2; pointer-events: none; box-shadow: 0 0 8px rgba(0,0,0,.5); }
.ba-sl-handle::after {
  content: '\2194'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 40px; height: 40px; border-radius: 50%; background: var(--white); color: var(--dark);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.ba-sl-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; z-index: 3; margin: 0; -webkit-appearance: none; }
.ba-sl-label { position: absolute; top: 12px; z-index: 2; font: 600 0.62rem var(--sans); letter-spacing: .12em; padding: 5px 10px; color: var(--white); pointer-events: none; }
.ba-sl-label.before { left: 12px; background: rgba(15,14,12,.75); }
.ba-sl-label.after { right: 12px; background: var(--gold); }
.bam-desc { font: 400 0.92rem/1.65 var(--sans); color: var(--text-mid); margin: 18px 0 20px; }
.bam-nav { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.bam-arrows button {
  background: none; border: 1px solid var(--cream-dark); width: 44px; height: 44px; font-size: 1.1rem;
  cursor: pointer; color: var(--text); transition: all .25s ease;
}
.bam-arrows button:hover { border-color: var(--gold); color: var(--gold); }
.misc-item figcaption { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .ba-card, .ba-img-before { transition: none; } }

/* ==========================================================================
   Service Area dropdown v2 (v1.9.34) — simple inline town list.
   - CLOSED STATE IS display:none — the closed dropdown physically cannot
     receive pointer events, block content, or trigger itself. No hover
     bridges, no pseudo-elements, no floating side panel.
   - Opens ONLY from the Service Area nav item (:hover / :focus-within on
     the li, or the tap-open .jp-open class). The hover-safe area is simply
     the visible dropdown box itself, which only exists while open.
   - Bellingham's six service links expand INLINE directly beneath
     Bellingham inside the same box — no separate far-right panel.
   - No-JS fallback: pure CSS :hover/:focus-within; the parent link still
     navigates to the homepage service-area grid; all towns are plain links.
   ========================================================================== */
.jp-mega-li { position: relative; }
/* NOTE: .jp-mega intentionally does NOT carry the .sub-menu class, so no
   legacy .sub-menu rule (centering transform, opacity/visibility fades)
   can ever reposition or ghost it. It owns 100% of its own styling. */
.nav-links .jp-mega {
  display: none;               /* safe closed state — cannot catch the pointer */
  pointer-events: none;
  position: absolute; top: calc(100% - 1px); right: 0; left: auto;
  width: 460px; max-width: calc(100vw - 48px);
  max-height: calc(100vh - var(--nav-h) - 30px); overflow-y: auto;
  padding: 18px 20px; text-align: left;
  background: var(--dark-mid); border: 1px solid rgba(184,129,58,.3);
  border-radius: 6px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.55);
  opacity: 1; visibility: visible; transform: none; transition: none;
  z-index: 1200;
}
.nav-links .jp-mega-li:hover > .jp-mega,
.nav-links .jp-mega-li:focus-within > .jp-mega,
.nav-links .jp-mega-li.jp-open > .jp-mega {
  display: block; pointer-events: auto;
  top: calc(100% - 1px); right: 0; left: auto; transform: none;
  opacity: 1; visibility: visible;
  animation: jpMegaIn .18s ease-out;
}
@keyframes jpMegaIn { from { opacity: 0; } to { opacity: 1; } } /* opacity only — the box never moves, so the 1px tab overlap is constant from the first frame */

.jp-mega-towns { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 16px; }
.jp-mega-towns .jp-mt { break-inside: avoid; padding: 0; }
.jp-mega-towns .jp-mt > a {
  display: block; padding: 7px 10px; font-family: var(--sans); font-size: 12.5px;
  letter-spacing: .08em; color: rgba(245,243,238,.85); border-radius: 3px;
}
.jp-mega-towns .jp-mt > a:hover, .jp-mega-towns .jp-mt > a:focus { color: var(--gold-light); background: rgba(184,129,58,.12); }

/* Bellingham featured row spans both columns; its services expand inline below it */
.jp-mt-svc { column-span: all; margin-bottom: 8px; border-bottom: 1px solid rgba(184,129,58,.25); padding-bottom: 8px !important; }
.jp-mt-svc > a { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.jp-mt-svc:hover > a, .jp-mt-svc:focus-within > a, .jp-mt-svc.jp-active > a { color: var(--gold-light); background: rgba(184,129,58,.16); }
.jp-mt-tag { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-left: 6px; }

.jp-svc-panel { display: none; padding: 6px 0 4px 12px; margin: 4px 0 2px 8px; border-left: 2px solid var(--gold); }
.jp-mt-svc:hover .jp-svc-panel, .jp-mt-svc:focus-within .jp-svc-panel, .jp-mt-svc.jp-active .jp-svc-panel { display: block; }
.jp-svc-head { display: none; }
.jp-svc-panel ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 14px; }
.jp-svc-panel ul li { break-inside: avoid; }
.jp-svc-panel ul a { display: block; padding: 5px 6px; font-family: var(--sans); font-size: 12px; letter-spacing: .06em; color: rgba(245,243,238,.85); border-radius: 3px; }
.jp-svc-panel ul a:hover, .jp-svc-panel ul a:focus { color: var(--gold-light); background: rgba(184,129,58,.12); }
.jp-svc-visit { column-span: all; }
.jp-svc-visit a { margin-top: 4px; color: var(--gold) !important; font-weight: 600; }

/* Keyboard support for ALL nav dropdowns + closed-state pointer safety */
.nav-links li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-links .sub-menu { pointer-events: none; }
.nav-links li:hover > .sub-menu, .nav-links li:focus-within > .sub-menu { pointer-events: auto; }

/* Mobile / hamburger: accordion list (unchanged behavior) */
@media (max-width: 1280px) {
  .nav-links .jp-mega { position: static; display: none; width: 100%; max-width: none; max-height: none; overflow: visible; border: none; box-shadow: none; background: transparent; padding: 6px 0 0 16px; border-radius: 0; animation: none; }
  .site-header.menu-open .nav-links li.open > .jp-mega { display: block; pointer-events: auto; }
  .jp-mega-towns { columns: 1; }
  .jp-mega-towns .jp-mt > a { padding: 9px 8px; font-size: 13px; }
  .jp-svc-panel { display: block; position: static; border-left: 2px solid rgba(184,129,58,.35); padding: 4px 0 10px 14px; margin: 2px 0 8px 8px; }
  .jp-svc-panel ul { columns: 1; }
  .jp-svc-panel ul a { padding: 7px 0; }
  .site-header.menu-open .nav-links .sub-menu { pointer-events: auto; }
  html:not(.js) .nav-links .sub-menu { pointer-events: auto; }
  html:not(.js) .nav-links .jp-mega { display: block; }
}


/* v1.9.37 — narrow-viewport header fix: on 320-362px screens the fixed-width
   brand pushed .nav-toggle past the right edge, making the menu unreachable.
   Shrink the brand and gap so the hamburger always stays on screen. */
@media (max-width: 374px) {
  .site-header .brand { font-size: 15px; letter-spacing: .6px; }
  .site-header .nav-inner { gap: 12px; }
}
