/* Home page «financial systems»: the journey of one transaction (views/site/_fin-flow.php,
   assets/js/home-finflow.js). A bank-vault black with gold, and green for «approved». */
.ff { position: relative; z-index: 2; margin-top: 150px; overflow-x: clip; --ff-gold: #E2B54A; --ff-green: #2EC46F; }
.ff__frame {
    position: relative;
    isolation: isolate;
    padding: 44px;
    border-radius: 36px;
    color: #fff;
    overflow: clip;
    background: radial-gradient(60% 70% at 85% 0%, rgba(226, 181, 74, .28), transparent 70%), radial-gradient(50% 60% at 10% 100%, rgba(46, 196, 111, .16), transparent 70%), linear-gradient(160deg, #0C0C12, #15141C 60%, #0A0A0E);
    box-shadow: 0 34px 70px -34px rgba(0, 0, 0, .9);
}
html[dir="rtl"] .ff__frame { background: radial-gradient(60% 70% at 15% 0%, rgba(226, 181, 74, .28), transparent 70%), radial-gradient(50% 60% at 90% 100%, rgba(46, 196, 111, .16), transparent 70%), linear-gradient(200deg, #0C0C12, #15141C 60%, #0A0A0E); }
/* a guilloche-like pattern, as on banknotes */
.ff__frame::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: repeating-radial-gradient(circle at 50% 120%, transparent 0 22px, rgba(226, 181, 74, .07) 22px 23px);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
}

/* --- header --- */
.ff__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.ff__intro { max-width: 640px; }
.ff__eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px; border-radius: 30px; background: rgba(226, 181, 74, .12); box-shadow: inset 0 0 0 1px rgba(226, 181, 74, .35); color: var(--ff-gold); font-size: 12px; }
.ff__eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ff-green); box-shadow: 0 0 0 4px rgba(46, 196, 111, .2); animation: ffBlink 1.6s ease-in-out infinite; }
@keyframes ffBlink { 50% { opacity: .35; } }
.ff__title { margin: 16px 0 8px; color: #fff; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.3; }
.ff__lead { margin: 0; color: rgba(255, 255, 255, .7); font-size: 14px; line-height: 2.05; }
.ff__actions { display: flex; gap: 10px; flex-shrink: 0; }
.ff__btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 15px; background: linear-gradient(135deg, #F3CF73, #C9952B); color: #15141C; font-size: 13px; font-weight: 700; transition: transform .2s ease, box-shadow .2s ease; }
.ff__btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -12px rgba(226, 181, 74, .6); }
.ff__btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .25); }
.ff__btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ff-gold); }

