/* ============================================================
   public-how-it-works.css
   Page-internal styles for /how-it-works.
   Scoped under body.fr-public.fr-public-home.fr-public-hiw.
   Layers on top of public-home.css section chrome.
   ============================================================ */

/* ============================================================
   HERO — tighten lede-to-content gap
   ============================================================ */

body.fr-public-hiw .fr-hiw-hero {
  text-align: center;
  padding-bottom: var(--fr-space-5);
}

body.fr-public-hiw .fr-hiw-hero .fr-home-section__lede {
  max-width: 44rem;
  margin-inline: auto;
  margin-bottom: 0;
}

body.fr-public-hiw .fr-hiw-prereq-section {
  padding-top: var(--fr-space-5);
}

body.fr-public-hiw .fr-final-cta {
  margin-top: var(--fr-space-6);
}

/* ============================================================
   PREREQUISITE BOX — one-time setup, sits above the five steps
   ============================================================ */

body.fr-public-hiw .fr-hiw-prereq {
  background: var(--fr-color-bg-strong);
  border: 1.5px solid var(--fr-color-border-strong);
  border-radius: var(--fr-radius-lg);
  padding: var(--fr-space-6) var(--fr-space-7);
}
@media (max-width: 640px) {
  body.fr-public-hiw .fr-hiw-prereq {
    padding: var(--fr-space-5);
  }
}

body.fr-public-hiw .fr-hiw-prereq__title {
  font-size: var(--fr-text-lg);
  font-weight: var(--fr-weight-bold);
  letter-spacing: -0.015em;
  line-height: var(--fr-leading-snug);
  color: var(--fr-color-heading);
  margin: 0;
}

body.fr-public-hiw .fr-hiw-prereq__body {
  font-size: var(--fr-text-base);
  line-height: var(--fr-leading-relaxed);
  color: var(--fr-color-ink);
  margin: 0 0 var(--fr-space-4);
}

body.fr-public-hiw .fr-hiw-prereq__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--fr-space-4);
  margin-bottom: var(--fr-space-4);
}

body.fr-public-hiw .fr-hiw-prereq__badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.2rem 0.65rem;
  border-radius: var(--fr-radius-pill);
  border: 1.5px solid color-mix(in oklch, var(--fr-color-heading) 40%, transparent);
  color: var(--fr-color-heading);
  font-size: var(--fr-text-xs);
  font-weight: var(--fr-weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

body.fr-public-hiw .fr-hiw-prereq__list {
  list-style: none;
  margin: 0 0 var(--fr-space-5);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--fr-space-2);
}

body.fr-public-hiw .fr-hiw-prereq__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--fr-space-3);
  font-size: var(--fr-text-base);
  line-height: var(--fr-leading-relaxed);
  color: var(--fr-color-ink);
}

body.fr-public-hiw .fr-hiw-prereq__list li::before {
  content: '';
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--fr-radius-pill);
  margin-top: 0.2rem;
  background: var(--fr-color-success);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8 L 7 11 L 13 5' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>");
  background-size: 75% 75%;
  background-position: center;
  background-repeat: no-repeat;
}

body.fr-public-hiw .fr-hiw-prereq__after {
  font-size: var(--fr-text-base);
  line-height: var(--fr-leading-relaxed);
  color: var(--fr-color-ink-muted);
  margin: 0 0 var(--fr-space-5);
}

/* ============================================================
   STEP SECTIONS — two-column layout, alternating sides
   ============================================================ */

body.fr-public-hiw .fr-hiw-step__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--fr-space-8) var(--fr-space-10);
  align-items: center;
}

/* Text-only steps: collapse grid to single column */
body.fr-public-hiw .fr-hiw-step--text-only .fr-hiw-step__inner {
  grid-template-columns: 1fr;
}

/* Flip: media column appears first (left) on desktop */
body.fr-public-hiw .fr-hiw-step--flip .fr-hiw-step__media {
  order: -1;
}

