/* EnerGreen: motion is an enhancement. All content is visible without JavaScript. */
:root {
  --eg-motion-ready: 1;
  --eg-ease: cubic-bezier(.22, 1, .36, 1);
}

/* A static header stays usable while its shadow changes on scroll. */
.nav {
  transition: box-shadow 260ms ease, border-color 260ms ease;
}

.nav.eg-is-scrolled {
  border-bottom-color: #d8e7dd;
  box-shadow: 0 7px 28px rgb(10 38 25 / 10%);
}

/* This decorative layer inherits the existing photograph and its contrast overlay. */
.hero-photo.eg-hero-enhanced,
.subhero-photo.eg-hero-enhanced {
  isolation: isolate;
}

.hero-photo.eg-hero-enhanced > .container,
.subhero-photo.eg-hero-enhanced > .container {
  position: relative;
  z-index: 1;
}

.eg-hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transform-origin: 72% 50%;
  animation: eg-photo-arrive 1700ms var(--eg-ease) backwards;
}

.eg-hero-item {
  animation: eg-hero-arrive 760ms var(--eg-ease) var(--eg-delay, 0ms) backwards;
}

/* The class is applied only when an element enters the viewport.
   There is deliberately no opacity:0 rule on the inactive/default state. */
.eg-reveal.eg-reveal-active {
  animation: eg-content-arrive 680ms var(--eg-ease) var(--eg-delay, 0ms) backwards;
}

.eg-reveal:focus-within,
.eg-hero-item:focus-within {
  animation: none;
}

.service-card,
.feature,
.step {
  transition:
    transform 280ms var(--eg-ease),
    border-color 240ms ease,
    box-shadow 280ms ease;
}

.service-card .symbol {
  transition: transform 300ms var(--eg-ease), background-color 240ms ease;
}

.service-card .more {
  display: inline-block;
  transition: transform 260ms var(--eg-ease);
}

.btn {
  transition: transform 220ms var(--eg-ease), background-color 180ms ease, box-shadow 220ms ease;
}

.btn:focus-visible,
.service-card:focus-visible,
.related a:focus-visible,
.faq summary:focus-visible,
.eg-backtop:focus-visible {
  outline: 3px solid #25a566;
  outline-offset: 5px;
}

.hero .btn:focus-visible,
.subhero .btn:focus-visible {
  outline-color: #c0f3d3;
}

.faq details {
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.faq details[open] {
  border-color: #aacdb6;
  box-shadow: 0 4px 16px rgb(18 65 36 / 5%);
}

.faq details[open] > p {
  animation: eg-answer-arrive 240ms ease-out;
}

.faq summary::after {
  transition: transform 220ms ease;
}

.faq details[open] summary::after {
  transform: rotate(180deg);
}

.eg-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 85;
  pointer-events: none;
  background: linear-gradient(90deg, #168d53, #72d998);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.eg-backtop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 65;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #bfd8c8;
  border-radius: 50%;
  background: #fff;
  color: #175d3a;
  box-shadow: 0 4px 20px rgb(9 40 22 / 13%);
  cursor: pointer;
  transition: transform 220ms var(--eg-ease), background-color 180ms ease, box-shadow 220ms ease;
}

.eg-backtop[hidden] {
  display: none !important;
}

.eg-backtop svg {
  display: block;
  width: 21px;
  height: 21px;
}

.section[id],
.privacy-section[id],
#quote-form {
  scroll-margin-top: 110px;
}

@media (hover: hover) and (pointer: fine) {
  .service-card:hover,
  .feature:hover,
  .step:hover {
    transform: translateY(-5px);
    border-color: #b1d6bc;
    box-shadow: 0 14px 32px rgb(13 59 30 / 9%);
  }

  .service-card:hover .symbol {
    transform: rotate(-4deg) scale(1.05);
    background-color: #dcf2e2;
  }

  .service-card:hover .more {
    transform: translateX(4px);
  }

  .btn:hover {
    box-shadow: 0 7px 20px rgb(4 41 20 / 16%);
  }

  .btn:active {
    transform: translateY(0) scale(.985);
  }

  .eg-backtop:hover {
    transform: translateY(-3px);
    background-color: #eff8f2;
    box-shadow: 0 8px 24px rgb(9 40 22 / 16%);
  }
}

@media (hover: none) {
  .service-card:hover,
  .btn:hover {
    transform: none;
  }
}

@media (max-width: 760px) {
  .eg-backtop {
    right: 16px;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    width: 44px;
    height: 44px;
  }

  .section[id],
  .privacy-section[id],
  #quote-form {
    scroll-margin-top: 94px;
  }
}

@keyframes eg-hero-arrive {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes eg-content-arrive {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes eg-photo-arrive {
  from { transform: scale(1.045); }
  to { transform: scale(1); }
}

@keyframes eg-answer-arrive {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

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

  .eg-hero-image,
  .eg-hero-item,
  .eg-reveal.eg-reveal-active,
  .faq details[open] > p {
    animation: none !important;
  }

  .nav,
  .btn,
  .service-card,
  .service-card .symbol,
  .service-card .more,
  .feature,
  .step,
  .faq details,
  .faq summary::after,
  .eg-backtop {
    transition: none !important;
  }

  .btn:hover,
  .btn:active,
  .service-card:hover,
  .service-card:hover .symbol,
  .service-card:hover .more,
  .feature:hover,
  .step:hover,
  .eg-backtop:hover {
    transform: none !important;
  }
}

@media print {
  .eg-reading-progress,
  .eg-backtop,
  .eg-hero-image {
    display: none !important;
  }

  .eg-hero-item,
  .eg-reveal.eg-reveal-active,
  .faq details[open] > p {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
