/* ==========================================================================
   Orbex Zone – sportswear / gloves / leather motion layer
   Additive only: no colours, fonts or layout are changed. Every colour comes
   from the site's own variables (--accent-color / --heading-color).
   Remove the link in _Layout.cshtml to revert.

   1  Page-to-page transitions          7  Stitched frames on cards
   2  Hero light field + speed lines    8  Spotlight + 3D tilt on cards
   3  Hero choreography                 9  Magnetic buttons + ripple
   4  Fabric / leather sheen           10  Staggered reveals / image wipe
   5  Running-stitch heading line      11  Back-to-top progress ring
   6  Icon micro-motion                12  Reduced motion
   ========================================================================== */

@property --hx { syntax: "<percentage>"; inherits: true; initial-value: 72%; }
@property --hy { syntax: "<percentage>"; inherits: true; initial-value: 28%; }

/* ---------- 1. Smooth page-to-page transitions (browsers without support simply skip this) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: ox-vt-out .22s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: ox-vt-in .42s cubic-bezier(.22, .61, .36, 1) both; }
@keyframes ox-vt-out { to { opacity: 0; } }
@keyframes ox-vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- 2. Hero: soft light field that follows the pointer + jersey-mesh texture + speed lines ---------- */
.hero { position: relative; }
.hero > .container, .hero .swiper { position: relative; z-index: 1; }
.ox-hero-fx {
  position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
  transition: --hx .9s var(--ox-ease, ease), --hy .9s var(--ox-ease, ease);
  animation: ox-aurora 16s ease-in-out infinite alternate;
}
.ox-hero-fx.is-tracking { animation: none; }
.ox-hero-fx::before {            /* light */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(38rem circle at var(--hx) var(--hy),
              color-mix(in srgb, var(--ox-accent, #6c95d9), transparent 84%), transparent 62%);
}
.ox-hero-fx::after {             /* jersey-mesh texture, visible only inside the light */
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--ox-heading, #3e0925), transparent 80%) 1px, transparent 1.6px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(26rem circle at var(--hx) var(--hy), #000, transparent 70%);
          mask-image: radial-gradient(26rem circle at var(--hx) var(--hy), #000, transparent 70%);
}
@keyframes ox-aurora { from { --hx: 78%; --hy: 22%; } to { --hx: 30%; --hy: 70%; } }

/* speed lines – thin streaks that cross the hero like motion blur */
.ox-hero-fx span {
  position: absolute; left: 0; top: var(--t, 50%); width: var(--w, 110px); height: 2px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--ox-accent, #6c95d9));
  animation: ox-dash var(--d, 9s) cubic-bezier(.3, 0, .2, 1) var(--delay, 0s) infinite;
}
@keyframes ox-dash {
  0% { transform: translateX(-20vw); opacity: 0; }
  8% { opacity: .28; }
  60% { opacity: .18; }
  100% { transform: translateX(110vw); opacity: 0; }
}

/* ---------- 3. Hero choreography ---------- */
/* headline: words rise out of a mask */
.ox-words .ox-w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; font-weight: inherit; }
.ox-words .ox-w > i { display: inline-block; font-style: inherit; transform: translateY(110%); }
.ox-words.is-in .ox-w > i { animation: ox-word .85s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i) * 55ms + 80ms); }
@keyframes ox-word { from { transform: translateY(110%) rotate(4deg); } to { transform: none; } }

/* every time a slide becomes active its text + buttons come in one after another */
.hero .swiper-slide-active .slide-content > *:not(.ox-words) { animation: ox-up .8s cubic-bezier(.16, 1, .3, 1) both; }
.hero .swiper-slide-active .slide-content > *:nth-child(2) { animation-delay: .18s; }
.hero .swiper-slide-active .slide-content > *:nth-child(3) { animation-delay: .30s; }
.hero .swiper-slide-active .slide-content > *:nth-child(4) { animation-delay: .42s; }
.hero .swiper-slide-active .slide-content > *:nth-child(n+5) { animation-delay: .54s; }
.hero .swiper-slide-active .feature-list .feature-item { animation: ox-up .7s cubic-bezier(.16, 1, .3, 1) both; }
.hero .swiper-slide-active .feature-list .feature-item:nth-child(1) { animation-delay: .35s; }
.hero .swiper-slide-active .feature-list .feature-item:nth-child(2) { animation-delay: .45s; }
.hero .swiper-slide-active .feature-list .feature-item:nth-child(3) { animation-delay: .55s; }
.hero .swiper-slide-active .feature-list .feature-item:nth-child(4) { animation-delay: .65s; }
@keyframes ox-up { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }

/* the four product tiles hover at slightly different rhythms (depth) */
.hero .product-showcase .product-item { animation: ox-bob 7s ease-in-out infinite; }
.hero .product-showcase .product-item:nth-child(2) { animation-duration: 8.5s; animation-delay: -2s; }
.hero .product-showcase .product-item:nth-child(3) { animation-duration: 9s; animation-delay: -4s; }
.hero .product-showcase .product-item:nth-child(4) { animation-duration: 7.5s; animation-delay: -1s; }
.hero .product-showcase .product-item:hover { animation-play-state: paused; }
@keyframes ox-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }

