/* =========================================================
   A.L.E Electrical: friendly local Selwyn electrician
   Warm, family-friendly style. Mobile-first.
   ========================================================= */

:root {
  --ink: #262a2e;          /* dark charcoal (headings, footer, topbar) */
  --brand: #3d506d;        /* slate blue-grey (secondary) */
  --brand-dark: #2f3f57;
  --accent: #bda674;       /* muted gold */
  --accent-dark: #a88f5f;
  --text: #4c4c4c;
  --muted: #808080;
  --bg: #ffffff;
  --bg-warm: #f5f4f1;      /* light warm grey */
  --bg-soft: #f5f5f5;      /* neutral light grey */
  --line: #e5e5e5;
  --white: #ffffff;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.12);
  --maxw: 1140px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-head: "Poppins", var(--font);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 96px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.65;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* guard against any accidental sideways scroll on mobile */
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 72px 0; }
.section--warm { background: var(--bg-warm); }
.section--soft { background: var(--bg-soft); }
@media (max-width: 600px) {
  .section { padding: 48px 0; }
  .container { padding: 0 16px; }
  .section-head { margin-bottom: 30px; }
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 0.6rem;
}

.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(189, 166, 116, 0.4); }
.btn--primary:hover { background: var(--accent-dark); }
.btn--brand { background: var(--brand); color: #fff; }
.btn--brand:hover { background: var(--brand-dark); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn--ghost:hover { background: rgba(255,255,255,0.12); }
.btn--lg { padding: 16px 34px; font-size: 1.08rem; }

/* ---------- Top contact bar ---------- */
.topbar {
  background: var(--ink);
  color: #cfcfcf;
  font-size: 0.88rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar a { color: #fff; }
.topbar .topbar__items { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar .topbar__items span { display: inline-flex; align-items: center; gap: 7px; }
@media (max-width: 720px) {
  .topbar .topbar__tag { display: none; }
  .topbar .container { justify-content: center; }
}
@media (max-width: 480px) {
  .topbar { font-size: 0.8rem; }
  .topbar .topbar__items { gap: 14px; justify-content: center; }
  .hero__cta .btn, .cta__btns .btn { width: 100%; justify-content: center; }
}

/* ---------- Header / nav ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__logo { height: 88px; width: auto; display: block; }
@media (max-width: 900px) { .brand__logo { height: 62px; } }
@media (max-width: 600px) { .brand__logo { height: 46px; } }
@media (max-width: 380px) { .brand__logo { height: 40px; } }

.header__contact {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  margin-left: 22px;
  margin-right: auto;
  padding-left: 22px;
  border-left: 1px solid var(--line);
}
.header__name { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1rem; }
.header__phone { color: var(--accent-dark); font-weight: 700; font-size: 1.05rem; }
.header__phone:hover { color: var(--accent-dark); text-decoration: none; }
@media (max-width: 900px) { .header__contact { margin-left: 14px; padding-left: 14px; } }
@media (max-width: 600px) {
  .header__contact { margin-left: 11px; padding-left: 11px; }
  .header__name { font-size: 0.8rem; }
  .header__phone { font-size: 0.9rem; }
}
@media (max-width: 380px) {
  .header__contact { margin-left: 9px; padding-left: 9px; border-left: none; }
  .header__name { font-size: 0.74rem; }
  .header__phone { font-size: 0.84rem; }
}
.brand--footer { margin-bottom: 14px; }
.brand__logo--light { height: 52px; filter: invert(1); }
.brand__mark {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--ink));
  display: grid; place-items: center;
  color: var(--accent);
  flex: none;
}
.brand__mark svg { width: 26px; height: 26px; }
.brand__name { font-family: var(--font-head); font-weight: 800; color: var(--ink); font-size: 1.15rem; letter-spacing: 0.02em; line-height: 1.1; }
.brand__tag { font-size: 0.72rem; color: var(--muted); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__links a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 8px;
}
.nav__links a:hover { background: var(--bg-soft); text-decoration: none; }
.nav__links .btn { margin-left: 8px; color: var(--ink); }
.nav__links .btn:hover { color: var(--ink); }

.nav__toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 8px; color: var(--ink);
}
.nav__toggle svg { width: 28px; height: 28px; }

@media (max-width: 900px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 20px;
    gap: 4px;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 12px 14px; }
  .nav__links .btn { margin: 8px 0 0; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, #2a2f36 0%, #3d506d 100%);
  color: #fff;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px; top: -120px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(189,166,116,0.30), transparent 70%);
  border-radius: 50%;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding-top: 76px;
  padding-bottom: 84px;
  position: relative;
  z-index: 1;
}
.hero--single .container { grid-template-columns: 1fr; }
.hero--single .hero__lead { max-width: 720px; }
.hero h1 { color: #fff; }
.hero h1 span { color: var(--accent); }
.hero__lead { font-size: 1.18rem; color: #e4e4e4; max-width: 540px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0 22px; }
.hero__trust { display: flex; gap: 22px; flex-wrap: wrap; font-size: 0.95rem; color: #d6d6d6; }
.hero__trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero__trust svg { width: 18px; height: 18px; color: var(--accent); flex: none; }

.hero__card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: 8px;
}
.hero__photo {
  border-radius: 12px;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(247,168,35,0.18), rgba(255,255,255,0.05)),
    #1a3a66;
  display: grid; place-items: center;
  text-align: center;
  color: #aac3e2;
  font-size: 0.9rem;
  padding: 20px;
}
img.hero__photo {
  width: 100%;
  height: auto;
  padding: 0;
  object-fit: cover;
  object-position: center 25%;
  display: block;
}

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; gap: 32px; padding-top: 54px; padding-bottom: 60px; }
  .hero__card { max-width: 480px; }
}

/* ---------- Trust strip ---------- */
.strip {
  background: var(--accent);
  color: var(--ink);
}
.strip .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 16px 28px;
  padding: 18px 20px;
  font-family: var(--font-head);
  font-weight: 600;
  text-align: center;
}
.strip span { display: inline-flex; align-items: center; gap: 9px; }
.strip svg { width: 22px; height: 22px; }
@media (max-width: 600px) {
  .strip .container { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 8px; justify-items: center; }
  .strip span { font-size: 0.9rem; }
}

/* ---------- Services ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 880px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #dcdcdc; }
.card__icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--brand);
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.card__icon svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin-bottom: 0; font-size: 0.98rem; }

/* Clickable service cards */
a.card { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
a.card:hover { text-decoration: none; }
.card__more {
  margin-top: 16px;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--brand);
  font-size: 0.95rem;
}
a.card:hover .card__more { color: var(--brand-dark); }

/* Service detail page intro list */
.service-points {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 24px;
  list-style: none;
  padding: 0;
  margin: 0 0 1.4em;
}
@media (max-width: 560px) { .service-points { grid-template-columns: 1fr; } }
.service-points li { display: flex; gap: 10px; align-items: flex-start; }
.service-points li svg { width: 20px; height: 20px; color: var(--brand); flex: none; margin-top: 4px; }

/* Related services links */
.related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.related a {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50px;
  padding: 8px 16px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}
.related a:hover { text-decoration: none; border-color: var(--brand); color: var(--brand); }

/* ---------- About / family ---------- */
.about { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 52px; align-items: center; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 32px; } }
.about__photo {
  border-radius: var(--radius);
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #e9f1fb, #fdf6ec);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  text-align: center; color: var(--muted); padding: 24px; font-size: 0.92rem;
}
img.about__photo {
  width: 100%;
  height: auto;
  padding: 0;
  object-fit: cover;
  display: block;
  box-shadow: var(--shadow);
}
.about ul { list-style: none; padding: 0; margin: 18px 0 26px; display: grid; gap: 12px; }
.about li { display: flex; gap: 12px; align-items: flex-start; }
.about li svg { width: 22px; height: 22px; color: var(--brand); flex: none; margin-top: 3px; }
.about li strong { color: var(--ink); }

/* ---------- Areas ---------- */
.area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}
.area-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.area-chip:hover { text-decoration: none; border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.area-chip svg { width: 18px; height: 18px; color: var(--accent-dark); flex: none; }

/* ---------- Why / steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-left: 64px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--brand); color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: 1.25rem;
  display: grid; place-items: center;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); margin-bottom: 0; }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 980px) { .quotes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .quotes { grid-template-columns: 1fr; } }
.quote {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 3px;
  padding: 30px 26px;
}
.quote__stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 10px; }
.quote__name { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1.08rem; margin: 0 0 8px; }
.quote__desc { font-size: 0.96rem; color: var(--muted); margin: 0; line-height: 1.55; }
.quote__loc { font-size: 0.88rem; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta {
  background: linear-gradient(135deg, var(--ink), var(--brand-dark));
  color: #fff;
  text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: #dcdcdc; font-size: 1.12rem; max-width: 560px; margin: 0 auto 28px; }
.cta__btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; gap: 32px; } }
.contact__details { display: grid; gap: 18px; margin-top: 10px; }
.contact__row { display: flex; gap: 14px; align-items: flex-start; }
.contact__row svg { width: 24px; height: 24px; color: var(--brand); flex: none; margin-top: 3px; }
.contact__row strong { display: block; color: var(--ink); font-family: var(--font-head); }
.contact__row a { color: var(--text); }

.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.form label { display: block; font-family: var(--font-head); font-weight: 600; color: var(--ink); margin-bottom: 6px; font-size: 0.92rem; }
.form input, .form textarea, .form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  margin-bottom: 16px;
  background: #fafafa;
  color: var(--text);
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 95, 168, 0.12);
}
.form textarea { resize: vertical; min-height: 120px; }
.form .btn { width: 100%; justify-content: center; }
.form__note { font-size: 0.82rem; color: var(--muted); margin: 12px 0 0; text-align: center; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #b3b3b3; padding: 56px 0 28px; font-size: 0.95rem; }
.footer a { color: #dcdcdc; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; gap: 28px; } }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer ul.footer__cols { display: block; columns: 2; column-gap: 22px; }
.footer ul.footer__cols li { margin-bottom: 9px; break-inside: avoid; }
.footer__brand .brand__name { color: #fff; }
.footer__brand p { max-width: 320px; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 0.85rem; color: #949494;
}

/* ---------- Floating call button (mobile) ---------- */
.fab {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 60;
  background: var(--accent);
  color: var(--ink);
  width: 58px; height: 58px;
  border-radius: 50%;
  display: none;
  place-items: center;
  box-shadow: var(--shadow-lg);
}
.fab svg { width: 26px; height: 26px; }
@media (max-width: 720px) { .fab { display: grid; } }

/* ---------- Local page extras ---------- */
.page-hero {
  background: linear-gradient(160deg, #2a2f36 0%, #3d506d 100%);
  color: #fff;
  padding: 64px 0;
}
@media (max-width: 600px) { .page-hero { padding: 44px 0; } }
.page-hero .eyebrow { color: var(--accent); }
.page-hero h1 { color: #fff; max-width: 760px; }
.page-hero p { color: #e4e4e4; max-width: 620px; font-size: 1.1rem; }
.breadcrumb { font-size: 0.85rem; color: #cfcfcf; margin-bottom: 14px; }
.breadcrumb a { color: #e4e4e4; }

.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 8px; }

.two-col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 44px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } .sidecard { position: static; } }
.sidecard {
  background: var(--bg-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  position: sticky;
  top: 90px;
}
.sidecard h3 { margin-top: 0; }
.sidecard .btn { width: 100%; justify-content: center; margin-top: 6px; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: #fff; color: var(--ink); padding: 10px 16px; z-index: 100; border-radius: 8px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Thank-you toast ---------- */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  transform: translateY(-16px);
  z-index: 200;
  max-width: calc(100% - 32px);
  background: var(--ink);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 16px 24px;
  border-radius: 10px;
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  text-align: center;
}
.toast--show { opacity: 1; transform: translateY(0); }
.toast--error { border-left-color: #d9534f; }