/* --- the network: card · app on top, the road, the receipt --- */
.ff-net {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: 150px auto auto;
    margin-top: 34px;
    padding: 26px 10px 10px;
    border-radius: 28px;
    background: rgba(255, 255, 255, .03);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.ff-route { grid-column: 1 / -1; grid-row: 2; position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* the road between the stations' tiles */
.ff-route::before {
    content: "";
    position: absolute;
    top: 38px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: repeating-linear-gradient(90deg, rgba(226, 181, 74, .5) 0 8px, transparent 8px 16px);
    background-size: 32px 2px;
    animation: ffRoad 1s linear infinite;
}
@keyframes ffRoad { to { background-position: 32px 0; } }
html[dir="rtl"] .ff-route::before { animation-direction: reverse; }
.ff-node, .ff-app { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 4px; border: 0; background: none; color: #fff; cursor: pointer; text-align: center; }
.ff-node--bank { cursor: default; }
.ff-node__tile {
    position: relative;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 24px;
    background: #1C1B25;
    color: var(--ff-gold);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 18px 30px -18px rgba(0, 0, 0, .9);
    transition: background-color .4s ease, color .4s ease, box-shadow .4s ease, transform .4s cubic-bezier(.2, .7, .2, 1);
}
.ff-node__tile svg { width: 30px; height: 30px; }
.ff-node__num { padding: 2px 9px; border-radius: 12px; background: rgba(226, 181, 74, .14); color: var(--ff-gold); font-size: 12px; line-height: 1.5; }
.ff-node__label { color: rgba(255, 255, 255, .9); font-size: 13px; font-weight: 700; line-height: 1.5; }
.ff-node__status { padding: 3px 10px; border-radius: 10px; background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .7); font-size: 11px; line-height: 1.5; transition: color .3s ease, background-color .3s ease; }
.ff-net.is-busy .ff-node__status { color: var(--ff-gold); }
.ff-net.is-done .ff-node__status { color: var(--ff-green); background: rgba(46, 196, 111, .12); }
.ff-node:hover .ff-node__tile { transform: translateY(-3px); }
.ff-node.is-active .ff-node__tile { background: var(--ff-gold); color: #15141C; box-shadow: 0 0 0 6px rgba(226, 181, 74, .16), 0 0 40px rgba(226, 181, 74, .45); transform: translateY(-4px); }
.ff-net.is-ok .ff-node.is-active .ff-node__tile { background: var(--ff-green); box-shadow: 0 0 0 6px rgba(46, 196, 111, .16), 0 0 40px rgba(46, 196, 111, .45); }
.ff-node:focus-visible .ff-node__tile, .ff-app:focus-visible .ff-app__phone { outline: 2px solid var(--ff-gold); outline-offset: 4px; }
.ff-node--bank.is-active .ff-node__tile { animation: ffBank .9s ease; }
@keyframes ffBank { 40% { transform: translateY(-4px) scale(1.08); } }

/* the customer's card, over the terminal */
.ff-card {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    position: relative;
    width: 128px;
    height: 80px;
    border-radius: 12px;
    background: radial-gradient(120% 120% at 0% 0%, #F7DB8E, #C9952B 55%, #8F6516);
    box-shadow: 0 16px 26px -14px rgba(0, 0, 0, .9);
    transform: translateY(0) rotate(-8deg);
    transition: transform .7s cubic-bezier(.2, .7, .2, 1);
    direction: ltr;
}
.ff-card__chip { position: absolute; top: 18px; left: 14px; width: 22px; height: 16px; border-radius: 4px; background: linear-gradient(135deg, #FFF3C7, #D9B256); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.ff-card__num { position: absolute; left: 14px; bottom: 12px; color: rgba(21, 20, 28, .85); font-size: 12px; letter-spacing: .06em; }
.ff-card__brand { position: absolute; top: 14px; right: 12px; color: rgba(21, 20, 28, .7); font-size: 8px; letter-spacing: .14em; }
.ff-card { z-index: 2; }
.ff-net.is-tap .ff-card { transform: translateY(112px) rotate(0) scale(.72); }

/* the finance app, over the switch */
.ff-app { grid-column: 3; grid-row: 1; justify-self: center; align-self: start; }
.ff-app__phone { position: relative; display: block; width: 78px; height: 104px; padding: 16px 7px 7px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 4px #2A2935, 0 18px 30px -18px rgba(0, 0, 0, .9); overflow: hidden; transition: box-shadow .4s ease; }
.ff-app__bar { position: absolute; top: 6px; left: 50%; width: 22px; height: 4px; margin-left: -11px; border-radius: 4px; background: #2A2935; }
.ff-app__rows i { display: block; height: 10px; margin-top: 6px; border-radius: 4px; background: #EEEDF3; }
.ff-app__rows i:first-child { height: 22px; background: linear-gradient(135deg, #2A2935, #4A4760); }
.ff-app__toast { position: absolute; left: 6px; right: 6px; top: 14px; z-index: 1; display: flex; align-items: center; gap: 4px; padding: 5px 6px; border-radius: 8px; background: var(--ff-green); color: #fff; font-size: 8.5px; line-height: 1.3; transform: translateY(-140%); opacity: 0; transition: transform .5s cubic-bezier(.2, .9, .3, 1.3), opacity .3s ease; }
.ff-app__toast i { font-style: normal; font-weight: 800; }
.ff-net.is-notify .ff-app__toast { transform: none; opacity: 1; }
.ff-app.is-active .ff-app__phone { box-shadow: inset 0 0 0 4px var(--ff-gold), 0 0 34px rgba(226, 181, 74, .4); }
.ff-app .ff-node__num, .ff-app .ff-node__label { margin-top: -2px; }
/* the line from the switch up to the app */
.ff-app::after { content: ""; position: absolute; top: 100%; left: 50%; width: 2px; height: 46px; background: repeating-linear-gradient(180deg, rgba(226, 181, 74, .5) 0 6px, transparent 6px 12px); }
.ff-app { margin-bottom: 0; }
.ff-app .ff-node__num, .ff-app .ff-node__label { display: none; }

/* the receipt, printed under the terminal */
.ff-receipt { grid-column: 1; grid-row: 3; justify-self: center; width: 170px; height: 0; overflow: hidden; transition: height 1.3s steps(14, end); }
.ff-net.is-print .ff-receipt { height: 196px; }
.ff-receipt__paper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding: 16px 14px 22px;
    background: #FBFAF6;
    color: #15141C;
    font-size: 11px;
    -webkit-mask: radial-gradient(circle 6px at 50% 100%, transparent 98%, #000) 0 0 / 14px 100%;
    mask: radial-gradient(circle 6px at 50% 100%, transparent 98%, #000) 0 0 / 14px 100%;
}
.ff-receipt__paper b { padding-bottom: 8px; border-bottom: 1px dashed #CFCBC0; font-size: 12px; text-align: center; }
.ff-receipt__paper span { display: flex; justify-content: space-between; gap: 8px; color: #55536B; }
.ff-receipt__paper em { font-style: normal; color: #15141C; direction: ltr; }
.ff-receipt__stamp { align-self: center; margin-top: 6px; padding: 4px 14px; border: 2px solid var(--ff-green); border-radius: 8px; color: var(--ff-green); font-style: normal; font-weight: 800; font-size: 13px; transform: rotate(-8deg) scale(1.6); opacity: 0; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1) 1.2s, opacity .2s ease 1.2s; }
.ff-net.is-print .ff-receipt__stamp { transform: rotate(-8deg); opacity: 1; }

/* the moving request */
.ff-packet, .ff-ping { position: absolute; left: 0; top: 0; z-index: 3; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; pointer-events: none; opacity: 0; }
.ff-packet { background: var(--ff-gold); box-shadow: 0 0 0 5px rgba(226, 181, 74, .22), 0 0 26px 6px rgba(226, 181, 74, .6); transition: opacity .3s ease, background-color .3s ease, box-shadow .3s ease; }
.ff-net.is-ok .ff-packet { background: var(--ff-green); box-shadow: 0 0 0 5px rgba(46, 196, 111, .22), 0 0 26px 6px rgba(46, 196, 111, .6); }
.ff-packet.is-on { opacity: 1; }
.ff-ping { width: 10px; height: 10px; margin: -5px 0 0 -5px; background: var(--ff-green); box-shadow: 0 0 16px 4px rgba(46, 196, 111, .7); }

/* --- the open station's text --- */
.ff-info { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-top: 22px; padding: 24px 26px; border-radius: 24px; background: linear-gradient(135deg, rgba(226, 181, 74, .12), rgba(255, 255, 255, .03)); box-shadow: inset 0 0 0 1px rgba(226, 181, 74, .22); }
.ff-info__panels { min-height: 92px; }
.ff-info__item { display: none; }
.ff-info__item.is-active { display: block; animation: ffInfo .45s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes ffInfo { from { opacity: 0; transform: translateY(8px); } }
.ff-info__num { color: var(--ff-gold); font-size: 13px; }
.ff-info__title { margin: 6px 0 6px; color: #fff; font-size: clamp(18px, 1.8vw, 22px); line-height: 1.5; }
.ff-info__text { margin: 0; max-width: 760px; color: rgba(255, 255, 255, .75); font-size: 14px; line-height: 2; }
.ff-toggle { display: inline-flex; flex-shrink: 0; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 12px; background: rgba(255, 255, 255, .06); color: #fff; font-size: 12px; cursor: pointer; transition: border-color .2s ease, color .2s ease; }
.ff-toggle:hover { border-color: var(--ff-gold); color: var(--ff-gold); }
.ff-toggle .ft-ico-play, .ff-toggle .ft-label-play, .ff-toggle.is-paused .ft-ico-pause, .ff-toggle.is-paused .ft-label-pause { display: none; }
.ff-toggle.is-paused .ft-ico-play, .ff-toggle.is-paused .ft-label-play { display: inline; }

/* --- related projects: a fanned deck of bank cards --- */
.ff__works { margin-top: 34px; padding-top: 30px; border-top: 1px solid rgba(255, 255, 255, .1); }
.ff__works-title { margin: 0 0 18px; color: #fff; font-size: 17px; }
.ff__deck { display: flex; padding: 8px 4px 24px; overflow-x: auto; scrollbar-width: none; }
.ff__deck::-webkit-scrollbar { display: none; }
.ff-work {
    position: relative;
    flex: 0 0 250px;
    height: 158px;
    margin-inline-end: -60px;
    border-radius: 18px;
    overflow: hidden;
    color: #fff;
    background: #1C1B25;
    box-shadow: 0 24px 40px -22px rgba(0, 0, 0, .95), inset 0 0 0 1px rgba(255, 255, 255, .1);
    transform: rotate(calc((var(--i) - 1) * 2deg));
    transition: transform .35s cubic-bezier(.2, .7, .2, 1), margin .35s ease;
}
.ff-work:last-child { margin-inline-end: 0; }
.ff__deck:hover .ff-work { margin-inline-end: 14px; transform: none; }
.ff-work:hover { transform: translateY(-10px) !important; z-index: 2; }
.ff-work__shot { position: absolute; inset: 0; background-size: cover; background-position: top center; opacity: .55; }
.ff-work::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 12, 18, .1), rgba(12, 12, 18, .92)); }
.ff-work__chip { position: absolute; z-index: 1; top: 18px; inset-inline-start: 18px; width: 30px; height: 22px; border-radius: 5px; background: linear-gradient(135deg, #FFF3C7, #D9B256); }
.ff-work__logo { position: absolute; z-index: 1; top: 14px; inset-inline-end: 14px; width: 30px; height: 30px; padding: 3px; border-radius: 50%; background: #fff; object-fit: contain; }
.ff-work__name { position: absolute; z-index: 1; bottom: 16px; inset-inline-start: 18px; inset-inline-end: 80px; font-size: 14px; font-weight: 700; line-height: 1.5; }
.ff-work__tag { position: absolute; z-index: 1; bottom: 18px; inset-inline-end: 16px; padding: 2px 9px; border-radius: 10px; background: rgba(226, 181, 74, .2); color: var(--ff-gold); font-size: 10px; }

@media (max-width: 991px) {
    .ff__frame { padding: 28px 18px; border-radius: 30px; }
    .ff__head { flex-direction: column; align-items: stretch; }
    .ff-info { flex-direction: column; }
}
@media (max-width: 640px) {
    .ff { margin-top: 110px; }
    .ff__actions { flex-wrap: wrap; }
    .ff__actions .ff__btn { flex: 1 1 auto; justify-content: center; }
    .ff-net { grid-template-rows: 116px auto auto; padding: 18px 4px 8px; }
    .ff-node__tile { width: 54px; height: 54px; border-radius: 17px; }
    .ff-node__tile svg { width: 24px; height: 24px; }
    .ff-route::before { top: 27px; }
    .ff-node__label { font-size: 11px; }
    .ff-node__status { position: absolute; top: calc(100% + 4px); white-space: nowrap; }
    .ff-card { width: 92px; height: 58px; }
    .ff-card__num { font-size: 9px; bottom: 8px; left: 10px; }
    .ff-card__chip { top: 12px; left: 10px; width: 16px; height: 12px; }
    .ff-net.is-tap .ff-card { transform: translateY(78px) rotate(0) scale(.66); }
    .ff-app__phone { width: 62px; height: 84px; }
    .ff-app::after { height: 30px; }
    .ff-receipt { grid-column: 1 / -1; margin-top: 26px; }
    .ff-work { flex-basis: 220px; height: 140px; margin-inline-end: 12px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .ff * { transition: none !important; animation: none !important; }
}
