/* ==========================================================================
   Residential hero "Healthy Air. One Monthly Plan"
   Live: component DtjB9. Desktop variant "default - desktop" in framer-yj6qt0-container (100vh),
   tablet variant "default - tablet" in framer-1jb769h-container, phone frame framer-g318ny "Hero Mobile"
   with card component qNsvx "ID EN - Mobile".
   Behaviour (measured on live, reproduced in js/10-hero.js):
   - load fade (no replay on scroll), see "Load animation" below
   - press ticker scrolls left at 20px/s, loop 544px, no hover change
   - app slideshow advances every 2s (spring, ~0.8s), dots cross-fade, dot click jumps, no hover pause
   ========================================================================== */

.nf-res-hero { position: relative; width: 100%; isolation: isolate; }

.nf-res-hero__title { white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word; color: var(--nf-white); }
.nf-res-hero__sub   { white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word; color: var(--nf-white); }
.nf-res-hero__title-box, .nf-res-hero__sub-box { position: relative; flex: none; width: 100%; }
/* live keeps will-change: transform on the title wrapper and the buttons group (same text rasterisation) */
.nf-res-hero__title-box, .nf-res-hero__buttons { will-change: transform; }

/* ---------- Buttons (component j74DL "Tier 1" green pill, "Tier 2 White" outline pill) ---------- */
.nf-res-hero__btn {
  position: relative; flex: none;
  display: flex; flex-direction: row; align-items: center; justify-content: center;
  border-radius: 32px; cursor: pointer; text-decoration: none; overflow: visible;
  color: rgb(0, 0, 238); /* Framer leaves the UA link colour on the <a>; labels set their own colour */
}
.nf-res-hero__btn p { font-family: var(--nf-font-regular); font-weight: 400; letter-spacing: normal; white-space: pre; }
.nf-res-hero__btn--green { background-color: var(--nf-green); }
.nf-res-hero__btn--green p { color: var(--nf-black); }
.nf-res-hero__btn--outline { background-color: rgba(0, 0, 0, 0); }
.nf-res-hero__btn--outline p { color: var(--nf-white); }
.nf-res-hero__btn--outline::after {
  content: ""; position: absolute; inset: 0; border: 1px solid var(--nf-white); border-radius: 32px; pointer-events: none;
}
/* large (desktop + tablet): 54px tall, 211px fixed for "See plans", auto for "Speak to an expert" */
.nf-res-hero__btn--lg { height: 54px; padding: 16px 24px; }
.nf-res-hero__btn--lg p { font-size: 21px; line-height: 1.2; }
.nf-res-hero__btn--lg.nf-res-hero__btn--green { width: 211px; gap: 10px; }
.nf-res-hero__btn--lg.nf-res-hero__btn--outline { width: auto; gap: 4px; }
/* small (phone): 148 x 35 */
.nf-res-hero__btn--sm { width: 148px; max-height: 35px; padding: 16px; }
.nf-res-hero__btn--sm p { font-size: 15px; line-height: 1.2; }
.nf-res-hero__btn--sm.nf-res-hero__btn--green { height: min-content; gap: 5px; }
.nf-res-hero__btn--sm.nf-res-hero__btn--outline { height: 35px; gap: 4px; }

/* Hover (measured on live): green pill #91c851 -> rgb(165,207,118); outline pill fills rgb(245,245,245)
   and its label turns black at once. Both background changes are a ~0.2s spring. */
.nf-res-hero__btn { transition: background-color 0.2s linear(0, 0.0655 10%, 0.2309 20%, 0.4130 30%, 0.5837 40%, 0.7309 50%, 0.8364 60%, 0.9110 70%, 0.9614 80%, 0.9919 90%, 1); }
@media (hover: hover) {
  .nf-res-hero__btn--green:hover { background-color: rgb(165, 207, 118); }
  .nf-res-hero__btn--outline:hover { background-color: rgb(245, 245, 245); }
  .nf-res-hero__btn--outline:hover p { color: var(--nf-black); }
}
.nf-res-hero__btn:focus-visible { outline: 2px solid var(--nf-white); outline-offset: 2px; }

