/* how-it-works.css: places and sizes the How it works page's parts, with the tokens of system.css only. */

/* ================= hero: navy ground, the words centered over a wide framed clip, its notifications on its left ================= */
.hwh {
  --rise-h: clamp(16px, 2.2vw, 30px);
  position: relative; isolation: isolate; color: var(--c-on-ink); background: var(--c-ink); --c-focus: var(--c-brand);
  padding: calc(76px + clamp(2rem, 1rem + 2.5vw, 3.25rem)) 0 calc(clamp(3.5rem, 2rem + 4vw, 6rem) + var(--rise-h));
  /* the rising step at its foot: the navy steps down to the left, the ivory below climbs to the right */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--rise-h)), 71% calc(100% - var(--rise-h)), 71% calc(100% - var(--rise-h) / 2), 42% calc(100% - var(--rise-h) / 2), 42% 100%, 0 100%);
}
.hwh::before {
  content: ""; position: absolute; z-index: -1; inset: auto 0 0; height: calc(clamp(3.5rem, 2rem + 4vw, 6rem) + var(--rise-h)); pointer-events: none;
  background: rgba(var(--c-paper-rgb), .035);
  clip-path: polygon(0 66%, 42% 66%, 42% 33%, 71% 33%, 71% 0, 100% 0, 100% 100%, 0 100%);
}
.hwh__in { max-width: 54rem; margin-inline: auto; text-align: center; }
.hwh__title { max-width: 15em; margin: 0 auto; color: var(--c-on-ink); font-size: var(--fs-h1); font-weight: 700; }
.hwh__title span { display: block; }
.hwh__line { max-width: 46rem; margin: .9rem auto 0; color: var(--c-soft-on-ink); font-size: clamp(1.0625rem, 1rem + .4vw, 1.3rem); line-height: 1.55; }
.hwh__cta { justify-content: center; margin-top: 1.5rem; }
.hwh .cta-line { color: var(--c-soft-on-ink); }
.hwh__stage { position: relative; margin-top: clamp(1.75rem, 1rem + 1.5vw, 2.5rem); }
/* wide and framed, and short enough that its foot and its notifications show on the first screen */
.hwh__clip { position: relative; height: clamp(320px, calc(100vh - 440px), 531px); overflow: hidden; border-radius: calc(var(--radius-l) * 1.6); background: var(--c-navy-2); box-shadow: 0 30px 60px -26px rgba(var(--c-deep-rgb), .7); }
/* two calm clips of one world, hands writing the week's bookings, taking turns (kit.md, the header) */
[data-kit-scene="rotate"] [data-kit-slide] { position: absolute; inset: 0; margin: 0; visibility: hidden; overflow: hidden; }
[data-kit-scene="rotate"] [data-kit-slide][data-kit-on] { visibility: visible; z-index: 2; opacity: var(--kit-move, 1); transform: translateX(var(--kit-glide, calc((1 - var(--kit-move, 1)) * 4%))); } /* the kit gives the glide in whole device pixels */
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-prev])) [data-kit-slide][data-kit-on] { transform: none; opacity: 1; } /* the first picture is simply there */
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { visibility: visible; z-index: 1; }
[data-kit-scene="rotate"] [data-kit-slide] video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-kit-on])) [data-kit-slide]:not([data-kit-slide] ~ [data-kit-slide]) { visibility: visible; } /* the first picture shows before the scripts run */
[data-kit-scene="rotate"] [data-kit-slide] video { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; clip-path: inset(2px); }
[data-kit-scene="rotate"] [data-kit-slide] video[data-kit-shown] { clip-path: none; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { opacity: clamp(0, (1 - var(--kit-move, 0)) * 1000, 1); }
.hwh__slide { --pos: 50% 42%; }
.hwh__slide video { object-position: var(--pos); }
/* one still grade over both clips, only where the notifications sit */
.hwh__clip::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(90deg, rgba(var(--c-shade), .55) 0%, rgba(var(--c-shade), .22) 30%, rgba(var(--c-shade), 0) 48%); }
.scene.hwh__scene { position: absolute; inset: 0 auto 0 0; z-index: 4; width: min(100%, 420px); }
.hwh__stage > .stop { top: 16px; right: 16px; z-index: 5; }
@media (max-width: 999px) {
  .hwh__clip { height: auto; aspect-ratio: 16 / 9; }
}
@media (max-width: 599px) {
  .hwh__clip { aspect-ratio: 4 / 3; border-radius: var(--radius-l); }
  .hwh__slide { --pos: 46% 40%; }
  .hwh__clip::after { background: linear-gradient(0deg, rgba(var(--c-shade), .6) 0%, rgba(var(--c-shade), 0) 55%); }
  .scene.hwh__scene { width: 100%; }
  .hwh__stage > .stop { top: 12px; right: 12px; }
}

