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

   Voice: DARK AND ELECTRIC. This is the library's first dark-ground template — near-black panels
   with an amber accent, a geometric sans, tight uppercase headings and 4px radii — against
   copperline-plumbing-studio's warm-white pills and vowbarn-events-studio's cream serif. A whole
   site running dark is the single biggest distinctness lever available, and it suits the trade. */

:root {
  --void: #101216;
  --panel: #191d24;
  --panel-lift: #21262f;
  --amber: #ffc21f;
  --amber-deep: #e0a800;
  --text: #e9ebef;
  --muted: #949ba7;
  --line: #2b313b;
  --radius: 4px;
  --sans: "Segoe UI", system-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(--text);
  background: var(--void);
}
h1, h2, h3 { font-weight: 800; line-height: 1.06; letter-spacing: -0.02em; text-transform: uppercase; }
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(--amber); color: #101216; padding: 0.55rem 1.1rem;
  border-radius: 0 0 var(--radius) var(--radius); text-decoration: none; font-weight: 700;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* ---------- Header + navigation ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.35rem; background: var(--void);
  border-bottom: 1px solid var(--line); position: relative;
}
.wordmark {
  font-size: 1.4rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase;
  text-decoration: none; color: var(--text); white-space: nowrap;
}
.wordmark span[aria-hidden] { color: var(--amber); }
.nav-disclosure summary {
  list-style: none; cursor: pointer; user-select: none;
  font-weight: 700; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.55rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
}
.nav-disclosure summary::-webkit-details-marker { display: none; }
.nav-disclosure[open] summary { background: var(--amber); color: #101216; border-color: var(--amber); }
.nav-disclosure nav {
  position: absolute; right: 1.35rem; left: 1.35rem; top: calc(100% + 0.4rem); z-index: 9;
  display: flex; flex-direction: column; gap: 0.15rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.8rem; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}
.nav-disclosure nav a:not(.button) {
  text-decoration: none; font-weight: 600; font-size: 0.9rem; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 0.6rem 0.7rem; border-radius: var(--radius); color: var(--text);
}
.nav-disclosure nav a:not(.button):hover { background: var(--panel-lift); color: var(--amber); }

/* 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.3rem;
  background: none; border: 0; padding: 0; box-shadow: none;
}
.nav-disclosure.nav-inline nav a { padding: 0.45rem 0.7rem; }

.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) {
  .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.7rem; font-size: 0.75rem; }
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block; text-decoration: none; text-align: center;
  font-weight: 800; font-size: 0.92rem; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--amber); color: #101216;
  border: 1px solid var(--amber); border-radius: var(--radius);
  padding: 0.85rem 1.7rem; cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}
.button:hover { background: var(--amber-deep); border-color: var(--amber-deep); transform: translateY(-1px); }
.button-small { padding: 0.5rem 1rem; font-size: 0.8rem; }
.button-outline { background: transparent; color: var(--text); border-color: var(--line); }
.button-outline:hover { background: var(--panel-lift); border-color: var(--text); }
.button-light { background: var(--amber); color: #101216; border-color: var(--amber); }
.call-link { font-weight: 700; color: var(--amber); text-decoration: none; white-space: nowrap; }
.call-link:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { background: var(--void); padding: 3.25rem 1.35rem 2.5rem; border-bottom: 1px solid var(--line); }
.hero-inner {
  max-width: 70rem; margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center;
}
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.15fr 1fr; gap: 3rem; } }
.eyebrow {
  font-size: 0.76rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 1.1rem;
}
.hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); max-width: 14ch; }
.hero h1 span { color: var(--amber); }
.hero-sub { margin-top: 1.1rem; font-size: 1.1rem; max-width: 44ch; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.7rem; }
.hero-plate { height: clamp(240px, 38vw, 360px); border: 1px solid var(--line); border-radius: var(--radius); display: block; width: 100%; object-fit: cover;}

/* ---------- Credentials strip — this template's signature band ---------- */
.creds { background: var(--panel); border-bottom: 1px solid var(--line); padding: 1.1rem 1.35rem; }
.creds ul {
  max-width: 70rem; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; justify-content: center;
}
.creds li {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text); padding-left: 1.4rem; position: relative;
}
.creds li::before {
  content: ""; position: absolute; left: 0; top: 0.35em;
  width: 0.7rem; height: 0.7rem; background: var(--amber); border-radius: 1px;
  transform: rotate(45deg);
}

/* ---------- Section frame + filter strip ---------- */
.section { max-width: 70rem; margin: 0 auto; padding: 3rem 1.35rem; }
.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.5rem); }
.section-intro { margin-top: 0.6rem; max-width: 52ch; color: var(--muted); }
.filter-count { color: var(--amber); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.95rem; }

