/* CALDER ELECTRICAL v2 — "the live wire". Schematic spine, lights-on flip, annotated layout. */
:root {
  --bg: #F4F1ED;
  --ink: #1A1A18;
  --orange: #E8500A;
  --grey: #6B6B68;
  --surface: #FFFFFF;
  --shadow: 0 2px 10px rgba(26, 26, 24, 0.08);
  --disp: "Cabinet Grotesk", sans-serif;
  --body: "Outfit", sans-serif;
  --spring: cubic-bezier(0.34, 1.3, 0.5, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --gut: clamp(20px, 4vw, 48px);
  --spine-x: clamp(18px, 7.5vw, 130px);
  --content-x: clamp(52px, 17vw, 300px);
  --wire-grey: rgba(107, 107, 104, 0.35);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light; }
html, body { overflow-x: clip; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--body); font-weight: 400;
  font-size: clamp(17px, 1.05vw, 18px); line-height: 1.55;
}
::selection { background: var(--orange); color: var(--surface); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3 { font-family: var(--disp); font-weight: 800; line-height: 1.04; letter-spacing: -0.01em; text-wrap: pretty; }
h1 { font-size: clamp(2.75rem, 7vw, 5.75rem); }
h2 { font-size: clamp(1.875rem, 3.6vw, 2.75rem); }
.sub { color: var(--grey); font-size: 1.125rem; max-width: 44ch; text-wrap: pretty; }
h2 + .sub { margin-top: 12px; }
.anno {
  display: block; font-size: 0.8125rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey);
}
.anno b { color: var(--orange); font-weight: 500; }
h2 ~ .anno, .anno + h2 { margin-top: 0; }
.anno + h2 { margin-top: 14px; }

/* left-anchored column: asymmetric, hangs off the wire */
.col { padding-left: var(--content-x); padding-right: var(--gut); max-width: calc(var(--content-x) + 64rem); }
.section { position: relative; padding-top: clamp(72px, 9vw, 130px); padding-bottom: clamp(72px, 9vw, 130px); }

/* the spine: one wire down the whole page; whole composition centers as a block */
main { position: relative; max-width: 86rem; margin: 0 auto; }
.spine { position: absolute; top: 0; bottom: 0; left: var(--spine-x); width: 2px; background: var(--wire-grey); z-index: 4; pointer-events: none; }
.node {
  position: absolute; left: calc(var(--spine-x) + 1px); width: 11px; height: 11px;
  transform: translateX(-50%); border-radius: 50%;
  background: var(--bg); border: 2px solid var(--grey); z-index: 5; pointer-events: none;
}

.skip { position: absolute; left: var(--gut); top: -48px; z-index: 90; background: var(--ink); color: var(--bg); padding: 10px 16px; font-weight: 500; text-decoration: none; transition: top 0.15s ease-out; }
.skip:focus-visible { top: 12px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 13px 26px; border-radius: 8px; border: 1px solid transparent;
  font-weight: 500; font-size: 1.0625rem; text-decoration: none; cursor: pointer; white-space: nowrap;
}
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform 0.14s var(--spring), background-color 0.14s ease-out; }
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--orange); color: #FDF8F4; box-shadow: var(--shadow); }
.btn-primary:hover { background: #D44704; }
.btn-ghost { color: var(--ink); border-color: rgba(26, 26, 24, 0.25); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.textlink { color: var(--orange); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* nav: slim utility bar, flips with the lights */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-left: max(var(--spine-x), calc((100vw - 86rem) / 2 + var(--spine-x)));
  padding-right: max(var(--gut), calc((100vw - 86rem) / 2 + var(--gut)));
  color: var(--ink); background: rgba(244, 241, 237, 0.95);
  transition: color 0.8s ease, background-color 0.8s ease, border-color 0.3s ease-out;
  border-bottom: 1px solid transparent;
}
html.off .nav { color: var(--bg); background: rgba(26, 26, 24, 0.95); }
.nav.scrolled { border-bottom-color: rgba(107, 107, 104, 0.3); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--disp); font-weight: 800; font-size: 1.1875rem; text-decoration: none; color: inherit; white-space: nowrap; }
.logo svg { color: var(--orange); }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 28px); }
.nav-links a.anchor {
  font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: inherit; text-decoration: none; border-bottom: 2px solid transparent; padding: 3px 0;
  transition: border-color 0.12s ease-out; white-space: nowrap;
}
.nav-links a.anchor:hover { border-bottom-color: var(--orange); }
.nav-phone { font-family: var(--disp); font-weight: 700; font-size: 1.0625rem; color: inherit; text-decoration: none; white-space: nowrap; }
.nav-phone:hover { color: var(--orange); }
.nav .btn { min-height: 42px; padding: 8px 18px; font-size: 0.9375rem; }
@media (max-width: 860px) { .nav-links a.anchor, .nav-phone { display: none; } }

