/* ============================================================
   SPARKES ELECTRICAL SOLUTIONS LTD — DEMO SITE
   Style sheet. Replaces the previous style.css in full.
   ============================================================ */

:root {
  /* Palette */
  --paper:        #f4f1ea;
  --paper-2:      #ece7dc;
  --ink:          #101216;
  --ink-2:        #2a2d33;
  --ink-3:        #5a5e66;
  --panel:        #1a1c1e;
  --panel-2:      #22252a;
  --accent:       #f0a500;
  --accent-hover: #d99400;
  --signal:       #b0301e;

  /* Hairlines */
  --hairline:       rgba(16, 18, 22, 0.14);
  --hairline-light: rgba(244, 241, 234, 0.18);

  /* Type */
  --font-head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Layout */
  --wrap-max: 1140px;
  --wrap-pad: clamp(20px, 4vw, 40px);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--wrap-pad);
}

/* Reveal-on-scroll */
html.js-ready .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
html.js-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------------------------
   Buttons
   --------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 20px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-accent {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* ---------------------------
   Header
   --------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--panel);
  color: var(--paper);
  border-bottom: 1px solid var(--hairline-light);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.wordmark {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  flex: 0 0 auto;
}
.wordmark-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--paper);
}
.wordmark-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.55);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--hairline-light);
  cursor: pointer;
}
.nav-toggle-bar {
  width: 18px;
  height: 2px;
  background: var(--paper);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(4) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-list a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.72);
  text-decoration: none;
  padding: 8px 10px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-list a:hover {
  color: var(--paper);
  border-bottom-color: var(--accent);
}

.nav-utility {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-left: 20px;
  border-left: 1px solid var(--hairline-light);
}
.nav-tel {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--paper);
  text-decoration: none;
  white-space: nowrap;
}
.nav-tel:hover { color: var(--accent); }

.mono-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-right: 4px;
}

/* ---------------------------
   Hero
   --------------------------- */
.hero {
  position: relative;
  background: var(--panel);
  color: var(--paper);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: grayscale(0.7) contrast(1.1);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: clamp(56px, 8vw, 96px);
}

.hero-heading {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.05;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--paper);
  margin: 0 0 20px;
  max-width: 18ch;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: rgba(244, 241, 234, 0.82);
  max-width: 56ch;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.hero-tel {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--paper);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.hero-tel:hover { color: var(--accent); }

.hero-spec {
  position: relative;
  z-index: 1;
  background: rgba(16, 18, 22, 0.85);
  border-top: 1px solid var(--hairline-light);
  border-bottom: 1px solid var(--hairline-light);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}
.spec-grid > div {
  padding: 20px 24px;
  border-left: 1px solid var(--hairline-light);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.spec-grid > div:first-child {
  border-left: 0;
  padding-left: 0;
}
.spec-grid dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.spec-grid dd {
  margin: 0;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.45;
  color: rgba(244, 241, 234, 0.88);
}

/* ---------------------------
   Shared section pieces
   --------------------------- */
.services, .about, .contact {
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: clamp(56px, 8vw, 96px);
}

.mono-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 20px;
}
.mono-tag::after {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  margin-top: 8px;
}

.section-head {
  margin: 0 0 clamp(32px, 5vw, 56px);
  max-width: 780px;
}
.section-head h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.1;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}

.mono-caption {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 10px 0 0;
}

/* ---------------------------
   Services
   --------------------------- */
.services { background: var(--paper-2); }

.service-list {
  border-top: 1px solid var(--hairline);
}

.service-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: start;
}

.service-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  padding-top: 6px;
  letter-spacing: 0.08em;
}

.service-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0 0 8px;
}

.service-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
  max-width: 62ch;
}

/* ---------------------------
   About
   --------------------------- */
.about { background: var(--paper-2); }

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

.about-figure { margin: 0; }
.about-figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 640px;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.03);
}

.about-prose h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 20px;
  max-width: 22ch;
}
.about-prose p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 14px;
  max-width: 58ch;
}
.about-prose p:last-child { margin-bottom: 0; }

/* ---------------------------
   Contact
   --------------------------- */
