/* How it works (plan.md, "How it works"): the thread, the page's signature, and its parts. The thread is an arsenal
   composition whose code is never edited: this page says what lit means, and works around one stacking fault. */
@import url("../arsenal/thread.css");

/* ---------- The thread on this site ---------- */
.hiw-thread { --thread-link: 11px; --thread-gap: 19px; }
/* This site's bands are positioned (.band { position: relative }), so they paint over a line left at z-index 0 (the
   thread's own CSS): here the line rises over the parts' grounds and the key elements over the line. A ground part keeps
   no stacking context of its own inside the thread, so its numbers and cards still rise over the line. */
.hiw-thread .thread__svg { z-index: 2; }
.hiw-thread :is([data-thread-anchor], [data-thread-light]) { z-index: 3; }
.hiw-thread > .ground { isolation: auto; }

/* ---------- The rail: the line's one lane, at the left of every part from "yours" to the FAQ ---------- */
.hiw-rail { --rail-x: 22px; --rail-in: 104px; padding-left: var(--rail-in); }
.hiw-num, .hiw-node {
  --p: calc(var(--lit, 0) * var(--lit, 0) * (3 - 2 * var(--lit, 0)));
  grid-column: 1; grid-row: 1; justify-self: start; align-self: start;
  display: grid; place-items: center; width: var(--size); height: var(--size); margin-left: calc(var(--rail-x) - var(--size) / 2);
  border-radius: 50%; background: var(--c-paper);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c-brand) calc(var(--p) * 100%), var(--c-line));
}
.hiw-num { --size: 44px; font: 800 1.0625rem/1 var(--font-display); color: color-mix(in srgb, var(--c-on-brand) calc(var(--p) * 100%), var(--c-ink)); }
.hiw-num::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: var(--c-brand); transform: scale(var(--p)); }
.hiw-node { --size: 38px; color: color-mix(in srgb, var(--c-brand) calc(var(--p) * 100%), var(--c-ink-soft)); }
.hiw-node__mark { width: 22px; height: 22px; fill: currentColor; transform: rotate(calc(var(--p) * 30deg)); }
/* as the head plugs in, one ring spreads out and fades */
.hiw-num::after, .hiw-node::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--c-brand); pointer-events: none;
  opacity: calc(min(1, var(--lit, 0) * 3) * (1 - var(--lit-after, 0)));
  transform: scale(calc(1 + var(--lit-after, 0) * .9));
}
.hiw-headed { display: grid; grid-template-columns: var(--rail-in) minmax(0, 1fr); margin-left: calc(-1 * var(--rail-in)); }
.hiw-headed > .head { grid-column: 2; grid-row: 1; }
.hiw-headed > .hiw-node { margin-top: 6px; }

/* ---------- hero: the phone on the table, what lands on it while the owner works ---------- */
.hiw-hero { display: grid; align-items: end; min-height: clamp(640px, calc(100svh - var(--header-h)), 860px); padding-block: 0; }
.hiw-hero__photo { position: absolute; inset: 0; z-index: -1; margin: 0; overflow: hidden; background: var(--c-ink); }
.hiw-hero__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; filter: var(--grade) brightness(.84); }
.hiw-hero__photo::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(11, 12, 11, 0) 42%, rgba(11, 12, 11, .5) 62%, rgba(11, 12, 11, .74) 100%); }
.hiw-hero__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); padding-block: 140px 104px; }
.hiw-hero__words { grid-column: 2; }
.hiw-hero__title { margin: 0; font: var(--fw-display) var(--fs-h1)/var(--lh-tight) var(--font-display); letter-spacing: var(--ls-display); text-wrap: balance; }
.hiw-hero__title em { font-style: normal; color: var(--c-brand-on-ink); }
.hiw-hero__line { margin: 18px 0 0; max-width: 520px; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.5; color: var(--c-on-ink-soft); text-wrap: balance; }
.hiw-hero__stop { top: 40px; left: calc(42% + 8px); }

