/* ==========================================================================
   JK Electrical Dublin
   Palette taken from Jamie's own brand pack: black ground, chrome, one orange.
   ========================================================================== */

:root {
  --ink:        #0B0B0C;
  --ink-2:      #121316;
  --panel:      #17191C;
  --panel-2:    #1E2125;
  --line:       #2A2D32;
  --line-soft:  #212429;

  --chrome:     #EDEFF2;
  --mute:       #9AA0A8;
  --dim:        #6E747C;

  --volt:       #F26522;
  --volt-hot:   #FF7A38;
  --volt-soft:  rgba(242, 101, 34, 0.12);

  --font-display: "Archivo", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --wrap: 1180px;
  --gut: clamp(20px, 5vw, 48px);

  --r: 3px;
  --bar-h: 62px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@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;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--chrome);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--volt); text-underline-offset: 3px; }
a:hover { color: var(--volt-hot); }

:focus-visible {
  outline: 2px solid var(--volt-hot);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 6.2vw, 4.3rem); }
h2 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); font-weight: 700; letter-spacing: -0.018em; }
h4 { font-size: 1.02rem; font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0 0 1.1em; max-width: 66ch; }
p:last-child { margin-bottom: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gut); }
.narrow { max-width: 780px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--volt); color: #0B0B0C;
  padding: 12px 20px; z-index: 200; font-weight: 700;
}
.skip:focus { left: 0; }

/* ---- Eyebrow / mono label ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--volt);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--volt);
  flex: none;
}
.eyebrow.plain { color: var(--dim); }
.eyebrow.plain::before { background: var(--dim); }

/* ---- Placeholder marker: unconfirmed facts, visible on purpose ---- */
.ph {
  background: var(--volt-soft);
  border-bottom: 1px dashed var(--volt);
  color: var(--volt-hot);
  font-family: var(--font-mono);
  font-size: 0.82em;
  padding: 1px 5px;
  border-radius: 2px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 11, 12, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 72px;
}

.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; flex: none; }
.logo-mark { height: 38px; width: auto; }
.foot-logo { width: 100%; max-width: 210px; height: auto; margin-bottom: 16px; }
.logo-txt { display: flex; flex-direction: column; line-height: 1; }
.logo-txt b {
  font-family: var(--font-display);
  font-size: 1.12rem; font-weight: 800; letter-spacing: -0.02em;
  color: var(--chrome);
}
.logo-txt span {
  font-family: var(--font-mono);
  font-size: 0.56rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--dim); margin-top: 4px;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-size: 0.9rem; font-weight: 500; color: var(--mute);
  text-decoration: none; padding: 9px 14px; border-radius: var(--r);
}
.nav a:hover { color: var(--chrome); background: var(--panel); }
.nav a[aria-current="page"] { color: var(--chrome); }
.nav a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; background: var(--volt);
  margin-top: 5px; border-radius: 2px;
}

