/* Saveroz: one stylesheet for every page.
   "Lights on" is the default look; lights.js sets data-lights="off" on <html>. */

/* Archivo (variable width and weight, latin subset), served from this site so
   no visitor data goes to a font CDN. SIL Open Font License. */
@font-face {
  font-family: Archivo;
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(/fonts/archivo-latin.woff2) format("woff2");
}

:root {
  --wall: #e8ecef;
  --surface: #f6f8f9;
  --ink: #17212b;
  --muted: #4c5a67;
  --line: #c3ccd3;
  --lamp: #f5b53d;
  --cta-bg: var(--ink);
  --cta-fg: #f6f8f9;
  --plate: #fbfcfc;
  --plate-edge: #cdd5db;
  --rocker: #eff2f4;
  --shade: rgb(23 33 43 / 0.32);
  --focus: var(--ink);
  color-scheme: light;
}

:root[data-lights="off"] {
  --wall: #111923;
  --surface: #18222e;
  --ink: #e7ecf0;
  --muted: #9fb0bf;
  --line: #2d3b4a;
  --lamp: #f7c257;
  --cta-bg: var(--lamp);
  --cta-fg: #111923;
  --plate: #1d2936;
  --plate-edge: #34434f;
  --rocker: #253341;
  --shade: rgb(0 0 0 / 0.55);
  --focus: var(--lamp);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 400 1.125rem/1.6 Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
address {
  margin: 0;
}

address {
  font-style: normal;
}

h1,
h2,
h3 {
  font-stretch: 125%;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 5.4vw, 4.25rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 750;
}

h3 {
  font-size: 1.3125rem;
  font-stretch: 112%;
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.wrap {
  width: min(100% - 2.5rem, 70rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--cta-bg);
  color: var(--cta-fg);
  padding: 0.5rem 0.9rem;
  border-radius: 0.3rem;
}

.skip:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.375rem;
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

/* The logo mark, drawn with the theme colours so it inverts when the lights go off.
   Same proportions as favicon.svg: lamp dot, rocker, square. */
.wordmark::before {
  content: "";
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.35rem;
  background:
    radial-gradient(circle at 50% 67.2%, var(--lamp) 0 0.09rem, transparent 0.1rem),
    linear-gradient(var(--wall), var(--wall)) center / 31.25% 62.5% no-repeat,
    var(--ink);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  font-size: 1rem;
}

.site-nav a {
  text-decoration: none;
  padding-block: 0.25rem;
}

.site-nav a:hover {
  text-decoration: underline;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3rem 5rem;
  padding-block: clamp(2.5rem, 7vw, 6rem) clamp(3rem, 8vw, 7rem);
}

.hero h1 {
  max-width: 17ch;
}

.hero-lede {
  max-width: 34rem;
  margin-top: 1.75rem;
  font-size: 1.3125rem;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-block;
  background: var(--cta-bg);
  color: var(--cta-fg);
  padding: 0.85rem 1.4rem;
  border-radius: 0.4rem;
  font-weight: 650;
  text-decoration: none;
}

.btn:hover {
  text-decoration: underline;
}

/* The wall switch */

.switch {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
}

.plate {
  position: relative;
  display: grid;
  place-items: center;
  width: 9.5rem;
  height: 15rem;
  background: var(--plate);
  border: 1px solid var(--plate-edge);
  border-radius: 0.8rem;
  box-shadow: 0 1.5rem 2rem -1.25rem var(--shade);
}

.plate::before,
.plate::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0.7rem;
  height: 0.7rem;
  margin-left: -0.35rem;
  border: 1px solid var(--plate-edge);
  border-radius: 50%;
  background: linear-gradient(90deg, transparent 42%, var(--plate-edge) 42% 58%, transparent 58%), var(--rocker);
}

.plate::before {
  top: 0.9rem;
  transform: rotate(24deg);
}

.plate::after {
  bottom: 0.9rem;
  transform: rotate(-38deg);
}

.rocker {
  position: relative;
  width: 4rem;
  height: 7.5rem;
  padding: 0;
  appearance: none;
  background: var(--rocker);
  border: 1px solid var(--plate-edge);
  border-radius: 0.45rem;
  cursor: pointer;
  /* up = on: the top half is pressed in */
  transform: perspective(18rem) rotateX(13deg);
  box-shadow: 0 0.5rem 0.5rem -0.3rem var(--shade), inset 0 0.4rem 0.5rem -0.35rem var(--shade);
}

.rocker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.75rem;
  width: 0.4rem;
  height: 0.4rem;
  margin-left: -0.2rem;
  border-radius: 50%;
  background: var(--line);
}

