/* =========================================================
   Charged-Up Electrical Services
   Palette taken from the UK cable colour code:
   live (brown), neutral (blue), earth (green and yellow)
   ========================================================= */

:root {
  --ink: #14202B;
  --ink-soft: #3F4C58;
  --paper: #F6F8F9;
  --white: #FFFFFF;
  --steel: #D9DEE3;
  --line: #C9D0D6;

  --live: #8B4A1F;
  --neutral: #1F5FA8;
  --neutral-dark: #174A84;
  --earth: #3C8C3A;
  --earth-y: #F2C230;
  --copper: #C8783A;

  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 72rem;
  --radius-s: 4px;
  --radius-m: 8px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.005em;
  margin: 0 0 0.5em;
}

h2 { font-size: clamp(2rem, 4vw, 3rem); max-width: 22ch; }
h3 { font-size: 1.6rem; }

p { margin: 0 0 1em; max-width: 65ch; }

a { color: var(--neutral); text-underline-offset: 0.18em; }
a:hover { color: var(--neutral-dark); }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  background: var(--ink); color: var(--white);
  padding: 0.6rem 1rem; z-index: 100;
  border-radius: var(--radius-s);
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-s);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--neutral); color: var(--white); }
.btn-primary:hover { background: var(--neutral-dark); color: var(--white); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(6px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
}
.brand img {
  height: 3.6rem;
  width: auto;
}
.brand-mark { width: 2.5rem; height: 2.5rem; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  white-space: nowrap;
}
.brand-sub {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-top: 0.15rem;
}

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0; padding: 0;
}
.site-nav ul a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav ul a:hover { border-bottom-color: var(--neutral); }

.header-phone {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--white);
  background: var(--ink);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-s);
  text-decoration: none;
  white-space: nowrap;
}
.header-phone:hover { background: var(--neutral); color: var(--white); }

.call-mobile {
  display: none;
  margin-left: auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--white);
  background: var(--neutral);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-s);
  text-decoration: none;
  white-space: nowrap;
}
.call-mobile:hover { color: var(--white); background: var(--neutral-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 2.75rem; height: 2.75rem;
  cursor: pointer;
  padding: 0;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.6rem; height: 3px;
  border-radius: 2px;
  margin: 0 auto;
  position: relative;
  transition: transform 0.2s, background-color 0.2s;
}
.nav-toggle-bars { background: var(--neutral); }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -8px; background: var(--live); }
.nav-toggle-bars::after { top: 8px; background: var(--earth); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  background: var(--white);
  padding-top: clamp(3rem, 8vw, 6rem);
  overflow: hidden;
}

.hero-kicker {
  font-weight: 600;
  color: var(--live);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.015em;
  max-width: 16ch;
  margin-bottom: 1.5rem;
}

.hero-lede {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 48ch;
  margin-bottom: 2rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }

