/*
 * Lively parts (proper/parts/README.md, "Lively parts"). Theme with the --p-* settings the
 * other parts use, and --lv-line for the drawn lines (the accent by default).
 */
.lv-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- cards ---- */
[data-lively="cards"] { overflow: hidden; }
.lv-cards-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: clamp(24px, 4vw, 44px); }
.lv-cards-nav { display: flex; gap: 10px; flex: none; }
.lv-go { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 1px solid var(--p-line, rgba(0, 0, 0, .16)); border-radius: 50%; background: transparent; color: var(--p-text, inherit); cursor: pointer; transition: background-color .25s, color .25s, border-color .25s; }
.lv-go:hover { background: var(--p-accent, #222); border-color: var(--p-accent, #222); color: var(--p-on-accent, #fff); }
.lv-go:focus-visible { outline: 2px solid var(--p-accent, #222); outline-offset: 3px; }
.lv-go svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.lv-go:disabled { opacity: .3; cursor: default; background: transparent; color: var(--p-text, inherit); border-color: var(--p-line, rgba(0, 0, 0, .16)); }
.lv-cards-row { list-style: none; display: flex; gap: clamp(14px, 1.6vw, 26px); margin: 0; padding: 0 0 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.lv-cards-row::-webkit-scrollbar { display: none; }
.lv-card { flex: none; width: min(74vw, 300px); scroll-snap-align: start; }
.lv-card-pic { overflow: hidden; aspect-ratio: 3 / 4; border-radius: var(--lv-card-radius, 999px 999px 0 0); background: var(--p-raised, #eee); }
.lv-card-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.lv-card:hover .lv-card-pic img { transform: scale(1.06); }
.lv-card h3 { margin: 18px 0 6px; }
.lv-card-from { margin: 0; color: var(--p-accent, inherit); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.lv-card details { margin-top: 12px; }
.lv-card summary { display: inline-block; list-style: none; padding: 4px 0; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid currentColor; cursor: pointer; }
.lv-card summary::-webkit-details-marker { display: none; }
.lv-card-more { display: grid; gap: 12px; padding-top: 14px; color: var(--p-muted, inherit); font-size: 15.5px; }
@media (min-width: 900px) { .lv-card { width: clamp(270px, 24vw, 340px); } }
@media (max-width: 599px) { .lv-cards-nav { display: none; } }
/* Held: the section stays on screen and scrolling down slides the row across. lively.js wraps the
   section's contents in .lv-cards-pin and sets the section's height. No ancestor may have
   overflow hidden (it would stop the hold). */
[data-lively="cards"].lv-side { overflow: visible; padding-top: 0 !important; padding-bottom: 0 !important; }
.lv-cards-pin { position: sticky; top: var(--sp-top, 0px); height: calc(100svh - var(--sp-top, 0px)); display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.lv-side .lv-cards-row { position: relative; overflow: visible; scroll-snap-type: none; will-change: transform; }
.lv-side .lv-cards-nav { display: none; }
.lv-wait .lv-card { opacity: 0; transform: translateX(70px); }
.lv-in .lv-card { opacity: 1; transform: none; transition: opacity .9s ease-out, transform 1.1s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--lv-i, 0) * 90ms); }

/* ---- steps ---- */
[data-lively="steps"] { list-style: none; display: grid; gap: 34px; margin: 0; padding: 0; }
[data-lively="steps"] > li { position: relative; padding-top: 24px; }
[data-lively="steps"] > li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--lv-line, var(--p-accent, currentColor)); transform-origin: 0 50%; }
.lv-step-n { display: block; margin-bottom: 14px; font-size: clamp(2.6rem, 4.4vw, 4rem); line-height: 1; color: var(--lv-line, var(--p-accent, currentColor)); }
@media (min-width: 900px) { [data-lively="steps"] { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 48px; } }
[data-lively="steps"].lv-wait > li::before { transform: scaleX(0); }
[data-lively="steps"].lv-wait > li > * { opacity: 0; transform: translateY(18px); }
[data-lively="steps"].lv-in > li::before { transform: none; transition: transform .8s cubic-bezier(.65, 0, .35, 1) calc(var(--lv-i, 0) * 250ms); }
[data-lively="steps"].lv-in > li > * { opacity: 1; transform: none; transition: opacity .7s ease-out, transform .7s ease-out; transition-delay: calc(var(--lv-i, 0) * 250ms + 350ms); }

/* ---- flow: how it works, you and us ---- */
[data-lively="flow"] { --lv-flow-line: var(--lv-line, var(--p-accent, currentColor)); position: relative; list-style: none; margin: 0; padding: 0 0 0 30px; display: grid; gap: 26px; }
[data-lively="flow"]::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--lv-flow-line); transform-origin: 50% 0; }
[data-lively="flow"] > li { position: relative; display: grid; gap: 6px; justify-items: start; }
[data-lively="flow"] > li::before { content: ""; position: absolute; left: -29px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--p-ground, #fff); border: 2px solid var(--lv-flow-line); }
[data-lively="flow"] > li[data-who="us"]::before { background: var(--lv-flow-line); }
[data-lively="flow"] > li[data-focus]::before { box-shadow: 0 0 0 5px color-mix(in srgb, var(--lv-flow-line) 22%, transparent); }
.lv-flow-who { padding: 2px 10px; border-radius: 999px; border: 1px solid var(--lv-flow-line); color: var(--lv-flow-line); font-size: .8125rem; font-weight: 700; letter-spacing: .02em; }
[data-who="us"] > .lv-flow-who { background: var(--lv-flow-line); color: var(--p-on-accent, #fff); }
[data-lively="flow"] > li > b { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.25; }
[data-lively="flow"] > li > span:not(.lv-flow-who) { color: var(--p-muted, inherit); line-height: 1.5; max-width: 34ch; }
[data-lively="flow"] > li > em { font-style: normal; font-size: .875rem; font-weight: 600; color: var(--lv-flow-line); }
@media (min-width: 900px) {
  [data-lively="flow"] { padding: 0; grid-template-columns: repeat(var(--lv-n, 4), minmax(0, 1fr)); grid-template-rows: 1fr 2px 1fr; gap: 0 22px; }
  [data-lively="flow"]::before { left: 0; right: 0; top: auto; bottom: auto; width: auto; height: 2px; grid-column: 1 / -1; grid-row: 2; position: static; transform-origin: 0 50%; }
  [data-lively="flow"] > li { grid-column: var(--lv-col, auto); }
  [data-lively="flow"] > li[data-who="you"], [data-lively="flow"] > li:not([data-who]) { grid-row: 1; align-self: end; padding-bottom: 30px; }
  [data-lively="flow"] > li[data-who="us"] { grid-row: 3; align-self: start; padding-top: 30px; }
  [data-lively="flow"] > li::before { left: 0; top: auto; bottom: -8px; }
  [data-lively="flow"] > li[data-who="us"]::before { top: -6px; bottom: auto; }
  [data-lively="flow"] > li::after { content: ""; position: absolute; left: 7px; width: 2px; height: 22px; bottom: 6px; background: var(--lv-flow-line); opacity: .45; }
  [data-lively="flow"] > li[data-who="us"]::after { bottom: auto; top: 8px; }
}
[data-lively="flow"].lv-wait::before { transform: scaleY(0); }
[data-lively="flow"].lv-wait > li { opacity: 0; transform: translateY(14px); }
[data-lively="flow"].lv-in::before { transform: none; transition: transform 1.2s cubic-bezier(.65, 0, .35, 1); }
[data-lively="flow"].lv-in > li { opacity: 1; transform: none; transition: opacity .6s ease-out, transform .6s ease-out; transition-delay: calc(var(--lv-i, 0) * 220ms + 250ms); }
@media (min-width: 900px) { [data-lively="flow"].lv-wait:not(.lv-in)::before { transform: scaleX(0); } }

/* ---- count: figures that do not jump about as they count ---- */
[data-lively="count"] { font-variant-numeric: tabular-nums lining-nums; }

/* ---- drift ---- */
[data-lively="drift"] { overflow: hidden; }
.lv-drift-on img { transform: scale(1.12); will-change: transform; }

/* ---- glide ---- */
[data-lively="glide"] { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.lv-glide-row { display: flex; align-items: center; width: max-content; animation: lv-glide var(--lv-glide-s, 36s) linear infinite; }
.lv-glide-row > * { flex: none; margin-right: clamp(30px, 4vw, 64px); }
.lv-glide-row img { height: clamp(40px, 5.5vw, 68px); width: auto; }
[data-lively="glide"]:hover .lv-glide-row { animation-play-state: paused; }
@keyframes lv-glide { to { transform: translateX(-50%); } }

/* ---- lit ---- */
.lv-w { opacity: .16; transition: opacity .25s linear; }
.lv-w.is-lit { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .lv-glide-row { animation: none; flex-wrap: wrap; width: auto; }
  .lv-wait .lv-card, [data-lively="steps"].lv-wait > li > * { opacity: 1; transform: none; }
  [data-lively="steps"].lv-wait > li::before { transform: none; }
  [data-lively="flow"].lv-wait > li { opacity: 1; transform: none; }
  [data-lively="flow"].lv-wait::before { transform: none; }
}
