/* Cape Cod Master Plumbers — leaf green, cast-iron ink, Cape Cod sand */
:root {
  --ink: #0f1a14;
  --ink-2: #16251c;
  --leaf: #4cb84f;        /* logo green — use on dark backgrounds */
  --leaf-deep: #1d6b33;   /* AA on sand / white */
  --leaf-dark: #145026;
  --sand: #f4ecd9;
  --shell: #fbf8f0;
  --tide: #e3edea;
  --lab: #d9b071;         /* the lab's coat */
  --line: rgba(15, 26, 20, .14);
  --head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-h: 76px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--shell);
  -webkit-font-smoothing: antialiased;
}
section[id], header[id] { scroll-margin-top: var(--nav-h); }
h1, h2, h3, h4 {
  font-family: var(--head);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1;
}
a { color: var(--leaf-deep); }
img { max-width: 100%; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 10000;
  background: var(--leaf); color: var(--ink); padding: .6rem 1rem; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn-wfw, .btn-line {
  font-family: var(--head);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .8rem 1.6rem;
  border-radius: 4px;
  border: 2px solid transparent;
  transition: transform .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-wfw { background: var(--leaf-deep); color: #fff; }
.btn-wfw:hover, .btn-wfw:focus-visible { background: var(--leaf-dark); color: #fff; transform: translateY(-2px); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover, .btn-line:focus-visible { background: var(--ink); color: #fff; transform: translateY(-2px); }
.btn-wfw.on-dark { background: var(--leaf); color: var(--ink); }
.btn-wfw.on-dark:hover { background: #fff; color: var(--ink); }
.btn-line.on-dark { color: #fff; border-color: rgba(255,255,255,.6); }
.btn-line.on-dark:hover { background: #fff; color: var(--ink); border-color: #fff; }
:focus-visible { outline: 3px solid var(--lab); outline-offset: 2px; }

/* ---------- Navbar ---------- */
.site-nav {
  background: var(--ink);
  min-height: var(--nav-h);
  border-bottom: 3px solid var(--leaf);
  padding: .35rem 0;
}
.site-nav .navbar-brand {
  display: flex; align-items: center; gap: .7rem;
  color: #fff; padding: 0; margin-right: 1.5rem;
}
.site-nav .brand-logo { height: 54px; width: auto; }
.brand-name {
  font-family: var(--head); font-weight: 800; font-size: 1.55rem;
  text-transform: uppercase; letter-spacing: .03em; line-height: .95; color: #fff;
}
.brand-name small {
  display: block; font-family: var(--body); font-weight: 600; font-size: .68rem;
  letter-spacing: .2em; color: var(--leaf); margin-top: 3px;
}
.site-nav .nav-link {
  color: rgba(255,255,255,.86);
  font-family: var(--head); font-weight: 600; font-size: 1.15rem;
  text-transform: uppercase; letter-spacing: .07em;
  padding: .5rem .85rem;
}
.site-nav .nav-link:hover, .site-nav .nav-link:focus-visible { color: var(--leaf); }
.site-nav .btn-call {
  background: var(--leaf); color: var(--ink);
  font-family: var(--head); font-weight: 800; font-size: 1.2rem; letter-spacing: .05em;
  border-radius: 4px; padding: .45rem 1.1rem; text-decoration: none; white-space: nowrap;
}
.site-nav .btn-call:hover { background: #fff; }
.site-nav .navbar-toggler { border-color: rgba(255,255,255,.4); }
.site-nav .navbar-toggler:focus { box-shadow: 0 0 0 3px var(--lab); }
@media (max-width: 1199.98px) {
  .site-nav .navbar-collapse { padding: .75rem 0 1rem; }
  .site-nav .nav-link { padding: .65rem 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .site-nav .btn-call { display: inline-block; margin-top: 1rem; }
}
@media (max-width: 575.98px) {
  .site-nav .navbar-brand { margin-right: .5rem; gap: .55rem; min-width: 0; flex: 1 1 auto; }
  .site-nav .brand-logo { height: 42px; }
  .brand-name { font-size: 1.12rem; letter-spacing: .02em; }
  .brand-name small { font-size: .58rem; letter-spacing: .14em; }
  .site-nav .navbar-toggler { padding: .3rem .6rem; }
}

/* ---------- Hero: split panel with slanted photo edge ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  min-height: min(calc(100vh - var(--nav-h)), 760px);
  background: var(--sand);
  overflow: hidden;
}
.hero-copy {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(2.5rem, 5vw, 5rem) calc(7vw + 1rem) clamp(2.5rem, 5vw, 5rem) max(1.5rem, calc((100vw - 1320px) / 2 + .75rem));
}
.hero-eyebrow {
  font-family: var(--head); font-weight: 700; font-size: 1.15rem;
  text-transform: uppercase; letter-spacing: .18em; color: var(--leaf-deep);
  display: flex; align-items: center; gap: .7rem; margin-bottom: 1.1rem;
}
.hero-eyebrow::before { content: ""; width: 38px; height: 3px; background: var(--leaf-deep); }
.hero-title {
  font-size: clamp(3.4rem, 6.6vw, 6.4rem);
  line-height: .9;
  margin: 0 0 1.4rem;
}
.hero-title em { font-style: normal; color: var(--leaf-deep); display: block; }
.hero-lead { font-size: 1.2rem; max-width: 30rem; margin-bottom: 2rem; color: #26332b; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-hours {
  margin-top: 1.75rem; font-size: .95rem; font-weight: 600; color: #3a4a40;
  display: flex; align-items: center; gap: .5rem;
}
.hero-hours i { color: var(--leaf-deep); }
.hero-photo {
  position: relative;
  margin-left: -7vw;
  background: url('img/hero.webp') 30% 62% / cover no-repeat;
  clip-path: polygon(9% 0, 100% 0, 100% 100%, 0 100%);
}
.hero-photo::after {           /* a whisper of leaf-green so the photo sits in the palette */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(29,107,51,.16), rgba(29,107,51,0) 55%);
}
@media (max-width: 991.98px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-photo {
    order: -1; margin: 0; height: clamp(230px, 52vw, 360px);
    background-position: 18% 62%;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 26px));
  }
  .hero-copy { padding: 2rem 1.25rem 3rem; margin-top: -26px; }
  .hero-title { font-size: clamp(3rem, 12vw, 4.6rem); }
  .hero-eyebrow { font-size: 1rem; letter-spacing: .1em; gap: .5rem; }
  .hero-eyebrow::before { width: 22px; flex: none; }
  .hero-lead { font-size: 1.1rem; margin-bottom: 1.5rem; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .hero-copy { padding-left: 1.75rem; }
  .hero-title { font-size: clamp(3rem, 6vw, 4.4rem); }
}

/* ---------- Pledge strip ---------- */
.pledge { background: var(--ink); color: #fff; padding: 0; }
.pledge-cell {
  padding: 2rem 1.5rem;
  border-right: 1px solid rgba(255,255,255,.1);
  border-bottom: 1px solid rgba(255,255,255,.1);
  height: 100%;
}
.pledge-cell i { font-size: 1.9rem; color: var(--leaf); display: block; margin-bottom: .6rem; }
.pledge-cell h3 { font-size: 1.5rem; margin-bottom: .35rem; letter-spacing: .03em; }
.pledge-cell p { margin: 0; color: rgba(255,255,255,.72); font-size: .98rem; line-height: 1.5; }
.pledge-label {
  font-family: var(--head); font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--lab); font-size: .95rem; padding: 1.25rem 0 0;
}

/* ---------- Section scaffolding ---------- */
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.kicker {
  font-family: var(--head); font-weight: 700; font-size: 1.05rem;
  text-transform: uppercase; letter-spacing: .2em; color: var(--leaf-deep);
  display: flex; align-items: center; gap: .7rem; margin-bottom: .9rem;
}
.kicker::before { content: ""; width: 30px; height: 3px; background: currentColor; }
.section-title { font-size: clamp(2.6rem, 5.2vw, 4.4rem); margin-bottom: 1.25rem; }
.on-dark .kicker { color: var(--leaf); }

/* ---------- Services ---------- */
.services { background: var(--shell); }
.svc-list { list-style: none; padding: 0; margin: 2rem 0 0; counter-reset: svc; }
.svc {
  counter-increment: svc;
  display: grid; grid-template-columns: 4.5rem 1fr; gap: 0 1rem;
  padding: 1.75rem 0; border-top: 2px solid var(--ink);
}
.svc:last-child { border-bottom: 2px solid var(--ink); }
.svc::before {
  content: "0" counter(svc);
  font-family: var(--head); font-weight: 800; font-size: 3.4rem; line-height: .85; color: var(--leaf-deep);
}
.svc h3 { font-size: 1.85rem; margin-bottom: .55rem; line-height: 1.02; }
.svc p { margin: 0 0 .5rem; color: #33443a; }
.svc ul { margin: .5rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; }
.svc li {
  background: var(--sand); border: 1px solid var(--line); border-radius: 50px;
  padding: .15rem .8rem; font-size: .92rem; font-weight: 600;
}
.svc-photo { position: relative; }
.svc-photo img {
  width: 100%; height: auto; display: block; border-radius: 4px;
  aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 30%;
  box-shadow: 14px 14px 0 var(--leaf-deep);
}
.svc-caption { font-size: .88rem; color: #4a5a50; margin: 1.6rem 0 0; }
.van-ribbon {
  margin-top: 3.25rem; background: var(--ink); color: #fff; border-radius: 4px;
  padding: 1.1rem 1.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.25rem;
}
.van-ribbon strong {
  font-family: var(--head); text-transform: uppercase; letter-spacing: .16em; color: var(--lab); font-size: .95rem;
}
.van-ribbon span {
  font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 1.25rem;
}
.van-ribbon span + span::before { content: "\25C6"; color: var(--leaf); margin-right: 1.25rem; font-size: .8em; }
@media (max-width: 575.98px) {
  .svc { grid-template-columns: 3rem 1fr; }
  .svc::before { font-size: 2.6rem; }
  .svc-photo img { box-shadow: 9px 9px 0 var(--leaf-deep); }
  .van-ribbon span + span::before { display: none; }
  .van-ribbon span { flex-basis: 100%; }
}

/* ---------- The Cape Cod Promise ---------- */
.promise { background: var(--ink-2); color: #fff; position: relative; }
.promise::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 10px;
  background: repeating-linear-gradient(135deg, var(--leaf) 0 14px, var(--ink-2) 14px 28px);
}
.promise .section-title { color: #fff; }
.promise p { color: rgba(255,255,255,.82); }
.promise-quote {
  font-family: var(--head); font-weight: 700; text-transform: uppercase; line-height: 1.02;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem); color: var(--lab);
  border-left: 5px solid var(--leaf); padding-left: 1.25rem; margin: 0 0 1.75rem;
}
.commit-title { font-size: 1.6rem; color: var(--lab); margin-bottom: 1.1rem; letter-spacing: .08em; }
.commit {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: 4px; padding: 1.4rem 1.3rem; height: 100%;
}
.commit i { font-size: 1.7rem; color: var(--leaf); display: block; margin-bottom: .5rem; }
.commit h4 { font-size: 1.45rem; margin-bottom: .3rem; }
.commit p { margin: 0; font-size: .97rem; line-height: 1.5; }
.promise .lead-sm { font-size: 1.05rem; }

/* ---------- About the owner ---------- */
.about { background: var(--sand); }
.owner-frame { position: relative; max-width: 360px; margin: 0 auto; }
.owner-frame::before {
  content: ""; position: absolute; inset: 22px -22px -22px 22px; background: var(--leaf-deep); border-radius: 4px;
}
.owner-frame img { position: relative; width: 100%; height: auto; display: block; border-radius: 4px; }
.owner-tag {
  position: absolute; z-index: 2; left: -14px; bottom: 26px;
  background: var(--ink); color: #fff; padding: .55rem 1rem; border-radius: 3px;
  font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 1.15rem; line-height: 1.05;
}
.owner-tag small { display: block; font-family: var(--body); font-size: .68rem; letter-spacing: .16em; color: var(--leaf); font-weight: 600; }
.about p { color: #2b3a31; }
.local-badge {
  display: inline-flex; align-items: center; gap: .6rem; margin-top: .75rem;
  border: 2px solid var(--leaf-deep); color: var(--leaf-dark); border-radius: 4px;
  padding: .55rem 1rem; font-weight: 700;
}
@media (max-width: 575.98px) {
  .owner-frame { max-width: 300px; margin-bottom: 1rem; }
  .owner-frame::before { inset: 16px -14px -16px 14px; }
  .owner-tag { left: -8px; }
}

/* ---------- Service area ---------- */
.areas { background: var(--tide); }
.town {
  display: flex; align-items: center; gap: .75rem;
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
  padding: 1rem 1.1rem; height: 100%;
  font-family: var(--head); font-weight: 700; font-size: 1.5rem; text-transform: uppercase; letter-spacing: .04em; line-height: 1;
}
.town i { color: var(--leaf-deep); font-size: 1.25rem; }
.town-home { background: var(--ink); color: #fff; border-color: var(--ink); flex-direction: column; align-items: flex-start; justify-content: center; gap: .15rem; }
.town-home i { color: var(--leaf); }
.town-home small { font-family: var(--body); font-size: .8rem; font-weight: 500; letter-spacing: .02em; text-transform: none; color: rgba(255,255,255,.75); }

@media (max-width: 575.98px) {
  .town { font-size: 1.3rem; padding: .9rem .8rem; gap: .5rem; }
  .town-home { grid-column: auto; }
}

/* ---------- Reviews band ---------- */
.proof { background: var(--leaf-deep); color: #fff; padding: 3.25rem 0; }
.proof h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin: 0; }
.proof .kicker { color: var(--sand); }
.proof p { margin: .5rem 0 0; color: rgba(255,255,255,.88); }
.proof .btn-line { color: #fff; border-color: rgba(255,255,255,.7); }
.proof .btn-line:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ---------- Contact ---------- */
.contact { background: var(--shell); }
.quote-card { background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--leaf-deep); border-radius: 4px; padding: clamp(1.5rem, 3vw, 2.4rem); box-shadow: 0 18px 40px -24px rgba(15,26,20,.35); }
.quote-card .form-label { font-weight: 600; font-size: .92rem; margin-bottom: .25rem; }
.quote-card .form-control { border-radius: 3px; border-color: #b9c3bc; padding: .65rem .8rem; }
.quote-card .form-control:focus { border-color: var(--leaf-deep); box-shadow: 0 0 0 3px rgba(76,184,79,.3); }
.form-note { font-size: .85rem; color: #51615a; margin: .9rem 0 0; }
.info-block { padding-bottom: 1.4rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.info-row { display: flex; gap: .9rem; margin-bottom: 1rem; align-items: flex-start; }
.info-row i { font-size: 1.35rem; color: var(--leaf-deep); line-height: 1.5; }
.info-row a { color: var(--ink); font-weight: 600; text-decoration-color: var(--leaf); text-underline-offset: 3px; overflow-wrap: anywhere; }
.info-row .label { display: block; font-family: var(--head); font-weight: 700; letter-spacing: .14em; font-size: .85rem; text-transform: uppercase; color: var(--leaf-deep); }
.hours { width: 100%; max-width: 22rem; border-collapse: collapse; }
.hours td { padding: .38rem 0; border-bottom: 1px dashed var(--line); font-size: 1rem; }
.hours td:last-child { text-align: right; font-weight: 600; }
.hours .closed td:last-child { color: #6a766f; font-weight: 500; }
.map-wrap iframe, .visit-photo {
  width: 100%; height: 100%; min-height: 320px; border: 0; border-radius: 4px; display: block;
}
.visit-photo { object-fit: cover; object-position: 50% 40%; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.78); padding: 4rem 0 0; }
.site-footer h5 {
  font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: .14em;
  color: var(--lab); font-size: 1.05rem; margin-bottom: 1rem;
}
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: var(--leaf); }
.footer-logo { width: 150px; height: auto; margin-bottom: .75rem; }  /* transparent PNG-source logo: sits directly on the dark footer */
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .45rem; overflow-wrap: anywhere; }
.social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35); font-size: 1.15rem; margin-right: .5rem;
}
.social a:hover { background: var(--leaf); border-color: var(--leaf); color: var(--ink); }
.footer-bottom {
  margin-top: 3rem; padding: 1.4rem 0; border-top: 1px solid rgba(255,255,255,.12);
  font-size: .9rem;
}
.powered {
  display: inline-flex; align-items: center; gap: .55rem;
  border: 1px solid rgba(76,184,79,.55); border-radius: 50px; padding: .4rem 1rem .4rem .8rem;
  color: #fff !important; font-weight: 600;
}
.powered i { color: var(--leaf); }
.powered strong { color: var(--leaf); }
.powered:hover { background: rgba(76,184,79,.14); }

/* Mobile sticky call bar */
.call-bar { display: none; }
@media (max-width: 767.98px) {
  .call-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
    background: var(--leaf); color: var(--ink); text-decoration: none;
    align-items: center; justify-content: center; gap: .6rem;
    font-family: var(--head); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 1.3rem;
    padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(0,0,0,.25);
  }
  body { padding-bottom: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