/* ================= steps: the signature, a staircase line climbing through the six steps (how-it-works.js) ================= */
.stair { position: relative; isolation: isolate; overflow: hidden; }
/* the designed ground: the rising step, faint, in the band's floor and again at its top right */
.stair::before { content: ""; position: absolute; z-index: -1; inset: auto 0 0; height: calc(var(--section-y) * .9); pointer-events: none; background: rgba(var(--c-shade), .04); clip-path: polygon(0 66%, 42% 66%, 42% 33%, 71% 33%, 71% 0, 100% 0, 100% 100%, 0 100%); }
.stair__body { --spine: clamp(96px, 9vw, 150px); --row: 250px; position: relative; margin-top: clamp(1rem, .5rem + 1vw, 2rem); }
.stair__svg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.stair__track { fill: none; stroke: var(--c-line); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.stair__line { fill: none; stroke: var(--c-brand-text); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.stair__head circle { fill: var(--c-brand); stroke: var(--c-ink); stroke-width: 2.5; }
.stair__head path { fill: var(--c-ink); }
.stair__stop { top: -6px; right: -6px; z-index: 3; }
.stair__group { position: relative; z-index: 2; display: flex; justify-content: center; align-items: center; gap: .5rem; width: fit-content; margin: 0 auto; padding: .55rem 1.1rem; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-card); color: var(--c-ink-soft); font-size: var(--fs-small); box-shadow: var(--shadow-s); }
.stair__group b { color: var(--c-ink); font: 700 .8125rem/1 var(--font-display); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.stair__group--you b { color: var(--c-brand-text); }
.stair__list { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) var(--spine) minmax(0, 1fr); grid-auto-rows: var(--row); gap: 1.5rem 0; margin: 1.75rem 0; padding: 0; list-style: none; }
.stair__list > .stair__step:nth-child(odd) { grid-column: 1; }
.stair__list > .stair__step:nth-child(even) { grid-column: 3; }
.stair__list > .stair__step:nth-child(1) { grid-row: 1 / span 2; }
.stair__list > .stair__step:nth-child(2) { grid-row: 2 / span 2; }
.stair__list > .stair__step:nth-child(3) { grid-row: 3 / span 2; }
.stair__list > .stair__step:nth-child(4) { grid-row: 4 / span 2; }
.stair__step { align-self: start; }
.stair__card { position: relative; display: grid; align-content: start; padding: clamp(1.25rem, 1rem + .8vw, 1.75rem); border: 1px solid var(--c-line); border-radius: var(--radius-l); background: var(--c-card); box-shadow: var(--shadow-m); }
.stair__step--you .stair__card { background: linear-gradient(180deg, var(--c-brand-light) 0, var(--c-card) 7rem); }
.stair__num {
  position: absolute; top: clamp(1.25rem, 1rem + .8vw, 1.75rem); display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid var(--c-line); background: var(--c-card); color: var(--c-ink-soft); font: 700 .95rem/1 var(--font-display); letter-spacing: -.01em;
  transition: background-color var(--dur-med), border-color var(--dur-med), color var(--dur-med);
}
.stair__list > .stair__step:nth-child(odd) .stair__num { right: -24px; }
.stair__list > .stair__step:nth-child(even) .stair__num { left: -24px; }
.stair__step.is-reached .stair__num { border-color: var(--c-ink); background: var(--c-brand); color: var(--c-ink); }
.stair__title { margin: 0; padding-inline: 0 2.25rem; font-size: var(--fs-h3); font-weight: 700; }
.stair__list > .stair__step:nth-child(even) .stair__title, .stair__list > .stair__step:nth-child(even) .stair__time { padding-inline: 2.25rem 0; }
.stair__time { margin: .3rem 0 0; color: var(--c-brand-text); font: 600 .8125rem/1.3 var(--font-display); letter-spacing: .08em; text-transform: uppercase; }
.stair__line { margin: .6rem 0 0; color: var(--c-body); font-size: var(--fs-small); line-height: 1.5; }
/* each scene in a box of its full height, so a card never changes size as its scene plays (goal grows upward) */
.stair__scene { position: relative; display: grid; justify-items: center; align-items: center; min-height: 312px; margin-top: 1rem; }
.stair__step:has(.stair__demo--goal) .stair__scene { align-items: end; min-height: 270px; }
.stair__step:has(.stair__demo--leadbars) .stair__scene { min-height: 340px; }
.scene.stair__demo { width: min(100%, 420px); }
/* the dashboard of step 5 writes on its navy board in --c-on-brand, which is navy in this site (green takes navy
   words): ivory on the board, navy again on the green initials (as home.css does for the tour's phone) */
.stair [data-scene="leads"] .ld-board { --c-on-brand: var(--c-paper); }
/* the scene resolves its text colors at its root (from --c-on-brand, navy on this site): set them there, light on its navy board */
.stair [data-scene="leads"] { --ld-on: var(--c-paper); --ld-soft: color-mix(in srgb, var(--c-paper) 72%, transparent); }
.stair [data-scene="leads"] .ld-av { --c-on-brand: var(--c-ink); }
/* its board stands tilted in depth, which draws its words just under 13 px: drawn a tenth larger, in the same room */
.scene.stair__demo--leads { zoom: 1.1; width: calc(min(100%, 420px) / 1.1); }
.scene.stair__demo--leadbars { width: 100%; }
.stair__cta { justify-content: center; margin-top: clamp(2rem, 1rem + 2vw, 3rem); }
@media (max-width: 999px) {
  .stair__body { --spine: 0px; padding-left: 52px; }
  .stair__list { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; gap: 1.5rem; }
  .stair__list > .stair__step:nth-child(n) { grid-column: 1; grid-row: auto; }
  .stair__list > .stair__step:nth-child(n) .stair__num { left: -52px; right: auto; top: 1.1rem; width: 40px; height: 40px; font-size: .875rem; }
  .stair__list > .stair__step:nth-child(n) .stair__title, .stair__list > .stair__step:nth-child(n) .stair__time { padding-inline: 0; }
  .stair__group { margin-left: -52px; }
  .stair__stop { top: -8px; }
}
@media (max-width: 599px) {
  .stair__body { padding-left: 40px; }
  .stair__list > .stair__step:nth-child(n) .stair__num { left: -42px; width: 34px; height: 34px; font-size: .8125rem; }
  .stair__group { margin-left: -40px; font-size: .875rem; padding: .5rem .9rem; }
  .stair__card { padding: 1.1rem; }
  .stair__step:has(.stair__demo--leads) .stair__scene { margin-inline: -1.1rem; }
  .scene.stair__demo--leads { zoom: 1.06; width: calc(100% / 1.06); }
}

/* ================= inside: the free plan building itself over a cafe owner reading it ================= */
.inside__stage { position: relative; min-height: 560px; }
.inside__frame { position: relative; width: 64%; margin: 0; aspect-ratio: 3 / 2; overflow: hidden; border-radius: calc(var(--radius-l) * 1.4); background: var(--c-ink); box-shadow: var(--shadow-l); }
.inside__photo { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 30% 35%; }
.inside__demo { position: absolute; z-index: 2; top: clamp(2rem, 1rem + 3vw, 4rem); right: 0; width: clamp(600px, 52%, 680px); }
.scene.inside__scene { width: 100%; height: 560px; }
.inside__stop { top: -14px; right: -14px; z-index: 3; }
@media (max-width: 1099px) {
  .inside__stage { min-height: 0; }
  .inside__frame { width: 100%; aspect-ratio: 16 / 10; }
  .inside__demo { position: relative; top: auto; right: auto; width: min(100%, 720px); margin: -4.5rem auto 0; }
  .inside__stop { top: 10px; right: 10px; }
}
@media (max-width: 599px) {
  .inside__frame { aspect-ratio: 4 / 3; }
  .inside__demo { width: 100%; margin-top: -3rem; }
  .scene.inside__scene { height: 700px; }
}

/* ================= week: drag between an evening before and an evening with us ================= */
.week__cmp .before .cmp__photo { object-position: 40% 30%; }
.week__cmp .after .cmp__photo { object-position: 62% 22%; }
.week__cmp .before .cmp__cards { top: auto; bottom: 22px; transform: none; }
@media (max-width: 759px) {
  .week__cmp .before .cmp__photo { object-position: 32% 30%; }
  .week__cmp .after .cmp__photo { object-position: 64% 20%; }
}

/* ================= team: a person answering in the dashboard while the florist works ================= */
.team__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.team__frame { position: relative; margin: 0; aspect-ratio: 3 / 2; overflow: hidden; border-radius: calc(var(--radius-l) * 1.4); background: var(--c-navy-2); box-shadow: 0 30px 60px -26px rgba(var(--c-deep-rgb), .7); }
.team__photo { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 50% 30%; }
.team__frame::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(0deg, rgba(var(--c-shade), .5) 0%, rgba(var(--c-shade), 0) 50%); }
.team__frame > .stop { top: 14px; right: 14px; z-index: 3; }
.team__chat { position: absolute; z-index: 2; left: clamp(.9rem, 3%, 1.5rem); bottom: clamp(.9rem, 3%, 1.5rem); width: min(48%, 300px); display: flex; flex-direction: column; align-items: stretch; gap: .45rem; }
.tc { margin: 0; padding: .6rem .8rem; border: 1px solid var(--c-line-on-ink); border-radius: 14px; background: rgba(var(--c-shade), .7); color: var(--c-on-ink); font-size: .875rem; line-height: 1.35; box-shadow: var(--shadow-m); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 10px)); }
.tc--ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem; }
.tc__app { color: var(--c-soft-on-ink); font-size: .75rem; }
.tc__btn { padding: .4rem .7rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--c-brand); color: var(--c-brand); font: 700 .8125rem/1 var(--font-ui); transition: background-color .25s, color .25s; }
.tc__btn[data-kit-on] { background: var(--c-brand); color: var(--c-on-brand); }
.tc--me { align-self: flex-end; max-width: 86%; border-color: transparent; background: var(--c-paper); color: var(--c-ink); border-bottom-right-radius: 4px; }
.tc--typing { align-self: flex-start; display: flex; gap: 4px; padding: .7rem .8rem; }
.tc--typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--c-soft-on-ink); }
.tc--team { align-self: flex-start; max-width: 92%; border-bottom-left-radius: 4px; }
.tc__who { display: block; margin-bottom: .2rem; color: var(--c-brand); font: 700 .75rem/1.2 var(--font-display); letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 999px) {
  .team__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .team__frame { aspect-ratio: 4 / 3.4; }
  .team__photo { object-position: 58% 25%; }
  .team__chat { width: auto; right: .75rem; left: .75rem; }
}

/* ================= close ================= */
.hiw-close__media { object-position: 70% 40%; }