.hero-assurances {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  font-weight: 500;
  font-size: 0.98rem;
}
.hero-assurances li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-assurances li::before {
  content: "";
  width: 0.9rem; height: 0.5rem;
  border-left: 3px solid var(--earth);
  border-bottom: 3px solid var(--earth);
  transform: rotate(-45deg) translateY(-2px);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-inner .hero-title { font-size: clamp(2.75rem, 5.6vw, 5rem); }
.hero-inner .hero-assurances { margin-bottom: 0; }
.hero-inner { padding-bottom: 3rem; }
.hero-media { align-self: stretch; display: flex; align-items: center; }

/* Slideshow */
.slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 38rem;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--ink);
}
.slides { position: absolute; inset: 0; }
.slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}
.slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.9s ease, visibility 0s;
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slide figcaption {
  position: absolute;
  left: 1rem;
  bottom: 4rem;
  right: 1rem;
  width: fit-content;
  max-width: calc(100% - 2rem);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.15;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-s);
  border-left: 5px solid var(--neutral);
}
.slide-controls {
  position: absolute;
  left: 1rem; right: 1rem; bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.slide-pause {
  display: grid;
  place-items: center;
  width: 2.25rem; height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  cursor: pointer;
  flex: none;
}
.slide-pause svg { width: 0.9rem; height: 0.9rem; fill: currentColor; }
.slide-pause .icon-play,
.slideshow.is-paused .slide-pause .icon-pause { display: none; }
.slideshow.is-paused .slide-pause .icon-play { display: block; }
.slide-dots { display: flex; gap: 0.5rem; }
.slide-dots button {
  width: 0.75rem; height: 0.75rem;
  padding: 0;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.slide-dots button::after {
  content: "";
  position: absolute;
  inset: -0.6rem;
}
.slide-dots button[aria-current="true"] { background: var(--white); }

/* The cable */
.cable { width: 100%; height: 190px; }
.cable-svg { width: 100%; height: 190px; }

.core {
  stroke-width: 30;
  stroke-linecap: round;
  fill: none;
}
.copper {
  stroke: var(--copper);
  stroke-width: 16;
  stroke-linecap: butt;
  fill: none;
}

@media (prefers-reduced-motion: no-preference) {
  .core, .copper {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 1.4s cubic-bezier(0.6, 0, 0.2, 1) forwards;
  }
  .core-neutral { animation-delay: 0.12s; }
  .core-earth { animation-delay: 0.24s; }
  .copper { animation-duration: 0.35s; animation-timing-function: ease-out; }
  .c1 { animation-delay: 1.3s; }
  .c2 { animation-delay: 1.42s; }
  .c3 { animation-delay: 1.54s; }
  .sheath { opacity: 0; animation: fade 0.6s ease-out 0.2s forwards; }
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

/* ---------- Sections ---------- */

.section { padding: clamp(4rem, 9vw, 7rem) 0; }

.section-head { margin-bottom: 3rem; }
.section-head p {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 55ch;
}

/* ---------- Services / sectors ---------- */

.sectors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.sector {
  padding-top: 1.5rem;
  border-top: 8px solid var(--line);
  border-image: none;
  position: relative;
}
.sector-live { border-top-color: var(--live); }
.sector-neutral { border-top-color: var(--neutral); }
.sector-earth { border-top: 0; }
.sector-earth::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  background: repeating-linear-gradient(
    125deg,
    var(--earth) 0 16px,
    var(--earth-y) 16px 26px
  );
}
.sector-earth { padding-top: calc(1.5rem + 8px); }

.sector h3 { font-size: 2rem; margin-bottom: 0.25rem; }
.sector > p { color: var(--ink-soft); margin-bottom: 1.25rem; }

.sector ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sector li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.sector li:last-child { border-bottom: 0; }

/* ---------- Renewables ---------- */

.renewables {
  background: var(--ink);
  color: #E8ECEF;
}
.renewables h2 { color: var(--white); }
.renewables .section-head p { color: #B7C1CA; }

.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #2C3A47;
  border: 1px solid #2C3A47;
  border-radius: var(--radius-m);
  overflow: hidden;
  margin-bottom: 3rem;
}
.tech {
  background: var(--ink);
  padding: 2rem 1.5rem;
}
.tech-icon {
  width: 3rem; height: 3rem;
  color: var(--earth-y);
  margin-bottom: 1.25rem;
}
.tech h3 { color: var(--white); font-size: 1.75rem; }
.tech p { color: #B7C1CA; font-size: 1rem; margin: 0; }

.coverage { overflow-x: auto; margin-bottom: 2.5rem; }
.coverage table {
  width: 100%;
  min-width: 32rem;
  border-collapse: collapse;
  font-size: 1.05rem;
}
.coverage caption {
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--white);
  padding-bottom: 1rem;
}
.coverage th,
.coverage td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #2C3A47;
  text-align: left;
}
.coverage thead th {
  font-weight: 600;
  color: #B7C1CA;
  font-size: 0.95rem;
  border-bottom: 2px solid var(--earth-y);
}
.coverage tbody th { font-weight: 600; color: var(--white); }

.tick {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  width: 1.5rem; height: 1.5rem;
  overflow: hidden;
  text-indent: 200%;
  white-space: nowrap;
}
.tick::before {
  content: "";
  position: absolute;
  left: 0.3rem; top: 0.25rem;
  width: 0.95rem; height: 0.5rem;
  border-left: 3px solid var(--earth-y);
  border-bottom: 3px solid var(--earth-y);
  transform: rotate(-45deg);
}

.renewables-cta { font-size: 1.15rem; margin: 0; }
.renewables-cta a { color: var(--earth-y); font-weight: 600; }
.renewables-cta a:hover { color: var(--white); }

/* ---------- Process ---------- */

.process { background: var(--paper); }

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 1.6rem;
  left: 1.6rem;
  right: calc((100% - 6rem) / 5 - 1.6rem);
  height: 4px;
  background: var(--neutral);
  border-radius: 2px;
}
.steps li { counter-increment: step; position: relative; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 3.25rem; height: 3.25rem;
  border-radius: 50%;
  background: var(--white);
  border: 4px solid var(--neutral);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--neutral);
  margin-bottom: 1.25rem;
  position: relative;
}
.steps h3 { font-size: 1.5rem; }
.steps p { font-size: 1rem; color: var(--ink-soft); margin: 0; }

