/* How it works (plan.md): the header (a phone lighting up in a bright kitchen, the words centered on the paper above
   it), the owner's three steps across the riser line, the team's three down it, the plan building, the advisor, the
   FAQ and the close. Only places and sizes; the look is in design\components.css. */

/* ---- hero: the words on the paper, the phone rising under them with the notifications landing on it ---- */
.phead--how { background: var(--c-paper); color: var(--c-ink); }
.phead--how h1 { max-width: 23ch; font-size: clamp(2.3rem, 1.5rem + 2.6vw, 3.7rem); color: var(--c-ink); }
.phead--how .phead__lead { color: var(--c-ink-soft); }
.phead--how .cta-line { color: var(--c-ink-soft); }
.phead--how :focus-visible { outline-color: var(--c-brand-text); }
.how-head { position: relative; z-index: 2; display: grid; gap: var(--space-3); justify-items: center; padding-top: clamp(44px, 5vw, 72px); text-align: center; }
.how-head .phead__cta { justify-items: center; }
.how-stage { --glass: clamp(236px, 20vw, 290px); position: relative; height: clamp(450px, 44vw, 560px); margin-top: clamp(8px, 1.5vw, 24px); overflow: hidden; }
.how-stage::before { content: ""; position: absolute; z-index: 1; inset: 0 0 auto; height: 48px; background: linear-gradient(var(--c-paper), color-mix(in srgb, var(--c-paper) 0%, transparent)); pointer-events: none; }
/* the photo at its own shape, sized by the phone's glass and set so the phone stands in the middle, its top near the stage's */
.how-photo { --w: calc(var(--glass) / 0.142); position: absolute; left: calc(50% - var(--w) * 0.525); top: calc(64px - var(--w) / 1.7927 * 0.17); width: var(--w); aspect-ratio: 1280 / 714; }
.how-photo img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.how-screen { position: absolute; left: 45.5%; top: 17.2%; width: 14.1%; height: 57.6%; overflow: hidden; border-radius: 12% / 5.6%; background: linear-gradient(172deg, var(--c-ink) 0%, color-mix(in srgb, var(--c-ink) 82%, var(--c-brand)) 100%); color: var(--c-on-ink); }
.how-screen__clock { position: absolute; top: 9%; left: 0; right: 0; display: grid; justify-items: center; gap: 4px; text-align: center; }
.how-screen__day { font: 600 0.875rem/1.2 var(--font-ui); color: var(--c-on-ink-soft); }
.how-screen__time { font: 600 clamp(2.6rem, 1.6rem + 2.4vw, 3.6rem)/1 var(--font-display); color: var(--c-on-ink); font-variant-numeric: tabular-nums; }
.how-screen svg { position: absolute; left: 50%; bottom: 7%; width: 28px; height: 28px; margin-left: -14px; fill: var(--c-accent); }
.scene.how-feed { position: absolute; z-index: 3; left: 50%; top: 170px; bottom: 74px; width: min(520px, calc(100% - 32px)); transform: translateX(-50%); }
.how-stage__stop { top: auto; bottom: 18px; right: max(var(--gutter), calc((100% - var(--max-w)) / 2)); }

/* ---- yours: the owner's three steps across the riser line ---- */
.ysteps { --gap: clamp(28px, 4vw, 48px); --p: 0; position: relative; }
.ysteps__list { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin: 0; padding: 0; list-style: none; }
.ysteps__list::before { content: ""; position: absolute; top: 12px; left: 7px; right: 0; height: 2px; margin-top: -1px; background: repeating-linear-gradient(90deg, var(--c-dash) 0 7px, transparent 7px 16px); }
.ysteps__list::after { content: ""; position: absolute; top: 12px; left: 7px; width: calc(var(--p) * (100% + var(--gap)) * 2 / 3); height: var(--riser-w); margin-top: calc(var(--riser-w) / -2); border-radius: 2px; background: var(--c-accent); }
.ysteps__mark { position: absolute; z-index: 2; top: 12px; left: calc((100% + var(--gap)) / 6 + 26px); max-width: calc((100% + var(--gap)) / 3 - 130px); padding: 5px 14px; border-radius: 999px; background: var(--c-paper-alt); font-size: 0.875rem; line-height: 1.35; color: var(--c-ink-soft); text-align: center; transform: translate(-50%, -50%); }
.ysteps__mark b { color: var(--c-ink); font-weight: 600; }
.ysteps__stop { bottom: -50px; right: 0; }
.ystep { position: relative; display: grid; align-content: start; gap: var(--space-2); }
.ystep__num { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; height: 24px; font: 700 1rem/1 var(--font-ui); color: var(--c-accent-text); }
.ystep.is-reached .riser__node, .ostep.is-reached .riser__node { border-color: var(--c-accent); background: var(--c-accent); }
.ystep h3, .ostep h3 { margin-top: var(--space-2); font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem); }
.ystep__line { color: var(--c-ink-soft); }
.ystep__stage { position: relative; display: grid; align-items: start; margin-top: var(--space-3); }

