@import url("../arsenal/thread.css");
/* How It Works: places and sizes its parts around the thread (plan.md, How It Works). The parts are the thread's
   children and none is positioned or isolated (the line runs over their backgrounds and behind their pictures). */

.hiw-thread { --thread-ink: var(--c-brand); --thread-w: 2.5px; --thread-bg: var(--c-paper); }

/* a step's number on the line: it fills as the head plugs in, and one ring spreads out of it */
.hiw-num { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--c-paper); border: 2px solid var(--c-line); box-shadow: 0 0 0 8px var(--c-paper); font: var(--fw-bold) 1.25rem/1 var(--font-display); color: var(--c-ink); transition: none; }
.hiw-num[data-lit] { background: var(--grad-brand); border-color: transparent; color: var(--c-on-brand); }
.hiw-num::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--c-brand); pointer-events: none;
  opacity: calc(var(--lit, 0) * (1 - var(--lit-after, 0))); transform: scale(calc(1 + var(--lit-after, 0) * 0.9)); }
.hiw-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 0; font: var(--fw-semi) 0.9375rem/1.2 var(--font-ui); color: var(--c-ink); }
.hiw-pill { padding: 6px 12px; border-radius: var(--radius-pill); background: var(--c-brand-light); color: var(--c-brand-text); font-size: 0.875rem; }

/* the header: the words centred on white, one wide framed photo under them, wyw in glass at its right */
.hiw-hero { padding: clamp(56px, 7vw, 96px) var(--gutter) calc(var(--section-y) * 0.6); }
.hiw-hero__head { display: grid; justify-items: center; gap: 16px; max-width: 860px; margin-inline: auto; text-align: center; }
.hiw-hero__head h1 { font-size: clamp(2.125rem, 1.2rem + 3.4vw, 3.5rem); text-wrap: balance; }
.hiw-hero__grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hiw-hero__line { font-size: 1.1875rem; line-height: 1.6; color: var(--c-ink-soft); max-width: 40em; }
/* nothing under the main button: the line leaves it straight down; its small line sits under WhatsApp */
.cta-row.hiw-hero__cta { display: grid; grid-template-columns: auto auto; justify-content: center; align-items: center; gap: 10px 14px; text-align: left; }
.hiw-hero__cta .cta-row__line { grid-column: 2; }
.hiw-hero__frame { max-width: var(--max-w); margin: clamp(40px, 5vw, 64px) auto 0; }
.hiw-hero__media { aspect-ratio: 2.2 / 1; }
.hiw-hero__media img { object-position: 40% 28%; }
.scene.hiw-hero__scene { position: absolute; z-index: 2; right: 3%; top: 50%; width: min(400px, 33%); height: min(430px, 82%); transform: translateY(-50%); }
.hiw-hero__stop { top: 14px; left: 14px; }
@media (max-width: 760px) {
  .cta-row.hiw-hero__cta { grid-template-columns: auto; justify-items: center; }
  .hiw-hero__cta .btn--quiet { grid-row: 3; }
  .hiw-hero__cta .cta-row__line { grid-column: 1; grid-row: 2; text-align: center; }
  .hiw-hero__media { aspect-ratio: auto; height: 620px; }
  .hiw-hero__media img { object-position: 22% 20%; }
  .scene.hiw-hero__scene { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; height: 360px; transform: none; }
}

