/* ==========================================================================
   20 Solution Cards (residential): "With Clean Air Zone, we tackle indoor air pollution for you ..."
   Live: Framer [Solution Cards] (desktop, tablet) and a "Mobile" component on phone.
   Desktop: three static cards. Tablet and phone: Framer Carousel (native scroll-snap, arrows, page dots).
   ========================================================================== */

.nf-res-cards {
  --nf-res-cards-reveal: linear(0, 0.034, 0.114, 0.218, 0.328, 0.437, 0.537, 0.626, 0.703, 0.767, 0.82, 0.864, 0.898, 0.925, 0.946, 0.962, 0.974, 0.983, 0.989, 0.993, 0.997, 0.999, 1, 1, 1);
  --nf-res-cards-shadow: rgba(0, 0, 0, 0.05) 0px 0.796192px 2.38858px -0.625px, rgba(0, 0, 0, 0.05) 0px 2.41451px 7.24352px -1.25px,
                         rgba(0, 0, 0, 0.05) 0px 6.38265px 19.148px -1.875px, rgba(0, 0, 0, 0.05) 0px 20px 60px -2.5px;
  --nf-res-cards-text: SFProText-Regular, "SF Pro Text", "Nafas Inter", sans-serif;
  --nf-res-cards-medium: "SF Pro Display Medium", "SF Pro Display Medium Placeholder", -apple-system, "system-ui", sans-serif;
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 60px; width: 100%; padding: 80px 60px; background-color: var(--nf-white); overflow: visible;
}

/* Heading */
.nf-res-cards__head {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 10px; width: 100%; padding: 0 60px; overflow: hidden;
}
.nf-res-cards__head-inner { position: relative; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 10px; width: 100%; overflow: hidden; }
.nf-res-cards__title-wrap { position: relative; flex: 1 0 0px; width: 1px; max-width: 100%; }
.nf-res-cards__title {
  font-family: var(--nf-res-cards-text); font-size: 42px; font-weight: 400; line-height: 50.4px; color: var(--nf-black);
  text-align: left; white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word;
}
.nf-res-cards__title-muted { color: var(--nf-grey-61); }

/* Reveal: opacity spring stiffness 200, damping 25.5 (measured), replays at the 50% visibility line */
.nf-res-cards [data-nf-res-cards-reveal] { opacity: 0; transition: opacity 0.48s var(--nf-res-cards-reveal); }
.nf-res-cards [data-nf-res-cards-reveal].is-in { opacity: 1; }

/* Card (shared) */
.nf-res-cards__card {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  padding: 0; border-radius: 18px; background-color: var(--nf-white); box-shadow: var(--nf-res-cards-shadow); overflow: hidden;
}
.nf-res-cards__top {
  position: relative; flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
  gap: 20px; width: 100%; padding: 40px; background-color: var(--nf-black); overflow: hidden;
}
.nf-res-cards__name { font-family: var(--nf-res-cards-medium); font-size: 28px; font-weight: 400; line-height: 33.6px; color: var(--nf-white); white-space: pre; }
.nf-res-cards__name--soft { color: var(--nf-grey-f5); }
.nf-res-cards__desc {
  width: 100%; font-family: var(--nf-font-sfns-display); font-size: 21px; font-weight: 400; line-height: 25.2px; color: var(--nf-grey-9e);
  white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word;
}
.nf-res-cards__media { position: relative; flex: 1 0 0px; width: 100%; height: 1px; overflow: hidden; }
.nf-res-cards__media--shadow { box-shadow: var(--nf-res-cards-shadow); }
.nf-res-cards__media--app { background-color: var(--nf-black); }
.nf-res-cards__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.nf-res-cards__hardware { position: absolute; overflow: hidden; }
.nf-res-cards__hardware img { object-position: 50% 100%; }
.nf-res-cards__phone { position: absolute; flex: 0 0 auto; }
.nf-res-cards__phone--a { aspect-ratio: 0.501424 / 1; }
.nf-res-cards__phone--a img { object-fit: contain; }
.nf-res-cards__phone--b { aspect-ratio: 0.484536 / 1; }
.nf-res-cards__aria { position: absolute; aspect-ratio: 0.666667 / 1; height: auto; overflow: visible; }

/* ---------- Desktop (>= 1440px) ---------- */
.nf-res-cards__stack {
  position: relative; display: flex; flex-direction: row; align-items: center; justify-content: flex-start;
  gap: 40px; width: 100%; padding: 10px 60px 20px; overflow: hidden;
}
.nf-res-cards__stack .nf-res-cards__card { flex: 1 0 0px; width: 1px; height: 450px; }
.nf-res-cards__stack .nf-res-cards__top { height: 220px; }
.nf-res-cards__stack .nf-res-cards__media--app { overflow: visible; }
.nf-res-cards__stack .nf-res-cards__hardware { width: 100%; height: 275%; top: -82.8261%; left: 0.134051%; }
.nf-res-cards__stack .nf-res-cards__phone--a { top: -4px; bottom: -163px; left: -15px; width: auto; }
.nf-res-cards__stack .nf-res-cards__phone--b { top: -3px; bottom: -177px; right: -19px; width: auto; }
.nf-res-cards__stack .nf-res-cards__aria { top: -705px; left: -152px; right: -337px; }