/* ---- ours: the team's three steps down the riser line, photo and words alternating ---- */
.osteps { --p: 0; --ogap: clamp(64px, 8vw, 120px); position: relative; }
.osteps__mark { position: relative; z-index: 2; display: table; margin: 0 auto clamp(28px, 3vw, 40px); padding: 6px 16px; border-radius: 999px; background: var(--c-paper); box-shadow: inset 0 0 0 1px var(--c-line); font-size: 0.875rem; color: var(--c-ink-soft); }
.osteps__mark b { color: var(--c-ink); font-weight: 600; }
.osteps__stop { top: -6px; right: 0; }
.osteps__list { position: relative; display: grid; gap: clamp(64px, 7vw, 112px); margin: 0; padding: 0; list-style: none; }
.osteps__list::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: repeating-linear-gradient(to bottom, var(--c-dash) 0 7px, transparent 7px 16px); }
.osteps__list::after { content: ""; position: absolute; top: 0; left: 50%; width: var(--riser-w); height: calc(var(--p) * 100%); margin-left: calc(var(--riser-w) / -2); border-radius: 2px; background: var(--c-accent); }
.ostep { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--ogap); align-items: center; }
.ostep__text { position: relative; display: grid; gap: var(--space-2); max-width: 28rem; }
.ostep:nth-child(odd) .ostep__text { grid-column: 1; grid-row: 1; justify-self: end; justify-items: end; text-align: right; }
.ostep:nth-child(odd) .ostep__stage { grid-column: 2; grid-row: 1; }
.ostep:nth-child(even) .ostep__text { grid-column: 2; grid-row: 1; justify-self: start; }
.ostep:nth-child(even) .ostep__stage { grid-column: 1; grid-row: 1; }
.ostep .ystep__num { position: static; }
.ostep:nth-child(odd) .riser__node { position: absolute; top: 5px; right: calc(var(--ogap) / -2 - 7px); }
.ostep:nth-child(even) .riser__node { position: absolute; top: 5px; left: calc(var(--ogap) / -2 - 7px); }
.ostep__stage { position: relative; height: 470px; }
.ostep__media { position: absolute; inset: 0; overflow: hidden; border-radius: var(--radius-l); background: var(--c-paper-alt); }
.ostep__media img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; }
#live .ostep__media img { object-position: 62% 40%; }
#arrive .ostep__media img { object-position: 30% 40%; }
#tune .ostep__media img { object-position: 30% 40%; }
.scene.ostep__scene { position: absolute; z-index: 2; top: 20px; bottom: 20px; width: min(56%, 330px); }
.ostep--left .scene.ostep__scene { left: 20px; }
.ostep--right .scene.ostep__scene { right: 20px; }
/* step 06: the scene hangs off the photo's foot, clear of the electrician's face and hands */
#tune .ostep__stage { height: 560px; }
#tune .ostep__media { bottom: 150px; }
#tune .scene.ostep__scene { left: auto; right: -14px; top: 236px; bottom: 0; }
/* step 05: the dashboard over the front desk, under the faces (hers at the upper left, the lounge's at the upper right) */
#arrive .scene.ostep__scene { top: auto; bottom: 20px; width: min(400px, calc(100% - 40px)); height: 290px; }
/* step 04: the switches at the photo's foot on the left, the roof and its two roofers clear above */
#live .scene.ostep__scene { top: auto; bottom: 20px; height: 300px; }
.ostep__stop { top: 14px; right: 14px; }

/* ---- inside: the words left, the plan building on the right ---- */
.inside { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.inside__head { margin-bottom: 0; }
.inside__cta { display: grid; gap: var(--space-2); justify-items: start; margin-top: var(--space-3); }
.inside__stage { position: relative; padding-top: 52px; }
.scene.inside__scene { height: 580px; }
.inside__stop { top: 0; right: 0; }

/* ---- team: the advisor's chat over the owner on his break ---- */
.team__stage { position: relative; height: 640px; }
.team__media { position: absolute; inset: 0; overflow: hidden; border-radius: var(--radius-l); background: var(--c-paper-alt); }
.team__media img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 50% 32%; }
.scene.team__scene { position: absolute; z-index: 2; top: 40px; right: clamp(24px, 8%, 110px); width: 340px; height: 560px; }
.team__stop { top: 16px; left: 16px; }

