@import url("../arsenal/thread.css");

/* how-it-works.css: How it works (plan.md, "How it works"), on the arsenal composition `thread` (its README: the parts
   are the thread's direct children; what the line passes behind is opaque and carries data-thread-light; its anchors
   keep their lanes clear of words). Every scene stays at least half on its photo or clip at every width. */

/* ---------- the thread, re-skinned: a soft cyan wave, the logo's swash in its ink bead ---------- */
.hiw.thread {
  --thread-ink: var(--c-brand);
  --thread-track-ink: color-mix(in srgb, var(--c-brand) 38%, transparent);
  --thread-bg: var(--c-ink);
  --thread-amp: 5px;
  --thread-wave: 46px;
}
/* The parts stay unpositioned: a positioned part would paint its ground over the line (system's .sec is relative). */
.hiw > section { position: static; }
/* Wide (from 1100 px): the line runs the whole page. Narrower: a short line beside each part's numbers. */
@media (max-width: 1099.98px) { .hiw.thread { --thread-narrow: 1; } }
/* the ground under a part's numerals, for their cut-out ring */
.hih, .yr, .ins, .hcx { --tbg: var(--c-ink); --tnum-ink: var(--c-on-ink); }
.our, .orow, .tm, .faq { --tbg: var(--c-paper); --tnum-ink: var(--c-ink); }

/* A step's numeral: the home page's outlined Bodoni in a round badge; it fills cyan as the head plugs in, one ring
   spreading out from it. */
.tnum { position: absolute; z-index: 2; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%;
  --l: calc(var(--lit, 0) * var(--lit, 0) * (3 - 2 * var(--lit, 0)));
  background: var(--tbg);
  box-shadow: 0 0 0 6px var(--tbg), inset 0 0 0 1.5px color-mix(in srgb, var(--c-brand) calc(28% + var(--l) * 72%), transparent), 0 10px 24px -10px color-mix(in srgb, var(--c-brand) calc(var(--l) * 70%), transparent); }
.tnum b { font: 700 1.95rem/1 var(--font-display); letter-spacing: -0.02em;
  color: color-mix(in srgb, var(--c-brand) calc(var(--l) * 100%), transparent);
  -webkit-text-stroke: 1.2px color-mix(in srgb, var(--c-brand) calc(var(--l) * 100%), color-mix(in srgb, var(--tnum-ink) 55%, transparent)); }
.tnum::after, .hand__node::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  --a: var(--lit-after, 0);
  box-shadow: 0 0 0 calc((1 - (1 - var(--a)) * (1 - var(--a))) * 18px) color-mix(in srgb, var(--c-brand) calc((1 - var(--a)) * 26%), transparent); }

/* What the line lights: each photo or clip comes to full color and settles as the head passes behind it. */
.hih__frame, .orow__frame, .ins__frame, .tm__frame, .hcx__media { --e: calc(var(--lit, 0) * var(--lit, 0) * (3 - 2 * var(--lit, 0))); }
.hih__footage, .orow__photo, .ins__photo, .tm__photo, .hcx__photo { filter: saturate(calc(0.8 + 0.2 * var(--e))); transform: scale(calc(1.03 - 0.03 * var(--e))); }
.yr__stage { box-shadow: var(--shadow-l), inset 0 0 0 1px color-mix(in srgb, var(--c-brand) calc(14% + var(--e, 0) * 30%), var(--c-line-ink)); }
.yr__stage { --e: calc(var(--lit, 0) * var(--lit, 0) * (3 - 2 * var(--lit, 0))); }

/* ---------- hero: the words centered on solid ink, the main button where the line starts; under them a wide crisp
   frame with the owner's hands writing a new booking, the day's news stacking over its left part ---------- */
