/* Homepage section alignment. The background bands span the viewport. */
body.home {
  --ng-home-gutter: clamp(16px, 4%, 64px);
  --ng-home-content: min(1400px, calc(100% - var(--ng-home-gutter) - var(--ng-home-gutter)));
}

/* Some components originally put the side spacing on the section itself. */
body.home #primary :is(#learn.ngbi-impact, #reviews.ng-unified-reviews, #ngq-quote-section.ngq-unified-cta) {
  padding-inline: 0 !important;
}
body.home #primary #learn.ngbi-impact {
  max-width: none;
}

/* Set the outer edges without changing vertical spacing or padding inside cards. */
body.home #primary :is(
  .ngh-hero > .ngh-hero__bottom,
  #home-brands.ngbp-brandshow > .ngbp-shell,
  #services.ngv2-redesign > .ngh-shell,
  #learn > .ngbi-impact-top,
  #learn > .ngbi-impact-grid,
  #learn > .ngbi-impact-pillars,
  #learn > .ngbi-impact-closing,
  #awards > .ngwap-container,
  #featured-projects > .ng-pg-shell,
  #reviews > .ngur-shell,
  .ngh-home-audit-location > .ngh-shell,
  #about > .ngh-heritage-inner,
  #experience > .ngcc__wrap,
  #ai-powered > .ngai-shell,
  #payment-options.ngh-pay-strip > .ngh-pay-strip__inner,
  #texas > .ngh-shell,
  #home-blog > .ng-feature-shell,
  #home-questions > .ng-feature-shell,
  #ngq-quote-section > .ngq-unified-cta__inner
),
body.home footer.ngc-footer > .ngc-footer__inner {
  box-sizing: border-box;
  width: var(--ng-home-content) !important;
  max-width: none !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
}

/* The reviews heading follows the page edge. The cards form a centered reading group. */
body.home #primary #reviews :is(.ngur-picker, .ngur-note) {
  box-sizing: border-box;
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
}
@media (max-width: 760px) {
  body.home #primary #reviews :is(.ngur-picker, .ngur-note) {
    max-width: 620px;
  }
}

/* Wide-screen layouts for the four homepage features. */
@media (min-width: 1024px) {
  body.home #primary #ai-powered > .ngai-shell {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    column-gap: 32px;
  }
  body.home #primary #ai-powered .ngai-body {
    max-width: 50ch;
  }

  body.home #primary #about > .ngh-heritage-inner {
    grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
    gap: clamp(30px, 3vw, 44px);
    min-height: 0;
    padding-block: clamp(40px, 3.6vw, 54px);
  }
  body.home #primary #about .ngh-heritage-city-art {
    align-self: center;
    justify-content: flex-start;
  }
  body.home #primary #about .ngh-heritage-year-art {
    min-height: 0;
  }
  body.home #primary #about .ngh-heritage-year-morph {
    font-size: clamp(156px, 16vw, 235px);
    margin-block: clamp(48px, 4.5vw, 66px) 12px;
  }
  body.home #primary #about .ngh-heritage-nxt-watermark {
    font-size: clamp(200px, 21vw, 300px);
  }
  body.home #primary #about .ngh-heritage-heritage-line {
    margin-top: 20px;
  }
  body.home #primary #about .ngh-heritage-copy {
    max-width: 66ch;
  }

  body.home #primary #reviews :is(.ngur-picker, .ngur-note) {
    max-width: none;
  }
  body.home #primary #reviews .ngur-card {
    padding: clamp(22px, 2vw, 28px);
  }
  body.home #primary #reviews .ngur-summary {
    font-size: 19px;
    line-height: 1.5;
  }

  body.home #primary #learn > .ngbi-impact-grid {
    grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
    column-gap: clamp(24px, 2.25vw, 32px);
  }
  body.home #primary #learn .ngbi-choice-art {
    width: 100%;
    max-width: 650px;
    margin-inline: 0 auto;
  }
  body.home #primary #learn > .ngbi-impact-pillars {
    margin-top: 18px;
    padding-top: 16px;
  }
}

/* Let the original outlined NXT show through behind the animated year. */
body.home #primary #about .ngh-heritage-nxt-watermark {
  -webkit-text-fill-color: transparent !important;
  -webkit-text-stroke: 1px rgba(188, 193, 197, .45) !important;
}

