/* ===== How it works / Journey 2 "FOR VILLAS & LARGER HOMES" (live nafas.com/id-en/how-it-works, frame framer-8mjm2g) =====
   Grey section: eyebrow, title, body, two black cards, then a 3 step stepper. Content (copy, card images, the two links)
   follows the How It Works Homes wireframe module 09 (Danny, 2026-10-23); styling is live's. Every text box is a Framer
   appear: opacity 0 -> 1 once, when 50% visible, ~0.42s spring-like curve (sampled on live), see js/30-villas.js. */

.nf-hiw-villas {
  --nf-hiw-villas-sfns-medium: "SFProText-Medium", "SF Pro Text", "Nafas Inter", sans-serif;
  --nf-hiw-villas-ease: linear(0, 0.017 4.1%, 0.078 8.2%, 0.154 11.8%, 0.245 15.7%, 0.34 19.5%, 0.432 23.2%, 0.513 27%, 0.592 30.9%, 0.658 34.3%, 0.72 38.4%, 0.773 42.3%, 0.819 45.9%, 0.854 49.8%, 0.886 53.6%, 0.912 57.3%, 0.932 61.4%, 0.948 65%, 0.962 68.9%, 0.972 72.5%, 0.98 76.4%, 0.986 80%, 0.991 83.9%, 0.994 87.7%, 0.997 91.6%, 0.999 95.5%, 1);
}

/* ---------- Desktop (>= 1280, base) ---------- */
.nf-hiw-villas {
  display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 50px;
  width: 100%; height: min-content; padding: 80px 60px; position: relative; overflow: visible;
  background-color: var(--nf-grey-f5);
}
.nf-hiw-villas__content, .nf-hiw-villas__intro {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 23px;
  flex: 0 0 auto; width: 100%; padding: 0; position: relative; overflow: clip;
}
/* Framer text boxes */
.nf-hiw-villas__box, .nf-hiw-villas__text-box {
  flex: 0 0 auto; width: 100%; max-width: 100%; height: auto; position: relative;
}
.nf-hiw-villas__text-box { width: 91%; align-self: flex-start; }

.nf-hiw-villas__eyebrow, .nf-hiw-villas__title, .nf-hiw-villas__text,
.nf-hiw-villas__card-title, .nf-hiw-villas__card-text, .nf-hiw-villas__step-title, .nf-hiw-villas__step-text {
  margin: 0; text-align: start; text-transform: none; text-decoration: none;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word;
}
.nf-hiw-villas__eyebrow {
  font-family: var(--nf-hiw-villas-sfns-medium); font-size: 20px; font-weight: 500; line-height: 1.2em;
  letter-spacing: normal; color: rgb(122, 122, 122);
}
.nf-hiw-villas__title {
  font-family: var(--nf-font-medium); font-size: 64px; font-weight: 500; line-height: 1.2em;
  letter-spacing: -0.01em; color: var(--nf-black);
}
.nf-hiw-villas__text {
  font-family: var(--nf-font-regular); font-size: 28px; font-weight: 400; line-height: 125%;
  letter-spacing: 0.01em; color: var(--nf-black);
}

/* Cards = option A of explore/villas-cards.html (Danny, 2026-10-29). The photo fills the whole card; only the title and a
   one-line hook sit on a gradient at the bottom. Hover (or focus) grows the gradient, hides the hook and slides up the full
   text and link; touch screens always show them. Photos: hiw-villas-{purifiers,ecoflow}-card, 1600 x 1280 (5:4) crops at
   the residential ducted tile's zoom, cut from the same window of the house so the two cards line up. Grid: two columns,
   one from 999.98 down. */
.nf-hiw-villas__cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
  flex: 0 0 auto; width: 100%; padding: 0; position: relative;
}
.nf-hiw-villas__card {
  position: relative; aspect-ratio: 4 / 3.2; overflow: hidden; border-radius: 30px; clip-path: inset(0 round 30px);
  color: var(--nf-white); will-change: transform; /* no card background: the photo fills it, and black showed as a dark hairline on the light image's rounded corners (Danny, 2026-10-29) */
}
.nf-hiw-villas__media { position: absolute; inset: 0; display: block; overflow: hidden; }
.nf-hiw-villas__media img {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.nf-hiw-villas__card:hover .nf-hiw-villas__media img { transform: scale(1.04); }
.nf-hiw-villas__shade {
  position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0));
  transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.nf-hiw-villas__card:hover .nf-hiw-villas__shade { height: 80%; }
