/* Bright Spark Electrical — "Tidy Home Visit" */
:root {
  --bg: #fbf4e8;
  --surface: #ffffff;
  --ink: #2a2118;
  --muted: #6b5a48;
  --accent: #b5402a;
  --accent-deep: #963321;
  --green: #2f5d50;
  --green-deep: #244a40;
  --line: #e8dcc8;
  --paper-shadow: 0 1px 0 rgba(42, 33, 24, .05), 0 18px 40px -26px rgba(42, 33, 24, .45);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Nunito Sans", "Segoe UI", Arial, sans-serif;

  /* type scale, 18px base, roughly a 4:3 ratio */
  --t-small: .875rem;
  --t-body: 1.125rem;
  --t-lead: 1.3125rem;
  --t-h3: 1.5rem;
  --t-h2: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  --t-hello: clamp(2.6rem, 1.6rem + 5vw, 5rem);

  --wrap: 72rem;
  --narrow: 42rem;
  --gutter: clamp(1.25rem, .6rem + 3vw, 3rem);
  --space: clamp(4rem, 2.5rem + 6vw, 8rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent-deep); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -.012em;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.2; }
p { margin: 0; }
p + p { margin-top: 1em; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.narrow { max-width: var(--narrow); }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 999px; z-index: 10;
}
.skip:focus { top: 1rem; }