/* S1 hero: copy and breaker live ON the banner photo; the switch lights the room */
.hero { position: relative; min-height: clamp(560px, 96dvh, 920px); display: flex; flex-direction: column; padding-top: 64px; overflow: hidden; background: #1A1A18; }
.hero-photo { position: absolute; inset: 0; z-index: 0; }
.hero-photo image-slot { position: absolute; inset: 0; width: 100%; height: 100%; transition: filter 0.8s ease; }
html.off .hero-photo image-slot { filter: brightness(0.28) saturate(0.55); }
/* cross-fading scrims keep the copy legible in both states */
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; transition: opacity 0.8s ease; }
.hero::after { background: linear-gradient(100deg, rgba(244, 241, 237, 0.96) 0%, rgba(244, 241, 237, 0.82) 36%, rgba(244, 241, 237, 0.1) 70%); opacity: 1; }
.hero::before { background: linear-gradient(100deg, rgba(26, 26, 24, 0.88) 0%, rgba(26, 26, 24, 0.6) 40%, rgba(26, 26, 24, 0.2) 72%); opacity: 0; }
html.off .hero::after { opacity: 0; }
html.off .hero::before { opacity: 1; }
.hero-copy { position: relative; z-index: 7; flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: clamp(48px, 7vh, 80px); padding-bottom: clamp(56px, 9vh, 110px); color: var(--ink); transition: color 0.8s ease; }
.hero-head { position: relative; }
html.off .hero-copy { color: var(--bg); }
.hero .anno { margin-bottom: 22px; }
html.off .hero .anno { color: rgba(244, 241, 237, 0.55); }
.hero h1 { max-width: none; }
.hero .sub { margin-top: 22px; max-width: 36ch; transition: color 0.8s ease; }
html.off .hero .sub { color: rgba(244, 241, 237, 0.6); }
.hero .ctas { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; margin-top: 34px; }
html.off .hero .btn-ghost { color: var(--bg); border-color: rgba(244, 241, 237, 0.35); }

