/* ==========================================================================
   Residential / Business: "Healthy air for your business too."
   Live: framer-ymzWh component in .framer-1ndhxc4-container (desktop, variant 1br63ak),
   .framer-1gfsrxq-container (tablet, 1cyc5te), .framer-1fb46k6-container (phone, 28euqv).
   Sizes, gaps, paddings and overflow copied from the Framer CSS.
   ========================================================================== */

/* Progress of the button hover, animated as a number so the colour can be mixed like
   framer-motion does (linear-light channels, straight alpha), see .nf-res-business__btn */
@property --nf-res-business-p { syntax: "<number>"; inherits: false; initial-value: 0; }

/* ---------- Desktop (>= 1440px, also the base) ---------- */
.nf-res-business {
  /* Framer in-view fade (opacity only, plays once here), same curve as the other residential text fades */
  --nf-res-business-fade-ease: linear(0, 0.022, 0.078, 0.164, 0.245, 0.345, 0.437, 0.518, 0.601, 0.666, 0.72, 0.773, 0.816, 0.856, 0.886, 0.913, 0.934, 0.949, 0.962, 0.972, 0.979, 0.986, 0.991, 0.994, 0.997, 0.999, 1);
  /* Framer button variant spring (hover), sampled on live: ~0.33s with a ~1.6% overshoot */
  --nf-res-business-btn-ease: linear(0, 0.035 3%, 0.15 7.3%, 0.306 12.4%, 0.455 17.3%, 0.608 22.7%, 0.72 27.6%, 0.816 32.4%, 0.886 37.6%, 0.94 42.7%, 0.973 47.6%, 0.996 52.7%, 1.008 57.9%, 1.016 63%, 1.008 83%, 1);
  position: relative; display: block; width: 100%; height: auto;
}
/* Side edges as "Want to start?" above: 60px at any desktop width, no max width (Danny 2026-11-12; live: 80px, content
   up to 1440px). Tablet 40px and phone 16px already match. */
.nf-res-business__inner {
  position: relative; display: flex; flex-flow: column; justify-content: flex-start; align-items: center; gap: 32px;
  width: 100%; height: min-content; padding: 60px; overflow: clip; background-color: var(--nf-white);
}
.nf-res-business__content {
  position: relative; display: flex; flex-flow: column; justify-content: center; align-items: flex-start; gap: 32px;
  flex: 0 0 auto; width: 100%; max-width: none; height: min-content; padding: 0; overflow: clip;
}
.nf-res-business__head {
  position: relative; display: flex; flex-flow: column; justify-content: center; align-items: center; gap: 20px;
  flex: 0 0 auto; width: 100%; height: min-content; padding: 0; overflow: clip;
}
.nf-res-business__box { position: relative; flex: 0 0 auto; width: 100%; height: auto; }
.nf-res-business__title, .nf-res-business__sub {
  letter-spacing: normal; text-align: start; color: var(--nf-black);
  white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word;
}
.nf-res-business__title {
  font-family: var(--nf-font-sfns-text);
  font-size: 52px; font-weight: 400; line-height: 120%;
  /* regular weight, the same font as "Real Stories from Clean Air Zone Members." (Danny 2026-10-27; live: Medium 500),
     and its 1.2 line height at every size (Nathan 2026-11-12; was 110%) */
}
.nf-res-business__sub {
  font-family: "SF Pro Display Regular", "SF Pro Display Regular Placeholder", sans-serif;
  font-size: 28px; font-weight: 400; line-height: 110%;
}

