/* How we work, four cards (owner reference 10, 16 Oct): glass cards on a rail with connectors.
   Motion: staged entrance on scroll, slow staggered float, polished hover lift. Transform and opacity only,
   eased curves, off under reduced motion and when "Pause motion" is pressed. Linked by How we work and the
   three Built-for-you pages, with /assets/js/how-we-work-2026-10-16.js. */
.hw-section {
  overflow-x: clip;
  overflow-y: visible;
  padding-block: 12px;
  margin-block: -12px;
  --hw-ease-out: cubic-bezier(.22, 1, .36, 1);
  --hw-ease-float: cubic-bezier(.45, 0, .55, 1);
  position: relative;
}
.hw-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 56px; }
.hw-head .h2 { font-size: clamp(44px, 5vw, 72px); line-height: .98; letter-spacing: -.04em; }
.hw-head .lead { margin-top: 14px; color: #5d6672; font-size: 21px; line-height: 1.25; }
@media (min-width: 1280px) { .hw-head .lead { font-size: 28px; } }
.hw-motion {
  flex: none;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(70, 79, 95, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: #4a535e;
  font: 500 13px/1 var(--font-text);
  cursor: pointer;
  transition: border-color .3s var(--hw-ease-out), background .3s var(--hw-ease-out);
}
.hw-motion:hover { border-color: rgba(70, 79, 95, .4); background: #fff; }
.hw-motion:focus-visible { outline: 2px solid var(--ring, #457bfa); outline-offset: 3px; }

.hw-rail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1.32fr 1fr 1fr;
  align-items: center;
  gap: clamp(36px, 5vw, 76px);
}
.hw-step { position: relative; min-width: 0; }
/* connector to the next card: a hairline with a small ring in the middle */
.hw-step:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 100%;
  width: clamp(36px, 5vw, 76px);
  height: 1px;
  background: linear-gradient(90deg, rgba(120, 132, 146, .45), rgba(120, 132, 146, .3));
  transform-origin: left center;
}
.hw-step:not(:last-child)::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  left: calc(100% + clamp(36px, 5vw, 76px) / 2);
  width: 13px;
  height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border: 1.5px solid rgba(120, 132, 146, .6);
  border-radius: 50%;
  background: #fff;
}
.hw-float { position: relative; }
.hw-bloom {
  position: absolute;
  z-index: 0;
  inset: -16% -18%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--hw-tone), .26), rgba(var(--hw-tone), .1) 55%, transparent 78%);
  filter: blur(18px);
  pointer-events: none;
}
.hw-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 290px;
  padding: 28px 26px 28px;
  border-radius: 24px;
  color: var(--ink, #111418);
  background: #f7f9fb;
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(20, 28, 38, .04), 0 22px 50px -30px rgba(20, 28, 38, .28);
  transition: transform .6s var(--hw-ease-out), box-shadow .6s var(--hw-ease-out);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .hw-card { background: rgba(255, 255, 255, .62); -webkit-backdrop-filter: blur(20px) saturate(1.1); backdrop-filter: blur(20px) saturate(1.1); }
}
.hw-icon { width: 64px; height: 48px; margin-bottom: 22px; }
.hw-icon--screen { width: 100%; max-width: 230px; height: auto; margin-bottom: 26px; }
.hw-rule { display: block; height: 1px; margin-bottom: 20px; background: rgba(110, 122, 136, .2); }
.hw-num { font: 500 15px/1 var(--mono); letter-spacing: .02em; color: #3c444e; }
.is-featured .hw-num { color: rgb(var(--hw-tone)); }
.hw-card .h4 { margin-top: 8px; font-size: 21px; line-height: 1.15; letter-spacing: -.02em; }
.hw-card p { margin-top: 8px; color: #5f6772; font: 400 17px/1.45 var(--font-text); }
.is-featured .hw-card { min-height: 360px; padding: 30px 30px 32px; border-radius: 28px; }
.is-featured .hw-card .h4 { font-size: 28px; }
.is-featured .hw-card p { font-size: 17px; }
.hw-card:focus-visible { outline: 2px solid var(--ring, #457bfa); outline-offset: 5px; }

@media (hover: hover) {
  .hw-card:hover { transform: translateY(-10px) scale(1.012); box-shadow: inset 0 1px 0 #fff, 0 2px 4px rgba(20, 28, 38, .05), 0 34px 70px -32px rgba(20, 28, 38, .4); }
}

/* Motion (only when the script is alive and the visitor has not asked for less motion) */
@media (prefers-reduced-motion: no-preference) {
  .js .hw-step { opacity: 0; transform: translate3d(0, 34px, 0); transition: opacity .9s var(--hw-ease-out), transform 1.1s var(--hw-ease-out); transition-delay: calc(var(--i) * 140ms); }
  .js .hw-step:not(:last-child)::after { transform: scaleX(0); transition: transform .8s var(--hw-ease-out); transition-delay: calc(var(--i) * 140ms + 420ms); }
  .js .hw-step:not(:last-child)::before { opacity: 0; transform: scale(.4); transition: opacity .5s var(--hw-ease-out), transform .6s var(--hw-ease-out); transition-delay: calc(var(--i) * 140ms + 700ms); }
  .js .hw-section.is-in .hw-step { opacity: 1; transform: none; }
  .js .hw-section.is-in .hw-step::after { transform: scaleX(1); }
  .js .hw-section.is-in .hw-step::before { opacity: 1; transform: none; }
  .hw-section.is-in .hw-float { animation: hw-float var(--hw-dur, 6.8s) var(--hw-ease-float) calc(1.2s + var(--i) * -1.7s) infinite; }
  .hw-section.is-in .hw-bloom { animation: hw-bloom var(--hw-dur, 6.8s) var(--hw-ease-float) calc(1.2s + var(--i) * -1.7s) infinite; }
  .hw-section.is-paused .hw-float, .hw-section.is-paused .hw-bloom { animation-play-state: paused; }
}
@keyframes hw-float { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -9px, 0); } }
@keyframes hw-bloom { 0%, 100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }

@media (prefers-reduced-motion: reduce) {
  .hw-motion { display: none; }
  .hw-card { transition: none; }
}

@media (max-width: 1023px) {
  .hw-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .hw-step::after, .hw-step::before { display: none; }
  .is-featured .hw-card, .hw-card { min-height: 280px; }
}
@media (max-width: 767px) {
  .hw-head { flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 34px; }
  .hw-head .h2 { font-size: 40px; }
  .hw-head .lead { font-size: 19px; }
  .hw-rail { grid-template-columns: 1fr; gap: 26px; }
  .hw-bloom { inset: -10% -3%; filter: blur(14px); }
  .hw-step:not(:last-child)::after { display: block; top: 100%; left: 34px; width: 1px; height: 26px; background: rgba(120, 132, 146, .4); transform-origin: top center; }
  .js .hw-step:not(:last-child)::after { transform: scaleY(0); }
  .js .hw-section.is-in .hw-step:not(:last-child)::after { transform: scaleY(1); }
  .hw-card, .is-featured .hw-card { min-height: 0; padding: 22px 22px 24px; border-radius: 22px; }
  .hw-icon { width: 52px; height: 40px; margin-bottom: 16px; }
  .hw-icon--screen { width: 100%; height: auto; max-width: 200px; margin-bottom: 18px; }
  .hw-rule { margin-bottom: 14px; }
  .hw-card .h4, .is-featured .hw-card .h4 { font-size: 19px; }
  .hw-card p, .is-featured .hw-card p { font-size: 15px; }
  @keyframes hw-float { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -5px, 0); } }
}
.hw-section.is-hidden-tab .hw-float, .hw-section.is-hidden-tab .hw-bloom { animation-play-state: paused; }