/* ---------- header ---------- */
.site-head { padding-block: 1.1rem; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand img { width: 2.6rem; height: 2.6rem; flex: none; }
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name b { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; font-variation-settings: "SOFT" 100; letter-spacing: -.01em; }
.brand-name span { font-weight: 700; font-size: .8rem; color: var(--green); letter-spacing: .06em; margin-top: .25rem; }
.head-call { font-weight: 800; color: var(--ink); text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .2rem; }
.head-call svg { width: 1.15rem; height: 1.15rem; color: var(--accent); }
.head-call .long { display: none; }
@media (min-width: 34rem) { .head-call .long { display: inline; } .head-call .short { display: none; } }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3.25rem; padding: .8rem 1.5rem;
  border-radius: 999px; border: 2px solid transparent;
  font-family: var(--sans); font-weight: 800; font-size: 1.0625rem; line-height: 1.2;
  text-decoration: none; transition: background-color .15s ease, transform .15s ease;
}
.btn svg { width: 1.25rem; height: 1.25rem; flex: none; }
.btn-call { background: var(--accent); color: #fff; }
.btn-call:hover { background: var(--accent-deep); }
.btn-wa { background: transparent; color: var(--green); border-color: var(--green); }
.btn-wa:hover { background: var(--green); color: #fff; }
.btn-mail { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-mail:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
@media (max-width: 26rem) { .actions .btn { flex: 1 1 100%; } }

/* ---------- hero ---------- */
.hero { padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) var(--space); }
.hero .wrap { display: grid; gap: 2.5rem; align-items: center; }
.hero h1 { font-weight: 500; }
.hero .hello {
  display: block;
  font-size: var(--t-hello);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  letter-spacing: -.025em;
  line-height: 1.02;
}
.hero .what {
  display: block;
  margin-top: 1.1rem;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  font-weight: 420;
  font-style: italic;
  color: var(--green);
  line-height: 1.3;
  max-width: 30ch;
}
.hero .intro { margin-top: 1.5rem; font-size: var(--t-lead); max-width: 36ch; color: var(--ink); }
.hero .actions { margin-top: 2rem; }
.hero .hours-note { margin-top: 1.1rem; color: var(--muted); font-size: 1rem; }
.hero-art { width: 100%; height: auto; max-width: 34rem; justify-self: center; }
@media (min-width: 60rem) {
  .hero .wrap { grid-template-columns: 1.15fr 1fr; gap: 4rem; }
  .hero-art { justify-self: end; }
}

/* drawn lines */
.draw { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; }
.g { stroke: var(--green); }
.r { stroke: var(--accent); }
.fill-r { fill: var(--accent); }
.fill-g { fill: var(--green); }
.fill-paper { fill: var(--surface); }

/* ---------- section heads ---------- */
.section { padding-block: 0 var(--space); }
.section-head { max-width: var(--narrow); margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.25rem); }
.section-head p { margin-top: 1rem; font-size: var(--t-lead); color: var(--muted); }

/* ---------- visit steps (a real sequence) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.75rem; counter-reset: step; }
.step { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.25rem; align-items: start; }
.step svg { width: 6.5rem; height: auto; }
.step h3 { display: flex; gap: .5rem; align-items: baseline; }
.step h3::before {
  counter-increment: step; content: counter(step) ".";
  font-family: var(--serif); font-style: italic; color: var(--accent); font-weight: 500;
}
.step p { margin-top: .5rem; color: var(--muted); }
@media (min-width: 52rem) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .step { grid-template-columns: 1fr; }
  .step svg { width: 9rem; }
}

/* ---------- services: soft cards ---------- */
.services { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.service {
  background: var(--surface);
  border-radius: 1.5rem;
  padding: 1.6rem 1.5rem 1.7rem;
  box-shadow: var(--paper-shadow);
  display: grid; grid-template-columns: 3rem 1fr; gap: .25rem 1.1rem; align-items: start;
}
.service svg { width: 3rem; height: 3rem; grid-row: span 2; }
.service h3 { font-size: 1.375rem; padding-top: .35rem; }
.service p { color: var(--muted); margin-top: .35rem; }
@media (min-width: 44rem) { .services { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; } }
@media (min-width: 64rem) {
  .services { grid-template-columns: repeat(6, 1fr); }
  .service { grid-column: span 2; grid-template-columns: 1fr; padding: 2rem 1.75rem; }
  .service svg { grid-row: auto; margin-bottom: .75rem; }
  .service:nth-child(4) { grid-column: 2 / span 2; }
}

/* ---------- labeller tape ---------- */
.tape {
  display: inline-block;
  background: var(--green); color: #fff;
  font-family: var(--sans); font-weight: 700; font-size: .8125rem; line-height: 1.2;
  padding: .3rem .55rem .32rem;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(0,0,0,.18);
  white-space: nowrap;
}

/* ---------- the labelled fuse box ---------- */
.story .wrap { display: grid; gap: 2.5rem; align-items: center; }
.story-text p { font-size: var(--t-lead); }
.story-text p + p { color: var(--muted); font-size: var(--t-body); }
.story-text .actions { margin-top: 1.75rem; }

.fusebox {
  background: var(--surface);
  border-radius: 1.75rem;
  box-shadow: var(--paper-shadow);
  padding: 1.25rem;
  border: 2px solid var(--line);
}
.fusebox-lid {
  display: flex; justify-content: space-between; align-items: center;
  padding: .1rem .35rem 1rem;
  font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1rem;
}
.fusebox-lid .lamp { width: .7rem; height: .7rem; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(47, 93, 80, .15); }
.breakers {
  list-style: none; margin: 0; padding: 1rem .75rem 1.1rem;
  background: var(--bg); border-radius: 1rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem .5rem;
}
.breaker { display: flex; flex-direction: column; align-items: center; gap: .65rem; min-width: 0; }
.breaker .body {
  width: 2.6rem; height: 4.2rem; border-radius: .5rem;
  background: var(--surface); border: 2px solid var(--ink);
  display: grid; place-items: center;
}
.breaker .slot { width: 1.05rem; height: 2.6rem; border-radius: .35rem; background: #efe5d4; position: relative; overflow: hidden; }
.breaker .toggle {
  position: absolute; left: 0; right: 0; top: 0; height: 55%;
  border-radius: .35rem; background: var(--green);
  transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), background-color .35s ease;
}
.breaker .tape { font-size: .75rem; white-space: normal; text-align: center; max-width: 100%; transform: rotate(var(--tilt, -1.5deg)); }
.breaker:nth-child(2n) .tape { --tilt: 1.2deg; }
.breaker:nth-child(3n) .tape { --tilt: -.6deg; }
.fusebox-foot { margin-top: 1rem; padding-inline: .35rem; font-size: .9375rem; color: var(--muted); }

/* JS-only: switches start off and flick on once, in order */
.js .fusebox:not(.is-on) .toggle { transform: translateY(82%); background: #b8a88f; }
.js .fusebox.is-on .breaker:nth-child(1) .toggle { transition-delay: .1s; }
.js .fusebox.is-on .breaker:nth-child(2) .toggle { transition-delay: .25s; }
.js .fusebox.is-on .breaker:nth-child(3) .toggle { transition-delay: .4s; }
.js .fusebox.is-on .breaker:nth-child(4) .toggle { transition-delay: .55s; }
.js .fusebox.is-on .breaker:nth-child(5) .toggle { transition-delay: .7s; }
.js .fusebox.is-on .breaker:nth-child(6) .toggle { transition-delay: .85s; }
@media (prefers-reduced-motion: reduce) {
  .js .fusebox:not(.is-on) .toggle { transform: none; background: var(--green); }
  .breaker .toggle { transition: none; }
}

@media (min-width: 40rem) {
  .breakers { grid-template-columns: repeat(6, 1fr); gap: .5rem; padding: 1.25rem 1rem 1.4rem; }
}
@media (min-width: 60rem) {
  .story .wrap { grid-template-columns: 1fr 1.25fr; gap: 4rem; }
  .fusebox { padding: 1.5rem; }
}

/* ---------- about + areas ---------- */
.about .wrap { display: grid; gap: 2rem; }
.about p { font-size: var(--t-lead); }
.about p + p { font-size: var(--t-body); color: var(--muted); }
.promises { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .6rem; }
.promises li { display: flex; gap: .7rem; align-items: baseline; font-weight: 700; }
.promises svg { width: 1.1rem; height: 1.1rem; flex: none; transform: translateY(.15rem); }

.areas {
  background: var(--green); color: #fff;
  border-radius: 2rem;
  padding: clamp(2rem, 1.5rem + 2vw, 3rem) clamp(1.5rem, 1rem + 3vw, 3.5rem);
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
}
.areas h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 500; font-style: italic; }
.area-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.75rem; }
.area-list li { font-family: var(--serif); font-variation-settings: "SOFT" 100, "WONK" 1; font-size: clamp(2rem, 1.4rem + 3vw, 3.5rem); line-height: 1.1; font-weight: 520; display: flex; align-items: center; gap: .6rem; }
.area-list li svg { width: .55em; height: .55em; flex: none; }
.area-list li.more { font-family: var(--sans); font-size: var(--t-body); font-weight: 700; color: #e7efe9; }
.areas p { margin-top: 1.5rem; color: #e7efe9; max-width: 52ch; }

/* ---------- contact + hours ---------- */
.contact .wrap { display: grid; gap: 1.25rem; }
.contact-card, .hours-card {
  background: var(--surface); border-radius: 1.75rem; box-shadow: var(--paper-shadow);
  padding: clamp(1.75rem, 1.25rem + 2vw, 3rem);
}
.contact-card h2 { max-width: 16ch; }
.contact-card > p { margin-top: 1rem; color: var(--muted); max-width: 46ch; }
.big-number {
  display: inline-block; margin-top: 1.5rem;
  font-family: var(--serif); font-weight: 560; font-variation-settings: "SOFT" 100;
  font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); letter-spacing: -.01em; line-height: 1.1;
  color: var(--ink); text-decoration: none; border-bottom: 3px solid var(--accent);
}
.contact-card .actions { margin-top: 1.75rem; }
.contact-card .email { margin-top: 1.5rem; }
.hours-card h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); }
.hours { margin: 1.25rem 0 0; display: grid; grid-template-columns: auto 1fr; gap: .75rem 1.5rem; }
.hours dt { font-weight: 700; }
.hours dd { margin: 0; color: var(--ink); }
.hours-card .note { margin-top: 1.25rem; color: var(--muted); font-size: 1rem; }
@media (min-width: 56rem) { .contact .wrap { grid-template-columns: 1.6fr 1fr; align-items: stretch; } }

/* ---------- footer ---------- */
.site-foot { padding-block: 2.5rem 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 1rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.site-foot .brand img { width: 2.2rem; height: 2.2rem; }
.site-foot .brand-name b { font-size: 1.15rem; }
.foot-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }
