/* ==========================================================
   02 · Features: accordion (left) + changing product panel (right)
   ========================================================== */
.features { padding: 120px 0 40px; position: relative; }

.fx-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.28fr);
  grid-template-areas: "head stage" "list stage";
  grid-template-rows: auto 1fr;
  column-gap: 64px;
  row-gap: 40px;
  align-items: start;
}
.fx-head { grid-area: head; display: grid; gap: 20px; justify-items: start; }
.fx-head .h2 { text-wrap: balance; }
.fx-list { grid-area: list; display: grid; gap: 6px; }
.fx-stage { grid-area: stage; position: relative; }

/* ---------- Feature list (reference language: grey card, tall icon tile,
   active card turns white and its tile fills with blue rising from below) ---------- */
.fx-list { gap: 12px; }
.fx-item {
  --tint: 47,107,255;
  position: relative;
  padding: 8px;
  border-radius: 22px;
  background: #F1F3F7;
  border: 1px solid var(--border);
  transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.fx-item[data-tone="teal"]  { --tint: 34,150,255; }
.fx-item[data-tone="ink"]   { --tint: 70,90,240; }
.fx-item[data-tone="amber"] { --tint: 104,104,255; }
.fx-item:not(.is-open):hover { background: #F6F7FA; }
.fx-item.is-open { background: var(--surface); border-color: var(--ink-150); box-shadow: var(--shadow-md); }

.fx-trigger {
  width: 100%;
  display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 20px; align-items: stretch;
  text-align: left; border-radius: 16px;
}
.fx-trigger:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }

.fx-tile {
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  min-height: 112px;
  border-radius: 16px;
  background: #E8EBF1;
  border: 1px solid rgba(16,24,48,.05);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.fx-tile::before { /* blue light rising from the bottom, only on the active card */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(var(--tint),0) 10%, rgba(var(--tint),.22) 55%, rgba(var(--tint),.85) 100%);
  opacity: 0; transition: opacity .4s ease;
}
.fx-item.is-open .fx-tile { background: #F3F6FF; }
.fx-item.is-open .fx-tile::before { opacity: 1; }
.fx-ic {
  position: relative; z-index: 1;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: linear-gradient(180deg, #FFFFFF, #F6F7FA);
  border: 1px solid var(--ink-150);
  box-shadow: 0 0 0 5px rgba(255,255,255,.55), 0 8px 18px -8px rgba(16,24,48,.35);
  color: var(--ink-600);
  transition: color .3s ease, box-shadow .3s ease;
}
.fx-ic .i { width: 24px; height: 24px; stroke-width: 1.1; }
.fx-item.is-open .fx-ic { color: rgb(var(--tint)); box-shadow: 0 0 0 5px rgba(255,255,255,.7), 0 10px 24px -8px rgba(var(--tint),.65); }

.fx-text { padding: 12px 0 14px; display: grid; align-content: center; gap: 8px; }
.fx-title { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.025em; color: var(--ink-950); }
.fx-desc { font-size: 15.5px; line-height: 1.55; color: var(--ink-500); }
.fx-arrow {
  align-self: start; margin: 10px 10px 0 0;
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--ink-150); background: var(--white);
  color: var(--ink-900); box-shadow: var(--shadow-xs);
  opacity: 0; transform: translateX(-4px); transition: opacity .3s ease, transform .3s ease;
}
.fx-arrow svg { width: 15px; height: 15px; }
.fx-item.is-open .fx-arrow { opacity: 1; transform: none; }

/* autoplay progress line */
.fx-bar { position: absolute; left: 132px; right: 22px; bottom: 10px; height: 2px; border-radius: 2px; overflow: hidden; background: var(--ink-100); opacity: 0; }
.fx-bar i { display: block; height: 100%; width: 0; background: rgb(var(--tint)); border-radius: inherit; }
.fx-item.is-open .fx-bar { opacity: 1; }
.fx-item.is-open .fx-bar i { animation: fxProgress var(--fx-dur, 7s) linear forwards; }
[data-accordion].is-paused .fx-bar i { animation-play-state: paused; }
[data-accordion].is-manual .fx-bar { display: none; }
@keyframes fxProgress { to { width: 100%; } }

/* ---------- Stage (scaled 640 × 560 canvas) in a white shell ---------- */
.fx-stage {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  border: 10px solid var(--white);
  outline: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: var(--white);
}
.fx-canvas { width: 640px; height: 680px; position: relative; transform-origin: 0 0; }

.fx-panel {
  --tint: 47,107,255;
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .45s ease, visibility 0s linear .45s;
  overflow: hidden;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(var(--tint),0) 38%, rgba(var(--tint),.16) 70%, rgba(var(--tint),.62) 100%),
    #F5F7FB;
}
.fx-panel.is-active { opacity: 1; visibility: visible; transition: opacity .45s ease; }
.fx-panel[data-tone="teal"]  { --tint: 34,150,255; }
.fx-panel[data-tone="ink"]   { --tint: 70,90,240; }
.fx-panel[data-tone="amber"] { --tint: 104,104,255; }

/* shared card + floating pop */
.fx-card, .fx-pop {
  position: absolute; z-index: 2;
  background: var(--white);
  border: 1px solid var(--ink-150);
  font-size: 12.5px; color: var(--ink-900);
}
.fx-card {
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 2px 4px rgba(16,24,48,.04), 0 24px 50px -12px rgba(16,24,48,.2);
}
.fx-pop {
  z-index: 3;
  border-radius: 14px;
  box-shadow: 0 2px 4px rgba(16,24,48,.05), 0 18px 40px -8px rgba(16,24,48,.22);
}
.fx-card small, .fx-pop small { display: block; color: var(--ink-400); font-size: 11px; }
.fx-card b, .fx-pop b { font-weight: 600; }

/* entrance: card rises, pops follow */
.fx-panel .fx-card { transform: translateY(14px); transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.fx-panel .fx-pop  { opacity: 0; transform: translateY(10px) scale(.97); transition: opacity .4s ease, transform .5s cubic-bezier(.2,.7,.2,1); }
.fx-panel.is-active .fx-card { transform: none; }
.fx-panel.is-active .fx-pop { opacity: 1; transform: none; transition-delay: .25s; }
.fx-panel.is-active .fx-pop + .fx-pop { transition-delay: .4s; }

/* ---------- 1 · Files ---------- */
.files-card { left: 52px; top: 72px; width: 430px; }
.fc-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.fc-head b { display: flex; align-items: center; gap: 7px; margin-top: 3px; font-size: 15px; letter-spacing: -0.01em; }
.fc-head b .i { color: var(--teal-500); }
.fc-head .mini-btn { height: 30px; font-size: 12px; }
.fc-cols { display: flex; justify-content: space-between; padding: 7px 10px; margin: 0 -6px 4px; border-radius: 8px; background: var(--ink-50); font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-400); }
.fc-row { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-top: 1px solid var(--ink-100); }
.fc-row:nth-of-type(3) { border-top: 0; }
.fc-row > div { flex: 1; min-width: 0; }
.fc-row b { display: block; font-size: 12.5px; font-weight: 500; }
.ft-img { background: linear-gradient(160deg, #FFC25A, #E08A00); }
.ft-zip { background: linear-gradient(160deg, #6B7389, #232A3D); }

.pop-upload { right: 28px; bottom: 54px; width: 262px; padding: 14px; }
.pu-top { display: flex; align-items: center; gap: 10px; }
.pu-top > div { flex: 1; }
.pu-top .ftype { width: 28px; height: 32px; font-size: 7.5px; }
.pu-pct { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--teal-600); }
.pu-bar { display: block; height: 6px; margin: 12px 0 10px; border-radius: 9px; background: var(--ink-100); overflow: hidden; }
.pu-bar i { display: block; height: 100%; width: 72%; border-radius: inherit; background: linear-gradient(90deg, var(--teal-400), var(--teal-500)); }
.fx-panel.is-active .pu-bar i { animation: puGrow 2.4s cubic-bezier(.3,.7,.3,1) both .3s; }
@keyframes puGrow { from { width: 18%; } }
.pu-foot { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-500); }
.pu-foot .i { color: var(--teal-600); }

.pop-share { left: 26px; bottom: 30px; width: 236px; padding: 12px 14px; display: grid; gap: 9px; }
.ps-row { display: flex; align-items: center; gap: 9px; color: var(--ink-600); }
.ps-row .av { --s: 22px; font-size: 8.5px; }
.ps-link { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; background: var(--ink-50); border: 1px solid var(--ink-100); font-size: 11px; color: var(--ink-600); white-space: nowrap; }
.ps-link em { margin-left: auto; font-style: normal; color: var(--amber-600); font-weight: 500; }

/* ---------- 2 · Messaging ---------- */
.msg-card { left: 70px; top: 40px; width: 452px; padding: 0; overflow: hidden; }
.mc-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--ink-100); }
.mc-head b { font-size: 14px; }
.mc-head .av { --s: 24px; font-size: 8.5px; }
.mc-day { display: flex; align-items: center; gap: 10px; padding: 12px 18px 2px; font-size: 10.5px; color: var(--ink-400); }
.mc-day::before, .mc-day::after { content: ""; flex: 1; height: 1px; background: var(--ink-100); }
.mc-msg { display: flex; gap: 10px; padding: 10px 18px 0; }
.mc-msg .av { --s: 28px; font-size: 10px; box-shadow: none; }
.mc-msg > div { max-width: 330px; }
.mc-meta { margin: 0 0 4px; font-size: 11px; color: var(--ink-400); display: flex; align-items: center; gap: 6px; }
.mc-meta b { color: var(--ink-900); font-size: 12px; }
.mc-meta .via { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 99px; background: var(--cobalt-50); color: var(--cobalt-600); font-size: 10px; }
.mc-bubble { margin: 0; padding: 9px 12px; border-radius: 4px 13px 13px 13px; background: var(--ink-50); border: 1px solid var(--ink-100); line-height: 1.45; }
.mc-msg.me { justify-content: flex-end; }
.mc-msg.me .mc-meta { justify-content: flex-end; }
.mc-msg.me .mc-bubble { border-radius: 13px 4px 13px 13px; background: var(--cobalt-500); border-color: var(--cobalt-500); color: var(--white); box-shadow: 0 6px 16px -6px rgba(47,107,255,.55); }
.mc-attach { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); font-size: 11.5px; }
.mc-typing { display: flex; align-items: center; gap: 8px; padding: 12px 18px 0; font-size: 11px; color: var(--ink-400); }
.mc-typing .av { --s: 20px; font-size: 7.5px; box-shadow: none; }
.dots { display: inline-flex; gap: 3px; padding: 6px 8px; border-radius: 99px; background: var(--ink-50); }
.dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-400); animation: dot 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
.mc-input { display: flex; align-items: center; justify-content: space-between; margin: 14px 14px 14px; padding: 6px 6px 6px 12px; border-radius: 11px; border: 1px solid var(--ink-150); color: var(--ink-400); box-shadow: var(--shadow-xs); }
.mc-input .mini-btn { height: 28px; font-size: 12px; }

