/* NEXT Hero widget. Colors + fonts come from the site brand kit (--next-* tokens). */
.nx-hero {
  --red: var(--next-red);
  --cyan: var(--next-cyan);
  --grey: var(--next-grey);
  --ink-900: var(--next-panel);
  --ink-800: #141416;
  --muted: #B9B9BE;
  --f-head: var(--next-font-head);
  --f-sub: var(--next-font-sub);
  --f-call: var(--next-font-call);
  --gutter: clamp(16px, 4vw, 56px);
  --header-space: 132px;            /* room for the overlay site header */
  --nx-inset: clamp(28px, 3vw, 56px);  /* copy's left inset inside the stage; mirrored on the right by the side text strip */

  position: relative; overflow: hidden; isolation: isolate;
  box-sizing: border-box;
  min-height: var(--nx-min-h, 800px);   /* set by the widget's Desktop height control */
  padding: var(--header-space) var(--gutter) 72px;
  color: #fff; font-family: var(--f-head);
  background:
    radial-gradient(120% 90% at 100% 100%, color-mix(in srgb, var(--red) 55%, transparent) 0%, color-mix(in srgb, var(--red) 18%, transparent) 32%, transparent 58%),
    linear-gradient(300deg, color-mix(in srgb, var(--red) 18%, #000) 0%, var(--ink-800) 45%, var(--ink-900) 100%);
}
.nx-hero *, .nx-hero *::before, .nx-hero *::after { box-sizing: border-box; }

/* LED pixel field — the brand "Pixel Circle" halftone, rebuilt in CSS */
.nx-hero::before {
  content: ""; position: absolute; z-index: -1;
  right: -140px; bottom: -180px; width: 720px; height: 720px;
  background-image: radial-gradient(circle, rgba(200,200,200,.55) 1.6px, transparent 2.2px);
  background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0,0,0,.6) 35%, transparent 68%), linear-gradient(180deg, #000 45%, transparent 75%);
  -webkit-mask-composite: source-in;
          mask-image: radial-gradient(circle, #000 0%, rgba(0,0,0,.6) 35%, transparent 68%), linear-gradient(180deg, #000 45%, transparent 75%);
          mask-composite: intersect;   /* 75% = the hero's bottom edge, so no dots get cut off there */
  opacity: .5;
}
/* Dot field on the left. Sits above the top fade (z-index 2, painted after it) so it
   runs up behind the header, fading out just before the top edge of the menu bar. */
.nx-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.0625) 1px, transparent 1.4px);
  background-size: 8px 8px;
  -webkit-mask-image:
    linear-gradient(90deg, #000 0%, transparent 55%),
    linear-gradient(180deg, transparent 0, transparent 20px, #000 150px, #000 calc(100% - 200px), transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image:
    linear-gradient(90deg, #000 0%, transparent 55%),
    linear-gradient(180deg, transparent 0, transparent 20px, #000 150px, #000 calc(100% - 200px), transparent 100%);
          mask-composite: intersect;
}

.nx-hero .stage {
  position: relative; max-width: 1480px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 620px; align-items: start;
}
/* Left inset never goes below the header bar's inner padding, so the copy stays
   lined up under the logo at every width */
.nx-hero .copy { position: relative; z-index: 3; padding-block: 28px 120px; padding-left: clamp(28px, 3vw, 56px); max-width: 720px; }

/* Eyebrow stays on one line; type and rule shrink with the column instead of wrapping */
.nx-hero .eyebrow {
  display: flex; align-items: center; gap: 14px; margin: 0 0 18px;
  white-space: nowrap;
  font: 700 clamp(11px, 1.05vw, 13px)/1 var(--f-sub); letter-spacing: .2em; text-transform: uppercase; color: var(--red);
}
.nx-hero .eyebrow::after { content: ""; flex: 0 1 56px; min-width: 24px; height: 2px; background: var(--red); }

.nx-hero h1 {
  margin: 0 0 22px; font-family: var(--f-head); color: #fff;
  font-size: clamp(44px, 6.2vw, 92px); line-height: .98; letter-spacing: -.02em; text-wrap: balance;
}
.nx-hero h1 .l1 { display: block; font-weight: 700; }
.nx-hero h1 .l2 { display: block; font-weight: 300; }
.nx-hero h1 .l2 b { font-weight: 900; color: var(--red); }

.nx-hero .lede { margin: 0 0 34px; max-width: 34em; font: 400 18px/1.65 var(--f-head); color: var(--muted); }

.nx-hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
/* Quote button — red block with a tapered end, cyan arrow block keyed into the
   slant, echoing the red + cyan panels of the NEXT symbol */
.nx-hero .btn { display: inline-flex; align-items: stretch; height: 58px; text-decoration: none; }
.nx-hero .btn-label {
  display: flex; align-items: center; padding: 0 44px 0 28px;
  background: var(--red); color: var(--next-black);   /* black on red = 5.9:1, per the brand kit */
  font: 700 15px/1 var(--f-call); letter-spacing: .08em; text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, calc(100% - 20px) 100%, 0 100%);
  transition: background .2s;
}
.nx-hero .btn-arrow {
  width: 64px; margin-left: -14px; padding-left: 14px;
  display: grid; place-items: center;
  background: var(--cyan);
  clip-path: polygon(20px 0, 100% 0, 100% 100%, 0 100%);
}
.nx-hero .btn-arrow svg { width: 15px; height: 15px; stroke: #000; fill: none; stroke-width: 2.6; transition: transform .25s; }
.nx-hero .btn:hover .btn-label { background: var(--next-red-hover); }
.nx-hero .btn:hover .btn-arrow svg { transform: translateX(4px); }
.nx-hero .btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }

.nx-hero .proof { display: flex; align-items: center; gap: 16px; }
.nx-hero .faces { display: flex; }
.nx-hero .faces img, .nx-hero .faces span {
  width: 54px; height: 54px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--ink-900); margin-left: -14px;
}
.nx-hero .faces img:first-child { margin-left: 0; }
.nx-hero .faces span { display: grid; place-items: center; background: var(--red); font: 700 13px/1 var(--f-call); color: #fff; letter-spacing: .04em; }
.nx-hero .proof p { margin: 0; font: 500 16px/1.4 var(--f-head); color: #fff; }
.nx-hero .proof p small { display: block; font: 400 13px/1.4 var(--f-head); color: var(--muted); }

/* Rotating sign photos. Every layer that paints (photos + red wash) sits inside
   .slides, so the one mask fades all of it into the hero ground — no seam. */
/* --bleed: how far the centered 1480px stage sits in from the screen edge on wide
   monitors, so the photo always runs to the right edge of the window */
.nx-hero .visual {
  --bleed: max(0px, (100vw - 2 * var(--gutter) - 1480px) / 2);
  position: absolute; z-index: 1;
  top: calc(var(--header-space) * -1); bottom: -72px; /* = hero bottom padding: photo ends exactly at the hero edge */
  right: calc(-1 * (var(--gutter) + var(--bleed)));
  left: calc(36% + var(--gutter) + var(--nx-photo-x, -50px));   /* widget "Photo left edge": default 50px left of the column split */
}

/* Black fade across the top so the floating header always sits on solid black */
.nx-hero .topfade {
  position: absolute; z-index: 2; top: 0; left: 0; right: 0;
  height: calc(var(--header-space) + 90px);
  background: linear-gradient(180deg, #000 0%, #000 45%, rgba(0,0,0,.6) 70%, transparent 100%);
  pointer-events: none;
}
.nx-hero .slides {
  position: absolute; inset: 0;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0,0,0,.08) 10.8%, rgba(0,0,0,.3) 23.4%, rgba(0,0,0,.65) 36%, #000 52.2%),
    linear-gradient(0deg, transparent 0%, transparent 5.4%, rgba(0,0,0,.12) 18%, rgba(0,0,0,.5) 32.4%, #000 48.6%),
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,.2) 19.5%, rgba(0,0,0,.65) 36%, #000 50%);
  -webkit-mask-composite: source-in, source-in;
          mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0,0,0,.08) 10.8%, rgba(0,0,0,.3) 23.4%, rgba(0,0,0,.65) 36%, #000 52.2%),
    linear-gradient(0deg, transparent 0%, transparent 5.4%, rgba(0,0,0,.12) 18%, rgba(0,0,0,.5) 32.4%, #000 48.6%),
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,.2) 19.5%, rgba(0,0,0,.65) 36%, #000 50%);
          mask-composite: intersect;
  /* Chrome draws a 1px seam at the left edge of the masked layer; the mask is fully
     transparent there anyway, so clip those 2px off. Reset in the stacked layout. */
  clip-path: inset(0 0 0 2px);
}
.nx-hero .slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.4s ease; }
.nx-hero .slide img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(.92) contrast(1.06) brightness(.9);
  transform: scale(calc(1.02 * var(--nx-photo-zoom, 1)));   /* widget "Photo zoom" */
}
.nx-hero .slide.on { opacity: 1; }
/* The zoom keeps running on the outgoing photo (.leaving) until it has faded out,
   so the image never snaps back to its starting size while visible. */
