/* How it works (plan.md, How it works): the thread (arsenal composition) runs down the page's left lane through every
   part. hero (.hwh: the phone on the table with its lock screen, the words and the chat centered), yours (.hwy: the
   owner's three steps as cards on the drafting grid), ours (.hwo: the agency's three, each over a framed photo), plan
   (.hwp), team (.hwt), faq (.hwq), close (.hwx). It places and sizes its parts; the components are
   design\components.css's. Tokens only, but for the lock screen's wallpaper and the photo veils. */
@import url("../arsenal/thread.css");

/* ---------- the thread: the ticket's tear (a chain of the mark) down the left lane ---------- */
.hw { --hw-lane: 84px; --thread-link: 8px; --thread-gap: 15px; }
.hw > .section > .section__in { padding-left: calc(var(--gutter) + var(--hw-lane)); }
.hw > .hwx > .section__in { padding-left: var(--gutter); }
/* the parts with a ground of their own stay unpositioned, so the line is drawn over their ground (the thread's README) */
.hw > .hwy, .hw > .hwp, .hw > .hwq { position: static; }
.hw__head { max-width: 680px; }
.hw__steps { display: grid; gap: clamp(36px, 4vw, 56px); margin: 0; padding: 0; list-style: none; }
.hw__step { position: relative; }

/* a step's number: a ticket stub in the lane, punched by the line (it fills azure as the line plugs in, then rings) */
.hw__num { position: absolute; top: 20px; left: calc(-1 * var(--hw-lane) + (var(--hw-lane) - 56px) / 2); display: grid; place-items: center; width: 56px; height: 44px; color: var(--c-ink); }
.hw__num svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hw__num path { fill: color-mix(in srgb, var(--c-button) calc(var(--lit, 0) * 100%), var(--c-paper)); stroke: color-mix(in srgb, var(--c-button) calc(var(--lit, 0) * 100%), #C3CCD8); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.hw__num b { position: relative; font: 600 0.9375rem/1 var(--font-ui); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--c-on-button) calc(var(--lit, 0) * 100%), var(--c-ink)); }
.hw__num::after { content: ''; position: absolute; inset: -6px -7px; border: 2px solid var(--c-brand); border-radius: 13px; pointer-events: none; opacity: calc(clamp(0, (var(--lit, 0) - 0.98) * 50, 1) * (1 - var(--lit-after, 0))); transform: scale(calc(1 + var(--lit-after, 0) * 0.45)); }

/* a step's words: its title, one line, and under them its small label (the thread's rule: labels under, never above) */
.hw__words h3 { font-size: var(--fs-h3); }
.hw__words p { margin: 10px 0 0; font-size: 1rem; line-height: 1.55; color: var(--c-ink-soft); }
.hw__words .hw__meta { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font: 500 0.875rem/1.2 var(--font-ui); color: var(--c-brand-text); }
.hw__meta::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--c-mint); }

/* ---------- hero: the general shot, a phone on the table lighting up with bookings ---------- */
.hwh { position: relative; overflow: hidden; isolation: isolate; background: var(--c-paper-alt); border-bottom: 1px solid var(--c-line); }
.hwh__media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hwh__photo { position: absolute; inset: 0; margin: 0; }
.hwh__photo > img { position: absolute; max-width: none; }
.hwh__in { position: relative; z-index: 2; display: grid; justify-items: center; max-width: 780px; margin: 0 auto; padding: clamp(56px, 5.6vw, 84px) var(--gutter) clamp(40px, 4vw, 56px); text-align: center; }
.hwh__in h1 { max-width: 16ch; font-size: clamp(2.2rem, 1.25rem + 1.9vw, 3.1rem); text-wrap: balance; }
.hwh__line { max-width: 560px; margin: 16px 0 0; font-size: 1.0625rem; line-height: 1.55; color: var(--c-ink-soft); text-wrap: balance; }
.hwh__cta { display: grid; justify-items: center; margin-top: 26px; }
.hwh__chat { width: min(350px, 100%); margin-top: 40px; text-align: start; }
/* the chat's window holds the whole conversation at its point, the messages filling it from the top (this site's copy
   of hiw-chat takes both from these; For the skill) */