/* the breaker on the wire, beside the headline */
.breaker {
  position: absolute; left: calc(var(--spine-x) - var(--content-x) + 1px); top: 0;
  transform: translateX(-50%); z-index: 6;
  width: 44px; height: 64px; border-radius: 8px;
  background: var(--bg); border: 2px solid var(--ink);
  cursor: pointer; display: flex; align-items: flex-start; justify-content: center;
  padding: 5px;
  transition: background-color 0.8s ease, border-color 0.8s ease;
}
/* recessed track the lever travels in */
.breaker::before {
  content: ""; position: absolute; inset: 5px; border-radius: 5px;
  background: rgba(26, 26, 24, 0.08); transition: background-color 0.8s ease;
}
html.off .breaker { background: #1A1A18; border-color: rgba(244, 241, 237, 0.6); }
html.off .breaker::before { background: rgba(244, 241, 237, 0.1); }
.breaker .lever {
  position: relative; z-index: 1;
  width: 16px; height: 24px; border-radius: 4px; background: var(--orange);
  transform: translateY(26px);
}
@media (prefers-reduced-motion: no-preference) {
  .breaker .lever { transition: transform 0.22s var(--spring), background-color 0.3s ease; }
}
html.off .breaker .lever { transform: translateY(26px); background: var(--grey); }
html.on .breaker .lever, html:not(.off):not(.on) .breaker .lever { transform: translateY(0); }
/* label lives below the housing so the lever never covers it */
.breaker .b-label {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  font-size: 0.5625rem; font-weight: 500; letter-spacing: 0.14em; color: var(--grey);
  transition: color 0.8s ease;
}
html.off .breaker .b-label { color: rgba(244, 241, 237, 0.6); }
/* energized segment below the switch */
.hero-spark {
  position: absolute; left: calc(var(--spine-x) - var(--content-x)); top: 74px; height: clamp(120px, 26vh, 260px);
  width: 2px; background: var(--orange); transform-origin: top center; transform: scaleY(0); z-index: 5;
}
@media (prefers-reduced-motion: no-preference) {
  html.on .hero-spark { transition: transform 0.7s var(--ease-out) 0.1s; }
}
html.on .hero-spark, html:not(.off):not(.on) .hero-spark { transform: scaleY(1); }

/* signature mask reveal, fires when the lights come on */
.hero h1 .mask { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  html.off .hero h1 .mask { clip-path: inset(-5% 100% -5% 0); }
  html.on .hero h1 .mask { animation: breaker-on 0.9s var(--ease-out) 0.15s backwards; }
  html.off .hero .sub, html.off .hero .ctas { opacity: 0; }
  html.on .hero .sub, html.on .hero .ctas { animation: fade-up 0.5s var(--ease-out) 0.75s backwards; }
  @keyframes breaker-on { from { clip-path: inset(-5% 100% -5% 0); } to { clip-path: inset(-5% -2% -5% 0); } }
  @keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* job-note caption on the photo */
.hero .caption {
  position: absolute; right: 0; bottom: clamp(18px, 3vw, 34px); z-index: 7; white-space: nowrap;
  background: var(--bg); color: var(--ink); padding: 10px var(--gut) 10px 18px;
  border-radius: 8px 0 0 8px; transition: background-color 0.8s ease;
}
.hero .caption .anno { color: var(--grey); }
html.off .hero .caption { background: #232120; }
html.off .hero .caption .anno { color: rgba(244, 241, 237, 0.7); }
@media (max-width: 700px) { .hero .caption { display: none; } }

/* S3 trust strip on a branch rule */
.trust { padding-top: clamp(56px, 7vw, 96px); padding-bottom: clamp(40px, 5vw, 72px); }
.trust .col { display: flex; flex-wrap: wrap; align-items: center; gap: 24px clamp(36px, 6vw, 96px); }
.badge { display: inline-flex; align-items: center; gap: 13px; color: var(--ink); }
.badge svg { flex: 0 0 auto; }
.badge .b-txt { display: flex; flex-direction: column; line-height: 1.25; }
.badge .b-top { font-family: var(--disp); font-weight: 700; font-size: 1.0625rem; }
.badge .b-sub { font-size: 0.875rem; color: var(--grey); }
.badge .stars { color: var(--orange); letter-spacing: 2px; font-size: 0.95rem; }

/* S4 services: numbered circuit index, no cards */
.svc-list { margin-top: clamp(30px, 4vw, 48px); border-bottom: 1px solid var(--wire-grey); }
.svc-row {
  display: grid; grid-template-columns: clamp(64px, 8vw, 110px) 1fr auto;
  gap: 8px clamp(18px, 3vw, 40px); align-items: center;
  border-top: 1px solid var(--wire-grey); padding: clamp(20px, 2.6vw, 30px) 0;
  transition: transform 0.14s ease-out;
}
.svc-num { font-family: var(--disp); font-weight: 800; font-size: clamp(1.75rem, 3.4vw, 2.75rem); color: rgba(26, 26, 24, 0.16); transition: color 0.14s ease-out; }
.svc-row h3 { font-size: clamp(1.25rem, 2vw, 1.625rem); }
.svc-row p { color: var(--grey); font-size: 1rem; max-width: 52ch; margin-top: 4px; }
.svc-row svg { color: var(--orange); }
@media (hover: hover) {
  .svc-row:hover { transform: translateX(4px); }
  .svc-row:hover .svc-num { color: var(--orange); }
}
@media (max-width: 640px) {
  .svc-row { grid-template-columns: clamp(48px, 12vw, 64px) 1fr; }
  .svc-row svg { display: none; }
}

/* S5 how it works: junction boxes on the energized wire */
.how .col { max-width: calc(var(--content-x) + 46rem); }
.how-fill {
  position: absolute; left: var(--spine-x); top: 0; height: 100%; width: 2px;
  background: var(--orange); transform-origin: top center; transform: scaleY(var(--p, 0)); z-index: 5; pointer-events: none;
}
.steps { display: flex; flex-direction: column; gap: clamp(52px, 8vh, 96px); margin-top: clamp(36px, 5vw, 64px); }
.step { position: relative; }
.step .node-step {
  position: absolute; left: calc(var(--spine-x) - var(--content-x) + 1px); top: 4px;
  transform: translateX(-50%); width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--grey);
  transition: border-color 0.25s ease-out, background-color 0.25s ease-out;
}
.step.lit .node-step { border-color: var(--orange); background: var(--orange); }
.step .s-num { font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); }
.step h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-top: 6px; }
.step p { color: var(--grey); margin-top: 8px; max-width: 46ch; }

