/* How it works (plan.md, "How it works"): the header over the calendar clips, the six steps on the track of the
   logo's bars (site\assets\js\pages\how-it-works.js lights them), the roadmap's cards, the real person, the close. */

/* the header: two clips of a calendar filling up take turns under a navy shade; the chat and the notifications low */
.ihero--band { padding-block: calc(var(--header-h) + clamp(2.5rem, 1.5rem + 3vw, 4.5rem)) clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.ihero--band > .rot { z-index: -2; }
.hiw-hero__shade { background: radial-gradient(70% 60% at 50% 32%, rgba(var(--c-shade), 0.9) 0%, rgba(var(--c-shade), 0.8) 55%, rgba(var(--c-shade), 0.62) 100%); }
.hiw-hero__in { display: grid; justify-items: center; gap: clamp(2rem, 1.5rem + 2vw, 3rem); text-align: center; }
.hiw-hero__words { display: grid; justify-items: center; max-width: 48rem; }
.hiw-hero__words .lead { color: var(--c-mist); }
.hiw-hero__cta { justify-items: center; }
.hiw-hero__cta .cta-note { justify-content: center; }
.ihero__device { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); width: fit-content; max-width: 100%; margin-inline: auto; text-align: left; }
.hiw-hero__stop { position: absolute; z-index: 3; top: -3.4rem; right: 0; }
.hiw-hero__chat { flex: none; width: 340px; } /* over 300 px wide its chat is 330 high, room for every message */
.hiw-hero__work { flex: none; width: 480px; height: 372px; }
@media (max-width: 900px) {
  .ihero__device { flex-direction: column; align-items: center; }
  .hiw-hero__work { width: 100%; max-width: 480px; height: 250px; }
}

/* the six steps: a track down the middle, a bar of the logo's signal at each step, rising and lighting gold once the
   scroll reaches it (--p fills the track) */
.timeline { position: relative; list-style: none; margin: 0 auto; padding: 0; max-width: 72rem; display: grid; gap: clamp(2rem, 1rem + 3vw, 3.5rem); }
.timeline::before, .timeline::after { content: ""; position: absolute; left: 50%; top: 0; width: 4px; margin-left: -2px; border-radius: 2px; }
.timeline::before { bottom: 0; background: color-mix(in srgb, var(--c-ink) 10%, transparent); }
.timeline::after { height: calc(var(--p, 0) * 100%); background: var(--g-signal); }
.tl-item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr); align-items: center; }
.tl-bar { grid-column: 2; grid-row: 1; justify-self: center; z-index: 1; width: 22px; height: var(--h); border-radius: 6px; background: var(--c-paper); box-shadow: 0 0 0 5px var(--c-ground), inset 0 0 0 2px color-mix(in srgb, var(--c-ink) 18%, transparent); transform: scaleY(0.5); transform-origin: 50% 100%; transition: transform 0.6s var(--ease-out), background-color 0.4s var(--ease-out); }
.tl-bar.is-lit { background: var(--g-gold); box-shadow: 0 0 0 5px var(--c-ground); transform: none; }
.tl-item--left .tl-card { grid-column: 1; }
.tl-item--right .tl-card { grid-column: 3; }
.tl-card { position: relative; grid-row: 1; display: grid; gap: 0.6rem; padding: 1.5rem 1.5rem 1.35rem; border-radius: var(--radius-l); background: var(--c-paper); box-shadow: var(--shadow-lift); }
.tl-tag { justify-self: start; padding: 0.35rem 0.75rem; border-radius: 999px; font-family: var(--font-ui); font-weight: 600; font-size: 0.875rem; line-height: 1.2; }
.tl-tag--yours { background: var(--c-ink); color: var(--c-on-ink); }
.tl-tag--ours { background: var(--c-azure); color: var(--c-ink); }
.tl-card h3 { display: flex; align-items: baseline; gap: 0.6rem; font-size: var(--fs-h3); line-height: 1.2; }
.tl-num { font-family: var(--font-display); font-stretch: var(--stretch-display); color: var(--c-ink-soft); }
.tl-card p { color: var(--c-ink-soft); }
.tl-scene { width: 100%; max-width: 420px; min-height: 280px; justify-self: center; margin-top: 0.4rem; }
.tl-card .tl-scene[data-scene="goal"] { min-height: 392px; } /* the whole chat's height from its start: its growing moves no step under it */
.tl-stop { position: absolute; top: 1rem; right: 1rem; z-index: 3; }
@media (prefers-reduced-motion: reduce) { .tl-bar { transition: none; } }
@media (max-width: 860px) {
  .timeline::before, .timeline::after { left: 13px; }
  .tl-item { grid-template-columns: 26px minmax(0, 1fr); column-gap: 0.9rem; align-items: start; }
  .tl-bar { grid-column: 1; margin-top: 1.6rem; }
  .tl-item--left .tl-card, .tl-item--right .tl-card { grid-column: 2; }
  .tl-card { padding: 1.25rem 1rem 1.1rem; }
  .tl-scene { width: calc(100% + 1.2rem); max-width: none; margin-inline: -0.6rem; } /* the tilted board needs its room */
  .tl-card .tl-scene[data-scene="goal"] { min-height: 420px; }
  .tl-stop { top: auto; bottom: -1.4rem; right: 1rem; } /* right under the first scene, in the gap below its card */
  .ihero__device { width: 100%; }
  .hiw-hero__chat { width: 320px; } /* 320 wide keeps its 330-high chat */
}

/* inside the roadmap: the words and Greenway's owner above, the three cards across the band under them */
.inside__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: center; }
.inside__head { margin-bottom: 0; }
.inside__pic { aspect-ratio: 16 / 10; }
.inside__pic .frame__media { object-position: 64% 35%; }
.inside__cards { position: relative; margin-top: clamp(2rem, 1rem + 3vw, 3.5rem); }
.inside__stop { position: absolute; z-index: 8; top: 0.85rem; right: 0.85rem; }
@media (max-width: 900px) { .inside__top { grid-template-columns: 1fr; } }

/* the real person: the bakery owner at the left, her question answered over the right of her picture */
.team__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; }
.team__pic { aspect-ratio: 4 / 3; }
.team__photo { object-position: 100% 40%; } /* the chalkboard at the photo's left edge never shows */
.team__reply { right: 1rem; bottom: 1rem; width: min(360px, 52%); }
@media (max-width: 900px) {
  .team__grid { grid-template-columns: 1fr; } /* the page's columns would beat the chapter's phone rule */
  .team__pic { aspect-ratio: 4 / 5; }
  .team__photo { object-position: 55% 40%; }
  .team__reply { left: 0.75rem; right: 0.75rem; width: auto; }
}

/* the close: the salon owner at the middle, the words at the left */
.hiw-close__photo { object-position: 50% 35%; }
@media (max-width: 760px) { .pclose .hiw-close__photo { object-position: 50% 25%; } }
