/* =========================================================
   How it works
   ========================================================= */

/* ---------- Hero ---------- */
.hiw-hero { padding: 96px var(--pad-x) 72px; display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.hiw-hero .t-eyebrow { color: var(--muted-foreground); }
.hiw-hero h1 { max-width: 1040px; color: var(--muted-foreground); }
.hiw-hero h1 em { font-style: normal; color: var(--foreground); }
.hiw-hero__lead { max-width: 680px; color: var(--muted-foreground); }
.hiw-hero__photo { position: relative; width: 100%; height: 560px; border-radius: 28px; overflow: hidden; text-align: left; }
.hiw-hero__photo > img { width: 100%; height: 100%; object-fit: cover; }
.photo-note {
  position: absolute; left: 24px; bottom: 24px; width: 460px; max-width: calc(100% - 48px);
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 18px; border-radius: 16px;
  background: rgba(20,20,20,.82); color: #fff;
}
.photo-note p:first-child { font-weight: 500; font-size: 14px; line-height: 20px; }
.photo-note p:last-child { font-size: 12px; line-height: 16px; color: rgba(255,255,255,.72); }

/* Hero photo opens from a slightly inset frame on load (clip-path + the shared rise) */
.js .hiw-hero__photo[data-enter] {
  clip-path: inset(3% 2% 0 2% round 28px);
  transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out), clip-path 1100ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * var(--stagger) + 80ms);
}
.js .is-loaded .hiw-hero__photo[data-enter] { clip-path: inset(0 0 0 0 round 28px); }
.js .is-loaded .hiw-hero__photo .photo-note { opacity: 1; transform: none; }
.js .hiw-hero__photo .photo-note { opacity: 0; transform: translateY(8px); transition: opacity 600ms var(--ease-out) 700ms, transform 600ms var(--ease-out) 700ms; }

/* ---------- Shared section rhythm (Figma uses 112px) ---------- */
.hiw-section { padding: 112px var(--pad-x); }
.hiw-steps { gap: 56px; }
.hiw-steps .section-head { gap: 14px; max-width: 720px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; width: 100%; }
.step { position: relative; display: flex; flex-direction: column; gap: 12px; padding-top: 20px; }
/* Top rule draws left→right as each step reveals */
.step::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--border-subtle);
  transform-origin: left; transition: transform 900ms var(--ease-out); transition-delay: inherit;
}
.js .step[data-reveal]::before { transform: scaleX(0); }
.js .step[data-reveal].is-in::before { transform: scaleX(1); }
.step__num { font-weight: 300; font-size: 72px; line-height: 76px; letter-spacing: -2px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.wash-gulf .step__num { color: var(--gulf); }
.step p.t-body { color: var(--muted-foreground); }

/* ---------- Split (copy + photo) ---------- */
.split { display: flex; align-items: center; gap: 80px; width: 100%; }
.split__copy { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.split__copy .t-eyebrow, .split__copy .t-lead { color: var(--muted-foreground); }
.split__photo { position: relative; width: 520px; aspect-ratio: 1; flex-shrink: 0; border-radius: 20px; overflow: hidden; }
.split__photo img { width: 100%; height: 100%; object-fit: cover; }

.ticks { display: flex; flex-direction: column; gap: 12px; }
.ticks li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 20px; }
.ticks .ico { --s: 18px; }

/* ---------- Questions ---------- */
.hiw-faq .faq-head { gap: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1360px) {
  .split { gap: 56px; }
  .split__photo { width: min(520px, 46%); }
}

@media (max-width: 960px) {
  .hiw-hero { padding: 32px var(--pad-x) 40px; gap: 20px; align-items: flex-start; text-align: left; }
  .hiw-hero__lead { font-size: 14px; line-height: 20px; font-weight: 400; letter-spacing: 0; }
  .hiw-hero__photo { height: 400px; border-radius: 20px; }
  .js .hiw-hero__photo[data-enter] { clip-path: inset(3% 2% 0 2% round 20px); }
  .js .is-loaded .hiw-hero__photo[data-enter] { clip-path: inset(0 0 0 0 round 20px); }
  .photo-note { left: 12px; bottom: 12px; width: auto; right: 12px; max-width: 460px; }

  .hiw-section { padding: 64px var(--pad-x); }
  .hiw-steps { gap: 28px; }
  .hiw-steps .section-head { gap: 10px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .step { gap: 8px; padding-top: 16px; }
  .step__num { font-size: 44px; line-height: 48px; letter-spacing: -1.2px; }

  .split { flex-direction: column; align-items: stretch; gap: 24px; }
  .split--photo-first .split__photo { order: 2; }
  .split__copy { gap: 14px; }
  .split__copy .t-lead { font-size: 14px; line-height: 20px; font-weight: 400; letter-spacing: 0; }
  .split__photo { width: 100%; aspect-ratio: auto; height: 360px; }
  .hiw-faq .faq-head { gap: 10px; }
  .hiw-faq { gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .js .hiw-hero__photo[data-enter], .js .is-loaded .hiw-hero__photo[data-enter] { clip-path: none; }
  .js .hiw-hero__photo .photo-note { transform: none !important; }
  .js .step[data-reveal]::before { transform: none; }
}