.hwh__scene { --hc-chat-h: 476px; --hc-chat-h-s: 476px; --hc-chat-align: flex-start; }
.hwh__stop { position: absolute; right: 16px; bottom: 16px; z-index: 6; }

/* the lock screen on the photo's phone (designed at 240 x 508; 200 x 424 on a phone): the newest booking on top */
.lock { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 32px 9px 0; overflow: hidden; background: radial-gradient(130% 75% at 50% 0%, #22426D 0%, #132239 50%, #0B0D12 100%); color: #FFFFFF; font-family: var(--font-ui); }
.lock__time { margin: 0; text-align: center; }
.lock__time b { display: block; font: 500 46px/1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.lock__time small { display: block; margin-top: 7px; font: 500 12px/1 var(--font-ui); color: rgba(255, 255, 255, 0.8); }
.lock__list { display: grid; grid-template-rows: repeat(3, auto); gap: 6px; margin: 22px 0 0; padding: 0; list-style: none; }
.lock__note { grid-column: 1; display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 8px; align-items: start; padding: 8px 9px 9px; border-radius: 14px; background: rgba(255, 255, 255, 0.92); color: var(--c-ink); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28); opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * -12px)) scale(calc(0.95 + var(--kit-in, 1) * 0.05)); }
.lock__note--1 { grid-row: 1; }
.lock__note--2 { grid-row: 2; }
.lock__note--3 { grid-row: 3; }
.lock__app { grid-row: 1 / span 3; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--c-button); }
.lock__app svg { width: 17px; height: 17px; fill: #FFFFFF; }
.lock__top { display: flex; justify-content: space-between; gap: 6px; font: 500 12px/1.2 var(--font-ui); color: var(--c-ink-soft); }
.lock__top b { font-weight: 600; color: var(--c-ink); }
.lock__top small { font-size: inherit; }
.lock__what { margin-top: 2px; font: 600 13px/1.25 var(--font-ui); }
.lock__from { font: 400 12px/1.3 var(--font-ui); color: var(--c-ink-soft); }

/* a computer: the photo across the whole header, the phone at its right edge, the words and the chat centered */
@media (min-width: 1200px) {
  .hwh__photo > img { top: 0; left: 0; width: 118%; height: 100%; object-fit: cover; object-position: 0% 50%; }
  .hwh__media::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 40% 34% at 50% 24%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.42) 62%, rgba(255, 255, 255, 0) 100%); }
}
/* a tablet: the words on the paper, then the table: the chat on the left, the phone on the right */
@media (max-width: 1199px) {
  .hwh { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "h" "l" "c" "stage"; background: var(--c-paper); }
  .hwh__in { display: contents; }
  .hwh__in h1 { grid-area: h; justify-self: center; margin: 0; padding: clamp(40px, 6vw, 64px) var(--gutter) 0; }
  .hwh__line { grid-area: l; justify-self: center; padding: 0 var(--gutter); }
  .hwh__cta { grid-area: c; justify-self: center; margin: 24px 0 clamp(32px, 5vw, 48px); padding: 0 var(--gutter); }
  .hwh__media { grid-area: stage; position: relative; inset: auto; height: 640px; }
  .hwh__photo > img { left: calc(100% - 1370px); top: -200px; width: 1600px; height: auto; }
  .hwh__chat { grid-area: stage; z-index: 2; align-self: center; justify-self: start; width: 340px; margin: 0 0 0 max(var(--gutter), calc(50% - 400px)); }
}
/* a phone: the phone on the table at the top right, the chat over the table's foot */
@media (max-width: 760px) {
  .hwh__media { height: 760px; }
  .hwh__photo > img { left: calc(100% - 1171px); top: -150px; width: 1400px; }
  .hwh__chat { align-self: end; justify-self: center; width: min(340px, calc(100% - 2 * var(--gutter))); margin: 0 0 -200px; }
  .hwh { padding-bottom: 216px; }
  .hwh [data-screen] { width: 230px !important; height: 487px !important; }
  .lock__note--3 { display: none; }
  .hwh__stop { bottom: 230px; }
}