.hih { padding-top: clamp(2.5rem, 4.5vw, 3.25rem); }
.hih__head { display: grid; justify-items: center; text-align: center; }
.hih__title { max-width: 17ch; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.5rem, 1.25rem + 2.6vw, 4rem); line-height: 1.04; letter-spacing: -0.012em; text-wrap: balance; }
.hih__line { margin-top: var(--space-4); max-width: 44rem; font-size: 1.1875rem; line-height: 1.6; color: var(--c-ink-soft-on-ink); }
.hih__cta { justify-content: center; }
.hih .cta-row__note { color: var(--c-ink-soft-on-ink); white-space: nowrap; }
.hih__frame { position: relative; margin-top: clamp(2.25rem, 3.5vw, 2.75rem); aspect-ratio: 2.7 / 1; border-radius: var(--radius-l); overflow: hidden; background: var(--c-ink-2); box-shadow: var(--shadow-l); }
.hih__footage { position: absolute; top: -1px; left: -1px; width: calc(100% + 2px); max-width: none; height: calc(100% + 2px); object-fit: cover; object-position: 50% 42%; }
/* the news stacks in the frame's upper left, so it shows on the first screen */
.hih .hih__scene { position: absolute; left: 24px; top: 22px; height: 290px; width: clamp(300px, 48%, 500px); } /* over 480 px wide all four notifications show */
.hih__stop { position: absolute; z-index: 5; right: var(--space-3); bottom: var(--space-3); }
@media (max-width: 1099.98px) { .hih__frame { aspect-ratio: 16 / 9; } }
@media (max-width: 699px) {
  .hih .cta-row__note { white-space: normal; }
  .hih__frame { aspect-ratio: auto; height: 520px; }
  .hih__footage { object-position: 72% 50%; }
  .hih .hih__scene { left: 0; right: 0; top: 18px; bottom: 48px; width: auto; height: auto; }
}

/* ---------- yours: the designed ground; steps 01 to 03 as a short stair, each a scene on a deep violet stage with its
   numeral on the stage's corner, its words under it beside the line's lane ---------- */
.yr { padding: 0; }
.yr__in { position: relative; padding: var(--section-y) 0; }
.yr__head { margin-inline: auto; text-align: center; }
.yr__head .sec-head__line { margin-inline: auto; }
.yr__steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 64px; align-items: start; padding-top: 40px; }
.yr__step { position: relative; }
.yr__step:nth-child(2) { margin-top: 120px; }
.yr__step:nth-child(3) { margin-top: 240px; }
.yr__stage { position: relative; display: grid; align-items: end; height: 430px; padding: 50px 16px 16px; border-radius: var(--radius-l); background: var(--c-violet-deep); } /* each panel stands at its stage's foot, at its own height */
.yr .yr__scene { width: 100%; }
.yr__step > .tnum { left: 8px; top: -34px; }
.yr__text { padding: var(--space-4) 0 0 64px; }
.yr__text h3 { font: 700 1.3rem/1.25 var(--font-ui); color: var(--c-on-ink); }
.yr__text p { margin-top: 6px; font-size: 1rem; line-height: 1.55; color: var(--c-ink-soft-on-ink); }
/* the stop just above stage 03's top right corner (the stair's lowest step starts 240 px down) */
.yr__stop { position: absolute; z-index: 5; right: 0; top: 226px; }
@media (max-width: 1099.98px) {
  .yr__steps { grid-template-columns: minmax(0, 1fr); row-gap: 80px; max-width: 620px; margin-inline: auto; }
  .yr__step:nth-child(2), .yr__step:nth-child(3) { margin-top: 0; }
  .yr__stage { height: auto; min-height: 360px; }
  .yr__stop { top: -6px; }
}
@media (max-width: 699px) {
  .yr__stage { height: auto; min-height: 330px; }
  .yr__text { padding-left: 60px; }
  .yr__stop { top: -6px; }
}

