/* Critical Systems Electric — photo-forward redesign
   Patch palette — navy/slate blue + CSE gold (matches hat patch A2 & business card 1c) */

:root {
  --green-900: #0f1e2e;
  --green-800: #172d43;
  --green-700: #27486a;
  --green-600: #3b5f84;
  --green-100: #e5edf5;
  --cream: #f2f5f8;
  --sand: #d6e0e9;
  --ink: #101721;
  --muted: #526171;
  --white: #ffffff;
  --amber: #d7a83f;
  --amber-bright: #f1c75d;
  --focus: #f1c75d;
  --radius: 10px;
  --shadow: 0 8px 28px rgba(8, 13, 20, 0.16);
  --shadow-lg: 0 16px 48px rgba(8, 13, 20, 0.28);
  --max: 1120px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--green-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--green-900);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green-800);
  color: var(--white);
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(23, 45, 67, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--amber-bright);
  box-shadow: 0 2px 10px rgba(8, 13, 20, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.logo-mark-img {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--green-800);
}

.logo-mark-sm {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
}

.logo-wordmark-img {
  height: 3.25rem;
  width: auto;
  max-width: 300px;
  object-fit: contain;
  object-position: left center;
}

/* Hide redundant text when wordmark shows; show text when wordmark hidden */
.brand-text {
  display: none;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
}

.brand-tag {
  font-size: 0.8rem;
  color: var(--amber-bright);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: var(--green-100);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--amber-bright);
}

.nav-cta {
  background: var(--amber-bright);
  color: var(--green-900) !important;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
}

.nav-cta:hover {
  background: var(--amber);
  color: var(--green-900) !important;
}

.header-phone {
  font-weight: 700;
  text-decoration: none;
  color: var(--amber-bright);
  white-space: nowrap;
  font-size: 0.98rem;
}

.header-phone:hover {
  color: var(--white);
}

/* Hero — full-bleed photo */
.hero {
  position: relative;
  min-height: clamp(28rem, 72vh, 40rem);
  display: flex;
  align-items: flex-end;
  padding: 4.5rem 0 3.25rem;
  color: var(--white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    url("images/hero-main.webp") center / cover no-repeat;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(8, 13, 20, 0.95) 0%, rgba(8, 13, 20, 0.83) 42%, rgba(8, 13, 20, 0.5) 72%, rgba(8, 13, 20, 0.3) 100%),
    linear-gradient(to top, rgba(8, 13, 20, 0.8) 0%, transparent 55%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 40rem;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.9rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: rgba(215, 168, 63, 0.2);
  border: 1px solid rgba(215, 168, 63, 0.6);
  color: var(--amber-bright);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: none;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.95rem, 4.8vw, 2.85rem);
  line-height: 1.12;
  color: var(--white);
  letter-spacing: -0.025em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.lead {
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
  color: rgba(229, 237, 245, 0.93);
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--amber);
  color: var(--green-900);
  border-color: var(--amber);
  box-shadow: 0 4px 16px rgba(215, 168, 63, 0.38);
}

.btn-primary:hover {
  background: var(--amber-bright);
  color: var(--green-900);
  border-color: var(--amber-bright);
}

.btn-amber {
  background: var(--amber);
  color: var(--green-900);
}

.btn-secondary {
  background: var(--white);
  color: var(--green-800);
  border-color: var(--green-700);
}

.btn-secondary:hover {
  background: var(--green-100);
  color: var(--green-900);
}

.btn-on-hero {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.65);
}

.btn-on-hero:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  border-color: var(--white);
}

.btn-on-dark {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-on-dark:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green-100);
}

.hero-points li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-points li::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(215, 168, 63, 0.28);
}

/* Sections */
.section {
  padding: 3.75rem 0;
}

.section-alt {
  background: var(--white);
  border-block: 1px solid var(--sand);
}

.section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.55rem, 3vw, 2rem);
  color: var(--green-900);
  letter-spacing: -0.015em;
}

.section-intro {
  margin: 0 0 2rem;
  color: var(--muted);
  max-width: 38rem;
  font-size: 1.05rem;
}

/* Service cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.4rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.section-alt .card {
  background: var(--cream);
}

.card-stripe {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green-800), var(--amber));
}

.card-icon {
  color: var(--green-700);
  margin-bottom: 0.75rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--green-900);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Battery savings */
.battery-savings {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 5%, rgba(215, 168, 63, 0.18), transparent 28rem),
    linear-gradient(145deg, var(--green-900) 0%, var(--green-800) 72%, #172d43 100%);
  color: var(--green-100);
}

