/* =========================================================
   Ande Plumbing Ltd: public site styles.
   Porcelain + slate, copper as the one accent (copper pipe). One family: Archivo, wide for
   headings (van-livery feel), normal width for reading. The copper pipe-run in the hero is
   the single loud element; everything else stays quiet.
   Bump ?v= in every page when this file changes (tools/build-site.py, V).
   ========================================================= */
@font-face {
  font-family: "Archivo"; src: url("/fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"), url("/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
}

:root {
  --porcelain: #f2f4f5;
  --white: #ffffff;
  --ink: #1b2630;
  --ink-2: #4b5862;      /* secondary text: 7:1 on porcelain */
  --copper: #a4562a;     /* accent: 5.2:1 on white */
  --copper-dark: #84431f;
  --copper-light: #d89a6f;
  --chrome: #8a959d;
  --line: #d3d9dd;
  --radius: 6px;
  --max: 1120px;
  --wide: 118%;          /* heading width */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--porcelain);
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
main { flex: 1; }
img, video, svg { display: block; max-width: 100%; }
a { color: var(--copper-dark); text-underline-offset: 3px; }
a:hover { color: var(--copper); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 200; background: var(--white); padding: 0.5rem 1rem; }

h1, h2, h3 { font-stretch: var(--wide); font-weight: 750; line-height: 1.12; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.05rem, 5.4vw, 3.4rem); max-width: 18ch; }
h2 { font-size: clamp(1.45rem, 3.4vw, 2.05rem); margin-bottom: 0.9rem; max-width: 26ch; }
h3 { font-size: 1.12rem; }
p { max-width: 68ch; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 58ch; }
.muted { color: var(--ink-2); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }
.band { padding: 4.5rem 0; }
.band-white { background: var(--white); }
.band-ink { background: var(--ink); color: #e9eef1; }
.band-ink h2 { color: var(--white); }
.band-ink .muted { color: #b4c0c8; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0.7rem 1.35rem;
  border-radius: var(--radius); border: 2px solid var(--copper); font: inherit; font-weight: 650; font-stretch: 108%;
  text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn-copper { background: var(--copper); color: var(--white); }
.btn-copper:hover { background: var(--copper-dark); border-color: var(--copper-dark); color: var(--white); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--white); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(242, 244, 245, 0.96); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgba(242, 244, 245, 0.85); backdrop-filter: blur(8px); } }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.logo svg { width: 38px; height: 38px; }
.logo-text { font-stretch: 125%; font-weight: 800; font-size: 1.08rem; line-height: 1; }
.logo-text small { display: block; font-stretch: 100%; font-weight: 500; font-size: 0.72rem; color: var(--ink-2); margin-top: 3px; letter-spacing: 0.01em; }
.desktop-nav ul { list-style: none; display: flex; gap: 1.5rem; }
.desktop-nav a { color: var(--ink); text-decoration: none; font-weight: 550; }
.desktop-nav a:hover, .desktop-nav a[aria-current="page"] { color: var(--copper-dark); text-decoration: underline; text-decoration-thickness: 2px; }
.nav .btn { min-height: 42px; padding: 0.45rem 1rem; }
.hamburger-btn { display: none; width: 46px; height: 46px; border: 0; background: none; font-size: 1.6rem; color: var(--ink); cursor: pointer; }
.mobile-nav { display: none; }
@media (max-width: 900px) {
  .desktop-nav, .nav .btn { display: none; }
  .hamburger-btn { display: block; }
  .mobile-nav.open { display: block; border-top: 1px solid var(--line); background: var(--porcelain); }
  .mobile-nav ul { list-style: none; padding: 0.4rem 16px 1rem; }
  .mobile-nav a { display: block; padding: 0.8rem 0; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }
}

/* ---- hero + the copper pipe-run ---- */
.hero { padding: 3.5rem 0 3rem; }
.hero .lead { margin-top: 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }
.pipe-run { margin-top: 2.8rem; }
.pipe-run svg { width: 100%; height: auto; }
.pipe-run .pipe-v { display: none; }
@media (max-width: 700px) {
  .pipe-run .pipe-h { display: none; }
  .pipe-run .pipe-v { display: block; max-width: 340px; }
}
.pipe-run text { font-family: "Archivo", system-ui, sans-serif; fill: var(--ink); }
.pipe-run .place { font-stretch: 118%; font-weight: 750; font-size: 19px; }
.pipe-run .who { font-weight: 500; font-size: 14.5px; fill: var(--ink-2); }
.pipe-run .via { font-weight: 500; font-size: 12.5px; fill: var(--chrome); }
.pipe-run a:focus-visible { outline: none; }
.pipe-run a:focus-visible .valve { stroke: var(--ink); stroke-width: 3; }
/* One moment of motion: the copper run draws itself once on load */
@media (prefers-reduced-motion: no-preference) {
  .pipe-run .flow { stroke-dasharray: 1; stroke-dashoffset: 1; animation: pipe 1.6s 0.2s cubic-bezier(.6,.05,.25,1) forwards; }
  @keyframes pipe { to { stroke-dashoffset: 0; } }
}