.nx-hero .slide.on img, .nx-hero .slide.leaving img { animation: nxKenburns var(--nx-zoom, 7.6s) ease-out forwards; }
.nx-hero .tint {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(300deg, color-mix(in srgb, var(--red) 38%, transparent) 0%, transparent 42%);
}
@keyframes nxKenburns { from { transform: scale(calc(1.02 * var(--nx-photo-zoom, 1))); } to { transform: scale(calc(1.1 * var(--nx-photo-zoom, 1))); } }

/* Floating cards — stacked, right-aligned */
.nx-hero .cards {
  position: absolute; z-index: 4; right: calc(var(--bleed) + var(--gutter) + 24px); bottom: 210px; /* lines the stack up with the button row */
  display: flex; flex-direction: column; align-items: flex-end; gap: 18px;
}
.nx-hero .card {
  position: relative;
  background: rgba(255,255,255,.96); color: #111;
  border-radius: 0; padding: 16px 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  outline: 6px solid rgba(255,255,255,.14);
}
.nx-hero .card-spec { width: 210px; animation: nxFloat 6s ease-in-out infinite; }
.nx-hero .card-spec .k { font: 500 12px/1 var(--f-head); color: #6b6b70; margin: 0 0 8px; }
.nx-hero .card-spec .v { font: 900 34px/1 var(--f-head); letter-spacing: -.02em; margin: 0 0 6px; }
.nx-hero .card-spec .v em { font-style: normal; color: var(--red); }
.nx-hero .card-spec p { margin: 0 0 12px; font: 400 13px/1.35 var(--f-head); color: #444; }
.nx-hero .pix { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.nx-hero .pix i { aspect-ratio: 1; border-radius: 2px; background: #e6e6e6; }
.nx-hero .pix i.lit { background: var(--red); }

.nx-hero .card-now { display: flex; align-items: center; gap: 14px; min-width: 300px; padding-bottom: 22px; }
.nx-hero .card-now .dot { width: 44px; height: 44px; flex: none; border-radius: 0; background: #111; display: grid; place-items: center; }
.nx-hero .card-now .dot i { width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 color-mix(in srgb, var(--cyan) 70%, transparent); animation: nxLive 1.8s infinite; }
.nx-hero .card-now .label { font: 700 11px/1 var(--f-sub); letter-spacing: .2em; text-transform: uppercase; color: #8a8a90; margin: 0 0 6px; }
.nx-hero .card-now .name { font: 700 17px/1.2 var(--f-head); margin: 0; }
.nx-hero .card-now .where { font: 400 13px/1.3 var(--f-head); color: #555; margin: 2px 0 0; }
.nx-hero .ticks { position: absolute; left: 18px; right: 18px; bottom: 9px; display: flex; gap: 6px; }
.nx-hero .ticks button { flex: 1; height: 3px; padding: 0; border: 0; border-radius: 0; background: #ddd; cursor: pointer; position: relative; overflow: hidden; }
.nx-hero .ticks button::after { content: ""; position: absolute; inset: 0; background: var(--red); transform: scaleX(0); transform-origin: left; }
.nx-hero .ticks button.on::after { animation: nxFill var(--nx-show, 6s) linear forwards; }
.nx-hero .ticks button.done::after { transform: scaleX(1); }
.nx-hero .ticks button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
@keyframes nxFill { to { transform: scaleX(1); } }
@keyframes nxLive { 70% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--cyan) 0%, transparent); } 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--cyan) 0%, transparent); } }
@keyframes nxFloat { 50% { transform: translateY(-9.6px); } } /* 20% more lift than the original 8px */

/* Side text: a strip beside the photo, as wide as the text inset on the left
   (header bar edge → copy). Only from 1760px, the narrowest width where the text clears the
   footer's floating Get a Quote tab (52px, right edge) by 16px+; below that the photo runs to the edge. */
.nx-hero .side { display: none; }
@media (min-width: 1760px) {
  /* --nx-photo-r: gap between the photo's right edge and the stage's right edge */
  .nx-hero--side { --nx-photo-r: var(--nx-inset); --nx-cards-r: 24px; }
  .nx-hero--side .visual { right: var(--nx-photo-r); }
  .nx-hero--side .cards { right: var(--nx-cards-r); }
  .nx-hero .side {
    --bleed: max(0px, (100vw - 2 * var(--gutter) - 1480px) / 2);
    /* bottom 120px = the copy's bottom padding, so the text starts level with the
       bottom of the round photos / "Trusted nationwide" row and reads upward.
       z-index 3: above the white top fade, so the top of the text isn't washed out */
    position: absolute; z-index: 3; top: 0; bottom: 120px;
    left: calc(100% - var(--nx-photo-r));
    right: calc(-1 * (var(--gutter) + var(--bleed)));
    display: flex; align-items: flex-end; justify-content: center; pointer-events: none;
  }
  .nx-hero .side span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }   /* reads bottom to top */
}
/* Wide screens: the stage and the header bar are both capped at 1480px, so the photo
   and the Featured install card end at the bar's lower-right corner (bar edge minus its
   24px taper, the 19.03° slant). */
@media (min-width: 1920px) {
  .nx-hero--side { --nx-photo-r: 24px; --nx-cards-r: 0px; }
}
.nx-hero .side--faint span { font: 900 clamp(26px, 2.6vw, 38px)/1 var(--f-head); letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
.nx-hero .side--label span { display: flex; align-items: center; gap: 18px; font: 700 13px/1 var(--f-sub); letter-spacing: .2em; text-transform: uppercase; color: var(--next-muted); }
.nx-hero .side--label span::after { content: ""; width: 2px; height: 56px; background: var(--red); }
.nx-hero .side--outline span { font: 900 clamp(26px, 2.6vw, 38px)/1 var(--f-head); letter-spacing: .06em; text-transform: uppercase; color: transparent; -webkit-text-stroke: 1.2px var(--next-muted); }
.nx-hero .side--outline b { font-weight: 900; color: var(--red); -webkit-text-stroke: 0; }

@media (max-width: 1024px) {
  .nx-hero { min-height: 0; padding-bottom: 0; --header-space: 112px; }
  .nx-hero .stage { grid-template-columns: 1fr; min-height: 0; }
  .nx-hero .copy { padding-block: 24px 8px; padding-left: 28px; }
  /* Headline as large as the column allows, up to the desktop size. "impossible"
     (the longest word, weight 900) is ~4.74em wide, so width ÷ 5 keeps it inside. */
  .nx-hero h1 { font-size: min(92px, calc((100vw - 2 * var(--gutter) - 28px) / 5)); }
  .nx-hero .visual { position: relative; top: auto; right: auto; bottom: auto; left: auto; width: auto; height: var(--nx-photo-h, 520px); margin: 0 calc(var(--gutter) * -1); }
  .nx-hero .slides { clip-path: none; }
  .nx-hero .slides {
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 40%, #000 78%, transparent 100%);
            mask-image: linear-gradient(180deg, transparent 0%, #000 40%, #000 78%, transparent 100%);
    -webkit-mask-composite: source-over; mask-composite: add;
  }
  .nx-hero .cards { right: var(--gutter); bottom: 8%; left: var(--gutter); }
  .nx-hero .card-now { min-width: 0; max-width: 100%; }
}
@media (max-width: 560px) {
  .nx-hero { --header-space: 96px; }
  .nx-hero .copy { padding-left: 20px; }
  .nx-hero h1 { font-size: min(78px, calc((100vw - 2 * var(--gutter) - 20px) / 5.88)); }   /* 15% under the column-filling size */
  .nx-hero::after {
    -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 55%), linear-gradient(180deg, transparent 0, transparent 10px, #000 120px, #000 calc(100% - 160px), transparent 100%);
            mask-image: linear-gradient(90deg, #000 0%, transparent 55%), linear-gradient(180deg, transparent 0, transparent 10px, #000 120px, #000 calc(100% - 160px), transparent 100%);
  }
  .nx-hero .lede { font-size: 16px; }
  .nx-hero .eyebrow { font-size: 10px; letter-spacing: .14em; gap: 10px; }
  .nx-hero .card-spec { display: none; }
  .nx-hero .cards { right: 0; }   /* Featured install card flush with the screen's right edge */
  .nx-hero .actions { gap: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .nx-hero .slide { transition: none; }
  .nx-hero .slide.on img, .nx-hero .slide.leaving img, .nx-hero .card-spec, .nx-hero .card-now .dot i, .nx-hero .ticks button.on::after { animation: none; }
  .nx-hero .ticks button.on::after { transform: scaleX(1); }
}

/* ───────── Light option: add class nx-hero--light ───────── */
.nx-hero--light {
  --ink-900: #FFFFFF;
  --muted: var(--next-body);
  color: #111;
  /* no red in the corner; the bottom 30% fades to white so it runs straight into section 2 */
  background:
    linear-gradient(180deg, transparent 70%, #FFFFFF 100%),
    linear-gradient(300deg, #F2F2F3 0%, #F6F6F7 45%, #FFFFFF 100%);
}
.nx-hero--light::before { background-image: radial-gradient(circle, rgba(120,120,126,.5) 1.6px, transparent 2.2px); opacity: .45; }
.nx-hero--light::after { background-image: radial-gradient(circle, rgba(0,0,0,.09) 1px, transparent 1.4px); }
.nx-hero--light h1 { color: #0B0B0C; }
.nx-hero--light .proof p { color: #111; }
.nx-hero--light .topfade { background: linear-gradient(180deg, #fff 0%, #fff 45%, rgba(255,255,255,.6) 70%, transparent 100%); }
.nx-hero--light .tint { display: none; }   /* no red wash over the photos */
.nx-hero--light .slide img { filter: brightness(var(--nx-photo-bright, 1.25)) saturate(1.05) contrast(1.02); } /* photo itself brighter; the edge fade (mask) is unchanged */
/* cards are gray so they stand off the light photo edges */
.nx-hero--light .card { background: var(--next-muted); color: #fff; outline-color: rgba(0,0,0,.06); box-shadow: 0 18px 40px rgba(0,0,0,.22); }
.nx-hero--light .card-spec .k, .nx-hero--light .card-now .label { color: #DEDEE2; }
.nx-hero--light .card-spec p, .nx-hero--light .card-now .where { color: #F0F0F2; }
.nx-hero--light .pix i { background: #85858A; }
.nx-hero--light .card-now .dot { background: #56565B; }
.nx-hero--light .ticks button { background: #8A8A8F; }

/* Widget options */
.nx-hero--no-zoom .slide.on img, .nx-hero--no-zoom .slide.leaving img { animation: none; }
@media (max-width: 1024px) { .nx-hero--hide-cards-mobile .cards { display: none; } }
