@import url("/css/fonts.css");
@import url("/css/design-tokens.css");
@import url("/css/global-typography.css");

/* The optional Framer promotion is not part of the Esteem Energy site UI. */
#__framer-badge-container,
.__framer-badge {
  display: none !important;
}

/* Shared page-safe defaults. */
*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

iframe {
  max-width: 100%;
}

button,
input,
textarea,
select {
  max-width: 100%;
}

/* WCAG 2.4.1 Skip to main content link. */
.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 100000;
  padding: 10px 18px;
  background: #111111;
  color: #ffffff;
  font: 600 14px/1.2 "Quicksand", var(--esteem-font-body), sans-serif;
  text-decoration: none;
  border: 1px solid rgba(226, 250, 90, 0.5);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transform: translateY(-200%);
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  outline: 2px solid #e2fa5a;
  outline-offset: 2px;
}

html body {
  font-family: "Quicksand", var(--esteem-font-body), sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--esteem-font-heading);
}

button,
input,
select,
textarea,
.site-header,
.esteem-home-cta,
.esteem-primary-cta,
.esteem-secondary-cta,
.solar-lead-submit {
  font-family: "Quicksand", var(--esteem-font-ui), sans-serif;
}

/* ==========================================================================
   ESTEEM ENERGY SHARED HEADER
   ========================================================================== */

:root {
  --site-header-space: 80px;
  --header-ink: var(--esteem-color-ink, #111111);
  --header-muted: rgba(17, 17, 17, 0.72);
  --header-sage: #f3f5f0;
  --header-surface: rgba(255, 255, 255, 0.82);
  --header-surface-strong: rgba(255, 255, 255, 0.94);
  --header-border: rgba(17, 17, 17, 0.11);
  --header-lime: var(--esteem-color-lime, #c8ff3d);
  --header-lime-glow: rgba(112, 158, 42, 0.12);
  --header-shadow: 0 12px 30px rgba(17, 17, 17, 0.08), 0 2px 8px rgba(17, 17, 17, 0.03);
}

/*
 * The header is present in the initial HTML on the public pages. This reserves
 * its fixed-space offset without waiting for JavaScript or changing content
 * markup on individual pages.
 */
body:has(.site-header) {
  padding-top: var(--site-header-space);
}

body.home-page {
  padding-top: 0 !important;
}

body.site-mobile-menu-open {
  overflow: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  z-index: 2000;
  width: 100vw;
  max-width: 100vw;
  padding: max(12px, env(safe-area-inset-top)) 0 0;
  pointer-events: none;
  transition: padding 200ms ease;
}

.site-header-container {
  position: relative;
  width: min(1240px, calc(100vw - 48px));
  margin: 0 auto;
  overflow: visible;
  border: 1px solid var(--header-border);
  border-radius: 20px;
  background: var(--header-surface);
  box-shadow: var(--header-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(118%);
  backdrop-filter: blur(18px) saturate(118%);
  pointer-events: auto;
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.site-header::after {
  display: none;
}

.site-header.is-scrolled .site-header-container {
  border-color: rgba(17, 17, 17, 0.16);
  background: var(--header-surface-strong);
  box-shadow: 0 14px 34px rgba(17, 17, 17, 0.12), 0 3px 9px rgba(17, 17, 17, 0.05);
}

.site-header-inner {
  display: grid;
  grid-template-columns: minmax(152px, 1fr) auto minmax(232px, 1fr);
  gap: 12px;
  min-height: 56px;
  padding: 5px 8px 5px 14px;
}

.site-brand {
  display: flex;
  align-items: center;
  justify-self: start;
  min-width: 0;
}

.esteem-energy-logo-link {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  outline: none;
  text-decoration: none;
}

.esteem-energy-logo-link:focus-visible {
  outline: 2px solid var(--header-lime);
  outline-offset: 3px;
}

.esteem-energy-logo--header {
  display: block;
  width: 136px;
  max-height: 34px;
  object-fit: contain;
}

/* Centre navigation. */
.site-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  flex: 0 1 auto;
  min-width: 0;
}

.site-nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 0;
}

.site-nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--header-muted);
  cursor: pointer;
  font-family: "Quicksand", var(--esteem-font-body), sans-serif;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease,
    color 200ms ease;
}

.site-nav-item:hover,
.site-nav-item:focus-visible {
  border-color: rgba(112, 158, 42, 0.18);
  background: rgba(200, 255, 61, 0.22);
  color: #101410;
  box-shadow: none;
  outline: none;
}

.site-nav-item.is-active {
  border-color: rgba(112, 158, 42, 0.2);
  background: rgba(200, 255, 61, 0.32);
  color: #101410;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(112, 158, 42, 0.06);
}

.site-nav-item.is-active:hover,
.site-nav-item.is-active:focus-visible {
  background: rgba(200, 255, 61, 0.44);
  border-color: rgba(112, 158, 42, 0.28);
}

