/* V4 lower-page fidelity pass.
   Scoped to the process, offer cards, final CTA, and the footer trust line. */

#how .process {
  background: linear-gradient(180deg, rgba(5, 28, 22, .96), rgba(3, 23, 18, .96));
}

#how .step {
  border-color: #315a47;
  background:
    radial-gradient(circle at 50% 42%, rgba(118, 230, 72, .15), transparent 34%),
    linear-gradient(180deg, rgba(6, 35, 27, .94), rgba(2, 23, 18, .94));
  box-shadow:
    inset 0 0 24px rgba(52, 143, 77, .08),
    0 0 10px rgba(81, 210, 73, .05);
  text-align: center;
}

#how .step-head {
  position: relative;
  justify-content: center;
}

#how .step-num {
  position: absolute;
  left: 0;
}

#how .step h3 {
  width: 100%;
  text-align: center;
}

#how .step p {
  text-align: center;
}

#how .future {
  margin-inline: auto;
  font-size: 9px;
  font-weight: 600;
}

#how .section-title {
  font-size: 16px;
  font-weight: 600;
}

#how .step-num {
  background: #91df52;
  box-shadow: none;
}

#how .step > svg {
  color: transparent;
  stroke: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: drop-shadow(0 0 4px rgba(133, 229, 77, .22));
}

#how .step:nth-child(1) > svg { background-image: url('../assets/process-1.png'); }
#how .step:nth-child(2) > svg { background-image: url('../assets/process-2.png'); }
#how .step:nth-child(3) > svg { background-image: url('../assets/process-3.png'); }
#how .step:nth-child(4) > svg { background-image: url('../assets/process-4.png'); }
#how .step:nth-child(5) > svg { background-image: url('../assets/process-5.png'); }
#how .step:nth-child(6) > svg { background-image: url('../assets/process-6.png'); }

#services .service {
  position: relative;
  overflow: hidden;
  background: #00110d;
  box-shadow: inset 0 0 22px rgba(18, 65, 46, .12);
}

/* The three V4 illustrations are retained as small decorative sprite crops.
   The cards, copy, and buttons remain native HTML controls. */
#services .service::before {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

#services .service:nth-child(1)::before {
  left: 19px;
  top: 15px;
  width: 91px;
  height: 79px;
  background-image: url('../assets/service-diy.png');
}

#services .service:nth-child(2)::before {
  left: 10px;
  top: 13px;
  width: 78px;
  height: 88px;
  background-image: url('../assets/service-basic.png');
}

#services .service:nth-child(3)::before {
  left: 12px;
  top: 10px;
  width: 68px;
  height: 90px;
  background-image: url('../assets/service-full.png');
}

#services .service > svg {
  opacity: 0;
}

#services .service > div,
#services .service > .service-action {
  position: relative;
  z-index: 3;
}

#services .service-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

#services .service-card-link:focus-visible {
  outline-offset: -3px;
}

#services .service h3 a {
  position: relative;
  z-index: 3;
  color: inherit;
}

#services .service-fit {
  position: absolute;
  left: 10px;
  bottom: 7px;
  z-index: 3;
  height: 20px;
  border: 1px solid;
  border-radius: 2px;
  display: flex;
  align-items: center;
  font-family: "Source Sans 3", sans-serif;
  font-size: 7.5px;
  line-height: 1;
  white-space: nowrap;
  justify-content: center;
  padding: 0;
  font-weight: 500;
  box-shadow: none;
}

#services .service:nth-child(1) .service-fit {
  color: #87c65b;
  border-color: rgba(135, 198, 91, .58);
}

#services .service:nth-child(2) .service-fit {
  color: #c6a634;
  border-color: rgba(198, 166, 52, .56);
}

#services .service:nth-child(3) .service-fit {
  color: #5794bb;
  border-color: rgba(87, 148, 187, .58);
}

#services .service-fit:hover,
#services .service-action:hover,
#services .service h3 a:hover {
  filter: brightness(1.18);
}

.final {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-top-color: #315b48;
  background: #00100d;
}

/* Use V4's exact mascot and dotted globe zones without adding a generic dot
   texture. The center remains live text and a real button. */
.final::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url('../mockup.png') center -1643px / 864px 1821px no-repeat;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0 calc(50% - 432px),
    #000 calc(50% - 432px) calc(50% - 232px),
    transparent calc(50% - 212px) calc(50% + 270px),
    #000 calc(50% + 290px) calc(50% + 432px),
    transparent calc(50% + 432px) 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0 calc(50% - 432px),
    #000 calc(50% - 432px) calc(50% - 232px),
    transparent calc(50% - 212px) calc(50% + 270px),
    #000 calc(50% + 290px) calc(50% + 432px),
    transparent calc(50% + 432px) 100%
  );
}

.final::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 10% 58%, rgba(111, 255, 72, .24), transparent 28%),
    radial-gradient(ellipse at 88% 54%, rgba(34, 255, 137, .2), transparent 36%);
  mix-blend-mode: screen;
  opacity: .35;
  animation: footer-footprint-color 7s ease-in-out infinite alternate;
}

@keyframes footer-footprint-color {
  0% { opacity: .25; filter: hue-rotate(-12deg) saturate(1.05); transform: translateX(-1.5%); }
  50% { opacity: .52; filter: hue-rotate(15deg) saturate(1.35); }
  100% { opacity: .3; filter: hue-rotate(42deg) saturate(1.15); transform: translateX(1.5%); }
}

