/* ==========================================================
   How it works v2 · /how-does-it-work/ (built 2026-10-14, card 32)
   Loaded on this page only (functions.php, smp_is_how_it_works_page()).
   Decisions: 00_HQ/32_HOW-IT-WORKS/docs/HIW_V2_DECISIONS.md
   (d-1014-hiw-look: the four city pages' look, Rubik until br2).

   Rules kept here:
   - Own classes only (.smp-howto-*). The shared .smp-hiw-* step rules
     in style.css / city-page.css belong to the city pages.
   - AA on every surface that carries text: teal text #0b7680,
     orange surfaces #c94600, muted #5c6a7c, navy #052540. Brand
     #ff5900 / #00b0bc only on decoration (marker, icons).
   - No tilts, no decorative arrows, one chip per card, no card
     inside a card, 52 px buttons with 13 px corners, photos at their
     own ratio with the Pot corner (bottom-right).
   - The page sits inside Bulma's .content and style.css sets heading
     sizes with !important: the reset block below uses a doubled class
     (0,2,1) and loads after both; heading sizes need !important too.
   - Motion: steps rise into view (moves + scales, never fades), CSS
     scroll-driven, only with @supports and prefers-reduced-motion:
     no-preference (the /links/ pattern). Nothing else moves except
     the board.
   ========================================================== */

/* ---------- 00. tokens + full-bleed sections ---------- */
.smp-howto {
  --hw-navy: #052540;
  --hw-text: #1f2430;
  --hw-body: #3d4757;
  --hw-muted: #5c6a7c;
  --hw-teal: #0b7680;
  --hw-orange: #c94600;
  --hw-cream: #fcfaf1;
  --hw-light: #f7f5ee;
  --hw-line: #e7ecf2;
  --hw-focus: #00b0bc;
  --hw-btn-h: 52px;
  --hw-btn-r: 13px;
  --hw-pot: 28px 28px 4px 28px;
  --hw-pot-sm: 18px 18px 4px 18px;
  --hw-press: 90ms;

  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding: clamp(48px, 8vw, 88px) 16px;
  color: var(--hw-text);
  font-size: 16px;
  line-height: 1.5;
}

.smp-howto__inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.smp-howto__inner--narrow {
  max-width: 760px;
}

/* ---------- 01. reset (beats Bulma .content + style.css) ---------- */
.smp-howto.smp-howto :is(p, h1, h2, h3, ul, ol, li, figure, header) {
  margin: 0;
}

.smp-howto.smp-howto :is(ul, ol) {
  padding: 0;
  list-style: none;
}

.smp-howto.smp-howto :is(h1, h2, h3) {
  color: var(--hw-navy);
  font-weight: 800;
  text-wrap: pretty;
  letter-spacing: -0.02em;
}

.smp-howto.smp-howto figure {
  text-align: left;
}

.smp-howto.smp-howto img {
  display: block;
  max-width: 100%;
  height: auto;
}

.smp-howto.smp-howto a {
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

.smp-howto.smp-howto :focus-visible {
  outline: 3px solid var(--hw-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.smp-howto .smp-line {
  display: block;
}

.smp-howto .smp-howto__keep {
  white-space: nowrap;
}

/* ---------- 02. shared pieces ---------- */
.smp-howto.smp-howto .smp-howto__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: clamp(32px, 5vw, 44px); /* (0,3,0): the reset above would zero it */
}

.smp-howto .smp-howto__eyebrow {
  color: var(--hw-teal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
}

.smp-howto .smp-howto__title {
  font-size: clamp(1.7rem, 6vw, 2.5rem) !important;
  line-height: 1.08;
}

.smp-howto .smp-howto__sub {
  color: var(--hw-muted);
  font-size: 17px;
  line-height: 1.5;
}

.smp-howto mark.smp-howto__hl {
  color: inherit;
  white-space: nowrap;
  background: linear-gradient(180deg, transparent 58%, rgba(255, 89, 0, .32) 58%, rgba(255, 89, 0, .32) 94%, transparent 94%);
  padding: 0 .08em;
  border-radius: .15em;
}

.smp-howto .smp-howto__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

.smp-howto .smp-howto__actions--center {
  justify-content: center;
}

.smp-howto .smp-howto__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--hw-btn-h);
  padding: 0 26px;
  border-radius: var(--hw-btn-r);
  background: var(--hw-navy);
  color: #fff !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(5, 37, 64, .16);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.smp-howto .smp-howto__btn--light {
  background: #fff;
  color: var(--hw-navy) !important;
  box-shadow: none;
}

.smp-howto .smp-howto__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--hw-teal) !important;
  font-weight: 700;
  text-decoration: underline;
}

