@import url("../arsenal/thread.css");
/* how-it-works.css: the How it works page's own placing and sizing. Components and tokens come from design\.
   The page is the thread (arsenal composition): one line of small X blocks down the paper, turning only in the gaps
   between parts. So every part pads at least --thread-radius above and below, no part takes a position, a z-index or
   a background of its own (the paper is the thread's), and each anchor's lane stays clear of text down to its
   part's end: numbers sit beside their headings, and the photos, the plan and Sean's portrait are lights it runs
   behind. Scenes keep their words at full size; glass stays off faces. */

/* ---------- the thread ---------- */
.hiw-thread { --thread-link: 9px; --thread-gap: 17px; --thread-radius: 48px; background: var(--c-paper); color: var(--c-ink); }
.hiw-thread .hp .head__line, .hiw-thread .hp .op__line { color: var(--c-ink-soft); }
.hiw-thread .hp .em, .hiw-thread .hp .link-arrow { color: var(--c-brand-text); }
.hp { padding-block: clamp(72px, 8vw, 120px); }
/* an eased ramp of the script's --lit (0 to 1) */
.hiw-thread [data-thread-anchor], .hiw-thread [data-thread-light] { --p: calc(var(--lit, 1) * var(--lit, 1) * (3 - 2 * var(--lit, 1))); }

/* a step's number: an X block outlined on the paper; it fills as the line plugs in, one ring spreading from it */
.hiw-num { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 14px; background: var(--c-paper); box-shadow: inset 0 0 0 2px var(--c-brand); font: 800 1.375rem/1 var(--font-display); color: var(--c-brand-text); }
.hiw-num::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--grad-x); opacity: var(--p); }
.hiw-num::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 2px var(--c-brand); opacity: calc(var(--p) * (1 - var(--lit-after, 1))); transform: scale(calc(1 + 0.7 * var(--lit-after, 1))); pointer-events: none; }
.hiw-num > span { position: relative; z-index: 1; color: color-mix(in srgb, var(--c-on-brand) calc(var(--p) * 100%), var(--c-brand-text)); }

/* a part's heading with its number beside it (the lane is the number's column) */
.hp__head { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: clamp(18px, 2.4vw, 32px); align-items: start; }
.hp__head .hiw-num { margin-top: 0.15em; }
.hp__words { display: grid; gap: var(--space-4); max-width: 46rem; }
.hp__words .head__line { margin: 0; }
/* the intro of our part has no number: its words keep the same indent, so the lane runs past them */
.op__intro { grid-template-columns: 52px minmax(0, 1fr); }
.op__intro .hp__words { grid-column: 2; }

/* ---------- 1. the header: the phone footage, the path at its lower left, the words and the box at the right ---------- */
.hiwhead { display: grid; }
.hiwhead__media { position: relative; inset: auto; height: 440px; }
.hiwhead__media video { object-position: 50% 50%; }
.hiwhead__wash { background: linear-gradient(180deg, rgba(13, 13, 15, 0.15) 0, rgba(13, 13, 15, 0) 160px, rgba(13, 13, 15, 0) 300px, var(--c-night) 440px); }
.hiwhead__scene { position: absolute; left: 0; right: 0; top: 0; height: 440px; z-index: 1; }
.hiwhead > .stop { top: 14px; bottom: auto; right: 14px; }
.hiwhead__in { position: relative; z-index: 2; width: 100%; box-sizing: border-box; padding-block: 8px 48px; }
.hiwhead__copy { display: grid; gap: 16px; }
.hiwhead .phead__line { margin-top: 0; }
.hiwhead__box { margin-top: 6px; }
@media (min-width: 1000px) {
  .hiwhead { min-height: calc(100svh - var(--header-h)); }
  .hiwhead__media { position: absolute; inset: 0; height: auto; }
  .hiwhead__media video { object-position: 70% 50%; }
  .hiwhead__wash { background: linear-gradient(270deg, rgba(13, 13, 15, 0.92) 0%, rgba(13, 13, 15, 0.82) 30%, rgba(13, 13, 15, 0.2) 55%, rgba(13, 13, 15, 0) 70%), linear-gradient(0deg, rgba(13, 13, 15, 0.45) 0%, rgba(13, 13, 15, 0) 40%); }
  .hiwhead__scene { inset: 0; height: auto; }
  .hiwhead > .stop { top: auto; bottom: 18px; right: 40px; }
  .hiwhead__in { display: grid; grid-template-columns: minmax(0, 520px); justify-content: end; align-content: center; padding-block: clamp(20px, 3.5vh, 44px) 0; }
  .hiwhead__copy { gap: 14px; padding-bottom: clamp(20px, 3.5vh, 44px); }
  .hiwhead .phead__title { font-size: min(clamp(2.5rem, 1.6rem + 3.4vw, 4.25rem), 6.4vh); }
}