.nf-hiw-villas__card-body { position: absolute; left: 23px; right: 23px; bottom: 27px; } /* live card body padding 27 / 23 */
.nf-hiw-villas__hook { margin-top: 16px; transition: opacity 0.3s; }
.nf-hiw-villas__card:hover .nf-hiw-villas__hook { opacity: 0; height: 0; margin: 0; }
.nf-hiw-villas__more {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s;
}
.nf-hiw-villas__more > div { overflow: hidden; }
.nf-hiw-villas__card:hover .nf-hiw-villas__more, .nf-hiw-villas__card:focus-within .nf-hiw-villas__more { grid-template-rows: 1fr; opacity: 1; }
.nf-hiw-villas__more .nf-hiw-villas__card-text { padding-top: 16px; max-width: 560px; } /* live: 16px under the title */
.nf-hiw-villas__more .nf-hiw-villas__link { margin-top: 20px; } /* live: 16px gap + 4px */
/* Touch screens and phone widths (Danny, 2026-10-29): everything is shown, no hover. */
@media (hover: none), (max-width: 809.98px) {
  .nf-hiw-villas__more { grid-template-rows: 1fr; opacity: 1; }
  .nf-hiw-villas__hook { display: none; }
  .nf-hiw-villas__shade, .nf-hiw-villas__card:hover .nf-hiw-villas__shade { height: 80%; }
  .nf-hiw-villas__card:hover .nf-hiw-villas__media img { transform: none; }
}
@media (max-width: 999.98px) {
  .nf-hiw-villas__cards { grid-template-columns: minmax(0, 1fr); }
  .nf-hiw-villas__card { aspect-ratio: 4 / 3; }
}
.nf-hiw-villas__card-title {
  font-family: var(--nf-font-medium); font-size: 28px; font-weight: 500; line-height: 125%;
  letter-spacing: normal; color: var(--nf-green);
}
.nf-hiw-villas__card-text {
  font-family: var(--nf-font-regular); font-size: 20px; font-weight: 400; line-height: 140%;
  letter-spacing: 0.01em; color: var(--nf-white);
}

/* Links (not on live). Arrow: nafas-website-icons arrow-right (24 grid, 1.5 stroke, currentColor), 24px box, no added height. */
.nf-hiw-villas__arrow { flex: none; width: 24px; height: 24px; margin: -3px 0 -3px 4px; }
/* Tier 3 on dark: white text, white underline, white arrow */
.nf-hiw-villas__link {
  display: inline-flex; align-items: center; margin-top: 4px; color: var(--nf-white); text-decoration: none;
  font-family: var(--nf-font-medium); font-size: 20px; font-weight: 500; line-height: 125%;
}
.nf-hiw-villas__link-text { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.nf-hiw-villas__link:hover .nf-hiw-villas__link-text { text-decoration-thickness: 2px; }
/* Tier 2 on light: black outline and text, no fill. Same size as the Journey "Speak to an expert" button. */
.nf-hiw-villas__cta {
  display: inline-flex; align-items: center; justify-content: center; align-self: flex-start;
  padding: 14px 40px 16px; border-radius: 99px; box-shadow: inset 0 0 0 1.5px var(--nf-black); color: var(--nf-black);
  text-decoration: none; font-family: "SF Pro Display Medium", sans-serif; font-size: 22px; font-weight: 500; line-height: 115%;
  transition: background-color 0.2s ease-out;
}
.nf-hiw-villas__cta:hover { background-color: var(--nf-white); }
.nf-hiw-villas__link:focus-visible, .nf-hiw-villas__cta:focus-visible { outline: 2px solid var(--nf-green); outline-offset: 3px; }

/* Stepper: one markup. Desktop: three columns, circle then a line to the next circle (as live), text below.
   Tablet and phone: stacked, circle left of the text, a line down to the next circle. */
.nf-hiw-villas__steps { list-style: none; margin: 0; padding: 0; }
.nf-hiw-villas__circle {
  display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 10px;
  flex: 0 0 auto; width: 60px; height: min-content; padding: 16px; position: relative; overflow: clip;
  border-radius: 99px; will-change: transform;
}
/* Framer draws the 1px border on ::after */
.nf-hiw-villas__circle::after {
  content: ""; position: absolute; inset: 0; border: 1px solid var(--nf-black); border-radius: inherit;
  pointer-events: none; box-sizing: border-box;
}
.nf-hiw-villas__num-box { flex: 0 0 auto; width: auto; height: auto; position: relative; white-space: pre; }
.nf-hiw-villas__num {
  display: block; margin: 0; white-space: pre;
  font-family: var(--nf-hiw-villas-sfns-medium); font-size: 20px; font-weight: 500; line-height: 140%;
  letter-spacing: normal; color: var(--nf-black); text-align: start;
}
.nf-hiw-villas__step-title {
  font-family: var(--nf-font-medium); font-size: 42px; font-weight: 500; line-height: 115%;
  letter-spacing: normal; color: var(--nf-black);
}
.nf-hiw-villas__step-text {
  font-family: var(--nf-font-regular); font-size: 28px; font-weight: 400; line-height: 125%;
  letter-spacing: normal; color: var(--nf-black);
}
.nf-hiw-villas__steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  flex: 0 0 auto; width: 100%; position: relative;
}
.nf-hiw-villas__step { display: flex; flex-direction: column; gap: 16px; min-width: 0; position: relative; }
.nf-hiw-villas__track { display: flex; flex-direction: row; align-items: center; }
.nf-hiw-villas__step:not(:last-child) .nf-hiw-villas__track::after {
  content: ""; flex: 1 0 0px; height: 1px; margin: 0 40px; background-color: var(--nf-black);
}
.nf-hiw-villas__step-body {
  display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 27px;
  padding-right: 40px; position: relative; z-index: 1;
}

