/* ============================================================
   Wasool marketing site — animated product moments.
   Each one re-creates a real Wasool screen (collect, KYC scan,
   signing, WhatsApp alert, application flow) and plays when it
   scrolls into view (.play is added by main.js). Everything
   settles to a still, readable frame with reduced motion.
   ============================================================ */

/* ---------- Hero: phone that cycles through real moments ---------- */
.hero-wrap { position: relative; display: flex; justify-content: center; }
.hero-glow { position: absolute; inset: 8% 6%; background: radial-gradient(closest-side, rgba(192,138,46,.28), transparent 70%); filter: blur(10px); animation: glow 6s ease-in-out infinite; z-index: 0; }
@keyframes glow { 0%,100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.08); opacity: 1; } }
.hero-wrap .phone-frame { z-index: 1; animation: floaty 7s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
.scenes { position: relative; height: 380px; margin-top: 18px; }
.scene { position: absolute; inset: 0; opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.scene.on { opacity: 1; transform: none; }
.scene-cap { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 8px; }
.scene-dots { display: flex; gap: 6px; justify-content: center; position: absolute; bottom: 6px; left: 0; right: 0; }
.scene-dots i { width: 6px; height: 6px; border-radius: 6px; background: var(--line); transition: width .3s, background .3s; }
.scene-dots i.on { width: 18px; background: var(--gold); }
.float-chip { position: absolute; z-index: 2; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: .78rem; font-weight: 600; color: var(--navy); box-shadow: 0 12px 30px -12px rgba(22,40,61,.35); display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.float-chip.c1 { left: -4%; top: 16%; animation: chipA 6s ease-in-out infinite; }
.float-chip.c2 { right: -6%; top: 46%; animation: chipB 7s ease-in-out infinite; }
.float-chip.c3 { left: 2%; bottom: 10%; animation: chipA 8s ease-in-out infinite reverse; }
@keyframes chipA { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes chipB { 0%,100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
@media (max-width: 860px) { .float-chip.c1 { left: 0; } .float-chip.c2 { right: 0; } }
@media (max-width: 420px) { .float-chip { display: none; } }

/* ---------- Ticker of capabilities ---------- */
.ticker { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; padding: 14px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; gap: 40px; width: max-content; animation: tick 40s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { font-size: .92rem; font-weight: 600; color: var(--navy); white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.ticker-track span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- Counters ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 2.6rem; color: var(--navy); line-height: 1; }
.stat span { font-size: .88rem; color: var(--slate-soft); }

/* ---------- Application → disbursal journey ---------- */
.flow { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; padding-top: 10px; }
.flow-line { position: absolute; left: 8%; right: 8%; top: 38px; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.flow-line i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--green)); transition: width 3.4s cubic-bezier(.4,0,.2,1); }
.flow.play .flow-line i { width: 100%; }
.flow-step { position: relative; text-align: center; opacity: .35; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.flow.play .flow-step { opacity: 1; transform: none; }
.flow.play .flow-step:nth-child(2) { transition-delay: .1s; } .flow.play .flow-step:nth-child(3) { transition-delay: .65s; }
.flow.play .flow-step:nth-child(4) { transition-delay: 1.2s; } .flow.play .flow-step:nth-child(5) { transition-delay: 1.75s; }
.flow.play .flow-step:nth-child(6) { transition-delay: 2.3s; } .flow.play .flow-step:nth-child(7) { transition-delay: 2.85s; }
.flow-ic { width: 58px; height: 58px; margin: 0 auto 10px; border-radius: 18px; background: #fff; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; position: relative; z-index: 1; transition: border-color .4s, box-shadow .4s, transform .4s; }
.flow.play .flow-ic { border-color: var(--gold); box-shadow: 0 10px 24px -10px rgba(192,138,46,.6); }
.flow-step b { display: block; color: var(--navy); font-size: .95rem; margin-bottom: 4px; }
.flow-step span { font-size: .8rem; color: var(--slate-soft); display: block; }
@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; gap: 0; }
  .flow-line { left: 28px; right: auto; top: 10px; bottom: 10px; width: 3px; height: auto; }
  .flow-line i { width: 100%; height: 0; transition: height 3.4s cubic-bezier(.4,0,.2,1); }
  .flow.play .flow-line i { height: 100%; width: 100%; }
  .flow-step { display: grid; grid-template-columns: 58px 1fr; gap: 14px; text-align: left; align-items: center; padding: 8px 0; }
  .flow-ic { margin: 0; }
}

/* ---------- Aadhaar QR scan ---------- */
.scan { position: relative; background: linear-gradient(140deg, #fff 0%, #FFF8EA 100%); border: 1px solid var(--line); border-radius: 16px; padding: 16px; max-width: 340px; margin: 0 auto; overflow: hidden; box-shadow: 0 20px 40px -24px rgba(22,40,61,.35); }
.scan-top { display: flex; justify-content: space-between; align-items: center; font-size: .72rem; font-weight: 700; color: var(--slate-soft); letter-spacing: .05em; text-transform: uppercase; }
.scan-body { display: grid; grid-template-columns: 70px 1fr 74px; gap: 12px; align-items: center; margin-top: 12px; }
.scan-photo { width: 70px; height: 84px; border-radius: 8px; background: linear-gradient(180deg, #D9CFB8, #BFB194); position: relative; overflow: hidden; }
.scan-photo::after { content: ""; position: absolute; left: 50%; top: 18px; width: 30px; height: 30px; margin-left: -15px; border-radius: 50%; background: #A8987A; box-shadow: 0 34px 0 10px #A8987A; }
.scan-lines i { display: block; height: 7px; border-radius: 4px; background: var(--paper-2); margin: 6px 0; }
.scan-lines i:nth-child(1) { width: 80%; background: #E4DCC9; } .scan-lines i:nth-child(2) { width: 55%; } .scan-lines i:nth-child(3) { width: 70%; }
.scan-qr { width: 74px; height: 74px; border-radius: 6px; position: relative; background:
  #fff; padding: 3px; }
.scan-num { margin-top: 12px; font-family: ui-monospace, Menlo, monospace; font-size: 1rem; letter-spacing: .12em; color: var(--navy); font-weight: 700; }
.scan-num .mask { color: var(--slate-soft); }
.scan-line { position: absolute; left: 0; right: 0; height: 3px; top: 30px; background: linear-gradient(90deg, transparent, var(--gold), transparent); box-shadow: 0 0 18px 4px rgba(192,138,46,.5); opacity: 0; }
.scan.play .scan-line { animation: scanmove 2.2s ease-in-out 2; }
@keyframes scanmove { 0% { top: 20px; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 150px; opacity: 0; } }
.scan-ok { position: absolute; right: 12px; bottom: 12px; background: var(--green); color: #fff; font-size: .72rem; font-weight: 800; padding: 6px 10px; border-radius: 8px; transform: scale(0) rotate(-8deg); }
.scan.play .scan-ok { animation: pop .5s cubic-bezier(.34,1.56,.64,1) 4.4s forwards; }
@keyframes pop { to { transform: scale(1) rotate(-4deg); } }
.scan .mask { display: inline-block; }
.scan.play .mask { animation: maskin .4s ease 4.6s both; }
@keyframes maskin { from { filter: blur(4px); opacity: .2; } to { filter: none; opacity: 1; } }

/* ---------- Signature drawn on screen ---------- */
.sig-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; max-width: 360px; margin: 0 auto; box-shadow: 0 20px 40px -24px rgba(22,40,61,.35); }
.sig-pad { border: 2px dashed #CFC6B2; border-radius: 12px; height: 120px; position: relative; margin: 10px 0; }
.sig-pad svg { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
.sig-pad path { fill: none; stroke: var(--navy); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 900; stroke-dashoffset: 900; }
.sig-card.play .sig-pad path { animation: draw 2.4s ease-in-out .3s forwards; }
.sig-card.play .sig-pad path + path { animation-delay: 2.4s; animation-duration: .7s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sig-line { position: absolute; left: 14px; right: 14px; bottom: 26px; border-bottom: 1px solid #E3DCC8; }
.sig-ok { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--green); font-weight: 700; opacity: 0; transform: translateY(6px); transition: all .4s ease 3.2s; }
.sig-card.play .sig-ok { opacity: 1; transform: none; }
.sig-meta { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: .74rem; margin-top: 8px; color: var(--slate); }
.sig-meta span { color: var(--slate-soft); }
.sig-meta > * { opacity: 0; transition: opacity .3s ease; }
.sig-card.play .sig-meta > * { opacity: 1; }
.sig-card.play .sig-meta > :nth-child(n+3) { transition-delay: 3.5s; } .sig-card.play .sig-meta > :nth-child(n+5) { transition-delay: 3.7s; }
.sig-card.play .sig-meta > :nth-child(n+7) { transition-delay: 3.9s; } .sig-card.play .sig-meta > :nth-child(n+9) { transition-delay: 4.1s; }
.sig-card.play .sig-meta > :nth-child(-n+2) { transition-delay: 3.3s; }

/* ---------- WhatsApp alert ---------- */
.wa { background: #E8DFD2; border-radius: 18px; padding: 14px; max-width: 340px; margin: 0 auto; box-shadow: 0 20px 40px -24px rgba(22,40,61,.35); }
.wa-head { display: flex; align-items: center; gap: 10px; background: #0F5E54; color: #fff; margin: -14px -14px 12px; padding: 12px 14px; border-radius: 18px 18px 0 0; font-weight: 700; font-size: .9rem; }
.wa-head small { display: block; font-weight: 400; font-size: .72rem; opacity: .8; }
.wa-av { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(155deg, var(--gold), var(--gold-deep)); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.wa-b { background: #fff; border-radius: 4px 12px 12px 12px; padding: 9px 11px 6px; font-size: .8rem; line-height: 1.4; color: #1C1C1C; margin-bottom: 8px; max-width: 92%; opacity: 0; transform: translateY(10px) scale(.96); transform-origin: left top; }
.wa-b small { display: block; text-align: right; font-size: .66rem; color: #8C8C8C; margin-top: 2px; }
.wa.play .wa-b { animation: bub .45s cubic-bezier(.2,.9,.3,1.2) forwards; }
.wa.play .wa-b.b2 { animation-delay: 1.6s; } .wa.play .wa-b.b3 { animation-delay: 4.8s; }
@keyframes bub { to { opacity: 1; transform: none; } }
.wa-typing { display: inline-flex; gap: 4px; background: #fff; border-radius: 12px; padding: 9px 12px; margin-bottom: 8px; }
.wa-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9A9A9A; animation: dot 1s infinite; }
.wa-typing i:nth-child(2) { animation-delay: .15s; } .wa-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%,100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-3px); opacity: 1; } }
.wa.play .wa-typing { animation: hideT 0s linear 4.6s forwards; }
@keyframes hideT { to { display: none; height: 0; padding: 0; margin: 0; opacity: 0; } }

/* ---------- Checklist ticking ---------- */
.ck { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; max-width: 360px; margin: 0 auto; box-shadow: 0 20px 40px -24px rgba(22,40,61,.35); }
.ck-h { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--slate-soft); margin: 8px 0 4px; }
.ck-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #F3EEE3; font-size: .86rem; color: var(--navy); }
.ck-row small { display: block; font-size: .7rem; color: var(--slate-soft); }
.ck-ic { width: 20px; height: 20px; border-radius: 50%; background: #F1EEE5; flex: none; position: relative; }
.ck-ic::after { content: "✓"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .7rem; font-weight: 800; transform: scale(0); }
.ck.play .ck-ic { animation: ckbg .3s ease forwards; }
.ck.play .ck-ic::after { animation: pop .35s cubic-bezier(.34,1.56,.64,1) forwards; }
@keyframes ckbg { to { background: var(--green); } }
.ck.play .ck-row.r2 .ck-ic, .ck.play .ck-row.r2 .ck-ic::after { animation-delay: .4s; }
.ck.play .ck-row.r3 .ck-ic, .ck.play .ck-row.r3 .ck-ic::after { animation-delay: .8s; }
.ck.play .ck-row.r4 .ck-ic, .ck.play .ck-row.r4 .ck-ic::after { animation-delay: 1.2s; }
.ck.play .ck-row.r5 .ck-ic, .ck.play .ck-row.r5 .ck-ic::after { animation-delay: 1.6s; }
.ck-row.pending .ck-ic, .ck-row.pending .ck-ic::after { animation: none !important; }

/* ---------- Agreement pages fanning out ---------- */
.docs-fan { position: relative; height: 300px; max-width: 360px; margin: 0 auto; }
.doc-pg { position: absolute; left: 50%; top: 10px; width: 210px; height: 270px; margin-left: -105px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 14px; box-shadow: 0 16px 30px -18px rgba(22,40,61,.4); transition: transform .9s cubic-bezier(.2,.8,.2,1); font-size: .62rem; color: var(--slate); }
.doc-pg h5 { margin: 0 0 6px; font-family: var(--serif); color: var(--navy); font-size: .85rem; }
.doc-pg i { display: block; height: 5px; border-radius: 3px; background: var(--paper-2); margin: 5px 0; }
.doc-pg i.s { width: 60%; } .doc-pg i.ta { background: #EFE6D2; width: 85%; }
.doc-pg .sg { position: absolute; left: 14px; right: 14px; bottom: 16px; border-top: 1px solid #999; padding-top: 3px; font-size: .55rem; text-align: center; }
.doc-pg .stmp { position: absolute; right: 12px; top: 40px; width: 34px; height: 38px; border: 1px dashed #999; font-size: .45rem; display: flex; align-items: center; justify-content: center; text-align: center; color: #888; }
.docs-fan.play .doc-pg.p1 { transform: translateX(-95px) rotate(-9deg); }
.docs-fan.play .doc-pg.p2 { transform: translateX(-30px) rotate(-3deg); }
.docs-fan.play .doc-pg.p3 { transform: translateX(35px) rotate(3deg); }
.docs-fan.play .doc-pg.p4 { transform: translateX(95px) rotate(9deg); }
@media (max-width: 420px) { .docs-fan.play .doc-pg.p1 { transform: translateX(-60px) rotate(-8deg); } .docs-fan.play .doc-pg.p4 { transform: translateX(60px) rotate(8deg); } }

/* ---------- Reports bars growing ---------- */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 10px 6px 0; border-bottom: 2px solid var(--line); }
.bars i { flex: 1; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--gold), var(--gold-deep)); height: 0; transition: height 1s cubic-bezier(.2,.8,.2,1); }
.bars i.g { background: linear-gradient(180deg, #49A57E, var(--green)); }
.bars.play i:nth-child(1) { height: 42%; } .bars.play i:nth-child(2) { height: 58%; transition-delay: .1s; } .bars.play i:nth-child(3) { height: 50%; transition-delay: .2s; }
.bars.play i:nth-child(4) { height: 72%; transition-delay: .3s; } .bars.play i:nth-child(5) { height: 66%; transition-delay: .4s; } .bars.play i:nth-child(6) { height: 88%; transition-delay: .5s; }

/* ---------- Anchor chips (features) ---------- */
.chips-nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.chips-nav a { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 7px 14px; font-size: .85rem; font-weight: 600; color: var(--navy); transition: background .2s, color .2s, transform .2s; }
.chips-nav a:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }
.new-pill { display: inline-block; background: var(--green); color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .06em; padding: 3px 7px; border-radius: 6px; vertical-align: middle; margin-left: 6px; text-transform: uppercase; font-family: var(--sans); }
.soon-pill { display: inline-block; background: var(--paper-2); color: var(--gold-deep); font-size: .62rem; font-weight: 800; letter-spacing: .06em; padding: 3px 7px; border-radius: 6px; vertical-align: middle; margin-left: 6px; text-transform: uppercase; font-family: var(--sans); }

/* Cards lift a little on hover */
.card, .stat, .fac, .tier { transition: transform .25s ease, box-shadow .25s ease; }
.card:hover, .stat:hover, .fac:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -22px rgba(22,40,61,.35); }

@media (prefers-reduced-motion: reduce) {
  .hero-glow, .hero-wrap .phone-frame, .float-chip, .ticker-track, .wa-typing i { animation: none !important; }
  .scene { transition: none; }
  .flow-step, .flow-line i { transition: none !important; opacity: 1 !important; transform: none !important; width: 100% !important; }
  .scan-line { display: none; } .scan-ok { transform: scale(1) rotate(-4deg); animation: none !important; }
  .sig-pad path { stroke-dashoffset: 0; animation: none !important; } .sig-ok, .sig-meta > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .wa-b { opacity: 1 !important; transform: none !important; animation: none !important; } .wa-typing { display: none; }
  .ck-ic { background: var(--green); animation: none !important; } .ck-ic::after { transform: scale(1); animation: none !important; } .ck-row.pending .ck-ic { background: #F1EEE5; } .ck-row.pending .ck-ic::after { transform: scale(0); }
  .doc-pg { transition: none; } .bars i { transition: none; }
}

/* Compact versions inside the hero phone */
.scene .scan, .scene .sig-card, .scene .wa { box-shadow: none; max-width: 100%; }
.scene .wa { padding: 10px; } .scene .wa-head { margin: -10px -10px 10px; padding: 10px 12px; }
.scene .wa-b { font-size: .72rem; }
.scene .sig-card { padding: 12px; } .scene .sig-pad { height: 100px; } .scene .sig-meta { font-size: .68rem; }
.scene .scan-body { grid-template-columns: 58px 1fr 62px; } .scene .scan-photo { width: 58px; height: 70px; } .scene .scan-qr { width: 62px; height: 62px; }
[id]{ scroll-margin-top: 88px; }