/* the lock screen, in the interface's own px (260 x 556), laid on the photo's screen */
.lock { position: absolute; inset: 0; overflow: hidden; border-radius: 28px; background: radial-gradient(120% 70% at 50% 16%, var(--c-ink-3) 0%, var(--c-ink) 72%); color: var(--c-on-ink); font-family: var(--font-ui); }
.lock__dial { position: absolute; left: 50%; top: 47%; width: 330px; height: 330px; transform: translate(-50%, -50%); fill: var(--c-on-ink); opacity: .05; }
.lock__day { position: absolute; top: 44px; left: 0; right: 0; margin: 0; text-align: center; font: 600 14px/1 var(--font-ui); color: var(--c-on-ink-soft); }
.lock__time { position: absolute; top: 64px; left: 0; right: 0; margin: 0; text-align: center; font: var(--fw-display) 62px/1 var(--font-display); letter-spacing: -.02em; }
.lock__list { position: absolute; top: 156px; left: 10px; right: 10px; display: grid; gap: 8px; }
.note { padding: 10px 12px 11px; border-radius: 16px; background: color-mix(in srgb, var(--c-paper) 92%, transparent); color: var(--c-ink); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .7); }
.note__app { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font: 600 13px/1.1 var(--font-ui); color: var(--c-ink-soft); }
.note__icon { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: var(--c-brand); }
.note__mark { width: 12px; height: 12px; fill: var(--c-on-brand); }
.note__when { margin-left: auto; font-weight: 500; }
.note__title { margin: 0; font: 700 14px/1.25 var(--font-ui); }
.note__text { margin: 2px 0 0; font: 400 13px/1.3 var(--font-ui); color: var(--c-ink-soft); }
.lock [data-kit-at] { opacity: var(--kit-in, 1); } /* the clock stays through the turn; the notifications go as one */
.lock__bar { position: absolute; bottom: 9px; left: 50%; width: 96px; height: 4px; margin-left: -48px; border-radius: 4px; background: var(--c-on-ink); opacity: .8; }

/* ---------- yours: the owner's part, steps 1 to 3, on the designed ground ---------- */
.hiw-yours__head { margin-bottom: clamp(40px, 5vw, 64px); }
.hiw-steps, .hiw-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.hiw-steps { gap: clamp(40px, 5vw, 64px); }
.hiw-step { display: grid; grid-template-columns: var(--rail-in) minmax(0, 1fr) minmax(0, 440px); margin-left: calc(-1 * var(--rail-in)); }
.hiw-step__words { grid-column: 2; grid-row: 1; max-width: 440px; padding: 8px 48px 0 0; }
.hiw-step__title { margin: 0; font: var(--fw-display) var(--fs-h3)/1.15 var(--font-display); letter-spacing: var(--ls-display); text-wrap: balance; }
.hiw-step__line { margin: 10px 0 0; color: var(--c-ink-soft); line-height: 1.5; text-wrap: pretty; }
/* each scene level with its step's words; its box as tall as the scene at its fullest, so a growing chat moves nothing */
.hiw-step__stage { grid-column: 3; grid-row: 1; position: relative; display: flex; flex-direction: column; justify-content: flex-start; min-height: 340px; }
.hiw-step__scene { width: 100%; }
.hiw-yours__stop { top: -52px; right: 0; }
.hiw-yours__sum { margin: clamp(36px, 4vw, 52px) 0 0; font: 650 1.125rem/1.4 var(--font-ui); color: var(--c-brand-text); }

