/* ==========================================================================
   VEYLO — custom CSS for the VEYLO store on Salla (veylo.shopping)
   Paste this whole file into Salla's custom CSS. It goes with
   veylo-salla.js (custom JavaScript), which decides what each page shows.
   ========================================================================== */

/* No flash of the Salla store. Until the script has decided, the pages VEYLO
   covers (home, products, search, cart, thank-you) stay dark. If the script
   never runs, they show again after 8 s. Account pages, signing in and the
   checkout are never covered. */
html:not(.vg-off) body.index,
html:not(.vg-off) body.product-single,
html:not(.vg-off) body[class*="product-index"],
html:not(.vg-off) body.cart,
html:not(.vg-off) body:has(salla-thank-you-header) {
  background: #080706 !important;
}
html:not(.vg-off) body.index > :not(#veylo-gate),
html:not(.vg-off) body.product-single > :not(#veylo-gate),
html:not(.vg-off) body[class*="product-index"] > :not(#veylo-gate),
html:not(.vg-off) body.cart > :not(#veylo-gate),
html:not(.vg-off) body:has(salla-thank-you-header) > :not(#veylo-gate) {
  visibility: hidden;
  animation: vg-reveal 0s 8s forwards;
}
@keyframes vg-reveal { to { visibility: visible; } }

/* While the VEYLO screen is up, the Salla page under it stays hidden and still */
html.vg-on, html.vg-on body { overflow: hidden !important; }
html.vg-on body > :not(#veylo-gate) { visibility: hidden !important; animation: none !important; }

/* The VEYLO screen */
#veylo-gate {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  overflow-y: auto;
  padding: 40px 16px;
  background: #080706;
  color: #ebe6de;
  font-family: "IBM Plex Sans Arabic", "Alexandria", "Segoe UI", Tahoma, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.75;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  animation: vg-in .45s ease-out both;
}
#veylo-gate:focus { outline: none; }
#veylo-gate *, #veylo-gate *::before, #veylo-gate *::after { box-sizing: border-box; }
#veylo-gate [hidden] { display: none !important; }
#veylo-gate .vg__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
  width: 100%;
  max-width: 440px;
  margin: auto;
}
#veylo-gate .vg__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  animation: vg-rise .7s .25s cubic-bezier(.2, .7, .1, 1) both;
}
#veylo-gate .vg__title {
  margin: 0;
  font-family: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
  font-size: clamp(30px, 7vw, 44px);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: 0;
  color: #ebe6de;
}
#veylo-gate .vg__lede { margin: 0; font-size: 15px; color: #978e83; }
#veylo-gate .vg__tag {
  margin: 0 0 4px;
  padding-inline-start: .5em;
  font-family: "Alexandria", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: .5em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255, 255, 255, .62);
}
#veylo-gate .vg__order {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 10px 0 0;
  padding: 14px 28px;
  border: 1px solid #2a2521;
  font-size: 13px;
  color: #978e83;
}
#veylo-gate .vg__order b {
  font-family: "Alexandria", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: .08em;
  color: #ebe6de;
}
#veylo-gate .vg__note { margin: 4px 0 0; font-size: 13px; color: #978e83; white-space: pre-line; }
#veylo-gate .vg__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 50px;
  margin-top: 16px;
  padding: 12px 40px;
  border: 1px solid #ebe6de;
  border-radius: 0;
  background: #ebe6de;
  color: #080706 !important;
  font-family: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color .35s cubic-bezier(.2, .7, .1, 1), border-color .35s cubic-bezier(.2, .7, .1, 1);
}
#veylo-gate .vg__btn:hover, #veylo-gate .vg__btn:focus-visible { background: #b8a996; border-color: #b8a996; }
#veylo-gate .vg__btn:focus-visible { outline: 2px solid #b8a996; outline-offset: 3px; }
#veylo-gate .vg__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@keyframes vg-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes vg-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* The VEYLO wordmark loader, as on veylo-brand.shop: light fills the letters left to right while
   each letter makes its move (the V stretches, the E's bars slide, the Y folds, the L turns, the O flips) */
#veylo-gate .vl {
  --vl-w: min(58vw, 300px);
  --vl-dur: 3.3s;
  position: relative;
  display: block;
  width: var(--vl-w);
  direction: ltr;
}
#veylo-gate .vl__svg { display: block; width: 100%; height: auto; overflow: visible; }
#veylo-gate .vl__svg polygon, #veylo-gate .vl__svg rect { fill: currentColor; stroke: none; }
#veylo-gate .vl__svg path { fill: none; stroke: currentColor; stroke-width: 15; }
#veylo-gate .vl__svg--dim { color: rgba(255, 255, 255, .28); }
#veylo-gate .vl__svg--lit {
  position: absolute;
  inset: 0;
  color: #f2f2ef;
  -webkit-mask-image: linear-gradient(90deg, #000 48.8%, transparent 51.2%);
          mask-image: linear-gradient(90deg, #000 48.8%, transparent 51.2%);
  -webkit-mask-size: 300% 100%;
          mask-size: 300% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: 77.20% 0;
          mask-position: 77.20% 0;
  animation: vg-fill var(--vl-dur) infinite;
}
#veylo-gate .vl__svg * { transform-box: fill-box; }
#veylo-gate .vl-v  { transform-origin: 50% 100%; animation: vg-v var(--vl-dur) infinite; }
#veylo-gate .vl-e1, #veylo-gate .vl-e3 { transform-origin: 50% 50%; animation: vg-e-out var(--vl-dur) infinite; }
#veylo-gate .vl-e2 { transform-origin: 50% 50%; animation: vg-e-in var(--vl-dur) infinite; }
#veylo-gate .vl-ya { transform-origin: 100% 91%; animation: vg-ya var(--vl-dur) infinite; }
#veylo-gate .vl-yb { transform-origin: 0% 91%; animation: vg-yb var(--vl-dur) infinite; }
#veylo-gate .vl-l  { transform-origin: 50% 50%; animation: vg-l var(--vl-dur) infinite; }
#veylo-gate .vl-ot { transform-origin: 50% 50%; animation: vg-coin var(--vl-dur) infinite linear; }
/* thank-you: once the light has run through, the wordmark stays lit */
#veylo-gate.is-settled .vl__svg--lit { animation: none; -webkit-mask-position: 23.67% 0; mask-position: 23.67% 0; opacity: 1; }
#veylo-gate.is-settled .vl__svg * { animation: none; }

@keyframes vg-fill {
  0%, 6.667% { -webkit-mask-position: 77.20% 0; mask-position: 77.20% 0; opacity: 1; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  16.667% { -webkit-mask-position: 65.56% 0; mask-position: 65.56% 0; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  26.667% { -webkit-mask-position: 55.78% 0; mask-position: 55.78% 0; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  36.667% { -webkit-mask-position: 45.11% 0; mask-position: 45.11% 0; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  46.667% { -webkit-mask-position: 35.68% 0; mask-position: 35.68% 0; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  56.667% { -webkit-mask-position: 23.67% 0; mask-position: 23.67% 0; opacity: 1; }
  83.333% { -webkit-mask-position: 23.67% 0; mask-position: 23.67% 0; opacity: 1; animation-timing-function: ease-in-out; }
  93.333% { -webkit-mask-position: 23.67% 0; mask-position: 23.67% 0; opacity: 0; }
  93.667%, 100% { -webkit-mask-position: 77.20% 0; mask-position: 77.20% 0; opacity: 1; }
}
@keyframes vg-v {
  0%, 16.667% { transform: none; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  20.833% { transform: scaleY(1.42); animation-timing-function: cubic-bezier(.5, 0, .7, .4); }
  23.833% { transform: scaleY(.93); animation-timing-function: ease-out; }
  26.333% { transform: scaleY(1.04); animation-timing-function: ease-in-out; }
  29.167%, 100% { transform: none; }
}
@keyframes vg-e-out {
  0%, 26.667% { transform: none; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  31.667%, 33.333% { transform: translateX(46px); animation-timing-function: cubic-bezier(.6, 0, .9, .6); }
  36.333% { transform: translateX(-4px); animation-timing-function: ease-out; }
  38.333%, 100% { transform: none; }
}
@keyframes vg-e-in {
  0%, 26.667% { transform: none; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  31.667%, 33.333% { transform: translateX(-46px); animation-timing-function: cubic-bezier(.6, 0, .9, .6); }
  36.333% { transform: translateX(4px); animation-timing-function: ease-out; }
  38.333%, 100% { transform: none; }
}
@keyframes vg-ya {
  0%, 36.667% { transform: none; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  41.667%, 43.333% { transform: rotate(52deg); animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  47.333% { transform: rotate(-9deg); animation-timing-function: ease-in-out; }
  50.000%, 100% { transform: none; }
}
@keyframes vg-yb {
  0%, 36.667% { transform: none; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  41.667%, 43.333% { transform: rotate(-52deg); animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  47.333% { transform: rotate(9deg); animation-timing-function: ease-in-out; }
  50.000%, 100% { transform: none; }
}
@keyframes vg-l {
  0%, 46.667% { transform: none; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  52.500%, 59.167% { transform: scaleX(-1); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  65.000%, 100% { transform: none; }
}
@keyframes vg-coin {
  0% { transform: none; }
  60.000% { transform: scaleY(1.0000); }
  61.042% { transform: scaleY(0.9999); }
  62.083% { transform: scaleY(0.9932); }
  63.125% { transform: scaleY(0.9239); }
  64.167% { transform: scaleY(0.5972); }
  65.208% { transform: scaleY(-0.2447); }
  66.250% { transform: scaleY(-1.0000); }
  67.292% { transform: scaleY(-0.2447); }
  68.333% { transform: scaleY(0.5972); }
  69.375% { transform: scaleY(0.9239); }
  70.417% { transform: scaleY(0.9932); }
  71.458% { transform: scaleY(0.9999); }
  72.500% { transform: scaleY(1.0000); }
  100% { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  #veylo-gate, #veylo-gate .vg__copy { animation: none; }
  #veylo-gate .vl__svg--lit { -webkit-mask-image: none; mask-image: none; animation: none; }
  #veylo-gate .vl__svg * { animation: none; }
}