.strip { background: var(--panel); padding: 1.4rem 1.35rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filter-form {
  max-width: 70rem; 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: var(--text); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.filter-form select {
  width: 100%; margin-top: 0.4rem; padding: 0.7rem 0.75rem;
  font: inherit; color: var(--text); background: var(--void);
  border: 1px solid var(--line); border-radius: var(--radius);
}

/* ---------- Cards — dark on dark, separated by hairlines not shadows ---------- */
.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(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--amber); }
.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.12rem; }
.card-where { font-size: 0.88rem; font-weight: 800; color: var(--amber); white-space: nowrap; }
.card-meta { margin-top: 0.45rem; color: var(--muted); font-size: 0.95rem; }
.card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }
.card-tags li {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--amber); border: 1px solid var(--line); border-radius: 2px; padding: 0.2rem 0.55rem;
}
.filter-empty { margin-top: 1.75rem; padding: 1.4rem; background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* ---------- CSS artwork (all imagery is authored gradients) ----------
   Construction rules, all learned by LOOKING at renders rather than at source:
   1. `background-repeat: no-repeat` on the shared selector — a layer sized to a fraction of the
      box tiles across the whole plate otherwise.
   2. Parts of an object must TOUCH. A spout, a stream and a bowl that do not line up read as
      three unrelated marks (copperline).
   3. Round things are DISCRETE radial-gradients; a repeating radial clipped into a band stacks
      into pillars (vowbarn).
   4. On a dark ground, an object needs a lighter FACE — a dark shape on dark reads as nothing. */

.art-board, .art-socket, .art-lighting, .art-ev, .art-cable, .art-outdoor {
  background-repeat: no-repeat;
  background-color: #0b0d11;
}

/* Consumer unit: a metal enclosure with a row of breakers and one switched off. */
/* Double socket: a white faceplate with two three-pin outlets and rocker switches. */
/* Ceiling downlights: three lit apertures, each with a soft halo around it.
   A GLOW NEEDS A GRADUAL FALLOFF. The first version used a hard alpha stop (`rgba(...) 0 70%,
   transparent 70%`), which over a dark ground renders as a solid olive half-disc — three downlights
   read as three bowls. Light is a ramp, not a shape: fade through several stops to transparent,
   and centre the halo ON the lamp rather than offsetting it. */
/* EV charge point: a wall box with a lit status ring and a cable dropping to a connector. */
/* Twin-and-earth cable, stripped back to its three cores. */
/* Outdoor supply: garden bollard lights along a path at dusk.
   Same lesson as .art-lighting — the pool of light on the ground is a SOFT ramp. The first
   version's hard-edged ellipse read as a satellite dish sitting on a post. */
/* ---------- 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(--panel); border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: var(--radius); padding: 1.5rem; }
.feature-grid h3 { font-size: 1.08rem; margin-bottom: 0.5rem; }
.feature-grid p { color: var(--muted); font-size: 0.97rem; }

.band { background: var(--amber); color: #101216; padding: 3.5rem 1.35rem; text-align: center; }
.band p { max-width: 50ch; margin: 0.85rem auto 1.6rem; color: #3d3208; }
.band .button { background: #101216; color: var(--amber); border-color: #101216; }
.band .button:hover { background: #000; border-color: #000; }

/* ---------- Interior pages ---------- */
.page { max-width: 70rem; margin: 0 auto; padding: 1.5rem 1.35rem 3rem; }
.breadcrumb a { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.breadcrumb a:hover { color: var(--amber); }
.page-hero { padding: 1.5rem 0 0.5rem; }
.page-hero h1 { font-size: clamp(2rem, 5.5vw, 3.1rem); }
.page-hero p { margin-top: 0.9rem; 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(--panel); 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: 700; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); }
.label-optional { font-weight: 400; letter-spacing: 0.02em; text-transform: none; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; margin-top: 0.4rem; padding: 0.72rem 0.8rem;
  font: inherit; color: var(--text); background: var(--void);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.book-form .button { justify-self: start; }
.form-status { grid-column: 1 / -1; font-weight: 700; color: var(--amber); min-height: 1.4em; }

.panel { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--amber); border-radius: var(--radius); padding: 1.6rem; align-self: start; }
.panel h2 { font-size: 1.25rem; }
.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, decimal-leading-zero);
  position: absolute; left: 0; top: 0.05rem;
  font-weight: 800; font-size: 0.95rem; color: var(--amber);
}
.steps h3 { font-size: 1.02rem; }
.steps p { color: var(--muted); font-size: 0.95rem; }
.note { margin-top: 1.5rem; color: var(--muted); font-size: 0.94rem; max-width: 60ch; }

/* ---------- Footer ---------- */
footer {
  background: #0b0d11; color: var(--muted);
  padding: 2.5rem 1.35rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem;
}
.wordmark-footer { font-size: 1.25rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text); margin-bottom: 0.5rem; }
footer .call-link { color: var(--amber); }
/* Build credit — carried by every template in this library, matching the deployed demos. */
.footer-powered { margin-top: 0.9rem; font-size: 0.85rem; color: #626a76; }
.footer-powered a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.footer-powered a:hover { color: var(--amber); }
.footer-truth { max-width: 34ch; font-size: 0.87rem; color: #626a76; 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; }
}

/* --- 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; }
