/* Larkwire Electrical: a wiring diagram. Thin mint lines on deep green, centred and precise. */

:root {
  --night: #07130f;
  --panel: #0d2019;
  --line: #1f4234;
  --mint: #7cf0c0;
  --amber: #ffc94d;
  --white: #f2fbf6;
  --muted: #9bbfb0;

  --bg: var(--night);
  --fg: var(--white);
  --accent: var(--mint);
  --accent-ink: #062016;
  --focus: var(--amber);
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --toggle-radius: 8px;
  --slot-line: rgba(124, 240, 192, .5);

  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;
}

body { font-family: var(--body); font-size: 1.0625rem; }

.heading { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.05; letter-spacing: -.03em; max-width: 18ch; }

.button {
  display: inline-block;
  padding: .9rem 1.5rem;
  border: 0;
  border-radius: 8px;
  background: var(--mint);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(124, 240, 192, .5);
  transition: box-shadow .3s;
}
.button:hover { box-shadow: 0 0 0 6px rgba(124, 240, 192, .25); }
.link { font-weight: 600; text-underline-offset: .3em; }
.link:hover { color: var(--mint); }

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--gutter);
}
.wordmark { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: -.03em; text-decoration: none; }
.wordmark::before { content: ""; display: inline-block; width: .6em; height: .6em; margin-right: .4em; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.2rem); }
.site-nav a { font-weight: 600; text-decoration: none; }
.site-nav a:hover { color: var(--mint); }
.site-nav__cta { padding: .5rem 1rem; border: 1px solid var(--mint); border-radius: 8px; }
@media (max-width: 46rem) { .site-nav__extra { display: none; } }

/* ---------- Hero: centred over the horizon ---------- */

.hero {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 7rem var(--gutter) 5.5rem;
  text-align: center;
}
.hero__shade { background: radial-gradient(ellipse 75% 60% at 50% 50%, rgba(7, 19, 15, .8) 0%, rgba(7, 19, 15, .58) 55%, rgba(7, 19, 15, .15) 100%); }
.hero__content { display: grid; justify-items: center; }
.hero__title { font-family: var(--display); font-weight: 700; font-size: clamp(3.2rem, 10vw, 8.5rem); line-height: .92; letter-spacing: -.045em; }
.hero__after { display: grid; justify-items: center; }
.hero__lede { max-width: 36rem; margin-top: 1.5rem; font-size: 1.15rem; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.25rem 2rem; margin-top: 2rem; }

/* ---------- Emergency strip ---------- */

.urgent { padding: 1rem var(--gutter); background: var(--amber); color: #1d1500; text-align: center; --focus: #1d1500; }
.urgent a { font-weight: 600; white-space: nowrap; }

/* ---------- Services ---------- */

.services { padding-block: clamp(4.5rem, 9vw, 8rem); }
.services__head { display: grid; gap: 2rem; }
@media (min-width: 58rem) { .services__head { grid-template-columns: 1fr auto; align-items: end; } }

.readout { display: flex; flex-wrap: wrap; gap: .75rem 2rem; color: var(--muted); }
.readout strong { display: block; font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--mint); font-variant-numeric: tabular-nums; }

.cards { display: grid; gap: 1px; margin-top: 3rem; border: 1px solid var(--line); background: var(--line); perspective: 1400px; }
@media (min-width: 40rem) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 70rem) { .cards { grid-template-columns: repeat(4, 1fr); } }