/* the steps: words beside the picture; the number above the picture at its inner side, where the line runs */
.hiw-step { padding: var(--section-y) var(--gutter); }
.hiw-step__in { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(40px, 6vw, 96px); align-items: center; max-width: var(--max-w); margin-inline: auto; }
.hiw-step--media-left .hiw-step__in { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
.hiw-step__copy { display: grid; gap: 18px; align-content: center; max-width: 520px; }
.hiw-step__pic { display: grid; gap: 22px; }
.hiw-step__pic > .hiw-num { justify-self: start; margin-left: 48px; }
.hiw-step--media-left .hiw-step__pic > .hiw-num { justify-self: end; margin-left: 0; margin-right: 48px; }

/* understand: the photo bleeds to the right edge of the screen, goal in glass over its left, clear of her face */
.hiw-understand { padding-right: 0; }
.hiw-understand .hiw-step__in { max-width: none; margin-left: max(0px, calc((100% - var(--max-w)) / 2)); grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
.hiw-understand__media { position: relative; min-height: 580px; overflow: hidden; border-radius: var(--radius-l) 0 0 var(--radius-l); background: var(--c-ink); box-shadow: var(--shadow-l); }
.hiw-understand__media > img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 60% 30%; }
.scene.hiw-understand__scene { position: absolute; z-index: 2; left: 5%; top: 50%; width: min(400px, 44%); transform: translateY(-50%); }
.hiw-understand .stop { top: 16px; right: 16px; }

/* analyze: the framed photo of an empty treatment room, scan in glass over its right part */
.hiw-analyze__frame { position: relative; }
.hiw-analyze__media { aspect-ratio: 4 / 3; }
.hiw-analyze__media img { object-position: 30% 50%; }
.scene.hiw-analyze__scene { position: absolute; z-index: 2; right: -6%; top: 50%; width: min(400px, 62%); transform: translateY(-50%); }
.hiw-analyze__stop { top: 14px; left: 14px; }

/* solve: plan-builder on the designed ground; the ground's light is the part's own background here, so the part
   stays unpositioned and the line runs over it (the thread itself is this page's line along the top edge) */
.hiw-solve { background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3CradialGradient id='g'%3E%3Cstop offset='0' stop-color='%23E0F2FE'/%3E%3Cstop offset='1' stop-color='%23E0F2FE' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M12 0c.6 6.6 5.4 11.4 12 12-6.6.6-11.4 5.4-12 12-.6-6.6-5.4-11.4-12-12C6.6 11.4 11.4 6.6 12 0z'/%3E%3C/svg%3E") right -4% top 6% / clamp(320px, 40vw, 600px) no-repeat,
  radial-gradient(60% 50% at 12% 90%, color-mix(in srgb, var(--c-accent) 6%, transparent), transparent 70%),
  radial-gradient(50% 60% at 88% 20%, color-mix(in srgb, var(--c-brand) 7%, transparent), transparent 70%),
  var(--c-paper); }
.hiw-solve__plan { margin-top: var(--space-3); }
.hiw-solve__stage { position: relative; }
.scene.hiw-solve__scene { width: 100%; aspect-ratio: 720 / 560; }
.hiw-solve__stop { top: -6px; right: -6px; }

/* grow: the framed photo, source-flow in glass over its right part, clear of the faces at the left */
.hiw-grow__frame { position: relative; }
.hiw-grow__media { aspect-ratio: 4 / 3; }
.hiw-grow__media img { object-position: 25% 40%; }
.scene.hiw-grow__scene { position: absolute; z-index: 2; right: -5%; top: 50%; width: min(440px, 64%); height: 380px; transform: translateY(-50%); }
.hiw-grow__stop { top: 14px; left: 14px; }

@media (max-width: 900px) {
  .hiw-step__in, .hiw-step--media-left .hiw-step__in, .hiw-understand .hiw-step__in { grid-template-columns: minmax(0, 1fr); margin-left: 0; }
  .hiw-understand { padding-right: var(--gutter); }
  .hiw-step--media-left .hiw-step__copy { order: -1; }
  .hiw-understand__media { min-height: 640px; border-radius: var(--radius-l); }
  .hiw-understand__media > img { object-position: 62% 20%; }
  .scene.hiw-understand__scene, .scene.hiw-analyze__scene, .scene.hiw-grow__scene { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; transform: none; }
  .hiw-analyze__media, .hiw-grow__media { aspect-ratio: auto; height: 620px; }
  .hiw-grow__media img { object-position: 20% 30%; }
  .scene.hiw-grow__scene { height: 400px; }
  .hiw-step__pic > .hiw-num, .hiw-step--media-left .hiw-step__pic > .hiw-num { justify-self: start; margin: 0; }
}
@media (max-width: 600px) { .scene.hiw-solve__scene { aspect-ratio: auto; height: 700px; } }

/* the team: the words and Janina's framed photo, three cards under them that the line passes behind */
.hiw-team { padding: var(--section-y) var(--gutter); }
.hiw-team__in { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px) clamp(40px, 6vw, 96px); align-items: center; max-width: var(--max-w); margin-inline: auto; }
.hiw-team__copy { display: grid; gap: 18px; }
.hiw-team__photo { justify-self: start; width: min(460px, 100%); margin-left: 24px; }
.hiw-team__media { aspect-ratio: 4 / 5; }
.hiw-team__media img { object-position: 50% 20%; }
.hiw-team__cards { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.hiw-card { position: relative; display: grid; gap: 6px; align-content: start; padding: 24px; border-radius: var(--radius-l); background: var(--c-paper); border: 1px solid var(--c-line); box-shadow: var(--shadow-m); }
.hiw-card__mark { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 8px; border-radius: 12px; background: var(--c-brand-light); }
.hiw-card__mark .sparkle { width: 18px; }
.hiw-card b { font: var(--fw-bold) 1.125rem/1.3 var(--font-display); color: var(--c-ink); }
.hiw-card small { font: var(--fw-semi) 0.875rem/1.3 var(--font-ui); color: var(--c-accent-text); }
.hiw-card p { margin: 6px 0 0; font-size: var(--fs-small); line-height: 1.55; color: var(--c-ink-soft); }
@media (max-width: 900px) {
  .hiw-team__in { grid-template-columns: minmax(0, 1fr); }
  .hiw-team__photo { margin-left: 0; }
  .hiw-team__cards { grid-template-columns: minmax(0, 1fr); }
}

/* the FAQ: its questions on a white card, so the line passes behind them, never over their words */
.page-how .qa__list { position: relative; padding: 8px 28px; border-radius: var(--radius-l); background: var(--c-paper); box-shadow: var(--shadow-m); }

/* the close */
.hiw-close .close-foot__media video { object-position: 70% 35%; }
