/* ============================================================
   ChargeGuru — Design System
   Concept: dashboard/gauge urgency, jump-cable palette, technical
   line-art in place of stock photography.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --asphalt:      #14161A;
  --asphalt-2:    #1E2126;
  --asphalt-3:    #262A31;
  --signal:       #F5B400;
  --signal-dim:   #C99000;
  --clamp:        #D8342A;
  --paper:        #F3F1EA;
  --paper-2:      #EAE7DC;
  --ink:          #14161A;
  --mist:         #9AA0AC;
  --mist-on-paper:#6B6F76;
  --line-dark:    rgba(243,241,234,0.12);
  --line-light:   rgba(20,22,26,0.12);

  --font-display: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --font-body:    'IBM Plex Sans', 'Segoe UI', sans-serif;

  --container: 1180px;
  --radius-sm: 4px;
  --radius-md: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
svg { max-width: 100%; display: inline-block; vertical-align: middle; flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.01em;
}
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- focus & motion ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- section rhythm ---------- */
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--dark { background: var(--asphalt); color: var(--paper); }
.section--panel { background: var(--asphalt-2); color: var(--paper); }

.eyebrow-kicker {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--signal);
  margin-bottom: 10px;
}

.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-head p { margin-top: 14px; font-size: 17px; color: var(--mist-on-paper); max-width: 56ch; }
.section--dark .section-head p, .section--panel .section-head p { color: var(--mist); }

/* ---------- gauge divider motif ---------- */
.gauge-divider {
  display: block;
  width: 100%;
  height: 28px;
  margin: 0 auto;
}
.gauge-divider path { fill: none; stroke: var(--line-light); stroke-width: 1.5; }
.section--dark .gauge-divider path, .section--panel .gauge-divider path { stroke: var(--line-dark); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20,22,26,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-dark);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--paper);
}
.brand__mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand__mark svg { width: 100%; height: 100%; }
.brand__name span { color: var(--signal); }

.nav-desktop { display: flex; align-items: center; gap: 30px; }
.nav-desktop a {
  font-size: 14.5px;
  color: var(--mist);
  font-weight: 500;
  transition: color .15s ease;
}
.nav-desktop a:hover, .nav-desktop a.is-active { color: var(--paper); }

.header-cta { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  background: none; border: 1px solid var(--line-dark); border-radius: var(--radius-sm);
  color: var(--paper);
  align-items: center; justify-content: center;
}

.mobile-panel {
  display: none;
  position: fixed;
  inset: 72px 0 0 0;
  background: var(--asphalt);
  z-index: 99;
  padding: 24px;
  overflow-y: auto;
}
.mobile-panel a {
  display: block;
  padding: 16px 4px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--paper);
  border-bottom: 1px solid var(--line-dark);
}

@media (max-width: 880px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
  .header-cta .btn-label { display: none; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-icon { width: 18px; height: 18px; flex-shrink: 0; }
.btn-icon svg { width: 100%; height: 100%; }
.btn > svg { width: 18px; height: 18px; }

.btn--signal { background: var(--signal); color: var(--asphalt); }
.btn--signal:hover { background: #ffc93d; }

.btn--clamp { background: var(--clamp); color: var(--paper); }
.btn--clamp:hover { background: #e64b40; }

.btn--outline-dark { border-color: var(--line-dark); color: var(--paper); }
.btn--outline-dark:hover { border-color: var(--signal); color: var(--signal); }

.btn--outline-light { border-color: var(--line-light); color: var(--ink); }
.btn--outline-light:hover { border-color: var(--ink); }

.btn--ghost-on-paper { color: var(--ink); border-color: var(--line-light); }
.btn--ghost-on-paper:hover { border-color: var(--clamp); color: var(--clamp); }

.btn--sm { padding: 9px 16px; font-size: 13.5px; }
.btn--block { width: 100%; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--asphalt);
  color: var(--paper);
  position: relative;
  overflow: hidden;
  padding: 64px 0 84px;
}
.hero .container {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: center;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--signal);
  margin-bottom: 20px;
}
.hero__eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--clamp);
  box-shadow: 0 0 0 0 rgba(216,52,42,0.6);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(216,52,42,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(216,52,42,0); }
  100% { box-shadow: 0 0 0 0 rgba(216,52,42,0); }
}
.hero h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  max-width: 12.5ch;
}
.hero h1 .accent { color: var(--signal); }
.hero__sub {
  margin-top: 20px;
  font-size: 18px;
  color: var(--mist);
  max-width: 46ch;
}
.hero__actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero__meta {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line-dark);
  flex-wrap: wrap;
}
.hero__meta-item .num {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--paper);
}
.hero__meta-item .label { font-size: 13px; color: var(--mist); margin-top: 2px; }