/* ---- credentials ---- */
.creds { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.creds dl { display: grid; grid-template-columns: repeat(4, 1fr); }
.creds dl > div { padding: 1.1rem 1rem 1.1rem 0; }
.creds dl > div + div { padding-left: 1.2rem; border-left: 1px solid var(--line); }
.creds dt { font-weight: 700; font-stretch: 110%; }
.creds dd { color: var(--ink-2); font-size: 0.92rem; }
@media (max-width: 800px) {
  .creds dl { grid-template-columns: 1fr 1fr; }
  .creds dl > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .creds dl > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---- services list (rows, not cards) ---- */
.svc-list { list-style: none; border-top: 2px solid var(--ink); margin-top: 1.5rem; }
.svc-list li { border-bottom: 1px solid var(--line); }
.svc-list a { display: grid; grid-template-columns: minmax(12rem, 1fr) 2fr auto; gap: 1.5rem; align-items: baseline;
  padding: 1.15rem 0; text-decoration: none; color: var(--ink); }
.svc-list a:hover h3 { color: var(--copper-dark); text-decoration: underline; text-decoration-thickness: 2px; }
.svc-list p { color: var(--ink-2); }
.svc-list .go { color: var(--copper); font-weight: 700; }
@media (max-width: 700px) { .svc-list a { grid-template-columns: 1fr auto; gap: 0.25rem 1rem; } .svc-list p { grid-column: 1; grid-row: 2; } .svc-list .go { grid-row: 1 / span 2; align-self: center; } }

/* ---- two bases ---- */
.bases { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1.5rem; }
.base { background: var(--white); border: 1px solid var(--line); border-top: 5px solid var(--copper); border-radius: 0 0 var(--radius) var(--radius); padding: 1.5rem; }
.base h3 { font-size: 1.35rem; }
.base .who { color: var(--ink-2); margin: 0.2rem 0 0.9rem; }
.base ul { list-style: none; margin: 0.9rem 0 1.2rem; color: var(--ink-2); }
.base li { padding: 0.15rem 0; }
.base .actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
@media (max-width: 760px) { .bases { grid-template-columns: 1fr; } }

/* ---- about ---- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.about p + p { margin-top: 0.9rem; }
.facts { list-style: none; border-top: 1px solid #3a4853; }
.facts li { padding: 0.85rem 0; border-bottom: 1px solid #3a4853; display: flex; justify-content: space-between; gap: 1rem; }
.facts b { font-stretch: 112%; }
@media (max-width: 800px) { .about { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ---- page header (inner pages) ---- */
.page-head { padding: 2.6rem 0 2.2rem; border-bottom: 1px solid var(--line); }
.crumbs { font-size: 0.88rem; color: var(--ink-2); margin-bottom: 0.9rem; }
.crumbs a { color: var(--ink-2); }
.page-head .lead { margin-top: 0.9rem; }
.prose { max-width: 720px; }
.prose h2 { margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-bottom: 1rem; }
.prose ul { margin: 0 0 1rem 1.2rem; }
.prose li { margin-bottom: 0.35rem; }
.split { display: grid; grid-template-columns: 1fr minmax(260px, 340px); gap: 3rem; align-items: start; }
.aside { position: sticky; top: 92px; background: var(--white); border: 1px solid var(--line); border-top: 5px solid var(--copper); padding: 1.4rem; border-radius: 0 0 var(--radius) var(--radius); }
.aside h3 { margin-bottom: 0.4rem; }
.aside p { color: var(--ink-2); font-size: 0.95rem; margin-bottom: 1rem; }
.aside .btn { width: 100%; margin-top: 0.5rem; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 2rem; } .aside { position: static; } }
.faq details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 650; }
.faq details p { margin-top: 0.6rem; color: var(--ink-2); }
.related { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; margin-top: 1rem; }
.related a { display: inline-block; padding: 0.5rem 0.95rem; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink); text-decoration: none; font-weight: 550; }
.related a:hover { border-color: var(--copper); color: var(--copper-dark); }