/* Desktop/tablet: three images in a row (each flex 1 with its own aspect ratio) */
.nf-res-business__cards {
  position: relative; display: flex; flex-flow: column; justify-content: center; align-items: center; gap: 20px;
  flex: 0 0 auto; width: 100%; height: min-content; padding: 0; overflow: clip;
}
.nf-res-business__row {
  position: relative; display: flex; flex-flow: row; justify-content: center; align-items: center; gap: 20px;
  flex: 0 0 auto; width: 100%; height: min-content; padding: 0; overflow: clip;
}
.nf-res-business__frame { position: relative; flex: 1 0 0px; width: 1px; height: auto; overflow: visible; }
.nf-res-business__frame--a { aspect-ratio: 1.39404 / 1; }
.nf-res-business__frame--b { aspect-ratio: 1.41667 / 1; }
.nf-res-business__frame--c { aspect-ratio: 1.40397 / 1; }
.nf-res-business__fill { position: absolute; inset: 0; border-radius: inherit; }
.nf-res-business__img {
  display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; object-position: center;
}

/* CTA: "Tier 2 Black - Eng - Desktop" outline pill, container 24% wide x 54px */
.nf-res-business__cta {
  position: relative; display: flex; flex-flow: row; justify-content: flex-start; align-items: flex-start; gap: 10px;
  flex: 0 0 auto; width: 100%; height: min-content; padding: 0; overflow: visible;
}
.nf-res-business__cta-box { position: relative; flex: 0 0 auto; width: 24%; height: 54px; }
.nf-res-business__btn {
  --nf-res-business-p: 0;
  position: relative; display: flex; flex-flow: row; justify-content: center; align-items: center; gap: 4px;
  width: 100%; height: 100%; padding: 16px 24px; overflow: visible;
  border-radius: 32px; cursor: pointer; text-decoration: none;
  color: rgb(0, 0, 238); /* live <a> keeps the UA link colour (only the invisible 0px border uses it) */
  background-color: rgb(
    calc(245 * sqrt(max(var(--nf-res-business-p), 0)))
    calc(245 * sqrt(max(var(--nf-res-business-p), 0)))
    calc(245 * sqrt(max(var(--nf-res-business-p), 0))) / clamp(0, var(--nf-res-business-p), 1));
  transition: --nf-res-business-p 0.33s var(--nf-res-business-btn-ease);
}
.nf-res-business__btn::after {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; box-sizing: border-box;
  border: 0.8px solid var(--nf-black); border-radius: inherit; pointer-events: none;
}
.nf-res-business__btn-label { position: relative; flex: 0 0 auto; width: auto; height: auto; white-space: pre; }
.nf-res-business__btn-text {
  font-family: "SF Pro Display Regular", "SF Pro Display Regular Placeholder", sans-serif;
  font-size: 21px; font-weight: 400; line-height: 120%; letter-spacing: normal; color: var(--nf-black); white-space: pre;
}
@media (hover: hover) and (min-width: 810px) { .nf-res-business__btn:hover { --nf-res-business-p: 1; } }
.nf-res-business__btn:focus-visible { outline: 2px solid var(--nf-black); outline-offset: 2px; }

/* In-view fade, once: the heading and line fade in when >= 50% visible and stay */
.nf-res-business.is-js .nf-res-business__fade { opacity: 0; transition: opacity 0.433s var(--nf-res-business-fade-ease); }
.nf-res-business.is-js .nf-res-business__fade.is-in { opacity: 1; }