/* Pair the short payment summary with two rows of equal-size methods. */
body.home #primary #payment-options .ngh-pay-strip__inner {
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.6fr) !important;
  gap: clamp(20px, 3.5vw, 56px) !important;
  align-items: center !important;
  padding-block: clamp(20px, 2vw, 30px) !important;
}
body.home #primary #payment-options .ngh-pay-strip__sub {
  max-width: 45ch;
}
body.home #primary #payment-options .ngh-pay-strip__methods ul {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1px !important;
  background: #d9ddde !important;
  border: 1px solid #d9ddde !important;
  border-radius: 10px !important;
  overflow: hidden !important;
}
body.home #primary #payment-options .ngh-pay-strip__methods li {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  min-height: 55px !important;
  gap: 8px !important;
  padding: 7px 4px !important;
  border: 0 !important;
  background: #fff;
}
body.home #primary #payment-options .ngh-pay-strip__methods li::after {
  content: none;
}
body.home #primary #payment-options .ngh-bitcoin-pay-link {
  flex-direction: inherit;
  gap: inherit !important;
  min-height: 44px !important;
}
@media (max-width: 960px) {
  body.home #primary #payment-options .ngh-pay-strip__inner {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 15px !important;
  }
  body.home #primary #payment-options .ngh-pay-strip__sub { max-width: 65ch; }
}
@media (max-width: 620px) {
  body.home #primary #payment-options .ngh-pay-strip__methods li {
    flex-direction: column;
    min-height: 60px !important;
    gap: 5px !important;
  }
}

/* The SVG repeats one chevron pitch per cycle across the full background grid. */
body.home #primary #ngq-quote-section > svg.ngq-unified-cta__logo-watermark {
  left: 0 !important;
  right: 0 !important;
  top: 50% !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 100%;
  transform: translateY(-50%) !important;
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.3), #000 64%);
  mask-image: linear-gradient(90deg, rgba(0,0,0,.3), #000 64%);
  pointer-events: none;
}

/* NXT GEN WEB: three original chevrons move forward through the X.
   Original bitmap pixels are reused. The original image paints during each
   rest period and for reduced motion; both logo links retain their own dimensions. */