/* ---- work gallery (hook: #homepage-gallery; hidden until photos exist) ---- */
.gallery-controls { display: flex; justify-content: flex-end; gap: 0.5rem; margin: -0.5rem 0 0.9rem; }
.gallery-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); cursor: pointer; font-size: 1.1rem; color: var(--ink); }
.gallery-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, calc((100% - 2rem) / 3)); gap: 1rem; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 0.4rem; }
.gallery-grid::-webkit-scrollbar { display: none; }
@media (max-width: 700px) { .gallery-grid { grid-auto-columns: 82%; } .gallery-controls { display: none; } }
.gallery-card { scroll-snap-align: start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; }
.gallery-img-box { position: relative; aspect-ratio: 4 / 3; background: #dde3e6; }
.gallery-img-box img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb-blank { position: absolute; inset: 0; background: #2a3640; }
.video-play-badge { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.6rem; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.gallery-info { padding: 0.75rem 0.95rem; }
.gallery-info h3 { font-size: 0.95rem; font-stretch: 100%; font-weight: 600; }
.gallery-sentinel { width: 1px; }
.lightbox-modal { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; background: rgba(15, 22, 28, 0.9); padding: 16px; }
.lightbox-modal.open { display: flex; }
.lightbox-content { position: relative; width: min(100%, 1000px); background: #111a21; color: #fff; border-radius: var(--radius); overflow: hidden; }
.lightbox-image-box { position: relative; height: min(70vh, 640px); display: flex; align-items: center; justify-content: center; }
.lightbox-image-box img, .lightbox-image-box video { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-close, .lightbox-nav-btn { position: absolute; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); cursor: pointer; font-size: 1.2rem; color: var(--ink); }
.lightbox-close { top: 8px; right: 8px; font-size: 1.6rem; }
.lightbox-nav-btn { top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 8px; } .lightbox-next { right: 8px; }
.lightbox-details { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 1rem; font-size: 0.92rem; }
#lightboxCategory { font-size: 0.8rem; opacity: 0.7; }
#lightboxTitle { font-size: 1rem; font-stretch: 100%; }

/* ---- quote form (hooks: #quote-form, .cf-turnstile, #form-status, #submit-btn) ---- */
.contact { display: grid; grid-template-columns: 1fr minmax(0, 560px); gap: 3rem; align-items: start; }
.direct { list-style: none; margin-top: 1.3rem; }
.direct li { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.direct b { display: block; font-stretch: 110%; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; gap: 2rem; } }
.contact-form { display: grid; gap: 1rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.form-group { display: grid; gap: 0.35rem; }
.form-group label { font-weight: 650; font-size: 0.95rem; }
.form-control { width: 100%; padding: 0.75rem 0.85rem; font: inherit; font-size: 1rem; color: var(--ink); background: var(--porcelain); border: 1px solid #b9c3c9; border-radius: var(--radius); }
.form-control:focus { outline: none; border-color: var(--copper); background: var(--white); box-shadow: 0 0 0 3px rgba(164, 86, 42, 0.18); }
textarea.form-control { min-height: 120px; resize: vertical; }
.phone-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.5rem; }
.form-status-box { display: none; padding: 0.8rem 1rem; border-radius: var(--radius); font-size: 0.95rem; }
.form-status-box.success { display: block; background: #e6f4ea; color: #155c2c; }
.form-status-box.error { display: block; background: #fbeaea; color: #8a1c1c; }
.form-privacy-note { font-size: 0.82rem; color: var(--ink-2); }
@media (max-width: 767px) { input, select, textarea, .form-control { font-size: 16px; } }

/* ---- footer ---- */
.site-footer { background: var(--ink); color: #b4c0c8; padding: 2.8rem 0 2rem; font-size: 0.92rem; }
.site-footer a { color: #e9eef1; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.foot-grid h3 { color: var(--white); font-size: 1rem; margin-bottom: 0.6rem; }
.foot-grid ul { list-style: none; }
.foot-grid li { padding: 0.15rem 0; }
.legal { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid #34424d; font-size: 0.82rem; line-height: 1.55; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ---- floating WhatsApp (phones only) ---- */
.wa-float { display: none; }
@media (max-width: 767px) {
  .wa-float { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 90; display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.75rem 1.05rem; border-radius: 999px; background: #0f7a41; color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.28); }
  .wa-float:hover { color: #fff; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