.smp-howto .smp-howto__link--light {
  color: #fff !important;
}

@media (hover: hover) {
  .smp-howto .smp-howto__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(5, 37, 64, .2);
  }

  .smp-howto .smp-howto__btn--light:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
  }
}

.smp-howto .smp-howto__btn:active {
  transform: translateY(0) scale(.98);
  transition-duration: var(--hw-press);
}

@media (max-width: 480px) {
  .smp-howto .smp-howto__actions > .smp-howto__btn {
    flex: 1 1 100%;
  }
}

/* ---------- 03. hero ---------- */
.smp-howto-hero {
  background: var(--hw-cream);
  padding-top: clamp(28px, 6vw, 72px);
  margin-top: -3rem !important; /* sit flush under the header: Bulma .section padding */
}

.smp-howto .smp-howto-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.smp-howto .smp-howto-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.smp-howto .smp-howto-hero__title {
  font-size: clamp(2.1rem, 9vw, 3.6rem) !important;
  line-height: 1.02;
}

.smp-howto .smp-howto-hero__sub {
  max-width: 34ch;
  color: var(--hw-body);
  font-size: clamp(17px, 2.2vw, 19px);
  line-height: 1.45;
}

.smp-howto .smp-howto-hero__copy .smp-howto__actions {
  margin-top: 8px;
}

.smp-howto .smp-howto-hero__photo img {
  width: 100%;
  border-radius: var(--hw-pot);
}

@media (min-width: 900px) {
  .smp-howto .smp-howto-hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(40px, 5vw, 72px);
  }
}

/* ---------- 04. your night, in order ---------- */
.smp-howto-night {
  background: #fff;
}

.smp-howto .smp-howto-steps {
  display: flex;
  flex-direction: column;
}

.smp-howto .smp-howto-step {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 14px;
  align-items: start;
  padding: 24px 0;
  border-top: 1px solid var(--hw-line);
}

.smp-howto .smp-howto-step:first-child {
  border-top: 0;
  padding-top: 0;
}

.smp-howto .smp-howto-step--photo {
  grid-template-columns: 40px minmax(0, 1fr) 104px;
}

