/* =============================================================
   Formthotics — How to page (/howto/) page-only styles
   Shared design parts (hero, headings, steps, tip, warn, stats,
   CTA band) come from size.css. Everything here is scoped under
   #howto-guide and reuses the --sg-* tokens defined in size.css.
   ============================================================= */

/* Hero photo: product shot on white, so show the whole insole */
#howto-guide .hw-hero-img { background: #fff; object-fit: contain; padding: 6% 6% 12%; }

/* Keep short Japanese phrases together so headings break between phrases, not mid-word */
#howto-guide .hw-nowrap { display: inline-block; }

/* ---------- Impressions (before / after / 2 weeks) ---------- */
#howto-guide .hw-impressions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
#howto-guide .hw-impression {
  margin: 0;
  background: #fff;
  border: 1px solid var(--sg-line);
  border-radius: 28px;
  padding: 18px 18px 22px;
  transition: box-shadow .3s ease, border-color .3s ease, transform .3s ease;
}
#howto-guide .hw-impression:hover {
  box-shadow: 0 24px 50px -22px rgba(0,87,122,.25);
  border-color: rgba(0,163,226,.35);
  transform: translateY(-3px);
}
#howto-guide .hw-impression img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
}
#howto-guide .hw-impression figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-weight: 700;
  font-size: 15px;
  color: var(--sg-teal);
}
#howto-guide .hw-tag {
  font-family: "Outfit", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--sg-surface);
  color: var(--sg-teal);
}
#howto-guide .hw-tag--sky { background: var(--sg-sky); color: #fff; }
#howto-guide .hw-tag--teal { background: var(--sg-teal); color: #fff; }

/* ---------- Steps: 6 cards on a 3-column grid ---------- */
#howto-guide .hw-steps { row-gap: 44px; }
#howto-guide .hw-tip { margin-top: 44px; }

/* ---------- After fitting cards ---------- */
#howto-guide .hw-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
#howto-guide .hw-card {
  background: #fff;
  border: 1px solid var(--sg-line);
  border-radius: 28px;
  padding: clamp(26px, 3.6vw, 40px);
}
#howto-guide .hw-card-ic {
  width: 48px; height: 48px;
  border-radius: 16px;
  background: rgba(0,163,226,.10);
  color: var(--sg-sky);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
#howto-guide .hw-card-ic svg { width: 24px; height: 24px; }
#howto-guide .hw-card h3 { font-size: 20px; font-weight: 700; margin: 0 0 10px; color: var(--sg-teal); }
#howto-guide .hw-card p { font-size: 14px; color: rgba(0,87,122,.78); margin: 0; }
#howto-guide .hw-list { margin: 18px 0 0; padding-left: 1.3em; list-style: disc outside; }
#howto-guide .hw-list li { font-size: 14px; margin-bottom: 8px; color: rgba(0,87,122,.82); }

/* Full-width notice under the cards (colour/shape from .sg-warn) */
#howto-guide .hw-note { max-width: none; margin-top: 28px; background: #fff; }

/* =====================  Responsive  ===================== */
@media (max-width: 900px) {
  /* photos become a swipeable row instead of a tall stack */
  #howto-guide .hw-impressions {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }
  #howto-guide .hw-impression { scroll-snap-align: start; }
  #howto-guide .hw-cards { grid-template-columns: 1fr; }
  #howto-guide .hw-steps { row-gap: 20px; }
}