/* ---------- 2. your part: the owner on her call, the goal and the market check in glass at the left ---------- */
.yp__band { position: relative; overflow: hidden; margin-top: clamp(32px, 4vw, 56px); background: var(--c-night-3); }
.yp__photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 30%; filter: saturate(calc(0.62 + 0.38 * var(--p))); }
.yp__in { position: relative; z-index: 1; }
.yp__cards { display: grid; gap: 16px; width: min(100%, 380px); padding-block: 28px; }
.yp__scene { position: relative; }
.yp__band .stop { top: 14px; bottom: auto; right: 14px; }
/* phone: the photo stands tall behind the whole band, her face at its top, the two cards over her desk below it */
@media (max-width: 759px) {
  .yp__band { padding-top: 330px; }
  .yp__photo { object-position: 57% 0%; }
  .yp__band::after { content: ''; position: absolute; inset: 300px 0 0; background: linear-gradient(180deg, rgba(13, 13, 15, 0), rgba(13, 13, 15, 0.38) 160px); pointer-events: none; }
  .yp__cards { width: auto; max-width: 420px; margin-inline: auto; padding-block: 0 20px; }
}
@media (min-width: 760px) {
  .yp__band { min-height: 720px; }
  .yp__cards { padding-block: 48px; }
  .yp__band::before { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, rgba(13, 13, 15, 0.42) 0%, rgba(13, 13, 15, 0.12) 36%, rgba(13, 13, 15, 0) 48%); pointer-events: none; }
}
/* a tablet and a small computer: the photo's left edge kept, so her face stays right of the cards */
@media (min-width: 760px) and (max-width: 1099px) { .yp__photo { object-position: 0% 30%; } }

/* ---------- 3. our part: three steps, sides alternating ---------- */
.op__intro { margin-bottom: clamp(36px, 4vw, 56px); }
.op__row { display: grid; gap: 28px; align-items: center; }
.op__text { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: clamp(18px, 2.4vw, 32px); align-items: start; }
.op__words { display: grid; gap: 12px; }
.op__title { font: 800 clamp(1.5rem, 1.1rem + 1.3vw, 2.125rem)/1.12 var(--font-display); letter-spacing: -0.015em; text-wrap: balance; }
.op__line { margin: 0; font-size: var(--fs-lede); line-height: 1.45; max-width: 30rem; }
.op__text .hiw-num { margin-top: 0.1em; }
.op__media { position: relative; }
.op__frame { position: relative; overflow: hidden; border-radius: var(--radius-xl); background: var(--c-night-3); box-shadow: var(--shadow-l); aspect-ratio: 4 / 3; }
.op__photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; filter: saturate(calc(0.62 + 0.38 * var(--p))); transform: scale(calc(1.05 - 0.05 * var(--p))); }
/* the frames keep one shape at every width, so the faces stay where these positions put them:
   tailgate, his face at 16%, the laptop and the street to his right; the bakery, her face at 76%, the flowers at the
   left; the home office, his face at 28%, the window and the laptop to his right */
