/* ============================================================
   TrendLabs — animations.css
   Animation support styles adapted from the source template.
   Only rules used by assets/js/animations.js + page markup.
   ============================================================ */

/* ---------- smooth scroll structure ---------- */
#smooth-wrapper {
  overflow: hidden;
}
#smooth-content {
  will-change: transform;
}

/* ScrollTrigger pin spacers are transparent by default — paint them dark so the
   body background never flashes through around pinned sections */
.pin-spacer {
  background-color: var(--tl-dark, #150f17);
}

/* ---------- preloader ---------- */
html.loading {
  overflow: hidden;
}
body.preloader-active {
  overflow: hidden;
}
.tj-preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background-color: var(--tl-dark, #150f17);
}
.tj-preloader_inner {
  text-align: center;
}
.tj-preloader .preloader_brand {
  display: block;
  font-family: var(--tl-ff-heading, sans-serif);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f5f0ea;
  margin-bottom: 18px;
}
.tj-preloader .preloader_brand em {
  font-style: normal;
  color: var(--tl-purple-light, #b56cbc);
}
.tj-preloader .preloader_counter {
  display: block;
  font-family: var(--tl-ff-heading, sans-serif);
  font-weight: 800;
  font-size: clamp(64px, 14vw, 160px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(245, 240, 234, 0.55);
}
.tj-preloader .preloader_note {
  display: block;
  margin-top: 18px;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245, 240, 234, 0.45);
}

/* ---------- split text helpers ---------- */
.tj-chars-up,
.tj-line-up,
.tj-split-text,
.tj-reveal-line,
.title-highlight,
.words-fade-in-random,
.img-reveal {
  opacity: 0;
  visibility: hidden;
}
/* descender room: overflow:hidden clips g/y/p/j tails, so pad the clip box
   and pull it back with a matching negative margin (no layout shift) */
.tj-chars-up .line {
  overflow: hidden;
  padding-bottom: 0.18em;
  margin-bottom: -0.18em;
}
.tj-chars-up .line,
.tj-chars-up .char {
  display: inline-block;
  will-change: transform;
}
.tj-line-up .line {
  overflow: hidden;
  display: block;
  padding-bottom: 0.18em;
  margin-bottom: -0.18em;
}
.tj-line-up .line-inner {
  display: block;
  will-change: transform;
}
.tj-split-text .char {
  display: inline-block;
  will-change: transform, opacity;
}
.tj-reveal-line__wrap {
  overflow: hidden;
}
.tj-reveal-line .reveal-line {
  display: block;
  will-change: transform;
}

/* scrubbed gradient highlight */
.title-highlight .line {
  position: relative;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  --highlight-offset: 0%;
  background-image: linear-gradient(
    90deg,
    var(--tl-highlight-on, currentColor) var(--highlight-offset),
    var(--tl-highlight-off, rgba(120, 110, 125, 0.35)) var(--highlight-offset)
  );
}

/* ---------- marquee ---------- */
.tj-marquee {
  overflow: hidden;
  white-space: nowrap;
  display: flex;
}
.tj-marquee .tj-marquee-track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  min-width: 100%;
  animation: tlMarquee var(--marquee-speed, 28s) linear infinite;
}
.tj-marquee.marquee-reverse .tj-marquee-track {
  animation-direction: reverse;
}
.tj-marquee:hover .tj-marquee-track {
  animation-play-state: paused;
}
.tj-marquee .tj-marquee-item {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
@keyframes tlMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ---------- counters ---------- */
.counter {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ---------- parallax ---------- */
.parallax-image {
  will-change: transform;
}

/* ---------- image settle reveal ---------- */
.img-reveal {
  overflow: hidden;
  display: block;
}
.img-reveal img,
.img-reveal svg {
  display: block;
  width: 100%;
  will-change: transform;
}

/* ---------- pinned step walkthrough ---------- */
.tj-pin-steps .pin-step {
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.tj-pin-steps.is-pinned .pin-step {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(36px);
  pointer-events: none;
}
.tj-pin-steps.is-pinned .pin-step.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.tj-pin-steps .pin-visual {
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.tj-pin-steps.is-pinned .pin-visual {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}
.tj-pin-steps.is-pinned .pin-visual.active {
  opacity: 1;
  transform: scale(1);
}

/* ---------- horizontal scroll ---------- */
.tj-horizontal-wrap {
  overflow: hidden;
}
.tj-horizontal-track {
  display: flex;
  flex-wrap: nowrap;
  will-change: transform;
}
.tj-horizontal-progress {
  height: 2px;
  background: rgba(120, 110, 125, 0.25);
  overflow: hidden;
}
.tj-horizontal-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--tl-purple, #722b79);
  transform: scaleX(0);
  transform-origin: left center;
}

/* ---------- magnetic ---------- */
.magnetic {
  will-change: transform;
}
span.magnetic, i.magnetic {
  display: inline-block;
}

/* ---------- svg draw ---------- */
.svg-draw [data-draw] {
  will-change: stroke-dashoffset;
}

/* ---------- hero title (split on load) ---------- */
.tj-hero-intro .hero-title {
  opacity: 0;
  visibility: hidden;
}
.hero-title .char {
  display: inline-block;
  will-change: transform;
}

/* ---------- rotating voice lines ---------- */
.word-rotate {
  position: relative;
  display: block;
  overflow: hidden;
  height: 1.7em;
}
.word-rotate .word-rotate-item {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  will-change: transform;
}

/* ---------- scroll progress bar ---------- */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1200;
  background: linear-gradient(90deg, var(--tl-purple, #722b79), var(--tl-gold, #ffad00));
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

/* ---------- split flip text ---------- */
.split-flip-text-wrap {
  display: inline-block;
}
.split-flip-text-wrap .flip-built {
  display: inline-block;
}
.split-flip-text-wrap .flip-word {
  display: inline-block;
  white-space: nowrap;
}
.split-flip-text-wrap .char-wrap {
  position: relative;
  display: inline-block;
}
.split-flip-text-wrap .char-wrap .flip-front,
.split-flip-text-wrap .char-wrap .flip-back {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-block;
  backface-visibility: hidden;
  will-change: transform;
}
.split-flip-text-wrap .char-wrap .flip-ghost {
  visibility: hidden;
  display: inline-block;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- random char blink ---------- */
.tj-random-char-blink .char {
  display: inline-block;
}


/* ---------- magic cursor ---------- */
.tl-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.tl-cursor.-visible {
  opacity: 1;
}
.tl-cursor::before {
  content: "";
  position: absolute;
  top: -28px;
  left: -28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--tl-gold, #ffad00);
  transform: scale(0.16);
  transition: transform 0.3s ease-in-out, background-color 0.3s ease;
}
.tl-cursor.-pointer::before {
  transform: scale(0.32);
  background: var(--tl-purple-light, #b56cbc);
}
.tl-cursor.-active::before {
  transform: scale(0.12);
}
.tl-cursor.-text::before {
  transform: scale(1.25);
  background: var(--tl-purple, #722b79);
}
.tl-cursor .tl-cursor-text {
  position: absolute;
  top: -28px;
  left: -28px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.tl-cursor.-text .tl-cursor-text {
  opacity: 1;
  transform: scale(1);
}
@media (hover: none) {
  .tl-cursor { display: none; }
}

/* ---------- ambient decor keyframes ---------- */
@keyframes tlSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes tlDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.06); }
  66% { transform: translate(-30px, 24px) scale(0.96); }
}
@keyframes tlPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.35); }
}
/* ---------- window-shape hero (pinned aperture morph) ---------- */
.window-shape-wrapper {
  position: relative;
  overflow: hidden;
}
.window-shape-wrapper.ws-pinned {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}
.window-shape-wrapper.ws-pinned .window-shape-screen-1,
.window-shape-wrapper.ws-pinned .window-shape-screen-2 {
  position: absolute;
  inset: 0;
}
.window-shape-wrapper.ws-pinned .window-shape-screen-1 {
  z-index: 0;
}
.window-shape-wrapper.ws-pinned .window-shape-screen-2 {
  z-index: 3;
  pointer-events: none;
}
.window-shape-img {
  display: none;
  position: relative;
  z-index: 2;
  pointer-events: none;
}
.window-shape-wrapper.ws-pinned .window-shape-img {
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Laid out at full coverage size and scaled DOWN by GSAP (0 -> 1) so the
   browser rasterizes the SVG sharp at 3840px instead of upscaling a 64px
   bitmap, which made the boxes blurry. */
.window-shape-img .ws-shape {
  display: block;
  flex: none;
  width: 3840px;
  height: 3600px;
}

/* ---------- pinned process slider mechanics ---------- */
.tl-process-no {
  position: relative;
  display: inline-flex;
  overflow: hidden;
  height: 120px;
  line-height: 1;
}
.tl-process-no > span {
  display: inline-block;
  will-change: transform;
}
.tl-process-images {
  position: relative;
  overflow: hidden;
  isolation: isolate; /* keeps the border-radius clip applied to transformed slides */
}
.tl-process-items {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* ---------- stacked active list states ---------- */
.tl-stack-item .stack-content {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.45s ease, opacity 0.45s ease, margin 0.45s ease;
}
.tl-stack-item .stack-content > * {
  overflow: hidden;
}
.tl-stack-item.active .stack-content {
  grid-template-rows: 1fr;
  opacity: 1;
}
.tl-stack-item .stack-title {
  opacity: 0.25;
  transition: opacity 0.45s ease, font-size 0.45s ease, color 0.45s ease;
}
.tl-stack-item.active .stack-title {
  opacity: 1;
}
.tl-stack-item .stack-no {
  transition: color 0.45s ease;
}

/* ---------- testimonial scrub ---------- */
.tl-testi-row {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  will-change: transform;
}
.tl-testi-scrub {
  flex-shrink: 0;
}

/* ---------- reveal-right rows ---------- */
.tj-reveal-right-wrap {
  overflow: hidden;
}
.tj-reveal-right {
  will-change: transform;
}

/* ---------- perspective showcase mechanics ---------- */
.perspective-showcase-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  height: 100vh;
  overflow: hidden;
}
.perspective-showcase-images {
  position: relative;
  will-change: transform;
}
.perspective-showcase-item .perspective-showcase-img {
  overflow: hidden;
  opacity: 0.22;
  transition: opacity 0.4s ease-in-out;
}
.perspective-showcase-item.active .perspective-showcase-img {
  opacity: 1;
  z-index: 2;
}
.perspective-showcase-subtitle,
.perspective-showcase-year {
  position: relative;
  height: 100vh;
}
.perspective-showcase-subtitle .ps-label,
.perspective-showcase-year .ps-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  white-space: nowrap;
}
.perspective-showcase-subtitle .ps-label { right: 0; }
.perspective-showcase-year .ps-label { left: 0; }
.perspective-showcase-subtitle .ps-label.active,
.perspective-showcase-year .ps-label.active {
  opacity: 1;
}
.perspective-title {
  opacity: 0.2;
  transition: opacity 0.4s ease;
}
.perspective-title.active {
  opacity: 1;
}

/* ---------- scroll-spin star ---------- */
.tj-scroll-spin {
  display: inline-block;
  will-change: transform;
}
.tj-scroll-spin-inner {
  display: inline-block;
  animation: tlSpin 14s linear infinite;
}

/* ---------- hover-active list flip layers ---------- */
.split-flip-text-2 {
  position: relative;
  overflow: hidden;
  display: inline-block;
}
.split-flip-text-2 .flip-layer {
  transition: all 0.35s ease-in-out;
  white-space: nowrap;
  overflow: hidden;
}
.split-flip-text-2 .flip-layer.layer2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
}
.tl-hover-item:hover .split-flip-text-2 .flip-layer.layer2,
.tl-hover-item.active .split-flip-text-2 .flip-layer.layer2 {
  width: 100%;
}
.hover-active-show .preview-glyph {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.hover-active-show .preview-glyph.active {
  opacity: 1;
  transform: scale(1);
}

/* ---------- reduced motion + no-JS safety ---------- */
@media (prefers-reduced-motion: reduce) {
  .tj-marquee .tj-marquee-track,
  .spin-anim,
  .float-anim {
    animation: none !important;
  }
  .tl-cursor { display: none; }
}