.ngc-brand__art {
  position: relative;
  display: block;
  width: 100%;
  isolation: isolate;
  --ngc-logo-cycle: 4.6s;
}
.ngc-brand__art > img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 1;
}
.ngc-brand__motion {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.ngc-logo-motion__arrow {
  transform-box: view-box;
  transform-origin: 0 0;
}
@media (prefers-reduced-motion: no-preference) {
  .ngc-brand__original {
    animation: ngc-logo-original-frame var(--ngc-logo-cycle) steps(1, end) infinite;
  }
  .ngc-brand__motion {
    display: block;
    animation: ngc-logo-moving-frame var(--ngc-logo-cycle) steps(1, end) infinite;
  }
  .ngc-logo-motion__arrow {
    animation-duration: var(--ngc-logo-cycle);
    animation-timing-function: cubic-bezier(.22,.61,.36,1);
    animation-iteration-count: infinite;
  }
  .ngc-logo-motion__arrow--1 { animation-name: ngc-logo-chevron-first; }
  .ngc-logo-motion__arrow--2 { animation-name: ngc-logo-chevron-second; }
  .ngc-logo-motion__arrow--3 { animation-name: ngc-logo-chevron-third; }
}
/* All chevrons return before the exact original bitmap takes over. */
@keyframes ngc-logo-original-frame {
  0%, 31% { opacity: 0; }
  32%, 100% { opacity: 1; }
}
@keyframes ngc-logo-moving-frame {
  0%, 31% { opacity: 1; }
  32%, 100% { opacity: 0; }
}
@keyframes ngc-logo-chevron-first {
  0%, 3% { transform: translateX(0); }
  9%, 12% { transform: translateX(6px); }
  22%, 100% { transform: translateX(0); }
}
@keyframes ngc-logo-chevron-second {
  0%, 5% { transform: translateX(0); }
  12%, 15% { transform: translateX(9px); }
  25%, 100% { transform: translateX(0); }
}
@keyframes ngc-logo-chevron-third {
  0%, 7% { transform: translateX(0); }
  15%, 18% { transform: translateX(12px); }
  29%, 100% { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .ngc-brand__original { animation: none; opacity: 1; }
  .ngc-brand__motion { display: none; animation: none; }
}


/* Match the existing footer logo's footprint. */
.ngc-footer .ngc-footer__logo {
  display: block;
  width: 170px;
  max-width: 100%;
  line-height: 0;
}

/* The compact header contains the brand and the menu toggle. */
@media (max-width:1100px) {
 body.ng-chrome .global-header.ngc-header .ngc-header__inner {
   display:flex;
   align-items:center;
   justify-content:space-between;
   gap:12px;
   width:calc(100% - 36px);
   margin-inline:auto;
 }
 body.ng-chrome .global-header.ngc-header .ngc-desktop-nav,
 body.ng-chrome .global-header.ngc-header .ngc-header__inner > .ngc-quote {
   display:none!important;
 }
 body.ng-chrome .global-header.ngc-header .ngc-mobile {
   margin-inline-start:auto;
   min-width:40px;
 }
}
@media (max-width:600px) {
 body.ng-chrome .global-header.ngc-header .ngc-header__inner {
   width:calc(100% - 28px);
 }
}
/* Center the mobile homepage hero as one cohesive column, not offset by
   the decorative kicker rule or legacy hero flex/width settings. */
@media(max-width:800px) {
 body.home .ngh section.ngh-hero.nghd-hero-classic {
   display:flex;
   flex-direction:column;
   align-items:center;
   justify-content:space-between;
   width:100%;
   margin:0;
   padding-left:0;
   padding-right:0;
   box-sizing:border-box;
   overflow-x:clip;
 }
 body.home .ngh section.ngh-hero.nghd-hero-classic > .ngh-shell.ngh-hero__content {
   position:relative;
   z-index:2;
   display:flex!important;
   flex:1 1 auto;
   flex-direction:column!important;
   align-items:center!important;
   justify-content:center!important;
   gap:0;
   width:calc(100% - 40px)!important;
   max-width:610px!important;
   min-width:0!important;
   margin:0 auto!important;
   padding:10px 0 28px!important;
   text-align:center!important;
   transform:none!important;
   left:auto!important;
   right:auto!important;
 }
 body.home .ngh section.ngh-hero.nghd-hero-classic .ngh-kicker {
   display:block!important;
   width:100%!important;
   max-width:100%!important;
   margin:0 auto 18px!important;
   padding:0!important;
   text-align:center!important;
 }
 body.home .ngh section.ngh-hero.nghd-hero-classic .ngh-kicker::before {display:none!important;content:none!important}
 body.home .ngh section.ngh-hero.nghd-hero-classic h1 {
   display:block!important;
   box-sizing:border-box!important;
   width:100%!important;
   max-width:100%!important;
   margin:0 auto!important;
   padding:0!important;
   text-align:center!important;
   text-wrap:balance;
   overflow-wrap:normal;
 }
 body.home .ngh section.ngh-hero.nghd-hero-classic .ngh-hero__lead {
   display:block!important;
   width:100%!important;
   max-width:600px!important;
   margin:22px auto 0!important;
   padding:0!important;
   text-align:center!important;
 }
 body.home .ngh section.ngh-hero.nghd-hero-classic .ngh-actions {
   display:flex!important;
   align-items:center!important;
   justify-content:center!important;
   width:100%!important;
   max-width:355px!important;
   margin:26px auto 0!important;
   padding:0!important;
   text-align:center!important;
 }
 body.home .ngh section.ngh-hero.nghd-hero-classic .ngh-actions .ngh-btn {
   display:flex!important;
   align-items:center!important;
   justify-content:center!important;
   width:100%!important;
   max-width:355px!important;
   margin:0 auto!important;
   text-align:center!important;
 }
 body.home .ngh section.ngh-hero.nghd-hero-classic .nghd-hero-classic__note {
   width:100%!important;
   max-width:600px!important;
   margin:16px auto 0!important;
   padding:0!important;
   text-align:center!important;
 }
 body.home .ngh section.ngh-hero.nghd-hero-classic .ngh-hero__quicklinks {
   display:flex!important;
   flex-flow:column nowrap!important;
   align-items:center!important;
   justify-content:center!important;
   width:100%!important;
   max-width:100%!important;
   margin:20px auto 0!important;
   text-align:center!important;
 }
 body.home .ngh section.ngh-hero.nghd-hero-classic .ngh-hero__quicklinks > a {
   margin-inline:auto!important;
   justify-content:center;
   max-width:100%;
 }
 body.home .ngh section.ngh-hero.nghd-hero-classic .ngh-hero__bottom {
   width:calc(100% - 40px)!important;
   max-width:610px!important;
   margin-inline:auto!important;
   justify-content:center!important;
   text-align:center!important;
 }
 body.home .ngh section.ngh-hero.nghd-hero-classic .ngh-hero__bottom p {
   width:100%;
   text-align:center!important;
 }
}
@media (max-width:420px) {
 body.home .ngh section.ngh-hero.nghd-hero-classic > .ngh-shell.ngh-hero__content,
 body.home .ngh section.ngh-hero.nghd-hero-classic .ngh-hero__bottom {
   width:calc(100% - 32px)!important;
 }
 body.home .ngh section.ngh-hero.nghd-hero-classic h1 {
   font-size:clamp(37px,9.6vw,44px)!important;
   line-height:1.08!important;
 }
 body.home .ngh section.ngh-hero.nghd-hero-classic .ngh-kicker {font-size:12px!important;line-height:1.45!important}
}