/* ---------- Press ticker ("As seen in:") ---------- */
.nf-res-hero__ticker {
  position: relative; flex: none;
  display: flex; flex-direction: row; align-items: center; justify-content: flex-start;
  padding: 0 0 0 20px;
  background-color: rgba(255, 255, 255, 0.3); border-radius: 18px; overflow: hidden; will-change: transform;
}
.nf-res-hero__seen {
  position: relative; flex: none;
  font-family: var(--nf-font-sfns-display); font-weight: 400; line-height: 1.2; letter-spacing: normal;
  color: var(--nf-white); white-space: pre; text-align: start;
}
.nf-res-hero__marquee { position: relative; flex: none; width: 483px; }
.nf-res-hero__marquee-clip {
  display: flex; place-items: center;
  width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  margin: 0; padding: 10px; overflow: hidden;
  opacity: 0; /* Framer Ticker shows its logos once measured (instant, at load start) */
}
.nf-res-hero.is-loaded .nf-res-hero__marquee-clip { opacity: 1; }
.nf-res-hero__marquee-track {
  position: relative;
  display: flex; flex-direction: row; place-items: center; gap: 20px;
  width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  margin: 0; padding: 0; list-style: none; will-change: transform;
  /* one loop = 6 logos (424px) + 6 gaps of 20px = 544px; at 20px/s that is 27.2s */
  animation: nf-res-hero-ticker 27.2s linear infinite;
  animation-play-state: paused;
}
.nf-res-hero__marquee-clip.is-running .nf-res-hero__marquee-track { animation-play-state: running; }
.nf-res-hero__marquee-track > li { flex: none; }
@keyframes nf-res-hero-ticker { from { transform: translateX(0); } to { transform: translateX(-544px); } }

.nf-res-hero__logo { position: relative; flex: none; }
.nf-res-hero__logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.nf-res-hero__logo--nikkei     { width: 76px;  aspect-ratio: 5.40323 / 1; }
.nf-res-hero__logo--prestige   { width: 72px;  aspect-ratio: 5.97826 / 1; }
.nf-res-hero__logo--natgeo     { width: 65px;  height: 19px; background: url("../../../assets/images/press-natgeo-phone.svg") 0 0 / 100% 100% no-repeat; }
.nf-res-hero__logo--techinasia { width: 105px; aspect-ratio: 5.53875 / 1; }
.nf-res-hero__logo--fortune    { width: 63px;  aspect-ratio: 4.1958 / 1; }
.nf-res-hero__logo--dealstreet { width: 43px;  aspect-ratio: 1 / 1; }

/* ---------- App slideshow (Framer Slideshow, 4 slides x 4 copies) ---------- */
.nf-res-hero__ss { position: relative; flex: none; user-select: none; }
.nf-res-hero__ss-clip {
  position: absolute; inset: 0; overflow: hidden; border-radius: 20px; perspective: 200px;
}
.nf-res-hero__ss-track {
  display: flex; flex-direction: row; place-items: center; gap: 10px;
  width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  margin: 0; padding: 0; list-style: none;
  transform: translateX(calc(var(--nf-res-ss-index, 4) * -1 * (100% + 10px)));
}
.nf-res-hero__ss-track.is-moving {
  transition: transform 0.8s linear(0, 0.0279 3.1%, 0.0996 6.2%, 0.2107 9.4%, 0.3245 12.5%, 0.4418 15.6%, 0.5551 18.8%, 0.6514 21.9%, 0.7388 25%, 0.8044 28.1%, 0.8653 31.2%, 0.9085 34.4%, 0.9427 37.5%, 0.9689 40.6%, 0.9885 43.8%, 1.0002 46.9%, 1.0083 50%, 1.0124 53.1%, 1.0147 56.2%, 1.0151 59.4%, 1.0143 62.5%, 1.0130 65.6%, 1.0114 68.8%, 1.0096 71.9%, 1.0078 75%, 1.0061 78.1%, 1.0048 81.2%, 1.0036 84.4%, 1.0026 87.5%, 1.0018 90.6%, 1.0012 93.8%, 1.0007 96.9%, 1);
}
.nf-res-hero__ss-item {
  position: relative; flex: none; width: 100%; height: 100%; border-radius: 20px;
  visibility: hidden; /* JS shows the current slide and ceil(viewport / step) either side, like Framer */
}
.nf-res-hero__ss-item.is-near { visibility: visible; }
.nf-res-hero__ss-img { position: absolute; inset: 0; border-radius: inherit; }
.nf-res-hero__ss-img img {
  display: block; width: 100%; height: 100%;
  border-radius: inherit; object-fit: contain; object-position: center;
}
.nf-res-hero__ss-dots {
  position: absolute; left: 50%; bottom: -22px; transform: translateX(-50%);
  display: flex; flex-direction: row; align-items: center; justify-content: center;
  border-radius: 50px; background-color: rgba(0, 0, 0, 0.2); overflow: hidden;
  opacity: 0; will-change: transform;
}
.nf-res-hero__ss-dot { display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; padding: 6px 5px; }
.nf-res-hero__ss-dot:first-child { padding-left: 6px; }
.nf-res-hero__ss-dot:last-child { padding-right: 6px; }
.nf-res-hero__ss-dot span {
  display: block; width: 5px; height: 5px; border-radius: 50%; background-color: var(--nf-white); opacity: 0.5;
  transition: opacity 0.3s linear(0, 0.1045 6.7%, 0.2125 13.3%, 0.3081 20%, 0.4004 26.7%, 0.4902 33.3%, 0.5714 40%, 0.6472 46.7%, 0.7199 53.3%, 0.7848 60%, 0.8455 66.7%, 0.8967 73.3%, 0.9366 80%, 0.9702 86.7%, 0.9913 93.3%, 1);
}
.nf-res-hero__ss-dot.is-active span { opacity: 1; }
.nf-res-hero__ss-dot:focus-visible { outline: 2px solid var(--nf-white); outline-offset: -2px; border-radius: 50px; }