/* ---------- ours: our part, every day, steps 4 to 6 ---------- */
.hiw-ours .hiw-headed { margin-bottom: clamp(40px, 5vw, 64px); }
.hiw-rows { gap: clamp(56px, 7vw, 96px); }
.hiw-row { display: grid; grid-template-columns: var(--rail-in) minmax(0, 1.35fr) minmax(0, 1fr); align-items: center; margin-left: calc(-1 * var(--rail-in)); }
.hiw-row--flip { grid-template-columns: var(--rail-in) minmax(0, 1fr) minmax(0, 1.35fr); }
.hiw-row__frame { grid-column: 2; grid-row: 1; position: relative; margin: 0; height: clamp(440px, 36vw, 500px); overflow: hidden; border-radius: var(--radius-l); background: var(--c-ink); }
.hiw-row--flip .hiw-row__frame { grid-column: 3; }
.hiw-row__photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.hiw-row__frame--land .hiw-row__photo { object-position: 85% 50%; }
.hiw-row__frame--law .hiw-row__photo { object-position: 72% 30%; }
.hiw-row__frame--salon .hiw-row__photo { object-position: 60% 40%; }
.hiw-row__stage { position: absolute; left: 24px; bottom: 24px; width: min(380px, calc(100% - 48px)); }
.hiw-row__frame--salon .hiw-row__stage { width: min(280px, calc(100% - 48px)); }
/* the clients' board is tilted in depth, which draws its words smaller: drawn a tenth larger, they stay at 13 px */
.hiw-row__frame--law .hiw-row__stage { transform: scale(1.1); transform-origin: left bottom; }
.hiw-row__scene { width: 100%; }
.hiw-row__words { grid-column: 3; grid-row: 1; max-width: 420px; padding-left: clamp(32px, 4vw, 64px); }
.hiw-row--flip .hiw-row__words { grid-column: 2; justify-self: end; padding: 0 clamp(32px, 4vw, 64px) 0 0; }
.hiw-ours__stop { top: 16px; right: 16px; }
/* the line passes: each photo comes up from a dim, slightly zoomed state and settles */
.hiw-row__frame .hiw-row__photo { --p: calc(var(--lit, 0) * var(--lit, 0) * (3 - 2 * var(--lit, 0))); filter: var(--grade) brightness(calc(.74 + .26 * var(--p))); transform: scale(calc(1.04 - .04 * var(--p))); }

/* ---------- plan: what the free plan holds, as the thing itself ---------- */
.hiw-plan__in { grid-template-columns: var(--rail-in) minmax(300px, 1fr) minmax(600px, 720px); align-items: start; }
.hiw-plan__head { padding-right: 48px; }
.hiw-plan__stage { grid-column: 3; grid-row: 1; position: relative; }
.hiw-plan__scene { width: 100%; height: 560px; }
.hiw-plan__stop { top: -52px; right: 0; }

