/* Copperline — first-party plumbing / heating template (S114).
   All imagery is authored CSS. No media, fonts, icons, embeds, CDNs, analytics or tracking.

   Voice: PRACTICAL AND WARM. Deep teal and copper on warm white, a rounded system sans in
   sentence case, and generous 14px radii — set against vowbarn-events-studio's 2px-radius serif
   editorial and keystone-trades-studio's condensed uppercase sans on slate. The signature shapes
   are an emergency strip above the header and a fixed-price list with dotted leaders. */

:root {
  --teal: #0f3b3d;
  --teal-mid: #1b585a;
  --teal-soft: #e4efee;
  --copper: #b87333;
  --copper-deep: #96591f;
  --paper: #f8f6f2;
  --card: #ffffff;
  --line: #dfe4e2;
  --ink: #16211f;
  --muted: #5c6a67;
  --radius: 14px;
  --sans: "Segoe UI", -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3 { font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; }
a { color: inherit; }
ul, ol { list-style: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 12;
  background: var(--copper); color: #fff; padding: 0.55rem 1.1rem;
  border-radius: 0 0 var(--radius) var(--radius); text-decoration: none; font-weight: 600;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; }

/* ---------- Emergency strip — this template's signature above-header band ---------- */
.emergency {
  background: var(--copper); color: #fff;
  padding: 0.6rem 1.25rem; text-align: center; font-size: 0.94rem; font-weight: 600;
}
.emergency a { color: #fff; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }

/* ---------- Header + navigation ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; background: var(--paper);
  border-bottom: 1px solid var(--line); position: relative;
}
.wordmark {
  font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em;
  text-decoration: none; color: var(--teal); white-space: nowrap;
}
.wordmark span[aria-hidden] { color: var(--copper); }
.nav-disclosure summary {
  list-style: none; cursor: pointer; user-select: none;
  font-weight: 600; padding: 0.55rem 1.05rem;
  border: 1.5px solid var(--teal); border-radius: 999px; color: var(--teal);
}
.nav-disclosure summary::-webkit-details-marker { display: none; }
.nav-disclosure[open] summary { background: var(--teal); color: #fff; }
.nav-disclosure nav {
  position: absolute; right: 1.25rem; left: 1.25rem; top: calc(100% + 0.5rem); z-index: 9;
  display: flex; flex-direction: column; gap: 0.2rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.85rem; box-shadow: 0 16px 34px rgba(15, 59, 61, 0.14);
}
.nav-disclosure nav a:not(.button) { text-decoration: none; font-weight: 600; padding: 0.6rem 0.75rem; border-radius: 10px; color: var(--teal); }
.nav-disclosure nav a:not(.button):hover { background: var(--teal-soft); }

/* Desktop inline nav is OPTED INTO by main.js (matchMedia adds .nav-inline and sets [open]).
   A closed <details> does not render its children, so pure CSS cannot inline this menu at desktop
   widths — without JavaScript the summary button stays visible and usable instead. */
.nav-disclosure.nav-inline summary { display: none; }
.nav-disclosure.nav-inline nav {
  position: static; flex-direction: row; align-items: center; gap: 0.4rem;
  background: none; border: 0; padding: 0; box-shadow: none;
}
.nav-disclosure.nav-inline nav a { padding: 0.45rem 0.75rem; }

.header-call { display: none; }
@media (max-width: 799px) {
  .site-header { gap: 0.6rem; }
  .header-call { display: inline-block; margin-left: auto; }
}
@media (max-width: 479px) {
  .emergency { font-size: 0.84rem; padding: 0.5rem 0.8rem; }
  .site-header { padding: 0.8rem 0.9rem; gap: 0.45rem; }
  .wordmark { font-size: 1.15rem; }
  .header-call { font-size: 0.9rem; }
  .nav-disclosure summary { padding: 0.42rem 0.85rem; font-size: 0.9rem; }
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block; text-decoration: none; text-align: center;
  font-weight: 700; font-size: 1rem;
  background: var(--copper); color: #fff;
  border: 1.5px solid var(--copper); border-radius: 999px;
  padding: 0.8rem 1.7rem; cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}
.button:hover { background: var(--copper-deep); border-color: var(--copper-deep); transform: translateY(-1px); }
.button-small { padding: 0.5rem 1.1rem; font-size: 0.94rem; }
.button-outline { background: transparent; color: var(--teal); border-color: var(--teal); }
.button-outline:hover { background: var(--teal); color: #fff; }
.button-light { background: #fff; color: var(--teal); border-color: #fff; }
.button-light:hover { background: var(--teal-soft); border-color: var(--teal-soft); }
.call-link { font-weight: 700; color: var(--copper-deep); text-decoration: none; white-space: nowrap; }
.call-link:hover { text-decoration: underline; }

/* ---------- Hero — split, text left / plate right ---------- */
.hero { background: var(--paper); padding: 3rem 1.25rem 3rem; }
.hero-inner {
  max-width: 68rem; margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center;
}
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.1fr 1fr; gap: 3rem; } }
.eyebrow {
  display: inline-block; font-size: 0.82rem; font-weight: 700;
  color: var(--teal); background: var(--teal-soft);
  border-radius: 999px; padding: 0.35rem 0.9rem; margin-bottom: 1.1rem;
}
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.5rem); max-width: 15ch; }
.hero-sub { margin-top: 1rem; font-size: 1.12rem; max-width: 44ch; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 1.5rem; }
.hero-badges li { font-size: 0.92rem; font-weight: 600; color: var(--teal); padding-left: 1.2rem; position: relative; }
.hero-badges li::before {
  content: ""; position: absolute; left: 0; top: 0.52em;
  width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--copper);
}
.hero-plate { height: clamp(240px, 38vw, 360px); border-radius: var(--radius); display: block; width: 100%; object-fit: cover;}