.contact {
  background: var(--panel);
  color: var(--paper);
}
.contact .section-head h2 { color: var(--paper); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.contact-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-tel {
  font-family: var(--font-mono);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  align-self: flex-start;
  padding-bottom: 4px;
}
.contact-tel:hover { color: var(--accent); }

.contact-address {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: rgba(244, 241, 234, 0.82);
  margin: 0;
}

.contact-side .mono-caption {
  color: rgba(244, 241, 234, 0.55);
  margin-top: 0;
}

/* Form */
.enquiry-form {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(24px, 3vw, 40px);
}

.form-field { margin-bottom: 20px; }

.form-field label {
  display: block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.req { color: var(--signal); }
.opt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
  margin-left: 4px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--hairline);
  padding: 11px 14px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--ink-3);
  opacity: 0.7;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--ink);
}

.form-field textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.55;
}

.form-field select {
  appearance: none;
  padding-right: 36px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23101216'%20stroke-width='2'%3E%3Cpolyline%20points='6%209%2012%2015%2018%209'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.form-field input.is-invalid,
.form-field select.is-invalid,
.form-field textarea.is-invalid {
  border-color: var(--signal);
  background: #fdf3f1;
}

.field-error {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--signal);
}
.field-error:empty { display: none; }

.form-submit {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
}

.form-status {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--signal);
  margin-top: 16px;
}
.form-status:empty { display: none; }
.form-status.is-success {
  color: var(--ink);
  background: rgba(240, 165, 0, 0.15);
  border-left: 3px solid var(--accent);
  padding: 14px 16px;
  line-height: 1.6;
}

.form-note {
  margin: 20px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  max-width: 60ch;
}

/* ---------------------------
   Footer
   --------------------------- */
.site-footer {
  background: var(--panel);
  color: rgba(244, 241, 234, 0.72);
  padding: clamp(48px, 6vw, 64px) 0 24px;
  border-top: 1px solid var(--hairline-light);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--hairline-light);
}

.footer-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--paper);
  margin: 0 0 4px;
}
.footer-desc {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.5);
  margin: 0;
}

.footer-contact p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.6;
}
.footer-contact a {
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 14px;
}
.footer-contact a:hover { text-decoration: underline; }

.footer-nav ul { display: grid; gap: 8px; }
.footer-nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.72);
  text-decoration: none;
}
.footer-nav a:hover { color: var(--paper); }

.footer-legal {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.42);
}
.footer-legal p { margin: 0; }

/* ---------------------------
   Breakpoints
   --------------------------- */
@media (max-width: 1024px) {
  .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec-grid > div:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }
  .spec-grid > div:nth-child(1),
  .spec-grid > div:nth-child(2) {
    border-bottom: 1px solid var(--hairline-light);
  }

  .contact-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-figure img { aspect-ratio: 3 / 2; max-height: 480px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px var(--wrap-pad) 24px;
    background: var(--panel);
    border-top: 1px solid var(--hairline-light);
    border-bottom: 1px solid var(--hairline-light);
  }
  .site-nav.is-open { display: flex; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .nav-list a {
    padding: 14px 0;
    border-bottom: 1px solid var(--hairline-light);
    border-left: 0;
    font-size: 12px;
  }
  .nav-list a:hover { border-bottom-color: var(--hairline-light); }

  .nav-utility {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding-left: 0;
    padding-top: 20px;
    margin-top: 8px;
    border-left: 0;
    border-top: 1px solid var(--hairline-light);
  }
  .nav-utility .btn { width: 100%; }
  .nav-tel { font-size: 15px; }
}

@media (max-width: 720px) {
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-legal { flex-direction: column; gap: 8px; }
}

@media (max-width: 600px) {
  .service-row {
    grid-template-columns: 44px 1fr;
    gap: 14px;
    padding: 24px 0;
  }
  .service-title { font-size: 22px; }
  .service-desc { font-size: 15px; }

  .spec-grid { grid-template-columns: 1fr; }
  .spec-grid > div {
    border-left: 0;
    padding: 16px 0;
    border-bottom: 1px solid var(--hairline-light);
  }
  .spec-grid > div:last-child { border-bottom: 0; }

  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .hero-tel { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js-ready .reveal { opacity: 1; transform: none; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}