/* nazar-webdesign — motion layer.
   Every hidden state lives under html.m-on, which motion.js only sets when the visitor
   allows motion; without it (no JS, reduced motion) the page is the finished page. */
:root{
  --e-out:cubic-bezier(.22,1,.36,1);
  --e-expo:cubic-bezier(.16,1,.3,1);
  --e-io:cubic-bezier(.76,0,.24,1);
  --e-exit:cubic-bezier(.55,.055,.675,.19);
}

/* ---- the "day" counter in the hero browser bar (static: Day 7, coral) ---- */
.hero-vis .bar .day{margin-left:auto;flex:none;display:inline-flex;align-items:center;gap:4px;font-style:normal;font-size:11.5px;font-weight:700;line-height:1.2;padding:3px 9px;border-radius:6px;background:var(--coral);color:var(--graphite);white-space:nowrap}
.hero-vis .bar .day span{margin:0;padding:0;background:none;border:0;border-radius:0;color:inherit;font:inherit;overflow:visible}
.hero-vis .bar .day .dn{display:inline-block;min-width:.7em;text-align:center}
.hero-vis .bar .day .m-col{display:inline-block;height:1.2em;overflow:hidden;vertical-align:bottom}
.hero-vis .bar .day .m-strip{display:block}
.hero-vis .bar .day .m-strip>span{display:block;height:1.2em;line-height:1.2em}
.m-col{display:inline-block;height:1.2em;overflow:hidden;vertical-align:bottom}
.m-strip{display:block}
.m-strip>span{display:block;height:1.2em;line-height:1.2em}
.wire{display:none}

/* ---- headline lines and section headings: rise from behind their own baseline ---- */
.hero h1 .hl,.hero h1 .hl>span{display:inline}
.m-mi{display:block}

/* ---- rolling figures ---- */
.m-num{display:inline-flex;line-height:1;vertical-align:baseline}
/* the site styles every span inside .sgrid and .plan; the digit columns must not inherit that */
.m-roll .m-num,.m-roll .m-num *{font-size:inherit!important;color:inherit!important;max-width:none!important;line-height:1!important;margin:0;padding:0}
.m-dig{display:inline-block;height:1em;overflow:hidden}
.m-dig>span{display:flex;flex-direction:column;translate:0 calc(var(--n,0) * -1em)}
.m-dig>span>span{height:1em;line-height:1em}
.m-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---- footer wordmark: letters keep the original colours (black, coral hyphen) ---- */
.giant .m-ch{color:inherit}

/* ---- tile arrows roll out and back in on hover ---- */
.tile .go{overflow:hidden}
.tile .go>span{display:inline-block}
.tile:hover{transform:none}

