/* ============================================================================
   ShivAnuj — MOTION LAYER  (snj-motion.css, v1 · Nov 2026)
   ----------------------------------------------------------------------------
   Purely additive. Loaded after each page's own <style>, it changes no layout,
   colour or text: it only adds movement. Remove the one <link> line and the
   page is exactly as it was.

   House rules for motion on this site:
     · slow and soft, never bouncy            (calm = trustworthy)
     · small distances, plays once            (nothing loops near the content)
     · only opacity + transform               (smooth on low-cost phones)
     · anyone who asks their phone for "reduce motion" gets none of it
   ============================================================================ */

:root{
  --snj-ease:cubic-bezier(.22,.61,.36,1);
  --snj-out:cubic-bezier(.16,1,.3,1);
}

/* ---- always on: keyboard focus ring + reading-progress hairline ---------- */
a:focus-visible,button:focus-visible,summary:focus-visible,
input:focus-visible,select:focus-visible,textarea:focus-visible,.slot:focus-visible{
  outline:2px solid var(--gold,#cfa550);outline-offset:3px
}
.snj-progress{
  position:absolute;left:0;right:0;bottom:-2px;height:2px;pointer-events:none;
  background:linear-gradient(90deg,var(--gold-d,#a8843f),var(--gold,#cfa550) 60%,var(--gold-l,#e3c891));
  transform:scaleX(0);transform-origin:0 50%;opacity:0;transition:opacity .4s
}
.snj-progress.on{opacity:1}
body>header{transition:box-shadow .4s var(--snj-ease),background-color .4s var(--snj-ease)}
body>header.snj-scrolled{box-shadow:0 8px 28px rgba(43,43,47,.09);background-color:rgba(247,245,241,.97)}

/* ---- people who prefer no motion: switch off what the pages already had -- */
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto!important}
  .reveal{opacity:1!important;transform:none!important;transition:none!important}
  .snjpop,.snjpop-card{animation:none!important}
}
@media print{
  .reveal,.snj-r{opacity:1!important;transform:none!important}
  .snj-progress{display:none}
}

@media (prefers-reduced-motion: no-preference){

  /* ======================================================================
     1. SOFT CROSS-FADE BETWEEN PAGES (browsers without it simply skip this)
     ====================================================================== */
  @view-transition{navigation:auto}
  ::view-transition-old(root){animation:snj-vt-out .16s ease both}
  ::view-transition-new(root){animation:snj-vt-in .34s ease both}
  @keyframes snj-vt-out{to{opacity:0}}
  @keyframes snj-vt-in{from{opacity:0}}

  /* ======================================================================
     2. FIRST SCREEN — the page settles into place, top to bottom
        (CSS only: works before any script has loaded, cannot get stuck)
     ====================================================================== */
  @keyframes snj-rise{from{opacity:0;transform:translate3d(0,18px,0)}}
  @keyframes snj-fade{from{opacity:0}}
  @keyframes snj-settle{from{opacity:0;transform:scale(1.07)}}
  @keyframes snj-slide{from{opacity:0;transform:translate3d(-10px,0,0)}}

  /* service, doctor, contact, Hindi and Gujarati pages */
  .svc-hero .bg img{animation:snj-settle 2.6s var(--snj-out) backwards}
  .svc-hero .col>*{animation:snj-rise .9s var(--snj-out) backwards}
  .svc-hero .col>*:nth-child(1){animation-delay:.06s}
  .svc-hero .col>*:nth-child(2){animation-delay:.14s}
  .svc-hero .col>*:nth-child(3){animation-delay:.26s}
  .svc-hero .col>*:nth-child(4){animation-delay:.38s}
  .svc-hero .col>*:nth-child(n+5){animation-delay:.5s}
  .svc-hero .quickfacts .qf{animation:snj-rise .8s var(--snj-out) backwards}
  .svc-hero .quickfacts .qf:nth-child(1){animation-delay:.62s}
  .svc-hero .quickfacts .qf:nth-child(2){animation-delay:.7s}
  .svc-hero .quickfacts .qf:nth-child(3){animation-delay:.78s}
  .svc-hero .quickfacts .qf:nth-child(n+4){animation-delay:.86s}

  /* home page (and the international pages built on the same hero) */
  .hero-grid>div:first-child>*{animation:snj-rise .9s var(--snj-out) backwards}
  .hero-grid>div:first-child>*:nth-child(1){animation-delay:.06s}
  .hero-grid>div:first-child>*:nth-child(2){animation-delay:.14s}
  .hero-grid>div:first-child>*:nth-child(3){animation-delay:.26s}
  .hero-grid>div:first-child>*:nth-child(4){animation-delay:.36s}
  .hero-grid>div:first-child>*:nth-child(5){animation-delay:.46s}
  .hero-grid>div:first-child>*:nth-child(n+6){animation-delay:.56s}
  .hero .trust .t{animation:snj-rise .8s var(--snj-out) backwards}
  .hero .trust .t:nth-child(1){animation-delay:.66s}
  .hero .trust .t:nth-child(2){animation-delay:.74s}
  .hero .trust .t:nth-child(n+3){animation-delay:.82s}
  .hero .hero-card{animation:snj-rise 1.1s var(--snj-out) .3s backwards}
  .hero .hero-card .dot-row{animation:snj-slide .7s var(--snj-out) backwards}
  .hero .hero-card .dot-row:nth-of-type(1){animation-delay:.7s}
  .hero .hero-card .dot-row:nth-of-type(2){animation-delay:.78s}
  .hero .hero-card .dot-row:nth-of-type(3){animation-delay:.86s}
  .hero .hero-card .dot-row:nth-of-type(4){animation-delay:.94s}
  .hero .hero-card .dot-row:nth-of-type(n+5){animation-delay:1.02s}
  .hero .watermark{animation:snj-fade 2.6s ease .2s backwards}
  /* the warm glow behind the home hero drifts very slowly (desktop only) */
  @media (min-width:900px) and (hover:hover){
    .hero::before{animation:snj-glow 20s ease-in-out infinite alternate}
    @keyframes snj-glow{to{transform:translate3d(-2.5%,3%,0) scale(1.1)}}
  }

  /* blog list and blog articles */
  .arthead>*,.bloghead>*{animation:snj-rise .9s var(--snj-out) backwards}
  .arthead>*:nth-child(1),.bloghead>*:nth-child(1){animation-delay:.05s}
  .arthead>*:nth-child(2),.bloghead>*:nth-child(2){animation-delay:.12s}
  .arthead>*:nth-child(3),.bloghead>*:nth-child(3){animation-delay:.22s}
  .arthead>*:nth-child(n+4),.bloghead>*:nth-child(n+4){animation-delay:.32s}
  @keyframes snj-photo{from{opacity:0;transform:translate3d(0,22px,0) scale(.985)}}
  .arthero img{animation:snj-photo 1.2s var(--snj-out) .3s backwards}

  /* ======================================================================
     3. SCROLL REVEALS — snj-motion.js adds these classes to blocks that
        start below the first screen; each one eases up once, then the
        classes are removed again so hover effects behave normally.
     ====================================================================== */
  html.snj-m .snj-r{opacity:0;transform:translate3d(0,22px,0)}
  html.snj-m .snj-r.snj-soft{transform:translate3d(0,12px,0)}
  html.snj-m .snj-r.snj-in{
    opacity:1;transform:none;
    transition:opacity .85s var(--snj-out),transform .85s var(--snj-out);
    transition-delay:var(--snj-d,0ms)
  }
  /* the home page's own .reveal blocks: neighbours now arrive one after another */
  html.snj-m .reveal{transition-delay:var(--snj-d,0ms)}

  /* ======================================================================
     4. NAVIGATION
     ====================================================================== */
  @keyframes snj-drop{from{opacity:0;transform:translate3d(0,-8px,0)}}
  @media (min-width:1025px){
    .navlinks>a:not(.btn):not(.navcall),.navdrop>.navtop{
      background:linear-gradient(currentColor,currentColor) no-repeat 0 100%/0 1.5px;
      transition:color .2s,background-size .4s var(--snj-ease)
    }
    .navlinks>a:not(.btn):not(.navcall):hover,.navdrop:hover>.navtop,.navdrop:focus-within>.navtop{background-size:100% 1.5px}
    .navdrop:hover .navmenu,.navdrop:focus-within .navmenu{animation:snj-drop .26s var(--snj-out) backwards}
    .navmenu a{transition:background-color .2s,color .2s,padding-left .3s var(--snj-ease)}
    .navmenu a:hover{padding-left:17px}
  }
  @media (max-width:1024px){
    .navlinks.open{animation:snj-drop .3s var(--snj-out) backwards}
  }

  /* ======================================================================
     5. BUTTONS, LINKS AND CARDS — quiet feedback under the finger
     ====================================================================== */
  .btn{transition:transform .28s var(--snj-ease),box-shadow .28s var(--snj-ease),background-color .25s,border-color .25s,color .25s}
  .btn:active{transform:scale(.975)}
  .btn-primary{position:relative;overflow:hidden}
  .btn-primary::before{
    content:"";position:absolute;inset:0;pointer-events:none;
    background:linear-gradient(105deg,transparent 36%,rgba(255,255,255,.26) 50%,transparent 64%);
    transform:translate3d(-130%,0,0);transition:transform .9s var(--snj-ease)
  }
  .btn-primary:hover::before{transform:translate3d(130%,0,0)}
  footer a:not(.brand){transition:color .2s,transform .3s var(--snj-ease)}
  footer a:not(.brand):hover{transform:translate3d(3px,0,0)}
  .eyetile img,figure img{transition:transform .9s var(--snj-ease)}
  .eyetile:hover img{transform:scale(1.04)}
  .slot.sel{animation:snj-tap .32s var(--snj-out)}
  @keyframes snj-tap{from{transform:scale(.93)}}

  /* questions and answers open gently */
  .faq details{transition:border-color .3s,box-shadow .3s}
  .faq details[open]{border-color:var(--gold-l,#e3c891)}
  .faq summary{transition:color .2s}
  .faq summary:hover{color:var(--gold-d,#a8843f)}
  .faq summary::after{transition:transform .35s var(--snj-ease)}
  .faq details[open] summary::after{transform:rotate(180deg)}
  .faq details[open] .ans{animation:snj-open .45s var(--snj-out)}
  @keyframes snj-open{from{opacity:0;transform:translate3d(0,-6px,0)}}

  /* photo viewer on the home page */
  .lb.open{animation:snj-fade .25s ease}
  .lb.open img{animation:snj-zoom .4s var(--snj-out)}
  @keyframes snj-zoom{from{opacity:0;transform:scale(.965)}}

  /* ======================================================================
     6. WHATSAPP + CALL BUTTONS — arrive after the page, one soft ring, then still
     ====================================================================== */
  .fab a{position:relative;animation:snj-pop .6s var(--snj-out) 1.1s backwards;transition:transform .25s var(--snj-ease),box-shadow .25s}
  .fab a+a{animation-delay:1.24s}
  .fab a:hover{transform:scale(1.08)}
  .fab .wa::after{
    content:"";position:absolute;inset:0;border-radius:50%;border:2px solid #25D366;
    pointer-events:none;opacity:0;animation:snj-ring 2.6s ease-out 3.4s 2
  }
  @keyframes snj-pop{from{opacity:0;transform:translate3d(0,12px,0) scale(.6)}}
  @keyframes snj-ring{from{opacity:.5;transform:scale(1)}to{opacity:0;transform:scale(1.75)}}
}
