/* Build Smart Electrical. Colours are taken from the logo: black, yellow, white. */
:root {
  --black: #000;
  --panel: #151515;
  --line: #333;
  --white: #fff;
  --muted: #bdbdbd;
  --yellow: #fcdb00;
  --yellow-press: #e6c700;
  --error: #b3121d;
  --ok: #0b6b2e;

  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(64px, 9vw, 120px);
  --radius: 4px;
  --head-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
  --step-3: clamp(2.125rem, 1.5rem + 2.7vw, 3.5rem);
  --step-4: clamp(2.75rem, 1.2rem + 4.6vw, 5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: Archivo, "Arial Narrow", Arial, sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { margin: 0; font-stretch: 118%; font-weight: 800; line-height: 1.08; text-wrap: balance; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 700; line-height: 1.2; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
main:focus { outline: none; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.sprite { position: absolute; }
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: min(100%, 1320px); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--panel { background: var(--panel); }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 34em; }
.prose { max-width: 38em; color: var(--muted); }
.prose p + p { margin-top: 1em; }
.section-head { max-width: 780px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { margin-top: 16px; color: var(--muted); }

.skip { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 12px 16px; background: var(--yellow); color: var(--black); font-weight: 700; }
.skip:focus { top: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border: 2px solid transparent; border-radius: var(--radius);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  touch-action: manipulation;
  transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.btn--yellow { background: var(--yellow); color: var(--black); }
.btn--yellow:hover { background: var(--yellow-press); }
.btn--line { border-color: var(--white); color: var(--white); }
.btn--line:hover { background: var(--white); color: var(--black); }
.btn--black { background: var(--black); color: var(--white); }
.btn--black:hover { background: #333; }
.btn--black:focus-visible { outline-color: var(--black); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 50; background: var(--black); border-bottom: 1px solid var(--line); }
.site-head__row { display: flex; align-items: center; gap: 24px; min-height: var(--head-h); }
.site-head__logo { flex: none; display: flex; align-items: center; min-height: 44px; margin-right: auto; }
.site-head__logo img { width: clamp(190px, 18vw, 250px); }
.site-nav { display: flex; gap: 4px; }
.site-nav a { display: flex; align-items: center; min-height: 44px; padding-inline: 12px; font-weight: 500; text-decoration: none; }
.site-nav a:hover { color: var(--yellow); }
.site-nav a[aria-current="page"] { color: var(--yellow); box-shadow: inset 0 -2px 0 var(--yellow); }
.site-head__toggle { display: none; width: 48px; height: 48px; align-items: center; justify-content: center; padding: 0; background: none; border: 1px solid var(--line); border-radius: var(--radius); color: var(--white); cursor: pointer; }

@media (max-width: 1060px) {
  .site-head__cta { display: none; }
}
@media (max-width: 860px) {
  :root { --head-h: 68px; }
  .site-head__row { gap: 8px; }
  .site-head__toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; inset: 100% 0 auto; flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; background: var(--black); border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: flex; }
  .site-nav a { min-height: 52px; border-bottom: 1px solid var(--line); font-size: var(--step-1); }
  .site-nav a[aria-current="page"] { box-shadow: none; }
}

/* Hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: min(calc(100svh - var(--head-h)), 860px);
}
.hero__photo {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 38% 30%;
  transform: scaleX(-1); /* mirrored so the lit glass sits clear of the text */
  filter: brightness(.82) saturate(.72);
  animation: lights-on 1.1s .15s both;
}
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, #000 0%, rgba(0, 0, 0, .6) 12%, rgba(0, 0, 0, 0) 34%),
    linear-gradient(to right, rgba(0, 0, 0, .94) 0%, rgba(0, 0, 0, .78) 36%, rgba(0, 0, 0, 0) 68%);
}
.hero__copy { padding-block: clamp(120px, 18vh, 200px) clamp(28px, 4vw, 44px); }
.hero h1 { max-width: 13em; font-size: var(--step-4); font-weight: 800; line-height: 1.02; }
.hero h1 span { display: block; color: var(--yellow); }
.hero .lead { margin-top: 20px; max-width: 32em; color: var(--white); }
.hero .btn-row { margin-top: 28px; }

/* The lights switch on once as the page loads */
@keyframes lights-on {
  0% { filter: brightness(.22) saturate(.72); }
  30% { filter: brightness(.7) saturate(.72); }
  45% { filter: brightness(.35) saturate(.72); }
  100% { filter: brightness(.82) saturate(.72); }
}

/* Scrolling selling points */
.ticker { display: flex; align-items: center; border-top: 1px solid rgba(255, 255, 255, .22); background: rgba(0, 0, 0, .55); }
.ticker__view { flex: 1; min-width: 0; overflow: hidden; }
.ticker__track { display: flex; width: max-content; animation: ticker 44s linear infinite; }
.ticker ul { display: flex; flex: none; }
.ticker li { display: flex; align-items: center; gap: 12px; padding: 16px 0 16px 40px; font-weight: 500; white-space: nowrap; }
.ticker .icon { width: 16px; height: 16px; color: var(--yellow); fill: var(--yellow); }
.ticker:hover .ticker__track, .ticker:focus-within .ticker__track, .ticker.is-paused .ticker__track { animation-play-state: paused; }
.ticker__toggle { flex: none; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-inline: 8px; padding: 0; background: none; border: 0; color: var(--white); cursor: pointer; touch-action: manipulation; }
.ticker__toggle:hover { color: var(--yellow); }
.ticker__toggle .icon { width: 20px; height: 20px; color: inherit; fill: currentColor; stroke: none; }
.ticker__toggle:focus-visible { outline-offset: -4px; }
@keyframes ticker { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .ticker__copy, .ticker__toggle { display: none !important; }
  .ticker__track { width: 100%; }
  .ticker ul { flex-wrap: wrap; gap: 0 8px; padding-inline: var(--gutter); }
  .ticker li { padding: 8px 24px 8px 0; white-space: normal; }
}
@media (max-width: 860px) {
  .hero { min-height: calc(100svh - var(--head-h)); }
  .hero__shade { background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .9) 48%, rgba(0, 0, 0, .1) 78%); }
  .ticker li { padding-left: 28px; }
}

/* Services grid */
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.svc { display: flex; flex-direction: column; gap: 14px; padding: clamp(20px, 2.4vw, 32px); background: var(--black); text-decoration: none; transition: background-color .15s var(--ease), color .15s var(--ease); }
.svc .icon { width: 36px; height: 36px; color: var(--yellow); stroke-width: 1.5; }
.svc p { color: var(--muted); font-size: 1rem; line-height: 1.5; }
.svc:hover { background: var(--yellow); color: var(--black); }
.svc:hover .icon, .svc:hover p { color: var(--black); }
.svc:focus-visible { outline-offset: -6px; }
@media (max-width: 860px) {
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc:last-child:nth-child(odd) { grid-column: 1 / -1; } /* no empty cell with an odd count */
}
@media (max-width: 560px) { .svc-grid { grid-template-columns: minmax(0, 1fr); } }

/* Split: image + text */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.split--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split__img { width: 100%; max-width: 540px; border-radius: var(--radius); }
.split h2 { margin-bottom: 24px; }
.split .btn { margin-top: 32px; }
@media (max-width: 860px) {
  .split, .split--flip { grid-template-columns: minmax(0, 1fr); }
  .split--flip .split__img { order: -1; }
}

/* Who we work with */
.who { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.who li { border-top: 4px solid var(--yellow); padding-top: 20px; }
.who h3 { font-size: var(--step-2); margin-bottom: 12px; }
.who p { color: var(--muted); }
@media (max-width: 860px) { .who { grid-template-columns: minmax(0, 1fr); } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: 50%; background: var(--yellow); color: var(--black); font-weight: 800; font-size: var(--step-1); }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--muted); }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Service area */
.area { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.area__map { display: block; width: 100%; height: 100%; min-height: 560px; border: 0; background: var(--panel); }
.area__copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 20px; padding: var(--section) var(--gutter) var(--section) clamp(32px, 6vw, 88px); }
.area__copy h2 span { color: var(--yellow); }
.area__copy p { max-width: 34em; color: var(--muted); }
.area__copy strong { color: var(--yellow); font-weight: 600; }
.area__copy .btn { margin-top: 8px; }
@media (max-width: 860px) {
  .area { grid-template-columns: minmax(0, 1fr); }
  .area__map { order: 2; height: 380px; min-height: 0; }
  .area__copy { padding: var(--section) var(--gutter) 40px; }
}

