/* =====================================================================
   Kiosk motion layer: splash + flowing motion. Loaded after kiosk-theme.css.
   Motion tiers (reduced-motion): large movement removed, replaced by short fades;
   opacity / colour / focus feedback is always kept. Only transform + opacity are animated
   (plus one small box-shadow ping), so it stays smooth on tablet GPUs.
   ===================================================================== */
:root{
  --km-plum:#3A1034; --km-plum2:#6B2160; --km-gold:#E8B923;
  --km-out:cubic-bezier(.22,1,.36,1); --km-spring:cubic-bezier(.34,1.56,.64,1); --km-curtain:cubic-bezier(.7,0,.2,1);
}

/* ---------------- Splash (first load of a session only) ---------------- */
html.has-splash, html.has-splash body{ overflow:hidden; }
.splash{
  position:fixed; inset:0; z-index:5000; display:grid; place-items:center; color:#fff; background:var(--km-plum);
  transition:transform .9s var(--km-curtain); will-change:transform; touch-action:manipulation; cursor:pointer;
}
.splash::after{            /* flowing curtain edge that rides along the bottom while the sheet lifts */
  content:""; position:absolute; left:0; right:0; top:calc(100% - 1px); height:96px; pointer-events:none;
  background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 96' preserveAspectRatio='none'><path d='M0 0H600V48C550 92 500 92 450 48S350 4 300 48 200 92 150 48 50 4 0 48Z' fill='%233A1034'/></svg>") repeat-x 0 0/600px 96px;
  animation:km-edge 3.2s linear infinite;
}
.splash.leave{ transform:translateY(calc(-100% - 96px)); pointer-events:none; }
@keyframes km-edge{ to{ background-position-x:-600px; } }

.sp-blobs{ position:absolute; inset:0; overflow:hidden; }
.sp-blobs i{ position:absolute; width:70vmax; height:70vmax; border-radius:50%; opacity:.9; will-change:transform; }
.sp-blobs i:nth-child(1){ left:-25vmax; top:-30vmax; background:radial-gradient(circle,rgba(138,47,125,.9),transparent 62%); animation:km-drift1 9s ease-in-out infinite alternate; }
.sp-blobs i:nth-child(2){ right:-30vmax; bottom:-35vmax; background:radial-gradient(circle,rgba(232,185,35,.28),transparent 60%); animation:km-drift2 11s ease-in-out infinite alternate; }
.sp-blobs i:nth-child(3){ left:30vw; top:20vh; width:46vmax; height:46vmax; background:radial-gradient(circle,rgba(107,33,96,.8),transparent 65%); animation:km-drift3 8s ease-in-out infinite alternate; }
@keyframes km-drift1{ to{ transform:translate3d(14vmax,10vmax,0) scale(1.1); } }
@keyframes km-drift2{ to{ transform:translate3d(-12vmax,-8vmax,0) scale(1.15); } }
@keyframes km-drift3{ to{ transform:translate3d(-10vmax,8vmax,0) scale(.9); } }