.solaris-chevron {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  transition: transform 200ms ease;
}

/* Desktop Products dropdown. */
.site-navigation .site-nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.site-navigation .site-products-link {
  display: inline-flex;
  align-items: center;
}

.site-navigation .site-nav-dropdown:hover .solaris-chevron,
.site-navigation .site-nav-dropdown.is-open .solaris-chevron,
.site-navigation .site-nav-dropdown:focus-within .solaris-chevron {
  transform: rotate(180deg);
}

.site-navigation .site-products-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  display: grid;
  min-width: 224px;
  padding: 7px;
  border: 1px solid var(--header-border);
  border-radius: 14px;
  background: var(--header-surface-strong);
  box-shadow: 0 14px 30px rgba(17, 17, 17, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -6px);
  transition:
    opacity 200ms ease,
    transform 200ms ease,
    visibility 200ms ease;
  z-index: 2050;
  -webkit-backdrop-filter: blur(12px) saturate(115%);
  backdrop-filter: blur(12px) saturate(115%);
}

.site-navigation .site-products-menu::before {
  position: absolute;
  top: -14px;
  left: -14px;
  right: -14px;
  height: 18px;
  content: "";
  background: transparent;
}

.site-navigation .site-nav-dropdown:hover > .site-products-menu,
.site-navigation .site-nav-dropdown:focus-within > .site-products-menu,
.site-navigation .site-nav-dropdown.is-open > .site-products-menu,
.site-navigation .site-products-menu:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.site-products-menu a {
  display: block;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #172018;
  font-family: "Quicksand", var(--esteem-font-body), sans-serif;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.site-products-menu a:hover,
.site-products-menu a:focus-visible {
  border-color: rgba(118, 157, 37, 0.24);
  background: rgba(217, 255, 74, 0.46);
  color: #101410;
  outline: none;
}

/* Right-side actions. */
.site-header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.site-header-call-btn,
.site-header-quote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Quicksand", var(--esteem-font-body), sans-serif;
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease,
    color 200ms ease;
}

.site-header-call-btn {
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(17, 17, 17, 0.2);
  background: #ffffff;
  color: var(--header-ink);
}

.site-header-call-btn:hover,
.site-header-call-btn:focus-visible {
  border-color: rgba(17, 17, 17, 0.32);
  background: var(--header-sage);
  color: #101410;
  box-shadow: 0 4px 12px rgba(17, 17, 17, 0.08);
  outline: none;
}

.site-phone-icon {
  flex: 0 0 auto;
  color: currentColor;
}

.site-header-quote-btn {
  gap: 7px;
  padding: 0 5px 0 14px;
  border: 1px solid #111111;
  background: #111111;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(17, 17, 17, 0.16);
}

/* cta-hover.css also styles the shared CTA class; these scoped rules keep the
   header CTA compact and aligned with the lighter header surface. */
.site-header .site-header-quote-btn {
  min-height: 36px;
  height: 36px;
  border-radius: 999px;
  padding: 0 5px 0 14px;
  background: #111111;
  color: #ffffff;
  font-family: "Quicksand", var(--esteem-font-body), sans-serif;
  font-size: 13px;
  font-weight: 750;
  gap: 7px;
}

.site-header .site-header-quote-btn > span:first-child {
  color: #ffffff;
}

.site-header-quote-btn .esteem-cta-label {
  display: inline;
}

.site-header-quote-btn .esteem-cta-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border-radius: 999px;
  background: var(--header-lime);
  color: #111111;
  font-weight: 750;
  line-height: 1;
  font-size: 0;
  transition:
    background-color 200ms ease,
    color 200ms ease,
    transform 200ms ease;
}

.site-header-quote-btn .esteem-cta-arrow::before {
  content: "\2192";
  font-size: 15px;
}

.site-header .site-header-quote-btn:hover,
.site-header .site-header-quote-btn:focus-visible {
  border-color: var(--header-lime);
  background: var(--header-lime);
  color: #111111;
  box-shadow: 0 4px 12px rgba(112, 158, 42, 0.14);
  outline: none;
}

.site-header .site-header-quote-btn:hover > span:first-child,
.site-header .site-header-quote-btn:focus-visible > span:first-child {
  color: #111111;
}

.site-header-quote-btn:hover .esteem-cta-arrow,
.site-header-quote-btn:focus-visible .esteem-cta-arrow {
  background: #000000;
  color: var(--header-lime);
  transform: translateX(3px);
}

/* Mobile toggle and menu. */
.site-menu-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(71, 104, 76, 0.22);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--header-ink);
  cursor: pointer;
}

.site-menu-toggle:hover,
.site-menu-toggle:focus-visible {
  border-color: rgba(126, 157, 65, 0.42);
  background: rgba(200, 255, 61, 0.36);
  outline: 2px solid rgba(126, 157, 65, 0.16);
  outline-offset: 2px;
}