/* Desktop: the three steps share rows (subgrid), so every step text starts on one line under the tallest title. */
@media (min-width: 1280px) {
  .nf-hiw-villas__steps { grid-template-rows: auto auto auto; }
  .nf-hiw-villas__step { display: grid; grid-row: span 3; grid-template-rows: subgrid; gap: 0; }
  .nf-hiw-villas__step-body { display: contents; }
  .nf-hiw-villas__step-body > .nf-hiw-villas__box { padding-right: 40px; z-index: 1; }
  .nf-hiw-villas__step-body > .nf-hiw-villas__box:first-child { margin-top: 16px; }
  .nf-hiw-villas__step-body > .nf-hiw-villas__box + .nf-hiw-villas__box { margin-top: 27px; }
}

/* Scroll reveal (Framer appear, opacity only, threshold 0.5, plays once). JS adds .is-js, then .is-in per box. */
.nf-hiw-villas [data-hiw-villas-reveal] { will-change: transform; }
.nf-hiw-villas.is-js [data-hiw-villas-reveal] { opacity: 0; }
.nf-hiw-villas.is-js [data-hiw-villas-reveal].is-in { opacity: 1; transition: opacity 0.44s var(--nf-hiw-villas-ease); }

/* ---------- Tablet (810 to 1279.98) ---------- */
@media (min-width: 810px) and (max-width: 1279.98px) {
  .nf-hiw-villas { padding: 60px 40px; }
  .nf-hiw-villas__step-text { letter-spacing: 0.01em; }
  .nf-hiw-villas__steps { display: flex; flex-direction: column; gap: 24px; }
  .nf-hiw-villas__step { flex-direction: row; gap: 16px; }
  .nf-hiw-villas__step:not(:last-child) .nf-hiw-villas__track::after { content: none; }
  .nf-hiw-villas__step:not(:last-child)::after {
    content: ""; position: absolute; top: 68px; bottom: -16px; left: 30px; width: 1px; background-color: var(--nf-black);
  }
  .nf-hiw-villas__track { align-self: flex-start; }
  .nf-hiw-villas__step-body { flex: 1 0 0px; width: 1px; max-width: 646px; gap: 16px; padding-right: 0; }
  .nf-hiw-villas__cta { font-size: 18px; padding: 12px 32px 14px; }
}