@media (prefers-reduced-motion: reduce) {
  .final::after { animation: none; }
}

.footer span:first-child {
  display: none;
}

.footer span:last-child {
  font-size: 0;
}

.footer span:last-child::after {
  content: "Free initial scan  •  No account required  •  Takes less than 60 seconds";
  font-size: 8px;
  color: #d5ddd8;
  white-space: nowrap;
}

@media (min-width: 701px) {
  #how .process {
    height: 224px;
    padding: 11px 10px 10px;
  }

  #how .steps {
    height: 180px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 9px;
  }

  #how .step {
    min-height: 0;
    height: 180px;
    padding: 9px;
  }

  #how .step > svg {
    width: 48px;
    height: 48px;
    margin: 7px auto 4px;
  }

  #how .step p {
    margin: 6px 0 0;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.35;
    white-space: nowrap;
  }

  #how .future {
    margin-bottom: 0;
    padding: 3px 5px;
  }

  #how .step h3 {
    font-size: 13.5px;
    font-weight: 700;
  }

  #services .services {
    height: 149px;
    grid-template-columns: 1fr .99fr 1.12fr;
    gap: 9px;
  }

  #services {
    margin-top: 9px;
  }

  #services .service {
    min-height: 0;
    height: 149px;
    padding: 10px;
    grid-template-columns: 91px minmax(0, 1fr);
    grid-template-rows: 1fr 24px;
    gap: 3px 8px;
  }

  #services .service:nth-child(1) {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  #services .service:nth-child(2) {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  #services .service:nth-child(3) {
    grid-template-columns: 75px minmax(0, 1fr);
  }

  #services .service > svg {
    grid-column: 1;
    grid-row: 1;
    width: 82px;
    height: 82px;
  }

  #services .service > div {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    padding-top: 1px;
  }

  #services .service h3 {
    font-family: "Source Sans 3", sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: .005em;
  }

  #services .service ul {
    margin-top: 7px;
    font-family: "Source Sans 3", sans-serif;
    font-size: 9px;
    line-height: 1.42;
    font-weight: 500;
  }

  #services .service .service-action {
    grid-column: 2;
    grid-row: 2;
    width: 102px;
    height: 24px;
    justify-self: end;
    align-self: end;
    padding: 0 6px;
    border: 0;
    border-radius: 2px;
    font-family: "Source Sans 3", sans-serif;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .025em;
    transform: translateY(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
  }

  #services .service:nth-child(1) .service-fit { width: 122px; }
  #services .service:nth-child(2) .service-fit { width: 124px; }
  #services .service:nth-child(3) .service-fit { width: 130px; }

  #services .service:nth-child(1) .service-action {
    color: #06140f;
    background: linear-gradient(90deg, #79d943, #a6ed65);
  }

  #services .service:nth-child(2) .service-action {
    color: #171000;
    background: linear-gradient(90deg, #eaae13, #ffd64b);
  }

  #services .service:nth-child(3) .service-action {
    width: 126px;
    color: #03121b;
    background: linear-gradient(90deg, #429ce9, #74bdff);
  }

  .final {
    width: 100%;
    height: 179px;
    min-height: 179px;
    margin-top: 6px;
    padding: 0;
    display: block;
  }

  .final .mascot {
    visibility: hidden;
  }

  .final > div:last-child {
    position: absolute;
    left: 50%;
    top: 18px;
    width: 440px;
    transform: translateX(-182px);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
  }

  .final h2 {
    font-family: "Source Sans 3", sans-serif;
    font-size: 31px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.025em;
    white-space: nowrap;
    align-self: flex-start;
  }

  .final p {
    margin: 5px 0 10px;
    font-family: "Source Sans 3", sans-serif;
    font-size: 12px;
    font-weight: 600;
    align-self: flex-start;
    margin-left: 27px;
  }

  .bottom-cta {
    width: 313px;
    height: 40px;
    min-height: 40px;
    border-radius: 3px;
    background: linear-gradient(90deg, #75dd3f 0%, #a3ed63 100%);
    font-family: "Source Sans 3", sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .035em;
    align-self: flex-start;
    margin-left: 28px;
  }

  .bottom-cta svg {
    width: 23px;
    height: 23px;
  }

  .footer {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: none;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    justify-content: center;
  }

  .footer span:last-child {
    position: absolute;
    left: 50%;
    bottom: 32px;
    transform: translateX(-150px);
  }

  .footer span:last-child::after {
    font-family: "Source Sans 3", sans-serif;
    font-size: 9px;
    font-weight: 500;
  }
}

@media (max-width: 700px) {
  #how .steps {
    gap: 8px;
  }

  #how .step {
    min-height: 180px;
  }

  #services .service {
    height: 149px;
    min-height: 149px;
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-rows: 1fr 24px;
  }

  #services .service > div {
    grid-column: 2;
    grid-row: 1;
  }

  #services .service .service-action {
    grid-column: 2;
    grid-row: 2;
    width: min(160px, 100%);
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
  }

  .final {
    min-height: 210px;
  }

  .footer span:last-child::after {
    white-space: normal;
    text-align: center;
  }
}