/* S6 quotes: plain staggered text, no cards */
.quotes { margin-top: clamp(36px, 5vw, 64px); display: flex; flex-direction: column; gap: clamp(44px, 6vw, 72px); }
.quote { max-width: 46ch; }
.quote blockquote { font-family: var(--disp); font-weight: 700; font-size: clamp(1.375rem, 2.6vw, 1.875rem); line-height: 1.25; text-wrap: pretty; }
.quote .attr { margin-top: 12px; }
.quote:nth-child(2) { align-self: flex-start; margin-left: clamp(0px, 12vw, 200px); }
.quote:nth-child(3) { margin-left: clamp(0px, 5vw, 80px); }
.quotes-foot { margin-top: clamp(36px, 5vw, 56px); }

/* S7 about: photo with annotation tab */
.about-grid { display: grid; grid-template-columns: 6fr 6fr; gap: clamp(28px, 5vw, 72px); align-items: center; margin-top: clamp(30px, 4vw, 48px); }
.about-grid .pic { position: relative; aspect-ratio: 4 / 3.4; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.about-grid .pic image-slot { width: 100%; height: 100%; }
.about-grid .pic .anno { position: absolute; left: 0; bottom: 16px; background: var(--bg); padding: 8px 14px; border-radius: 0 6px 6px 0; z-index: 2; }
.about-grid .txt p { margin-top: 16px; color: var(--grey); max-width: 50ch; }
.about-grid .txt p strong { color: var(--ink); font-weight: 500; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }

/* S8 conversion block: lights off again, an inset panel so the centered block reads intentional */
.convert { background: var(--ink); color: var(--bg); border-radius: 20px; margin-bottom: 28px; }
.convert .node { background: var(--orange); border-color: var(--orange); }
.convert .sub { color: rgba(244, 241, 237, 0.65); }
.convert-grid { display: grid; grid-template-columns: 6fr 6fr; gap: clamp(36px, 6vw, 90px); margin-top: clamp(32px, 4vw, 48px); }
@media (max-width: 860px) { .convert-grid { grid-template-columns: 1fr; } }
.bigphone { font-family: var(--disp); font-weight: 800; font-size: clamp(1.875rem, 3.8vw, 3rem); color: var(--bg); text-decoration: none; letter-spacing: -0.01em; }
.bigphone:hover { color: var(--orange); }
.phone-note { color: rgba(244, 241, 237, 0.65); margin-top: 6px; font-size: 1rem; }
.hours { width: 100%; max-width: 26rem; border-collapse: collapse; font-size: 1rem; margin-top: 26px; font-variant-numeric: tabular-nums; }
.hours th { text-align: left; font-weight: 400; padding: 4px 0; color: rgba(244, 241, 237, 0.75); }
.hours td { text-align: right; padding: 4px 0; color: rgba(244, 241, 237, 0.75); }
.hours tr.today th, .hours tr.today td { color: var(--orange); font-weight: 500; }
.open-now { color: var(--orange); font-weight: 500; margin-top: 12px; }
.mapbox { position: relative; min-height: 230px; border-radius: 10px; overflow: hidden; margin-top: 26px; background: #2A2926; }
.mapbox iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-facade {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(0deg, transparent 0 43px, rgba(244, 241, 237, 0.07) 43px 44px),
    repeating-linear-gradient(90deg, transparent 0 43px, rgba(244, 241, 237, 0.07) 43px 44px),
    #2A2926;
  border: 0; cursor: pointer; color: var(--bg); padding: 20px; text-align: center;
}
.map-facade .pin { color: var(--orange); }
.map-facade strong { font-weight: 500; }
.map-facade span { color: rgba(244, 241, 237, 0.6); font-size: 0.9375rem; }
.quote-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qf-field { display: flex; flex-direction: column; gap: 6px; }
.qf-field.full { grid-column: 1 / -1; }
.qf-field label { font-size: 0.9375rem; font-weight: 500; color: rgba(244, 241, 237, 0.8); }
.qf-field input, .qf-field select, .qf-field textarea {
  color-scheme: dark; background: #2A2926; border: 1px solid rgba(244, 241, 237, 0.22);
  color: var(--bg); padding: 12px 14px; min-height: 48px; border-radius: 8px; width: 100%;
}
.qf-field textarea { min-height: 96px; resize: vertical; }
.qf-field select option { background: #2A2926; color: var(--bg); }
.qf-field input:focus-visible, .qf-field select:focus-visible, .qf-field textarea:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.qf-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.form-error { grid-column: 1 / -1; color: #F5A37F; font-size: 0.9375rem; display: none; }
.form-error.show { display: block; }
.form-note { font-size: 0.875rem; color: rgba(244, 241, 237, 0.5); }
.form-success { display: none; }
.form-success.show { display: block; }
.form-success .big { font-family: var(--disp); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2rem); display: flex; align-items: center; gap: 12px; }
.form-success .big svg { color: var(--orange); flex: 0 0 auto; }
.form-success p { margin-top: 10px; color: rgba(244, 241, 237, 0.65); max-width: 46ch; }

/* earth symbol where the wire terminates */
.earth { position: absolute; left: calc(var(--spine-x) + 1px); bottom: 64px; transform: translateX(-50%); color: var(--grey); z-index: 5; }

.foot-base {
  margin-top: clamp(56px, 7vw, 88px); padding-top: 28px; padding-bottom: 110px;
  border-top: 1px solid rgba(244, 241, 237, 0.18);
  display: flex; flex-wrap: wrap; gap: 10px clamp(28px, 5vw, 64px);
  font-size: 0.9375rem; color: rgba(244, 241, 237, 0.55);
}
.foot-base address { font-style: normal; }
.demo-credit { width: 100%; margin-top: 10px; font-size: 0.875rem; color: rgba(244, 241, 237, 0.4); }

/* sticky mobile bar */
.stickybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; display: none; gap: 10px;
  padding: 10px var(--gut) calc(10px + env(safe-area-inset-bottom));
  background: rgba(244, 241, 237, 0.97); border-top: 1px solid rgba(107, 107, 104, 0.3);
}
.stickybar .btn { flex: 1; }
.stickybar .callbtn { flex: 0 0 auto; width: 48px; padding: 0; }
@media (max-width: 760px) { .stickybar.on { display: flex; } }

/* reveals */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out); }
  .reveal.in { opacity: 1; transform: none; }
  .svc-row.reveal { transition-delay: calc(var(--i, 0) * 60ms); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .how-fill { transform: scaleY(1); }
  .step .node-step { border-color: var(--orange); background: var(--orange); }
}

/* 404 support */
.lost { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 0 var(--gut) 0 var(--content-x); }
.lost .code { font-weight: 500; color: var(--orange); }
.lost h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); max-width: 16ch; }
.lost .ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }

@media (max-width: 640px) {
  :root { --spine-x: 16px; --content-x: 48px; }
  .breaker { width: 40px; height: 58px; }
  html.off .breaker .lever { transform: translateY(20px); }
}
