/* The landing's "how it works" diagram, played on a real coin: the CA types in → three sources answer with their real
   numbers → the bevr core builds → the site assembles in a browser with its link and share card. Precise lines, data
   moving along them, one stage at a time (js/flow.mjs runs the stages). With Motion off it shows the finished state. */
.flow { position: relative; margin-top: 34px; display: grid; grid-template-columns: minmax(170px, 236px) 70px minmax(200px, 252px) 70px 128px 56px minmax(220px, 1fr); align-items: center; padding: 30px 26px; border-radius: 28px; background: var(--card); box-shadow: var(--shadow); }
.fx-lab { display: flex; align-items: center; gap: 8px; font: 700 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; transition: color .3s; }
.fx-lab b { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--paper2); color: var(--muted); font: 800 12px var(--text); letter-spacing: 0; transition: background .3s, color .3s; }
.flow.s1 .fx-in .fx-lab, .flow.s2 .fx-core .fx-lab, .flow.s4 .fx-out .fx-lab { color: var(--ink); }
.flow.s1 .fx-in .fx-lab b, .flow.s2 .fx-core .fx-lab b, .flow.s4 .fx-out .fx-lab b { background: var(--ink); color: #fff; }

/* 1 · the CA */
.fx-box { display: flex; align-items: center; min-height: 46px; padding: 0 12px; border-radius: 13px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font: 500 12px var(--mono); color: var(--ink); overflow: hidden; transition: box-shadow .3s; }
.flow.s1 .fx-box { box-shadow: inset 0 0 0 2px var(--ink); }
.fx-box code { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-caret { width: 2px; height: 16px; background: var(--tang); margin-left: 2px; flex: none; opacity: 0; }
body.moving .flow.s1:not(.s2) .fx-caret { opacity: 1; animation: caret .9s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.fx-btn { margin-top: 8px; text-align: center; padding: 11px; border-radius: 12px; background: var(--tang); color: #fff; font: 700 14px var(--text); transition: transform .15s, background .3s; }
.flow.s2 .fx-btn { background: var(--tang2); }

/* wires: thin lines, data dots moving along them while their stage plays */
.fx-w { position: relative; height: 290px; }
.fx-w svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fx-w path { fill: none; stroke: var(--line); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .4s; }
.flow.s2 .w1 path, .flow.s3 .w2 path, .flow.s4 .w3 path { stroke: #F6C9AF; }
.pk { position: absolute; left: 0; top: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--tang); box-shadow: 0 0 0 4px rgba(254,115,54,.16); offset-rotate: 0deg; opacity: 0; }
body.moving .flow.s2:not(.s3) .w1 .pk, body.moving .flow.s3:not(.s4) .w2 .pk, body.moving .flow.s4:not(.s5) .w3 .pk { animation: pk 1.1s cubic-bezier(.5,0,.5,1) infinite; }
.pk:nth-of-type(2) { animation-delay: .18s !important; } .pk:nth-of-type(3) { animation-delay: .36s !important; }
@keyframes pk { 0% { offset-distance: 0%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
.fx-w .v { display: none; }

/* the three sources */
.fx-src { display: grid; grid-template-rows: repeat(3, 86px); gap: 16px; }
.fx-node.s { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 16px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); transition: background .4s, box-shadow .4s; }
.fx-node.s .ic { grid-row: span 2; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.fx-node.s .ic svg { width: 20px; height: 20px; }
.fx-node.s b { font: 800 14.5px var(--display); letter-spacing: -.01em; }
.fx-node.s small { font: 500 11px var(--text); color: var(--muted); }
.fx-node.s em { grid-column: 1 / -1; margin-top: 8px; font: 600 11.5px var(--mono); font-style: normal; color: var(--green); display: flex; align-items: center; gap: 6px; opacity: 0; transform: translateY(4px); transition: opacity .35s, transform .35s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-node.s em::before { content: "✓"; width: 16px; height: 16px; border-radius: 5px; display: grid; place-items: center; background: var(--greenbg); font-size: 10px; flex: none; }
.flow.s2 .fx-node.s { background: #fff; box-shadow: inset 0 0 0 1.5px #F6C9AF, 0 10px 22px -16px rgba(16,24,40,.4); }
.flow.s2 .fx-node.s em { opacity: 1; transform: none; }
.flow.s2 .fx-node.s, .flow.s2 .fx-node.s em { transition-delay: calc(.9s + var(--i) * .35s); }

/* the core: bevr */
.fx-core { display: grid; justify-items: center; text-align: center; }
.fx-core .fx-lab { margin: 12px 0 0; justify-content: center; white-space: nowrap; }
.core { position: relative; width: 84px; height: 84px; display: grid; place-items: center; }
.core img { width: 60px; height: 60px; border-radius: 18px; box-shadow: 0 10px 24px -10px rgba(254,115,54,.7); }
.core svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.core circle { fill: none; stroke: var(--line); stroke-width: 3; }
.core circle.arc { stroke: var(--tang); stroke-dasharray: 60 230; stroke-linecap: round; opacity: 0; transform-origin: 50% 50%; transition: opacity .3s; }
body.moving .flow.s3:not(.s4) .core circle.arc { opacity: 1; animation: spin 1.1s linear infinite; }
.flow.s4 .core circle.done { stroke: var(--green); }
@keyframes spin { to { transform: rotate(360deg); } }
.fx-core small { margin-top: 4px; font: 600 11px var(--mono); color: var(--muted); min-height: 15px; }

/* 3 · the site, assembling */
.fx-br { border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 24px 40px -28px rgba(16,24,40,.5); overflow: hidden; }
.fx-br .bar { display: flex; align-items: center; gap: 5px; padding: 8px 10px; background: var(--paper2); }
.fx-br .bar i { width: 7px; height: 7px; border-radius: 50%; background: rgba(16,24,40,.14); flex: none; }
.fx-br .bar span { flex: 1; min-width: 0; margin-left: 6px; padding: 4px 8px; border-radius: 7px; background: #fff; font: 500 10.5px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 22px; }
.fx-br .bar .live { font: 700 10px var(--mono); font-style: normal; color: var(--green); opacity: 0; transition: opacity .3s; flex: none; }
.flow.s5 .fx-br .bar .live { opacity: 1; }
.pg { padding: 9px; display: grid; gap: 7px; min-height: 196px; background: #F6F5F2; }
.pg .b { opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s; transition-delay: calc(var(--k) * .28s); }
.flow.s4 .pg .b { opacity: 1; transform: none; }
.pg .fh { --k: 0; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--c); color: var(--on); }
.pg .fh img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px rgba(255,255,255,.25); background: rgba(255,255,255,.2); }
.pg .fh b { display: block; font: 800 17px var(--display); letter-spacing: -.03em; }
.pg .fh small { font: 600 10px var(--mono); opacity: .85; }
.pg .row { --k: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pg .row span { padding: 6px 8px; border-radius: 9px; background: #fff; box-shadow: 0 0 0 1px #ECE9E2; font: 600 9px var(--text); color: var(--muted); }
.pg .row b { display: block; font: 800 13px var(--display); color: var(--ink); }
.pg .chart { --k: 2; height: 46px; border-radius: 9px; background: #fff; box-shadow: 0 0 0 1px #ECE9E2; padding: 4px 6px; }
.pg .chart svg { width: 100%; height: 100%; display: block; }
.pg .chart path { fill: none; stroke: var(--c); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 600; stroke-dashoffset: 600; transition: stroke-dashoffset 1.4s ease .9s; }
.flow.s4 .pg .chart path { stroke-dashoffset: 0; }
.pg .ca { --k: 3; display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 9px; border-radius: 9px; background: #fff; box-shadow: 0 0 0 1px #ECE9E2; font: 500 9px var(--mono); color: var(--muted); }
.pg .ca i { font: 700 9px var(--text); font-style: normal; padding: 3px 7px; border-radius: 6px; background: var(--c); color: var(--on); }
.fx-out { position: relative; }
.fx-card { position: absolute; right: -10px; bottom: -34px; width: 168px; display: flex; align-items: center; gap: 8px; padding: 9px; border-radius: 12px; background: var(--c); color: var(--on); box-shadow: 0 18px 30px -14px rgba(16,24,40,.5); opacity: 0; transform: translateY(14px) rotate(-3deg); transition: opacity .5s, transform .5s; }
.flow.s5 .fx-card { opacity: 1; transform: rotate(-3deg); }
.fx-card img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.fx-card b { display: block; font: 800 13px var(--display); }
.fx-card small { font: 600 9px var(--text); opacity: .85; }
.fx-card::after { content: "share card"; position: absolute; right: 8px; top: -9px; font: 700 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; background: var(--ink); color: #fff; }

/* the three steps under the diagram, lit as the diagram plays them */
.fx-steps { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fx-steps > div { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 2px 12px; align-items: center; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.6); box-shadow: inset 0 0 0 1px var(--line); transition: background .35s, box-shadow .35s; }
.fx-steps > div.on { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }
.fx-steps img { grid-row: span 2; width: 64px; height: auto; }
.fx-steps b { font: 800 16px var(--display); letter-spacing: -.02em; }
.fx-steps span { font-size: 13.5px; color: var(--muted); line-height: 1.4; }

/* small diagrams inside the claim and edit cards */
.mflow { margin-top: 16px; display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 8px; }
.mflow .m { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font: 700 12px var(--text); white-space: nowrap; }
.mflow .m svg { width: 16px; height: 16px; flex: none; }
.mflow .m small { font: 500 10.5px var(--mono); color: var(--muted); }
.mflow .ln { position: relative; height: 2px; background: var(--line); border-radius: 2px; }
.mflow .ln::after { content: ""; position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--tang); opacity: 0; }
body.moving .mflow .ln::after { animation: mln 3.6s ease-in-out infinite; }
body.moving .mflow .ln.l2::after { animation-delay: 1.2s; }
@keyframes mln { 0% { left: 0; opacity: 0; } 8% { opacity: 1; } 30% { left: calc(100% - 8px); opacity: 1; } 36%, 100% { left: calc(100% - 8px); opacity: 0; } }
.mflow .m.ok { color: var(--green); background: var(--greenbg); box-shadow: none; }
body.moving .mflow .m.ok { animation: okpulse 3.6s ease-in-out infinite; animation-delay: 2.2s; }
@keyframes okpulse { 0%, 100% { transform: none; } 6% { transform: scale(1.06); } 14% { transform: none; } }
.recolor { margin-top: 16px; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.recolor .site { height: 74px; border-radius: 14px; padding: 12px; display: flex; align-items: center; gap: 10px; color: #fff; background: #2b7ff5; }
body.moving .recolor .site { animation: recol 9s steps(1) infinite; }
@keyframes recol { 0% { background: #2b7ff5; } 25% { background: #ff6fb1; } 50% { background: #3bc297; } 75% { background: #7c5cff; } }
.recolor .site svg { width: 40px; height: 40px; flex: none; }
.recolor .site b { font: 800 16px var(--display); } .recolor .site small { display: block; font: 600 10px var(--mono); opacity: .85; }
.recolor .stamp { font: 700 11px var(--mono); color: var(--green); background: var(--greenbg); padding: 7px 10px; border-radius: 10px; white-space: nowrap; }
body.moving .recolor .stamp { animation: okpulse 2.25s ease-in-out infinite; }

@media (max-width: 1120px) {
  .flow { grid-template-columns: 1fr; padding: 22px 16px 54px; gap: 0; }
  .fx-w { height: 40px; }
  .fx-w svg, .fx-w .pk { display: none; }
  .fx-w .v { display: block; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 2px; margin-left: -1px; background: var(--line); border-radius: 2px; overflow: hidden; }
  .flow.s2 .w1 .v, .flow.s3 .w2 .v, .flow.s4 .w3 .v { background: #F6C9AF; }
  .fx-w .v::after { content: ""; position: absolute; left: -3px; top: -8px; width: 8px; height: 8px; border-radius: 50%; background: var(--tang); opacity: 0; }
  body.moving .flow.s2:not(.s3) .w1 .v::after, body.moving .flow.s3:not(.s4) .w2 .v::after, body.moving .flow.s4:not(.s5) .w3 .v::after { animation: vpk .8s linear infinite; }
  .fx-w .v { overflow: visible; }
  .fx-src { grid-template-rows: none; grid-template-columns: 1fr; gap: 8px; }
  .fx-node.s { grid-template-columns: 30px 1fr auto; grid-template-rows: auto; padding: 9px 10px; }
  .fx-node.s .ic { grid-row: auto; width: 30px; height: 30px; }
  .fx-node.s small { display: none; }
  .fx-node.s em { grid-column: auto; margin: 0; }
  .fx-core .fx-lab { margin-top: 8px; }
  .fx-card { right: 8px; bottom: -40px; }
  .fx-steps { grid-template-columns: 1fr; }
  .mflow { grid-template-columns: 1fr; justify-items: start; gap: 6px; }
  .mflow .ln { width: 2px; height: 16px; margin-left: 18px; }
  .mflow .ln::after { display: none; }
}
@keyframes vpk { 0% { top: -8px; opacity: 0; } 20% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
body:not(.moving) .pk, body:not(.moving) .fx-w .v::after { display: none; }
