/* ============================================================
 * site/site.css  -  structure, type and layout
 *
 * No colour literals below the variables: every colour comes from a
 * custom property defined by whichever theme is loaded. That is what
 * lets the light and dark previews share one file, and it means a
 * palette change is a change in one place rather than a search through
 * the layout.
 *
 * Load order: a theme first, then this.
 * ============================================================ */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{
  background:var(--paper); color:var(--ink);
  font-family:var(--font-body);
  font-size:clamp(1rem,.96rem + .2vw,1.08rem); line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
.wrap{max-width:74rem;margin:0 auto;padding-inline:var(--pad)}
/* --font-head is set by the theme, so matching er-electrical's
   condensed section headings is a one-line change rather than a
   rebuild. --font-ui stays a normal-width grotesque: condensed type is
   fine for a heading and poor for a button or a phone number. */
h1,h2,h3{font-family:var(--font-head)}
.btn,.nav,.eyebrow,.step__n,.accred,.foot,.small,figcaption{font-family:var(--font-ui)}
h1{font-size:clamp(2rem,1.3rem + 2.9vw,3.4rem);line-height:1.08;
   letter-spacing:-.025em;font-weight:800}
h2{font-size:clamp(1.35rem,1.1rem + 1vw,1.95rem);line-height:1.18;
   letter-spacing:-.018em;font-weight:700;margin-bottom:.35em}
h3{font-size:1.02rem;line-height:1.3;letter-spacing:-.008em;
   font-weight:700;margin-bottom:.4em}
p{max-width:var(--measure)}
a{color:var(--brand-ink)}

/* ---- bar ---------------------------------------------------------- */
.bar{position:sticky;top:0;z-index:20;background:var(--bar-bg);
     -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.bar__in{display:flex;align-items:center;gap:1.75rem;padding-block:.85rem}
/* With the bar stuck to the top, a jump to #services would land the
   heading underneath it. Stop each section just below the bar. */
section[id]{scroll-margin-top:6.5rem}
.mast{display:flex;align-items:center;text-decoration:none;flex:none}
.mast__logo{height:clamp(52px,6vw,72px);width:auto;display:block}
.mast__fallback{display:none;font-weight:800;font-size:1.05rem;color:var(--ink);
  font-family:var(--font-ui)}
.mast__fallback b{color:var(--brand)}
.mast.is-fallback .mast__logo{display:none}
.mast.is-fallback .mast__fallback{display:block}
.nav{display:flex;gap:1.6rem;margin-left:auto;font-size:.95rem;font-weight:500}
.nav a{color:var(--ink-2);text-decoration:none;padding-block:.4rem;
  border-bottom:2px solid transparent}
.nav a:hover{color:var(--ink);border-bottom-color:var(--brand)}

/* On a phone the logo, four nav items and a phone number cannot share
   one row - they ran 118px past a 390px viewport and gave the whole
   page a horizontal scrollbar. The bar wraps instead: brand and phone
   number on the first row, the nav beneath it on its own, scrollable
   sideways if it still does not fit. The phone number stays visible
   throughout, since on a phone it is the thing most people came for. */
@media(max-width:46rem){
  .bar__in{flex-wrap:wrap;gap:.5rem 1rem;padding-block:.5rem}
  .mast{order:1}
  .btn--call{order:2;margin-left:auto}
  .nav{order:3;flex-basis:100%;margin-left:0;gap:1.1rem;
       overflow-x:auto;scrollbar-width:none;padding-bottom:.15rem}
  .nav::-webkit-scrollbar{display:none}
  .nav a{white-space:nowrap}
  .mast__logo{height:46px}
}
/* Nothing should ever be able to push the page sideways. "clip", not
   "hidden": hidden turns the page into its own scroll box, and a sticky
   bar inside a scroll box has nothing to stick to - it scrolled away
   with everything else. clip trims the overflow without that. Browsers
   too old for clip keep "hidden" (and a bar that scrolls). */
html,body{max-width:100%;overflow-x:hidden;overflow-x:clip}

/* ---- buttons ------------------------------------------------------ */
.btn{display:inline-flex;align-items:center;gap:.5rem;font-weight:700;
  font-size:.9rem;text-decoration:none;border-radius:var(--radius);
  padding:.62rem 1.1rem;transition:background .15s,color .15s,transform .15s}
.btn--primary{background:var(--brand);color:var(--on-dark)}
.btn--primary:hover{background:var(--brand-ink);transform:translateY(-1px)}
.btn--ghost{color:var(--ink);border:1px solid var(--line);background:var(--paper)}
.btn--ghost:hover{border-color:var(--brand);color:var(--brand-ink)}
.btn--call{background:var(--brand-wash);color:var(--brand-ink);flex:none}
.btn--call:hover{background:var(--brand);color:var(--on-dark)}
.btn--big{padding:.85rem 1.6rem;font-size:1rem}
.ico{width:1.1em;height:1.1em;flex:none}

/* ---- hero --------------------------------------------------------- */
.hero{background:
  radial-gradient(60rem 28rem at 78% -8%, var(--brand-wash), transparent 70%),
  var(--paper);
  border-bottom:1px solid var(--line)}
.hero{position:relative;text-align:center}
.hero .cta{justify-content:center}
.hero__in{padding-block:clamp(3rem,9vh,6rem) clamp(3rem,8vh,5rem)}
/* The headline gets a narrower column than the page wrap. Without it a
   full-width h1 ran straight into the heat/cool rail on the right. */
.hero .eyebrow,.hero h1,.hero .lead,.hero .cta{max-width:50rem;margin-inline:auto}
.eyebrow{font-size:.8rem;font-weight:600;letter-spacing:.06em;
  text-transform:uppercase;color:var(--ink-2);margin-bottom:1rem}
.hero .lead{font-size:clamp(1.05rem,1rem + .4vw,1.25rem);color:var(--ink-2);
  margin-top:1rem;max-width:40rem}
.cta{display:flex;gap:.7rem;flex-wrap:wrap;margin-top:1.8rem}

/* the heat/cool rail */
.scale{position:absolute;right:calc(var(--pad) * .6);top:50%;transform:translateY(-50%);
  display:flex;flex-direction:column;align-items:center;gap:.7rem;height:12rem}
.scale__bar{flex:1;width:4px;border-radius:2px;
  background:linear-gradient(180deg,var(--warm),#b98a63 35%,#5f9fbb 70%,var(--brand))}
.scale__cap{font-size:.62rem;font-weight:700;letter-spacing:.09em;color:var(--ink-2)}
.scale__cap--warm{color:var(--warm)}
.scale__cap--cool{color:var(--brand-ink)}
@media(max-width:76rem){.scale{display:none}}

/* ---- bands -------------------------------------------------------- */
.band{padding-block:clamp(2.5rem,6vh,4.25rem)}
/* Section headings and their intro are centred, as on er-electrical.
   Card and step text stays left aligned - centred body copy is hard to
   read past a couple of lines. */
.band > .wrap > h2{text-align:center}
.band > .wrap > .intro{text-align:center;margin-inline:auto}
.band--alt{background:var(--paper-2);border-block:1px solid var(--line)}
.intro{color:var(--ink-2);max-width:42rem;margin-bottom:1.6rem}
.grid{display:grid;gap:1rem;margin-top:1.5rem}
.grid--2{grid-template-columns:repeat(auto-fit,minmax(19rem,1fr))}
.grid--3{grid-template-columns:repeat(auto-fit,minmax(16rem,1fr))}

.card{background:var(--paper);border:1px solid var(--line);
  border-radius:var(--radius);padding:1.3rem 1.35rem}
.card p{color:var(--ink-2);font-size:.97rem;max-width:none}
.card--plain{background:transparent;border:none;border-left:3px solid var(--brand);
  border-radius:0;padding:.1rem 0 .1rem 1.1rem}
.card__ico{display:inline-flex;align-items:center;justify-content:center;
  width:2.4rem;height:2.4rem;border-radius:8px;background:var(--brand-wash);
  color:var(--brand-ink);margin-bottom:.85rem}
.card__ico .ico{width:1.3rem;height:1.3rem}

/* ---- steps -------------------------------------------------------- */
.steps{list-style:none;counter-reset:s;margin-top:1.5rem;display:grid;gap:.9rem}
.step{display:flex;gap:1rem;align-items:flex-start}
.step__n{flex:none;width:1.9rem;height:1.9rem;border-radius:50%;
  background:var(--brand);color:var(--on-brand);display:grid;place-items:center;
  font-size:.82rem;font-weight:700}
.step p{color:var(--ink-2);font-size:.97rem}

/* ---- quotes ------------------------------------------------------- */
.quote{background:var(--paper);border:1px solid var(--line);
  border-radius:var(--radius);padding:1.25rem}
.quote blockquote{font-size:1.02rem;line-height:1.5}
.quote blockquote::before{content:"\201C";color:var(--brand);font-size:1.6em;
  line-height:0;vertical-align:-.25em;margin-right:.1em}
.quote figcaption{margin-top:.8rem;font-size:.83rem;font-weight:700;color:var(--ink)}
.quote figcaption span{display:block;font-weight:500;color:var(--ink-2)}

/* ---- accreditations ----------------------------------------------- */
/* An unconfirmed claim is shown as unconfirmed rather than quietly
   rendered the same as a held one - the preview's job is to make that
   visible, not to flatter the page. */
.accred{list-style:none;display:grid;gap:.5rem;margin-top:1.3rem;
  grid-template-columns:repeat(auto-fit,minmax(18rem,1fr))}
.accred__item{display:flex;flex-direction:column;gap:.1rem;padding:.7rem .9rem;
  border-radius:8px;font-size:.9rem;border:1px solid var(--line)}
.accred__item.is-held{background:var(--brand-wash);border-color:var(--brand-line)}
.accred__item.is-unconfirmed{background:var(--warn-bg);border-color:var(--warn-line)}
/* Preview only: a review switched off, and the note over an empty section. */
.quote.is-hidden{opacity:.55;border-style:dashed}
.quote__hidden{display:inline-block;margin-bottom:.5rem;font:700 .7rem/1.4 var(--font-ui);
  text-transform:uppercase;letter-spacing:.05em;background:var(--warn-bg);border:1px solid var(--warn-line);
  border-radius:3px;padding:.1rem .4rem;color:var(--ink)}
.preview-note{background:var(--warn-bg);border:1px solid var(--warn-line);border-radius:4px;
  padding:.4rem .7rem;margin-top:.8rem}
.accred__name{font-weight:700}
.accred__note{font-size:.8rem;color:var(--ink-2)}
.small{font-size:.82rem;color:var(--ink-2);margin-top:1rem;max-width:42rem}

/* ---- contact + footer --------------------------------------------- */
.band--cta{background:var(--ink);color:var(--on-dark);border:none}
.band--cta h2{color:var(--on-dark)}
.band--cta .lead{color:var(--on-dark-2)}
.band--cta .small{color:var(--on-dark-3)}
.contact{text-align:center}
.contact p{margin-inline:auto}
.contact .cta,.contact .btn{margin-top:1.4rem}
/* With the enquiry form: talk on the left, the form on the right; on a
   phone, the form underneath. The form is another site's page in a
   frame, so its height cannot follow its content: --form-h is set to
   fit Tradify's form (their own guidance is about 1050px), a little
   more on a phone where its labels wrap. */
.contact--form{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:2.5rem;
  align-items:start;text-align:left;--form-h:1060px}
.contact--form p{margin-inline:0}
/* The form is long; keep the call button in view beside it. */
.contact--form .contact__talk{position:sticky;top:7.5rem}
.contact__form{background:#fff;border-radius:8px;padding:1rem 1rem 0;box-shadow:0 6px 24px rgba(0,0,0,.18)}
.contact__intro{color:#333;font:600 .95rem/1.4 var(--font-ui);margin:0 0 .4rem .25rem}
.enquiry{display:block;width:100%;height:var(--form-h);border:0}
@media(max-width:52rem){
  .contact--form{grid-template-columns:1fr;gap:1.8rem;text-align:center;--form-h:1180px}
  .contact--form .contact__talk{position:static}
  .contact--form p{margin-inline:auto}
  .contact__intro{text-align:left}
}
.foot{background:var(--ink);color:var(--on-dark-3);padding-block:1.4rem;
  border-top:1px solid var(--on-dark-line);font-size:.83rem}
.foot__in{display:flex;gap:1rem;flex-wrap:wrap;justify-content:space-between}
.foot a{color:var(--on-dark-2);text-decoration:none;margin-left:1.1rem}
.foot a:hover{color:var(--on-dark)}
.foot nav a:first-child{margin-left:0}

/* ---- the preview-only panel --------------------------------------- */
.todo{max-width:74rem;margin:2.5rem auto;padding:1.3rem 1.5rem;
  background:var(--warn-bg);border:1px solid var(--warn-line);border-radius:var(--radius);
  font-family:var(--font-ui)}
.todo h2{font-size:1rem;color:var(--warn-ink)}
.todo ol{margin:.7rem 0 0 1.2rem;font-size:.86rem;color:var(--warn-ink-2);line-height:1.6}
.todo li{margin-bottom:.3rem}

@media print{.bar,.todo,.no-print{display:none}}
