/*
 * Header and category navigation.
 *
 * This is the single style owner for the brand header, primary navigation,
 * desktop subnavigation and mobile submenu. Keep breakpoint behavior here so
 * desktop and mobile navigation cannot be enabled by separate style sheets.
 */

.gy-subnav[hidden] { display: none !important; }
.gy-mobile-submenu { display: none; }

.gy-subnav__toggle {
  display: contents;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
}

.gy-subnav__toggle b {
  color: var(--gy-lime);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.gy-subnav__toggle span { display: none; }

.gy-header {
  z-index: 80;
  display: grid;
  align-items: center;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.gy-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.gy-brand span { display: flex; flex-direction: column; }
.gy-brand img { object-fit: contain; }
.gy-brand b { letter-spacing: -.04em; }
.gy-brand small { color: rgba(255, 255, 255, .52); letter-spacing: .12em; }

.gy-main-nav {
  display: flex;
  justify-content: center;
}

.gy-main-nav > a {
  position: relative;
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, .7);
  text-decoration: none;
}

.gy-main-nav > a::after {
  position: absolute;
  content: '';
}

.gy-header-cta { text-decoration: none; }
.gy-menu-toggle { display: none; }

.gy-header::before {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(185, 222, 95, .18) 30%, #b9de5f 50%, rgba(185, 222, 95, .18) 70%, transparent 100%);
  content: '';
  opacity: 0;
  pointer-events: none;
  transform: scaleX(.08);
  transform-origin: left center;
}

.gy-header.is-category-transitioning::before {
  animation: gyCategoryHeaderSweep .68s cubic-bezier(.2, .72, .2, 1) both;
}

.gy-main-nav > a.is-category-transitioning::after {
  background: var(--gy-lime);
  animation: gyCategoryLinkTrace .68s cubic-bezier(.2, .72, .2, 1) both;
}

@keyframes gyCategoryHeaderSweep {
  0% { opacity: 0; transform: scaleX(.08); }
  18% { opacity: .95; }
  74% { opacity: .72; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(1); }
}

@keyframes gyCategoryLinkTrace {
  0% { opacity: 0; transform: scaleX(0); }
  22%, 70% { opacity: 1; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(1); }
}

.gy-brand .gy-brand__mark {
  position: relative;
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  flex-direction: initial;
  perspective: 220px;
}

.gy-brand__mark--animated { overflow: hidden; }

.gy-brand__mark > img,
.gy-brand__assembly {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.gy-brand__mark > img { z-index: 1; }

.gy-brand__assembly {
  z-index: 2;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
}

.gy-brand__piece {
  fill: url(#gy-brand-assembly-gradient);
  opacity: 1;
  transform-box: fill-box;
  transform-origin: center;
  will-change: transform;
}

.gy-brand__mark--animated > img { opacity: 0; }
.gy-brand__mark--animated .gy-brand__assembly { opacity: 1; }

.gy-header.is-logo-assembling .gy-brand__piece--4 {
  animation: gyBrandPieceSpin var(--gy-logo-motion-duration, .68s) cubic-bezier(.2, .76, .24, 1) both;
}

@keyframes gyBrandPieceSpin {
  0% { transform: rotate(0) scale(1); }
  46% { transform: rotate(var(--gy-logo-rotation-mid, 190deg)) scale(.82); }
  78% { transform: rotate(var(--gy-logo-rotation-late, 318deg)) scale(1.05); }
  100% { transform: rotate(var(--gy-logo-rotation-total, 360deg)) scale(1); }
}

@media (min-width: 921px) {
  .gy-header {
    --gy-header-compact-height: 88px;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    min-height: 88px;
    grid-template-columns: 260px minmax(0, 1fr) auto;
    gap: 32px;
    padding-inline: 56px;
    background-color: rgba(7, 17, 29, 0);
    background-image: linear-gradient(180deg, rgba(3, 10, 18, .72), rgba(3, 10, 18, .16) 78%, transparent);
    border-bottom-color: rgba(255, 255, 255, .16);
    backdrop-filter: none;
    transition: min-height .3s ease, color .3s ease, background-color .4s ease, border-color .4s ease, box-shadow .3s ease;
  }

  .admin-bar .gy-header { top: 32px; }

  .gy-brand-editor { justify-self: start; }
  .gy-brand { gap: 14px; }
  .gy-brand .gy-brand__mark { width: 56px; height: 52px; }
  .gy-brand img { width: 56px; height: 52px; }
  .gy-brand b { font-size: 20px; }
  .gy-brand small { margin-top: 2px; font-size: 8px; }

  .gy-header.is-scrolled {
    min-height: 88px;
    color: #fff;
    background-color: rgba(7, 17, 29, .97);
    border-bottom-color: rgba(255, 255, 255, .12);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
    backdrop-filter: blur(16px);
  }

  .gy-header.is-subnav-open {
    color: #fff;
    background-color: rgba(7, 17, 29, .97);
    border-bottom-color: rgba(255, 255, 255, .12);
  }

  .gy-header.is-scrolled .gy-brand img { width: 56px; height: 52px; }
  .gy-header.is-scrolled .gy-brand small { color: rgba(255, 255, 255, .52); }

  .gy-main-nav {
    width: 100%;
    justify-self: stretch;
    justify-content: space-evenly;
    gap: 0;
  }

  .gy-main-nav a {
    min-height: 46px;
    height: 46px;
    padding-inline: 0;
    padding-inline: 12px;
    font-size: 15.5px;
    font-weight: 650;
    white-space: nowrap;
    border-radius: 0;
    transition: color .22s ease, background-color .22s ease, transform .22s ease;
  }

  .gy-header.is-scrolled .gy-main-nav a { min-height: 46px; height: 46px; color: rgba(255, 255, 255, .72); }

  .gy-main-nav a::after {
    display: block;
    right: 12px;
    bottom: 5px;
    left: 12px;
    height: 2px;
    background: var(--gy-lime);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .24s ease;
  }

  .gy-main-nav a:hover,
  .gy-main-nav a:focus-visible {
    color: var(--gy-lime);
    background: transparent;
    outline: 0;
    transform: translateY(-2px);
  }

  .gy-main-nav a[aria-current="true"]::after { transform: scaleX(0); }

  .gy-main-nav a:hover::after,
  .gy-main-nav a:focus-visible::after { transform: scaleX(1); }

  .gy-main-nav a[aria-current="true"] { color: rgba(255, 255, 255, .76); background: transparent; }

  .gy-header-cta {
    display: inline-flex;
    min-width: 126px;
    min-height: 46px;
    justify-self: end;
    justify-content: space-between;
    gap: 18px;
    padding-inline: 20px;
    color: #fff;
    background: var(--gy-red);
    border-radius: 0;
    font-size: 13px;
    font-weight: 800;
  }

  .gy-header.is-scrolled .gy-header-cta { min-height: 46px; }

  .gy-header.is-scrolled .gy-main-nav a:hover,
  .gy-header.is-scrolled .gy-main-nav a:focus-visible {
    color: var(--gy-lime);
    background: transparent;
  }

  .gy-header.is-scrolled .gy-main-nav a[aria-current="true"] { color: rgba(255, 255, 255, .72); background: transparent; }

  .gy-subnav {
    position: fixed;
    z-index: 79;
    top: 88px;
    right: 0;
    left: 0;
    display: block;
    min-height: 0;
    padding: 6px 56px 8px;
    background: rgba(7, 17, 29, .86);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .16);
    backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity .22s ease, visibility .22s ease, transform .22s ease;
  }

  .admin-bar .gy-subnav { top: 120px; }

  .gy-header.is-scrolled + .gy-subnav { top: 88px; background: rgba(7, 17, 29, .93); border-bottom-color: rgba(255, 255, 255, .12); }
  .admin-bar .gy-header.is-scrolled + .gy-subnav { top: 120px; }
  .gy-header.is-scrolled + .gy-subnav a { color: rgba(255, 255, 255, .72); }
  .gy-header.is-scrolled + .gy-subnav a:hover,
  .gy-header.is-scrolled + .gy-subnav a:focus-visible { color: var(--gy-lime); }

  .gy-subnav.is-desktop-open,
  .gy-subnav.is-section-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .gy-subnav__toggle,
  .gy-subnav > small {
    display: none;
  }

  .gy-subnav > div {
    display: flex;
    width: calc(100vw - 112px);
    justify-content: center;
    gap: clamp(18px, 1.8vw, 28px);
    margin-inline: auto;
    border: 0;
  }

  .gy-subnav[data-subnav-key="business"] > div,
  .gy-subnav[data-subnav-key="projects"] > div,
  .gy-subnav[data-subnav-key="company"] > div,
  .gy-subnav[data-subnav-key="community"] > div {
    justify-content: flex-start;
    padding-left: var(--gy-subnav-anchor, 0px);
  }

  .gy-subnav a {
    position: relative;
    display: inline-flex;
    min-height: 34px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding-inline: 4px;
    border: 0;
    border-bottom: 1px solid transparent;
    font-size: 13px;
    white-space: nowrap;
    transition: color .2s ease, background-color .2s ease;
  }

  .gy-subnav a::after {
    display: none;
  }

  .gy-subnav a:hover,
  .gy-subnav a:focus-visible {
    color: var(--gy-lime);
    background: transparent;
    border-bottom-color: var(--gy-lime);
  }

  .gy-nav-hybrid .gy-hero,
  .gy-nav-hybrid .gy-carousel {
    min-height: 100vh;
  }

  .gy-content-section,
  .gy-contact,
  .gy-solar-story {
    scroll-margin-top: 130px;
  }
}

@media (max-width: 1160px) and (min-width: 921px) {
  .gy-header {
    grid-template-columns: 230px minmax(0, 1fr) auto;
    gap: 18px;
    padding-inline: 24px;
  }

  .gy-brand .gy-brand__mark { width: 52px; height: 52px; }
  .gy-brand img { width: 52px; height: 52px; }
  .gy-brand small { display: none; }
  .gy-main-nav { gap: 12px; }
  .gy-main-nav a { padding-inline: 6px; font-size: 14px; }

  .gy-subnav {
    padding-inline: 32px;
  }

  .gy-subnav > div {
    width: calc(100vw - 64px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gy-header.is-category-transitioning::before,
  .gy-main-nav > a.is-category-transitioning::after,
  .gy-header.is-logo-assembling .gy-brand__mark--animated > img,
  .gy-header.is-logo-assembling .gy-brand__assembly,
  .gy-header.is-logo-assembling .gy-brand__piece,
  .gy-header.is-logo-assembling .gy-brand__mark--animated::after {
    animation: none;
  }
}
