/* "איך זה עובד" בשלבים: שני רצפים (לופים, תזמון). כל שלב = כרטיס זכוכית עם מספר, המחשה קטנה וטקסט.
   ההמחשה מתנגנת פעם אחת כשהרצף נכנס למסך (steps.js מוסיף .play) ונשארת במצב הסופי. בלי JS: הכל במצב הסופי. */
.flows { display: grid; gap: clamp(40px, 5vw, 64px); margin-top: 32px }
.flow-h { display: flex; align-items: center; gap: 12px; font-size: clamp(20px, 2vw, 24px); margin-bottom: 18px }
.flow-h .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--logo-pink); box-shadow: 0 0 18px var(--logo-pink) }
.flow.sched .flow-h .dot { background: #93AFD6; box-shadow: 0 0 18px #93AFD6 }

.steps { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 16px; counter-reset: st }
.flow.sched .steps { --n: 3 }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 620px) { .steps { grid-template-columns: minmax(0, 1fr) } }

/* קו ההתקדמות שמחבר בין השלבים (מימין לשמאל, כיוון הקריאה) */
.steps::before { content: ''; position: absolute; top: 34px; inset-inline: 40px; height: 2px; border-radius: 2px; z-index: 0;
  background: linear-gradient(270deg, var(--logo-pink), var(--logo-lilac), #93AFD6); opacity: .55;
  transform-origin: right; transform: scaleX(1) }
.js .steps:not(.play)::before { transform: scaleX(0) }
.steps.play::before { transition: transform 1600ms cubic-bezier(.65, 0, .35, 1) }
@media (max-width: 1000px) { .steps::before { display: none } }

.step { position: relative; z-index: 1; display: grid; gap: 10px; align-content: start; padding: 20px; border-radius: var(--rad-xl) }
.st-n { counter-increment: st; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: 15px;
  background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--logo-lilac), 0 0 16px -2px rgba(189, 181, 236, 0.6) }
.st-n::before { content: counter(st) }
.step p { font-size: 17px; line-height: 1.5; font-weight: 600 }
.st-vis { position: relative; height: 156px; border-radius: var(--rad-lg); background: rgba(14, 15, 21, 0.5); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; display: grid; place-items: center; padding: 12px }

/* כניסת הכרטיסים: מדורגת, מתחילה כמעט גלויה (חוק הבית: שום תוכן לא מחכה מוסתר) */
.steps.play .step { animation: stIn 380ms var(--ease) backwards; animation-delay: calc(var(--i) * 90ms) }
@keyframes stIn { from { opacity: .7; transform: translateY(12px) } }

/* ---------- חלקים קטנים שחוזרים בהמחשות */
.chipx { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 700; background: rgba(255, 255, 255, 0.08); color: var(--ink); white-space: nowrap }
.chipx.ok { background: var(--green); color: var(--green-ink) }
.chipx.pk { background: var(--pink); color: var(--pink-ink) }
.chipx.bl { background: var(--blue); color: var(--blue-ink) }
.chipx.lv { background: var(--lav); color: var(--lav-ink) }

/* כל המחשה מוגדרת במצב הסופי. האנימציה (כשהרצף .play) מתחילה ממצב ההתחלה ונגמרת בו */
.steps.play .step .a { animation: var(--an) 600ms var(--ease) backwards; animation-delay: calc(var(--i) * 260ms + var(--d, 0ms) + 300ms) }
@keyframes aPop { from { opacity: 0; transform: scale(.6) } }
@keyframes aUp { from { opacity: 0; transform: translateY(14px) } }
@keyframes aFromR { from { opacity: 0; transform: translateX(26px) } }
@keyframes aFromL { from { opacity: 0; transform: translateX(-26px) } }
@keyframes aGrow { from { transform: scaleX(0) } }
@keyframes aType { from { width: 0 } }

/* 1. חיבור: אייקוני רשתות מתחברים ל-Loop */
.v-connect { display: flex; align-items: center; gap: 6px; margin-bottom: 28px }
.v-connect .net { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px }
.v-connect .net.ig { background: linear-gradient(135deg, #F2A07B, #E1306C 55%, #8A3AB9) }
.v-connect .net.fb { background: #3B6FD8 }
.v-connect .wire { width: 18px; height: 2px; background: linear-gradient(90deg, var(--logo-lilac), var(--logo-pink)); transform-origin: right }
.v-connect .hub { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: #15131F; box-shadow: 0 0 24px -4px rgba(189, 181, 236, 0.7) }
.v-connect .hub img { width: 36px; height: 36px }
.v-connect + .chipx { position: absolute; bottom: 14px; inset-inline: 0; margin-inline: auto; width: fit-content }

/* 2. מילת מפתח + הודעה */
.v-kw { display: grid; gap: 8px; width: 100% }
.v-kw .field { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14px; color: var(--ink-2) }
.v-kw .typed { display: inline-block; overflow: hidden; white-space: nowrap; width: 3.4em; color: var(--ink); font-weight: 800; border-inline-end: 2px solid var(--logo-lilac) }
.steps.play .v-kw .typed { animation: aType 700ms steps(5) backwards; animation-delay: calc(var(--i) * 260ms + 500ms) }
.v-kw .msg { justify-self: start; padding: 7px 12px; border-radius: 14px 14px 14px 4px; background: var(--cta); color: var(--cta-ink); font-size: 13.5px; font-weight: 700 }

/* 3. תגובה → פרטי */
.v-dm { display: grid; gap: 6px; width: 100% }
.v-dm { gap: 4px }
.v-dm .b { width: fit-content; max-width: 92%; padding: 5px 11px; border-radius: 14px; font-size: 13px; font-weight: 600; line-height: 1.35 }
.v-dm .b.them { background: rgba(255, 255, 255, 0.08); border-end-start-radius: 4px }
.v-dm .b.me { justify-self: end; background: var(--cta); color: var(--cta-ink); border-end-end-radius: 4px }
.v-dm small { display: block; font-size: 11.5px; opacity: .75 }
.v-dm .bolt { justify-self: center; font-size: 12px; font-weight: 800; color: var(--pink-ink) }

/* 4. תיבה */
.v-inbox { display: grid; gap: 6px; width: 100% }
.v-inbox .row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); font-size: 13px; font-weight: 600 }
.v-inbox .av { width: 22px; height: 22px; border-radius: 50%; flex: none }
.v-inbox .row .ln { flex: 1; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.12) }
.v-inbox .row b { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--pink); color: var(--pink-ink) }