.sp-core{ position:relative; display:flex; flex-direction:column; align-items:center; gap:14px; padding:24px; text-align:center; }
.sp-glow{ position:absolute; top:-6px; width:260px; height:260px; border-radius:50%; background:radial-gradient(circle,rgba(232,185,35,.38),transparent 65%); animation:km-pulse 2.4s ease-in-out infinite; }
@keyframes km-pulse{ 0%,100%{ transform:scale(.9); opacity:.7 } 50%{ transform:scale(1.12); opacity:1 } }
.sp-seal{ position:relative; width:min(46vw,210px); height:auto; overflow:visible; animation:km-float 3.6s ease-in-out .9s infinite; }
@keyframes km-float{ 0%,100%{ transform:translateY(0) } 50%{ transform:translateY(-6px) } }
.sp-seal .dr{ fill:none; stroke:var(--km-gold); stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:1; stroke-dashoffset:1; animation:km-draw 1s var(--km-out) forwards; }
.sp-seal .r1{ stroke-width:2.6; animation-delay:.1s; animation-duration:1.15s; }
.sp-seal .r2{ stroke:rgba(255,255,255,.55); stroke-width:1.2; stroke-dasharray:.02 .03; stroke-dashoffset:0; opacity:0; animation:km-fade .6s ease .7s forwards, km-spin 22s linear 1s infinite; transform-origin:60px 60px; }
.sp-seal .p1{ stroke-width:2.6; animation-delay:.55s; } .sp-seal .p2{ stroke-width:2.6; animation-delay:.7s; }
.sp-seal .p3{ stroke-width:2.6; animation-delay:.8s; } .sp-seal .p4{ stroke-width:2.6; animation-delay:.9s; } .sp-seal .p5{ stroke-width:2.6; animation-delay:1s; }
@keyframes km-draw{ to{ stroke-dashoffset:0; } }
@keyframes km-fade{ to{ opacity:1; } }
@keyframes km-spin{ to{ transform:rotate(360deg); } }
.sp-t1{ font-family:"Noto Sans Devanagari","Inter",sans-serif; font-weight:700; font-size:clamp(1.5rem,4.2vw,2.5rem); line-height:1.4; clip-path:inset(0 100% 0 0); animation:km-wipe .9s var(--km-out) 1.15s forwards; }
.sp-t2{ font-size:clamp(.9rem,2vw,1.15rem); font-weight:600; letter-spacing:.14em; text-transform:uppercase; color:#EBD9E7; opacity:0; transform:translateY(10px); animation:km-up .7s var(--km-out) 1.5s forwards; }
@keyframes km-wipe{ to{ clip-path:inset(0 0 0 0); } }
@keyframes km-up{ to{ opacity:1; transform:none; } }
.sp-bar{ width:min(280px,60vw); height:4px; margin-top:10px; border-radius:4px; background:rgba(255,255,255,.16); overflow:hidden; opacity:0; animation:km-fade .4s ease 1.3s forwards; }
.sp-bar i{ display:block; height:100%; width:100%; transform-origin:left; transform:scaleX(0); background:linear-gradient(90deg,#E8B923,#fff3c4,#E8B923); animation:km-load 1.1s var(--km-curtain) 1.35s forwards; }
@keyframes km-load{ to{ transform:scaleX(1); } }

/* attract-screen entrance waits for the splash to lift, then plays from the start */
html.has-splash .attract, html.has-splash .attract *, html.has-splash .seal-mark{ animation-play-state:paused !important; }

/* ---------------- Flowing attract screen ---------------- */
.attract-right{ overflow:hidden; }
.attract-right::before{                       /* slow light drift */
  content:""; position:absolute; inset:-25%; pointer-events:none; z-index:0;
  background:radial-gradient(circle at 20% 30%,rgba(255,255,255,.13),transparent 38%),radial-gradient(circle at 80% 72%,rgba(255,255,255,.09),transparent 42%);
  animation:km-light 15s ease-in-out infinite alternate; will-change:transform;
}
.attract-right::after{                        /* wave sheet sliding along the bottom */
  content:""; position:absolute; left:0; bottom:-2px; width:200%; height:130px; pointer-events:none; z-index:0; opacity:.16;
  background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 130' preserveAspectRatio='none'><path d='M0 70C100 20 200 20 300 70S500 120 600 70 700 20 800 70V130H0Z' fill='white'/></svg>") repeat-x 0 100%/800px 130px;
  animation:km-wave 16s linear infinite; will-change:transform;
}
@keyframes km-light{ to{ transform:translate3d(6%,-5%,0) rotate(6deg) scale(1.08); } }
@keyframes km-wave{ to{ transform:translate3d(-800px,0,0); } }
.attract-right .seal-mark{ z-index:2; }
.km-dot{ position:absolute; z-index:1; border-radius:50%; background:rgba(255,255,255,.55); pointer-events:none; animation:km-rise var(--d,9s) linear var(--w,0s) infinite; opacity:0; will-change:transform,opacity; }
@keyframes km-rise{ 0%{ transform:translate3d(0,0,0) scale(.6); opacity:0 } 15%{ opacity:.8 } 100%{ transform:translate3d(var(--x,20px),-70vh,0) scale(1.1); opacity:0 } }

/* ---------------- Interactive feel ---------------- */
.tile .ic, .opt .ic{ transition:transform .35s var(--km-spring), background .25s, color .25s; }
.tile:hover .ic, .opt:hover .ic, .tile:active .ic, .opt:active .ic{ transform:rotate(-7deg) scale(1.1); }
.tile.selected .ic, .opt.selected .ic{ animation:km-bounce .5s var(--km-spring); }
@keyframes km-bounce{ 0%{ transform:scale(.8) } 60%{ transform:scale(1.15) } 100%{ transform:scale(1) } }
.foot .btn-primary:not(:disabled)::after{     /* gentle sheen sweeping across the active "Continue" button */
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(110deg,transparent 35%,rgba(255,255,255,.5) 50%,transparent 65%); transform:translateX(-130%);
  animation:km-sheen 4.2s ease-in-out 1s infinite;
}
@keyframes km-sheen{ 0%,55%{ transform:translateX(-130%) } 100%{ transform:translateX(130%) } }
.step + .step::before{ background-size:100% 220%; }
.step.done + .step::before, .step.done + .step.active::before{ background-image:linear-gradient(180deg,var(--mh-saffron,#E8B923) 0 40%,#fff6c8 50%,var(--mh-saffron,#E8B923) 60%); background-size:100% 300%; animation:km-flow 2.6s linear infinite; }
@keyframes km-flow{ from{ background-position:0 100% } to{ background-position:0 -100% } }
.fp-pad.scanning{ animation:km-ping 1.5s ease-out infinite !important; }
@keyframes km-ping{ 0%{ box-shadow:0 0 0 0 rgba(107,33,96,.45), var(--e3) } 100%{ box-shadow:0 0 0 38px rgba(107,33,96,0), var(--e3) } }
.cam-frame{ transition:box-shadow .3s; }
.lang-tiles button:hover .big{ transform:translateY(-2px); }
.lang-tiles .big{ transition:transform .3s var(--km-spring); }

/* ---------------- Success: confetti ---------------- */
#km-confetti{ position:fixed; inset:0; pointer-events:none; z-index:900; overflow:hidden; }
#km-confetti i{ position:absolute; top:-14px; width:10px; height:16px; border-radius:2px; opacity:0; will-change:transform,opacity; animation:km-fall var(--d,2.4s) cubic-bezier(.3,.6,.4,1) var(--w,0s) forwards; }
@keyframes km-fall{ 0%{ opacity:1; transform:translate3d(0,0,0) rotate(0) } 100%{ opacity:0; transform:translate3d(var(--x,0),105vh,0) rotate(var(--r,540deg)) } }

/* ---------------- Reduced motion: tiered, not a kill switch ---------------- */
@media (prefers-reduced-motion:reduce){
  .splash{ transition:opacity .25s ease; }
  .splash.leave{ transform:none; opacity:0; }
  .splash::after{ display:none; }
  .sp-blobs i, .sp-glow, .sp-seal, .sp-seal .r2{ animation:none !important; }
  .sp-seal .dr{ animation:none !important; stroke-dashoffset:0 !important; }
  .sp-seal .r2{ opacity:1; }
  .sp-t1{ animation:none !important; clip-path:none; }
  .sp-t2, .sp-bar{ animation:none !important; opacity:1; transform:none; }
  .sp-bar i{ animation:none !important; transform:none; }
  html.has-splash .attract, html.has-splash .attract *, html.has-splash .seal-mark{ animation-play-state:running !important; }
  .attract-right::before, .attract-right::after, .km-dot, #km-confetti, .foot .btn-primary::after, .step.done + .step::before, .step.done + .step.active::before, .fp-pad.scanning{ animation:none !important; }
  .km-dot, #km-confetti{ display:none; }
  .tile:hover .ic, .opt:hover .ic{ transform:none; }
}

/* ---------------- Fix: no flash when a screen redraws its own contents ----------------
   Choosing a service (or changing language) re-creates the option cards. The staggered entrance
   used to replay on the new cards, so the page seemed to blink before moving on. The entrance now
   runs only while a screen is first opening (kiosk-motion.js adds .is-entering for ~1s). */
.screen.show .s-head > *, .screen.show .tile, .screen.show .opt, .screen.show .lang-tiles button,
.screen.show .cam-wrap, .screen.show .fp-wrap, .screen.show .sig-wrap, .screen.show .sum-grid, .screen.show .field{ animation:none; }
.screen.show.is-entering .s-head > *, .screen.show.is-entering .tile, .screen.show.is-entering .opt, .screen.show.is-entering .lang-tiles button,
.screen.show.is-entering .cam-wrap, .screen.show.is-entering .fp-wrap, .screen.show.is-entering .sig-wrap, .screen.show.is-entering .sum-grid, .screen.show.is-entering .field{
  animation:ds-rise var(--d-slow,560ms) var(--ease,cubic-bezier(.22,1,.36,1)) both;
}
.screen.show.is-entering .s-head p{ animation-delay:50ms }
.screen.show.is-entering .tile:nth-child(1), .screen.show.is-entering .opt:nth-child(1), .screen.show.is-entering .lang-tiles button:nth-child(1){ animation-delay:70ms }
.screen.show.is-entering .tile:nth-child(2), .screen.show.is-entering .opt:nth-child(2), .screen.show.is-entering .lang-tiles button:nth-child(2){ animation-delay:120ms }
.screen.show.is-entering .tile:nth-child(3){ animation-delay:170ms } .screen.show.is-entering .tile:nth-child(4){ animation-delay:220ms }
.screen.show.is-entering .cam-wrap, .screen.show.is-entering .fp-wrap, .screen.show.is-entering .sig-wrap, .screen.show.is-entering .sum-grid, .screen.show.is-entering .field{ animation-delay:90ms }
/* the stepper's active pill also re-renders on every step change: keep its pop-in short and subtle (no fade from near-invisible) */
.step.active{ animation:km-plate .22s var(--km-out) both; }
@keyframes km-plate{ from{ transform:scale(.96) } to{ transform:none } }

/* ---------------- "Powered by" brand logo ---------------- */
.sidebar .sidebar-brand img.tic-logo{ height:48px !important; width:auto !important; flex:none; padding:5px 11px !important; background:#fff !important; border-radius:12px !important; filter:none !important; box-shadow:0 2px 8px rgba(0,0,0,.22); }
.attract .powered-by{ display:flex; align-items:center; gap:12px; margin-top:20px; font-size:.82rem; font-weight:600; color:var(--muted,#6B5A70); letter-spacing:.04em; text-transform:uppercase; }
.attract .powered-by .tic-logo-lg{ height:54px; width:auto; display:block; }
@media (max-width:720px){ .sidebar .sidebar-brand img.tic-logo{ display:none !important; } }

/* ---------------- Review screen: never show a broken "Aadhaar" image ----------------
   The Aadhaar step was removed from the flow, so that <img> has no source. */
.sum-bio .bio-aadhaar:not([src]), .sum-bio .bio-aadhaar[src=""]{ display:none !important; }