/* ---------- Section frame + filter strip ---------- */
.section { max-width: 68rem; margin: 0 auto; padding: 3rem 1.25rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head h2, .band h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.section-intro { margin-top: 0.6rem; max-width: 52ch; color: var(--muted); }
.filter-count { color: var(--teal); font-weight: 700; }

.strip { background: var(--teal); padding: 1.4rem 1.25rem; }
.filter-form {
  max-width: 68rem; margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 0.85rem; align-items: end;
}
@media (min-width: 700px) { .filter-form { grid-template-columns: 1fr 1fr auto; } }
.filter-form .field label { color: #fff; font-size: 0.9rem; font-weight: 600; }
.filter-form select {
  width: 100%; margin-top: 0.35rem; padding: 0.7rem 0.75rem;
  font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--teal-mid); border-radius: 10px;
}

/* ---------- Cards ---------- */
.item-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.75rem; }
@media (min-width: 620px) { .item-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .item-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(15, 59, 61, 0.13); }
.card-body { padding: 1.15rem 1.25rem 1.35rem; }
.card-head { display: flex; justify-content: space-between; gap: 0.75rem; align-items: baseline; }
.card-title { font-size: 1.2rem; }
.card-where { font-size: 0.95rem; font-weight: 700; color: var(--copper-deep); white-space: nowrap; }
.card-meta { margin-top: 0.4rem; color: var(--muted); font-size: 0.96rem; }
.card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }
.card-tags li {
  font-size: 0.78rem; font-weight: 600; color: var(--teal);
  background: var(--teal-soft); border-radius: 999px; padding: 0.22rem 0.7rem;
}
.filter-empty { margin-top: 1.75rem; padding: 1.4rem; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- CSS artwork (all imagery is authored gradients) ----------
   Construction rules, all learned by LOOKING at renders:
   1. `background-repeat: no-repeat` lives on the shared selector below. A layer sized to a
      fraction of the box tiles across the whole plate otherwise.
   2. Apex shapes need two HALF-WIDTH gradients: `to top left` draws the LEFT slope, `to top
      right` the right. Full-box diagonals cross into an "X"; swapping the pair gives a valley.
   3. Round things are DISCRETE radial-gradients. A repeating radial clipped into a short band
      stacks into pillars instead of circles. */

.art-boiler, .art-radiator, .art-tap, .art-drain, .art-pipe, .art-bathroom {
  background-repeat: no-repeat;
  background-color: var(--teal-soft);
}

/* Wall-mounted combi boiler: white case, dark display, a dial, and copper flow/return pipes
   dropping out of the underside. This panel also runs at HERO size, where a bare white box with
   one stripe stopped reading as a boiler — the dial and the underside shadow carry it large. */
/* Radiator: a panel body carrying vertical fins, with a valve at the bottom corner.
   The fins need a BODY behind them — bare white bars on a pale wall read as a barcode. */
/* Mixer tap running into a basin.
   Every part must TOUCH the next one — a spout, a stream and a bowl that do not line up read as
   three unrelated marks rather than as a running tap. */
/* Drain grate: a round cover with parallel slots. */
/* A copper pipe with a joint, dripping. */
/* Bathroom: a roll-top bath against a tiled wall.
   The FEET are what make it a bath rather than a white box — a plain rectangle with a blue bar
   inside could be anything, which is what the first render of this panel looked like. */
/* ---------- Fixed-price list — this template's second signature shape ---------- */
.prices { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem 3rem; }
.prices ul { margin-top: 1.5rem; }
.prices li {
  display: flex; align-items: baseline; gap: 0.75rem;
  padding: 0.95rem 0; border-bottom: 1px solid var(--line);
}
.prices .what { font-weight: 600; }
.prices .leader { flex: 1; border-bottom: 2px dotted var(--line); transform: translateY(-0.25em); min-width: 2rem; }
.prices .cost { font-weight: 700; color: var(--teal); white-space: nowrap; }
.prices .note { margin-top: 1.25rem; }

/* ---------- Feature grid + bands ---------- */
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.75rem; }
@media (min-width: 700px) { .feature-grid { grid-template-columns: 1fr 1fr 1fr; } }
.feature-grid li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.feature-grid h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.feature-grid p { color: var(--muted); font-size: 0.98rem; }