/* ==========================================================================
   Desktop (>= 1440)
   ========================================================================== */
.nf-res-hero__desk {
  position: relative; width: 100%; height: 100vh;
  display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 64px;
  overflow: clip;
}
.nf-res-hero__frame {
  position: relative; flex: 1 0 0; width: 1px; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 0 0 64px; overflow: hidden;
}
.nf-res-hero__bg { position: absolute; inset: 0; }
.nf-res-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }
.nf-res-hero__base {
  position: relative; z-index: 2; flex: none;
  display: flex; flex-direction: row; align-items: flex-start; justify-content: space-between;
  width: 100%; max-width: 1380px; height: 700px; padding: 128px 40px 0;
}
.nf-res-hero__wrap {
  position: relative; z-index: 1; flex: 1 0 0; width: 1px; height: 100%;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 126px;
  border-radius: 18px;
}
.nf-res-hero__text {
  position: relative; flex: none; width: 100%;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 30px;
  overflow: clip;
}
.nf-res-hero__head {
  position: relative; flex: none; width: 856px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.nf-res-hero__head-in {
  position: relative; flex: none; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.nf-res-hero__desk .nf-res-hero__title-box { max-width: 100%; }
.nf-res-hero__desk .nf-res-hero__title {
  font-family: "SF Pro Display Medium", "SF Pro Display Medium Placeholder", sans-serif;
  font-weight: 500; font-size: 72px; line-height: 1.1; letter-spacing: normal; text-align: left;
}
.nf-res-hero__desk .nf-res-hero__sub,
.nf-res-hero__tab .nf-res-hero__sub {
  font-family: "SF Pro Display Regular", "SF Pro Display Regular Placeholder", sans-serif;
  font-weight: 400; font-size: 28px; line-height: 1.25; letter-spacing: normal;
}
.nf-res-hero__desk .nf-res-hero__sub { text-align: left; }
.nf-res-hero__ticker-row {
  position: relative; flex: none; width: 100%;
  display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px;
  overflow: clip;
}
.nf-res-hero__ticker--desk { width: min-content; gap: 20px; }
.nf-res-hero__ticker--desk .nf-res-hero__seen { font-size: 16px; }
.nf-res-hero__ticker--desk .nf-res-hero__marquee { height: 90px; }
.nf-res-hero__desk .nf-res-hero__buttons {
  position: relative; flex: none; width: min-content;
  display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px;
}
.nf-res-hero__side {
  position: relative; flex: none; width: min-content;
  display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 10px;
  padding: 88px 0 0;
}
.nf-res-hero__desk .nf-res-hero__ss { width: 423px; height: 489px; }
.nf-res-hero__desk .nf-res-hero__photo {
  position: absolute; z-index: 0; flex: none;
  width: 102%; height: 111%; bottom: -97px; left: -0.798613%;
}
.nf-res-hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.nf-res-hero__desk .nf-res-hero__overlay {
  position: absolute; z-index: 1; top: 0.291717%; left: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5); overflow: clip;
}

/* ==========================================================================
   Tablet (810 to 1439.98)
   ========================================================================== */
.nf-res-hero__tab {
  position: relative; width: 100%;
  display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 64px;
  overflow: clip;
}
.nf-res-hero__panel {
  position: relative; z-index: 1; flex: 1 0 0; width: 1px;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; align-content: flex-start; gap: 64px;
  padding: 0 0 64px; overflow: hidden;
  background-color: rgba(0, 0, 0, 0.5); box-shadow: rgba(255, 255, 255, 0.24) 0 1px 2px 0;
}
.nf-res-hero__content {
  position: relative; flex: none; width: 100%;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 40px;
  padding: 128px 60px 0;
}
.nf-res-hero__left {
  position: relative; flex: none; width: 100%;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 64px;
}
.nf-res-hero__header {
  position: relative; flex: none; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  overflow: clip;
}
.nf-res-hero__tab .nf-res-hero__title {
  font-family: var(--nf-font-sfns-text); font-weight: 400; font-size: 72px; line-height: 1.1; letter-spacing: normal; text-align: start;
}
.nf-res-hero__tab .nf-res-hero__sub { text-align: start; }
.nf-res-hero__tab .nf-res-hero__buttons {
  position: relative; flex: none; width: 100%;
  display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 16px;
}
.nf-res-hero__buttons-in {
  position: relative; flex: 1 0 0; width: 1px;
  display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 16px;
}
.nf-res-hero__tab .nf-res-hero__ss { width: 444px; height: 480px; }
.nf-res-hero__tab .nf-res-hero__photo { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; }
.nf-res-hero__tab .nf-res-hero__overlay {
  position: absolute; z-index: -1; top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5); overflow: clip;
}