/* ---------- About ---------- */

.about { background: var(--white); }
.about-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about-text p { font-size: 1.15rem; }

.areas {
  background: var(--paper);
  border-left: 6px solid var(--live);
  padding: 2rem;
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
}
.areas h3 { font-size: 1.75rem; }
.areas ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  columns: 2;
  column-gap: 1.5rem;
}
.areas li { padding: 0.3rem 0; font-weight: 500; }
.areas p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

.accreditations { margin-top: 3rem; }
.accreditations ul {
  display: flex; flex-wrap: wrap; gap: 1rem;
  list-style: none; padding: 0; margin: 0;
}
.accreditations li {
  border: 1px solid var(--line);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-s);
  font-weight: 600;
}

/* ---------- Contact ---------- */

.contact { background: var(--steel); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
  align-items: start;
}
.contact-info > p { font-size: 1.15rem; color: var(--ink-soft); }

.contact-details { margin: 2rem 0 0; }
.contact-details div {
  padding: 0.9rem 0;
  border-top: 1px solid #BCC4CB;
}
.contact-details dt { font-size: 0.9rem; color: var(--ink-soft); font-weight: 500; }
.contact-details dd {
  margin: 0.1rem 0 0;
  font-weight: 600;
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}
.contact-details dd a { color: var(--ink); }
.contact-details dd a:hover { color: var(--neutral); }

.quote-form {
  background: var(--white);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius-m);
  border-top: 6px solid var(--neutral);
}
.field { margin-bottom: 1.25rem; display: flex; flex-direction: column; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { font-weight: 600; font-size: 0.98rem; margin-bottom: 0.4rem; }

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.7rem 0.85rem;
  min-height: 3rem;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--neutral);
  box-shadow: 0 0 0 3px rgba(31, 95, 168, 0.2);
  background: var(--white);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #B3261E; }

.quote-form .btn { width: 100%; margin-top: 0.5rem; }
.quote-form .btn[disabled] { opacity: 0.6; cursor: wait; }

.form-note { font-size: 0.9rem; color: var(--ink-soft); margin: 0.75rem 0 0; }
.form-status { margin: 1rem 0 0; font-weight: 600; min-height: 1.5em; }
.form-status.is-success { color: var(--earth); }
.form-status.is-error { color: #B3261E; }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: #B7C1CA; font-size: 0.98rem; }
.footer-cable {
  height: 18px;
  background:
    linear-gradient(var(--live), var(--live)) top / 100% 6px no-repeat,
    linear-gradient(var(--neutral), var(--neutral)) center / 100% 6px no-repeat,
    repeating-linear-gradient(125deg, var(--earth) 0 14px, var(--earth-y) 14px 22px) bottom / 100% 6px no-repeat;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.footer-logo {
  width: 220px;
  height: auto;
  margin-bottom: 1.25rem;
}
.footer-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 0.4rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-start; }
.footer-links a { color: var(--white); overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--earth-y); }
.footer-legal {
  grid-column: 1 / -1;
  border-top: 1px solid #2C3A47;
  padding-top: 1.5rem;
  margin: 0;
  font-size: 0.9rem;
  max-width: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .site-nav ul { gap: 1rem; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps::before {
    top: 1.6rem; bottom: 1.6rem;
    left: 1.5rem; right: auto;
    width: 4px; height: auto;
  }
  .steps li {
    display: grid;
    grid-template-columns: 3.25rem 1fr;
    column-gap: 1.25rem;
    padding-bottom: 1.75rem;
  }
  .steps li::before { grid-row: span 2; margin-bottom: 0; }
  .steps h3 { margin-top: 0.6rem; margin-bottom: 0.25rem; }
}

@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; }
  .slideshow { aspect-ratio: 4 / 3; max-height: none; }
  .nav-toggle { display: block; }
  .call-mobile { display: inline-block; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.5rem 1.5rem;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a {
    display: block;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.1rem;
  }
  .header-phone { margin-top: 1rem; text-align: center; font-size: 1.4rem; padding: 0.75rem; }

  .sectors { grid-template-columns: 1fr; gap: 3rem; }
  .about-inner,
  .contact-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .brand img { height: 2.4rem; }
  .header-inner { gap: 0.6rem; }
  .call-mobile { font-size: 1rem; padding: 0.4rem 0.7rem; }
  .tech-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .hero-actions .btn { flex: 1 1 100%; text-align: center; }
  .footer-inner { grid-template-columns: 1fr; }
  .cable, .cable-svg { height: 130px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide, .slide.is-active { transition: none; }
  * { transition: none !important; }
}