.site-menu-toggle span {
  position: absolute;
  left: 12px;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: top 200ms ease, transform 200ms ease;
}

.site-menu-toggle span:first-child {
  top: 15px;
}

.site-menu-toggle span:last-child {
  top: 23px;
}

.site-menu-toggle[aria-expanded="true"] span:first-child {
  top: 19px;
  transform: rotate(45deg);
}

.site-menu-toggle[aria-expanded="true"] span:last-child {
  top: 19px;
  transform: rotate(-45deg);
}

.site-mobile-menu {
  display: none;
  pointer-events: auto;
}

/* Tablet and mobile layout. */
@media (max-width: 1199px) {
  :root {
    --site-header-space: 74px;
  }

  .site-header {
    padding-top: max(10px, env(safe-area-inset-top));
  }

  .site-header-container {
    width: calc(100vw - 24px);
    border-radius: 18px;
  }

  .site-header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 54px;
    padding: 6px 8px 6px 13px;
  }

  .esteem-energy-logo--header {
    width: 132px;
    max-height: 33px;
  }

  .site-navigation,
  .site-header-actions {
    display: none;
  }

  .site-menu-toggle {
    display: block;
    margin-left: auto;
  }

  .site-mobile-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100dvh - 104px);
    padding: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(71, 104, 76, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 14px 30px rgba(17, 17, 17, 0.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 200ms ease,
      transform 200ms ease,
      visibility 200ms ease;
    -webkit-backdrop-filter: blur(12px) saturate(115%);
    backdrop-filter: blur(12px) saturate(115%);
  }

  .site-mobile-menu.is-open {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-mobile-menu .site-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border-color: transparent;
    color: #172018;
    font-size: 15px;
  }

  .site-mobile-menu .site-nav-item:hover,
  .site-mobile-menu .site-nav-item:focus-visible,
  .site-mobile-menu .site-nav-item.is-active {
    border-color: rgba(101, 138, 31, 0.28);
    background: rgba(217, 255, 74, 0.46);
    color: #101410;
    box-shadow: 0 3px 10px rgba(112, 158, 42, 0.08);
  }

  .site-nav-dropdown--mobile {
    position: relative;
    display: block;
    width: 100%;
  }

  .site-nav-dropdown--mobile .site-nav-dropdown-toggle {
    width: 100%;
  }

  /* Normal document flow prevents an empty submenu gap when closed. */
  .site-nav-dropdown--mobile .site-products-menu {
    position: static !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 3px !important;
    width: 100% !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: none !important;
    transition:
      max-height 220ms ease,
      margin 220ms ease,
      padding 220ms ease,
      opacity 180ms ease,
      visibility 180ms ease !important;
  }

  .site-nav-dropdown--mobile.is-open > .site-products-menu {
    max-height: 600px !important;
    margin: 4px 0 8px !important;
    padding: 2px 0 2px 12px !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .site-nav-dropdown--mobile.is-open > .site-nav-dropdown-toggle .solaris-chevron {
    transform: rotate(180deg);
  }

  .site-nav-dropdown--mobile .site-products-menu a {
    display: block !important;
    width: 100% !important;
    min-height: 38px;
    padding: 9px 13px !important;
    border: 1px solid transparent;
    border-radius: 10px !important;
    color: #30402f !important;
    font-size: 14px !important;
    font-weight: 650;
    line-height: 1.25 !important;
    white-space: normal !important;
    text-decoration: none !important;
  }

  .site-nav-dropdown--mobile .site-products-menu a:hover,
  .site-nav-dropdown--mobile .site-products-menu a:focus-visible {
    border-color: rgba(101, 138, 31, 0.22);
    background: rgba(217, 255, 74, 0.36) !important;
    color: #101410 !important;
    outline: none;
  }

  .site-mobile-ctas {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(23, 32, 24, 0.12);
  }

  .site-mobile-call-btn,
  .site-mobile-quote {
    width: 100%;
    height: 46px;
    justify-content: center;
    font-size: 14px;
  }

  .site-mobile-call-btn {
    border-color: rgba(101, 138, 31, 0.58);
    background: #ffffff;
    color: #172018;
  }
}

@media (max-width: 480px) {
  :root {
    --site-header-space: 72px;
  }

  .site-header-container {
    border-radius: 17px;
  }

  .site-header-inner {
    min-height: 52px;
  }

  .esteem-energy-logo--header {
    width: 126px;
    max-height: 32px;
  }

  .site-menu-toggle {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 340px) {
  .esteem-energy-logo--header {
    width: 122px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header-container,
  .site-nav-item,
  .site-mobile-menu,
  .site-menu-toggle span,
  .site-header-quote-btn,
  .site-header-call-btn,
  .esteem-cta-arrow,
  .site-products-menu {
    transition: none;
  }
}