/* תזמון 1: העלאה + טקסט */
.v-up { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; align-items: center; width: 100% }
.v-up .img { height: 92px; border-radius: 12px; background: linear-gradient(160deg, rgba(216, 167, 177, 0.55), rgba(131, 149, 167, 0.5)); position: relative; overflow: hidden }
.v-up .img::after { content: ''; position: absolute; inset-inline: 8px; bottom: 8px; height: 5px; border-radius: 4px; background: #fff; transform-origin: right }
.steps.play .v-up .img::after { animation: aGrow 900ms var(--ease) backwards; animation-delay: calc(var(--i) * 260ms + 450ms) }
.v-up .lines { display: grid; gap: 7px }
.v-up .lines i { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.14) }
.v-up .lines i:nth-child(2) { width: 80% } .v-up .lines i:nth-child(3) { width: 55% }
.v-up .chipx { justify-self: start; font-size: 12px; padding: 4px 10px }

/* תזמון 2: יום ושעה */
.v-cal { display: grid; gap: 8px; justify-items: center }
.v-cal .grid { display: grid; grid-template-columns: repeat(7, 22px); gap: 4px }
.v-cal .grid i { height: 18px; border-radius: 5px; background: rgba(255, 255, 255, 0.07) }
.v-cal .grid i.on { background: var(--logo-lilac); box-shadow: 0 0 14px rgba(189, 181, 236, 0.8) }
.v-cal .row { display: flex; gap: 6px }

/* תזמון 3: עלה */
.v-pub { display: grid; gap: 8px; width: 100% }
.v-pub .card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, 0.06) }
.v-pub .th { width: 40px; height: 40px; border-radius: 9px; background: linear-gradient(160deg, rgba(131, 160, 196, 0.7), rgba(189, 181, 236, 0.6)); flex: none }
.v-pub .ln { flex: 1; display: grid; gap: 6px }
.v-pub .ln i { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.14) }
.v-pub .ln i + i { width: 60% }
.v-pub .week { display: flex; gap: 4px; justify-content: center }
.v-pub .week span { width: 26px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.1) }
.v-pub .week span.on { background: #93AFD6 }

@media (prefers-reduced-motion: reduce) {
  .js .steps:not(.play)::before { transform: none }
}

/* ---------- פריסה: בכל רצף טקסט השלבים בצד אחד וצילום מסך אמיתי בצד השני, לסירוגין (לא עוד שורת כרטיסים).
   השלבים ברשימה אנכית: מספר + משפט. ההמחשות המצוירות הקטנות מוסתרות, הצילום האמיתי מסביר במקומן */
.flow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-areas: "h h" "steps shot"; gap: 8px clamp(24px, 4vw, 56px); align-items: center }
.flow.sched { grid-template-areas: "h h" "shot steps" }
.flow-h { grid-area: h }
.flow .steps { grid-area: steps; grid-template-columns: minmax(0, 1fr); gap: 6px }
.flow .steps::before { top: 26px; bottom: 26px; inset-inline-start: 34px; inset-inline-end: auto; width: 2px; height: auto; transform-origin: top; background: linear-gradient(180deg, var(--logo-pink), var(--logo-lilac), #93AFD6) }
.js .flow .steps:not(.play)::before { transform: scaleY(0) }
.flow .steps.play::before { transform: scaleY(1) }
.flow .step { grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 16px; padding: 14px 20px }
.flow .st-vis { display: none }
.flow-shot { grid-area: shot; margin: 0; border-radius: var(--rad-xl); overflow: hidden; background: #14131B; border: 1px solid var(--line); box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.9), 0 0 90px -40px rgba(189, 181, 236, 0.35) }
.flow-shot img { width: 100%; height: auto; display: block }
@media (max-width: 1000px) {
  .flow, .flow.sched { grid-template-columns: minmax(0, 1fr); grid-template-areas: "h" "shot" "steps" }
  .flow .steps::before { display: block }
}