/* ---------- ours: the hand-over from your part to ours, on the line's lane; then the heading ---------- */
.our { padding-bottom: clamp(1rem, 2vw, 1.5rem); }
.hand { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 64px; align-items: center; margin-bottom: clamp(3rem, 6vw, 4.5rem); font: 600 1.0625rem/1.35 var(--font-ui); }
.hand__you { grid-column: 1 / 3; grid-row: 1; text-align: right; color: var(--c-ink-soft); }
.hand__node { grid-column: 3; grid-row: 1; justify-self: start; position: relative; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; margin-left: 22px; border-radius: 50%;
  --l: calc(var(--lit, 0) * var(--lit, 0) * (3 - 2 * var(--lit, 0)));
  background: color-mix(in srgb, var(--c-brand) calc(var(--l) * 100%), var(--c-paper));
  box-shadow: 0 0 0 6px var(--c-paper), inset 0 0 0 1.5px color-mix(in srgb, var(--c-brand) calc(30% + var(--l) * 70%), transparent); }
.hand__node svg { width: 18px; height: 18px; fill: color-mix(in srgb, var(--c-ink) calc(var(--l) * 100%), var(--c-ink-soft)); }
.hand__us { grid-column: 3; grid-row: 1; padding-left: 80px; color: var(--c-brand-text); }
.our__head { max-width: 34rem; margin-bottom: 0; }
/* narrower: the heading first, then the hand-over, whose node starts the short line beside the rows */
@media (max-width: 1099.98px) {
  .our .wrap { display: flex; flex-direction: column; max-width: calc(620px + 2 * var(--gutter)); }
  .our__head { order: 1; }
  .hand { order: 2; grid-template-columns: 40px minmax(0, 1fr); column-gap: 20px; row-gap: 4px; justify-items: start; margin: var(--space-5) 0 0; }
  .hand__node { grid-column: 1; grid-row: 1 / 3; align-self: center; margin-left: 22px; }
  .hand__you, .hand__us { grid-column: 2; text-align: left; padding-left: 22px; }
  .hand__you { grid-row: 1; } .hand__us { grid-row: 2; }
}

/* ---------- ours, steps 04 to 06: a row each, sides alternating; the numeral on the photo's inner corner, the scene
   over the side of the photo clear of faces ---------- */
.orow { padding-block: clamp(3.5rem, 6vw, 5.5rem); }
.orow__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 72px; align-items: center; }
.orow--flip .orow__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.orow--flip .orow__side { order: -1; }
.orow__title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h3); line-height: 1.1; }
.orow__line { margin-top: var(--space-3); max-width: 28rem; font-size: 1.125rem; line-height: 1.6; color: var(--c-ink-soft); }
.orow__side { position: relative; }
.orow__frame { position: relative; height: 480px; border-radius: var(--radius-l); overflow: hidden; background: var(--c-ink-2); box-shadow: var(--shadow-l); }
.orow__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.orow__side > .tnum { left: 22px; top: -34px; }
.orow--flip .orow__side > .tnum { left: auto; right: 22px; }
.orow .orow__scene { position: absolute; top: 64px; width: min(310px, 46%); height: 300px; }
.orow__frame--setup .orow__photo { object-position: 0% 50%; }
.orow__frame--setup .orow__scene { left: 18px; width: min(300px, 54%); height: 316px; } /* its four rows one line each, under the "You're live" note at every width */
.orow__frame--leads .orow__photo { object-position: 100% 30%; }
.orow__frame--leads .orow__scene { right: 18px; width: min(400px, 58%); }
.orow__frame--tune .orow__photo { object-position: 0% 40%; }
.orow__frame--tune .orow__scene { left: 18px; width: min(340px, 50%); height: auto; }
.orow__stop { position: absolute; z-index: 5; bottom: var(--space-3); left: var(--space-3); }
.orow__frame--leads .orow__stop { left: auto; right: var(--space-3); }
@media (max-width: 1099.98px) {
  .orow__grid, .orow--flip .orow__grid { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-5); max-width: 620px; margin-inline: auto; }
  .orow__side, .orow--flip .orow__side { order: -1; margin-top: 34px; }
  .orow__side > .tnum, .orow--flip .orow__side > .tnum { left: 8px; right: auto; }
  .orow__text { padding-left: 64px; }
  .orow__frame--leads .orow__scene { width: 312px; }
  .orow__frame--leads .orow__photo { object-position: 0% 30%; }
}
/* phone: the photo a band at the top of the frame (the faces in its upper part), the scene over its lower edge */
@media (max-width: 699px) {
  .orow__frame { height: auto; padding: 220px 14px 14px; }
  .orow__photo { bottom: auto; height: 380px; }
  .orow .orow__scene, .orow__frame--setup .orow__scene, .orow__frame--leads .orow__scene, .orow__frame--tune .orow__scene { position: relative; top: auto; left: auto; right: auto; width: auto; height: 300px; }
  .orow__frame--tune .orow__scene { height: auto; min-height: 300px; }
  .orow__frame--setup .orow__scene { height: 316px; }
  /* the hedge trimmer's photo a little taller, so the taller scene keeps half of itself on it */
  .orow__frame--tune { padding-top: 240px; }
  .orow__frame--tune .orow__photo { height: 440px; }
  .orow__frame--setup .orow__photo { object-position: 67% 50%; }
  .orow__frame--leads .orow__photo { object-position: 0% 30%; }
  .orow__frame--tune .orow__photo { object-position: 92% 40%; }
  .orow__stop, .orow__frame--leads .orow__stop { top: 160px; bottom: auto; left: auto; right: var(--space-3); }
  .orow__text { padding-left: 60px; }
}