.hero__gauge-wrap { position: relative; display: flex; align-items: center; justify-content: center; }

/* gauge needle animation */
.gauge-needle {
  transform-origin: 130px 130px;
  animation: needleSwing 1.6s cubic-bezier(.2,.9,.25,1) 0.3s both;
}
@keyframes needleSwing {
  0%   { transform: rotate(-92deg); }
  60%  { transform: rotate(42deg); }
  100% { transform: rotate(30deg); }
}

/* ============================================================
   HERO PHOTO STORY (homepage hero — customer journey sequence,
   replaces the gauge as the hero visual)
   ============================================================ */
.hero__photo-wrap { width: 100%; max-width: 440px; margin: 0 auto; }
.hero { overflow: hidden; } /* clips the full-bleed photo's negative margin below, so it never causes a horizontal scrollbar */

.hero-story-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2.1;
  min-height: 220px; /* fallback if aspect-ratio isn't supported - without this, an unsupported browser would collapse the frame to 0 height instead of just losing the exact ratio */
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line-dark);
  background: var(--asphalt-2);
}
.hero-story-frame img {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .6s ease;
}
.hero-story-frame img.is-active { opacity: 1; }

/* Full-bleed: the photo's right edge extends past the container to the
   actual browser viewport edge, breaking the site's usual centered-container
   pattern for this one element. calc() cancels out both the container's
   own centering gap ((100vw - 1180px)/2) and its 24px right padding, in
   one negative right-margin. Desktop only (min-width media query below) -
   on mobile the hero stacks into a single centered column (see the 980px
   breakpoint further down), where this breakout would misalign the whole
   layout instead of looking intentional.

   IMPORTANT: this block must stay AFTER the base .hero-story-frame rule
   above, not before it - both set aspect-ratio at equal specificity, so
   whichever appears LAST in the file wins whenever both apply (which is
   always, once the viewport is >= 981px). This exact ordering mistake
   shipped once already: the override sat above the base rule, so the
   base rule's 3/2.1 silently always won and this 3/2.5 never applied,
   even though it looked correct in isolated testing at the intended
   ratio - only caught by checking the real page's *computed* aspect
   ratio, which is why that check is worth doing again if this value
   is ever changed. */
@media (min-width: 981px) {
  .hero__photo-wrap {
    max-width: none;
    margin-right: calc(-1 * (100vw - var(--container)) / 2 - 24px);
  }
  .hero-story-frame {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    aspect-ratio: 3 / 2.5;
  }
}

.hero-story-progress { display: flex; gap: 6px; margin-top: 14px; }
.hero-story-progress__seg {
  flex: 1; height: 3px;
  background: var(--line-dark);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.hero-story-progress__fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--signal);
}

/* ============================================================
   PAGE HERO (secondary pages)
   ============================================================ */
.page-hero {
  background: var(--asphalt);
  color: var(--paper);
  padding: 56px 0 64px;
}
.page-hero .eyebrow-kicker { color: var(--signal); }
.page-hero h1 { font-size: clamp(30px, 4vw, 44px); max-width: 20ch; }
.page-hero p { margin-top: 16px; font-size: 17px; color: var(--mist); max-width: 58ch; }
.breadcrumb {
  font-size: 13px;
  color: var(--mist);
  margin-bottom: 18px;
}
.breadcrumb a:hover { color: var(--signal); }
.breadcrumb .sep { margin: 0 6px; opacity: .5; }

/* ============================================================
   CARDS
   ============================================================ */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.service-card {
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  transition: border-color .15s ease, transform .15s ease;
}
.service-card:hover { border-color: var(--clamp); }
.service-card__icon {
  width: 46px; height: 46px;
  margin-bottom: 20px;
}
.service-card__icon svg { width: 100%; height: 100%; }
.service-card h3 { font-size: 19px; margin-bottom: 10px; }
.service-card p { color: var(--mist-on-paper); font-size: 15px; }
.service-card__link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  color: var(--clamp);
}