.pop-read { left: 26px; top: 266px; padding: 8px 12px; display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-600); border-radius: 99px; }
.pop-read .i { color: var(--cobalt-500); }

/* ---------- 3 · Status ---------- */
.status-card { left: 60px; top: 56px; width: 404px; }
.sc-head { display: flex; align-items: flex-start; justify-content: space-between; }
.sc-head b { display: block; margin-top: 2px; font-size: 15px; }
.sc-ring { display: flex; align-items: center; gap: 14px; margin: 16px 0 6px; padding: 14px; border-radius: 14px; background: var(--ink-50); border: 1px solid var(--ink-100); }
.sc-ring svg { width: 64px; height: 64px; transform: rotate(-90deg); flex: none; }
.sc-ring circle { fill: none; stroke-width: 7; }
.sc-ring .track { stroke: var(--ink-150); }
.sc-ring .val { stroke: var(--cobalt-500); stroke-linecap: round; stroke-dasharray: 68 100; }
.fx-panel.is-active .sc-ring .val { animation: ringIn 1.4s cubic-bezier(.3,.7,.3,1) both .2s; }
@keyframes ringIn { from { stroke-dasharray: 0 100; } }
.sc-ring > div b { font-size: 22px; font-family: var(--font-display); letter-spacing: -0.02em; }
.sc-ring dl { margin: 0 0 0 auto; display: grid; gap: 6px; text-align: right; }
.sc-ring dt { font-size: 10.5px; color: var(--ink-400); }
.sc-ring dd { margin: 0; font-weight: 600; }
.sc-steps { list-style: none; margin: 10px 0 0; padding: 0; }
.sc-steps li { position: relative; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 9px 0; }
.sc-steps li::before { content: ""; position: absolute; left: 10px; top: 28px; bottom: -10px; width: 2px; background: var(--ink-150); }
.sc-steps li:last-child::before { display: none; }
.sc-steps li.done::before { background: var(--teal-500); }
.sc-steps .d { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink-200); background: var(--white); position: relative; z-index: 1; }
.sc-steps li.done .d { background: var(--teal-500); border-color: var(--teal-500); }
.sc-steps li.done .d::after { content: ""; position: absolute; left: 6px; top: 3px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.sc-steps li.now .d { border-color: var(--cobalt-500); box-shadow: 0 0 0 4px var(--cobalt-100); }
.sc-steps li.now .d::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--cobalt-500); }
.sc-steps b { font-weight: 500; }
.sc-steps li:not(.done):not(.now) b { color: var(--ink-500); }
.sc-steps li.now small { color: var(--amber-600); font-weight: 500; }