/* ---------- inside: on ink, the med spa owner at her desk, the free plan building over the oak wall on the right ---------- */
.ins__head { max-width: 40rem; }
.ins__frame { position: relative; height: clamp(560px, 46vw, 640px); border-radius: var(--radius-l); overflow: hidden; background: var(--c-ink-2); box-shadow: var(--shadow-l); }
.ins__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 0% 35%; }
.ins .ins__scene { position: absolute; right: 24px; top: 50%; translate: 0 -50%; width: 640px; height: min(560px, calc(100% - 48px)); }
.ins__stop { position: absolute; z-index: 5; left: var(--space-3); bottom: var(--space-3); }
@media (max-width: 1239.98px) {
  .ins__frame { height: 740px; }
  .ins .ins__scene { width: 400px; height: 690px; }
}
@media (max-width: 699px) {
  .ins__frame { height: auto; padding: 0 0 14px; }
  .ins__photo { bottom: auto; height: 700px; object-position: 31% 35%; }
  .ins .ins__scene { position: relative; top: auto; right: auto; translate: none; width: auto; height: 700px; margin: 340px 14px 0; }
  /* the stop inside the plan card's top right corner, so the card and its stop fit in one phone screen; the card's
     title ("Building your plan") ends before it */
  .ins__stop { top: 352px; bottom: auto; left: auto; right: 26px; }
  .ins [data-scene="plan-builder"] .pb-head { padding-right: 40px; }
}

/* ---------- team: on paper, the owner at her tailgate reading the team's reply, the messages over the truck bed; the
   words beside it ---------- */
.tm__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 72px; align-items: center; }
.tm__frame { position: relative; height: clamp(480px, 40vw, 560px); border-radius: var(--radius-l); overflow: hidden; background: var(--c-ink-2); box-shadow: var(--shadow-l); }
.tm__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%; }
/* the kit's chat: the messages come one by one (--kit-in), and the whole set fades as one before it starts again
   (--kit-out), the dashboard card there at once; every card keeps its place while it waits, so none moves */
.tm__cards { position: absolute; left: var(--space-3); top: var(--space-4); display: grid; gap: 10px; justify-items: start; width: min(300px, 44%); opacity: calc(1 - var(--kit-out, 0)); }
.tm__card { display: grid; gap: 3px; padding: 12px 14px 13px; border-radius: var(--radius-m); border: 1px solid var(--c-line-ink); background: var(--c-ink-2); color: var(--c-on-ink); box-shadow: var(--shadow-m); opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 12px)); }
.tm__card--btn { opacity: 1; transform: none; }
/* the chat hides a message until its time (core.css: [hidden] takes no room): here each keeps its room, unseen, so the
   cards stacked on the phone's photo never move as the next one comes */