.head-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--volt); color: #0B0B0C;
  font-weight: 700; font-size: 0.9rem;
  padding: 11px 18px; border-radius: var(--r);
  text-decoration: none; white-space: nowrap;
}
.head-cta:hover { background: var(--volt-hot); color: #0B0B0C; }

.burger {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: var(--r); padding: 9px; cursor: pointer;
}
.burger span { display: block; width: 20px; height: 2px; background: var(--chrome); margin: 4px 0; }

@media (max-width: 900px) {
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink-2); border-bottom: 1px solid var(--line);
    padding: 10px var(--gut) 18px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 4px; border-bottom: 1px solid var(--line-soft); }
  .nav a[aria-current="page"]::after { display: none; }
  .burger { display: block; }
  .head-cta { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to right, rgba(11,11,12,0.94) 0%, rgba(11,11,12,0.82) 42%, rgba(11,11,12,0.25) 100%),
    linear-gradient(to top, rgba(11,11,12,0.95) 0%, rgba(11,11,12,0) 55%);
}
.hero .wrap { padding-block: clamp(84px, 15vw, 158px); }
.hero-inner { max-width: 660px; }
.hero h1 { margin-bottom: 22px; }
.hero h1 em { font-style: normal; color: var(--volt); }
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  color: var(--mute); max-width: 50ch; margin-bottom: 32px;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 15px 26px; border-radius: var(--r);
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--volt); color: #0B0B0C; }
.btn-primary:hover { background: var(--volt-hot); color: #0B0B0C; }
.btn-ghost { border-color: var(--line); color: var(--chrome); background: rgba(23,25,28,0.6); }
.btn-ghost:hover { border-color: var(--volt); color: var(--chrome); }

/* ---- Trust rail ---- */
.rail {
  border-block: 1px solid var(--line-soft);
  background: var(--ink-2);
}
.rail ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.rail li {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 4px; color: var(--mute); font-size: 0.9rem;
}
.rail li + li { border-left: 1px solid var(--line-soft); padding-left: 22px; }
.rail svg { flex: none; color: var(--volt); }
@media (max-width: 720px) {
  .rail li + li { border-left: none; border-top: 1px solid var(--line-soft); padding-left: 4px; }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.sec { padding-block: clamp(64px, 9vw, 104px); }
.sec-alt { background: var(--ink-2); border-block: 1px solid var(--line-soft); }
.sec-head { margin-bottom: 44px; max-width: 720px; }
.sec-head p { color: var(--mute); margin-top: 16px; margin-bottom: 0; }

/* ---- Service cards ---- */
.svc-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
}
.svc {
  position: relative; overflow: hidden;
  border: 1px solid var(--line-soft); border-radius: var(--r);
  background: var(--panel); text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
}
.svc:hover { border-color: var(--volt); }
.svc-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--panel-2); }
.svc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.svc:hover .svc-img img { transform: scale(1.045); }
.svc-body { padding: 20px 21px 23px; flex: 1; display: flex; flex-direction: column; gap: 9px; }
.svc-body p { font-size: 0.92rem; color: var(--mute); margin: 0; }
.svc-more {
  margin-top: auto; padding-top: 12px;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--volt);
}

/* ---- Before / after slider ---- */
.ba {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel-2);
  aspect-ratio: 1 / 1;
  touch-action: pan-y;
  user-select: none;
}
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-after { z-index: 1; }
/* clip-path keeps the "before" image at full container size, so the reveal
   never rescales the photo the way an overflow-hidden wrapper would. */
.ba-before-wrap {
  position: absolute; inset: 0; z-index: 2;
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}
.ba-divider {
  position: absolute; top: 0; bottom: 0; z-index: 3;
  left: var(--pos, 50%); width: 2px; margin-left: -1px;
  background: var(--volt); pointer-events: none;
}
.ba-tag {
  position: absolute; bottom: 12px; z-index: 3;
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 5px 9px; border-radius: 2px;
  background: rgba(11,11,12,0.78); color: var(--chrome);
  backdrop-filter: blur(4px);
}
.ba-tag.b { left: 12px; }
.ba-tag.a { right: 12px; }
.ba-handle {
  position: absolute; top: 0; bottom: 0; z-index: 4;
  left: var(--pos, 50%); width: 44px; margin-left: -22px;
  background: none; border: 0; padding: 0; cursor: ew-resize;
  display: grid; place-items: center;
}
.ba-knob {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--volt); color: #0B0B0C;
  display: grid; place-items: center;
  box-shadow: 0 3px 14px rgba(0,0,0,0.5);
  font-size: 0.8rem; font-weight: 800;
}
/* No-JS / no-slider fallback: two captioned photos side by side. */
.ba-static { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ba-static figure { margin: 0; }
.ba-static img { border: 1px solid var(--line); border-radius: var(--r);
                 aspect-ratio: 1 / 1; object-fit: cover; }
.ba-static figcaption {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--dim); margin-top: 8px;
}
.js .ba-static { display: none; }
.ba { display: none; }
.js .ba { display: block; }

.ba-set { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.ba-cap { margin-top: 14px; }
.ba-cap h4 { margin-bottom: 5px; }
.ba-cap p { font-size: 0.9rem; color: var(--mute); margin: 0; }

/* ---- Feature split ---- */
.split {
  display: grid; gap: clamp(28px, 5vw, 60px);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center;
}
.split img { border-radius: var(--r); border: 1px solid var(--line); }

/* ---- Gallery ---- */
.gal { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.gal figure { margin: 0; }
.gal img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border: 1px solid var(--line-soft); border-radius: var(--r);
}
.gal figcaption { font-size: 0.86rem; color: var(--mute); margin-top: 10px; }

/* ---- Reviews ---- */
.quotes { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }
.quote {
  border: 1px solid var(--line-soft); border-left: 2px solid var(--volt);
  border-radius: var(--r); background: var(--panel);
  padding: 24px 24px 20px;
}
.quote p { font-size: 0.97rem; margin-bottom: 16px; }
.quote cite {
  font-style: normal; font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim);
}