/* gentle scroll parallax (JS sets --py) */
.ox-parallax { translate: 0 var(--py, 0px); will-change: translate; }

/* ---------- 4. Sheen: light crosses product images (satin fabric / polished leather) ---------- */
.ox-glint { position: relative; overflow: hidden; }
.ox-glint::after {
  content: ""; position: absolute; inset: -20% 0; pointer-events: none; z-index: 2;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .5) 49%, rgba(255, 255, 255, .15) 53%, transparent 60%);
  transform: translateX(-130%);
}
.ox-glint:hover::after { transform: translateX(130%); transition: transform 1s var(--ox-ease, ease); }
.ox-glint.ox-glint-once::after { animation: ox-glint 1.5s var(--ox-ease, ease) both; }
@keyframes ox-glint { from { transform: translateX(-130%); } to { transform: translateX(130%); } }

/* ---------- 5. Running stitch sewn under section headings, needle point leading ---------- */
.ox-stitch { position: relative; display: block; width: 132px; height: 3px; margin: 12px auto 0; color: var(--ox-accent, #6c95d9); }
.ox-stitch > i {
  display: block; height: 100%; border-radius: 2px;
  background: repeating-linear-gradient(90deg, currentColor 0 10px, transparent 10px 16px);
  clip-path: inset(-2px 100% -2px 0);
}
.ox-stitch.is-drawn > i { animation: ox-sew 1.5s cubic-bezier(.65, 0, .35, 1) forwards; }
@keyframes ox-sew { to { clip-path: inset(-2px 0 -2px 0); } }
.ox-stitch::after {                       /* the needle */
  content: ""; position: absolute; top: 50%; left: 0; width: 14px; height: 2px; margin-top: -1px; border-radius: 2px;
  background: var(--ox-heading, #3e0925); opacity: 0; transform: rotate(-28deg); transform-origin: left center;
}
.ox-stitch.is-drawn::after { animation: ox-needle 1.5s cubic-bezier(.65, 0, .35, 1) forwards; }
@keyframes ox-needle {
  0% { left: 0; opacity: 1; transform: rotate(-28deg); }
  20% { transform: rotate(18deg); } 40% { transform: rotate(-28deg); } 60% { transform: rotate(18deg); } 80% { transform: rotate(-28deg); }
  92% { opacity: 1; }
  100% { left: 100%; opacity: 0; transform: rotate(0); }
}

/* ---------- 6. Icon micro-motion ---------- */
/* trophy is lifted into place when its section appears */
.shipping-info .section-heading .bi-trophy { display: inline-block; transform-origin: 50% 100%; }
.shipping-info .section-heading.is-visible .bi-trophy { animation: ox-trophy 1.2s cubic-bezier(.34, 1.56, .64, 1) .2s both; }
@keyframes ox-trophy { 0% { transform: translateY(26px) scale(.5) rotate(-14deg); opacity: 0; } 60% { transform: translateY(-6px) scale(1.08) rotate(6deg); opacity: 1; } 100% { transform: none; opacity: 1; } }
/* check marks in the hero list tick in one by one */
.hero .swiper-slide-active .feature-item .bi-check-circle-fill { display: inline-block; animation: ox-tick .5s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: inherit; }
@keyframes ox-tick { from { transform: scale(0) rotate(-45deg); } to { transform: none; } }
/* review stars light up left to right */
.hero .swiper-slide-active .review-stars i { display: inline-block; animation: ox-tick .45s cubic-bezier(.34, 1.56, .64, 1) both; }
.hero .swiper-slide-active .review-stars i:nth-child(1) { animation-delay: .6s; }
.hero .swiper-slide-active .review-stars i:nth-child(2) { animation-delay: .7s; }
.hero .swiper-slide-active .review-stars i:nth-child(3) { animation-delay: .8s; }
.hero .swiper-slide-active .review-stars i:nth-child(4) { animation-delay: .9s; }
.hero .swiper-slide-active .review-stars i:nth-child(5) { animation-delay: 1s; }

/* ---------- 7. Stitched frames: a sewn seam appears inside cards and photos (leather / garment stitching) ---------- */
.promo-cards .promo-card, .shipping-info .delivery-card {
  outline: 1.5px dashed transparent; outline-offset: -3px;
  transition: transform .45s var(--ox-ease, ease), box-shadow .45s var(--ox-ease, ease),
              outline-color .45s var(--ox-ease, ease), outline-offset .45s var(--ox-ease, ease) !important;
}
.promo-cards .promo-card:hover, .shipping-info .delivery-card:hover {
  outline-color: color-mix(in srgb, var(--ox-accent, #6c95d9), transparent 35%); outline-offset: -10px;
}
.about-2 .content-card .card-image, .recent-posts .post-img { position: relative; }
.about-2 .content-card .card-image::before, .recent-posts .post-img::before {
  content: ""; position: absolute; inset: 9px; z-index: 2; pointer-events: none; border-radius: 8px;
  border: 1.5px dashed rgba(255, 255, 255, .85);
  opacity: 0; transform: scale(1.04); transition: opacity .45s var(--ox-ease, ease), transform .45s var(--ox-ease, ease);
}
.about-2 .content-card:hover .card-image::before, .recent-posts article:hover .post-img::before { opacity: 1; transform: none; }

/* ---------- 8. Cards: pointer spotlight + 3D tilt (mouse only; JS sets the variables) ---------- */
.ox-rel { position: relative; }
.ox-spot {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3;
  opacity: 0; transition: opacity .4s var(--ox-ease, ease);
  background: radial-gradient(17rem circle at var(--mx, 50%) var(--my, 50%),
              color-mix(in srgb, var(--ox-accent, #6c95d9), transparent 80%), transparent 65%);
}
.ox-tilt:hover > .ox-spot { opacity: 1; }
.ox-tilt.is-tilting {
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px) !important;
  transition: transform .14s linear, box-shadow .45s var(--ox-ease, ease) !important;
}

/* ---------- 9. Buttons: magnetic pull + click ripple ---------- */
.ox-magnet.ox-magnet {
  translate: var(--tx, 0px) var(--ty, 0px);
  transition: translate .35s cubic-bezier(.16, 1, .3, 1), transform .3s var(--ox-ease, ease), box-shadow .3s var(--ox-ease, ease),
              background-color .3s, color .3s, background-position .8s var(--ox-ease, ease) !important;
}
.ox-ripple { position: relative; overflow: hidden; }
.ox-ripple .ox-ripple-dot { position: absolute; border-radius: 50%; pointer-events: none; background: rgba(255, 255, 255, .4); transform: scale(0); animation: ox-ripple .7s ease-out forwards; }
@keyframes ox-ripple { to { transform: scale(1); opacity: 0; } }

/* ---------- 10. Reveals (classes are added by JS only when it can also remove them) ---------- */
.ox-up { opacity: 0; }
.ox-up.is-in { animation: ox-up .75s cubic-bezier(.16, 1, .3, 1) both; animation-delay: var(--dl, 0ms); }
.ox-wipe { clip-path: inset(0 100% 0 0); }
.ox-wipe.is-in { animation: ox-wipe 1.1s cubic-bezier(.65, 0, .35, 1) both; animation-delay: var(--dl, 0ms); }
@keyframes ox-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.ox-wipe.is-in img { animation: ox-settle 1.4s cubic-bezier(.16, 1, .3, 1) both; animation-delay: var(--dl, 0ms); }
@keyframes ox-settle { from { scale: 1.12; } to { scale: 1; } }

/* ---------- 11. Back-to-top button shows how far the page has been read ---------- */
.scroll-top::before {
  content: ""; position: absolute; inset: -5px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--ox-heading, #3e0925) calc(var(--ox-scroll, 0) * 1turn), color-mix(in srgb, var(--ox-heading, #3e0925), transparent 85%) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
}

/* ---------- 12. Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .ox-hero-fx { display: none; }
  .ox-words .ox-w > i { transform: none !important; }
  .ox-stitch > i { clip-path: none !important; }
  .ox-stitch::after { display: none; }
  .ox-up, .ox-wipe { opacity: 1 !important; clip-path: none !important; }
  .hero .product-showcase .product-item { animation: none !important; }
}

/* ---------- 13. Blog (article pages + /blog list) – theme colours only ---------- */
.blog-details .content { font-size: 1.05rem; line-height: 1.8; }
.blog-details .content h3 { scroll-margin-top: 90px; }
.blog-details .content ul li { margin-bottom: .35rem; }
.blog-details .content a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; }
.blog-details .post-img img { width: 100%; border-radius: var(--ox-radius, 14px); }

.ox-takeaways {
  margin: 0 0 1.75rem; padding: 1.25rem 1.5rem; border-radius: var(--ox-radius, 14px);
  border-left: 4px solid var(--ox-accent, #6c95d9);
  background: color-mix(in srgb, var(--ox-accent, #6c95d9), transparent 91%);
}
.ox-takeaways h3 { margin: 0 0 .6rem !important; font-size: 1.05rem !important; text-transform: uppercase; letter-spacing: .06em; color: var(--ox-heading, #3e0925); }
.ox-takeaways ul { margin: 0; padding-left: 1.15rem; }
.ox-takeaways li { margin-bottom: .3rem; }

.ox-blog-cta {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between;
  margin-top: 2.25rem; padding: 1.5rem 1.75rem; border-radius: var(--ox-radius, 14px);
  background: var(--ox-heading, #3e0925); color: #fff;
  outline: 1.5px dashed rgba(255, 255, 255, .35); outline-offset: -9px;   /* stitched seam */
}
.ox-blog-cta > div:first-child { flex: 1 1 320px; }
.ox-blog-cta h3 { color: #fff !important; margin: 0 0 .35rem !important; font-size: 1.25rem !important; }
.ox-blog-cta p { margin: 0; font-size: .95rem; line-height: 1.6; color: rgba(255, 255, 255, .85); }
.ox-blog-cta-actions { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.ox-blog-cta .ox-blog-cta-link { color: #fff !important; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; }

.blog-details .meta-bottom .ox-share { display: flex; align-items: center; gap: .35rem; margin-top: 1rem; }
.blog-details .meta-bottom .ox-share span { font-weight: 600; margin-right: .35rem; color: var(--ox-heading, #3e0925); }
.blog-details .meta-bottom .ox-share a {
  width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: var(--ox-accent, #6c95d9); background: color-mix(in srgb, var(--ox-accent, #6c95d9), transparent 88%);
  transition: transform .3s var(--ox-ease, ease), background-color .3s, color .3s;
}
.blog-details .meta-bottom .ox-share a i { padding: 0; }
.blog-details .meta-bottom .ox-share a:hover { transform: translateY(-3px); background: var(--ox-accent, #6c95d9); color: #fff; }

@media (min-width: 992px) { .ox-sticky { position: sticky; top: 20px; } }
.ox-related li { display: flex; gap: .85rem; align-items: center; }
.ox-related li + li { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid color-mix(in srgb, var(--default-color, #212529), transparent 90%); }
.ox-related-thumb { flex: 0 0 76px; height: 60px; border-radius: 8px; overflow: hidden; display: block; }
.ox-related-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ox-ease, ease); }
.ox-related li:hover .ox-related-thumb img { transform: scale(1.08); }
.ox-related li div a { display: block; font-weight: 600; line-height: 1.35; color: var(--ox-heading, #3e0925); }
.ox-related li div a:hover { color: var(--ox-accent, #6c95d9); }
.ox-related time { font-size: .8rem; color: color-mix(in srgb, var(--default-color, #212529), transparent 40%); }
.ox-quote-widget p { font-size: .95rem; }
.ox-quote-widget .ox-wa-link { display: block; text-align: center; margin-top: .85rem; font-weight: 600; color: #128c4b; }

.ox-blog-index .ox-excerpt { margin: 1rem 0 0; color: color-mix(in srgb, var(--default-color, #212529), transparent 20%); line-height: 1.65; }
.ox-blog-index .ox-excerpt .read-more { display: inline-block; white-space: nowrap; font-weight: 600; color: var(--ox-accent, #6c95d9); }
.ox-blog-index .post-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