/* ---- buttons answer the hand ---- */
.btn{transition:background .2s,color .2s,border-color .2s,transform .14s var(--e-out)}
.btn svg{transition:rotate .35s var(--e-out)}
@media (hover:hover) and (pointer:fine){.btn:hover svg{rotate:-12deg}}
.avail i{animation-iteration-count:3}

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

  /* leftover reveals: same idea, better curve */
  .rv{transition:opacity .7s var(--e-out),transform .9s var(--e-expo)}

  /* ===== hero load sequence: headline readable by ~1s, the build finished by ~1.6s ===== */
  html.m-on .hero .avail{animation:m-rise .5s var(--e-out) both}
  /* the headline keeps its own line breaks: it rises whole */
  html.m-on .hero h1{animation:m-rise .9s var(--e-expo) 120ms both}
  html.m-on .hero .lead{animation:m-rise .6s var(--e-out) 420ms both}
  html.m-on .hero .acts{animation:m-rise .6s var(--e-out) 500ms both}
  html.m-on .hero .launch{animation:m-rise .6s var(--e-out) 580ms both}
  html.m-on .hsteps li{animation:m-rise .6s var(--e-out) 680ms both}
  html.m-on .hsteps li:nth-child(2){animation-delay:770ms}
  html.m-on .hsteps li:nth-child(3){animation-delay:860ms}
  html.m-on .hsteps li:before{animation:m-pop .5s var(--e-out) 760ms both}
  html.m-on .hsteps li:nth-child(2):before{animation-delay:850ms}
  html.m-on .hsteps li:nth-child(3):before{animation-delay:940ms}

  /* the signature: the browser window builds itself, day 1 to day 7 */
  html.m-on .hero-vis .bw{animation:m-open .9s var(--e-io) 150ms both}
  html.m-on .hero-vis .ph{animation:m-phone 1s var(--e-expo) 900ms both}
  html.m-on .hero-vis .wire{display:block;position:absolute;inset:0;z-index:2;background:#15171b;animation:m-wipe .75s var(--e-io) 950ms both}
  html.m-on .hero-vis .wire i{position:absolute;display:block;border-radius:6px;background:#2a2e35;transform-origin:0 50%;animation:m-grow .55s var(--e-out) both}
  .wire .w-nav{left:5%;top:5%;width:90%;height:5%;animation-delay:330ms!important}
  .wire .w-h1{left:8%;top:21%;width:52%;height:9%;animation-delay:400ms!important}
  .wire .w-h2{left:8%;top:33%;width:36%;height:9%;animation-delay:460ms!important}
  .wire .w-btn{left:8%;top:48%;width:17%;height:7%;background:var(--coral)!important;animation-delay:520ms!important}
  .wire .w-img{right:6%;top:19%;width:28%;height:38%;animation-delay:580ms!important}
  .wire .w-col{top:65%;width:26%;height:26%;animation-delay:640ms!important}
  .wire .w-col:nth-of-type(6){left:8%}
  .wire .w-col:nth-of-type(7){left:37%;animation-delay:680ms!important}
  .wire .w-col:nth-of-type(8){left:66%;animation-delay:720ms!important}
  html.m-on .hero-vis .day{animation:m-live .3s ease 1550ms both}
  html.m-on .hero-vis .dn .m-strip{animation:m-days 1.25s cubic-bezier(.65,0,.35,1) 330ms both}

  /* the hero leans toward the pointer (set by motion.js), never more than a few degrees */
  .hero-vis{transform:perspective(1400px) rotateX(var(--ry,0deg)) rotateY(var(--rx,0deg));transition:transform .8s var(--e-out)}

  /* ===== scroll reveals, choreographed by motion.js (data-m + --d) ===== */
  html.m-on [data-m]{transition:opacity .7s var(--e-out) var(--d,0ms),translate .9s var(--e-expo) var(--d,0ms),scale .9s var(--e-expo) var(--d,0ms),clip-path 1.1s var(--e-io) var(--d,0ms)}
  html.m-on [data-m=rise]:not(.m-in){opacity:0;translate:0 26px}
  html.m-on [data-m=fade]:not(.m-in){opacity:0}
  html.m-on [data-m=mask]{clip-path:inset(-.3em -1em -.25em -1em)}
  html.m-on [data-m=mask].m-done{clip-path:none}
  html.m-on [data-m=mask]>.m-mi{transition:translate 1s var(--e-expo) var(--d,0ms)}
  html.m-on [data-m=mask]:not(.m-in)>.m-mi{translate:0 115%}
  html.m-on [data-m=msg]{transform-origin:0 100%}
  html.m-on [data-m=msg]:not(.m-in){opacity:0;translate:0 30px;scale:.94}

  /* work tiles open like a page loading, top to bottom; the screenshot settles inside */
  /* (the tile itself is never clipped: a fully clipped target never reports as visible) */
  html.m-on .tile[data-m=open]{transition:opacity .5s ease var(--d,0ms),translate .9s var(--e-expo) var(--d,0ms),background .2s}
  html.m-on .tile[data-m=open]:not(.m-in){opacity:0;translate:0 24px}
  html.m-on .tile[data-m=open] .lv{transition:clip-path 1.1s var(--e-io) calc(var(--d,0ms) + 120ms)}
  html.m-on .tile[data-m=open]:not(.m-in) .lv{clip-path:inset(0 0 100% 0)}
  html.m-on .tile[data-m=open].m-in .lv{clip-path:inset(0)}
  html.m-on .tile[data-m=open].m-done .lv{clip-path:none}
  html.m-on .tile[data-m=open] .lv img{transition:object-position 5s cubic-bezier(.3,.1,.3,1),filter .5s,scale 1.5s var(--e-expo) var(--d,0ms)}
  html.m-on .tile[data-m=open]:not(.m-in) .lv img{scale:1.12}
  html.m-on .tile[data-m=open] .cap{transition:opacity .6s var(--e-out) calc(var(--d,0ms) + 350ms),translate .8s var(--e-expo) calc(var(--d,0ms) + 350ms)}
  html.m-on .tile[data-m=open]:not(.m-in) .cap{opacity:0;translate:0 14px}

  /* pricing: the three plans are dealt from the middle card, then the ticks check in */
  .plans .plan{transition:transform .25s,box-shadow .25s,translate 1.1s var(--e-expo) var(--d,0ms),opacity .6s ease var(--d,0ms)}
  html.m-on .plans:not(.m-in) .plan{opacity:0;translate:0 40px}
  .plans .plan:nth-child(2){z-index:2}
  .plan li:before{transition:scale .45s var(--e-out) var(--t,0ms)}
  html.m-on .plans:not(.m-in) .plan li:before{scale:0}
  @media (min-width:901px){
    html.m-on .plans:not(.m-in) .plan:nth-child(1){translate:60% 34px}
    html.m-on .plans:not(.m-in) .plan:nth-child(3){translate:-60% 34px}
  }

  /* rolling figures: every column turns at least once, a beat apart */
  .m-dig>span{transition:translate 1.5s var(--e-expo) calc(var(--d,0ms) + var(--i,0) * 90ms)}
  html.m-on .m-roll:not(.m-in) .m-dig>span{translate:0 0}

  /* team avatars open from a point */
  html.m-on .person .av{transition:clip-path .9s var(--e-expo) calc(var(--d,0ms) + 200ms)}
  html.m-on .person:not(.m-in) .av{clip-path:circle(0 at 50% 50%)}
  html.m-on .person.m-in .av{clip-path:circle(80% at 50% 50%)}

  /* footer wordmark: letters rise one after another */
  .giant .m-ch{display:inline-block;transition:translate .9s var(--e-expo) calc(var(--i) * 28ms)}
  html.m-on .giant:not(.m-in) .m-ch{translate:0 105%}

  /* tile arrow roll */
  @media (hover:hover) and (pointer:fine){
    .tile:hover .go>span{animation:m-go .5s var(--e-out)}
    .tile:hover .go>span.m-r{animation-name:m-go-r}
  }

  /* FAQ answers open to their real height */
  .faq details{interpolate-size:allow-keywords}
  .faq details::details-content{block-size:0;overflow:clip;transition:block-size .4s var(--e-out),content-visibility .4s allow-discrete}
  .faq details[open]::details-content{block-size:auto}

  /* scroll-linked, locked to the scrollbar: the hero recedes as it leaves */
  @supports (animation-timeline:view()){
    .hero{view-timeline-name:--hero;transform-origin:50% 100%;animation:m-recede linear both;animation-timeline:--hero;animation-range:exit 0% exit 100%}
    .hero-vis{animation:m-drift linear both;animation-timeline:--hero;animation-range:exit 0% exit 100%}
  }

  /* page to page: the screenshot clicked travels into the project page */
  @view-transition{navigation:auto}
  ::view-transition-old(root){animation:m-vt-out .2s var(--e-exit) both}
  ::view-transition-new(root){animation:m-vt-in .38s var(--e-out) 60ms both}
  ::view-transition-group(*){animation-duration:.5s;animation-timing-function:var(--e-io)}
  ::view-transition-image-pair(*.shot){overflow:clip}
  ::view-transition-old(*.shot),::view-transition-new(*.shot){width:100%;height:100%;object-fit:cover;object-position:50% 0}
}

/* the old floating loops said nothing; the hero now moves with the scroll and the pointer */
.hero-vis .bw,.hero-vis .ph{animation:none}
/* phones have no hover: the tile in the middle of the screen shows its colours */
@media (hover:none){.tile.m-c img,.tile.m-c .lf{filter:none}}

@keyframes m-rise{from{opacity:0;translate:0 18px}}
@keyframes m-line{from{translate:0 112%}}
@keyframes m-pop{from{opacity:0;scale:.4}}
@keyframes m-open{from{clip-path:inset(0 0 100% 0 round 14px)}to{clip-path:inset(0 round 14px)}}
@keyframes m-phone{from{opacity:0;translate:0 60px}}
@keyframes m-grow{from{scale:0 1;opacity:0}}
@keyframes m-wipe{from{clip-path:inset(0 0 0 0)}to{clip-path:inset(100% 0 0 0);visibility:hidden}}
@keyframes m-days{from{translate:0 0}to{translate:0 -7.2em}}
@keyframes m-live{from{background:#0f0f0f;color:#cfcfcf}}
@keyframes m-recede{to{scale:.94}}
@keyframes m-drift{to{translate:0 -10%}}
@keyframes m-go{0%{translate:0 0}45%{translate:120% -120%;opacity:0}46%{translate:-120% 120%;opacity:0}100%{translate:0 0;opacity:1}}
@keyframes m-go-r{0%{translate:0 0}45%{translate:130% 0;opacity:0}46%{translate:-130% 0;opacity:0}100%{translate:0 0;opacity:1}}
@keyframes m-vt-out{to{opacity:0}}
@keyframes m-vt-in{from{opacity:0;translate:0 16px}}