/* ---- Areas ---- */
.areas { display: flex; flex-wrap: wrap; gap: 8px; }
.areas li {
  list-style: none;
  font-family: var(--font-mono); font-size: 0.76rem;
  padding: 7px 12px; border: 1px solid var(--line);
  border-radius: 100px; color: var(--mute);
}
.areas li.hot { border-color: var(--volt); color: var(--volt); }

/* ---- Steps ---- */
.steps { counter-reset: s; display: grid; gap: 1px; background: var(--line-soft);
         border: 1px solid var(--line-soft); border-radius: var(--r); overflow: hidden; }
.step { background: var(--panel); padding: 22px 24px; display: grid;
        grid-template-columns: 42px 1fr; gap: 4px 16px; align-items: baseline; }
.step::before {
  counter-increment: s; content: "0" counter(s);
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; color: var(--volt);
}
.step p { grid-column: 2; font-size: 0.93rem; color: var(--mute); margin: 6px 0 0; }

/* ---- Service detail blocks ---- */
.svc-detail {
  display: grid; gap: clamp(24px, 4vw, 46px);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: center;
  padding-block: clamp(38px, 6vw, 60px);
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 90px;
}
.svc-detail:first-of-type { border-top: 0; }
/* Cap the photo so a service block stays on one screen instead of the image
   pushing the copy off the bottom. */
.svc-detail img {
  border-radius: var(--r); border: 1px solid var(--line);
  max-width: 460px; aspect-ratio: 1 / 1; object-fit: cover;
}
.svc-detail ul { margin: 18px 0 0; padding-left: 18px; display: grid; gap: 8px; }
.svc-detail li { color: var(--mute); font-size: 0.94rem; }
.svc-detail li::marker { color: var(--volt); }
.svc-detail .flip { order: -1; }
@media (max-width: 760px) { .svc-detail .flip { order: 0; } }

/* ---- Anchor chips ---- */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.jump a {
  font-family: var(--font-mono); font-size: 0.74rem;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 100px;
  color: var(--mute); text-decoration: none;
}
.jump a:hover { border-color: var(--volt); color: var(--volt); }

/* ==========================================================================
   Form
   ========================================================================== */
.form-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: clamp(24px, 4vw, 38px);
}
.field { margin-bottom: 18px; }
.field label {
  display: block; font-family: var(--font-mono);
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mute); margin-bottom: 8px;
}
.field .opt { color: var(--dim); text-transform: none; letter-spacing: 0; font-size: 0.72rem; }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--font-body); font-size: 1rem;
  background: var(--ink); color: var(--chrome);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 13px 14px;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--volt); }
.field textarea { min-height: 128px; resize: vertical; }
.field input[type="file"] { padding: 10px; color: var(--mute); font-size: 0.88rem; }

.consent { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 22px; }
.consent input { width: 18px; height: 18px; flex: none; margin-top: 3px; accent-color: var(--volt); }
.consent label { font-size: 0.86rem; color: var(--mute); font-family: var(--font-body);
                 text-transform: none; letter-spacing: 0; margin: 0; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* The enquiry form composes a WhatsApp message in JS, so with JS off we show a
   plain WhatsApp button instead of a form that could not do anything. */
#enquiry { display: none; }
.js #enquiry { display: block; }
.js .nojs-alt { display: none; }

.form-note {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft);
  font-size: 0.86rem; color: var(--dim);
}
.form-status { margin-top: 16px; font-size: 0.94rem; }
.form-status.err { color: var(--volt-hot); }
.form-status.ok { color: #55B37A; }

/* ==========================================================================
   Contact blocks
   ========================================================================== */
.contact-grid {
  display: grid; gap: clamp(26px, 4vw, 48px);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}
.big-tel {
  display: inline-flex; align-items: center; gap: 13px;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.7rem, 4.6vw, 2.5rem); letter-spacing: -0.03em;
  color: var(--chrome); text-decoration: none;
}
.big-tel:hover { color: var(--volt); }
.big-tel svg { color: var(--volt); flex: none; }