/* ---------- team: people one tap away ---------- */
.hiw-team__in { grid-template-columns: var(--rail-in) minmax(0, 1fr) minmax(0, 1.5fr); align-items: center; }
.hiw-team__head { padding-right: 48px; }
.hiw-team__frame { grid-column: 3; grid-row: 1; position: relative; margin: 0; height: clamp(440px, 38vw, 520px); overflow: hidden; border-radius: var(--radius-l); background: var(--c-ink); }
.hiw-team__photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hiw-team__stop { top: 16px; right: 16px; }
.hiw-chat { position: absolute; left: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 8px; width: min(340px, calc(100% - 48px)); padding: 14px; border-radius: var(--radius-l); background: color-mix(in srgb, var(--c-ink-2) 64%, transparent); border: 1px solid var(--c-line-ink); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); color: var(--c-on-ink); font: 400 .9375rem/1.4 var(--font-ui); }
.hiw-chat__top { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; }
.hiw-chat__top b { font-weight: 650; }
.hiw-chat__top span { margin-left: auto; font-size: .8125rem; color: var(--c-on-ink-soft); }
.hiw-chat__mark { flex: none; width: 24px; height: 24px; padding: 4px; border-radius: 7px; background: var(--c-brand); fill: var(--c-on-brand); }
.hiw-chat__msg { margin: 0; flex: none; max-width: 88%; padding: 9px 13px; border-radius: 16px; opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 10px)); }
.hiw-chat__msg--her { align-self: flex-end; background: var(--c-paper); color: var(--c-ink); border-bottom-right-radius: 5px; }
.hiw-chat__msg--us { align-self: flex-start; background: var(--c-brand); color: var(--c-on-brand); border-bottom-left-radius: 5px; }
.hiw-chat__msg--us small { display: block; margin-top: 4px; font-size: .8125rem; opacity: .85; }
.hiw-chat__msg--her small { display: block; margin-top: 4px; font-size: .8125rem; color: var(--c-ink-soft); } /* whose question: the shop's owner */
.hiw-chat__msg--typing { align-self: flex-start; display: flex; gap: 5px; padding: 13px 15px; background: color-mix(in srgb, var(--c-paper) 16%, transparent); }
.hiw-chat__msg--typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-on-ink); animation: hiw-dot 1s infinite ease-in-out; }
.hiw-chat__msg--typing i:nth-child(2) { animation-delay: .15s; }
.hiw-chat__msg--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes hiw-dot { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.hiw-team__frame .hiw-team__photo { --p: calc(var(--lit, 0) * var(--lit, 0) * (3 - 2 * var(--lit, 0))); filter: var(--grade) brightness(calc(.74 + .26 * var(--p))); transform: scale(calc(1.04 - .04 * var(--p))); }

/* ---------- close: the line ends in the main button, which lights ---------- */
.hiw-close__go { justify-content: center; }
.hiw-close__go .btn--go { box-shadow: 0 0 0 calc(var(--lit, 0) * 7px) color-mix(in srgb, var(--c-brand-on-ink) 34%, transparent); }
.hiw-close .band__video { object-position: 50% 40%; }

/* ---------- narrower screens ---------- */
@media (max-width: 1099.98px) {
  .hiw-step, .hiw-row, .hiw-row--flip, .hiw-plan__in, .hiw-team__in { grid-template-columns: var(--rail-in) minmax(0, 1fr); align-items: start; }
  .hiw-step__words, .hiw-row__words, .hiw-row--flip .hiw-row__words { grid-column: 2; grid-row: 1; justify-self: start; max-width: 560px; padding: 8px 0 0; }
  .hiw-step__stage { grid-column: 2; grid-row: 2; width: min(100%, 440px); min-height: 330px; margin-top: 24px; }
  .hiw-row__frame, .hiw-row--flip .hiw-row__frame { grid-column: 2; grid-row: 2; margin-top: 24px; }
  .hiw-plan__head, .hiw-team__head { padding-right: 0; }
  .hiw-plan__stage, .hiw-team__frame { grid-column: 2; grid-row: 2; margin-top: 8px; }
  .hiw-plan__scene { height: 600px; }
  .hiw-hero__in { grid-template-columns: minmax(0, 1fr) minmax(0, 480px); }
}
@media (max-width: 699.98px) {
  .hiw-rail { --rail-x: 17px; --rail-in: 52px; }
  .hiw-num { --size: 36px; font-size: .9375rem; }
  .hiw-node { --size: 32px; }
  .hiw-node__mark { width: 18px; height: 18px; }
  .hiw-hero { display: block; min-height: 0; }
  .hiw-hero__photo { position: relative; inset: auto; z-index: 0; height: 640px; }
  .hiw-hero__photo img { position: absolute; left: 0; top: -80px; height: 780px; object-position: 18.6% 50%; }
  .hiw-hero__photo::after { background: linear-gradient(0deg, var(--c-ink) 0%, rgba(11, 12, 11, 0) 18%); }
  .hiw-hero__in { display: block; padding-block: 8px 72px; }
  .hiw-hero__stop { top: 20px; left: auto; right: 12px; }
  .hiw-step__stage { width: 100%; }
  .hiw-row__frame { height: 600px; }
  .hiw-row__stage, .hiw-row__frame--salon .hiw-row__stage { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .hiw-row__frame--law .hiw-row__stage { transform: scale(1.07); transform-origin: center bottom; }
  .hiw-row__frame--land .hiw-row__photo { object-position: 85% 30%; }
  .hiw-row__frame--law .hiw-row__photo { object-position: 84% 20%; }
  .hiw-row__frame--salon .hiw-row__photo { object-position: 80% 0%; }
  .hiw-plan__scene { height: 700px; }
  /* short enough that the photo shows the coats on their rack beside her: she reads as the shop's owner */
  .hiw-team__frame { height: 470px; }
  .hiw-team__photo { object-position: 70% 20%; }
  .hiw-chat { left: 12px; right: 12px; bottom: 12px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .hiw-chat__msg--typing i { animation: none; }
}
