/* How it works: the core loop, step by step, beside clips recorded from the iOS app.
   Builds on styles.css (tokens, nav, footer) and articles.css (.a-hero, .a-lede). */
.a-hero .eyebrow { display: block; margin-bottom: 18px; }
.a-hero h1 em { display: block; font-style: italic; color: var(--ink-70); }

/* the five steps as a path under the hero */
.hw-path { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 34px 0 0; padding: 0; list-style: none; counter-reset: hw; }
.hw-path li { display: flex; align-items: center; gap: 8px; counter-increment: hw; }
.hw-path li + li::before { content: ""; width: 18px; height: 1px; background: var(--ink-30); }
.hw-path a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--hair); font-size: 14px; font-weight: 500; transition: border-color .2s; }
.hw-path a::before { content: counter(hw); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: var(--canvas); font-size: 12px; }
.hw-path a:hover { border-color: var(--ink-30); }

.hw { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 72px; max-width: 1040px; margin: 0 auto; padding: 40px 16px 0; }
.hw-step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; scroll-margin-top: 80px; transition: opacity .4s var(--ease); }
/* how.js adds .hw-live: steps other than the one in view fade back */
.hw-live .hw-step:not(.is-active) { opacity: .32; }
.hw-num { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.hw-step h2 { margin: 14px 0 16px; font-family: var(--serif); font-weight: 300; font-size: clamp(32px, 3.6vw, 48px); line-height: 1.06; letter-spacing: -.035em; }
.hw-step h2 em { font-style: italic; }
.hw-step p { max-width: 520px; font-size: 18px; line-height: 1.55; color: var(--ink-70); }
.hw-points { display: grid; gap: 8px; max-width: 520px; margin: 20px 0 0; padding: 0; list-style: none; }
.hw-points li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.45; }
.hw-points li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--green-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.5l2.2 2.2 4.8-5' fill='none' stroke='%233e7a54' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* The phone: titanium frame and bezel as on the home page and articles, with the side buttons.
   The recorded screen (402 x 874 pt) fills the bezel; it already carries the status bar and island. */
.hw-phone {
  position: relative; width: 300px; padding: 5px; border-radius: 50px;
  background: linear-gradient(100deg, #8a847a, #d8d3ca 7%, #efebe4 35%, #dcd6cc 70%, #a49e94);
  box-shadow: inset 0 0 0 .6px rgba(0, 0, 0, .35), 0 40px 70px -30px rgba(20, 20, 42, .55);
}
.hw-phone::before, .hw-phone::after { content: ""; position: absolute; width: 3px; }
/* left: action button, volume up, volume down */
.hw-phone::before {
  left: -3px; top: 14%; height: 23.5%; border-radius: 2px 0 0 2px;
  background:
    linear-gradient(90deg, #7d776d, #d4cec4) 0 0 / 100% 16% no-repeat,
    linear-gradient(90deg, #7d776d, #d4cec4) 0 33% / 100% 30% no-repeat,
    linear-gradient(90deg, #7d776d, #d4cec4) 0 100% / 100% 30% no-repeat;
}
/* right: side button */
.hw-phone::after { right: -3px; top: 23%; height: 11%; border-radius: 0 2px 2px 0; background: linear-gradient(90deg, #d4cec4, #7d776d); }
.hw-screen { padding: 3.5px; border-radius: 45px; background: #0c0c0d; }
.hw-screen video { display: block; width: 100%; aspect-ratio: 600 / 1304; border-radius: 41.5px; object-fit: cover; background: #f1ede6; transition: opacity .25s; }
.hw-screen video.swapping { opacity: 0; }

.hw-stage { position: sticky; top: calc(50vh - 330px); align-self: start; display: grid; justify-items: center; gap: 18px; margin-top: 40px; }
.hw-dots { display: flex; gap: 8px; }
.hw-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--ink-30); transition: width .3s var(--ease), background .3s; }
.hw-dots button[aria-current="step"] { width: 22px; border-radius: 4px; background: var(--navy); }
.hw-inline { display: none; }

.hw-end { max-width: 1040px; margin: 0 auto; padding: 120px 16px 0; text-align: center; }
.hw-end .display { font-size: clamp(40px, 5vw, 68px); }
.hw-end .display em { font-style: italic; }
.hw-end p { margin: 18px auto 30px; font-size: 18px; color: var(--ink-70); }

@media (max-width: 960px) {
  .hw { grid-template-columns: 1fr; gap: 0; }
  .hw-stage { display: none; }
  .hw-step, .hw-live .hw-step:not(.is-active) { min-height: 0; opacity: 1; padding: 56px 0 0; }
  .hw-inline { display: flex; justify-content: center; margin-top: 32px; }
  .hw-inline .hw-phone { width: min(280px, 74vw); border-radius: 46px; }
  .hw-inline .hw-screen { border-radius: 41px; }
  .hw-inline .hw-screen video { border-radius: 37.5px; }
}
@media (max-width: 480px) {
  .hw-path li + li::before { width: 8px; }
  .hw-step p { font-size: 17px; }
  .hw-end { padding-top: 88px; }
}