.band { background: var(--teal); color: #fff; padding: 3.5rem 1.25rem; text-align: center; }
.band p { max-width: 50ch; margin: 0.85rem auto 1.6rem; color: #b8ccc9; }

/* ---------- Interior pages ---------- */
.page { max-width: 68rem; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.breadcrumb a { font-weight: 600; text-decoration: none; color: var(--muted); }
.breadcrumb a:hover { color: var(--copper-deep); }
.page-hero { padding: 1.5rem 0 0.5rem; }
.page-hero h1 { font-size: clamp(2rem, 5.5vw, 3rem); }
.page-hero p { margin-top: 0.85rem; max-width: 54ch; color: var(--muted); }

/* ---------- Forms (preview-safe) ---------- */
.form-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 1.75rem; }
@media (min-width: 860px) { .form-layout { grid-template-columns: 1.4fr 1fr; } }
.book-form {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; display: grid; grid-template-columns: 1fr; gap: 1rem; align-self: start;
}
@media (min-width: 620px) { .book-form { grid-template-columns: 1fr 1fr; } .field-wide { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 600; font-size: 0.95rem; }
.label-optional { font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; margin-top: 0.35rem; padding: 0.72rem 0.8rem;
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 10px;
}
.book-form .button { justify-self: start; }
.form-status { grid-column: 1 / -1; font-weight: 600; color: var(--teal); min-height: 1.4em; }

.panel { background: var(--teal-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; align-self: start; }
.panel h2 { font-size: 1.3rem; }
.steps { counter-reset: step; margin-top: 1.15rem; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.2rem 3rem; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -0.05rem;
  width: 2rem; height: 2rem; display: grid; place-items: center;
  font-weight: 700; color: #fff; background: var(--copper); border-radius: 50%;
}
.steps h3 { font-size: 1.08rem; }
.steps p { color: var(--muted); font-size: 0.96rem; }
.note { margin-top: 1.5rem; color: var(--muted); font-size: 0.95rem; max-width: 60ch; }

/* ---------- Footer ---------- */
footer {
  background: var(--teal); color: #a9c0bd;
  padding: 2.5rem 1.25rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem;
}
.wordmark-footer { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
footer .call-link { color: #e0a468; }
.footer-truth { max-width: 34ch; font-size: 0.88rem; color: #6f8a87; align-self: end; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .button:hover, .card:hover { transform: none; }
}

/* Build credit — carried by every template in this library, matching the deployed demos.
   Colour is inherited rather than fixed so this single rule works on every footer palette. */
.footer-powered { margin-top: 0.9rem; font-size: 0.85rem; opacity: 0.8; }
.footer-powered a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-powered a:hover { opacity: 0.85; }

/* --- Touch targets ------------------------------------------------ S116
   A standalone control needs 44x44 CSS px (Apple HIG; WCAG 2.5.5 AAA, and 2.5.8 AA
   sets a 24px floor). The S116 polish pass measured the header phone link at 23px
   and the Menu button at 35px on a 390px viewport, on every template in the library.
   On a trades site the phone number IS the conversion — it was rendering at half the
   required size at exactly the width most visitors arrive on.

   Layout only, no colour, so this block is copy-paste identical across every palette
   in the library. Inline links inside prose are deliberately NOT touched: both WCAG
   target-size rules exempt them, and padding them out would wreck the body copy. */
@media (max-width: 799px) {
  .header-call,
  .nav-disclosure summary,
  .nav-disclosure nav .call-link,
  .button,
  .button-small,
  button[type="submit"] {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* <img> box behaviour for card-art (added with the photography swap). */
.card-art { display: block; width: 100%; object-fit: cover; }
