/* Ultra Electrical. The Meter theme. Light-dominant, meter-glow blue accent. */
:root {
  --paper: #f6f1e3;
  --wash: #e7dcc0;
  --ink: #23201a;
  --muted: #6a6252;
  --blue: #2a6fd6;
  --line: rgba(35, 32, 26, 0.16);
  --expo: cubic-bezier(0.22, 1, 0.36, 1);
  --display: 'Sanchez', Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, 'Times New Roman', serif;
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-3: clamp(1.75rem, 1.4rem + 1.75vw, 2.5rem);
  --step-6: clamp(3rem, 1.8rem + 6vw, 6rem);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

::selection { background: var(--blue); color: var(--paper); }

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

a { color: inherit; }

h1, h2, h3 { text-wrap: balance; line-height: 1.08; font-weight: 700; }
p { text-wrap: pretty; }

.container { max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
.section { padding: clamp(5rem, 10vw, 9rem) 0; }

.ital { font-family: var(--serif); font-style: italic; font-weight: 400; }

.eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 1.1rem;
}
.eyebrow-light { color: rgba(246, 241, 227, 0.72); }

.section-head { max-width: 68ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 {
  font-family: var(--display);
  font-size: var(--step-6);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.lede { color: var(--muted); font-size: 1.1rem; max-width: 60ch; }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 24px;
  background: rgba(246, 241, 227, 0.92);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease-out, background 0.25s ease-out;
}
.site-header.scrolled { box-shadow: 0 8px 30px rgba(35, 32, 26, 0.10); }

.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; min-height: 44px; }
.brand-disc { width: 34px; height: 34px; color: var(--blue); flex-shrink: 0; transition: transform 0.6s var(--expo); }
.brand:hover .brand-disc { transform: rotate(90deg); }
.brand-word { font-family: var(--display); font-size: 1.15rem; letter-spacing: -0.01em; }
.brand-word em { font-family: var(--serif); font-style: italic; font-weight: 400; }

.main-nav { display: flex; gap: 1.75rem; }
.main-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  background: linear-gradient(var(--blue), var(--blue)) left bottom / 0% 2px no-repeat;
  transition: background-size 0.2s ease-out, color 0.2s ease-out;
  padding: 0.6rem 0;
}
.main-nav a:hover { background-size: 100% 2px; color: var(--ink); }

.header-call {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--blue);
  padding: 0.6rem 1.1rem;
  border: 1.5px solid var(--blue);
  border-radius: 6px;
  min-height: 44px;
  transition: background 0.18s ease-out, color 0.18s ease-out, transform 0.18s ease-out;
  white-space: nowrap;
}
.header-call:hover { background: var(--blue); color: var(--paper); transform: translateY(-2px); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 4rem 24px;
}
.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 55% at 18% 22%, rgba(42, 111, 214, 0.14), transparent 70%),
    radial-gradient(45% 40% at 85% 75%, rgba(231, 220, 192, 0.9), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 1200px; margin: 0 auto; width: 100%; }

.torque {
  font-family: var(--display);
  font-size: clamp(3.2rem, 11.5vw, 8.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.torque .mask { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.torque .mask > span { display: inline-block; }
.torque .ital { font-size: 0.98em; }

.hero-sub { font-size: clamp(1.05rem, 1.4vw, 1.3rem); color: var(--muted); max-width: 52ch; margin-bottom: 1.75rem; }

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.1rem;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 2.25rem;
  font-variant-numeric: tabular-nums;
}
.hero-trust .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.9rem 1.9rem;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, background 0.18s ease-out, color 0.18s ease-out;
}
.btn-primary { background: var(--blue); color: var(--paper); box-shadow: 0 6px 22px rgba(42, 111, 214, 0.32); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(42, 111, 214, 0.42); }
.btn-ghost { border: 1.5px solid var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-3px); }
.btn-paper { background: var(--paper); color: var(--blue); }
.btn-paper:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(35, 32, 26, 0.25); }