/* ---------- Carousel (tablet and phone): Framer Carousel markup and behaviour ---------- */
.nf-res-cards__carousel { position: relative; flex: 0 0 auto; width: 100%; }
.nf-res-cards__viewport { position: relative; display: flex; width: 100%; height: 100%; overflow: hidden; }
.nf-res-cards__track {
  position: relative; display: flex; flex-direction: row; align-items: flex-start; flex: 1 1 100%; width: 100%; height: 100%;
  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-cards__track::-webkit-scrollbar { display: none; width: 0; height: 0; }
.nf-res-cards__slide { flex-shrink: 0; scroll-snap-align: center; scroll-snap-stop: always; }
.nf-res-cards__carousel--p .nf-res-cards__slide { scroll-snap-align: end; }
.nf-res-cards__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;
}
/* Arrows: fade with the carousel's spring (same curve measured on the home carousel), tap scale 0.9 */
.nf-res-cards__arrow {
  display: block; width: 40px; height: 40px; margin: 0; padding: 0; border: none; border-radius: 40px;
  background: rgba(0, 0, 0, 0.2); overflow: hidden; cursor: pointer; pointer-events: auto; opacity: 1; transform: none;
  transition: opacity 0.75s linear(0, 0.025 1.3%, 0.081 2.7%, 0.148 4%, 0.253 6%, 0.35 8%, 0.464 10.7%, 0.559 13.3%, 0.655 16.7%, 0.73 20%, 0.799 24%, 0.85 28%, 0.899 33.3%, 0.938 40%, 0.962 46.7%, 0.977 53.3%, 0.988 62.7%, 0.995 73.3%, 0.998 86.7%, 1),
              transform 0.05s cubic-bezier(0.25, 1, 0.5, 1);
}
.nf-res-cards__arrow img { display: block; width: 40px; height: 40px; }
.nf-res-cards__arrow:active { transform: scale(0.9); }
.nf-res-cards__arrow.is-off { opacity: 0; pointer-events: none; cursor: default; }
/* Touch devices: live renders no arrow buttons (swipe the native scroller; dots stay) */
@media not all and (pointer: fine) { .nf-res-cards__arrow { display: none; } }
.nf-res-cards__arrow:focus-visible, .nf-res-cards__dot-btn:focus-visible { outline: 2px solid var(--nf-black); outline-offset: 2px; } /* keyboard ring (not on live) */
.nf-res-cards__dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: row;
  place-content: center; place-items: center; overflow: hidden; border-radius: 50px; pointer-events: auto;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.nf-res-cards__dot-btn {
  display: flex; place-content: center; place-items: center; margin: 0; padding: 10px 5px; border: none;
  background: transparent; overflow: hidden; cursor: pointer;
}
.nf-res-cards__dot-btn:first-child { padding: 10px 5px 10px 10px; }
.nf-res-cards__dot-btn:last-child { padding: 10px 10px 10px 5px; }
.nf-res-cards__dot { display: block; border-radius: 50%; opacity: 0.5; cursor: pointer; }
.nf-res-cards__dot.is-on { opacity: 1; }

/* ---------- Tablet (810px to 1439.98px) ---------- */
@media (min-width: 810px) and (max-width: 1439.98px) {
  .nf-res-cards { padding: 60px 40px; }
}
.nf-res-cards__carousel--t { height: 480px; }
.nf-res-cards__carousel--t .nf-res-cards__viewport { padding: 0 0 0 60px; }
.nf-res-cards__carousel--t .nf-res-cards__track { gap: 10px; }
.nf-res-cards__carousel--t .nf-res-cards__card { width: 440px; height: 400px; justify-content: flex-start; }
.nf-res-cards__carousel--t .nf-res-cards__card--devices { background-color: var(--nf-black); }
.nf-res-cards__carousel--t .nf-res-cards__card--devices .nf-res-cards__top { background-color: transparent; }
.nf-res-cards__carousel--t .nf-res-cards__card--devices .nf-res-cards__media { flex: 0 0 auto; height: 177px; }
.nf-res-cards__carousel--t .nf-res-cards__hardware { inset: -140px -8px -263px -2px; }
.nf-res-cards__carousel--t .nf-res-cards__phone--a { width: 191px; height: auto; bottom: -168px; left: 22px; }
.nf-res-cards__carousel--t .nf-res-cards__phone--b { width: 191px; height: auto; bottom: -181px; left: 229px; }
.nf-res-cards__carousel--t .nf-res-cards__aria { top: -745px; left: -202px; right: -287px; }
.nf-res-cards__carousel--t .nf-res-cards__dots { background-color: rgba(0, 0, 0, 0.2); }
.nf-res-cards__carousel--t .nf-res-cards__dot { width: 10px; height: 10px; background-color: var(--nf-white); }

