/* =====================================================================
   HOW IT WORKS — styles used only on /how-it-works/
   Shared parts (hero, FAQ, pop-ups, CTA, footer) are in site.css
   ===================================================================== */

/* ---------- Big centered titles + intro paragraph ---------- */
.hiw-title,
.faq-section__title {
  margin: 0 0 30px;
  font-family: var(--font-heading);
  font-size: 60px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  color: var(--heading);
}
.hiw-intro {
  max-width: 1075px;
  margin: 0 auto 18px;
  font-size: 22px;
  line-height: 1.4;
}

/* ---------- The Journey, in Four Steps ---------- */
.steps {
  position: relative;
  padding: 60px 30px 70px;
}
.steps::before {               /* pale mandala on the left */
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/images/shared/bg-left-only.png") 0 0 / 380px auto no-repeat;
}
.steps .wrap { position: relative; max-width: 1344px; }
.steps .hiw-intro { margin-bottom: 57px; }

/* One step: text | gold line with number | photo  (every 2nd step: photo | line | text) */
.step {
  display: grid;
  grid-template-columns: 632fr 67fr 645fr;
  align-items: center;
  padding: 20px 0 30px;
}
.step + .step { margin-top: 20px; }
.step--image-left { grid-template-columns: 632fr 67fr 645fr; }
.step--image-left .step__image { grid-column: 1; grid-row: 1; }
.step--image-left .step__line  { grid-column: 2; grid-row: 1; }
.step--image-left .step__text  { grid-column: 3; grid-row: 1; padding-left: 20px; }

.step__text { padding: 0 10px 30px 20px; }
.step__title {
  margin: 0 0 50px;
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  color: var(--heading);
}
.step__text p { margin: 0 0 18px; font-size: 22px; line-height: 1.4; }

.step__line {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.step__line::before,
.step__line::after {
  content: "";
  flex: 1;
  width: 5px;
  border-radius: 999px;
  background: var(--gold);
}
.step__line img { width: 64px; height: 64px; }
.step__image img { width: 100%; height: auto; }

/* ---------- How We Build Each Group ---------- */
.build { padding: 0 30px 100px; }
.build__title {
  margin: 0 0 30px;
  font-family: var(--font-heading);
  font-size: 50px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  color: var(--heading);
}
.build .hiw-intro { margin-bottom: 48px; }

.group-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1344px;
  margin: 0 auto;
}
.group-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 360px;
  padding: 79px 20px 69px;
  border-radius: 15px;
  overflow: hidden;
  background: var(--card-image) var(--card-pos, 50% 50%) / var(--card-size, cover) no-repeat;
  color: #fff;
  text-align: center;
}
.group-card::before { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--card-overlay, .45); }
.group-card__title,
.group-card__text { position: relative; margin: 0; }
.group-card__title { font-family: var(--font-heading); font-size: 28px; font-weight: 700; line-height: 1.2; }
.group-card__text { font-size: 22px; font-weight: 500; line-height: 1.3; }
.group-card__open {             /* invisible button covering the whole card */
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  background: none;
  cursor: pointer;
}

.build__button { margin-top: 50px; text-align: center; }
.btn--interest {
  padding: 14px 50px;
  border-radius: 30px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---------- FAQ section ---------- */
body { --cta-wave-color: var(--light-blue); }   /* wave above the CTA matches this section */
.faq-section {
  position: relative;
  padding: 100px 30px;
  background: var(--light-blue);
}
.faq-section::before {          /* pale mandala on the right */
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/images/shared/bg-blue-1.png") 100% 50% / 300px auto no-repeat;
  opacity: .2;
}
.faq-section__title { position: relative; margin-bottom: 50px; }
.faq-section .faq { position: relative; }
.wave--faq { height: 49px; transform: none; top: -1px; }
.wave--faq svg { width: calc(154% + 1.3px); fill: #fff; }

/* =====================================================================
   MOBILE
   ===================================================================== */
@media (max-width: 767px) {
  .hiw-title { margin-bottom: 10px; font-size: 36px; line-height: 1.2; }
  .steps { padding: 30px 12px 0; }
  .steps::before { background-size: 280px auto; }
  .steps .hiw-intro { margin-bottom: 18px; }

  /* Steps stack: number between two lines, photo, then text */
  .step,
  .step--image-left { display: flex; flex-direction: column; padding: 0; }
  .step + .step { margin-top: 20px; }
  .step__line,
  .step--image-left .step__line {
    order: 1;
    flex-direction: row;
    align-self: stretch;
    height: 80px;
    gap: 24px;
  }
  .step__line::before, .step__line::after { width: auto; height: 3px; border-radius: 9999px; }
  .step__line img { width: 60px; height: 60px; }
  .step__image { order: 2; padding: 10px 0; }
  .step__text,
  .step--image-left .step__text { order: 3; padding: 0; }
  .step__title { margin-bottom: 20px; font-size: 30px; line-height: 1.1; }

  .build { padding: 40px 15px 70px; }
  .build__title { margin-bottom: 20px; font-size: 36px; line-height: 1.1; }
  .build .hiw-intro { margin-bottom: 18px; }
  .group-cards { grid-template-columns: 1fr; gap: 25px; padding: 0 10px; }
  .group-card { padding: 78px 15px; }
  .group-card__title { line-height: 1.1; }
  .build__button { margin-top: 50px; }
  .btn--interest { padding: 13px 20px; font-size: 22px; line-height: 1.1; }

  .faq-section { padding: 60px 15px 70px; }
  .faq-section::before { background-size: 200px auto; }
  .faq-section__title { margin-bottom: 50px; font-size: 36px; }
  .wave--faq { height: 30px; }
}