.op__photo--tailgate { object-position: 85% 40%; }
.op__photo--shop { object-position: 0% 30%; }
.op__photo--tune { object-position: 100% 40%; }
.op__scene { position: relative; }
.op__media .stop { top: 14px; right: 14px; bottom: auto; }
/* a phone: a tall frame, the face in its top third, the card across its foot */
.op__stage { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 12px; max-width: 400px; margin-inline: auto; }
@media (max-width: 599px) {
  .op__frame { aspect-ratio: auto; height: 540px; }
  .op__photo--tailgate { object-position: 45% 40%; }
  .op__photo--shop { object-position: 68% 30%; }
  .op__photo--tune { object-position: 37% 40%; }
}
/* a tablet and up: the card in the photo's calm corner */
@media (min-width: 600px) {
  .op__stage { left: auto; right: auto; bottom: auto; margin: 0; width: 310px; }
  .op--1 .op__stage { right: 24px; bottom: 24px; }
  .op--2 .op__stage { left: 24px; bottom: 24px; }
  .op--3 .op__stage { right: 24px; top: 24px; }
  .op--3 .op__media .stop { top: auto; bottom: 14px; }
}
@media (min-width: 1000px) {
  .op__row { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; }
  .op--flip .op__row { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .op--flip .op__media { grid-column: 1; grid-row: 1; }
  .op--flip .op__text { grid-column: 2; }
  .op__frame { aspect-ratio: 6 / 5; }
  /* tailgate: the card over the laptop's far end and the street; the bakery: over the flowers, she looks down toward
     it; the home office: over the window */
  .op__stage { width: clamp(290px, 23vw, 330px); }
}

/* ---------- 4. the plan: plan-builder in a night frame (the line plugs into its corner and runs behind it) ---------- */
.pb__head { max-width: 40rem; }
.pb__frame { position: relative; overflow: hidden; border-radius: var(--radius-xl); background: radial-gradient(70% 90% at 100% 0%, rgba(241, 128, 46, 0.14), rgba(241, 128, 46, 0) 60%), var(--c-night); box-shadow: var(--shadow-l); padding: 56px 24px 28px; }
.pb__stage { max-width: 900px; margin-inline: auto; }
.pb__scene { position: relative; height: 560px; }
.pb__frame .stop { top: 14px; right: 14px; bottom: auto; }
@media (max-width: 679px) {
  .pb__frame { margin-inline: calc(var(--gutter) * -1); border-radius: 0; padding: 56px 0 16px; }
  .pb__stage { max-width: 420px; }
  .pb__scene { height: 700px; }
}

/* ---------- 5. who runs it: the monthly call at the left, Sean's portrait at the right ---------- */
.tm__in { display: grid; gap: 36px; align-items: start; }
.tm__head { margin-bottom: 28px; }
.tm__stage { position: relative; max-width: 460px; padding-top: 48px; }
.tm__stage .stop { top: 0; right: 0; bottom: auto; }
.tm__sean { margin: 0; width: min(100%, 442px); justify-self: center; }
.tm__sean img { display: block; width: 100%; height: auto; border-radius: var(--radius-xl); box-shadow: var(--shadow-l); filter: saturate(calc(0.62 + 0.38 * var(--p))); }
.tm__sean figcaption { margin-top: 12px; font: 700 var(--fs-small)/1.3 var(--font-ui); color: var(--c-ink-soft); text-align: center; }
@media (min-width: 1000px) {
  .tm__in { grid-template-columns: minmax(0, 1fr) 442px; gap: 72px; }
  .tm__sean { justify-self: end; }
}

/* ---------- the FAQ: the lane between the heading and the questions ---------- */
.hfaq__node { display: none; }
@media (min-width: 1000px) {
  .hfaq__in { grid-template-columns: minmax(0, 4fr) 88px minmax(0, 7fr); gap: 0; }
  .hfaq__in .faqband__head { grid-column: 1; grid-row: 1; }
  .hfaq__in .faq { grid-column: 3; grid-row: 1; }
  .hfaq__node { grid-column: 2; grid-row: 1; justify-self: center; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--c-paper); box-shadow: inset 0 0 0 2px var(--c-brand); }
  .hfaq__node .x { width: 18px; height: 18px; border-radius: 5px; opacity: var(--p); }
}

/* ---------- 6. the close: the words and the front desk at the left, the booking box at the right ---------- */
.hiwclose__in { display: grid; gap: 28px; }
.hiwclose__side { display: grid; gap: 20px; align-content: start; }
.hiwclose__head { margin: 0; }
.hiwclose__talk a { color: var(--c-ink); }
.hiwclose__media { position: relative; overflow: hidden; border-radius: var(--radius-xl); background: var(--c-night-3); box-shadow: var(--shadow-l); aspect-ratio: 4 / 3; }
.hiwclose__clip { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 100% 50%; }
.hiwclose__media .stop { top: 14px; right: 14px; bottom: auto; }
/* phone: the words, the box, then the front desk */
@media (max-width: 999px) {
  .hiwclose__side { display: contents; }
  .hiwclose__head { order: 1; }
  .hiwclose__box { order: 2; }
  .hiwclose__talk { order: 3; }
  .hiwclose__media { order: 4; }
}
@media (min-width: 1000px) {
  .hiwclose__in { grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 64px; align-items: start; }
  .hiwclose__media { margin-top: 8px; }
}
