/* ==========================================================================
   ADPOS — How It Works (/how-it-works). Builds on site.css + features.css.
   ========================================================================== */
html:has(.page-how) { scroll-padding-top: var(--header-h); }

.hw-support { margin-top: 26px; font-size: .92rem; font-weight: 600; color: var(--teal); }

/* ---------- Four steps: horizontal stepper (desktop) / vertical timeline (mobile) ---------- */
.hw-steps { --step-ms: 7000ms; }
.hw-stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hw-stepper button {
  position: relative; display: grid; gap: 4px; text-align: left; font: inherit; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px 20px; overflow: hidden;
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.hw-stepper button:hover { border-color: #F3C894; }
.hw-stepper__n { font-size: .8rem; font-weight: 800; letter-spacing: .1em; color: var(--muted); transition: color .25s; }
.hw-stepper__t { font-weight: 700; color: var(--charcoal); line-height: 1.3; }
.hw-stepper button[aria-selected="true"] { border-color: var(--orange); box-shadow: 0 18px 36px -26px rgba(226, 126, 20, .6); }
.hw-stepper button[aria-selected="true"] .hw-stepper__n { color: var(--orange-600); }
.hw-stepper button[aria-selected="true"] .hw-stepper__t { color: var(--ink); }
/* Progress line along the bottom of the active step; when it fills, the next step opens */
.hw-stepper__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--stone); }
.hw-stepper__bar i { display: block; height: 100%; width: 0; background: var(--orange); }
.hw-stepper button[aria-selected="true"] .hw-stepper__bar i { width: 100%; }
.hw-steps.is-auto .hw-stepper button[aria-selected="true"] .hw-stepper__bar i { width: 0; animation: hwFill var(--step-ms) linear forwards; }
.hw-steps.is-paused .hw-stepper button[aria-selected="true"] .hw-stepper__bar i { animation-play-state: paused; }
@keyframes hwFill { to { width: 100%; } }

.hw-panels { margin-top: 20px; }
.hw-panel {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 4vw, 64px); align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 3.5vw, 48px);
  box-shadow: 0 40px 80px -60px rgba(18, 20, 22, .45);
}
.hw-panel[hidden] { display: none; }
.hw-steps.is-tabs .hw-panel:not([hidden]) { animation: hwIn .45s var(--ease); }
@keyframes hwIn { from { opacity: 0; transform: translateY(10px); } }
.hw-panel__step { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.hw-panel__copy h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -0.03em; margin-top: 10px; }
.hw-panel__copy > p:not(.hw-panel__step) { color: var(--body); margin-top: 14px; font-size: 1.02rem; }
.hw-panel__copy .btn { margin-top: 26px; padding: 13px 22px; }

/* Step 1 illustration: abstract shapes only, not product UI */
.hw-illus { position: relative; aspect-ratio: 16 / 11; border-radius: 20px; background: linear-gradient(150deg, #FFF4E8, #FFE6CC); display: grid; place-items: center; overflow: hidden; }
.hw-illus__card { width: 52%; background: #fff; border-radius: 18px; padding: 28px 24px; display: grid; gap: 14px; justify-items: center; box-shadow: 0 30px 50px -30px rgba(226, 126, 20, .55); }
.hw-illus__avatar { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--orange-50); color: var(--orange-600); }
.hw-illus__avatar svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.hw-illus__line { width: 100%; height: 12px; border-radius: 6px; background: var(--stone); }
.hw-illus__line--short { width: 70%; }
.hw-illus__btn { width: 100%; height: 34px; border-radius: 10px; background: var(--orange); margin-top: 4px; }
.hw-illus__badge { position: absolute; right: 9%; top: 13%; display: grid; justify-items: center; width: 104px; height: 104px; align-content: center; border-radius: 50%; background: var(--teal); color: #fff; font-size: .74rem; font-weight: 700; text-align: center; line-height: 1.2; box-shadow: 0 20px 36px -20px rgba(45, 107, 107, .7); transform: rotate(-8deg); }
.hw-illus__badge strong { font-size: 2.1rem; line-height: 1; }
.hw-illus__dot { position: absolute; border-radius: 50%; background: var(--orange); }
.hw-illus__dot--a { width: 18px; height: 18px; left: 12%; bottom: 18%; }
.hw-illus__dot--b { width: 10px; height: 10px; left: 22%; top: 16%; opacity: .6; }

/* ---------- Typical day + tools ---------- */
.hw-day { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.hw-day li, .hw-tools li { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px 22px 26px; display: grid; gap: 10px; align-content: start; }
.hw-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: #E5F1EF; color: var(--teal); margin-bottom: 6px; }
.hw-ico--orange { background: linear-gradient(160deg, #FFF1E2, #FFE5C8); color: var(--orange-600); }
.hw-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hw-day h3, .hw-tools h3 { font-size: 1.08rem; line-height: 1.35; }
.hw-day p, .hw-tools p { color: var(--muted); font-size: .95rem; }
.hw-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

/* ---------- Free trial + final CTA ---------- */
.hw-trial { display: flex; align-items: center; justify-content: space-between; gap: 32px; border-radius: 24px; background: var(--cream); border: 1px solid var(--line); padding: clamp(28px, 4vw, 52px); }
.hw-trial h2 { max-width: 14ch; }
.hw-trial__ctas { display: flex; flex-wrap: wrap; gap: 14px; flex: none; }
.hw-cta { background: var(--charcoal); }
.hw-cta::before { background: radial-gradient(closest-side, rgba(45, 107, 107, .45), transparent); }
.hw-cta__eyebrow { color: #F7B267; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hw-day { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hw-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Mobile: no tabs, every step shown down a numbered timeline */
@media (max-width: 899px) {
  .hw-stepper { display: none; }
  .hw-panels { margin-top: 0; display: grid; gap: 0; position: relative; padding-left: 30px; }
  .hw-panels::before { content: ""; position: absolute; left: 10px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--orange), #F3C894); }
  .hw-panel { position: relative; grid-template-columns: 1fr; gap: 22px; margin-bottom: 22px; padding: 22px 18px; }
  .hw-panel::before { content: ""; position: absolute; left: -26px; top: 26px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--orange); }
  .hw-trial { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .hw-day, .hw-tools { grid-template-columns: 1fr; }
  .hw-illus__badge { width: 84px; height: 84px; right: 6%; top: 8%; }
  .hw-illus__badge strong { font-size: 1.7rem; }
}