/* ---------- yours: the owner's three steps, cards on the drafting grid ---------- */
.hwy { background-color: var(--c-paper-alt); background-image: linear-gradient(var(--grid-line-fine) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line-fine) 1px, transparent 1px); background-size: 48px 48px; background-position: center top; border-block: 1px solid var(--c-line); }
.hwy__card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 3vw, 48px); align-items: center; padding: clamp(22px, 2.6vw, 34px); border: 1px solid color-mix(in srgb, var(--c-brand) calc(var(--lit, 0) * 45%), var(--c-line)); border-radius: var(--radius-l); background: var(--c-paper); box-shadow: var(--shadow-l); }
.hwy__step--flip .hwy__card { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.hwy__step--flip .hw__words { order: 2; }
/* the goal's panel grows with its chat from the foot of a box of its full height; the check's grows with its rows from
   the top; the plan's card sizes itself */
.hwy__demo { display: grid; justify-items: center; align-items: center; min-height: 312px; }
.hwy__scene--goal { align-self: end; width: min(400px, 100%); }
.hwy__scene--scan { align-self: start; width: min(420px, 100%); }
.hwy__scene--bars { width: min(540px, 100%); }
.hwy__stop { position: absolute; top: 12px; right: 12px; z-index: 6; }

/* ---------- ours: the agency's three steps, each over a framed photo, sides alternating ---------- */
.hwo__row { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.hwo__step--flip .hwo__row { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.hwo__step--flip .hw__words { order: -1; }
.hwo__frame { position: relative; height: 500px; margin: 0; overflow: hidden; border: 1px solid var(--c-line); border-radius: var(--radius-l); background: var(--c-paper-alt); box-shadow: var(--shadow-l); }
.hwo__img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; }
.hwo__frame--launch .hwo__img { object-position: 64% 50%; }
.hwo__frame--leads .hwo__img { object-position: 70% 50%; }
.hwo__frame--tune .hwo__img { object-position: 60% 50%; }
/* launch and tune grow with their lines from the frame's foot; the board keeps its depth room in the middle, drawn a
   tenth larger so its tilted 13 px words show at 13 px */
.hwo__scene { position: absolute; left: clamp(16px, 2vw, 24px); bottom: clamp(16px, 2vw, 24px); width: min(380px, calc(100% - 40px)); }
.hwo__scene--leads { top: 50%; bottom: auto; width: min(340px, calc((100% - 40px) / 1.1)); height: 290px; transform: translateY(-50%); zoom: 1.1; }
/* the board is dark glass: its words take white, not this site's dark text-on-azure (as the home page's phone does) */
.hwo__scene--leads { --c-on-brand: #FFFFFF; }
/* but the azure avatar keeps the site's dark text on azure (white on #0093FE is 3.2:1) */
.hwo__scene--leads .ld-row:nth-child(3n+1) .ld-av { color: #0E1117; }
.hwo__stop { position: absolute; top: 14px; right: 14px; z-index: 6; }

/* ---------- plan: the plan building over a framed photo of an owner reading hers ---------- */
.hwp { background: var(--c-paper-alt); border-block: 1px solid var(--c-line); }
.hwp__frame { position: relative; height: clamp(580px, 46vw, 640px); margin: 0; overflow: hidden; border: 1px solid var(--c-line); border-radius: var(--radius-l); background: var(--c-night); box-shadow: var(--shadow-l); }
/* her face stays left of the plan: the photo drawn larger from its right */
.hwp__img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 50% 30%; transform: scale(1.3); transform-origin: 100% 28%; }
.hwp__scene { position: absolute; top: 50%; right: clamp(20px, 3vw, 40px); width: 600px; height: 560px; transform: translateY(-50%); }
.hwp__stop { position: absolute; top: 14px; right: 14px; z-index: 6; }

/* ---------- team: the words, then the owner at her truck with the team's reply over the free half ---------- */
.hwt__in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.hwt__words { margin: 0; }
.hwt__frame { position: relative; height: 480px; margin: 0; overflow: hidden; border: 1px solid var(--c-line); border-radius: var(--radius-l); background: var(--c-paper-alt); box-shadow: var(--shadow-l); }
.hwt__img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 50% 40%; }
.hwt__scene { position: absolute; left: clamp(16px, 2.4vw, 28px); top: 50%; width: min(360px, 54%); height: 300px; transform: translateY(-50%); }
.hwt__stop { position: absolute; top: 14px; right: 14px; z-index: 6; }

/* ---------- close: the receptionist welcoming a new client; the line ends in the button ---------- */
/* the footage lies under the line (z -1 in the thread), so the line is drawn over it into the button */
.hw > .hwx { background: none; display: grid; align-items: center; min-height: clamp(520px, 44vw, 640px); }
.hwx .close__media { z-index: -1; }
.hwx .close__media video { object-position: 50% 35%; }
.hwx .close__media::after { background: radial-gradient(ellipse 46% 62% at 50% 52%, rgba(11, 13, 18, 0.78), rgba(11, 13, 18, 0.56) 68%, rgba(11, 13, 18, 0.4) 100%); }
.hwx .close__in h2 { max-width: 620px; }
.hwx .close__line { max-width: 480px; }
.hwx .close__in .ease { margin-top: 14px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1099px) {
  .hw { --hw-lane: 64px; }
  .hwo__row, .hwo__step--flip .hwo__row { grid-template-columns: minmax(0, 1fr); }
  .hwo__step--flip .hw__words { order: 0; }
  .hwo__frame { height: 520px; }
  .hwp__frame { height: 780px; }
  .hwp__img { transform: none; object-position: 30% 0%; }
  .hwp__scene { top: auto; right: 50%; bottom: 24px; width: min(600px, calc(100% - 40px)); height: 520px; transform: translateX(50%); }
  .hwt__in { grid-template-columns: minmax(0, 1fr); }
  .hwt__frame { height: 520px; }
}
@media (max-width: 900px) {
  .hwy__card, .hwy__step--flip .hwy__card { grid-template-columns: minmax(0, 1fr); }
  .hwy__step--flip .hw__words { order: 0; }
}
/* a phone: no lane (the thread hides its line and keeps the lighting); each number sits beside its step's title; the
   photos on top, taller, their faces in the upper part, the scene over their lower part */
@media (max-width: 760px) {
  .hw > .section > .section__in { padding-left: var(--gutter); }
  .hw__num { position: relative; top: auto; left: auto; width: 48px; height: 38px; margin-bottom: 12px; }
  .hwy__card { padding: 18px; }
  .hwy__demo { min-height: 300px; }
  .hwo__frame { height: 600px; }
  .hwo__scene { left: 12px; bottom: 12px; width: calc(100% - 24px); }
  .hwo__scene--leads { top: auto; bottom: 12px; width: calc((100% - 24px) / 1.1); transform: none; }
  .hwo__frame--launch .hwo__img { object-position: 74% 50%; }
  .hwo__frame--leads .hwo__img { object-position: 86% 50%; }
  .hwo__frame--tune .hwo__img { object-position: 70% 50%; }
  .hwp__frame { height: 980px; }
  .hwp__img { object-position: 36% 0%; }
  .hwp__scene { left: 10px; right: 10px; bottom: 10px; width: auto; height: 700px; transform: none; }
  .hwt__frame { height: 580px; }
  .hwt__img { object-position: 64% 30%; }
  .hwt__scene { top: auto; left: 10px; right: 10px; bottom: 10px; width: auto; height: 280px; transform: none; }
  .hw > .hwx { align-items: end; min-height: 660px; }
  .hwx .close__media video { object-position: 62% 35%; }
  .hwx .close__media::after { background: linear-gradient(180deg, rgba(11, 13, 18, 0.12) 0%, rgba(11, 13, 18, 0.32) 38%, rgba(11, 13, 18, 0.86) 62%, rgba(11, 13, 18, 0.92) 100%); }
}