:root[data-lights="off"] .rocker {
  transform: perspective(18rem) rotateX(-13deg);
  box-shadow: 0 -0.5rem 0.5rem -0.3rem var(--shade), inset 0 -0.4rem 0.5rem -0.35rem var(--shade);
}

/* Real rocker switches glow when they are off, so you can find them in the dark. */
:root[data-lights="off"] .rocker::after {
  background: var(--lamp);
  box-shadow: 0 0 0.5rem 0.15rem rgb(247 194 87 / 0.7), 0 0 3rem 0.9rem rgb(247 194 87 / 0.22);
}

.plate-note {
  max-width: 13.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.45;
  text-align: center;
}

/* Sections */

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section-intro {
  max-width: 38rem;
  margin-top: 1rem;
  color: var(--muted);
}

.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem 4.5rem;
  margin-top: 2.5rem;
}

.two p {
  margin-top: 0.75rem;
}

.two ul {
  margin-top: 1rem;
  padding-left: 1.1em;
}

.two li + li {
  margin-top: 0.4rem;
}

/* Prices, laid out like the circuit directory inside a breaker panel door */

.price-list {
  margin-top: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, auto);
  gap: 0.75rem 3rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--line);
}

.price-row p {
  max-width: 37rem;
  margin-top: 0.6rem;
}

.price {
  text-align: right;
}

.price strong {
  display: block;
  font-size: 2rem;
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.price span {
  color: var(--muted);
  font-size: 1rem;
}

.price-note {
  max-width: 38rem;
  margin-top: 1.5rem;
  color: var(--muted);
}

/* Steps: a real sequence, so it is numbered */

.steps {
  display: grid;
  gap: 1.5rem;
  max-width: 44rem;
  margin-top: 2.5rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0 1rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  font-size: 1.5rem;
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1.2;
}

.steps strong {
  display: block;
  font-weight: 650;
}

.steps span {
  color: var(--muted);
}

/* Contact */

.contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 4.5rem;
  margin-top: 2rem;
}

.contact-email {
  font-size: clamp(1.5rem, 3.4vw, 2.25rem);
  font-stretch: 125%;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.contact p + p {
  margin-top: 0.75rem;
}

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2.5rem;
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

/* Legal pages */

.legal {
  max-width: 40rem;
  padding-block: clamp(2rem, 5vw, 4rem) 5rem;
}

.legal h1 {
  font-size: clamp(2rem, 4.2vw, 3rem);
}

.legal h2 {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: 1.75rem;
  scroll-margin-top: 1rem;
}

.legal h3 {
  margin-top: 2rem;
}

.legal p,
.legal ul {
  margin-top: 0.9rem;
}

.legal ul {
  padding-left: 1.1em;
}

.legal li + li {
  margin-top: 0.35rem;
}

.legal .updated {
  color: var(--muted);
}

@media (max-width: 47.99rem) {
  .hero,
  .two,
  .contact,
  .price-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .price {
    text-align: left;
  }

  .switch {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-items: start;
  }

  .plate {
    width: 6.5rem;
    height: 10.5rem;
  }

  .rocker {
    width: 2.9rem;
    height: 5.4rem;
  }

  .plate-note {
    text-align: left;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  body {
    transition: background-color 0.35s ease, color 0.35s ease;
  }

  .plate,
  .rocker {
    transition: transform 0.16s ease-out, box-shadow 0.16s ease-out, background-color 0.35s ease, border-color 0.35s ease;
  }
}
