/* halo-drift — layout, sizes, motion only (colours live in the template) */

.halo-drift {
    padding-bottom: 20rem;
}

.halo-drift__glow {
    width: 64rem;
    height: 40rem;
    transform: translate(-50%, -30%);
    filter: blur(100px);
    pointer-events: none;
}

.halo-drift__kicker {
    letter-spacing: 0.2em;
}

.halo-drift__title {
    letter-spacing: -0.03em;
    text-wrap: balance;
}

/* --- orbit geometry: --rc circle radius, --ro bubble path radius, --b bubble size, --gap circle bottom above section bottom --- */
.halo-drift__viewport {
    --rc: 14rem;
    --ro: 16rem;
    --b: 3.5rem;
    --gap: 5.5rem;
    height: 20rem;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 30%);
    mask-image: linear-gradient(to bottom, transparent 0, black 30%);
}

.halo-drift__stage {
    left: 50%;
    bottom: calc(var(--gap) + var(--rc));
    width: 0;
    height: 0;
}

.halo-drift__line {
    width: calc(var(--rc) * 2);
    height: calc(var(--rc) * 2);
    left: calc(var(--rc) * -1);
    top: calc(var(--rc) * -1);
}

.halo-drift__ring {
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    --step: 30deg;
    animation: halo-drift-spin 160s linear infinite;
}

.halo-drift__ring--n8  { --step: 45deg; }
.halo-drift__ring--n9  { --step: 40deg; }
.halo-drift__ring--n10 { --step: 36deg; }
.halo-drift__ring--n11 { --step: 32.7273deg; }
.halo-drift__ring--n12 { --step: 30deg; }

.halo-drift__spoke {
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    --i: 0;
    transform: rotate(calc(var(--i) * var(--step)));
}

.halo-drift__spoke--i0  { --i: 0; }
.halo-drift__spoke--i1  { --i: 1; }
.halo-drift__spoke--i2  { --i: 2; }
.halo-drift__spoke--i3  { --i: 3; }
.halo-drift__spoke--i4  { --i: 4; }
.halo-drift__spoke--i5  { --i: 5; }
.halo-drift__spoke--i6  { --i: 6; }
.halo-drift__spoke--i7  { --i: 7; }
.halo-drift__spoke--i8  { --i: 8; }
.halo-drift__spoke--i9  { --i: 9; }
.halo-drift__spoke--i10 { --i: 10; }
.halo-drift__spoke--i11 { --i: 11; }

.halo-drift__bubble {
    position: absolute;
    width: var(--b);
    height: var(--b);
    left: calc(var(--b) / -2);
    top: calc(var(--ro) - var(--b) / 2);
    transform: rotate(calc(var(--i) * var(--step) * -1));
    animation: halo-drift-counter 160s linear infinite;
}

.halo-drift__glyph {
    font-size: calc(var(--b) * 0.36);
}

@keyframes halo-drift-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes halo-drift-counter {
    from { transform: rotate(calc(var(--i) * var(--step) * -1)); }
    to   { transform: rotate(calc(var(--i) * var(--step) * -1 - 360deg)); }
}

@media (min-width: 768px) {
    .halo-drift {
        padding-bottom: 18rem;
    }

    .halo-drift__viewport {
        --rc: 28rem;
        --ro: 31rem;
        --b: 5rem;
        --gap: 6rem;
        height: 100%;
        -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 20%);
        mask-image: linear-gradient(to bottom, transparent 0, black 20%);
    }
}

@media (min-width: 1024px) {
    .halo-drift {
        padding-bottom: 17rem;
    }

    .halo-drift__viewport {
        --rc: 40rem;
        --ro: 44rem;
        --b: 6rem;
        --gap: 9rem;
    }
}

