/* ==========================================================================
   S P Alectricals — Contact
   Requires css/sp-core.css.

   FIFTH frame. The devices that make it its own:

     home      centred headings, card grids, product cutouts
     about     editorial prose, hairline lists, a vertical timeline
     projects  full-cover photo hero, capacity-scaled zig-zag rows, filter
     services  a scope table and a sticky panel
     contact   the page IS a form — it is the only interactive form on the
               site, it sits above the fold, and the page closes on the only
               map on the site

   Validation is real: every field owns an error slot wired with
   aria-describedby, invalid fields get aria-invalid, and the first bad one
   takes focus. See the submit handler in tools/build-contact.js.
   ========================================================================== */

.ct{
  --rule:#E4E7EC;
  --err:#B3261E;          /* 5.9:1 on white, 5.5:1 on the mint field fill */
  background:#fff;
}
.ct h1,.ct h2{font-weight:300;letter-spacing:-.024em;line-height:1.14;color:var(--ink)}
.ct h3{font-weight:600;letter-spacing:-.015em;color:var(--ink)}
.ct h1 em,.ct h2 em{font-weight:500;font-style:normal;color:var(--green-dk)}
.ct-lab{display:block;font-family:var(--b);font-size:11.5px;font-weight:700;
  letter-spacing:.16em;text-transform:uppercase;color:var(--green-dk);margin-bottom:13px}