.contact-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 1px;
                background: var(--line-soft); border: 1px solid var(--line-soft);
                border-radius: var(--r); overflow: hidden; }
.contact-list li { background: var(--panel); padding: 16px 19px; display: flex;
                   flex-direction: column; gap: 4px; }
.contact-list .k { font-family: var(--font-mono); font-size: 0.68rem;
                   letter-spacing: 0.13em; text-transform: uppercase; color: var(--dim); }
.contact-list .v { font-size: 0.98rem; }
.contact-list a { color: var(--chrome); text-decoration: none; }
.contact-list a:hover { color: var(--volt); }

/* ==========================================================================
   CTA band
   ========================================================================== */
.band {
  background: var(--volt); color: #0B0B0C;
  padding-block: clamp(48px, 7vw, 72px);
}
.band h2 { color: #0B0B0C; margin-bottom: 14px; }
.band p { color: rgba(11,11,12,0.78); font-weight: 500; margin-bottom: 26px; }
.band .btn-primary { background: #0B0B0C; color: var(--volt); }
.band .btn-primary:hover { background: #17191C; color: var(--volt-hot); }
.band .btn-ghost { border-color: rgba(11,11,12,0.35); color: #0B0B0C; background: transparent; }
.band .btn-ghost:hover { border-color: #0B0B0C; color: #0B0B0C; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-foot {
  background: var(--ink-2); border-top: 1px solid var(--line-soft);
  padding-block: 54px 30px; margin-bottom: var(--bar-h);
}
.foot-grid {
  display: grid; gap: 34px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  padding-bottom: 30px; border-bottom: 1px solid var(--line-soft);
}
.foot-grid h4 { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
                letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim);
                margin-bottom: 14px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot-grid a { color: var(--mute); text-decoration: none; font-size: 0.92rem; }
.foot-grid a:hover { color: var(--volt); }
.foot-grid p { font-size: 0.92rem; color: var(--mute); }
.foot-btm {
  padding-top: 22px; display: flex; flex-wrap: wrap; gap: 10px 26px;
  justify-content: space-between;
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--dim);
}
.foot-btm a { color: var(--dim); text-decoration: none; }
.foot-btm a:hover { color: var(--volt); }

/* ==========================================================================
   Sticky mobile action bar
   ========================================================================== */
.mbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 120;
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--ink-2); border-top: 1px solid var(--line);
  height: var(--bar-h);
}
.mbar a {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 700; font-size: 0.95rem; text-decoration: none;
  color: var(--chrome);
}
.mbar a + a { background: var(--volt); color: #0B0B0C; }
.mbar svg { flex: none; }
@media (min-width: 901px) {
  .mbar { display: none; }
  .site-foot { margin-bottom: 0; }
}

/* ---- Utility ---- */
.mt-s { margin-top: 18px; }
.mt-m { margin-top: 30px; }
.mt-l { margin-top: 46px; }
.muted { color: var(--mute); }
.center { text-align: center; }
.center p { margin-inline: auto; }
.center .eyebrow { justify-content: center; }

/* A service with no photo yet runs full width as a two-column text block,
   so it reads as a deliberate layout rather than a missing image. */
.svc-detail.svc-text { grid-template-columns: 1fr 1fr; align-items: start; }
.svc-detail.svc-text ul { margin-top: 0; }
@media (max-width: 760px) {
  .svc-detail.svc-text { grid-template-columns: 1fr; }
  .svc-detail.svc-text ul { margin-top: 18px; }
}



/* Home tile for a service with no photo yet. No stand-in graphic: the card
   simply runs as text, with a rule on top so it reads as intended rather than
   as an image that failed to load. */
.svc-plain { border-top: 2px solid var(--volt); }
.svc-plain .svc-body { padding-top: 26px; gap: 11px; }
.svc-plain .svc-body h3 { font-size: 1.24rem; }

/* Rows stretch again now that the photoless cards sit together in their own
   row: within a row the cards are comparable, so equal heights look right. */

/* Five references running from 28 to 136 words. A three-column grid turned the
   long ones into tall, thin ribbons of text and left an empty slot in the last
   row. Multi-column flows them instead: the browser balances the columns, the
   cards keep a readable measure, and there are no gaps. */
.quotes {
  display: block;
  column-count: 2;
  column-gap: 16px;
}
.quote {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin-bottom: 16px;
}
@media (max-width: 760px) { .quotes { column-count: 1; } }
