/* Cube motion layer: added on top of the live tapcube.co styles. No layout, copy, color or font changes. */

/* Sticky nav: the header was absolute; fixed keeps it out of flow, so nothing shifts */
header { position: fixed; }
header.m-scrolled {
  background-color: rgba(10, 8, 32, 0.9);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
          backdrop-filter: saturate(160%) blur(14px);
  padding-top: 16px; padding-bottom: 16px;
}
@media (max-width: 767.9px) { header.m-scrolled { padding-top: 16px; padding-bottom: 16px; } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: auto; } /* the site's own jQuery handles the smooth anchor scroll */

  header {
    transition: background-color .35s ease, padding .35s ease, transform .45s cubic-bezier(.2,.7,.2,1), opacity .35s ease;
    will-change: transform;
  }
  header.m-hidden { transform: translate3d(0,-110%,0); }

  /* Hero entrance on load */
  html.m-motion header:not(.m-entered) { opacity: 0; transform: translate3d(0,-16px,0); }
  html.m-motion .banner h1 > span:first-child { animation: m-in-left 1s cubic-bezier(.2,.7,.2,1) .25s both; }
  html.m-motion .banner h1 > span:last-child  { animation: m-in-right 1s cubic-bezier(.2,.7,.2,1) .25s both; }
  html.m-motion .banner h1 .img { animation: m-pop 1s cubic-bezier(.2,.8,.2,1.05) .05s both; }
  html.m-motion .banner .mobile-box { animation: m-up .8s cubic-bezier(.2,.7,.2,1) .7s both; }
  .banner .content { will-change: transform, opacity; }

  /* Smoother easing for the site's existing reveal classes */
  html.m-motion .wowo.animated { animation-duration: .9s; animation-timing-function: cubic-bezier(.2,.7,.2,1); }

  /* Scroll reveal for blocks that had none (staggered via --m-i) */
  .m-reveal { opacity: 0; transform: translate3d(0, 28px, 0);
    transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
    transition-delay: calc(var(--m-i, 0) * 90ms); }
  .m-reveal.m-in { opacity: 1; transform: none; }

  /* Parallax targets: transform only */
  .m-parallax { will-change: transform; }

  /* Buttons: lift + shadow */
  header .btns .btn a,
  .banner .mobile-box .btn,
  .pay-section .content-box .terminal-box .buy button,
  .pay-section .content-box .terminal-box .accesories .btns button {
    transition: color .2s, background-color .2s, border-color .2s, transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease;
  }
  header .btns .btn a:hover,
  .banner .mobile-box .btn:hover { transform: translate3d(0,-2px,0); box-shadow: 0 8px 22px rgba(44,103,246,.35); opacity: 1; }
  .pay-section .content-box .terminal-box .buy button:hover,
  .pay-section .content-box .terminal-box .accesories .btns button:hover { transform: translate3d(0,-2px,0); box-shadow: 0 10px 24px rgba(0,0,0,.18); }
  header .btns .btn a:active, .banner .mobile-box .btn:active,
  .pay-section .content-box .terminal-box .buy button:active,
  .pay-section .content-box .terminal-box .accesories .btns button:active { transform: translate3d(0,0,0) scale(.98); }

  /* Nav + footer text links: underline grows from the left */
  header .btns .price a,
  footer .footer-bottom .footer-links .item a,
  .intro-section .link p span {
    background-image: linear-gradient(currentColor, currentColor);
    background-origin: content-box; background-repeat: no-repeat;
    background-position: 0 100%; background-size: 0% 1px;
    transition: background-size .35s cubic-bezier(.2,.7,.2,1), opacity .2s, color .2s;
  }
  header .btns .price a:hover,
  footer .footer-bottom .footer-links .item a:hover { background-size: 100% 1px; opacity: 1; }

  /* Arrow links: smooth the existing arrow nudge */
  .partners .left .link a img, .title-link .link a img { transition: transform .3s cubic-bezier(.2,.7,.2,1); }

  /* Logos */
  header .logo img, footer .footer-bottom .logo img { transition: transform .3s cubic-bezier(.2,.7,.2,1); }
  header .logo:hover img, footer .footer-bottom .logo:hover img { transform: scale(1.04); }

  /* Images: gentle zoom / lift */
  .pay-section .bottom-slider .img-box { overflow: hidden; }
  .pay-section .bottom-slider .img-box img { transition: transform .4s cubic-bezier(.2,.7,.2,1); }
  .pay-section .bottom-slider .img:hover .img-box img { transform: scale(1.06); }
  .pay-section .top-slider .img { overflow: hidden; }
  .pay-section .top-slider .img img { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
  .pay-section .top-slider:hover .img img { transform: scale(1.025); }
  .partners .rotate-item .img .box img { transition: transform .3s cubic-bezier(.2,.7,.2,1); }
  .partners .rotate-item .img .box:hover img { transform: scale(1.08); }

  /* Plus / minus steppers */
  .pay-section .content-box .terminal-box .buy .number .minus,
  .pay-section .content-box .terminal-box .buy .number .plus { transition: transform .15s ease, opacity .2s; }
  .pay-section .content-box .terminal-box .buy .number .minus:active,
  .pay-section .content-box .terminal-box .buy .number .plus:active { transform: scale(.85); }

  @keyframes m-in-left  { from { opacity: 0; transform: translate3d(-40px,0,0); } to { opacity: 1; transform: none; } }
  @keyframes m-in-right { from { opacity: 0; transform: translate3d(40px,0,0); }  to { opacity: 1; transform: none; } }
  @keyframes m-pop { from { opacity: 0; transform: translate3d(0,24px,0) scale(.9); } to { opacity: 1; transform: none; } }
  @keyframes m-up  { from { opacity: 0; transform: translate3d(0,20px,0); } to { opacity: 1; transform: none; } }
}