/* ============================================================== OPENER */
.ct-top{background:linear-gradient(180deg,#EFF8F1 0%,#F6FBF7 100%);
  border-bottom:1px solid var(--m-line);
  padding:clamp(24px,3vw,40px) 0 clamp(26px,3.2vw,40px)}
.ct-crumb{display:flex;gap:9px;align-items:center;font-size:13px;color:var(--m-muted);
  margin-bottom:clamp(20px,2.6vw,30px);flex-wrap:wrap}
.ct-crumb a{color:var(--m-muted)}
.ct-crumb a:hover{color:var(--green-dk)}
.ct-crumb span{opacity:.45}
.ct-crumb em{font-style:normal;color:var(--ink);font-weight:600}
.ct-top-grid{display:grid;gap:clamp(14px,2.2vw,34px);align-items:end}
@media(min-width:900px){.ct-top-grid{grid-template-columns:1.15fr .85fr}}
.ct-top h1{font-size:clamp(30px,4.2vw,50px);line-height:1.1;letter-spacing:-.026em;
  margin:0;max-width:15ch;text-wrap:balance}
.ct-top p{font-size:clamp(15.5px,1.5vw,17.5px);color:var(--m-muted);max-width:46ch;line-height:1.65}

/* ================================================================= MAIN */
.ct-main{padding:clamp(34px,4vw,58px) 0 clamp(44px,5vw,72px)}
.ct-grid{display:grid;gap:clamp(24px,3.2vw,50px);align-items:start}
@media(min-width:960px){.ct-grid{grid-template-columns:1.25fr .75fr}}

/* ---------------------------------------------------------------- form */
.ct-form{background:#fff;border:1px solid var(--rule);border-radius:22px;
  padding:clamp(22px,2.8vw,34px);box-shadow:0 1px 2px rgba(17,24,39,.04)}
.ct-form h2{font-size:clamp(21px,2.4vw,26px);font-weight:500}
/* was .ct-form > p, which matched nothing: the paragraph sits inside
   #ctFormWrap, so it is a grandchild */
.ct-sub{margin-top:8px;font-size:14px;color:var(--m-muted)}
.ct-req{color:var(--err);font-weight:700}

.ct-rows{display:grid;gap:16px;margin-top:24px}
.ct-two{display:grid;gap:16px}
@media(min-width:620px){.ct-two{grid-template-columns:repeat(2,1fr)}}
.ct-f label{display:block;font-family:var(--b);font-size:13px;font-weight:600;
  color:var(--ink);margin-bottom:7px}
.ct-f label span{color:var(--err)}
.ct-f input,.ct-f select,.ct-f textarea{
  width:100%;font-family:var(--b);font-size:15px;color:var(--ink);
  background:var(--m-wash);border:1px solid var(--m-line-ui);border-radius:12px;
  padding:13px 15px;
  transition:border-color .2s var(--ease),box-shadow .2s var(--ease),background .2s var(--ease)}
.ct-f textarea{min-height:132px;resize:vertical;line-height:1.6}
.ct-f input::placeholder,.ct-f textarea::placeholder{color:#7A8798}
.ct-f input:hover,.ct-f select:hover,.ct-f textarea:hover{background:#fff}
.ct-f input:focus,.ct-f select:focus,.ct-f textarea:focus{
  outline:none;background:#fff;border-color:var(--green-dk);
  box-shadow:0 0 0 3px rgba(41,126,50,.18)}
/* the invalid state is carried by colour AND the message below, never colour alone */
.ct-f input[aria-invalid="true"],.ct-f textarea[aria-invalid="true"],
.ct-f select[aria-invalid="true"]{border-color:var(--err);background:#FFF7F6}
.ct-f input[aria-invalid="true"]:focus,.ct-f textarea[aria-invalid="true"]:focus{
  box-shadow:0 0 0 3px rgba(179,38,30,.16)}
.ct-err{display:flex;gap:7px;align-items:flex-start;margin-top:7px;
  font-size:12.5px;font-weight:500;color:var(--err);line-height:1.45}
.ct-err svg{width:14px;height:14px;flex:none;margin-top:2px}
.ct-err[hidden]{display:none}
.ct-hint{margin-top:7px;font-size:12.5px;color:var(--m-muted)}

/* the honeypot: off-screen, never announced, never tabbable */
.ct-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

.ct-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center;
  margin-top:26px;padding-top:22px;border-top:1px solid var(--rule)}
.ct-note{flex-basis:100%;margin-top:4px;font-size:13px;color:var(--m-muted);line-height:1.55}
.ct-note[data-state="error"]{color:var(--err);font-weight:500}

/* the confirmation that replaces the form once it has been sent */
.ct-done{display:none;text-align:center;padding:clamp(28px,3.4vw,44px) 20px}
.ct-done[data-on="1"]{display:block}
.ct-done .ic{display:grid;place-items:center;width:56px;height:56px;margin:0 auto 18px;
  border-radius:50%;background:var(--m-card);border:1px solid var(--m-line)}
.ct-done .ic svg{width:26px;height:26px;color:var(--green-dk)}
.ct-done h3{font-size:20px;font-weight:500}
.ct-done p{margin-top:9px;font-size:14.5px;color:var(--m-muted);line-height:1.6;
  max-width:46ch;margin-left:auto;margin-right:auto}
.ct-done-acts{display:flex;gap:11px;flex-wrap:wrap;justify-content:center;margin-top:20px}

/* --------------------------------------------------------- office side */
/* A photograph plate with the details card directly under it, sharing one
   rounded silhouette. gallery/g12/rmg4.jpg is a two-frame composite, so
   object-position pins it to the clean right half. */
.ct-side{display:grid;gap:0;border-radius:22px;overflow:hidden;
  box-shadow:0 2px 6px rgba(17,24,39,.07), 0 26px 56px -26px rgba(17,24,39,.34)}
.ct-side-fig{margin:0;background:var(--m-card)}
/* the source is a 2:1 two-frame composite, so a 1:1 frame with the position
   pinned right shows exactly its clean right half and none of the left one */
.ct-side-fig img{width:100%;display:block;aspect-ratio:1/1;object-fit:cover;
  object-position:100% 50%}
@media(min-width:960px){ .ct-side-fig img{aspect-ratio:6/5} }
.ct-panel{background:linear-gradient(158deg,#082514,#0C3520 62%,#0F3F29);
  color:#fff;padding:clamp(22px,2.6vw,30px)}
.ct-panel h2{color:#fff;font-size:19px;font-weight:500;margin-bottom:18px}
.ct-item{display:flex;gap:13px;align-items:flex-start;margin-bottom:17px}
.ct-item .ic{display:grid;place-items:center;width:34px;height:34px;flex:none;
  border-radius:10px;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.16)}
.ct-item .ic svg{width:16px;height:16px;color:#8FE39A}
.ct-item b{display:block;font-family:var(--b);font-size:11px;font-weight:700;
  letter-spacing:.13em;text-transform:uppercase;color:#8FE39A;margin-bottom:5px}
.ct-item p{font-size:14px;color:#C9DECF;line-height:1.55}
.ct-item a{color:#C9DECF}
.ct-item a:hover{color:#fff}
.ct-hours{margin-top:20px;padding-top:18px;border-top:1px solid rgba(255,255,255,.14);
  font-size:12.5px;color:#A9C6B2;line-height:1.6}

/* ====================================================== DIRECT CHANNELS */
.ct-direct{display:grid;gap:13px;grid-template-columns:1fr}
@media(min-width:700px){.ct-direct{grid-template-columns:repeat(3,1fr)}}
.ct-ch{display:flex;gap:14px;align-items:center;background:#fff;
  border:1px solid var(--m-line-ui);border-radius:16px;padding:17px 19px;
  transition:transform .24s var(--ease),box-shadow .24s var(--ease),border-color .24s var(--ease)}
.ct-ch:hover{transform:translateY(-3px);border-color:var(--green-dk);
  box-shadow:0 2px 4px rgba(17,24,39,.05), 0 18px 40px -20px rgba(17,24,39,.3)}
.ct-ch:focus-visible{outline:3px solid var(--green-dk);outline-offset:3px}
.ct-ch .ic{display:grid;place-items:center;width:44px;height:44px;flex:none;
  border-radius:13px;background:var(--m-card)}
.ct-ch .ic svg{width:20px;height:20px;color:var(--green-dk)}
.ct-ch small{display:block;font-size:11.5px;font-weight:700;letter-spacing:.12em;
  text-transform:uppercase;color:var(--green-dk);margin-bottom:4px}
.ct-ch b{display:block;font-family:var(--h);font-size:15px;font-weight:600;color:var(--ink);
  letter-spacing:-.012em;word-break:break-word}
.ct-ch--wa .ic{background:#E4F8E9}

/* ================================================================= MAP */
/* The only map on the site, and the page closes on it full-bleed. */
.ct-map{position:relative;margin-top:clamp(40px,4.6vw,64px);
  background:var(--m-card);border-top:1px solid var(--m-line)}
.ct-map iframe{display:block;width:100%;height:clamp(320px,42vw,460px);border:0;
  filter:saturate(.9)}
.ct-map-card{position:absolute;left:clamp(14px,4vw,48px);bottom:clamp(14px,3vw,34px);
  z-index:2;display:flex;gap:13px;align-items:flex-start;max-width:min(420px,calc(100% - 28px));
  background:#fff;border:1px solid var(--m-line);border-radius:16px;padding:17px 19px;
  box-shadow:0 2px 6px rgba(17,24,39,.08), 0 22px 48px -22px rgba(17,24,39,.4)}
.ct-map-card .ic{display:grid;place-items:center;width:38px;height:38px;flex:none;
  border-radius:11px;background:var(--m-card)}
.ct-map-card .ic svg{width:17px;height:17px;color:var(--green-dk)}
.ct-map-card b{display:block;font-family:var(--h);font-size:15px;font-weight:600;color:var(--ink)}
.ct-map-card p{margin-top:4px;font-size:12.5px;color:var(--m-muted);line-height:1.5}
.ct-map-card a{display:inline-flex;align-items:center;gap:6px;margin-top:9px;
  font-size:12.5px;font-weight:600;color:var(--green-dk)}
.ct-map-card a svg{width:13px;height:13px}

@media(prefers-reduced-motion:reduce){
  .ct-ch,.ct-f input,.ct-f select,.ct-f textarea{transition:none}
}