.card {
  display: grid;
  gap: .9rem;
  align-content: start;
  padding: 2rem 1.6rem;
  background: var(--night);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .2s ease-out, background-color .3s;
}
.card:hover { background: var(--panel); }
.card__icon { width: 3rem; height: 3rem; fill: none; stroke: var(--mint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-family: var(--display); font-weight: 700; font-size: 1.45rem; line-height: 1.15; letter-spacing: -.02em; }
.card p { color: var(--muted); }
.card .card__price { margin-top: .5rem; color: var(--amber); font-weight: 600; }

/* ---------- Lights on: stacked by default, pinned when motion is welcome ---------- */

.lights { background: var(--panel); border-block: 1px solid var(--line); }
.lights__stage { display: grid; gap: 2rem; padding: clamp(4.5rem, 9vw, 8rem) var(--gutter); }

.house { width: min(100%, 44rem); margin-inline: auto; }
.house__line { fill: none; stroke: #3d6b5a; stroke-width: 2; }
.house__wire { fill: none; stroke: var(--mint); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.house__mark { fill: none; stroke: var(--night); stroke-width: 2; }
.house__glow { fill: var(--mint); opacity: .16; }
.z1 rect, .z4 rect, .z4 path:not(.house__wire) { fill: var(--mint); }
.z3 rect, .z3 path { fill: var(--amber); }
.zone { transition: opacity .7s; }

.phases { display: grid; gap: 2rem; max-width: 40rem; margin-inline: auto; counter-reset: phase; }
.phase { counter-increment: phase; }
.phase h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.1; letter-spacing: -.02em; }
.phase h3::before { content: counter(phase) " of 4"; display: block; margin-bottom: .4rem; font-family: var(--body); font-size: .95rem; font-weight: 600; letter-spacing: 0; color: var(--mint); }
.phase p { margin-top: .6rem; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  html.js .lights { height: 400vh; }
  html.js .lights__stage {
    position: sticky;
    top: 0;
    grid-template-rows: auto 1fr auto;
    height: 100vh;
    height: 100svh;
    padding-block: clamp(2.5rem, 7vh, 4.5rem);
    overflow: hidden;
    text-align: center;
  }
  html.js .lights__title { margin-inline: auto; }
  html.js .house { height: 100%; min-height: 0; width: auto; max-width: 100%; }

  html.js .zone { opacity: .07; }
  html.js .lights[data-active] .z1,
  html.js .lights[data-active="1"] .z2, html.js .lights[data-active="2"] .z2, html.js .lights[data-active="3"] .z2,
  html.js .lights[data-active="2"] .z3, html.js .lights[data-active="3"] .z3,
  html.js .lights[data-active="3"] .z4 { opacity: 1; }

  html.js .phases { position: relative; display: block; width: 100%; min-height: 11.5rem; }
  html.js .phase { position: absolute; inset: 0; opacity: 0; transform: translateY(1.5rem); transition: opacity .5s, transform .5s cubic-bezier(.2, .7, .2, 1); }
  html.js .phase.is-active { opacity: 1; transform: none; }
}

/* ---------- Proof ---------- */

.proof { padding-block: clamp(4.5rem, 9vw, 8rem); }
.proof__grid { display: grid; gap: 3rem clamp(2rem, 6vw, 6rem); align-items: center; }
@media (min-width: 58rem) { .proof__grid { grid-template-columns: 1.3fr 1fr; } }
.quote__flag { display: inline-block; padding: .2rem .7rem; border: 1px solid var(--mint); border-radius: 8px; color: var(--mint); font-size: .85rem; font-weight: 600; }
.quote blockquote { margin-top: 1.1rem; font-family: var(--display); font-weight: 500; font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.2; letter-spacing: -.02em; }
.quote figcaption { margin-top: 1rem; color: var(--muted); }
.badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.badges .slot { aspect-ratio: 3 / 2; border-radius: 8px; background: var(--panel); }
.badges .slot__label { font-size: .75rem; }

/* ---------- Quote form ---------- */

.quote-form { padding-block: clamp(4.5rem, 9vw, 8rem); background: var(--white); color: var(--night); --focus: #0b5c3f; }
.quote-form__grid { display: grid; gap: 3rem clamp(2rem, 6vw, 6rem); }
@media (min-width: 56rem) { .quote-form__grid { grid-template-columns: 1fr 1.1fr; } }
.quote-form__text { max-width: 28rem; margin-top: 1.25rem; }
.quote-form__text a { font-weight: 600; }

.form { display: grid; gap: 1.1rem; }
.form .button { justify-self: start; background: var(--night); color: var(--mint); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips legend { width: 100%; margin-bottom: .5rem; font-weight: 600; }
.chips input { position: absolute; opacity: 0; }
.chips span { display: block; padding: .6rem 1rem; border: 2px solid var(--night); border-radius: 8px; font-weight: 600; cursor: pointer; }
.chips input:checked + span { background: var(--night); color: var(--mint); }
.chips input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }

.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; }
.field input { width: 100%; min-height: 3.1rem; padding: .7rem .9rem; border: 2px solid #46615a; border-radius: 8px; background: #fff; }
.form__status { min-height: 1.6em; font-weight: 600; color: #0b5c3f; }

/* ---------- Footer ---------- */

.site-footer { padding-block: 2.5rem 6.5rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 1rem; }
.site-footer p { max-width: 36rem; }