.zone-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.zone-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--asphalt-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-md);
  color: var(--paper);
  transition: border-color .15s ease, background .15s ease;
}
.zone-pill:hover { border-color: var(--signal); background: var(--asphalt-3); }
.zone-pill__name { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.zone-pill__areas { font-size: 12.5px; color: var(--mist); margin-top: 3px; }
.zone-pill__arrow { width: 18px; height: 18px; color: var(--signal); flex-shrink: 0; }
.zone-pill__arrow svg { width: 100%; height: 100%; }

/* ============================================================
   PRICING TABLE
   ============================================================ */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.pricing-table th, .pricing-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line-light);
  font-size: 15px;
}
.pricing-table thead th {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--mist-on-paper);
  font-weight: 600;
  background: var(--paper-2);
}
.pricing-table tbody tr:last-child td { border-bottom: none; }
.pricing-table td.price { font-family: var(--font-display); font-weight: 700; color: var(--clamp); white-space: nowrap; }
.pricing-note {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--mist-on-paper);
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.review-card {
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  padding: 26px;
}
.review-card__stars { color: var(--signal-dim); font-size: 14px; letter-spacing: 2px; margin-bottom: 14px; }
.review-card p.quote { font-size: 15px; color: var(--ink); line-height: 1.6; }
.review-card__foot { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.review-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--asphalt-2); color: var(--signal);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
}
.review-name { font-size: 13.5px; font-weight: 600; }
.review-meta { font-size: 12px; color: var(--mist-on-paper); }

/* ============================================================
   BOOKING FORM
   ============================================================ */
.booking-card {
  background: var(--asphalt-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-md);
  padding: 32px;
  color: var(--paper);
}
.booking-card h3 { font-size: 20px; margin-bottom: 6px; }
.booking-card > p { color: var(--mist); font-size: 14.5px; margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field--full { grid-column: 1 / -1; }
.form-field label { font-size: 12.5px; color: var(--mist); font-weight: 500; }
.form-field input, .form-field select {
  background: var(--asphalt);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 14.5px;
}
.form-field input::placeholder { color: #5b606a; }
.form-field input:focus, .form-field select:focus { border-color: var(--signal); outline: none; }
.form-note { font-size: 12px; color: var(--mist); margin-top: 14px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--asphalt);
  color: var(--mist);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line-dark);
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { font-size: 14px; max-width: 32ch; }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--paper);
  margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 14px; transition: color .15s ease; }
.footer-col ul li a:hover { color: var(--signal); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-legal a { margin-left: 18px; }
.footer-legal a:hover { color: var(--signal); }

/* ============================================================
   STICKY MOBILE CTA
   ============================================================ */
.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--asphalt);
  border-top: 1px solid var(--line-dark);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
}
.sticky-cta__row { display: flex; gap: 10px; }
.sticky-cta .btn { flex: 1; }

@media (max-width: 720px) {
  .sticky-cta { display: block; }
  body { padding-bottom: 76px; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero__gauge-wrap { order: -1; max-width: 220px; margin: 0 auto; }
  .hero__photo-wrap { order: -1; max-width: 340px; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .zone-grid { grid-template-columns: repeat(2, 1fr); }
  .review-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .service-grid { grid-template-columns: 1fr; }
  .zone-grid { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
  .hero__meta { gap: 20px; }
  .hero__actions .btn { width: 100%; }
  .hero__actions { flex-direction: column; }
}

/* ============================================================
   MISC
   ============================================================ */
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 500;
  padding: 7px 12px;
  border: 1px solid var(--line-light);
  border-radius: 999px;
  color: var(--mist-on-paper);
}
.badge svg { width: 13px; height: 13px; }

.split-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 880px) {
  .split-block { grid-template-columns: 1fr; gap: 32px; }
}

.warranty-note {
  display: flex; gap: 14px;
  align-items: flex-start;
  background: var(--paper-2);
  border-left: 3px solid var(--clamp);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14.5px;
  margin-top: 24px;
}
.warranty-note svg { width: 26px; height: 26px; color: var(--clamp); }

.step-list { display: flex; flex-direction: column; gap: 0; }
.step-item {
  display: flex; gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-light);
}
.step-item:last-child { border-bottom: none; }
.step-num {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 700;
  color: var(--clamp);
  width: 30px; flex-shrink: 0;
}
.step-num svg { width: 22px; height: 22px; }
.step-item h4 { font-size: 16px; margin-bottom: 6px; }
.step-item p { font-size: 14.5px; color: var(--mist-on-paper); }

.blog-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.blog-card {
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.blog-card__img {
  height: 150px;
  background: var(--asphalt-2);
  display: flex; align-items: center; justify-content: center;
}
.blog-card__img svg { width: 46px; height: 46px; opacity: .55; }
.blog-card__body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.blog-card__tag { font-size: 12px; color: var(--clamp); font-weight: 600; font-family: var(--font-display); margin-bottom: 8px; }
.blog-card h3 { font-size: 17px; margin-bottom: 10px; }
.blog-card p { font-size: 14px; color: var(--mist-on-paper); flex: 1; }
.blog-card__meta { font-size: 12.5px; color: var(--mist-on-paper); margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-light); }

@media (max-width: 880px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }

.placeholder-note {
  font-size: 12.5px;
  color: var(--mist-on-paper);
  background: var(--paper-2);
  border: 1px dashed var(--line-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 10px;
}