@media (max-width: 768px) {
  body.fr-public-hiw .fr-hiw-step__inner {
    grid-template-columns: 1fr;
    gap: var(--fr-space-6);
  }
  /* Reset flip so screenshot always stacks below copy on mobile */
  body.fr-public-hiw .fr-hiw-step--flip .fr-hiw-step__media {
    order: 1;
  }
}

/* ============================================================
   STEP CONTENT
   ============================================================ */

body.fr-public-hiw .fr-hiw-step__img {
  display: block;
  width: 100%;
  height: auto;
}

/* Phone screenshots — match the old fr-device-frame--phone max-width */
#step-2 .fr-hiw-step__img,
#step-3 .fr-hiw-step__img {
  max-width: 15rem;
  margin-inline: auto;
}

/* Tablet/dashboard screenshot */
#step-5 .fr-hiw-step__img {
  max-width: 20rem;
  margin-inline: auto;
}

body.fr-public-hiw .fr-hiw-step__content {
  display: flex;
  flex-direction: column;
  gap: var(--fr-space-4);
}

body.fr-public-hiw .fr-hiw-step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--fr-radius-pill);
  font-weight: var(--fr-weight-bold);
  font-size: var(--fr-text-lg);
  color: #fff;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
body.fr-public-hiw .fr-hiw-step__num--1 { background: var(--fr-color-primary); }
body.fr-public-hiw .fr-hiw-step__num--2 { background: #b95e9a; }
body.fr-public-hiw .fr-hiw-step__num--3 { background: var(--fr-color-success); }
body.fr-public-hiw .fr-hiw-step__num--4 { background: #5e60ce; }
body.fr-public-hiw .fr-hiw-step__num--5 { background: #d4811b; }

body.fr-public-hiw .fr-hiw-step__title {
  font-size: clamp(var(--fr-text-xl), 2.5vw + 0.5rem, var(--fr-text-2xl));
  font-weight: var(--fr-weight-bold);
  letter-spacing: -0.02em;
  line-height: var(--fr-leading-tight);
  color: var(--fr-color-heading);
  margin: 0;
}

body.fr-public-hiw .fr-hiw-step__subcopy {
  font-size: var(--fr-text-md);
  font-weight: var(--fr-weight-semibold);
  line-height: var(--fr-leading-normal);
  color: var(--fr-color-ink);
  margin: 0;
}

body.fr-public-hiw .fr-hiw-step__expansion {
  font-size: var(--fr-text-base);
  line-height: var(--fr-leading-relaxed);
  color: var(--fr-color-ink-muted);
  margin: 0;
}

body.fr-public-hiw .fr-hiw-step__link {
  font-size: var(--fr-text-base);
  font-weight: var(--fr-weight-semibold);
  color: var(--fr-color-primary);
  text-decoration: none;
}
body.fr-public-hiw .fr-hiw-step__link:hover {
  text-decoration: underline;
}

/* ============================================================
   WHY IT RAISES MORE — prose section
   ============================================================ */

body.fr-public-hiw .fr-hiw-raises {
  display: flex;
  flex-direction: column;
  gap: var(--fr-space-4);
  margin-bottom: var(--fr-space-6);
}

/* ============================================================
   FINAL CTA — secondary link below the main action
   ============================================================ */

body.fr-public-hiw .fr-hiw-final-cta__secondary {
  margin: var(--fr-space-5) 0 0;
  text-align: center;
}
body.fr-public-hiw .fr-hiw-final-cta__secondary a {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--fr-text-base);
  font-weight: var(--fr-weight-semibold);
  text-decoration: none;
}
body.fr-public-hiw .fr-hiw-final-cta__secondary a:hover {
  color: #fff;
  text-decoration: underline;
}

body.fr-public-hiw .fr-hiw-raises p {
  font-size: var(--fr-text-md);
  line-height: var(--fr-leading-relaxed);
  color: var(--fr-color-ink);
  margin: 0;
}