.tm__cards > .tm__card[hidden] { display: grid !important; }
.tm__cards > .tm__card--team[hidden] { display: flex !important; }
.tm__cards > .tm__read[hidden] { display: block !important; }
.tm__card small { font-size: 0.8125rem; line-height: 1.3; color: var(--c-ink-soft-on-ink); }
.tm__card b { font: 600 0.9375rem/1.4 var(--font-ui); }
.tm__human { display: inline-flex; align-items: center; justify-self: start; min-height: 38px; margin-top: 4px; padding: 0 16px; border-radius: 999px; background: var(--c-brand); color: var(--c-on-brand); font: 700 0.9375rem/1 var(--font-ui); box-shadow: inset 0 2px 0 color-mix(in srgb, var(--c-ink) 25%, transparent); }
.tm__card--you { justify-self: end; background: color-mix(in srgb, var(--c-brand) 22%, var(--c-ink-2)); }
.tm__read { display: block; justify-self: end; margin-top: -4px; font-size: 0.8125rem; color: var(--c-on-ink); padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c-ink) 70%, transparent); opacity: var(--kit-in, 1); }
.tm__card--team { display: flex; align-items: flex-start; gap: 10px; }
.tm__card--team > span:last-child { display: grid; gap: 3px; }
.tm__av { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c-brand); color: var(--c-on-brand); font: 700 0.875rem/1 var(--font-display); }
.tm__stop { position: absolute; z-index: 5; right: var(--space-3); bottom: var(--space-3); }
@media (max-width: 1099.98px) {
  .tm__grid { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-5); max-width: 620px; margin-inline: auto; }
  .tm__copy { order: -1; }
}
@media (max-width: 699px) {
  .tm__frame { height: 620px; }
  .tm__photo { object-position: 80% 30%; }
  .tm__cards { top: auto; bottom: var(--space-3); left: var(--space-3); right: var(--space-3); width: auto; }
  .tm__stop { top: var(--space-3); bottom: auto; }
}

/* ---------- faq: the list is opaque, so the line passes behind it ---------- */
.hiw .faq__list { background: var(--c-paper); }

/* ---------- close: the salon in the left 7 of 12 columns, bleeding off the left edge and fading into the ink; the words
   and the picker on solid ink at the right; the line comes out of the fade into the main button ---------- */
.hcx { overflow: hidden; }
.hcx__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 72px; align-items: center; min-height: clamp(620px, 50vw, 760px); }
.hcx__media { position: relative; align-self: stretch; margin: calc(-1 * var(--section-y)) 0 calc(-1 * var(--section-y)) calc(-1 * (max(0px, (100vw - var(--max-w)) / 2) + var(--gutter))); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 0, #000 86%, transparent 100%); mask-image: linear-gradient(90deg, #000 0, #000 86%, transparent 100%); }
.hcx__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 92% 30%; }
.hcx__sweep { width: 200px; }
.hcx__title { margin-top: var(--space-4); max-width: 13ch; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h1); line-height: 1.04; }
.hcx__line { margin: var(--space-3) 0 var(--space-4); font-size: 1.125rem; color: var(--c-ink-soft-on-ink); }
.hcx__copy .picker { max-width: 34rem; }
@media (max-width: 1099.98px) {
  .hcx__grid { grid-template-columns: minmax(0, 1fr); min-height: 0; row-gap: var(--space-5); }
  .hcx__media { align-self: auto; height: clamp(360px, 60vw, 520px); margin: calc(-1 * var(--section-y)) calc(-1 * var(--gutter)) 0; -webkit-mask-image: linear-gradient(180deg, #000 0, #000 80%, transparent 100%); mask-image: linear-gradient(180deg, #000 0, #000 80%, transparent 100%); }
  .hcx__photo { object-position: 70% 30%; }
}