@media (min-width: 1280px) {
    .halo-drift__viewport {
        --rc: 46rem;
        --ro: 50.5rem;
        --b: 6.5rem;
        --gap: 11rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .halo-drift__ring,
    .halo-drift__bubble {
        animation: none;
    }
}

/* folio-rail — mirror sticky phone + scroll-story services */
.folio-rail {
    overflow-x: clip;
}

.folio-rail__eyebrow {
    letter-spacing: 0.14em;
}

.folio-rail__heading {
    letter-spacing: -0.025em;
}

.folio-rail__blob {
    width: 18rem;
    height: 18rem;
    filter: blur(48px);
}

.folio-rail__blob--a {
    transform: translate(-20%, -10%);
}

.folio-rail__blob--b {
    width: 14rem;
    height: 14rem;
    transform: translate(70%, 40%);
}

.folio-rail__dots {
    margin: 0;
    list-style: none;
}

.folio-rail__dot {
    width: 0.55rem;
    height: 0.55rem;
    opacity: 0.35;
    transition: opacity 250ms ease, transform 250ms ease;
}

.folio-rail__dot.is-active {
    opacity: 1;
    transform: scale(1.35);
}

.folio-rail__stage {
    position: relative;
    min-height: 32rem;
    align-self: flex-start;
}

.folio-rail__phone {
    width: 15.5rem;
    aspect-ratio: 9 / 19;
    padding: 0.5rem;
    border-radius: 2.6rem;
    margin: 0;
}

.folio-rail__screen {
    border-radius: 2.15rem;
}

.folio-rail__notch {
    width: 5.25rem;
    height: 1.3rem;
}

.folio-rail__status {
    font-size: 0.75rem;
}

.folio-rail__status i {
    margin-left: 0.2rem;
    font-size: 0.65rem;
}

.folio-rail__coin {
    width: 1.45rem;
    height: 1.45rem;
    font-size: 0.65rem;
}

.folio-rail__micro {
    font-size: 0.68rem;
    line-height: 1.2;
}

.folio-rail__chart {
    min-height: 6.5rem;
    overflow: visible;
}

.folio-rail__chart-svg {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 6.5rem;
    overflow: visible;
}

.folio-rail__chart-fill {
    transform-origin: center bottom;
    animation: folio-rail-chart-fill 4.2s ease-in-out infinite;
}

.folio-rail__chart-line {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: folio-rail-chart-draw 4.2s ease-in-out infinite;
}

.folio-rail__chart-dot {
    transform-box: fill-box;
    transform-origin: center;
    animation: folio-rail-chart-dot 4.2s ease-in-out infinite;
}

@keyframes folio-rail-chart-fill {
    0%, 12% { opacity: 0; transform: scaleY(0.55); }
    40%, 72% { opacity: 1; transform: scaleY(1); }
    88%, 100% { opacity: 0; transform: scaleY(0.55); }
}

@keyframes folio-rail-chart-draw {
    0% { stroke-dashoffset: 400; opacity: 0.35; }
    38% { stroke-dashoffset: 0; opacity: 1; }
    72% { stroke-dashoffset: 0; opacity: 1; }
    100% { stroke-dashoffset: 400; opacity: 0.35; }
}

@keyframes folio-rail-chart-dot {
    0%, 28% { opacity: 0; transform: translateY(6px) scale(0.6); }
    42%, 72% { opacity: 1; transform: translateY(0) scale(1); }
    88%, 100% { opacity: 0; transform: translateY(6px) scale(0.6); }
}

.folio-rail__step {
    transition: opacity 300ms ease;
}

@media (min-width: 1024px) {
    .folio-rail__phone {
        width: 17.5rem;
    }

    .folio-rail .folio-rail__stage {
        position: sticky;
        top: 6rem;
        min-height: auto;
        width: 100%;
    }

    .folio-rail .folio-rail__stage .folio-rail__phone {
        margin-inline: auto;
    }

    .folio-rail__step {
        min-height: 70vh;
    }

    .folio-rail.is-ready .folio-rail__step {
        opacity: 0.3;
    }

    .folio-rail.is-ready .folio-rail__step.is-active {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .folio-rail__chart-fill,
    .folio-rail__chart-line,
    .folio-rail__chart-dot {
        animation: none;
        opacity: 1;
        transform: none;
        stroke-dashoffset: 0;
    }

    .folio-rail__step,
    .folio-rail__dot {
        transition: none;
    }
}

/* time-range chips inside the phone mock: never spill out of the frame; extra chips scroll sideways */
ul:has(> li.folio-rail__micro) { overflow-x: auto; scrollbar-width: none; }
ul:has(> li.folio-rail__micro)::-webkit-scrollbar { display: none; }
li.folio-rail__micro { flex-shrink: 0; white-space: nowrap; }

/* cash-loop — two-card bento: gradient dashboard card + oval stage with ticker band and photo */
.cash-loop__eyebrow {
    letter-spacing: 0.12em;
}

.cash-loop__heading {
    letter-spacing: -0.02em;
}

.cash-loop__micro {
    font-size: 0.75rem;
    line-height: 1.3;
}

/* Left gradient card */
.cash-loop__panel {
    min-height: 0;
}

.cash-loop__glow {
    width: 18rem;
    height: 18rem;
    transform: translate(35%, 35%);
    filter: blur(10px);
}

.cash-loop__frost {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.cash-loop__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cash-loop__track {
    height: 0.25rem;
}

.cash-loop__fill {
    width: 0;
    animation: cash-loop-fill 1.8s ease forwards;
}

.cash-loop__fill--1 { --cash-loop-end: 84%; animation-delay: 0.15s; }
.cash-loop__fill--2 { --cash-loop-end: 52%; animation-delay: 0.4s; }
.cash-loop__fill--3 { --cash-loop-end: 68%; animation-delay: 0.65s; }

@keyframes cash-loop-fill {
    from { width: 0; }
    to { width: var(--cash-loop-end); }
}

/* Right oval stage */
.cash-loop__stage {
    min-height: 9rem;
}

.cash-loop__band {
    left: -3rem;
    right: -3rem;
    transform: translateY(-50%);
}

.cash-loop__marquee {
    width: max-content;
    animation: cash-loop-marquee 28s linear infinite;
}

@keyframes cash-loop-marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

.cash-loop__photo {
    width: 11rem;
    aspect-ratio: 1 / 1;
}

.cash-loop__img {
    object-fit: cover;
}

.cash-loop__chip {
    transform: translate(-40%, 18%);
    min-width: 8rem;
}

.cash-loop__desc {
    max-width: 28rem;
}

@media (min-width: 768px) {
    .cash-loop__photo {
        width: 13rem;
        aspect-ratio: 21 / 20;
    }

    .cash-loop__chip {
        transform: translate(-75%, 20%);
    }

    .cash-loop__band {
        left: -7rem;
        right: -7rem;
    }

    .cash-loop__oval.cash-loop__oval {
        border-radius: 50% !important;
        min-height: 22rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cash-loop__marquee,
    .cash-loop__fill {
        animation: none;
    }

    .cash-loop__fill--1 { width: 84%; }
    .cash-loop__fill--2 { width: 52%; }
    .cash-loop__fill--3 { width: 68%; }
}

.content-col-grow {
    flex: 1 1 0%;
    min-width: 0;
}

.content-img-ratio {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    object-fit: cover;
    flex-shrink: 0;
}

.editorial-document__text-panel-inset {
    padding: 4rem;
}

.ledger-stack__img { object-fit: cover; height: 22rem; }
.ledger-stack__bars { height: 12rem; }
.ledger-stack__bar {
    display: block;
    flex: 1 1 0;
    min-width: 0;
    transform-origin: bottom center;
    animation: ledger-stack-bar 2.8s ease-in-out infinite;
}
.ledger-stack__bar--1 { height: 35%; opacity: 0.22; }
.ledger-stack__bar--2 { height: 50%; opacity: 0.34; animation-delay: 0.2s; }
.ledger-stack__bar--3 { height: 64%; opacity: 0.46; animation-delay: 0.4s; }
.ledger-stack__bar--4 { height: 82%; opacity: 0.6; animation-delay: 0.6s; }
.ledger-stack__bar--5 { height: 100%; opacity: 1; animation-delay: 0.8s; }
@keyframes ledger-stack-bar {
    0%, 100% { transform: scaleY(0.45); }
    50% { transform: scaleY(1); }
}
.ledger-stack__avatars { margin: 0; padding: 0; list-style: none; }
.ledger-stack__avatar { width: 2.75rem; height: 2.75rem; }
.ledger-stack__avatar + .ledger-stack__avatar { margin-left: -0.75rem; }
@media (prefers-reduced-motion: reduce) {
    .ledger-stack__bar { animation: none; }
}

