/* ================================================================
   HOW IT WORKS PAGE — page-specific styles
   ================================================================ */

/* ===== HERO ===== */
.hw-hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}
.hw-hero-blob {
  width: 720px; height: 720px;
  right: -240px; top: -260px;
}
.hw-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 920px;
}
.hw-hero-headline {
  margin: 0 0 28px;
  font-size: clamp(48px, 6.8vw, 88px);
  line-height: 1;
  letter-spacing: -0.025em;
  font-weight: 700;
  text-wrap: balance;
}
.hw-hero-sub {
  margin: 0;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--tb-text-muted);
  max-width: 720px;
}

/* ===== STEP SECTIONS ===== */
.hw-step {
  padding: 112px 0;
}
.hw-step:nth-of-type(odd-step) { background: var(--tb-bg); }
.hw-step--02 { background: var(--tb-bg); }
.hw-step--04 { background: var(--tb-bg); }

.hw-step-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 80px;
}
.hw-step--reverse .hw-step-grid .hw-step-copy { order: 2; }
.hw-step--reverse .hw-step-grid .hw-phone { order: 1; }

.hw-step-eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tb-orange);
}
.hw-step-title {
  margin: 0 0 20px;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.022em;
  font-weight: 700;
  color: var(--tb-text-strong);
  text-wrap: balance;
}
.hw-step-body {
  margin: 0 0 18px;
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--tb-text);
  max-width: 560px;
}
.hw-step-body strong { font-weight: 700; color: var(--tb-text-strong); }
.hw-step-note {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--tb-text-muted);
  max-width: 540px;
}
.hw-link {
  color: var(--tb-orange);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}
.hw-link:hover { color: var(--tb-orange-700); }

/* Phone mock — clean device frame */
.hw-phone {
  position: relative;
  margin: 0;
  justify-self: center;
  max-width: 320px;
  width: 100%;
  background: #1d1d1f;
  border-radius: 44px;
  padding: 12px;
  box-shadow:
    0 30px 60px -28px rgba(45, 55, 72, 0.42),
    0 4px 12px rgba(45, 55, 72, 0.08);
}
.hw-phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 32px;
}
/* Tall variant — the diagnosis screen has a lot of content. We render
   the whole composite so DIY + Hire a Pro + Ask AI are all visible. */
.hw-phone--tall img {
  border-radius: 32px;
}

/* ===== STEP 02 — rating row ===== */
.hw-rating-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 12px;
}
.hw-rating-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--tb-r-pill);
  border: 1px solid;
}
.hw-rating-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.hw-rating-pill--safe   { background: var(--tb-safe-bg);   color: #1A7A3A; border-color: var(--tb-safe-border); }
.hw-rating-pill--amber  { background: var(--tb-heat-bg);   color: #8A4A07; border-color: var(--tb-heat-border); }
.hw-rating-pill--danger { background: var(--tb-danger-bg); color: #8A1414; border-color: var(--tb-danger-border); }

/* ===== SECOND OPINION CALLOUT ===== */
.hw-second {
  padding: 64px 0;
}
.hw-second-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 28px;
  background: var(--tb-text-strong);
  color: #fff;
  border-radius: var(--tb-r-xl);
  padding: 36px 44px;
  position: relative;
  overflow: hidden;
  max-width: 880px;
  margin: 0 auto;
}
.hw-second-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--tb-orange);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hw-second-icon svg { width: 30px; height: 30px; }
.hw-second-eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tb-orange-200);
}
.hw-second-title {
  margin: 0 0 10px;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.018em;
  font-weight: 700;
  color: #fff;
  text-wrap: balance;
}
.hw-second-title .serif-italic { color: var(--tb-orange); }
.hw-second-body {
  margin: 0;
  font-size: clamp(15px, 1.15vw, 16px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
  max-width: 640px;
}

/* ===== CATEGORIES ===== */
.hw-categories {
  padding: 96px 0;
  background: var(--tb-bg);
}
.hw-categories-inner {
  text-align: center;
  max-width: 1000px;
}
.hw-categories .h1 {
  margin: 12px 0 36px;
}
.hw-chip-row {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.hw-chip-row li {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--tb-bg-warm);
  border-radius: var(--tb-r-pill);
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 600;
  color: var(--tb-text-strong);
  letter-spacing: -0.005em;
}
.hw-chip-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.hw-chip-dot--water { background: var(--tb-water); }
.hw-chip-dot--heat { background: var(--tb-heat); }
.hw-chip-dot--neutral { background: #94A3B8; }
.hw-chip-dot--orange { background: var(--tb-orange); }
.hw-chip-dot--pro { background: var(--tb-pro); }

/* ===== CTA ===== */
.hw-cta {
  position: relative;
  padding: 128px 0 132px;
  overflow: hidden;
  text-align: center;
}
.hw-cta-blob {
  width: 760px; height: 760px;
  right: -240px; top: -260px;
}
.hw-cta-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
}
.hw-cta-headline {
  margin: 0 0 18px;
  font-size: clamp(44px, 6vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  font-weight: 700;
  text-wrap: balance;
}
.hw-cta-sub {
  margin: 0 0 36px;
  font-size: clamp(18px, 1.5vw, 22px);
  color: var(--tb-text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hw-step { padding: 80px 0; }
  .hw-step-grid { grid-template-columns: 1fr; gap: 40px; }
  .hw-step--reverse .hw-step-grid .hw-step-copy { order: 1; }
  .hw-step--reverse .hw-step-grid .hw-phone { order: 2; }
  .hw-phone { max-width: 280px; }
  .hw-second-card { padding: 28px 28px; gap: 20px; grid-template-columns: 60px 1fr; }
  .hw-second-icon { width: 60px; height: 60px; }
  .hw-second-icon svg { width: 24px; height: 24px; }
}

@media (max-width: 768px) {
  .hw-hero { padding: 56px 0 40px; }
  .hw-hero-blob { width: 460px; height: 460px; right: -160px; top: -160px; }
  .hw-hero-sub { font-size: 16px; }

  .hw-step { padding: 56px 0; }
  .hw-step-grid { gap: 32px; }
  .hw-step-title { font-size: 32px; }
  .hw-step-body { font-size: 16px; }
  .hw-phone { max-width: 240px; padding: 10px; border-radius: 36px; }
  .hw-phone img { border-radius: 26px; }
  .hw-phone--tall img { border-radius: 26px; }

  .hw-second { padding: 0 0 56px; }
  .hw-second-card {
    grid-template-columns: 1fr;
    padding: 28px 24px;
    text-align: left;
  }
  .hw-second-icon { width: 56px; height: 56px; }
  .hw-second-icon svg { width: 22px; height: 22px; }
  .hw-second-title { font-size: 24px; }

  .hw-categories { padding: 56px 0; }
  .hw-categories .h1 { font-size: 32px; margin-bottom: 28px; }
  .hw-chip-row { gap: 8px; }
  .hw-chip-row li { padding: 10px 16px; font-size: 14px; }

  .hw-cta { padding: 72px 0 80px; }
  .hw-cta-headline { font-size: 40px; }
  .hw-cta-sub { font-size: 16px; margin-bottom: 28px; }
  .hw-cta-blob { width: 460px; height: 460px; right: -160px; top: -160px; }
}