/* ============ FACTS BAND ============ */
.facts { background: var(--wash); border-block: 1px solid var(--line); }
.facts-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.25rem 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.fact { display: flex; flex-direction: column; gap: 0.2rem; }
.fact-num { font-family: var(--display); font-size: clamp(1.9rem, 3.5vw, 2.6rem); color: var(--blue); font-variant-numeric: tabular-nums; }
.fact-num.fact-small { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.fact-label { font-size: 0.9rem; color: var(--muted); }

/* ============ DIAL DIVIDERS ============ */
.dial-divider { display: flex; justify-content: center; padding: 1.5rem 0; background: var(--paper); }
.dial-svg { width: 200px; height: 60px; overflow: visible; }
.dial-draw-outer, .dial-draw-line { transition: stroke-dashoffset 1.4s var(--expo); }

/* Draw-on-scroll: ring draws, tick ring fades in and slowly rotates */
.js .dial-draw-outer { stroke-dasharray: 164; stroke-dashoffset: 164; }
.js .dial-draw-line { stroke-dasharray: 72; stroke-dashoffset: 72; }
.js .dial-divider.in-view .dial-draw-outer,
.js .dial-divider.in-view .dial-draw-line { stroke-dashoffset: 0; }
.js .dial-ticks { opacity: 0; }
.js .dial-divider.in-view .dial-ticks {
  opacity: 0.55;
  transition: opacity 0.8s ease-out 0.5s;
  animation: dialspin 34s linear infinite;
  transform-origin: 100px 30px;
}
@keyframes dialspin { to { transform: rotate(360deg); } }

/* ============ SERVICES ============ */
.service-rows { list-style: none; border-top: 1px solid var(--line); }
.service-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem 2rem;
  align-items: center;
  padding: 2rem 0.5rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease-out, padding-left 0.25s var(--expo);
}
.service-row:hover { background: rgba(231, 220, 192, 0.45); padding-left: 1.1rem; }
.row-num {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.9rem);
  color: transparent;
  -webkit-text-stroke: 1.5px var(--blue);
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}
.row-body h3 { font-family: var(--display); font-size: 1.45rem; letter-spacing: -0.01em; margin-bottom: 0.35rem; }
.row-body p { color: var(--muted); max-width: 62ch; }
.disc-spur { width: 44px; height: 44px; flex-shrink: 0; }
.spur-spin { transform-origin: 20px 20px; animation: spurspin 26s linear infinite; }
@keyframes spurspin { to { transform: rotate(360deg); } }

/* ============ PHOTO BAND ============ */
.photo-band { position: relative; min-height: 62vh; display: flex; align-items: flex-end; overflow: hidden; }
.photo-frame { position: absolute; inset: 0; }
.photo-kb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.12) brightness(0.94);
  animation: kenburns 26s ease-in-out infinite alternate;
}
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.09); } }
.photo-tint { position: absolute; inset: 0; background: linear-gradient(160deg, rgba(42,111,214,0.78), rgba(42,111,214,0.42)); mix-blend-mode: multiply; }
.photo-scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(35,32,26,0.62), transparent 65%); }
.photo-caption { position: relative; max-width: 1200px; margin: 0 auto; width: 100%; padding: clamp(3rem, 8vw, 6rem) 24px; color: var(--paper); }
.photo-line { font-family: var(--display); font-size: clamp(1.6rem, 4.2vw, 3rem); letter-spacing: -0.015em; max-width: 22ch; }

/* ============ PROCESS ============ */
.process { background: var(--wash); }
.process-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem; counter-reset: step; }
.step-num {
  font-family: var(--display);
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  color: transparent;
  -webkit-text-stroke: 1.5px var(--blue);
  display: block;
  margin-bottom: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.process-step h3 { font-family: var(--display); font-size: 1.25rem; margin-bottom: 0.5rem; }
.process-step p { color: var(--muted); font-size: 0.98rem; }

/* ============ WIPE BAND ============ */
.wipe-band { position: relative; overflow: hidden; background: var(--paper); padding: clamp(5rem, 10vw, 8rem) 0; }
.wipe-cover { position: absolute; inset: 0; background: var(--blue); transform: translateX(-101%); z-index: 2; pointer-events: none; }
.wipe-band.in-view .wipe-cover { transform: translateX(101%); transition: transform 1.15s var(--expo); }
.wipe-inner { position: relative; z-index: 1; }
.wipe-band .section-head h2 { color: var(--ink); }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.value { border-top: 3px solid var(--blue); padding-top: 1.4rem; }
.value h3 { font-family: var(--display); font-size: 1.5rem; margin-bottom: 0.6rem; }
.value p { color: var(--muted); }

/* ============ SERVICE AREA ============ */
.area .section-head { margin-bottom: 2rem; }
.towns { list-style: none; display: flex; flex-wrap: wrap; gap: 0.8rem; }
.towns li {
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.65rem 1.3rem;
  font-size: 0.98rem;
  font-weight: 500;
  transition: border-color 0.18s ease-out, color 0.18s ease-out, transform 0.18s ease-out;
}
.towns li:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.towns li:first-child { background: var(--blue); border-color: var(--blue); color: var(--paper); }

/* ============ FAQ ============ */
.faq { background: var(--wash); }
.accordion { max-width: 820px; border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  background: none;
  border: none;
  font-family: var(--display);
  font-size: 1.2rem;
  text-align: left;
  color: var(--ink);
  padding: 1.4rem 0.25rem;
  min-height: 64px;
  cursor: pointer;
  transition: color 0.18s ease-out, padding-left 0.25s var(--expo);
}
.acc-btn:hover { color: var(--blue); padding-left: 0.75rem; }
.acc-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.acc-plus { position: relative; width: 18px; height: 18px; flex-shrink: 0; }
.acc-plus::before, .acc-plus::after { content: ""; position: absolute; background: var(--blue); transition: transform 0.25s var(--expo); }
.acc-plus::before { left: 0; top: 8px; width: 18px; height: 2px; }
.acc-plus::after { left: 8px; top: 0; width: 2px; height: 18px; }
.acc-item.open .acc-plus::after { transform: rotate(90deg); }
.acc-panel { padding: 0 0.25rem 1.6rem; max-width: 62ch; color: var(--muted); }
.acc-item.panel-hidden .acc-panel { display: none; }

/* ============ FINAL CTA ============ */
.cta-band { background: var(--blue); color: var(--paper); padding: clamp(5rem, 12vw, 9rem) 0; text-align: left; position: relative; overflow: hidden; }
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(55% 70% at 80% 20%, rgba(246, 241, 227, 0.16), transparent 70%);
  pointer-events: none;
}
.cta-band .container { position: relative; }
.cta-head { font-family: var(--display); font-size: var(--step-6); letter-spacing: -0.02em; margin-bottom: 1.5rem; max-width: 14ch; }
.cta-number {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(2.6rem, 9vw, 6.2rem);
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
  margin-bottom: 2rem;
  transition: transform 0.2s var(--expo);
}
.cta-number:hover { transform: scale(1.02); }
.cta-meta { margin-top: 1.75rem; color: rgba(246, 241, 227, 0.78); font-size: 0.95rem; font-variant-numeric: tabular-nums; }