/* ---------- Phone (<= 809.98px) ---------- */
@media (max-width: 809.98px) {
  .nf-res-cards { gap: 40px; padding: 0; background-color: transparent; isolation: isolate; }
  .nf-res-cards__bg { position: absolute; inset: 0; z-index: -1; background-color: var(--nf-white); }
  .nf-res-cards__head { padding: 0; }
  .nf-res-cards__head-inner { padding: 32px 16px 0; overflow: visible; }
  .nf-res-cards__title { font-family: var(--nf-font-sfns-text); font-size: 24px; line-height: 28.8px; }
}
.nf-res-cards__carousel--p {
  --nf-res-cards-shadow: rgba(0, 0, 0, 0.09) 0px 0.796192px 2.38858px -1.125px, rgba(0, 0, 0, 0.08) 0px 2.41451px 7.24352px -2.25px,
                         rgba(0, 0, 0, 0.06) 0px 6.38265px 19.148px -3.375px, rgba(0, 0, 0, 0.01) 0px 20px 60px -4.5px;
  height: 392px;
}
.nf-res-cards__carousel--p .nf-res-cards__track { gap: 20px; }
.nf-res-cards__wrap { position: relative; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 10px; width: min-content; height: 340px; }
.nf-res-cards__wrap--first { padding: 0 0 0 16px; overflow: clip; }
.nf-res-cards__wrap--last { padding: 0 20px 0 0; overflow: hidden; }
.nf-res-cards__carousel--p .nf-res-cards__card { flex: 0 0 auto; width: 310px; height: 340px; background-color: var(--nf-black); }
.nf-res-cards__carousel--p .nf-res-cards__top { background-color: transparent; }
.nf-res-cards__carousel--p .nf-res-cards__card--devices .nf-res-cards__top { flex: 1 0 0px; height: 1px; }
.nf-res-cards__carousel--p .nf-res-cards__name {
  font-family: "SF Pro Display Medium", "SF Pro Display Medium Placeholder", sans-serif; font-size: 21px; font-weight: 500; line-height: 25.2px;
}
.nf-res-cards__carousel--p .nf-res-cards__desc {
  font-family: SFProDisplay-Regular, "SF Pro Display", "SF Pro Display Regular", sans-serif; font-size: 16px; line-height: 19.2px;
}
.nf-res-cards__carousel--p .nf-res-cards__media { flex: 0 0 auto; height: 177px; background-color: transparent; }
.nf-res-cards__carousel--p .nf-res-cards__card--devices .nf-res-cards__media { height: 189px; }
.nf-res-cards__carousel--p .nf-res-cards__hardware { inset: -180px 0 -208px -2px; }
.nf-res-cards__carousel--p .nf-res-cards__phone--a { width: 179px; height: auto; bottom: -185px; left: -25px; }
.nf-res-cards__carousel--p .nf-res-cards__phone--b { width: 179px; height: auto; bottom: -197px; right: -35px; }
.nf-res-cards__carousel--p .nf-res-cards__aria { top: -655px; left: -197px; right: -277px; }
.nf-res-cards__carousel--p .nf-res-cards__dot { width: 5px; height: 5px; background-color: var(--nf-grey-61); }

@media (prefers-reduced-motion: reduce) {
  .nf-res-cards [data-nf-res-cards-reveal] { opacity: 1; transition: none; }
  .nf-res-cards__arrow { transition: none; }
}

/* Phone carousel steps card by card (Danny, 2026-10-19): card 1 rests at 16px, card 2 is centred with cards 1 and 3
   peeking on both sides, card 3 rests 16px from the right; dots and arrows follow the card in view, peeking cards can
   be tapped and a mouse can drag the strip (20-solution-cards.js, data-cards). Live snaps card 2 flush right. */
.nf-res-cards__carousel--p .nf-res-cards__slide { scroll-snap-align: center; }
.nf-res-cards__carousel--p .nf-res-cards__slide:first-child { scroll-snap-align: start; }
.nf-res-cards__carousel--p .nf-res-cards__slide:last-child { scroll-snap-align: end; }
.nf-res-cards__carousel--p .nf-res-cards__wrap--last { padding-right: 16px; }
.nf-res-cards__carousel--p .nf-res-cards__track { overscroll-behavior-x: contain; }
.nf-res-cards__carousel--p .nf-res-cards__slide.is-side { cursor: pointer; }
.nf-res-cards__carousel--p .nf-res-cards__track.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; -webkit-user-select: none; }
.nf-res-cards__carousel--p .nf-res-cards__track img { -webkit-user-drag: none; }
