/* ==========================================================================
   Trades factory — base stylesheet.
   Per client, override ONLY the tokens in :root. Never edit below the token
   block: that is what keeps 40 sites maintainable by one person.
   ========================================================================== */
:root{
  /* --- CLIENT TOKENS: override these per build --- */
  --brand:#0b5fa5;          /* off the van */
  --brand-dark:#08487d;
  --accent:#f5a623;         /* the second van colour, used sparingly */
  --ink:#15181d;
  --ink-soft:#4a5260;
  --line:#dfe4ea;
  --tint:#f4f7fa;
  --paper:#ffffff;
  --radius:12px;
  --maxw:1120px;
  /* --- end client tokens --- */

  --ok:#0d7a4a;
  --urgent:#c2331f;
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --shadow:0 1px 2px rgba(16,24,40,.06),0 8px 24px rgba(16,24,40,.08);
}
*,*::before,*::after{box-sizing:border-box}
/* [hidden] must win over any display rule below, or panels meant to be hidden
   (photo preview, price result, status bar) flash on load. */
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:var(--font);color:var(--ink);background:var(--paper);
     font-size:17px;line-height:1.6;-webkit-font-smoothing:antialiased;
     padding-bottom:env(safe-area-inset-bottom)}
img{max-width:100%;height:auto;display:block}
a{color:var(--brand-dark)}
h1,h2,h3{line-height:1.15;letter-spacing:-.02em;margin:0 0 .5em}
h1{font-size:clamp(1.8rem,5.2vw,3.1rem);font-weight:800}
h2{font-size:clamp(1.4rem,3.4vw,2.1rem);font-weight:750}
h3{font-size:1.12rem;font-weight:700}
p{margin:0 0 1em}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px;border-radius:4px}
.visually-hidden,.hp{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{position:absolute;left:-999px;top:0;background:var(--ink);color:#fff;padding:.8rem 1.2rem;z-index:99}
.skip:focus{left:0}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
     font-weight:700;text-decoration:none;border:2px solid transparent;cursor:pointer;
     padding:.7rem 1.15rem;border-radius:var(--radius);font-size:1rem;
     min-height:48px;transition:transform .06s ease,background .15s ease}
.btn:active{transform:translateY(1px)}
.btn--primary{background:var(--brand);color:#fff}
.btn--primary:hover{background:var(--brand-dark)}
.btn--ghost{background:transparent;color:var(--brand-dark);border-color:var(--line)}
.btn--ghost:hover{border-color:var(--brand)}
.btn--phone{background:var(--tint);color:var(--brand-dark);font-variant-numeric:tabular-nums}
.btn--lg{padding:.95rem 1.5rem;font-size:1.06rem;min-height:54px}
.btn--block{width:100%}

/* ---------- status bar (open / closed / emergency) ---------- */
.statusbar{display:flex;align-items:center;gap:.55rem;justify-content:center;flex-wrap:wrap;
           background:var(--ink);color:#fff;font-size:.92rem;padding:.5rem 1rem}
.statusbar .dot{width:9px;height:9px;border-radius:50%;background:var(--ok);flex:none}
.statusbar[data-state="closed"]{background:var(--urgent)}
.statusbar[data-state="closed"] .dot{background:#fff}
.statusbar__call{color:#fff;font-weight:700}

/* ---------- header ---------- */
.header{display:flex;align-items:center;justify-content:space-between;gap:1rem;
        max-width:var(--maxw);margin:0 auto;padding:.85rem 1.1rem}
.brand img{height:40px;width:auto}

/* ---------- hero ---------- */
.hero{background:linear-gradient(180deg,var(--tint),var(--paper));padding:2.2rem 1.1rem 2.6rem}
.hero__inner{max-width:var(--maxw);margin:0 auto}
.eyebrow{font-size:.86rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
         color:var(--brand-dark);margin:0 0 .6rem}
.lede{font-size:1.12rem;color:var(--ink-soft);max-width:56ch}
.section__lede{color:var(--ink-soft);max-width:60ch}
.hero__cta{display:flex;flex-wrap:wrap;gap:.7rem;margin:1.3rem 0 1.6rem}
.trustrow{list-style:none;display:flex;flex-wrap:wrap;gap:1.6rem;padding:0;margin:0;
          border-top:1px solid var(--line);padding-top:1.1rem}
.trustrow strong{display:block;font-size:1.25rem}
.trustrow span{color:var(--ink-soft);font-size:.92rem}

/* ---------- credentials band ---------- */
.creds{background:var(--ink);color:#fff}
.creds ul{list-style:none;margin:0 auto;padding:1rem 1.1rem;max-width:var(--maxw);
          display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.9rem}
.creds__k{display:block;font-size:.78rem;letter-spacing:.06em;text-transform:uppercase;opacity:.7}
.creds__v{display:block;font-weight:700}

/* ---------- generic section ---------- */
.section{max-width:var(--maxw);margin:0 auto;padding:3rem 1.1rem}
.section--tint{max-width:none;background:var(--tint)}
.section--tint>*{max-width:var(--maxw);margin-left:auto;margin-right:auto}
.grid{display:grid;gap:1.1rem}
.grid--3{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:1.3rem}
.card p{color:var(--ink-soft);margin-bottom:.7rem}
.card a{font-weight:700;text-decoration:none}
.card a:hover{text-decoration:underline}

/* ---------- quote form ---------- */
.quote{display:grid;gap:2rem;grid-template-columns:1fr}
@media(min-width:900px){.quote{grid-template-columns:1fr 1fr;gap:3rem;align-items:start}}
.ticks{list-style:none;padding:0;margin:1.2rem 0 0}
.ticks li{padding-left:1.7rem;position:relative;margin-bottom:.5rem;color:var(--ink-soft)}
.ticks li::before{content:"";position:absolute;left:0;top:.55em;width:.65rem;height:.35rem;
                  border-left:3px solid var(--ok);border-bottom:3px solid var(--ok);
                  transform:rotate(-45deg)}
.quote__form{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);
             padding:1.4rem;box-shadow:var(--shadow)}
.field{margin-bottom:1rem}
.field label{display:block;font-weight:650;margin-bottom:.35rem;font-size:.95rem}
.opt{font-weight:400;color:var(--ink-soft)}
input[type=text],input[type=tel],input[type=email],select,textarea{
  width:100%;padding:.75rem .85rem;border:1.5px solid var(--line);border-radius:10px;
  font:inherit;font-size:16px;background:var(--paper);color:var(--ink)}
input:focus,select:focus,textarea:focus{border-color:var(--brand)}
.field[data-invalid] input,.field[data-invalid] select{border-color:var(--urgent)}
input[type=file]{position:absolute;width:1px;height:1px;opacity:0}
.filelabel{display:flex;align-items:center;gap:.75rem;border:2px dashed var(--line);
           border-radius:10px;padding:.9rem;cursor:pointer;font-weight:600}
.filelabel:hover{border-color:var(--brand)}
.filelabel__icon{display:grid;place-items:center;width:2rem;height:2rem;flex:none;
                 border-radius:50%;background:var(--tint);color:var(--brand-dark);font-size:1.3rem;font-weight:700}
.filelabel__text{font-size:.95rem}
.preview{margin-top:.7rem;display:flex;gap:.7rem;align-items:center}
.preview img{width:76px;height:76px;object-fit:cover;border-radius:8px}
.preview button{background:none;border:0;color:var(--urgent);font:inherit;font-weight:650;cursor:pointer;padding:.4rem}
.formnote{margin:.8rem 0 0;font-weight:650}
.formnote[data-ok]{color:var(--ok)}
.formnote[data-err]{color:var(--urgent)}
.smallprint{font-size:.82rem;color:var(--ink-soft);margin:.8rem 0 0}
/* The honeypot is an input, so the width:100% rule above would otherwise stretch it
   off-canvas and give the whole page a horizontal scrollbar. */
.hp{width:1px!important;height:1px!important;padding:0!important;border:0!important}

/* ---------- price guide ---------- */
.priceguide{margin-top:1.4rem;max-width:640px}
.priceguide select{font-size:1.05rem;padding:.9rem}
.priceout{margin-top:1.2rem;background:var(--paper);border:1px solid var(--line);
          border-left:5px solid var(--brand);border-radius:var(--radius);padding:1.3rem}
.priceout__range{font-size:1.8rem;font-weight:800;margin:0 0 .3rem}
.priceout__note{color:var(--ink-soft)}

/* ---------- before / after ---------- */
.ba__frame{position:relative;overflow:hidden;border-radius:var(--radius);
           aspect-ratio:3/2;background:var(--tint);touch-action:pan-y}
.ba__frame img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.ba__beforewrap{position:absolute;inset:0;width:50%;overflow:hidden}
.ba__beforewrap img{width:auto;min-width:100%}
.ba__range{position:absolute;inset:auto 0 0;width:100%;margin:0;opacity:0;height:100%;cursor:ew-resize}
.ba__handle{position:absolute;top:0;bottom:0;left:50%;width:3px;background:#fff;
            box-shadow:0 0 0 1px rgba(0,0,0,.25);pointer-events:none}
.ba__handle::after{content:"";position:absolute;top:50%;left:50%;width:40px;height:40px;
                   transform:translate(-50%,-50%);border-radius:50%;background:#fff;
                   box-shadow:0 2px 8px rgba(0,0,0,.3)}
.ba__caption{color:var(--ink-soft);margin-top:.8rem}

/* ---------- reviews, areas, faq ---------- */
.review{margin:0;background:var(--paper);border:1px solid var(--line);
        border-radius:var(--radius);padding:1.3rem}
.review p{font-size:1.03rem}
.review cite{font-style:normal;font-weight:700;color:var(--ink-soft);font-size:.92rem}
.arealist{list-style:none;padding:0;margin:1.2rem 0 0;display:flex;flex-wrap:wrap;gap:.6rem}
.arealist a{display:block;background:var(--paper);border:1px solid var(--line);
            border-radius:999px;padding:.55rem 1.1rem;text-decoration:none;font-weight:650}
.arealist a:hover{border-color:var(--brand)}
.faq details{border-bottom:1px solid var(--line);padding:.9rem 0}
.faq summary{font-weight:700;cursor:pointer;list-style:none;display:flex;justify-content:space-between;gap:1rem}
.faq summary::after{content:"+";font-size:1.4rem;line-height:1;color:var(--brand)}
.faq details[open] summary::after{content:"–"}
.faq p{margin:.7rem 0 0;color:var(--ink-soft)}

/* ---------- footer ---------- */
.footer{background:var(--ink);color:#c9d1dc;margin-top:1rem;padding:2.5rem 1.1rem 6rem}
.footer__grid{max-width:var(--maxw);margin:0 auto;display:grid;gap:1.8rem;
              grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.footer h3{color:#fff;font-size:.95rem;text-transform:uppercase;letter-spacing:.06em}
.footer a{color:#fff}
.footer__logo{filter:brightness(0) invert(1);margin-bottom:.8rem}
.footer__legal{max-width:var(--maxw);margin:2rem auto 0;font-size:.85rem;
               border-top:1px solid rgba(255,255,255,.15);padding-top:1.2rem}

/* ---------- sticky call bar (phones only) ---------- */
.callbar{position:fixed;left:0;right:0;bottom:0;z-index:50;display:flex;
         background:var(--paper);border-top:1px solid var(--line);
         padding:.5rem .5rem calc(.5rem + env(safe-area-inset-bottom));gap:.5rem;
         box-shadow:0 -4px 16px rgba(16,24,40,.1)}
.callbar__btn{flex:1;text-align:center;padding:.85rem .4rem;border-radius:10px;
              text-decoration:none;font-weight:700;background:var(--tint);
              color:var(--brand-dark);font-size:.95rem;min-height:48px;
              display:flex;align-items:center;justify-content:center}
.callbar__btn--primary{background:var(--brand);color:#fff}
@media(min-width:860px){.callbar{display:none}.footer{padding-bottom:2.5rem}}


/* ==========================================================================
   Layout variants. Layout A needs none of this. B and C switch on a single
   class on the hero, so the components and the rest of the sheet are untouched.
   ========================================================================== */

/* --- Layout B: proof-first (roofing, building, groundwork) --------------- */
.hero--proof .lede{margin-bottom:1.1rem}
.hero__gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:.6rem;margin:1.4rem 0 0}
.hero__gallery img{aspect-ratio:4/3;object-fit:cover;border-radius:10px;width:100%}
@media(max-width:560px){
  /* Three across is unreadable on a phone; two plus a wide one reads as a portfolio. */
  .hero__gallery{grid-template-columns:1fr 1fr}
  .hero__gallery img:first-child{grid-column:1/-1;aspect-ratio:16/9}
}
.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:.8rem;margin-top:1.4rem}
.gallery figure{margin:0}
.gallery img{aspect-ratio:4/3;object-fit:cover;border-radius:var(--radius);width:100%}
.gallery figcaption{font-size:.86rem;color:var(--ink-soft);margin-top:.4rem}
.guarantee{display:flex;gap:1rem;align-items:flex-start;background:var(--paper);
           border:1px solid var(--line);border-left:5px solid var(--ok);
           border-radius:var(--radius);padding:1.2rem;margin-top:1.4rem}
.guarantee h3{margin:0 0 .3rem}
.guarantee p{margin:0;color:var(--ink-soft)}

/* --- Layout C: credential-first (electrical, regulated trades) ----------- */
/* The credentials band is pulled inside the hero so the registration number is
   above the fold on a phone, which is the first thing this buyer looks for. */
.hero--creds .creds{margin-top:1.5rem;border-radius:var(--radius);overflow:hidden}
.hero--creds .creds ul{padding:1rem 1.2rem}
.hero--creds .trustrow{border-top:0;padding-top:0;margin-top:1.4rem}
.landlord{background:var(--ink);color:#fff;border-radius:var(--radius);padding:1.6rem}
.landlord h2{color:#fff;margin-top:0}
.landlord p{color:#c9d1dc;max-width:58ch}
.landlord .btn--primary{background:var(--accent);color:var(--ink)}
.landlord .btn--primary:hover{background:#fff}

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

/* ==========================================================================
   Demonstration build only. None of this ships on a real client site — it
   exists so a prospect can see where the real details go, and see that the
   gaps are left visible rather than filled in with something invented.
   ========================================================================== */
.demobar{background:#2B1A4D;color:#fff;font-size:.88rem;line-height:1.5;
  padding:.7rem 1.1rem;text-align:center}
.demobar a{color:#C4AEFF;font-weight:700}
.demobar strong{color:#fff}
.creds__v--slot{font-weight:600;opacity:.72}
.trustrow .slot{font-size:1.02rem;font-weight:650;color:var(--ink-soft)}
.review--slot{border-style:dashed}
.review--slot p{font-style:italic;color:var(--ink-soft)}
.arealist span{display:block;border:1px dashed var(--line);border-radius:999px;
  padding:.55rem 1.1rem;color:var(--ink-soft)}
.crumb{font-size:.9rem;color:var(--ink-soft);margin:0 0 1rem}
.crumb a{color:var(--brand-dark)}