/* Reduced motion: show everything immediately, no movement (also neutralises the site's own reveals and hero parallax) */
@media (prefers-reduced-motion: reduce) {
  html .wowo, html .wowo.animated { opacity: 1 !important; animation: none !important; transform: none !important; }
  .m-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .banner.parallax-s { background-position: center !important; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* ===== Intro "typed live" headline ===== */
html .intro-section h2 span.m-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; z-index: auto;
}
html .intro-section span.m-ch { position: static; z-index: auto; }
@property --m-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@media (prefers-reduced-motion: no-preference) {
  /* the typing replaces the block fade for this section */
  html.m-motion .intro-section .content.wowo { opacity: 1; animation: none; }
  html.m-type .intro-section .m-ch { visibility: hidden; }
  html.m-type .intro-section .m-ch.m-on { visibility: visible; }
  html.m-type .intro-section .m-ch.m-cur { position: relative; }
  html.m-type .intro-section .m-ch.m-cur::after {
    content: ""; position: absolute; top: .08em; bottom: .02em; right: -.06em; width: .055em;
    background: currentColor; animation: m-blink 1s steps(1, end) infinite;
  }
  html.m-type .intro-section .m-ch.m-cur.m-typing::after { animation: none; }
  /* red circle: hidden until typed, then its stroke is swept in */
  html.m-type .intro-section h2 .red::after {
    -webkit-mask-image: conic-gradient(from -75deg at 50% 50%, #000 var(--m-a), transparent 0);
            mask-image: conic-gradient(from -75deg at 50% 50%, #000 var(--m-a), transparent 0);
  }
  html.m-type .intro-section h2 .red.m-draw::after { animation: m-circle .75s cubic-bezier(.55,.1,.35,1) forwards; }
  /* "*Literally everywhere": fade in, then underline draws */
  html.m-type .intro-section .link p { opacity: 0; transform: translate3d(0,10px,0); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.2,1); }
  html.m-type .intro-section .link p span::after { transform: scaleX(0); transform-origin: left center; transition: transform .55s cubic-bezier(.65,0,.35,1) .3s; }
  html.m-type .intro-section .link.m-show p { opacity: 1; transform: none; }
  html.m-type .intro-section .link.m-show p span::after { transform: scaleX(1); }
  @keyframes m-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
  @keyframes m-circle { from { --m-a: 0deg; } to { --m-a: 360deg; } }
}