/* ============ FOOTER ============ */
.site-footer { background: var(--ink); color: rgba(246, 241, 227, 0.82); padding: 3.5rem 0 2rem; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.footer-brand { font-family: var(--display); font-size: 1.3rem; color: var(--paper); margin-bottom: 0.4rem; }
.footer-label { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72rem; color: rgba(246, 241, 227, 0.55); margin-bottom: 0.5rem; }
.footer-block a { color: var(--paper); text-decoration: none; border-bottom: 1px solid var(--blue); }
.footer-block a:hover { color: var(--blue); }
.footer-note { text-align: center; font-size: 0.8rem; color: rgba(246, 241, 227, 0.45); padding: 0 24px; }

/* ============ MOBILE CALL BAR ============ */
.mobile-callbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 58px;
  background: var(--blue);
  color: var(--paper);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

/* ============ MOTION ============ */
/* Hidden initial states: applied ONLY when JS is on */
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.in-view { opacity: 1; transform: none; transition: opacity 0.55s var(--expo), transform 0.55s var(--expo); }

.js .reveal-hero { opacity: 0; transform: translateY(14px); }
body.loaded .reveal-hero { opacity: 1; transform: none; transition: opacity 0.6s var(--expo), transform 0.6s var(--expo); }
body.loaded .hero-inner .eyebrow.reveal-hero { transition-delay: 0.05s; }
body.loaded .hero-inner .hero-sub.reveal-hero { transition-delay: 0.5s; }
body.loaded .hero-inner .hero-trust.reveal-hero { transition-delay: 0.62s; }
body.loaded .hero-inner .hero-ctas.reveal-hero { transition-delay: 0.74s; }

.js .mask > span { transform: translateY(112%); }
body.loaded .mask > span { animation: rise 0.75s var(--expo) forwards; }
body.loaded .mask:nth-of-type(1) > span { animation-delay: 0.12s; }
body.loaded .mask:nth-of-type(2) > span { animation-delay: 0.19s; }
body.loaded .mask:nth-of-type(3) > span { animation-delay: 0.26s; }
@keyframes rise { to { transform: translateY(0); } }

/* Dial reveal is scroll-triggered (see divider rules above) */

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .values { grid-template-columns: 1fr; gap: 1.75rem; }
  .facts-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-callbar { display: flex; }
  body { padding-bottom: 58px; }
  .hero { min-height: 86vh; padding-top: 3rem; }
  .service-row { grid-template-columns: 1fr auto; gap: 0.4rem 1rem; }
  .row-num { grid-column: 1 / -1; font-size: 1.8rem; }
  .disc-spur { width: 36px; height: 36px; }
  .footer-inner { grid-template-columns: 1fr; }
  .header-call span { font-size: 1rem; }
  .photo-band { min-height: 54vh; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .reveal-hero { opacity: 1; transform: none; }
  .js .mask > span { transform: none; }
  .js .dial-draw-outer, .js .dial-draw-line { stroke-dashoffset: 0; }
  .js .dial-ticks { opacity: 0.55; }
  .js .acc-item.panel-hidden .acc-panel { display: block; }
  .wipe-cover { display: none; }
  .photo-kb { animation: none; }
}