.battery-savings::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 64px 64px;
}

.battery-savings .wrap {
  position: relative;
  z-index: 1;
}

.battery-savings .eyebrow {
  margin-bottom: 1rem;
}

.battery-savings h2 {
  color: var(--white);
  max-width: 44rem;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
}

.battery-heading {
  max-width: 48rem;
  margin-bottom: 2rem;
}

.battery-intro {
  margin: 0;
  color: rgba(229, 237, 245, 0.93);
  font-size: 1.1rem;
}

.battery-learn-more {
  margin: 1rem 0 0;
  color: rgba(229, 237, 245, 0.85);
  font-size: 0.98rem;
}

.battery-learn-more a {
  color: #f1c75d;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.battery-learn-more a:hover,
.battery-learn-more a:focus-visible {
  color: #ffffff;
}

.battery-learn-more-note {
  font-size: 0.85rem;
  color: rgba(229, 237, 245, 0.65);
}

.battery-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 1.1rem;
}

@media (min-width: 1100px) {
  .battery-benefits {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .battery-benefits .battery-card {
    grid-column: span 2;
  }

  /* Center the second row when five cards are present */
  .battery-benefits .battery-card:nth-child(4):nth-last-child(2) {
    grid-column: 2 / span 2;
  }

  .battery-benefits .battery-card:nth-child(5):last-child {
    grid-column: 4 / span 2;
  }
}

.battery-card {
  min-height: 100%;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  border: 1px solid rgba(229, 237, 245, 0.24);
  border-top: 4px solid var(--amber);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.battery-number {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.battery-card h3 {
  margin: 0 0 0.55rem;
  color: var(--green-900);
  font-size: 1.2rem;
}

.battery-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.local-rate {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(14rem, 0.7fr);
  gap: 1.5rem;
  align-items: stretch;
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: rgba(247, 245, 240, 0.09);
  border: 1px solid rgba(229, 237, 245, 0.24);
  border-radius: var(--radius);
}

.local-rate-kicker {
  margin: 0 0 0.4rem;
  color: var(--amber-bright);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.local-rate h3 {
  margin: 0 0 0.55rem;
  color: var(--white);
  font-size: 1.35rem;
}

.local-rate-copy > p:not(.local-rate-kicker) {
  color: rgba(229, 237, 245, 0.93);
}

.local-rate-copy > p {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.local-rate-copy > p:last-child {
  margin-bottom: 0;
}

.rate-qualifier {
  font-size: 0.91rem;
}

.rate-sources {
  font-size: 0.86rem;
}

.rate-sources a {
  color: var(--amber-bright);
}

.rate-sources a:hover {
  color: var(--white);
}

.local-rate-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
  padding: 1.25rem;
  text-align: center;
  background: var(--cream);
  color: var(--green-900);
  border-radius: calc(var(--radius) - 2px);
}

.rate-amount {
  font-size: clamp(2.7rem, 6vw, 4.1rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
}

.rate-unit {
  margin-top: 0.45rem;
  font-weight: 700;
  line-height: 1.25;
}

.rate-note {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.battery-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(232, 240, 234, 0.2);
}

.battery-cta h3 {
  margin: 0 0 0.25rem;
  color: var(--white);
  font-size: 1.15rem;
}

.battery-cta p {
  margin: 0;
  color: rgba(229, 237, 245, 0.93);
  font-size: 0.94rem;
}

.battery-cta-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.7rem;
}

#battery-savings {
  scroll-margin-top: 5rem;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.gallery-item {
  margin: 0;
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item figcaption {
  padding: 0.85rem 1rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--green-800);
  line-height: 1.35;
  border-top: 3px solid var(--amber);
}

/* Why CSE */
.split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: start;
}

.checklist {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.7rem;
  color: var(--ink);
  font-weight: 500;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--amber);
  font-weight: 700;
}

.callout {
  background: var(--green-800);
  color: var(--green-100);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--amber);
}

.callout-label {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
}

.callout-label + .callout-value + .callout-label {
  margin-top: 1.1rem;
}

.callout-value {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  word-break: break-word;
}

.callout a {
  color: var(--white);
}

.callout a:hover {
  color: var(--amber-bright);
}

.towns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.towns li {
  background: var(--cream);
  border: 1px solid var(--sand);
  border-left: 3px solid var(--amber);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-weight: 600;
  color: var(--green-800);
  font-size: 0.95rem;
}

.fine-print {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* CTA band */
.cta-band {
  background:
    linear-gradient(135deg, var(--green-900) 0%, var(--green-800) 60%, #172d43 100%);
  color: var(--green-100);
  padding: 3.5rem 0;
}

.cta-inner {
  max-width: 40rem;
}

.cta-band h2 {
  color: var(--white);
}

.cta-band p {
  color: rgba(229, 237, 245, 0.93);
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
}

.cta-band .hero-actions {
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  background: var(--green-900);
  color: var(--green-100);
  padding: 2.5rem 0 2rem;
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.footer-brand p {
  margin: 0.2rem 0 0;
  opacity: 0.85;
  font-size: 0.9rem;
}

.footer-contact p {
  margin: 0.25rem 0;
  font-size: 0.95rem;
}

.footer-contact a {
  color: var(--white);
  text-decoration: none;
}

.footer-contact a:hover {
  color: var(--amber-bright);
  text-decoration: underline;
}

.footer-note {
  margin: 0.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(232, 240, 234, 0.2);
  font-size: 0.85rem;
  opacity: 0.8;
}

.footer-note a {
  color: var(--green-100);
}

/* Responsive */
@media (max-width: 960px) {
  .cards,
  .battery-benefits {
    grid-template-columns: 1fr;
  }

  .local-rate {
    grid-template-columns: 1fr;
  }

  .battery-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .battery-cta-actions {
    justify-content: flex-start;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .logo-wordmark-img {
    display: none;
  }

  .brand-text {
    display: flex;
  }
}

@media (min-width: 961px) {
  .logo-mark-img:not(.logo-mark-sm) {
    display: none;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 24rem;
    padding: 3rem 0 2.25rem;
    align-items: flex-end;
  }

  .hero-overlay {
    background: linear-gradient(160deg, rgba(8, 13, 20, 0.96) 0%, rgba(8, 13, 20, 0.86) 55%, rgba(8, 13, 20, 0.74) 100%);
  }

  .header-phone {
    font-size: 0.9rem;
  }

  .brand-tag {
    display: none;
  }

  .gallery-item figcaption {
    font-size: 0.88rem;
  }

  .battery-card,
  .local-rate {
    padding: 1.2rem;
  }

  .battery-cta-actions,
  .battery-cta-actions .btn {
    width: 100%;
  }

  .local-rate-stat {
    min-height: 10rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .gallery-item img {
    transition: none;
  }

  .gallery-item:hover img {
    transform: none;
  }
}


/* Contractor BIM / prefab tidbit */
.contractor-note {
  margin-top: 1.75rem;
  padding: 1.15rem 1.35rem;
  background: var(--green-100);
  border-left: 4px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
}

.contractor-note p {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
}

.contractor-note strong {
  color: var(--green-900);
}

/* PROPOSED: quote form + mobile CTA */
.quote-form{display:grid;grid-template-columns:1fr 1fr;gap:.8rem;margin:1.5rem 0;max-width:42rem}
.quote-form label{display:flex;flex-direction:column;font-weight:600;gap:.3rem}
.quote-form .full,.quote-form button{grid-column:1/-1}
.quote-form input,.quote-form select,.quote-form textarea{padding:.7rem;border-radius:6px;border:1px solid #ccc;font:inherit}
@media (max-width:560px){.quote-form{grid-template-columns:1fr}}
@media (max-width:960px){.mobile-cta{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:50}.mobile-cta a{flex:1;text-align:center;padding:.9rem;font-weight:700;background:#172d43;color:#fff;border-top:2px solid #f1c75d}.mobile-cta a+a{background:#f1c75d;color:#0f1e2e}body{padding-bottom:3.2rem}}
@media (min-width:961px){.mobile-cta{display:none}}

/* Job photos (battery section) */
.job-photos { margin: 2.5rem 0; }
.job-photos-intro { max-width: 60ch; font-size: 1.05rem; margin: 0 0 1rem; }
.job-photos-figure { margin: 0; }
.job-photos-grid { display: grid; grid-template-columns: 2.17fr 1fr; gap: .75rem; align-items: start; }
.job-photos-grid img { width: 100%; height: auto; display: block; border-radius: 8px; }
.job-photos-figure figcaption { font-size: .9rem; margin-top: .6rem; opacity: .85; }
.job-photos-credit { font-size: .75rem; opacity: .7; }
@media (max-width: 640px) { .job-photos-grid { grid-template-columns: 1fr; } }
