/* Bright Spark Electrical: "Labelled and Clear"
   Yellow = a label. Blue = switched on, or something you can press. */

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #14212e;
  --muted: #556372;
  --accent: #0b57d0;
  --tape: #ffc94a;
  --rule: #cdd5dd;
  --off: #9aa6b2;
  --head: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  padding-bottom: 76px; /* room for the phone bar */
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-family: var(--head); margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.625rem); line-height: 1.08; font-weight: 700; }
h3 { font-size: 1.1875rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.dark a:focus-visible, .dark .btn:focus-visible, .callbar a:focus-visible { outline-color: var(--tape); }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 20;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 4px;
}
.skip:focus { top: 12px; }

.wrap { max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }

.grid { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 28px; }

/* label tape */
.tape {
  display: inline-block;
  background: var(--tape);
  color: var(--ink);
  font-family: var(--head);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  padding: 6px 9px 5px;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

/* breaker switch, sized in em */
.switch {
  display: inline-block;
  flex: none;
  position: relative;
  width: 0.5em;
  height: 0.84em;
  border: max(2px, 0.05em) solid var(--ink);
  border-radius: max(3px, 0.09em);
  background: var(--surface);
}
.switch::after {
  content: "";
  position: absolute;
  left: 12%; right: 12%; top: 6%;
  height: 44%;
  border-radius: max(2px, 0.04em);
  background: var(--accent);
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px;
  padding: 12px 22px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  font-family: var(--head);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-call { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-call:hover { background: #0947ad; border-color: #0947ad; }
.btn-line { background: var(--surface); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-tape { background: var(--tape); border-color: var(--tape); color: var(--ink); }
.btn-tape:hover { background: #ffd775; border-color: #ffd775; }
.btn-ghost { background: transparent; border-color: #fff; color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* header */
.top { border-bottom: 1px solid var(--rule); background: var(--bg); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { display: block; color: var(--ink); flex: none; }
.brand svg { width: 169px; height: 38px; }
.nav { display: none; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1rem;
  padding: 8px 0; border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--accent); }
.top-call {
  font-family: var(--head); font-weight: 600; color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 8px 0;
}
.top-call svg { width: 18px; height: 18px; color: var(--accent); }
.top-call .num { display: none; }

/* hero */
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(48px, 7vw, 96px); }
.hero h1 {
  font-size: clamp(2.1rem, 9.6vw, 6.75rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.hero .line { display: flex; align-items: center; gap: 0.3em; padding-block: 0.09em; }
.hero .line + .line { border-top: 1px solid var(--rule); }
.hero-foot { margin-top: clamp(28px, 4vw, 48px); row-gap: 24px; }
.lede { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); line-height: 1.5; max-width: 36em; margin: 0; }
.hero .actions .btn { flex: 1 1 100%; }
.hours-line { margin: 14px 0 0; color: var(--muted); font-size: 0.9375rem; }

@media (prefers-reduced-motion: no-preference) {
  .hero .switch::after { animation: lever-on 0.38s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
  .hero .line .say { animation: say-on 0.38s ease-out both; }
  .hero .line:nth-child(1) .switch::after, .hero .line:nth-child(1) .say { animation-delay: 0.35s; }
  .hero .line:nth-child(2) .switch::after, .hero .line:nth-child(2) .say { animation-delay: 0.8s; }
  .hero .line:nth-child(3) .switch::after, .hero .line:nth-child(3) .say { animation-delay: 1.25s; }
}
@keyframes lever-on { from { transform: translateY(100%); background: #9aa6b2; } }
@keyframes say-on { from { color: #8a96a3; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* sections */
.band { border-top: 1px solid var(--rule); padding-block: clamp(56px, 8vw, 112px); }
.band-head p { color: var(--muted); max-width: 30em; margin-top: 14px; }

/* the board */
.board {
  list-style: none; margin: clamp(28px, 4vw, 48px) 0 0; padding: 0;
  display: grid; grid-template-columns: minmax(0, 1fr);
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
}
.module {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "id text";
  column-gap: 18px;
  padding: 20px 18px;
  border-top: 1px solid var(--rule);
}
.module:first-child { border-top: 0; }
.module-id { grid-area: id; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.module-id .switch { font-size: 44px; }
.module-text { grid-area: text; }
.module-text p { margin: 6px 0 0; font-size: 1rem; line-height: 1.5; color: var(--muted); }
.module-call { background: var(--accent); color: #fff; border-top-color: var(--accent); }
.module-call .module-text p { color: #fff; }
.module-call .switch { border-color: #fff; background: transparent; }
.module-call .switch::after { background: var(--tape); }
.module-call a { color: #fff; font-family: var(--head); font-weight: 700; font-size: 1.1875rem; white-space: nowrap; display: inline-block; margin-top: 10px; padding-block: 6px; }
.module-call a:focus-visible { outline-color: var(--tape); }

/* how it works: one line, four connections */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.steps li { position: relative; border-left: 2px solid var(--ink); padding: 0 0 30px 26px; }
.steps li:last-child { padding-bottom: 0; border-left-color: transparent; }
.steps li::before {
  content: ""; position: absolute; left: -9px; top: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--ink);
}
.steps li:last-child::before { background: var(--accent); border-color: var(--accent); }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 1rem; line-height: 1.5; max-width: 28em; }

/* about */
.prose { max-width: 38em; }
.prose p { font-size: 1.125rem; }
.quote {
  position: relative; margin: 36px 0 0; overflow: hidden;
  border: 2px solid var(--ink); border-radius: 6px;
  background: #eef8ee;
}
.quote img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.quote blockquote { position: relative; margin: 0; padding: clamp(24px, 4vw, 48px) clamp(18px, 4vw, 48px) clamp(24px, 4vw, 48px) 21%; }
.quote blockquote p {
  font-family: var(--head); font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(1.3rem, 1rem + 1.6vw, 2.125rem); line-height: 1.18; margin-bottom: 0.6em;
}
.quote figcaption { position: relative; padding: 0 clamp(18px, 4vw, 48px) clamp(24px, 4vw, 40px) 21%; font-size: 0.9375rem; color: #3d4a57; }

/* before and after */
.frames { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.frame { margin: 0; }
.frame-box { aspect-ratio: 3 / 2; background: var(--surface); border: 1px solid var(--ink); border-radius: 4px; overflow: hidden; }
.frame-box svg { width: 100%; height: 100%; }
.frame figcaption { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; font-size: 1rem; line-height: 1.45; }
.frame figcaption .tape { flex: none; }
.note { margin-top: 24px; color: var(--muted); font-size: 0.9375rem; max-width: 40em; }
.dg { font-family: var(--head); font-weight: 600; font-size: 14px; }

/* spec sheet */
.spec { margin: 0; background: var(--surface); border: 2px solid var(--ink); border-radius: 6px; }
.spec-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 14px 18px; border-top: 1px solid var(--rule); }
.spec-row:first-child { border-top: 0; }
.spec dt { font-size: 0.9375rem; color: var(--muted); }
.spec dd { margin: 0; font-family: var(--head); font-weight: 600; font-size: 1.125rem; line-height: 1.35; }
.spec dd span { display: block; }
.spec dd small { display: block; font-family: var(--body); font-weight: 400; font-size: 0.9375rem; color: var(--muted); margin-top: 2px; }
.spec dd a { display: inline-block; padding-block: 4px; }
.socket { display: none; width: 180px; margin-top: 40px; }

/* closing band and footer */
.dark { background: var(--ink); color: #fff; }
.close { padding-block: clamp(56px, 8vw, 112px); }
.close h2 { font-size: clamp(2rem, 1.2rem + 3.6vw, 4rem); letter-spacing: -0.03em; }
.close p { color: #d3dae1; max-width: 32em; margin: 18px 0 28px; font-size: 1.125rem; }
.close p a { color: #fff; }
.close .actions .btn { flex: 1 1 100%; }
.foot { border-top: 1px solid #34424f; padding-block: 28px; }
.foot-in { display: flex; flex-direction: column; gap: 18px; }
.foot .brand { color: #fff; }
.foot p { margin: 0; color: #c5ced8; font-size: 0.9375rem; }

/* phone bar */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--ink);
}
.callbar .btn { min-height: 48px; padding: 8px 10px; font-size: 1rem; }

@media (min-width: 560px) {
  .hero .actions .btn, .close .actions .btn { flex: 0 0 auto; }
  .top-call .num { display: inline; }
  .top-call .word { display: none; }
  .spec-row { grid-template-columns: 9.5rem minmax(0, 1fr); gap: 20px; align-items: baseline; padding: 16px 24px; }
  .frames { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module { border-left: 1px solid var(--rule); margin-left: -1px; }
  .module:nth-child(2) { border-top: 0; }
  .module-call { border-left-color: var(--accent); }
}

@media (min-width: 760px) {
  body { padding-bottom: 0; }
  .callbar { display: none; }
  .foot-in { flex-direction: row; align-items: center; justify-content: space-between; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps li, .steps li:last-child { border-left: 0; border-top: 2px solid var(--ink); padding: 26px 24px 0 0; }
  .steps li:last-child { border-top-color: var(--ink); }
  .steps li::before { left: 0; top: -9px; }
}

@media (min-width: 940px) {
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
  .c-1-4 { grid-column: 1 / span 4; }
  .c-5-12 { grid-column: 5 / span 8; }
  .c-1-7 { grid-column: 1 / span 7; }
  .c-8-12 { grid-column: 8 / span 5; align-self: end; }
  .c-all { grid-column: 1 / -1; }
  .nav { display: flex; gap: 28px; }
  .brand svg { width: 196px; height: 44px; }
  .hero-foot .actions { justify-content: flex-end; }
  .hours-line { text-align: right; }
  .socket { display: block; }
  .board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .module { grid-template-columns: minmax(0, 1fr); grid-template-areas: "id" "text"; row-gap: 22px; padding: 24px 20px 28px; align-content: start; }
  .module:nth-child(3) { border-top: 0; }
  .module-id { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .module-id .switch { font-size: 56px; }
}

@media (min-width: 1180px) {
  .board { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .module { border-top: 0; min-height: 300px; }
}