.pop-approve { right: 30px; top: 312px; width: 258px; padding: 12px 14px; display: flex; gap: 11px; align-items: center; }
.pop-approve .tick { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--teal-500); color: #fff; box-shadow: 0 6px 14px -4px rgba(18,174,155,.6); }
.pop-approve b { font-size: 13px; }
.pop-client { right: 56px; top: 92px; padding: 7px 12px; border-radius: 99px; display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 500; color: var(--ink-600); }
.pop-client .dot { width: 26px; height: 15px; border-radius: 99px; background: var(--teal-500); position: relative; }
.pop-client .dot::after { content: ""; position: absolute; right: 2px; top: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); }

/* ---------- 4 · Invoicing ---------- */
.inv-card { left: 92px; top: 52px; width: 330px; background: linear-gradient(180deg, #FFFFFF 0%, #FFFCF6 100%); }
.ic-head { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px dashed var(--ink-150); }
.ic-head b { display: block; margin-top: 2px; font-size: 15px; }
.ic-to { display: flex; justify-content: space-between; padding: 12px 0; font-size: 11.5px; color: var(--ink-400); }
.ic-to b { color: var(--ink-900); font-weight: 500; }
.ic-lines { display: grid; gap: 9px; padding: 12px; border-radius: 12px; background: var(--ink-50); border: 1px solid var(--ink-100); }
.ic-lines div { display: flex; justify-content: space-between; color: var(--ink-600); }
.ic-lines b { color: var(--ink-900); font-weight: 500; font-variant-numeric: tabular-nums; }
.ic-lines .tot { padding-top: 9px; border-top: 1px solid var(--ink-150); color: var(--ink-900); font-weight: 600; }
.ic-lines .tot b { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.ic-pay { display: flex; align-items: center; justify-content: center; height: 40px; margin-top: 14px; border-radius: 10px; background: var(--ink-950); color: #fff; font-weight: 600; font-size: 13px; box-shadow: 0 1px 0 rgba(255,255,255,.14) inset, 0 8px 18px -6px rgba(11,16,32,.5); }
.ic-methods { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.ic-methods span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--ink-150); font-size: 10.5px; color: var(--ink-500); }

.pop-paid { right: 22px; top: 372px; width: 236px; padding: 12px 14px; display: flex; align-items: center; gap: 11px; }
.pop-paid .coin { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; color: #fff; background: radial-gradient(circle at 35% 30%, var(--amber-400), var(--amber-600)); box-shadow: 0 0 0 4px var(--amber-50), 0 6px 14px -4px rgba(224,138,0,.6); }
.pop-paid b { font-size: 13px; }
.pop-remind { left: 40px; bottom: 56px; padding: 8px 12px; border-radius: 99px; display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-600); }
.pop-remind .i { color: var(--amber-600); }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .fx-grid { column-gap: 36px; }
  .fx-title { font-size: 19px; }
}
@media (max-width: 767px) {
  .features { padding: 72px 0 24px; }
  .fx-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "stage" "list";
    grid-template-rows: auto;
    row-gap: 28px;
  }
  .fx-stage { border-radius: var(--r-xl); }
  .fx-stage { position: relative; top: 0; border-width: 6px; border-radius: 22px; }
  .fx-panel { border-radius: 16px; }
  .fx-trigger { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }
  .fx-arrow { display: none; }
  .fx-tile { min-height: 0; border-radius: 13px; }
  .fx-ic { width: 44px; height: 44px; border-radius: 12px; }
  .fx-ic .i { width: 20px; height: 20px; }
  .fx-title { font-size: 19px; }
  .fx-desc { font-size: 14.5px; }
  .fx-bar { left: 94px; }
}
[data-accordion].is-offscreen .fx-bar i { animation-play-state: paused; }

/* ---------- Panels 5–6: the onboarding and engagement cards that used
   to sit in their own bento section, now part of this accordion. Their
   card styles stay in bento.css; here they are only placed and sized
   for the 640 × 680 stage. ---------- */
.fx-moved .bn-sharp, .fx-moved .bn-pop { transform-origin: top left; }
.fx-moved .onboard-card { left: 120px; top: 170px; transform: scale(1.32); }
.fx-moved .pop-deposit  { left: auto; right: 54px; top: 128px; transform: scale(1.25); transform-origin: top right; }
.fx-moved .activity-card { left: 74px; top: 150px; transform: scale(1.3); }
.fx-moved .pop-quiet    { left: auto; right: 34px; top: 486px; transform: scale(1.2); transform-origin: top right; }

/* ---------- Six items: a real accordion ----------
   Only the open item shows its description and tall tile; the rest
   collapse to one line, so the list stays about as tall as the stage.
   The stage stays pinned beside the list while it scrolls. */
.fx-trigger { grid-template-columns: 76px minmax(0, 1fr) auto; }
.fx-tile { min-height: 0; height: 60px; transition: height .4s cubic-bezier(.2,.7,.2,1), background-color .3s ease; }
.fx-item.is-open .fx-tile { height: 120px; }
.fx-text { align-self: center; }
.fx-desc { display: block; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .4s cubic-bezier(.2,.7,.2,1), opacity .25s ease, margin-top .4s ease; }
.fx-item.is-open .fx-desc { max-height: 8em; opacity: 1; margin-top: 6px; }
@media (min-width: 1024px) { .fx-stage { position: sticky; top: 104px; } }
@media (prefers-reduced-motion: reduce) { .fx-desc, .fx-tile { transition: none; } }
/* closed tiles get real breathing room: a 40px icon box in a 76 × 64 tile
   (12px above and below); the open item grows both back up */
.fx-tile { height: 64px; }
.fx-ic { width: 40px; height: 40px; border-radius: 12px; transition: width .4s cubic-bezier(.2,.7,.2,1), height .4s cubic-bezier(.2,.7,.2,1), border-radius .4s ease, box-shadow .3s ease, color .3s ease; }
.fx-ic .i { width: 18px; height: 18px; }
.fx-item.is-open .fx-ic { width: 54px; height: 54px; border-radius: 15px; }
.fx-item.is-open .fx-ic .i { width: 20px; height: 20px; }
@media (prefers-reduced-motion: reduce) { .fx-ic { transition: none; } }