/* ==========================================================================
   Phone (<= 809.98): "Hero Mobile"
   ========================================================================== */
.nf-res-hero__mob {
  position: relative; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px;
  padding: 128px 16px 32px; overflow: hidden;
}
.nf-res-hero__card-wrap { position: relative; z-index: 1; flex: none; width: 100%; }
.nf-res-hero__card {
  position: relative; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  padding: 32px 16px;
  background-color: rgba(0, 0, 0, 0.5); border-radius: 18px;
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  box-shadow: rgba(255, 255, 255, 0.24) 0 1px 2px 0;
}
.nf-res-hero__card-top {
  position: relative; flex: none; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
}
.nf-res-hero__mob .nf-res-hero__title {
  font-family: var(--nf-font-sfns-text); font-weight: 400; font-size: 34px; line-height: 1.2; letter-spacing: normal; text-align: center;
}
.nf-res-hero__mob .nf-res-hero__sub {
  font-family: "SF Pro Display Regular", "SF Pro Display Regular Placeholder", sans-serif;
  font-weight: 400; font-size: 16px; line-height: 1.3; letter-spacing: normal; text-align: center;
}
.nf-res-hero__mob .nf-res-hero__buttons {
  position: relative; flex: none; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 12px;
}
.nf-res-hero__ticker--mob { width: 100%; gap: 10px; }
.nf-res-hero__ticker--mob .nf-res-hero__seen { font-size: 14px; }
.nf-res-hero__ticker--mob .nf-res-hero__marquee { height: 63px; }
.nf-res-hero__mob .nf-res-hero__ss { width: 100%; height: 297px; }
.nf-res-hero__mob .nf-res-hero__ss-clip,
.nf-res-hero__mob .nf-res-hero__ss-item { border-radius: 0; }
.nf-res-hero__mob .nf-res-hero__photo {
  position: absolute; z-index: 0; flex: none;
  width: 179%; height: 962px; top: calc(50.2088% - 481px); left: -37.7303%;
}

/* ==========================================================================
   Load animation (measured on live, plays once, no replay on scroll)
   Desktop: title, text and buttons fade 0 -> 1 together, 0.425s cubic-bezier(0.3,0,0.2,1); dots bar fades in 80ms later (0.35s).
   Tablet + phone: title rises 50px and fades 0.001 -> 1 over 0.575s; buttons do the same 0.1s later;
   the text below the title does not animate; dots bar fades in afterwards.
   ========================================================================== */
.nf-res-hero [data-res-fade] { opacity: 0; }
.nf-res-hero.is-loaded [data-res-fade] {
  opacity: 1;
  transition: opacity 0.425s cubic-bezier(0.3, 0, 0.2, 1);
}
.nf-res-hero [data-res-rise] { opacity: 0.001; transform: translateY(50px); }
.nf-res-hero.is-loaded [data-res-rise] {
  opacity: 1; transform: none;
  transition: opacity 0.575s cubic-bezier(0.5, 0, 0.5, 0.8), transform 0.575s cubic-bezier(0.5, 0, 0.5, 0.8);
}
.nf-res-hero.is-loaded [data-res-rise-late] { transition-delay: 0.1s; }
.nf-res-hero.is-loaded .nf-res-hero__ss-dots {
  opacity: 1;
  transition: opacity var(--nf-res-dots-dur, 0.35s) var(--nf-res-dots-ease, cubic-bezier(0.3, 0.2, 0.4, 0.9)) var(--nf-res-dots-delay, 0.08s);
}
@media (min-width: 810px) and (max-width: 1439.98px) {
  .nf-res-hero { --nf-res-dots-delay: 0.515s; --nf-res-dots-dur: 0.34s; }
}
@media (max-width: 809.98px) {
  .nf-res-hero { --nf-res-dots-delay: 0.31s; --nf-res-dots-dur: 0.35s; --nf-res-dots-ease: cubic-bezier(0.2, 0, 0.4, 0.9); }
}

@media (prefers-reduced-motion: reduce) {
  .nf-res-hero [data-res-fade], .nf-res-hero [data-res-rise] { opacity: 1; transform: none; transition: none; }
  .nf-res-hero__ss-dots { opacity: 1; transition: none; }
  .nf-res-hero__marquee-clip { opacity: 1; }
  .nf-res-hero__marquee-track { animation: none; }
  .nf-res-hero__ss-track.is-moving { transition: none; }
}
