/* ==========================================================================
   PERFECTOO PROTECTOR — HOW IT WORKS
   This content is a true sequence, so the numbers earn their place: four
   nodes on one continuous line. No cards here, which gives the page a
   breathing, open section between the heavier ones.
   ========================================================================== */

/* ---------- 1. Tokens (same as other sections; move to :root later) ---------- */
.how-it-works {
  --bg:#F2F6F9; --bg-tint:#E4EEF4; --surface:#FFFFFF;
  --ink:#10202C; --ink-2:#46586A; --ink-3:#7A8B9A; --line:#D5E1EA;
  --accent:#0A6B78; --accent-hover:#085862; --accent-soft:#D8EEF0; --signal:#E8A33D;
  --font-display:"Bricolage Grotesque","Segoe UI",system-ui,sans-serif;
  --font-body:"Instrument Sans","Segoe UI",system-ui,sans-serif;
  --ease:cubic-bezier(.2,.7,.2,1);
}

/* ---------- 2. Shell ---------- */
.how-it-works {
  position: relative; overflow: hidden;
  padding: clamp(56px, 8vw, 120px) clamp(20px, 5vw, 80px);
  background:
    radial-gradient(55% 60% at 100% 0%, var(--accent-soft) 0%, transparent 65%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-tint) 100%);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
.how-it-works *, .how-it-works *::before, .how-it-works *::after { box-sizing: border-box; }
.how-it-works .section-inner { max-width: 1360px; margin: 0 auto; }

/* ---------- 3. Top ---------- */
.how-top {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: clamp(24px, 5vw, 96px); align-items: end;
}
.how-kicker { font-size: .875rem; font-weight: 600; color: var(--accent); }
.how-title-area h2 {
  margin: 16px 0 0; max-width: 16ch;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.2rem, 4.8vw, 4.3rem);
  line-height: 1; letter-spacing: -.04em; text-wrap: balance;
}
.how-intro p {
  margin: 0; max-width: 44ch;
  font-size: clamp(1rem, 1.25vw, 1.125rem); line-height: 1.7; color: var(--ink-2);
  text-wrap: pretty;
}
.how-contact-link {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 24px; padding: 8px 8px 8px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  font-size: .9375rem; font-weight: 600; color: var(--ink); text-decoration: none;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.how-contact-link span {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff;
  transition: transform .3s var(--ease);
}
.how-contact-link:hover { border-color: var(--accent); box-shadow: 0 14px 28px -18px rgba(10,107,120,.6); }
.how-contact-link:hover span { transform: translate(2px, -2px); }
.how-contact-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- 4. Timeline ---------- */
.how-steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 clamp(18px, 2.4vw, 36px);
  margin-top: clamp(44px, 6vw, 88px);
  counter-reset: none;
}
.how-step { position: relative; padding-bottom: 8px; }

/* number node + dash that runs on to the next step */
.how-step-index { display: flex; align-items: center; gap: 14px; }
.how-step-index > span:first-child {
  position: relative; z-index: 1; flex-shrink: 0;
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--accent);
  font: 800 1.15rem/1 var(--font-display); letter-spacing: -.02em; color: var(--accent);
  box-shadow: 0 0 0 7px rgba(255,255,255,.55);
  transition: background-color .3s var(--ease), color .3s var(--ease), transform .35s var(--ease);
}
.how-step-dash {
  flex: 1; height: 0; margin-right: calc(-1 * clamp(18px, 2.4vw, 36px) - 14px);
  border-top: 1.5px dashed rgba(10,107,120,.4);
}
.how-step:last-child .how-step-dash { display: none; }
.how-step:hover .how-step-index > span:first-child {
  background: var(--accent); color: #fff; transform: scale(1.06);
}

.how-step-content { margin-top: 30px; padding-right: 8px; }
.how-step-content h3 {
  margin: 0; font: 700 1.4rem/1.18 var(--font-display); letter-spacing: -.025em;
}
.how-step-content p {
  margin: 12px 0 0; max-width: 30ch;
  font-size: .9375rem; line-height: 1.65; color: var(--ink-2);
}

/* the final step gets the signal dot: the outcome */
.how-step:last-child .how-step-index > span:first-child {
  border-color: var(--signal);
  box-shadow: 0 0 0 7px rgba(232,163,61,.18);
}

/* ---------- 5. Footer ---------- */
.how-footer {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
  margin-top: clamp(44px, 6vw, 80px); padding-top: 22px;
  border-top: 1px solid rgba(16,32,44,.12);
  font-size: .9rem; font-weight: 500; color: var(--ink-2);
}
.how-footer-brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; color: var(--ink); }
.how-footer-symbol {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--accent); color: #fff;
  font: 800 .95rem/1 var(--font-display);
}

/* ---------- 6. Responsive ---------- */
@media (max-width: 1000px) {
  .how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .how-step:nth-child(2) .how-step-dash { display: none; } /* no dash across the row break */
}
@media (max-width: 860px) {
  .how-top { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 560px) {
  /* vertical timeline: line runs down the left edge */
  .how-steps { grid-template-columns: 1fr; row-gap: 0; }
  .how-step {
    display: grid; grid-template-columns: 60px 1fr; column-gap: 20px; padding-bottom: 36px;
  }
  .how-step-index { flex-direction: column; align-items: center; }
  .how-step-dash {
    display: block !important; flex: 1; width: 0; height: auto; margin: 6px 0 0;
    border-top: 0; border-left: 1.5px dashed rgba(10,107,120,.4);
  }
  .how-step:last-child .how-step-dash { display: none !important; }
  .how-step-content { margin-top: 10px; }
  .how-footer-note { display: none; }
}

/* ---------- 7. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .how-step-index > span:first-child, .how-contact-link, .how-contact-link span { transition: none; }
  .how-step:hover .how-step-index > span:first-child { transform: none; }
}