/* Sparksmith Electrical — "Straight Up" design
   Palette: navy, corgi orange, cream, ink. Type: Archivo (wide for headlines). */

:root {
  --navy: #12203a;
  --navy-deep: #0b1426;
  --orange: #ef8a2c;
  --orange-shade: #b8611a;
  --cream: #f8f1e3;
  --ink: #0b1426;
  --white: #ffffff;
  --muted-on-navy: #c9d1e0;
  --muted-on-cream: #4f5464;

  --font-body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(48px, 7vw, 96px);
  --radius: 6px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-variation-settings: "wdth" 100;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; text-wrap: balance; }

/* Skip link */
.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--orange); color: var(--ink);
  padding: 10px 14px; font-weight: 700; border-radius: var(--radius);
  z-index: 100; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit; font-weight: 800; font-size: 15px;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 16px 24px; border: 0; border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms;
}
.btn-primary {
  background: var(--orange); color: var(--ink);
  box-shadow: 0 6px 0 var(--orange-shade);
}
.btn-primary:hover { transform: translateY(2px); box-shadow: 0 4px 0 var(--orange-shade); }
.btn-primary:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--orange-shade); }
.btn-primary:disabled { opacity: 0.7; cursor: wait; transform: none; }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--orange); outline-offset: 3px;
}

/* Header */
.site-header {
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  background: var(--navy); color: var(--white);
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand { flex: 0 0 auto; display: block; }
.brand img { height: 46px; width: auto; border-radius: 4px; }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a {
  text-decoration: none; font-weight: 600; font-size: 15px;
  color: var(--muted-on-navy); padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 120ms, border-color 120ms;
}
.site-nav a:hover { color: var(--white); border-color: var(--orange); }
.tel {
  text-decoration: none; font-weight: 800; font-size: 15px;
  color: var(--orange); white-space: nowrap;
  font-variation-settings: "wdth" 125;
}
.tel-label { color: var(--muted-on-navy); font-weight: 600; font-variation-settings: "wdth" 100; margin-right: 4px; }

/* Hero */
.hero {
  background: var(--navy); color: var(--white);
  padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(56px, 8vw, 104px);
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: 40px; align-items: center;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -80px; bottom: -120px;
  width: 520px; height: 520px; border-radius: 50%;
  background: var(--orange); opacity: 0.12; pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; }
.tag {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--orange); margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 88px); line-height: 0.94;
  font-weight: 900; font-variation-settings: "wdth" 125;
  letter-spacing: -0.015em; text-transform: uppercase;
  margin-bottom: 22px;
}
.hero h1 em { font-style: normal; color: var(--orange); }
.lede { font-size: clamp(17px, 1.4vw, 20px); max-width: 46ch; color: var(--muted-on-navy); margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.link-ghost {
  color: var(--white); font-weight: 600; font-size: 15px; text-decoration: none;
  border-bottom: 2px solid var(--orange); padding-bottom: 2px;
}
.link-ghost:hover { color: var(--orange); }

.hero-mascot {
  position: relative; z-index: 1; justify-self: center;
  width: min(300px, 100%); aspect-ratio: 1; border-radius: 50%;
  background: var(--white); overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6), 0 0 0 10px rgba(239,138,44,0.18);
}
.hero-mascot img {
  /* Square crop of the corgi; inset so the ears and plug stay clear of the circle edge. */
  width: 100%; height: 100%; object-fit: contain;
  padding: 8%;
}

/* Promises strip */
.promises {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--orange); color: var(--ink);
}
.promises li {
  padding: 18px 18px; font-weight: 700; font-size: 14px; line-height: 1.3;
  border-right: 1px solid rgba(0,0,0,0.15);
  display: flex; gap: 8px; align-items: flex-start;
}
.promises li:first-child { padding-left: var(--gutter); }
.promises li:last-child { border-right: 0; padding-right: var(--gutter); }
.promises li::before { content: "✓"; font-weight: 900; flex: 0 0 auto; }