/* Phone carousel (hidden above 810 via nf-hide-*; styled here, sized in the phone block) */
.nf-res-business__carousel { position: relative; flex: 0 0 auto; width: 100%; height: 259px; }
.nf-res-business__viewport { position: relative; display: flex; width: 100%; height: 100%; padding: 0 0 24px 16px; overflow: hidden; }
.nf-res-business__track {
  position: relative; display: flex; flex-direction: row; align-items: flex-start; flex: 1 1 100%;
  width: 100%; height: 100%; gap: 16px; margin: 0; padding: 0; list-style: none; border-radius: 0;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nf-res-business__track::-webkit-scrollbar { display: none; width: 0; height: 0; }
.nf-res-business__slide { flex-shrink: 0; scroll-snap-align: center; scroll-snap-stop: always; }
.nf-res-business__slide .nf-res-business__frame { flex: 0 0 auto; width: 298px; }
.nf-res-business__slide .nf-res-business__frame--a { width: 297px; }
.nf-res-business__controls {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: row;
  justify-content: space-between; align-items: center; margin: 0; padding: 20px; border: 0; min-width: 0;
  pointer-events: none;
}
.nf-res-business__dots {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  display: flex; flex-direction: row; justify-content: center; align-items: center; overflow: hidden;
  border-radius: 50px; background-color: rgba(0, 0, 0, 0); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); pointer-events: auto;
}
.nf-res-business__dot-btn {
  display: flex; justify-content: center; align-items: center; margin: 0; padding: 10px 5px; overflow: hidden;
  background: transparent; cursor: pointer;
}
.nf-res-business__dot-btn--first { padding: 10px 5px 10px 10px; }
.nf-res-business__dot-btn--last { padding: 10px 10px 10px 5px; }
.nf-res-business__dot-btn:focus-visible { outline: 2px solid var(--nf-black); outline-offset: 2px; }
.nf-res-business__dot { display: block; width: 5px; height: 5px; border-radius: 50%; background-color: var(--nf-grey-61); opacity: 0.5; }
.nf-res-business__dot-btn.is-active .nf-res-business__dot { opacity: 1; }

/* ---------- Tablet (810 to 1439.98) ---------- */
@media (min-width: 810px) and (max-width: 1439.98px) {
  /* Live fixes the content box at 810 x 392px and clips it, cutting the top of the heading and the button and
     leaving small images. Danny (2026-10-26): the content now takes the full width with the 40px side margins of
     the section above (steps), its own height, larger images, and a button that hugs its label. */
  .nf-res-business__inner { padding: 60px 40px; }
  .nf-res-business__content { max-width: none; height: min-content; gap: 28px; }
  .nf-res-business__head { gap: 12px; }
  .nf-res-business__title { font-size: 42px; }
  .nf-res-business__sub { font-size: 24px; line-height: 125%; }
  .nf-res-business__row { gap: 16px; }
  .nf-res-business__cta-box { width: auto; }
}

/* ---------- Phone (<= 809.98) ---------- */
@media (max-width: 809.98px) {
  .nf-res-business__inner { padding: 0; }
  .nf-res-business__content { max-width: none; gap: 24px; }
  .nf-res-business__head { align-items: flex-start; gap: 12px; padding: 32px 16px 0; }
  .nf-res-business__title { font-size: 28px; }
  .nf-res-business__sub { font-size: 16px; line-height: 20px; }
  .nf-res-business__cta { align-items: center; padding: 0 16px 32px; }
  .nf-res-business__cta-box { width: auto; height: auto; }
  /* "Tier 2 Black - Eng - Mobile": no hover, the pressed state shows the hover colour */
  .nf-res-business__btn { height: min-content; max-height: 35px; padding: 16px; }
  .nf-res-business__btn:active { --nf-res-business-p: 1; }
  .nf-res-business__btn-text { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .nf-res-business.is-js .nf-res-business__fade { opacity: 1; transition: none; }
  .nf-res-business__btn { transition: none; }
}

/* Phone carousel (Danny, 2026-10-19): the strip runs edge to edge, so with card 2 centred, cards 1 and 3 peek in on
   both sides (live clips everything left of 16px). Card 1 rests at 16px, card 3 at 16px from the right; the peeking
   cards can be tapped, and a mouse can drag the strip (80-business.js). */
.nf-res-business__viewport { padding: 0 0 24px; }
.nf-res-business__track { padding: 0 16px; scroll-padding-inline: 16px; overscroll-behavior-x: contain; }
.nf-res-business__slide:first-child { scroll-snap-align: start; }
.nf-res-business__slide:last-child { scroll-snap-align: end; }
.nf-res-business__slide.is-side { cursor: pointer; }
.nf-res-business__track.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; -webkit-user-select: none; }
.nf-res-business__track img { -webkit-user-drag: none; }

/* The outline button's bottom edge sat on this box's clip edge and was shaved off at 1280 and 1440 (QC 2026-10-28). */
.nf-res-business__content { overflow: visible; }