/* ---------- Phone (<= 809.98) ---------- */
@media (max-width: 809.98px) {
  .nf-hiw-villas { gap: 32px; padding: 32px 16px; }
  .nf-hiw-villas__content { gap: 10px; }
  .nf-hiw-villas__intro { gap: 16px; }
  .nf-hiw-villas__text-box { width: 100%; }
  .nf-hiw-villas__eyebrow { font-size: 18px; }
  .nf-hiw-villas__title { font-size: 24px; line-height: 125%; letter-spacing: normal; }
  .nf-hiw-villas__text { font-size: 16px; letter-spacing: normal; }
  .nf-hiw-villas__card { aspect-ratio: 4 / 4.6; border-radius: 16px; clip-path: inset(0 round 16px); }
  .nf-hiw-villas__card-body { left: 16px; right: 16px; bottom: 16px; }
  .nf-hiw-villas__hook, .nf-hiw-villas__more .nf-hiw-villas__card-text { margin-top: 0; padding-top: 5px; } /* live phone: 5px gap */
  .nf-hiw-villas__more .nf-hiw-villas__link { margin-top: 13px; }
  .nf-hiw-villas__card-title { font-family: var(--nf-font-regular); font-size: 18px; font-weight: 400; letter-spacing: 0.02em; }
  .nf-hiw-villas__card-text { font-size: 16px; line-height: 125%; }
  .nf-hiw-villas__link { font-size: 16px; margin-top: 8px; }
  .nf-hiw-villas__link-text { text-underline-offset: 2px; }
  .nf-hiw-villas__arrow { width: 20px; height: 20px; margin: -2px 0 -2px 3px; }
  .nf-hiw-villas__num { font-size: 16px; line-height: 115%; }
  .nf-hiw-villas__step-title { font-size: 24px; }
  .nf-hiw-villas__step-text { font-size: 16px; letter-spacing: 0.02em; }
  .nf-hiw-villas__steps { display: flex; flex-direction: column; gap: 24px; }
  .nf-hiw-villas__step { flex-direction: row; gap: 12px; }
  .nf-hiw-villas__step:not(:last-child) .nf-hiw-villas__track::after { content: none; }
  .nf-hiw-villas__step:not(:last-child)::after {
    content: ""; position: absolute; top: 42px; bottom: -16px; left: 17px; width: 1px; background-color: var(--nf-black);
  }
  .nf-hiw-villas__track { align-self: flex-start; }
  .nf-hiw-villas__circle { width: 34px; padding: 8px; }
  .nf-hiw-villas__step-body { flex: 1 0 0px; width: 1px; gap: 7px; padding-right: 0; }
  .nf-hiw-villas__cta { align-self: stretch; font-size: 15px; padding: 12px 24px; box-shadow: inset 0 0 0 1px var(--nf-black); }
}

@media (prefers-reduced-motion: reduce) {
  .nf-hiw-villas.is-js [data-hiw-villas-reveal] { opacity: 1; transition: none; }
}

/* Type scale in line with the other pages (Danny, 2026-10-26; the scale used on /business and /business/plan-and-pricing):
   desktop  label 18, title 52, lead 24, card title 28, body 20, step title 28, step text 20, link 21
   tablet   label 16, title 42, lead 22, card title 24, body 18, step title 24, step text 18, link 18
   (phone keeps its sizes). Live used 64 / 28 / 42 / 28 here. */
@media (min-width: 810px) {
  .nf-hiw-villas__eyebrow { font-size: 18px; }
  .nf-hiw-villas__title { font-size: 52px; line-height: 1.15; }
  .nf-hiw-villas__text { font-size: 24px; line-height: 1.3; letter-spacing: normal; }
  .nf-hiw-villas__card-title { font-size: 28px; }
  .nf-hiw-villas__card-text { font-size: 20px; line-height: 1.4; }
  .nf-hiw-villas__link { font-size: 21px; }
  .nf-hiw-villas__step-title { font-size: 28px; line-height: 1.2; }
  .nf-hiw-villas__step-text { font-size: 20px; line-height: 1.35; letter-spacing: normal; }
  .nf-hiw-villas__step-body { gap: 12px; }
  .nf-hiw-villas__cta { font-size: 21px; }
}
@media (min-width: 810px) and (max-width: 1279.98px) {
  .nf-hiw-villas__eyebrow { font-size: 16px; }
  .nf-hiw-villas__title { font-size: 42px; }
  .nf-hiw-villas__text { font-size: 22px; }
  .nf-hiw-villas__card-title { font-size: 24px; }
  .nf-hiw-villas__card-text { font-size: 18px; }
  .nf-hiw-villas__link { font-size: 18px; }
  .nf-hiw-villas__step-title { font-size: 24px; }
  .nf-hiw-villas__step-text { font-size: 18px; }
  .nf-hiw-villas__cta { font-size: 18px; }
}
@media (max-width: 809.98px) { .nf-hiw-villas__link { font-size: 15px; } } /* shared link scale: 15 on phone */

/* Regular 400 like the other How it works titles ("Before you join"), Danny 2026-10-27; sizes unchanged */
.nf-hiw-villas__title { font-family: "SF Pro Display Regular", "SF Pro Display Regular Placeholder", sans-serif; font-weight: 400; }

/* "Speak to an expert" + "Request an assessment" (Danny, 2026-10-29): one row, button then a Tier 3 link on light
   (black, underlined, arrow) like the residential "Become a Member" + "Speak to an expert" pair. Phone: page.css. */
.nf-hiw-villas__ctas { display: flex; flex-flow: row wrap; align-items: center; gap: 16px 32px; }
.nf-hiw-villas__link--below {
  margin-top: 0; color: var(--nf-black);
  font-family: "SF Pro Display Regular", "SF Pro Display Regular Placeholder", sans-serif; font-weight: 400;
}