/* Quote */
.quote-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.quote-layout h2 { margin-bottom: 20px; }
.quote-layout .contact-list { margin-top: 32px; }
@media (max-width: 960px) { .quote-layout { grid-template-columns: minmax(0, 1fr); } }

.contact-list li { display: flex; align-items: center; gap: 14px; min-height: 44px; overflow-wrap: anywhere; }
.contact-list .icon { color: var(--yellow); }
.contact-list a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-underline-offset: 3px; }
.contact-list a:hover { color: var(--yellow); }

.quote { padding: clamp(20px, 3.4vw, 40px); background: var(--white); color: var(--black); border-top: 6px solid var(--yellow); border-radius: var(--radius); }
.quote a { color: inherit; }
.quote :focus-visible { outline-color: var(--black); }
.quote__title { font-size: var(--step-2); }
.quote__title:focus { outline: none; }
.quote__hint { margin-top: 8px; color: #444; font-size: 1rem; }
.quote__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.quote__send { width: 100%; margin-top: 24px; }
.quote__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.quote__summary { margin-top: 20px; padding: 14px 16px; border: 2px solid var(--error); border-radius: var(--radius); color: var(--error); font-size: 1rem; }
.quote__summary p { font-weight: 700; }
.quote__summary ul { margin-top: 6px; padding-left: 18px; list-style: disc; }
.quote__status { margin-top: 14px; font-weight: 600; }
.quote__status:empty { display: none; }
.quote__status.is-ok { color: var(--ok); }
.quote__status.is-bad { color: var(--error); overflow-wrap: anywhere; }
@media (max-width: 560px) { .quote__grid { grid-template-columns: minmax(0, 1fr); } }

.field--wide { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 1rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  background: var(--white); color: var(--black);
  border: 1px solid #767676; border-radius: var(--radius);
  font: inherit; font-size: 1rem;
}
.field textarea { resize: vertical; display: block; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--black); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border: 2px solid var(--error); }
.field__error { margin-top: 6px; color: var(--error); font-size: .9375rem; line-height: 1.4; }