/* About + How */
.about {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px; padding: var(--section) var(--gutter); align-items: start;
}
.about h2 {
  font-size: clamp(30px, 3.6vw, 40px); font-weight: 900;
  font-variation-settings: "wdth" 125; line-height: 1; text-transform: uppercase;
  margin-bottom: 18px;
}
.about-copy { display: grid; gap: 14px; max-width: 58ch; }
.how { background: var(--navy); color: var(--white); padding: 30px; border-radius: 8px; }
.how h3 {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--orange); margin-bottom: 16px;
}
.how ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; counter-reset: step; }
.how li {
  display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: center;
  font-weight: 600; font-size: 16px; counter-increment: step;
}
.how li::before {
  content: counter(step);
  font-family: var(--font-mono); font-size: 13px; color: var(--ink);
  background: var(--orange); border-radius: 50%; width: 26px; height: 26px;
  display: grid; place-items: center;
}

/* Services */
.services { padding: 0 var(--gutter) var(--section); }
.services h2 {
  font-size: clamp(24px, 2.8vw, 32px); font-weight: 900;
  font-variation-settings: "wdth" 125; text-transform: uppercase; line-height: 1;
  margin-bottom: 22px;
}
.service-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  background: var(--navy); border: 2px solid var(--navy); border-radius: 8px; overflow: hidden;
}
.service-grid li {
  background: var(--white); padding: 22px 20px; display: grid; gap: 6px;
  transition: background 140ms;
}
.service-grid li:hover { background: var(--cream); }
.service-grid strong {
  font-size: 18px; font-weight: 800; font-variation-settings: "wdth" 125;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.service-grid span { font-size: 15px; color: var(--muted-on-cream); line-height: 1.45; }

/* Contact */
.contact {
  background: var(--white); border-top: 6px solid var(--navy);
  padding: var(--section) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px;
}
.contact h2 {
  font-size: clamp(32px, 4vw, 46px); font-weight: 900;
  font-variation-settings: "wdth" 125; line-height: 0.98; text-transform: uppercase;
  margin-bottom: 14px;
}
.contact-copy > p { max-width: 48ch; }
.meta { margin: 24px 0 0; display: grid; gap: 10px; }
.meta div { display: grid; grid-template-columns: 64px 1fr; gap: 8px; }
.meta dt { font-weight: 800; }
.meta dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.meta a { text-decoration: none; border-bottom: 2px solid var(--orange); }
.meta a:hover { color: var(--orange-shade); }

.enquiry { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.field small { font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted-on-cream); }
.field input, .field textarea {
  border: 2px solid var(--navy); border-radius: 4px;
  padding: 12px 14px; font: inherit; font-size: 16px;
  background: var(--cream); color: var(--ink); width: 100%;
  text-transform: none; letter-spacing: 0;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { background: var(--white); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #c0392b; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.enquiry .btn { justify-self: start; }
.form-status { font-size: 15px; font-weight: 600; min-height: 1.5em; }
.form-status.error { color: #c0392b; }
.form-status.success { color: #1e7a45; }

/* Footer */
.site-footer {
  background: var(--navy-deep); color: #93a0bb; font-size: 13px;
  padding: 20px var(--gutter);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 960px) {
  .promises { grid-template-columns: repeat(3, 1fr); }
  .promises li, .promises li:first-child, .promises li:last-child { padding: 18px; border-bottom: 1px solid rgba(0,0,0,0.15); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .site-header { gap: 12px; }
  .site-nav { display: none; }
  .brand { flex: 0 1 150px; min-width: 0; }
  .tel { margin-left: auto; flex-shrink: 0; }
  .tel-label { display: none; }
  .brand img { width: 100%; height: auto; }
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: clamp(30px, 7.5vw, 56px); line-height: 1.06; }
  .contact h2 { font-size: clamp(28px, 6vw, 40px); line-height: 1.08; }
  .hero-mascot { width: min(220px, 60vw); order: -1; justify-self: start; }
  .hero::after { width: 320px; height: 320px; right: -120px; bottom: -160px; }
  .promises { grid-template-columns: 1fr; }
  .promises li { border-right: 0; }
  .about, .contact { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .hero-actions { align-items: stretch; flex-direction: column; gap: 22px; }
  .hero-actions .btn { justify-content: center; text-align: center; padding-inline: 16px; }
  .hero-actions .link-ghost { align-self: flex-start; }
  .how { padding: 24px; }
  .service-grid { grid-template-columns: 1fr; }
  .meta div { grid-template-columns: 1fr; gap: 2px; }
}