.smp-howto .smp-howto-step__num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--hw-orange);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.smp-howto .smp-howto-step__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.smp-howto .smp-howto-step__label {
  color: var(--hw-teal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.3;
  text-transform: uppercase;
  padding-top: 2px !important;
}

.smp-howto .smp-howto-step__fact {
  font-size: clamp(1.15rem, 4.4vw, 1.4rem) !important;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.smp-howto .smp-howto-step__detail {
  color: var(--hw-muted);
  font-size: 16px;
  line-height: 1.5;
}

.smp-howto .smp-howto-step__photo {
  grid-column: 3;
  grid-row: 1;
}

.smp-howto .smp-howto-step__photo img {
  width: 100%;
  border-radius: var(--hw-pot-sm);
}

.smp-howto .smp-howto-openers {
  grid-column: 2 / -1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.smp-howto .smp-howto-openers li {
  padding: 11px 16px !important;
  border-radius: var(--hw-pot-sm);
  background: var(--hw-cream);
  border: 1px solid #efe9da;
  color: var(--hw-navy);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

@media (min-width: 700px) {
  .smp-howto .smp-howto-step {
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 20px;
    padding: 30px 0;
  }

  .smp-howto .smp-howto-step--photo {
    grid-template-columns: 44px minmax(0, 1fr) 150px;
  }

  .smp-howto .smp-howto-step__num {
    width: 44px;
    height: 44px;
  }

  .smp-howto .smp-howto-step__photo {
    grid-row: 1 / span 2;
  }

  .smp-howto .smp-howto-openers {
    grid-column: 2;
  }
}

/* rise into view (moves + scales, never fades) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .smp-howto .smp-howto-step {
      animation: smp-howto-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}

@keyframes smp-howto-rise {
  from { transform: translateY(26px) scale(.98); }
  to   { transform: none; }
}

/* ---------- 05. this week's nights (the shared board) ---------- */
.smp-howto-week {
  background: var(--hw-light);
}

.smp-howto-week .smp-homeboard {
  margin: 0 auto;
}

/* ---------- 06. awareness band ---------- */
.smp-howto-aware {
  background: #fff;
  padding-bottom: 0;
}

.smp-howto .smp-howto-aware__card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(28px, 6vw, 48px);
  border-radius: 20px;
  background: var(--hw-navy);
  color: #fff;
}

.smp-howto .smp-howto__eyebrow--light {
  color: #7fe0e6;
}

.smp-howto.smp-howto .smp-howto-aware__title {
  color: #fff;
  font-size: clamp(1.9rem, 7vw, 2.8rem) !important;
  line-height: 1.05;
}

.smp-howto .smp-howto-aware__line {
  color: rgba(255, 255, 255, .9);
  font-size: clamp(17px, 2.4vw, 20px);
  line-height: 1.45;
}

.smp-howto .smp-howto-aware__card .smp-howto__actions {
  margin-top: 10px;
}

/* ---------- 07. FAQ ---------- */
.smp-howto-faq {
  background: #fff;
}

.smp-howto .smp-howto-faq__list {
  border-top: 1px solid var(--hw-line);
}

.smp-howto .smp-howto-faq__item {
  border-bottom: 1px solid var(--hw-line);
}

.smp-howto .smp-howto-faq__item > summary {
  position: relative;
  display: block;
  min-height: 44px;
  padding: 18px 44px 18px 0;
  color: var(--hw-navy);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

.smp-howto .smp-howto-faq__item > summary::-webkit-details-marker {
  display: none;
}

/* plus / minus: a state cue, not a decorative arrow */
.smp-howto .smp-howto-faq__item > summary::before,
.smp-howto .smp-howto-faq__item > summary::after {
  content: "";
  position: absolute;
  top: 50%;
  border-radius: 2px;
  background: var(--hw-teal);
}

.smp-howto .smp-howto-faq__item > summary::before {
  right: 8px;
  width: 16px;
  height: 2.5px;
  margin-top: -1.25px;
}

.smp-howto .smp-howto-faq__item > summary::after {
  right: 14.75px;
  width: 2.5px;
  height: 16px;
  margin-top: -8px;
}

.smp-howto .smp-howto-faq__item[open] > summary::after {
  display: none;
}

.smp-howto .smp-howto-faq__a {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 44px 20px 0;
  color: var(--hw-body);
  font-size: 16px;
  line-height: 1.6;
}

.smp-howto .smp-howto-faq__a a {
  color: var(--hw-teal);
  font-weight: 600;
  text-decoration: underline;
}

/* ---------- 08. closing ---------- */
.smp-howto-close {
  background: var(--hw-cream);
  text-align: center;
}

.smp-howto .smp-howto-close__title {
  font-size: clamp(2rem, 8vw, 3.2rem) !important;
  line-height: 1.04;
}

.smp-howto .smp-howto-close__line {
  margin-top: 14px !important;
  color: var(--hw-body);
  font-size: 18px;
}

.smp-howto-close .smp-howto__actions {
  margin-top: 26px;
}

.smp-howto .smp-howto-close__team {
  margin-top: 26px !important;
  color: var(--hw-muted);
  font-size: 15px;
}

.smp-howto .smp-howto-close__team a {
  color: var(--hw-teal);
  font-weight: 700;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .smp-howto-close .smp-howto__actions > .smp-howto__btn {
    flex: 1 1 100%;
  }
}