/* Inner page heading */
.page-head { padding-block: clamp(48px, 7vw, 96px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: var(--step-3); font-weight: 900; color: var(--yellow); }
.page-head .lead { margin-top: 20px; }

/* Services page */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 14px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 1rem; font-weight: 500; text-decoration: none; }
.jump a:hover { border-color: var(--yellow); color: var(--yellow); }
.detail { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px clamp(32px, 6vw, 88px); padding-block: clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.detail:last-child { border-bottom: 0; }
.detail__title { display: flex; gap: 16px; align-items: flex-start; }
.detail__title .icon { width: 40px; height: 40px; color: var(--yellow); stroke-width: 1.5; }
.detail h2 { font-size: var(--step-2); }
.detail__body > p { color: var(--muted); }
.detail__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; margin-top: 20px; }
.detail__list li { display: flex; gap: 10px; font-size: 1rem; line-height: 1.45; }
.detail__list li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: .45em; background: var(--yellow); }
@media (max-width: 860px) { .detail { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .detail__list { grid-template-columns: minmax(0, 1fr); } }

/* Closing call to action */
.closing { text-align: left; }
.closing__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.closing h2 { max-width: 16em; }

/* Footer */
footer { border-top: 1px solid var(--line); background: var(--panel); }
.site-foot { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(24px, 5vw, 64px); padding-block: 56px 32px; color: var(--muted); }
.site-foot__brand img { width: min(100%, 300px); }
.site-foot__contact-title { margin-top: 32px; color: var(--yellow); font-size: var(--step-1); font-stretch: 100%; font-weight: 600; }
.site-foot__contact { margin-top: 8px; color: var(--white); }
.site-foot__contact li { display: flex; align-items: center; gap: 12px; min-height: 44px; overflow-wrap: anywhere; }
.site-foot__contact .icon { width: 22px; height: 22px; }
.site-foot__contact a { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 .3em; min-height: 44px; text-decoration: none; }
.site-foot__title { margin-bottom: 8px; color: var(--white); font-size: 1rem; font-stretch: 100%; font-weight: 700; }
.site-foot nav a, .site-foot div > a { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.site-foot a:hover { color: var(--yellow); }
.site-foot__legal { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line); font-size: .9375rem; }
@media (max-width: 640px) { .site-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); } .site-foot__brand { grid-column: 1 / -1; } }

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