/* ==========================================================================
   How It Works page. Every rule is scoped to body.page-how-it-works.
   Shared tokens (navy, ink, gold, line, cream) come from css/styles.css.
   ========================================================================== */

body.page-how-it-works {
  --hiw-hero-from: #f7f4ed;
  --hiw-hero-to: #e8edf1;
  --hiw-hero-text: #536274;
  --hiw-ring: rgba(8, 39, 80, 0.11);
  --hiw-ring-far: rgba(8, 39, 80, 0.024);
  --hiw-ring-farther: rgba(8, 39, 80, 0.02);
  --hiw-stage-text: #667487;
  --hiw-stage-number: #98a5b4;
  --hiw-success: #1f7a5a;
  --hiw-scope-text: #b7c4d3;
  --hiw-scope-item: #d6dee7;
  --hiw-scope-border: rgba(255, 255, 255, 0.18);
}

/* 1. Page hero ----------------------------------------------------------- */
body.page-how-it-works .page-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 510px;
  padding: 105px clamp(24px, 8vw, 130px) 85px;
  background: linear-gradient(135deg, var(--hiw-hero-from), var(--hiw-hero-to));
  overflow: hidden;
}

body.page-how-it-works .page-hero::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -8vw;
  width: 48vw;
  height: 48vw;
  border: 1px solid var(--hiw-ring);
  border-radius: 50%;
  box-shadow: 0 0 0 80px var(--hiw-ring-far), 0 0 0 160px var(--hiw-ring-farther);
  pointer-events: none;
}

body.page-how-it-works .page-hero h1 {
  max-width: 1050px;
  margin: 22px 0 25px;
  font-size: clamp(48px, 5.3vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  color: var(--navy);
  font-weight: 500;
}

body.page-how-it-works .page-hero > p {
  max-width: 780px;
  margin: 0;
  color: var(--hiw-hero-text);
  font-size: 18px;
  line-height: 1.7;
}

/* 2. Stages -------------------------------------------------------------- */
body.page-how-it-works .stages-section {
  padding: 100px clamp(24px, 8vw, 130px);
}

body.page-how-it-works .stages-section article {
  display: grid;
  grid-template-columns: 45px 45px 1fr 0.8fr;
  align-items: start;
  gap: 25px;
  min-height: 210px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}

body.page-how-it-works .stage-number {
  font-size: 11px;
  font-weight: 900;
  line-height: 16.5px;
  color: var(--hiw-stage-number);
}

body.page-how-it-works .stages-section article > svg {
  width: 26px;
  height: 24px;
  color: var(--gold-dark);
}

body.page-how-it-works .stages-section h2 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 3vw, 43px);
  font-weight: 500;
  line-height: 1.08;
  color: var(--navy);
}

body.page-how-it-works .stages-section article p {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--hiw-stage-text);
}

body.page-how-it-works .stages-section ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.page-how-it-works .stages-section li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
  line-height: 19.8px;
  color: var(--hiw-stage-text);
}

body.page-how-it-works .stages-section li svg {
  width: 15px;
  height: 24px;
  color: var(--hiw-success);
}

/* 3. Scope principles (dark band) ---------------------------------------- */
body.page-how-it-works .scope-principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9vw;
  padding: 95px clamp(24px, 8vw, 130px);
  background: var(--navy);
  color: #ffffff;
}

body.page-how-it-works .scope-principles h2 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 3vw, 43px);
  font-weight: 500;
  line-height: 1.08;
  color: #ffffff;
}

body.page-how-it-works .scope-principles p {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--hiw-scope-text);
}

body.page-how-it-works .scope-principles > div:last-child {
  padding: 30px;
  border: 1px solid var(--hiw-scope-border);
}

body.page-how-it-works .scope-principles > div:last-child > strong {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

body.page-how-it-works .scope-principles ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.page-how-it-works .scope-principles li {
  margin: 12px 0;
  line-height: 1.5;
  color: var(--hiw-scope-item);
}

/* 4. Responsive ---------------------------------------------------------- */
@media (max-width: 760px) {
  body.page-how-it-works .page-hero {
    min-height: 470px;
    padding-top: 80px;
  }

  body.page-how-it-works .stages-section {
    padding-block: 70px;
  }

  body.page-how-it-works .stages-section article {
    grid-template-columns: 35px 35px 1fr;
  }

  body.page-how-it-works .stages-section article ul {
    grid-column: 3;
  }

  body.page-how-it-works .scope-principles {
    grid-template-columns: 1fr;
  }
}