/* ---- close: the owner at his desk at dusk, the words on the right over the window, the booking on the left ---- */
.close--how .close__media img { object-position: 50% 40%; }
.close--how .close__media::after { background: linear-gradient(270deg, color-mix(in srgb, var(--c-ink) 94%, transparent) 0%, color-mix(in srgb, var(--c-ink) 86%, transparent) 36%, color-mix(in srgb, var(--c-ink) 22%, transparent) 62%, transparent 82%); }
.close--how .close__in { justify-items: end; }
.close--how .close__copy, .close--how .picker { width: min(100%, 31rem); }
.close__booked { position: absolute; left: max(var(--gutter), calc((100% - var(--max-w)) / 2)); bottom: clamp(96px, 11vw, 150px); z-index: 1; display: grid; grid-template-columns: auto auto; column-gap: 12px; row-gap: 2px; align-items: center; padding: 15px 20px 16px 16px; border-radius: var(--radius-m); background: var(--c-paper); color: var(--c-ink); box-shadow: inset 0 0 0 1px var(--c-line), var(--shadow-l); }
.close__booked-tick { grid-row: span 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c-accent); }
.close__booked-tick svg { width: 16px; height: 16px; stroke: var(--c-on-brand); }
.close__booked b { font-size: 16px; font-weight: 600; }
.close__booked span:last-child { font-size: 14px; color: var(--c-ink-soft); }

/* ---- the tablet and the phone ---- */
@media (max-width: 1000px) {
  .inside { grid-template-columns: minmax(0, 1fr); }
  .team__stage { height: 600px; }
  .scene.team__scene { top: 30px; right: 24px; }
}
@media (max-width: 900px) {
  .ysteps__list { grid-template-columns: minmax(0, 1fr); gap: 56px; padding-left: 34px; }
  .ysteps__list::before { top: 0; bottom: 0; right: auto; width: 2px; height: auto; margin: 0 0 0 -1px; background: repeating-linear-gradient(to bottom, var(--c-dash) 0 7px, transparent 7px 16px); }
  .ysteps__list::after { width: var(--riser-w); height: calc(var(--p) * 100%); margin: 0 0 0 calc(var(--riser-w) / -2); }
  .ystep .ystep__num { margin-left: -34px; }
  .ystep__stage { min-height: 0; }
  .ysteps__mark { position: relative; top: auto; left: auto; display: table; max-width: none; margin: 0 0 24px; transform: none; }
  .osteps__mark { margin-left: 0; }
  .osteps__list { padding-left: 34px; }
  .osteps__list::before, .osteps__list::after { left: 7px; }
  .ostep { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-4); }
  .ostep:nth-child(n) .ostep__text { grid-column: 1; grid-row: 1; justify-self: start; justify-items: start; text-align: left; }
  .ostep:nth-child(n) .ostep__stage { grid-column: 1; grid-row: 2; }
  .ostep:nth-child(n) .riser__node { position: absolute; top: 5px; left: -34px; right: auto; }
  .close__booked { display: none; }
}
@media (max-width: 760px) {
  .how-stage { --glass: 196px; height: 430px; }
  .scene.how-feed { top: 150px; bottom: 60px; }
  /* the photo stays under the whole card on the phone: it fills the stage, and the card is pushed down onto its lower part */
  .ostep__stage, #tune .ostep__stage { height: auto; display: grid; }
  #tune .ostep__media { bottom: 0; }
  .scene.ostep__scene, #tune .scene.ostep__scene, #arrive .scene.ostep__scene { position: relative; inset: auto; width: auto; height: 330px; margin: 200px 10px 10px; }
  .ysteps__stop { top: 64px; bottom: auto; }
  .team__stop { top: 176px; left: auto; right: 14px; }
  #live .ostep__media img { object-position: 64% 0%; }
  #arrive .ostep__media img { object-position: 24% 10%; }
  #tune .ostep__media img { object-position: 36% 12%; }
  .scene.inside__scene { height: 720px; }
  .team__stage { height: auto; display: grid; }
  .team__media img { object-position: 34% 10%; }
  .scene.team__scene { position: relative; top: auto; right: auto; justify-self: center; width: min(340px, calc(100% - 20px)); margin: 230px 0 12px; }
  .close--how .close__in { justify-items: start; }
}
